This commit was manufactured by cvs2svn to create branch 'R3_2_1_patches'.
diff --git a/bundles/org.eclipse.wst.sse.ui/.classpath b/bundles/org.eclipse.wst.sse.ui/.classpath
new file mode 100644
index 0000000..3a7715c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/.classpath
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="src-extensions"/>
+	<classpathentry kind="src" path="src-encoding"/>
+	<classpathentry kind="src" path="src-tasktags"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+		<accessrules>
+			<accessrule kind="accessible" pattern="org/eclipse/wst/validation/**"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/bundles/org.eclipse.wst.sse.ui/.cvsignore b/bundles/org.eclipse.wst.sse.ui/.cvsignore
new file mode 100644
index 0000000..2b6bc40
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/.cvsignore
@@ -0,0 +1,8 @@
+bin
+editor.jar
+build.xml
+temp.folder
+org.eclipse.wst.sse.ui_1.0.0.jar
+@dot
+src.zip
+javaCompiler...args
diff --git a/bundles/org.eclipse.wst.sse.ui/.options b/bundles/org.eclipse.wst.sse.ui/.options
new file mode 100644
index 0000000..cfbecf3
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/.options
@@ -0,0 +1,73 @@
+org.eclipse.wst.sse.ui/debug=true
+org.eclipse.wst.sse.ui/debug/tracefilter=
+
+#org.eclipse.wst.sse.ui.edit.util.ActionContributer._showDebugStatus
+org.eclipse.wst.sse.ui/actioncontributor/debugstatusfields=true
+
+
+#org.eclipse.wst.sse.ui.extension.TransferBuilder.debugTime
+org.eclipse.wst.sse.ui/transferbuilder/time=false
+
+org.eclipse.wst.sse.ui/extendedconfigurationbuilder=false
+#org.eclipse.wst.sse.ui.extension.ExtendedConfigurationBuilder.debugTime
+org.eclipse.wst.sse.ui/extendedconfigurationbuilder/time=false
+
+
+org.eclipse.wst.sse.ui/extendededitoractionbuilder=false
+
+#org.eclipse.wst.sse.ui.extension.ExtendedEditorActionBuilder.debugReadTime
+org.eclipse.wst.sse.ui/extendededitoractionbuilder/readtime=false
+
+#org.eclipse.wst.sse.ui.extension.ExtendedEditorActionBuilder.debugContributeTime
+org.eclipse.wst.sse.ui/extendededitoractionbuilder/contributetime=false
+
+
+#org.eclipse.wst.sse.ui.extension.ExtendedEditorActionBuilder.debugMenu
+org.eclipse.wst.sse.ui/extendededitoractionbuilder/debugmenu=false
+
+#org.eclipse.wst.sse.ui.extension.ExtendedEditorActionBuilder.debugPopup
+org.eclipse.wst.sse.ui/extendededitoractionbuilder/debugpopup=false
+
+#org.eclipse.wst.sse.ui.extension.ExtendedEditorActionBuilder.debugToolbar
+org.eclipse.wst.sse.ui/extendededitoractionbuilder/debugtoolbar=false
+
+
+#org.eclipse.wst.sse.ui.FileModelProvider.debugOperations
+org.eclipse.wst.sse.ui/filemodelprovider/operations=false
+
+#org.eclipse.wst.sse.ui.FileModelProvider.debugLifecyclelistener
+org.eclipse.wst.sse.ui/filemodelprovider/lifecyclelistener=false
+
+#org.eclipse.wst.sse.ui.FileModelProvider.debugModelStatelistener
+org.eclipse.wst.sse.ui/filemodelprovider/modelstatelistener=false
+
+
+#org.eclipse.wst.sse.ui.StorageModelProvider.debugOperations
+org.eclipse.wst.sse.ui/storagemodelprovider/operations=false
+
+#org.eclipse.wst.sse.ui.StorageModelProvider.debugElementStatelistener
+org.eclipse.wst.sse.ui/storagemodelprovider/elementstatelistener=false
+
+org.eclipse.wst.sse.ui/contentOutline=false
+org.eclipse.wst.sse.ui/propertySheet=false
+
+#org.eclipse.wst.sse.ui.views.contentoutline.PropertyChangeUpdateActionContributionItem.debug
+org.eclipse.wst.sse.ui/propertyChangeUpdateActionContributionItem=false
+
+org.eclipse.wst.sse.ui/debug/reconcilerjob=false
+
+#org.eclipse.wst.sse.ui.internal.GotoAnnotationAction._debug
+org.eclipse.wst.sse.ui/gotoNextAnnotation=false
+
+org.eclipse.wst.sse.ui/preferences-properties=false
+
+org.eclipse.wst.sse.ui/debug/reconcilerSpelling=false
+org.eclipse.wst.sse.ui/debug/reconcilerSpelling/showProblems=false
+
+org.eclipse.wst.sse.ui/debug/reconcilerValidators=false
+#org.eclipse.wst.sse.ui.internal.reconcile.validator.ValidatorStrategy
+org.eclipse.wst.sse.ui/debug/reconcilerValidatorSupported=false
+org.eclipse.wst.sse.ui/debug/reconcilerValidatorEnablement=false
+
+org.eclipse.wst.sse.ui/structuredPresentationReconciler=false
+org.eclipse.wst.sse.ui/structuredPresentationReconciler/time=false
diff --git a/bundles/org.eclipse.wst.xml.ui/.project b/bundles/org.eclipse.wst.sse.ui/.project
similarity index 92%
rename from bundles/org.eclipse.wst.xml.ui/.project
rename to bundles/org.eclipse.wst.sse.ui/.project
index 9fd135d..78bd94c 100644
--- a/bundles/org.eclipse.wst.xml.ui/.project
+++ b/bundles/org.eclipse.wst.sse.ui/.project
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>org.eclipse.wst.xml.ui R30Patches</name>
+	<name>org.eclipse.wst.sse.ui</name>
 	<comment></comment>
 	<projects></projects>
 	<buildSpec>
diff --git a/bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.core.resources.prefs
similarity index 100%
rename from bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.core.resources.prefs
rename to bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.core.resources.prefs
diff --git a/bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.core.runtime.prefs
similarity index 100%
rename from bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.core.runtime.prefs
rename to bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.core.runtime.prefs
diff --git a/bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.jdt.core.prefs
similarity index 84%
rename from bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.jdt.core.prefs
rename to bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.jdt.core.prefs
index a512da0..26b0cde 100644
--- a/bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Sat Mar 24 02:59:49 EDT 2007

+#Wed Apr 30 02:03:18 EDT 2008

 eclipse.preferences.version=1

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

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

@@ -25,6 +25,8 @@
 org.eclipse.jdt.core.compiler.problem.discouragedReference=warning

 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning

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

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

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

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

 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore

 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error

@@ -51,8 +53,14 @@
 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.nullReference=warning

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

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

 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error

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

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

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

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

 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled

 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error

 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled

@@ -65,14 +73,18 @@
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error

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

 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore

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

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

 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled

 org.eclipse.jdt.core.compiler.problem.unusedImport=error

 org.eclipse.jdt.core.compiler.problem.unusedLabel=error

 org.eclipse.jdt.core.compiler.problem.unusedLocal=error

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

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

 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.unusedWarningToken=warning

 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning

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

 org.eclipse.jdt.core.incompatibleJDKLevel=ignore

diff --git a/bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..6ad0dd8
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Nov 16 00:51:27 EST 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates/>
diff --git a/bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.ltk.core.refactoring.prefs
similarity index 100%
rename from bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.ltk.core.refactoring.prefs
rename to bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.ltk.core.refactoring.prefs
diff --git a/bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.pde.prefs
similarity index 83%
rename from bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.pde.prefs
rename to bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.pde.prefs
index de4a8be..52ce9da 100644
--- a/bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.pde.prefs
+++ b/bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.pde.prefs
@@ -1,25 +1,25 @@
-#Wed Jun 04 20:07:47 EDT 2008
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=0
-compilers.p.build=0
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.illegal-att-value=0
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=0
-compilers.p.unknown-identifier=0
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-compilers.use-project=true
-eclipse.preferences.version=1
+#Thu Aug 14 03:59:55 EDT 2008

+compilers.f.unresolved-features=1

+compilers.f.unresolved-plugins=1

+compilers.incompatible-environment=0

+compilers.p.build=0

+compilers.p.deprecated=1

+compilers.p.discouraged-class=1

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

+compilers.p.internal=1

+compilers.p.missing-packages=2

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

+compilers.p.not-externalized-att=0

+compilers.p.unknown-attribute=0

+compilers.p.unknown-class=1

+compilers.p.unknown-element=0

+compilers.p.unknown-identifier=1

+compilers.p.unknown-resource=0

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

+compilers.p.unresolved-import=0

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

+compilers.s.create-docs=false

+compilers.s.doc-folder=doc

+compilers.s.open-tags=1

+compilers.use-project=true

+eclipse.preferences.version=1

diff --git a/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..db2de79
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,70 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.wst.sse.ui; singleton:=true
+Bundle-Version: 1.2.1.qualifier
+Bundle-Activator: org.eclipse.wst.sse.ui.internal.SSEUIPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.wst.sse.ui,
+ org.eclipse.wst.sse.ui.contentassist,
+ org.eclipse.wst.sse.ui.internal;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.actions;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.contentassist;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.contentoutline;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.contentproperties.ui;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.correction;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.debug;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.derived;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.edit.util;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.editor;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.encoding.ui;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.extension;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.format;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.handlers;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.hyperlink;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.openon;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.preferences;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.preferences.ui;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.projection;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.properties;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.provisional.extensions;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.provisional.preferences;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.provisional.registry;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.provisional.style;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.reconcile;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.reconcile.validator;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.search;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.selection;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.spelling;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.taginfo;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.text;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.ui;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.util;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.internal.view.events;x-friends:="org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.ui",
+ org.eclipse.wst.sse.ui.preferences,
+ org.eclipse.wst.sse.ui.quickoutline,
+ org.eclipse.wst.sse.ui.reconcile,
+ org.eclipse.wst.sse.ui.typing,
+ org.eclipse.wst.sse.ui.views.contentoutline,
+ org.eclipse.wst.sse.ui.views.properties
+Import-Package: com.ibm.icu.util; version="3.8",
+ com.ibm.icu.text; version="3.8"
+Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.jface.text;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.debug.ui;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ui.editors;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
+ org.eclipse.search;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ui.forms;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.ui.views;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.wst.sse.core;bundle-version="[1.1.500,1.2.0)",
+ org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.wst.validation;bundle-version="[1.2.100,1.3.0)",
+ org.eclipse.emf.common;bundle-version="[2.4.0,3.0.0)",
+ org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)"
+Bundle-ActivationPolicy: lazy
+Eclipse-LazyStart: true
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.wst.sse.ui/README.txt b/bundles/org.eclipse.wst.sse.ui/README.txt
new file mode 100644
index 0000000..efe4522
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/README.txt
@@ -0,0 +1,2 @@
+The base editor of the sse framework. It provides the hooks for content assist,
+breakpoints, debugging, open-on, quickfix, spell checking and a content outline.
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.ui/about.html b/bundles/org.eclipse.wst.sse.ui/about.html
similarity index 100%
rename from bundles/org.eclipse.wst.xml.ui/about.html
rename to bundles/org.eclipse.wst.sse.ui/about.html
diff --git a/bundles/org.eclipse.wst.xml.ui/build.properties b/bundles/org.eclipse.wst.sse.ui/build.properties
similarity index 81%
rename from bundles/org.eclipse.wst.xml.ui/build.properties
rename to bundles/org.eclipse.wst.sse.ui/build.properties
index cae15eb..a080c98 100644
--- a/bundles/org.eclipse.wst.xml.ui/build.properties
+++ b/bundles/org.eclipse.wst.sse.ui/build.properties
@@ -11,20 +11,20 @@
 #     
 ###############################################################################
 bin.includes = plugin.xml,\
+               .options,\
+               .,\
                icons/,\
                plugin.properties,\
-               templates/,\
-               examples/,\
                META-INF/,\
-               .,\
-               .options,\
                about.html
 bin.excludes = bin/**,\
                @dot/**,\
                temp.folder/**
+src.includes = toc.xml,\
+               testToc.xml,\
+               schema/,\
+               html/
 source.. = src/,\
-           src-multipage/,\
-           src-wizards/,\
-           src-catalog/,\
-           src-validation
-src.includes = build.properties
+           src-extensions/,\
+           src-encoding/,\
+           src-tasktags/
diff --git a/bundles/org.eclipse.wst.sse.ui/html/maintopic.html b/bundles/org.eclipse.wst.sse.ui/html/maintopic.html
new file mode 100644
index 0000000..a476078
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/html/maintopic.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+	<title>Main Topic</title>
+</head>
+
+<body>
+<h1>Main Topic</h1>
+Please enter your text here.
+</body>
+</html>
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/html/subtopic.html b/bundles/org.eclipse.wst.sse.ui/html/subtopic.html
new file mode 100644
index 0000000..8a61c50
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/html/subtopic.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+	<title>Sub Topic</title>
+</head>
+
+<body>
+<h1>Sub Topic</h1>
+Please enter your text here.
+</body>
+</html>
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/html/toc.html b/bundles/org.eclipse.wst.sse.ui/html/toc.html
new file mode 100644
index 0000000..326f0a9
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/html/toc.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+	<title>Table of Contents</title>
+</head>
+
+<body>
+<h1>Table of Contents</h1>
+Please enter your text here.
+</body>
+</html>
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/icons/full/ctool16/spellcheck.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/ctool16/spellcheck.gif
new file mode 100644
index 0000000..c71de32
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/icons/full/ctool16/spellcheck.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/collapse_all.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/collapseall.gif
similarity index 100%
rename from bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/collapse_all.gif
rename to bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/collapseall.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/delete.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/delete.gif
new file mode 100644
index 0000000..2e197c2
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/delete.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/synced.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/synced.gif
new file mode 100644
index 0000000..4b9e567
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/synced.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.sse.ui/icons/full/dtool16/spellcheck.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/dtool16/spellcheck.gif
new file mode 100644
index 0000000..a4cf55f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/icons/full/dtool16/spellcheck.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/collapse_all.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/collapseall.gif
similarity index 100%
rename from bundles/org.eclipse.wst.xml.ui/icons/full/etool16/collapse_all.gif
rename to bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/collapseall.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/delete.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/delete.gif
new file mode 100644
index 0000000..0ae6dec
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/delete.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/synced.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/synced.gif
new file mode 100644
index 0000000..05cefef
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/synced.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.sse.ui/icons/full/etool16/spellcheck.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/etool16/spellcheck.gif
new file mode 100644
index 0000000..c71de32
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/icons/full/etool16/spellcheck.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.sse.ui/icons/full/obj16/occ_match.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/obj16/occ_match.gif
new file mode 100644
index 0000000..9e033de
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/icons/full/obj16/occ_match.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.sse.ui/icons/full/obj16/preferences.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/obj16/preferences.gif
new file mode 100644
index 0000000..4c07fea
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/icons/full/obj16/preferences.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.sse.ui/icons/full/obj16/prop_ps.gif b/bundles/org.eclipse.wst.sse.ui/icons/full/obj16/prop_ps.gif
new file mode 100644
index 0000000..3aec64d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/icons/full/obj16/prop_ps.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/sourceEditor.gif b/bundles/org.eclipse.wst.sse.ui/icons/sourceEditor.gif
similarity index 100%
rename from bundles/org.eclipse.wst.xml.ui/icons/sourceEditor.gif
rename to bundles/org.eclipse.wst.sse.ui/icons/sourceEditor.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.sse.ui/plugin.properties b/bundles/org.eclipse.wst.sse.ui/plugin.properties
new file mode 100644
index 0000000..7044196
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/plugin.properties
@@ -0,0 +1,111 @@
+###############################################################################
+# Copyright (c) 2001, 2010 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
+#     Jens Lukowski/Innoopract - initial renaming/restructuring
+#     David Carver - bug 212330 - migrate to org.eclipse.ui.menus extension point     
+###############################################################################
+providerName=Eclipse Web Tools Platform
+pluginName=Structured Source Editor
+Standalone_Structured_Source_Editor.name=Standalone Structured Source Editor
+# Names on preferences pages
+Structured_Text_Editor.name=Structured Text Editors
+Task_Tags_Preferences.name=Task Tags
+
+#
+sourceEditorFontDefiniton.label=Structured Text Editor Text Font
+sourceEditorFontDefintion.description=The Structured text editor text font is used by Structured text editors.
+
+Adapter_Factory_Description_Extension.name=Adapter Factory Description Extension
+Extended_Editor_Actions_Extension.name=Extended Editor Actions Extension
+Drop_Target_Transfers_Extension.name=Drop Target Transfers Extension
+Extended_Editor_Configuration_Extension.name=Extended Editor Configuration Extension
+quickFixProcessor=Quick Fix Processor Extension
+Semantic_Highlighting_Extension.name=Semantic Highlighting Extension
+Character_Pairing.name=Character Pairing Extension
+Completion_Proposal.name=Completion Proposal
+Completion_Proposal_Categories_Configuration.name=Completion Proposal Categories Configuration
+##########################################################################
+# These strings are used in Workbench Keys Preferences
+##########################################################################
+scope.structuredTextEditor.name=Editing in Structured Text Editors
+scope.structuredTextEditor.description=Editing in Structured Text Editors
+command.toggle.comment.name=Toggle Comment
+command.toggle.comment.description=Toggle Comment
+command.add.block.comment.name=Add Block Comment
+command.add.block.comment.description=Add Block Comment
+command.remove.block.comment.name=Remove Block Comment
+command.remove.block.comment.description=Remove Block Comment
+command.cleanup.document.name=Cleanup Document...
+command.cleanup.document.description=Cleanup document
+command.cleanup.document.mnemonic=C
+command.format.document.name=Format
+command.format.document.description=Format selection
+command.format.document.mnemonic=F
+command.format.active.elements.name=Format Active Elements
+command.format.active.elements.description=Format active elements
+command.format.active.elements.mnemonic=i
+command.open.file.from.source.name=Open Selection
+command.open.file.from.source.description=Open an editor on the selected link
+command.open.file.from.source.mnemonic=O
+command.search.find.occurrences.name=Occurrences in File
+command.search.find.occurrences.description=Find occurrences of the selection in the file
+command.search.find.occurrences.mnemonic=O
+command.information.quick_outline.name=Quick Outline
+command.information.quick_outline.description=Show the quick outline for the editor input
+ActionDefinition.selectEnclosing.name=Select Enclosing Element
+ActionDefinition.selectEnclosing.description=Expand selection to include enclosing element
+ActionDefinition.selectNext.name=Select Next Element
+ActionDefinition.selectNext.description=Expand selection to include next sibling
+ActionDefinition.selectPrevious.name=Select Previous Element
+ActionDefinition.selectPrevious.description=Expand selection to include previous sibling
+ActionDefinition.selectLast.name=Restore Last Selection
+ActionDefinition.selectLast.description=Restore last selection
+ActionDefinition.quickFix.name=Quick Fix
+ActionDefinition.quickFix.description=Quick Fix
+ActionDefinition.gotoMatchingBracket.name=Matching Bracket
+ActionDefinition.gotoMatchingBracket.description=Go to Matching Bracket
+
+
+#
+AddBookmark.label=Add Boo&kmark...
+SelectRuler.label=Select Ruler
+#
+##########################################################################
+# These strings are used in file and container resource popup menu
+##########################################################################
+Source=&Source
+FormatDocument=&Format
+Refactor=Refac&tor
+##
+Breakpoint_Extension_Point.name=Breakpoint Extension Point
+Source_Validation_Extension_Point.name=Reconcile Validator Extension Point
+###############################################################################
+# The following property keys maybe unused. Commented out on 4/12/2005. Uncomment if needed.
+#Bean_Info_Provider_Extension.name=Bean Info Provider Extension
+#SpellCheck_Extension_Point.name=SpellCheck Extension Point
+#Open_On_Extension_Point.name=Open On Extension Point
+#Spell_Check_label=Spell Check
+#Spell_Check_tooltip=Spell Check
+preferenceKeywords.todo=case sensitive task tag todo xxx fix fixme project specific projectspecific comments
+preferenceKeywords.sseeditor=structured text editor source xml html jsp appearance highlight matching brackets report problems type validation inform unsupported content folding color hovers modifier semantic
+ExpandSelectionTo=Expand Selection To
+SmartInsert_label=Sma&rt Insert Mode
+StructureSelectEnclosing_label=Enclosing Element
+StructureSelectEnclosing_tooltip=Expand selection to include enclosing element
+StructureSelectNext_label=Next Element
+StructureSelectNext_tooltip=Expand selection to include next sibling
+StructureSelectPrevious_label=Previous Element
+StructureSelectPrevious_tooltip=Expand selection to include previous sibling
+StructureSelectHistory_label=Restore Last Selection
+StructureSelectHistory_tooltip=Restore last selection
+
+Colors.content_assist_proposals_background=Content Assist Proposals Background
+Colors.content_assist_proposals_foreground=Content Assist Proposals Foreground
+Colors.content_assist_parameters_background=Content Assist Parameters Background
+Colors.content_assist_parameters_foreground=Content Assist Parameters Foreground
diff --git a/bundles/org.eclipse.wst.sse.ui/plugin.xml b/bundles/org.eclipse.wst.sse.ui/plugin.xml
new file mode 100644
index 0000000..2bf3ff0
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/plugin.xml
@@ -0,0 +1,784 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.3"?>
+<plugin>
+
+	<extension-point
+		id="adapterFactoryDescription"
+		name="%Adapter_Factory_Description_Extension.name" ></extension-point>
+	<extension-point
+		id="extendedEditorActions"
+		name="%Extended_Editor_Actions_Extension.name" ></extension-point>
+	<extension-point
+		id="dropTargetTransfers"
+		name="%Drop_Target_Transfers_Extension.name" ></extension-point>
+	<extension-point
+		id="editorConfiguration"
+		name="%Extended_Editor_Configuration_Extension.name"
+		schema="schema/editorconfiguration.exsd" ></extension-point>
+	<extension-point
+		id="semanticHighlighting"
+		name="%Semantic_Highlighting_Extension.name"
+		schema="schema/semanticHighlighting.exsd" ></extension-point>
+	<extension-point
+		id="characterPairing"
+		name="%Character_Pairing.name"
+		schema="schema/characterPairing.exsd" ></extension-point>
+
+
+	<!-- Make sure default preference values are set at runtime -->
+	<extension point="org.eclipse.core.runtime.preferences">
+		<initializer
+			class="org.eclipse.wst.sse.ui.internal.PreferenceInitializer" />
+	</extension>
+
+
+	<!-- reusable extensions -->
+	<extension point="org.eclipse.wst.sse.ui.editorConfiguration">
+		<sourceViewerConfiguration
+			class="org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration"
+			target="org.eclipse.wst.sse.ui.StructuredTextEditor" />
+		<provisionalDefinition
+			type="preferencepages"
+			value="org.eclipse.wst.sse.ui.preferences.editor"
+			target="org.eclipse.wst.sse.ui.StructuredTextEditor" />
+	</extension>
+	<!-- associate the NavigateActionSet with various parts of the XML perspective-->
+	<extension point="org.eclipse.ui.actionSetPartAssociations">
+		<actionSetPartAssociation
+			targetID="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
+			<part
+				id="org.eclipse.wst.sse.ui.StructuredTextEditor">
+			</part>
+		</actionSetPartAssociation>
+		<actionSetPartAssociation
+			targetID="org.eclipse.ui.NavigateActionSet">
+			<part
+				id="org.eclipse.wst.sse.ui.StructuredTextEditor">
+			</part>
+		</actionSetPartAssociation>
+		<actionSetPartAssociation
+            targetID="org.eclipse.debug.ui.launchActionSet">
+            <part id="org.eclipse.wst.sse.ui.StructuredTextEditor"/>
+		</actionSetPartAssociation>
+	</extension>
+	
+	<!-- Keywords for preference and properties pages -->
+	<extension point="org.eclipse.ui.keywords">
+		<keyword
+			label="%preferenceKeywords.todo"
+			id="org.eclipse.wst.sse.ui.todo"/>
+		<keyword
+			label="%preferenceKeywords.sseeditor"
+			id="org.eclipse.wst.sse.ui.sseeditor"/>
+    </extension>
+    
+	<extension point="org.eclipse.ui.preferencePages">
+		<!-- Source Editor Preference page under Workbench->Editors -->
+		<page
+			name="%Structured_Text_Editor.name"
+			category="org.eclipse.ui.preferencePages.Editors"
+			class="org.eclipse.wst.sse.ui.internal.preferences.ui.StructuredTextEditorPreferencePage"
+			id="org.eclipse.wst.sse.ui.preferences.editor">
+			<keywordReference id="org.eclipse.wst.sse.ui.sseeditor"/>
+		</page>
+
+		<!-- SSE task tags preference page under that-->
+		<page
+			name="%Task_Tags_Preferences.name"
+			category="org.eclipse.wst.sse.ui.preferences.editor"
+			class="org.eclipse.wst.sse.ui.internal.preferences.ui.TaskTagPreferencePage"
+			id="org.eclipse.wst.sse.ui.preferences.tasktags">
+			<keywordReference id="org.eclipse.wst.sse.ui.todo"/>
+		</page>
+	</extension>
+	<!-- ================================================================================================ -->
+	<!-- common task tags property page -->
+	<!-- ================================================================================================ -->
+	<extension point="org.eclipse.ui.propertyPages">
+		<page
+			id="org.eclipse.wst.sse.ui.project.properties.tasktags"
+			name="%Task_Tags_Preferences.name"
+			class="org.eclipse.wst.sse.ui.internal.preferences.ui.TaskTagPreferencePage">
+         	<enabledWhen>
+               	<and>
+					<adapt type="org.eclipse.core.resources.IProject">
+					</adapt>
+				</and> 
+			</enabledWhen>
+			<keywordReference id="org.eclipse.wst.sse.ui.todo"/>
+		</page>
+	</extension>
+
+	<!--
+		<extension-point id="dragSourceTransfers" name="Drag Source Transfers"/>
+	-->
+	<extension point="org.eclipse.ui.commands">
+		<!-- Edit commands -->
+		<command
+			name="%ActionDefinition.selectEnclosing.name"
+			description="%ActionDefinition.selectEnclosing.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.structure.select.enclosing">
+		</command>
+		<command
+			name="%ActionDefinition.selectNext.name"
+			description="%ActionDefinition.selectNext.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.structure.select.next">
+		</command>
+		<command
+			name="%ActionDefinition.selectPrevious.name"
+			description="%ActionDefinition.selectPrevious.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.structure.select.previous">
+		</command>
+		<command
+			name="%ActionDefinition.selectLast.name"
+			description="%ActionDefinition.selectLast.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.structure.select.last">
+		</command>
+		<!-- Source commands -->
+		<command
+			name="%command.toggle.comment.name"
+			description="%command.toggle.comment.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.toggle.comment">
+		</command>
+		<command
+			name="%command.add.block.comment.name"
+			description="%command.add.block.comment.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.add.block.comment">
+		</command>
+		<command
+			name="%command.remove.block.comment.name"
+			description="%command.remove.block.comment.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.remove.block.comment">
+		</command>
+		<command
+			name="%command.cleanup.document.name"
+			description="%command.cleanup.document.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.cleanup.document">
+		</command>
+		<command
+			name="%command.format.document.name"
+			description="%command.format.document.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.format.document">
+		</command>
+		<command
+			name="%command.format.active.elements.name"
+			description="%command.format.active.elements.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.format.active.elements">
+		</command>
+		<!-- Navigate commands -->
+		<command
+			name="%command.open.file.from.source.name"
+			description="%command.open.file.from.source.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.open.file.from.source">
+		</command>
+      <command
+            name="%ActionDefinition.gotoMatchingBracket.name"
+            description="%ActionDefinition.gotoMatchingBracket.description"
+            categoryId="org.eclipse.ui.category.navigate"
+            id="org.eclipse.wst.sse.ui.goto.matching.bracket">
+      </command>
+		<!-- Find Occurrences -->
+		<command
+			name="%command.search.find.occurrences.name"
+			description="%command.search.find.occurrences.description"
+			categoryId="org.eclipse.ui.category.edit"
+			id="org.eclipse.wst.sse.ui.search.find.occurrences">
+		</command>
+		<command
+			name="%command.information.quick_outline.name"
+			description="%command.information.quick_outline.description"
+			categoryId="org.eclipse.ui.category.navigate"
+			id="org.eclipse.wst.sse.ui.quick_outline">
+		</command>
+	</extension>
+	<!-- Keybinding scope for source editor -->
+	<extension point="org.eclipse.ui.contexts">
+		<context
+			name="%scope.structuredTextEditor.name"
+			parentId="org.eclipse.ui.textEditorScope"
+			description="%scope.structuredTextEditor.description"
+			id="org.eclipse.wst.sse.ui.structuredTextEditorScope">
+		</context>
+	</extension>
+	<!-- Keybindings for source editor -->
+	<extension point="org.eclipse.ui.bindings">
+	    <!--  win32:  M1=CTRL, M2=SHIFT, M3=ALT -->
+		<!-- Edit commands -->
+		<key
+			sequence="M2+M3+ARROW_UP"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.structure.select.enclosing"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<key
+			sequence="M2+M3+ARROW_RIGHT"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.structure.select.next"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<key
+			sequence="M2+M3+ARROW_RIGHT"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId=""
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+			platform="carbon">
+		</key>
+		<key
+			sequence="M2+M4+ARROW_RIGHT"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.structure.select.next"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+			platform="carbon">
+		</key>
+		<key
+			sequence="M2+M3+ARROW_LEFT"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.structure.select.previous"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<key
+			sequence="M2+M3+ARROW_LEFT"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId=""
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+			platform="carbon">
+		</key>
+		<key
+			sequence="M2+M4+ARROW_LEFT"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.structure.select.previous"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+			platform="carbon">
+		</key>
+		<key
+			sequence="M2+M3+ARROW_DOWN"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.structure.select.last"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<!-- Source commands -->
+		<key
+			sequence="M1+M2+C"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.toggle.comment"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<key
+			sequence="M1+O"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.quick_outline"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<key
+			sequence="M1+M2+/"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.add.block.comment"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<key
+			sequence="M1+/"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.add.block.comment"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+			platform="carbon">
+		</key>
+		<key
+			sequence="M1+M2+\"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.remove.block.comment"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<key
+			sequence="M1+\"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.remove.block.comment"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+			platform="carbon">
+		</key>
+		<key
+			sequence="M1+M2+F"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.format.document"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<key
+			sequence="M1+I"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.format.active.elements"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<!-- Navigate commands -->
+		<key
+			sequence="F3"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.open.file.from.source"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+		<key
+            sequence="M1+M2+P"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+            commandId="org.eclipse.wst.sse.ui.goto.matching.bracket"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+		<!-- Find Occurrences -->
+		<key
+			sequence="M1+M2+A"
+			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
+			commandId="org.eclipse.wst.sse.ui.search.find.occurrences"
+			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+		</key>
+	</extension>
+	<!-- Font and colors contributions -->
+	<extension point="org.eclipse.ui.themes">
+		<themeElementCategory
+			label="%Structured_Text_Editor.name"
+			id="org.eclipse.wst.sse.ui">
+		</themeElementCategory>
+		<fontDefinition
+			label="%sourceEditorFontDefiniton.label"
+			categoryId="org.eclipse.wst.sse.ui"
+			defaultsTo="org.eclipse.jface.textfont"
+			id="org.eclipse.wst.sse.ui.textfont">
+			<description>
+				%sourceEditorFontDefintion.description
+			</description>
+		</fontDefinition>
+	</extension>
+	<extension point="org.eclipse.wst.sse.ui.dropTargetTransfers">
+		<dropTargetContribution
+			targetID="org.eclipse.wst.sse.ui.StructuredTextEditor"
+			id="org.eclipse.wst.sse.ui.extension.ExtendedTransfers">
+			<transfer
+				priority="mid"
+				singleton="true"
+				class="org.eclipse.swt.dnd.FileTransfer"
+				method="getInstance"
+				id="org.eclipse.swt.dnd.FileTransfer">
+			</transfer>
+			<dropAction
+				class="org.eclipse.wst.sse.ui.internal.FileDropAction"
+				transferID="org.eclipse.swt.dnd.FileTransfer"
+				id="org.eclipse.wst.sse.ui.internal.FileDropAction">
+			</dropAction>
+			<transfer
+				priority="low"
+				singleton="true"
+				class="org.eclipse.swt.dnd.TextTransfer"
+				method="getInstance"
+				id="org.eclipse.swt.dnd.TextTransfer">
+			</transfer>
+			<dropAction
+				class="org.eclipse.wst.sse.ui.internal.TextDropAction"
+				transferID="org.eclipse.swt.dnd.TextTransfer"
+				id="org.eclipse.wst.sse.ui.internal.TextDropAction">
+			</dropAction>
+		</dropTargetContribution>
+	</extension>
+
+	<extension point="org.eclipse.ui.editors.annotationTypes">
+		<type
+			super="org.eclipse.ui.workbench.texteditor.error"
+			markerType="org.eclipse.wst.sse.problem"
+			name="org.eclipse.wst.sse.ui.temp.error"
+			markerSeverity="2">
+		</type>
+		<type
+			super="org.eclipse.ui.workbench.texteditor.warning"
+			markerType="org.eclipse.wst.sse.problem"
+			name="org.eclipse.wst.sse.ui.temp.warning"
+			markerSeverity="1">
+		</type>
+
+		<type
+			super="org.eclipse.ui.workbench.texteditor.info"
+			markerType="org.eclipse.wst.sse.problem"
+			name="org.eclipse.wst.sse.ui.temp.info"
+			markerSeverity="0">
+		</type>
+	</extension>
+	<extension
+		point="org.eclipse.ui.editors.markerAnnotationSpecification">
+
+		<!--================================================================================================-->
+		<!-- same as eclipse text ui (including preference keys), except for vertical ruler & preference page -->
+		<!--================================================================================================-->
+		<specification
+			annotationType="org.eclipse.wst.sse.ui.temp.error"
+			annotationImageProvider="org.eclipse.wst.sse.ui.internal.ui.StructuredTextAnnotationImageProvider"
+			verticalRulerPreferenceValue="true"
+			verticalRulerPreferenceKey="sseErrorIndicationInVerticalRuler"
+			includeOnPreferencePage="false">
+		</specification>
+		<specification
+			annotationType="org.eclipse.wst.sse.ui.temp.warning"
+			annotationImageProvider="org.eclipse.wst.sse.ui.internal.ui.StructuredTextAnnotationImageProvider"
+			verticalRulerPreferenceValue="false"
+			verticalRulerPreferenceKey="sseWarningIndicationInVerticalRuler"
+			includeOnPreferencePage="false">
+		</specification>
+		<specification
+			annotationImageProvider="org.eclipse.wst.sse.ui.internal.ui.StructuredTextAnnotationImageProvider"
+			annotationType="org.eclipse.wst.sse.ui.temp.info">
+		</specification>
+	</extension>
+	<!-- dynamic content type supporting editor, no supported file extensions by default -->
+	<extension point="org.eclipse.ui.editors">
+		<editor
+			name="%Standalone_Structured_Source_Editor.name"
+			icon="$nl$/icons/sourceEditor.gif"
+			contributorClass="org.eclipse.wst.sse.ui.internal.actions.ActionContributor"
+			class="org.eclipse.wst.sse.ui.StructuredTextEditor"
+			symbolicFontName="org.eclipse.wst.sse.ui.textfont"
+			id="org.eclipse.wst.sse.ui.StructuredTextEditor">
+		</editor>
+	</extension>
+	
+<!--	<extension point="org.eclipse.ui.popupMenus">
+		<objectContribution
+			objectClass="org.eclipse.core.resources.IContainer"
+			id="org.eclipse.wst.sse.ui.actions.ContainerSourceActions">
+			<menu
+				label="%Source"
+				path="additions"
+				id="source">
+				<groupMarker name="sourceGroup"></groupMarker>
+			</menu>
+			<action
+				label="%FormatDocument"
+				class="org.eclipse.wst.sse.ui.internal.actions.FormatActionDelegate"
+				menubarPath="source/sourceGroup"
+				enablesFor="+"
+				id="org.eclipse.wst.sse.ui.actions.ContainerSourceActions.Format">
+			</action>
+		</objectContribution>
+		<objectContribution
+			objectClass="org.eclipse.core.resources.IFile"
+			id="org.eclipse.wst.sse.ui.actions.FileSourceActions">
+			<menu
+				label="%Source"
+				path="additions"
+				id="source">
+				<groupMarker name="sourceGroup"></groupMarker>
+			</menu>
+			<action
+				label="%FormatDocument"
+				class="org.eclipse.wst.sse.ui.internal.actions.FormatActionDelegate"
+				menubarPath="source/sourceGroup"
+				enablesFor="+"
+				id="org.eclipse.wst.sse.ui.actions.FileSourceActions.Format">
+			</action>
+		</objectContribution>
+   	</extension>
+   	-->
+   <!--
+   <extension
+         point="org.eclipse.ui.editorActions">
+      <editorContribution
+            targetID="org.eclipse.wst.sse.ui.StructuredTextEditor"
+            id="org.eclipse.wst.sse.ui.StructuredTextEditor.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>
+         <action
+               label="%SelectRuler.label"
+               class="org.eclipse.ui.texteditor.SelectRulerAction"
+               actionID="RulerClick"
+               id="org.eclipse.ui.texteditor.SelectRulerAction">
+         </action>
+      </editorContribution>
+   </extension>
+   -->
+   
+	<!--================================================================================================-->
+	<!-- contribute a SearchResultViewPage for Occurrences in file                                      -->
+	<!--================================================================================================-->
+	<extension
+		id="Occurrences search page"
+		point="org.eclipse.search.searchResultViewPages">
+		<viewPage
+			id="org.eclipse.wst.sse.ui.search.OccurrencesSearchResultPage"
+			searchResultClass="org.eclipse.wst.sse.ui.internal.search.OccurrencesSearchResult"
+			class="org.eclipse.wst.sse.ui.internal.search.OccurrencesSearchViewPage">
+		</viewPage>
+	</extension>
+
+	<!-- extension point for toggling breakpoints -->
+	<extension-point
+		id="breakpoint"
+		name="%Breakpoint_Extension_Point.name" 
+		schema="schema/org.eclipse.wst.sse.ui.breakpoint.exsd" />
+	<!-- extension point for source validation -->
+	<!-- interfaces for this extension point can be found in org.eclipse.wst.validation -->
+	<extension-point
+		id="sourcevalidation"
+		name="%Source_Validation_Extension_Point.name"
+		schema="schema/org.eclipse.wst.sse.ui.sourcevalidation.exsd" />
+	<extension-point 
+		id="quickFixProcessor" 
+		name="%quickFixProcessor" 
+		schema="schema/quickFixProcessor.exsd"/>
+ <extension-point id="completionProposal" name="%Completion_Proposal.name" schema="schema/completionProposal.exsd"/>
+ <extension-point id="completionProposalCategoriesConfiguration" name="%Completion_Proposal_Categories_Configuration.name" schema="schema/completionProposalCategoriesConfiguration.exsd"/>
+ 
+	<extension point="org.eclipse.ui.menus">
+		<menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=edit">
+			<menu id="sourceMenuId" label="%Source"></menu>
+		</menuContribution>
+		<menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=sourceMenuId">
+			<menu id="refactorMenuId" label="%Refactor"></menu>
+		</menuContribution>
+	    <menuContribution locationURI="menu:edit?after=additions">
+	       <menu id="expandSelectionToMenuId" label="%ExpandSelectionTo"></menu>
+		</menuContribution>
+		<menuContribution locationURI="menu:sourceMenuId">
+			<separator name="sourceBegin" visible="false"></separator>
+			<separator name="shiftBegin" visible="true"></separator>
+			<separator name="shiftEnd" visible="true"></separator>
+			<separator name="additions" visible="true"></separator>
+			<separator name="sourceEnd" visible="false"></separator>	
+		</menuContribution>
+
+	    <menuContribution locationURI="menu:goTo?after=additions">
+		    <separator name="matchingBegin" visible="false"></separator>
+		    <command commandId="org.eclipse.wst.sse.ui.goto.matching.bracket" id="org.eclipse.wst.sse.ui.goto.matching.bracket" label="%ActionDefinition.gotoMatchingBracket.name" style="push">
+				<visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+				</visibleWhen>
+		    </command>
+			<separator name="matchingEnd" visible="false"></separator>
+		</menuContribution>
+		<!-- Contribute a Source menu for containers -->
+     <menuContribution
+           locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+        <menu
+              id="sourceMenuId"
+              label="%Source">
+	        <command
+	              commandId="org.eclipse.wst.sse.ui.format"
+	              id="sourceFormat"
+	              style="push">
+	           <!-- Check to make sure that the handler is enabled before making visible -->
+				<visibleWhen checkEnabled="true" />
+	        </command>
+        </menu>
+     </menuContribution>
+		<menuContribution locationURI="menu:sourceMenuId?after=additions">
+			<command commandId="org.eclipse.wst.sse.ui.search.find.occurrences" id="OccurencesFile" style="push">
+			   <visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+				</visibleWhen>
+			</command>
+		</menuContribution>
+	    <!--<menuContribution locationURI="menu:edit?after=additions">
+	       <command commandId="org.eclipse.ui.edit.text.toggleInsertMode" id="ToggleInsertMode" label="%SmartInsert_label" style="toggle">
+			   <visibleWhen checkEnabled="false">
+				   <reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+			   </visibleWhen>
+	       </command>	       
+		</menuContribution> -->
+	    <menuContribution locationURI="menu:expandSelectionToMenuId">
+	       <command commandId="org.eclipse.wst.sse.ui.structure.select.enclosing" id="org.eclipse.wst.sse.ui.structure.select.enclosing" label="%StructureSelectEnclosing_label" style="push">
+			   <visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+				</visibleWhen>
+	       </command>	       
+	       <command commandId="org.eclipse.wst.sse.ui.structure.select.next" id="org.eclipse.wst.sse.ui.structure.select.next" label="%StructureSelectNext_label" style="push">
+			   <visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+				</visibleWhen>
+	       </command>
+	       <command commandId="org.eclipse.wst.sse.ui.structure.select.previous" id="org.eclipse.wst.sse.ui.structure.select.previous" label="%StructureSelectPrevious_label" style="push">
+			   <visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+				</visibleWhen>
+	       </command>
+	       <command commandId="org.eclipse.wst.sse.ui.structure.select.last" id="org.eclipse.wst.sse.ui.structure.select.last" label="%StructureSelectHistory_label" style="push">
+			   <visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+				</visibleWhen>
+	       </command>
+		</menuContribution>
+		
+
+		<menuContribution locationURI="menu:sourceMenuId?after=shiftBegin">
+			<command commandId="org.eclipse.ui.edit.text.shiftLeft"
+			         id="ShiftLeft"
+			         style="push">
+				<visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"/>
+				</visibleWhen>
+			</command>
+			<command commandId="org.eclipse.ui.edit.text.shiftRight"
+                     id="ShiftRight"
+                     style="push">
+				<visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"/>
+				</visibleWhen>
+			</command>
+		</menuContribution>
+
+		<menuContribution locationURI="menu:sourceMenuId?after=shiftEnd">
+	        <command
+		           commandId="org.eclipse.wst.sse.ui.cleanup.document"
+		           id="CleanupDocument"
+			       mnemonic="%command.cleanup.document.mnemonic"
+		           style="push">
+				<visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"/>
+				</visibleWhen>
+		    </command>
+			<command 
+				commandId="org.eclipse.wst.sse.ui.format.document" 
+				id="FormatDocument" 
+			    mnemonic="%command.format.document.mnemonic"
+				style="push">
+				<visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"/>
+				</visibleWhen>
+			</command>
+			<command 
+				commandId="org.eclipse.wst.sse.ui.format.active.elements" 
+				id="FormatElements" 
+				mnemonic="%command.format.active.elements.mnemonic"
+				style="push">
+				<visibleWhen checkEnabled="false">
+					<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+				</visibleWhen>
+			</command>
+		</menuContribution>
+
+	     <menuContribution
+	           locationURI="popup:sourcePopupMenuId?after=sourceBegin">
+				<command
+			           commandId="org.eclipse.wst.sse.ui.cleanup.document"
+			           id="CleanupDocument"
+			           style="push">
+					<visibleWhen checkEnabled="false">
+						<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+					</visibleWhen>
+			    </command>
+				<command 
+					commandId="org.eclipse.wst.sse.ui.format.document" 
+					id="FormatDocument" 
+					mnemonic="%command.format.document.mnemonic" 
+					style="push">
+						<visibleWhen checkEnabled="false">
+							<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+						</visibleWhen>
+				</command>
+				<command 
+					commandId="org.eclipse.wst.sse.ui.format.active.elements" 
+					id="FormatElements" 
+					mnemonic="%command.format.active.elements.mnemonic" 
+					style="push">
+						<visibleWhen checkEnabled="false">
+							<reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
+						</visibleWhen>
+				</command>
+				
+	     </menuContribution>
+	</extension>
+	<extension
+       point="org.eclipse.ui.commands">
+	    <command
+	          id="org.eclipse.wst.sse.ui.format"
+	          name="%command.format.document.name">
+	    </command>
+	</extension>
+	
+	<!-- Enable the FormatHandler for Containers -->
+	<extension point="org.eclipse.ui.handlers">
+		<handler 
+			class="org.eclipse.wst.sse.ui.internal.handlers.FormatHandler"
+			commandId="org.eclipse.wst.sse.ui.format">
+			<activeWhen>
+				<iterate ifEmpty="false">
+					<adapt
+						type="org.eclipse.core.resources.IContainer">
+					</adapt>
+				</iterate>
+			</activeWhen>
+			<enabledWhen>
+				<iterate ifEmpty="false">
+					<adapt
+						type="org.eclipse.core.resources.IContainer">
+					</adapt>
+				</iterate>
+			</enabledWhen>
+		</handler>
+	</extension>
+	
+	<extension point="org.eclipse.core.expressions.definitions">
+		<definition id="org.eclipse.wst.sse.ui.sseActiveContext.definition">
+            <with variable="activeContexts">
+	           <iterate operator="or">
+	              <equals value="org.eclipse.wst.sse.ui.structuredTextEditorScope"/>
+	           </iterate>
+            </with>
+		</definition>
+	</extension>
+	
+	<!-- Define theme -->
+	<extension
+		point="org.eclipse.ui.themes">
+		<theme
+			id="org.eclipse.ui.ide.systemDefault">
+			<colorOverride
+				id="content_assist_proposals_background"
+				value="COLOR_LIST_BACKGROUND">
+			</colorOverride>
+			<colorOverride
+				id="content_assist_proposals_foreground"
+				value="COLOR_LIST_FOREGROUND">
+			</colorOverride>
+			<colorOverride
+				id="content_assist_parameters_background"
+				value="COLOR_LIST_BACKGROUND">
+			</colorOverride>
+			<colorOverride
+				id="content_assist_parameters_foreground"
+				value="COLOR_LIST_FOREGROUND">
+			</colorOverride>
+		</theme>
+		<colorDefinition
+			id="content_assist_proposals_background"
+			isEditable="false"
+			label="%Colors.content_assist_proposals_background"
+			value="255,255,255">
+		</colorDefinition>
+		<colorDefinition
+			id="content_assist_proposals_foreground"
+			isEditable="false"
+			label="%Colors.content_assist_proposals_foreground"
+			value="0,0,0">
+		</colorDefinition>
+		<colorDefinition
+			id="content_assist_parameters_background"
+			isEditable="false"
+			label="%Colors.content_assist_parameters_background"
+			value="255,255,255">
+		</colorDefinition>
+		<colorDefinition
+			id="content_assist_parameters_foreground"
+			isEditable="false"
+			label="%Colors.content_assist_parameters_foreground"
+			value="0,0,0">
+		</colorDefinition>
+	</extension>
+	
+</plugin>
+
diff --git a/bundles/org.eclipse.wst.sse.ui/reexport-info.txt b/bundles/org.eclipse.wst.sse.ui/reexport-info.txt
new file mode 100644
index 0000000..9c8c7c7
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/reexport-info.txt
@@ -0,0 +1,4 @@
+we reexport eclipse.ui.editors 
+since one of our APIs, StructuredSourceViewerConfiguration 
+requires it. 
+
diff --git a/bundles/org.eclipse.wst.sse.ui/schema/characterPairing.exsd b/bundles/org.eclipse.wst.sse.ui/schema/characterPairing.exsd
new file mode 100644
index 0000000..f6b731e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/schema/characterPairing.exsd
@@ -0,0 +1,131 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.wst.sse.ui" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appInfo>

+         <meta.schema plugin="org.eclipse.wst.sse.ui" id="characterPairing" name="Character Pairing"/>

+      </appInfo>

+      <documentation>

+         [Enter description of this extension point.]

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appInfo>

+            <meta.element />

+         </appInfo>

+      </annotation>

+      <complexType>

+         <sequence>

+            <element ref="inserter" minOccurs="0" maxOccurs="unbounded"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute translatable="true"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="inserter">

+      <complexType>

+         <sequence>

+            <element ref="contentTypeIdentifier" minOccurs="1" maxOccurs="unbounded"/>

+         </sequence>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.sse.ui.AbstractCharacterPairInserter:"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="contentTypeIdentifier">

+      <complexType>

+         <attribute name="id" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="partitions" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="since"/>

+      </appInfo>

+      <documentation>

+         [Enter the first release in which this extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="examples"/>

+      </appInfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="apiinfo"/>

+      </appInfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="implementation"/>

+      </appInfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/bundles/org.eclipse.wst.sse.ui/schema/completionProposal.exsd b/bundles/org.eclipse.wst.sse.ui/schema/completionProposal.exsd
new file mode 100644
index 0000000..c0a8a1f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/schema/completionProposal.exsd
@@ -0,0 +1,282 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.wst.sse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.wst.sse.ui" id="completionProposal" name="SSE Completion Proposal"/>
+      </appInfo>
+      <documentation>
+         This extension point allows the contribution of SSE completion proposal computers and categories to participate in the content assist process of SSE editors.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element labelAttribute="name" />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <choice minOccurs="0" maxOccurs="unbounded">
+               <element ref="proposalCategory" minOccurs="0" maxOccurs="unbounded"/>
+               <element ref="proposalComputer" minOccurs="0" maxOccurs="unbounded"/>
+               <element ref="proposalComputerExtendedActivation" minOccurs="0" maxOccurs="unbounded"/>
+            </choice>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  an optional identifier of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional name of the extension instance
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="proposalCategory">
+      <annotation>
+         <documentation>
+            A proposal category contribution defines categories of proposals used to group them in the UI.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The unique ID of the proposal category
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  The name of the proposal category.  If a name is not provided the proposal category ID will be used as the name.
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="icon" type="string">
+            <annotation>
+               <documentation>
+                  An optional icon of the category, which can be displayed in the user preferences
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="resource"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="proposalComputer">
+      <annotation>
+         <documentation>
+            A proposal computer contribution which is associated with at least one content type.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="contentType" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The unique ID of the proposal computer.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  The human readable name of the proposal computer.  If none is given the ID of the proposal computer will be used.
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="icon" type="string">
+            <annotation>
+               <documentation>
+                  An optional icon of the computer, which will be used when creating the proposals suggested by this computer.  This preference can be programicly overwriten by the implimentation of &lt;code&gt;org.eclipse.wst.sse.ui.internal.provisional.contentassist.ICompletionProposalComputer&lt;/code&gt; specified by the &lt;tt&gt;class&lt;/tt&gt; attribute.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="resource"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The class that implements the contributed computer. The
+class must be public and implement
+&lt;code&gt;org.eclipse.wst.sse.ui.contentassist.ICompletionProposalComputer&lt;/code&gt;
+and must have a public 0-argument constructor.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.wst.sse.ui.contentassist.ICompletionProposalComputer"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="activate" type="boolean" use="default" value="false">
+            <annotation>
+               <documentation>
+                  If the attribute is set to &lt;code&gt;true&lt;/code&gt; it will force this plug-in to be loaded on content assist invocation
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="categoryId" type="string" use="default" value="org.eclipse.wst.sse.ui.defaultProposalCategory">
+            <annotation>
+               <documentation>
+                  The id of a &lt;tt&gt;proposalCategory&lt;/tt&gt; that this proposal computer should be a part of
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.wst.sse.ui.completionProposal/proposalCategory/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="contentType">
+      <annotation>
+         <documentation>
+            A SSE content type. If no partition types are provided then computer will be associated with all partition types in the content type.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="partitionType" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The ID of the content type
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.core.contenttype.contentTypes/content-type/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="partitionType">
+      <annotation>
+         <documentation>
+            A SSE partition type.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The ID of the partition type.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="proposalComputerExtendedActivation">
+      <annotation>
+         <documentation>
+            Used to extended the activation context of an already existing proposal computer.  Use this if there is a plugin A that has defined a proposal comptuer that should be activated for a content type defined in plugin B.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="contentType" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The ID of the &lt;tt&gt;proposalComputer&lt;/tt&gt; whos activation context should be extended.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.wst.sse.ui.completionProposal/proposalComputer/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         &lt;p&gt;The following are examples of SSE completion proposal contributions:&lt;/p&gt;
+
+&lt;b&gt;Plugin A:&lt;/b&gt;&lt;pre&gt;&lt;extension point=&quot;org.eclipse.wst.sse.ui.completionProposal&quot;&gt;
+  &lt;proposalCategory
+      icon=&quot;icons/full/obj16/tag-macro.gif&quot;
+      id=&quot;org.eclipse.wst.xml.ui.proposalCategory.xmlTemplates&quot;
+      name=&quot;XML Templates&quot;&gt;
+  &lt;/proposalCategory&gt;
+  &lt;proposalComputer
+      activate=&quot;false&quot;
+      categoryId=&quot;org.eclipse.wst.xml.ui.proposalCategory.xmlTemplates&quot;
+      class=&quot;org.eclipse.wst.xml.ui.internal.contentassist.XMLTemplatesCompletionProposalComputer&quot;
+      id=&quot;org.eclipse.wst.xml.ui.proposalComputer.xmlTemplates&quot;&gt;
+    &lt;contentType
+        id=&quot;org.eclipse.core.runtime.xml&quot;&gt;
+    &lt;/contentType&gt;
+  &lt;/proposalComputer&gt;
+&lt;/extension&gt;&lt;/pre&gt;
+&lt;b&gt;Plugin B:&lt;/b&gt; (extending the activation context of an existing computer)&lt;pre&gt;&lt;extension point=&quot;org.eclipse.wst.sse.ui.completionProposal&quot;&gt;
+  &lt;proposalComputerExtendedActivation
+      id=&quot;org.eclipse.wst.xml.ui.proposalCategory.xmlTemplates&quot;&gt;
+    &lt;contentType
+        id=&quot;org.eclipse.jst.jsp.core.jspsource&quot;&gt;
+      &lt;partitionType
+          id=&quot;org.eclipse.wst.xml.XML_DEFAULT&quot;&gt;
+      &lt;/partitionType&gt;
+    &lt;/contentType&gt;
+  &lt;/proposalComputerExtendedActivation&gt;
+&lt;/extension&gt;&lt;/pre&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         The contributed class must impliment &lt;code&gt;org.eclipse.wst.sse.ui.internal.provisional.contentassist.ICompletionProposalComputer&lt;/code&gt;
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2010 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/bundles/org.eclipse.wst.sse.ui/schema/completionProposalCategoriesConfiguration.exsd b/bundles/org.eclipse.wst.sse.ui/schema/completionProposalCategoriesConfiguration.exsd
new file mode 100644
index 0000000..c8f40f4
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/schema/completionProposalCategoriesConfiguration.exsd
@@ -0,0 +1,126 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.wst.sse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.wst.sse.ui" id="completionProposalCategoriesConfiguration" name="Completion Proposal Categories Configuration"/>
+      </appInfo>
+      <documentation>
+         This extension point allows the contribution of completion proposal category configuration readers.  These are used to determine which completion categories contributed by &lt;tt&gt;org.eclipse.wst.sse.ui.completionProposal&lt;/tt&gt; extensions are turned on by preference (either programatic or user).  If a completion proposal category configuration reader exists for a given content type the reader will be consulted to determine which completion categories to use when generating completion proposals.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element labelAttribute="name" />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="categoriesConfiguration" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  an optional identifier of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional name of the extension instance
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="categoriesConfiguration">
+      <complexType>
+         <attribute name="contentTypeID" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The ID of the content type
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.core.contenttype.contentTypes/content-type/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string">
+            <annotation>
+               <documentation>
+                  The class that impliments the contributed completion proposal categories configuration.  The class must be public and impliment either &lt;code&gt;org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationReader&lt;/code&gt; or &lt;code&gt;org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter&lt;/code&gt;.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationReader"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         &lt;p&gt;The following are examples of a SSE completion proposal computer contribution:&lt;/p&gt;
+&lt;pre&gt;&lt;extension
+    point=&quot;org.eclipse.wst.sse.ui.completionProposalCategoriesConfiguration&quot;&gt;
+  &lt;categoriesConfiguration
+    class=&quot;org.eclipse.wst.xml.ui.internal.preferences.XMLCompletionProposalCategoriesConfiguration&quot;
+    contentTypeID=&quot;org.eclipse.core.runtime.xml&quot;&gt;
+  &lt;/categoriesConfiguration&gt;
+&lt;/extension&gt;
+&lt;/pre&gt;
+&lt;/p&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         &lt;p&gt;The contributed class must impliment either &lt;code&gt;org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationReader&lt;/code&gt; or &lt;code&gt;org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter&lt;/code&gt;.&lt;/p&gt;
+
+&lt;p&gt;A reader implimentation should be used if the preferences can not be set by the user, if the preferences will be modified by the user then a writer implimentation should be used.&lt;/p&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         &lt;p&gt;See &lt;code&gt;org.eclipse.wst.sse.ui.preferences.AbstractCompletionProposalCategoriesConfiguration&lt;/code&gt; which if implimented by an adopter provides a usefull framework for reading and writing completion proposal categories configuration information to a preference store.&lt;/p&gt;
+
+&lt;p&gt;For a useful user interface for modifing completion proposal categories configurations see &lt;code&gt;org.eclipse.wst.sse.ui.preferences.CodeAssistCyclingConfigurationBlock&lt;/code&gt; which can easly be included on a preference page.&lt;/p&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2010 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/bundles/org.eclipse.wst.sse.ui/schema/editorconfiguration.exsd b/bundles/org.eclipse.wst.sse.ui/schema/editorconfiguration.exsd
new file mode 100644
index 0000000..0f83484
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/schema/editorconfiguration.exsd
@@ -0,0 +1,341 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.wst.sse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.wst.sse.ui" id="editorConfiguration" name="Editor Configuration"/>
+      </appInfo>
+      <documentation>
+         The SSE StructuredTextEditor is intended to be as flexible as possible.  Much of its design centers around the notion of defining and redefining its behavior and appearance based on the content type of its input.  This extension point allows clients to provide an editor configuration to the StructuredTextEditor without having to subclass the editor.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="sourceViewerConfiguration" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="contentOutlineConfiguration" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="propertySheetConfiguration" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="documentationTextHover" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="doubleClickStrategy" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="provisionalConfiguration" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="provisionalDefinition" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="quickOutlineConfiguration" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  an optional identifier of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional name of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="sourceViewerConfiguration">
+      <annotation>
+         <documentation>
+            Defines the source viewer configuration, affecting syntax highlighting, content assist, hover help, and more in the current editor.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="target" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A string defining when to use this extension, either an editor or content type id.  Multiple targets may be given as a comma delimited value.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Must subclass org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="contentOutlineConfiguration">
+      <annotation>
+         <documentation>
+            Defines how the current editor&apos;s input maps to elements with in a Tree control, as well as selection filtering, toolbar and menu contributions, etc in the Outline view.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="target" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A string defining when to use this extension, either an editor or content type id.  Multiple targets may be given as a comma delimited value.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Must subclass org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="propertySheetConfiguration">
+      <annotation>
+         <documentation>
+            Defines how the current editor&apos;s input maps to properties in a Table control, as well as toolbar contributions, etc in the Properties view.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="target" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A string defining when to use this extension, either an editor or content type id.  Multiple targets may be given as a comma delimited value.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Must subclass org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="documentationTextHover">
+      <annotation>
+         <documentation>
+            Defines the text hover processor to use to display documentation information in a text hover. Note, in the event more than one documentation text hover is contributed for the same target partition type, the first one loaded will be the one used and all other contributions will be ignored.
+&lt;br /&gt;
+&lt;i&gt;Since 3.0&lt;/i&gt;
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="target" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A string defining when to use this extension.  Must be a partition type id.  Multiple targets may be given as a comma delimited value.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Must implement org.eclipse.jface.text.ITextHover
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.jface.text.ITextHover"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="doubleClickStrategy">
+      <annotation>
+         <documentation>
+            Defines the doubleclick strategy to use when the user performs a mouse doubleclick.  Note, in the event more than one doubleclick strategy is contributed for the same target partition type, the first one loaded will be the one used and all other contributions will be ignored.
+&lt;br /&gt;
+&lt;i&gt;Since 3.0&lt;/i&gt;
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="target" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A string defining when to use this extension.  Must be a partition type id.  Multiple targets may be given as a comma delimited value.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Must implement org.eclipse.jface.text.ITextDoubleClickStrategy
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.jface.text.ITextDoubleClickStrategy"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="provisionalConfiguration">
+      <annotation>
+         <documentation>
+            Declares a class fulfilling the requirements of a type to be used for the given target(s).
+Note: this is not API and is only used for provisional configuration types.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="target" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A string defining when to use this extension, either an editor or content type id.  Multiple targets may be given as a comma delimited value.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="type" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The type of configuration to find.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Implementation class for this type.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="provisionalDefinition">
+      <annotation>
+         <documentation>
+            Defines a value for a type to be used for the given target(s).
+Note: this is not API and is only used for provisional configuration types.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="type" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The type of definition to find.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="value" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The value of this definition.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="target" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A string defining when to use this extension, either an editor or content type id.  Multiple targets may be given as a comma delimited value.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="quickOutlineConfiguration">
+      <annotation>
+         <documentation>
+            Defines the configuration to be used when displaying editor input in the Tree layout for an editor&apos;s Quick Outline.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="target" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A string defining when to use this extension, either an editor or content type id.  Multiple targets may be given as a comma delimited value.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The class that provides implementation of the quick outline configuration.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.sse.ui.AbstractQuickOutlineConfiguration:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         1.0
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         &lt;pre&gt;
+   &lt;extension 
+         point=&quot;org.eclipse.wst.sse.ui.editorConfiguration&quot;&gt;
+      &lt;!-- associating a source viewer configuration to an input&apos;s content type--&gt;
+      &lt;sourceViewerConfiguration
+            class=&quot;org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTML&quot;
+            target=&quot;org.eclipse.wst.html.core.htmlsource&quot;/&gt;
+      &lt;!-- associating an outline configuration to an input&apos;s content type --&gt;
+      &lt;contentOutlineConfiguration
+           class=&quot;org.eclipse.wst.sse.xml.ui.views.contentoutline.XMLContentOutlineConfiguration&quot;
+            target=&quot;org.eclipse.core.runtime.xml&quot;/&gt;
+      &lt;!-- associating a property sheet configuration to multiple content types --&gt;
+      &lt;propertySheetConfiguration
+            class=&quot;org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConfiguration&quot;
+            target=&quot;org.eclipse.wst.sse.contenttype.xml, org.eclipse.wst.html.core.htmlsource, org.eclipse.jst.jsp.core.jspsource&quot;/&gt;
+   &lt;/extension&gt;
+&lt;/pre&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         see &lt;code&gt;org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration&lt;/code&gt;, &lt;code&gt;org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration&lt;/code&gt;, &lt;code&gt;org.eclipse.wst.sse.ui.views.properties.StructuredPropertySheetConfiguration&lt;/code&gt;.
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2005, 2007 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/bundles/org.eclipse.wst.sse.ui/schema/org.eclipse.wst.sse.ui.breakpoint.exsd b/bundles/org.eclipse.wst.sse.ui/schema/org.eclipse.wst.sse.ui.breakpoint.exsd
new file mode 100644
index 0000000..0221b53
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/schema/org.eclipse.wst.sse.ui.breakpoint.exsd
@@ -0,0 +1,148 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.wst.sse.ui" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appInfo>

+         <meta.schema plugin="org.eclipse.wst.sse.ui" id="breakpoint" name="Breakpoint Providers"/>

+      </appInfo>

+      <documentation>

+         This extension point is provided to allow clients to provide support for adding their own breakpoint line markers with the StructuredTextEditor.

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appInfo>

+            <meta.element />

+         </appInfo>

+      </annotation>

+      <complexType>

+         <sequence>

+            <element ref="breakpointContribution" minOccurs="1" maxOccurs="unbounded"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  a fully qualified identifier of the target extension point

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  an optional identifier of the extension instance

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  an optional name of the extension instance

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="provider">

+      <complexType>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  an optional identifier of the provider instance

+               </documentation>

+               <appInfo>

+                  <meta.attribute kind="identifier"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  An implementor of org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IBreakpointProvider .

+               </documentation>

+               <appInfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IBreakpointProvider"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+         <attribute name="contentTypes" type="string" use="required">

+            <annotation>

+               <documentation>

+                  A comma separated list of content type IDs for which this provider should be used.

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="breakpointContribution">

+      <complexType>

+         <choice>

+            <element ref="provider" minOccurs="1" maxOccurs="unbounded"/>

+         </choice>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  an optional identifier of the contribution

+               </documentation>

+               <appInfo>

+                  <meta.attribute kind="identifier"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="since"/>

+      </appInfo>

+      <documentation>

+         &lt;b&gt;This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.&lt;/b&gt;

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="examples"/>

+      </appInfo>

+      <documentation>

+         Example demonstrating how Java stratum breakpoints are contributed when editing JSPs and tag files.

+&lt;pre&gt;

+ &lt;extension point=&quot;org.eclipse.wst.sse.ui.breakpoint&quot;&gt;

+  &lt;breakpointContribution id=&quot;org.eclipse.jst.jsp.ui.providers&quot;&gt;

+   &lt;provider

+    contentTypes=&quot;org.eclipse.jst.jsp.core.jspsource, org.eclipse.jst.jsp.core.tagsource&quot;

+    id=&quot;org.eclipse.jst.jsp.ui.internal.breakpointproviders.JavaStratumBreakpointProvider&quot;&gt;

+    class=&quot;org.eclipse.jst.jsp.ui.internal.breakpointproviders.JavaStratumBreakpointProvider&quot;/&gt;

+  &lt;/breakpointContribution&gt;

+ &lt;/extension&gt;

+&lt;/pre&gt;

+      </documentation>

+   </annotation>

+

+

+   <annotation>

+      <appInfo>

+         <meta.section type="implementation"/>

+      </appInfo>

+      <documentation>

+         A full implementation is available in org.eclipse.jst.jsp.ui.internal.breakpointproviders.JavaStratumBreakpointProvider

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="copyright"/>

+      </appInfo>

+      <documentation>

+         Copyright (c) 2009 IBM Corporation and others.&lt;br&gt;

+All rights reserved. This program and the accompanying materials are made 

+available under the terms of the Eclipse Public License v1.0 which accompanies 

+this distribution, and is available at &lt;a

+href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;

+      </documentation>

+   </annotation>

+

+</schema>

diff --git a/bundles/org.eclipse.wst.sse.ui/schema/org.eclipse.wst.sse.ui.sourcevalidation.exsd b/bundles/org.eclipse.wst.sse.ui/schema/org.eclipse.wst.sse.ui.sourcevalidation.exsd
new file mode 100644
index 0000000..ee02eba
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/schema/org.eclipse.wst.sse.ui.sourcevalidation.exsd
@@ -0,0 +1,191 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.wst.sse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.wst.sse.ui" id="sourcevalidation" name="Source Validation"/>
+      </appInfo>
+      <documentation>
+         This extension point is provided to allow clients to contribute a validator (&lt;code&gt;org.eclipse.wst.validation.internal.provisional.core.IValidator&lt;/code&gt;)
+for as-you-type (source) validation.&lt;br&gt;
+
+If your validator can handle &quot;partial document&quot; validation, it should also implement ISourceValidator.  The validate call on ISourceValidator gets passed an IRegion representation of the part of the document that&apos;s dirty.&lt;br&gt;
+
+This should be much more efficient than validating the entire file each time someone types.&lt;br&gt;
+
+The validator is enabled for specific content type/partition combinations.&lt;br&gt;
+
+Required plugins are:&lt;br&gt;
+   org.eclipse.wst.sse.ui&lt;br&gt;
+   org.eclipse.wst.validation
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="validator"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  an optional identifier of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional name of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="validator">
+      <complexType>
+         <sequence>
+            <element ref="contentTypeIdentifier" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="scope" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Either &quot;total&quot; or &quot;partial&quot;, depending on whether all or just some of the document should be revalidated on changes.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="partitionType">
+      <complexType>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="contentTypeIdentifier">
+      <complexType>
+         <sequence>
+            <element ref="partitionType" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         &lt;b&gt;This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.&lt;/b&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         Example demonstrating how HTMLValidator contributes to as-you-type validation in the source editor.
+
+&lt;pre&gt;
+   &lt;extension
+         point=&quot;org.eclipse.wst.sse.ui.extensions.sourcevalidation&quot;&gt;
+      &lt;validator
+            scope=&quot;total&quot;
+            class=&quot;org.eclipse.wst.validation.html.HTMLValidator&quot;
+            id=&quot;org.eclipse.wst.validation.htmlsourcevalidator&quot;&gt;
+         &lt;contentTypeIdentifier
+               id=&quot;org.eclipse.wst.html.core.htmlsource&quot;&gt;
+            &lt;partitionType
+                  id=&quot;org.eclipse.wst.html.HTML_DEFAULT&quot;/&gt;
+         &lt;/contentTypeIdentifier&gt;
+         &lt;contentTypeIdentifier
+               id=&quot;org.eclipse.jst.jsp.core.jspsource&quot;&gt;
+            &lt;partitionType
+                  id=&quot;org.eclipse.wst.html.HTML_DEFAULT&quot;/&gt;
+         &lt;/contentTypeIdentifier&gt;
+      &lt;/validator&gt;
+   &lt;/extension&gt;
+&lt;/pre&gt;
+&lt;p&gt;
+Using ISourceValidator
+&lt;/p&gt;
+&lt;p&gt;
+If your validator can handle &quot;partial document&quot; validation, it should  implement ISourceValidator.  
+&lt;/p&gt;
+&lt;p&gt;
+The validate call on ISourceValidator gets passed an IRegion of the document which represents just the part that&apos;s dirty.  This should be much more efficient than validating the entire file each time someone types.
+&lt;/p&gt;
+&lt;p&gt;
+ISourceValidator has its &quot;connect(IDocument doc)&quot; method called when it&apos;s hooked up to the document (when the editor is opened), and &quot;disconnect(IDocument doc)&quot; called when the editor is closed, where any &quot;unhooking&quot; should take place.
+&lt;/p&gt;
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         Currently there is no supplied implementation for IValidator.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2005 IBM Corporation and others.&lt;br&gt;
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which accompanies 
+this distribution, and is available at &lt;a
+href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/bundles/org.eclipse.wst.sse.ui/schema/quickFixProcessor.exsd b/bundles/org.eclipse.wst.sse.ui/schema/quickFixProcessor.exsd
new file mode 100644
index 0000000..188711c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/schema/quickFixProcessor.exsd
@@ -0,0 +1,135 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.wst.sse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.eclipse.wst.sse.ui" id="quickFixProcessor" name="Quick Fix Processor"/>
+      </appinfo>
+      <documentation>
+         This extension point is used to associate a quick assist processor in Structured Text Editors with a specific &quot;kind&quot; of problem (a marker or annotation of a certain type or having certain attribute values).
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence>
+            <element ref="quickFixProcessor" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  an optional identifier of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional name of the extension instance
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="quickFixProcessor">
+      <complexType>
+         <sequence>
+            <element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="problemType" type="string">
+            <annotation>
+               <documentation>
+                  the problem type for which this quick fix processor applies to.  To set the problem type for an annotation or marker, create a &quot;problemType&quot; attribute for the annotation/marker and set a value.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  the name of the class implementing IQuickAssistProcessor
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.jface.text.quickassist.IQuickAssistProcessor"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="attribute">
+      <complexType>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  the name of the attribute whose value is being specified.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="value" type="string">
+            <annotation>
+               <documentation>
+                  the specified value of the attribute.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         3.0
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         &lt;br /&gt;
+&amp;lt;extension point=&quot;org.eclipse.wst.sse.ui.quickFixProcessor&quot;&amp;gt;&lt;br /&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;quickFixProcessor&lt;br /&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;class=&quot;org.eclipse.wst.sse.ui.examples.quickfixes.ExampleQuickAssistProcessor&quot;&lt;br /&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;problemType=&quot;org.eclipse.wst.sse.ui.examples.quickfixes.problem&quot;&amp;gt;&lt;br /&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;attribute name=&quot;anAttributeKey&quot; value=&quot;attribute value&quot;/&amp;gt;&lt;br /&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/quickFixProcessor&amp;gt;&lt;br /&gt;
+ &amp;lt;/extension&amp;gt;&lt;br /&gt;
+
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback  from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appinfo>
+         <meta.section type="copyright"/>
+      </appinfo>
+      <documentation>
+         Copyright (c) 2008 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/bundles/org.eclipse.wst.sse.ui/schema/semanticHighlighting.exsd b/bundles/org.eclipse.wst.sse.ui/schema/semanticHighlighting.exsd
new file mode 100644
index 0000000..b14a843
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/schema/semanticHighlighting.exsd
@@ -0,0 +1,125 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.wst.sse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.wst.sse.ui" id="semanticHighlighting" name="Semantic Highlighting"/>
+      </appInfo>
+      <documentation>
+         The Semantic Highlighting extension point allows plug-ins to contribute rules to the Structured Source Editor&apos;s semantic highlighting framework. Semantic highlighting is performed as a second pass after syntax highlighting.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="highlighting" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="highlighting">
+      <complexType>
+         <attribute name="target" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A string defining when to use this extension.  It is the content type id.  Multiple targets may be given as a comma delimited value.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Must implement org.eclipse.wst.sse.ui.ISemanticHighlighting to provide basic semantic highlighting information.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.wst.sse.ui.ISemanticHighlighting"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="styleStringKey" type="string">
+            <annotation>
+               <documentation>
+                  The preference key that controls the style of the semantic highlighting. The style&apos;s value should be in the form: RGB foreground (#rrggbb) | RGB background (#rrggbb) | bold (true/false) | italic (true/false) | strikethrough (true/false) | underline (true/false)
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.1
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is the declaration of a semantic highlighting that is effective on org.eclipse.core.runtime.xml and org.eclipse.wst.xml.core.xmlsource content types. The &lt;code&gt;org.eclipse.wst.xml.ui.internal.style.NamespaceHighlighting&lt;/code&gt; determines the consumable regions of the document.
+&lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.wst.sse.ui.semanticHighlighting&quot;&gt;
+  &lt;highlighting
+        class=&quot;org.eclipse.wst.xml.ui.internal.style.NamespaceHighlighting&quot;
+        target=&quot;org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource&quot;&gt;
+  &lt;/highlighting&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         See &lt;code&gt;org.eclipse.wst.sse.ui.ISemanticHighlighting&lt;/code&gt;
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2009 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/bundles/org.eclipse.wst.sse.ui/src-encoding/org/eclipse/wst/sse/ui/internal/encoding/ui/EncodingPreferencePage.java b/bundles/org.eclipse.wst.sse.ui/src-encoding/org/eclipse/wst/sse/ui/internal/encoding/ui/EncodingPreferencePage.java
new file mode 100644
index 0000000..78e4162
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-encoding/org/eclipse/wst/sse/ui/internal/encoding/ui/EncodingPreferencePage.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.encoding.ui;
+
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
+import org.eclipse.wst.sse.core.internal.encoding.util.CodedResourcePlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+
+/**
+ * @deprecated - this should not be handled by the platform and not WTP
+ */
+
+public class EncodingPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+	Button fUse3ByteBOMWithUTF8CheckBox = null;
+
+	private Button createCheckBox(Composite parent, String label) {
+		Button button = new Button(parent, SWT.CHECK | SWT.LEFT | SWT.WRAP);
+		button.setText(label);
+
+		boolean selection = CodedResourcePlugin.getDefault().getPluginPreferences().getBoolean(CommonEncodingPreferenceNames.USE_3BYTE_BOM_WITH_UTF8);
+		button.setSelection(selection);
+
+		return button;
+	}
+
+	private Composite createComposite(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+
+		//GridLayout
+		GridLayout layout = new GridLayout(1, true);
+		composite.setLayout(layout);
+
+		//GridData
+		GridData data = new GridData(GridData.FILL_BOTH);
+		composite.setLayoutData(data);
+
+		return composite;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+	 */
+	protected Control createContents(Composite parent) {
+		Composite composite = createComposite(parent);
+
+		String description = SSEUIMessages.EncodingPreferencePage_0; //$NON-NLS-1$
+		
+		// ISSUE: the following to lines look redundant, 
+		// not sure what was trying to be accomplished. 
+		// May be dead code. 
+		createLabel(composite, description);
+		createLabel(composite, ""); //$NON-NLS-1$
+
+		String checkBoxLabel = SSEUIMessages.EncodingPreferencePage_1; //$NON-NLS-1$
+		fUse3ByteBOMWithUTF8CheckBox = createCheckBox(composite, checkBoxLabel);
+
+		return composite;
+	}
+
+	private Label createLabel(Composite parent, String text) {
+		Label label = new Label(parent, SWT.LEFT);
+		label.setText(text);
+
+		return label;
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	public void init(IWorkbench workbench) {
+	}
+
+	public void performDefaults() {
+		boolean defaultSelection = CodedResourcePlugin.getDefault().getPluginPreferences().getDefaultBoolean(CommonEncodingPreferenceNames.USE_3BYTE_BOM_WITH_UTF8);
+		fUse3ByteBOMWithUTF8CheckBox.setSelection(defaultSelection);
+	}
+
+	public boolean performOk() {
+		CodedResourcePlugin.getDefault().getPluginPreferences().setValue(CommonEncodingPreferenceNames.USE_3BYTE_BOM_WITH_UTF8, fUse3ByteBOMWithUTF8CheckBox.getSelection());
+		CodedResourcePlugin.getDefault().savePluginPreferences();
+
+		return true;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ConfigurationPointCalculator.java b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ConfigurationPointCalculator.java
new file mode 100644
index 0000000..1aa8ae4
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ConfigurationPointCalculator.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.extensions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.part.MultiPageEditorSite;
+
+public class ConfigurationPointCalculator {
+	public static final String DESIGN = ".design"; //$NON-NLS-1$
+	public static final String SOURCE = ".source"; //$NON-NLS-1$
+
+	public static String[] getConfigurationPoints(IEditorPart part, String contentType, String subContext, Class rootClass) {
+		ConfigurationPointCalculator calculator = new ConfigurationPointCalculator();
+		calculator.setContentType(contentType);
+		calculator.setPart(part);
+		calculator.setRootClass(rootClass);
+		calculator.setSubContext(subContext);
+		return calculator.getConfigurationPoints();
+	}
+
+	protected String fContentType = null;
+	protected IWorkbenchPart fPart = null;
+
+	protected Class fRootClass = null;
+	protected String fSubContext = null;
+
+	/**
+	 * 
+	 */
+	public ConfigurationPointCalculator() {
+		super();
+	}
+
+	public String[] getConfigurationPoints() {
+		List points = new ArrayList(2);
+
+		IWorkbenchPartSite site = null;
+		if (fPart != null) {
+			site = fPart.getSite();
+			String id = site.getId();
+			if (id != null && id.length() > 0 && !id.equals(fRootClass.getName()))
+				points.add(id);
+			if (site instanceof MultiPageEditorSite) {
+				String multipageID = ((MultiPageEditorSite) site).getMultiPageEditor().getSite().getId();
+				if (!points.contains(multipageID))
+					points.add(multipageID);
+				String sourcePageID = ((MultiPageEditorSite) site).getMultiPageEditor().getSite().getId() + ".source"; //$NON-NLS-1$
+				if (!points.contains(sourcePageID))
+					points.add(sourcePageID);
+			}
+			if (site instanceof MultiPageEditorSite) {
+				String multipageClassName = ((MultiPageEditorSite) site).getMultiPageEditor().getClass().getName();
+				if (!points.contains(multipageClassName))
+					points.add(multipageClassName);
+			}
+			Class editorClass = fPart.getClass();
+			while (editorClass != null && fRootClass != null && !editorClass.equals(fRootClass)) {
+				if (!points.contains(editorClass.getName()))
+					points.add(editorClass.getName());
+				editorClass = editorClass.getSuperclass();
+			}
+		}
+
+		if (fContentType != null) {
+			IContentType contentType = Platform.getContentTypeManager().getContentType(fContentType);
+			while (contentType != null && !contentType.getId().equals(IContentTypeManager.CT_TEXT)) {
+				if (!points.contains(contentType.getId()))
+					points.add(contentType.getId());
+				contentType = contentType.getBaseType();
+			}
+		}
+
+		if (fRootClass != null && !points.contains(fRootClass.getName()))
+			points.add(fRootClass.getName());
+		return (String[]) points.toArray(new String[0]);
+	}
+
+	/**
+	 * @return Returns the contentType.
+	 */
+	public String getContentType() {
+		return fContentType;
+	}
+
+	/**
+	 * @return Returns the part.
+	 */
+	public IWorkbenchPart getPart() {
+		return fPart;
+	}
+
+	/**
+	 * @return Returns the rootClass.
+	 */
+	public Class getRootClass() {
+		return fRootClass;
+	}
+
+	/**
+	 * @return Returns the subContext.
+	 */
+	public String getSubContext() {
+		return fSubContext;
+	}
+
+	/**
+	 * @param contentType
+	 *            The contentType to set.
+	 */
+	public void setContentType(String contentType) {
+		fContentType = contentType;
+	}
+
+	/**
+	 * @param part
+	 *            The part to set.
+	 */
+	public void setPart(IWorkbenchPart part) {
+		fPart = part;
+	}
+
+	/**
+	 * @param rootClass
+	 *            The rootClass to set.
+	 */
+	public void setRootClass(Class rootClass) {
+		fRootClass = rootClass;
+	}
+
+	/**
+	 * @param subContext
+	 *            The subContext to set.
+	 */
+	public void setSubContext(String subContext) {
+		fSubContext = subContext;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ISelfValidateEditAction.java b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ISelfValidateEditAction.java
new file mode 100644
index 0000000..13dac00
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ISelfValidateEditAction.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.extensions;
+
+
+
+/**
+ * This is a marker interface to control ValidateEdit call Usually framework
+ * calls IExtendedSimpleEditor#validateEdit() before calling
+ * IExtendedEditorAction's run() method. However, if the action implements
+ * this interface, framework won't call validateEdit() method.
+ * 
+ * The action should call validateEdit() at their own appropriate timing.
+ */
+public interface ISelfValidateEditAction {
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ISourceEditingTextTools.java b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ISourceEditingTextTools.java
new file mode 100644
index 0000000..d60a96f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ISourceEditingTextTools.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.extensions;
+
+
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.ui.IEditorPart;
+
+/**
+ * Interface to provide convenient functions for editors that may not be
+ * ITextEditors, but need to expose properties usually found in text editors
+ */
+public interface ISourceEditingTextTools {
+
+	/**
+	 * @return the document offset at which the Caret is located
+	 */
+	public int getCaretOffset();
+
+	/**
+	 * @return the IDocument being edited. If this editor supports multiple
+	 *         documents, the document currently possessing the caret will be
+	 *         returned.
+	 */
+	public IDocument getDocument();
+
+	/**
+	 * @return The IEditorPart instance for this editor that is known to the
+	 *         workbench.
+	 */
+	public IEditorPart getEditorPart();
+
+	/**
+	 * @return The current selection within the editor. Implementors may
+	 *         support other types of selection.
+	 */
+	public ITextSelection getSelection();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointConstants.java b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointConstants.java
new file mode 100644
index 0000000..bf6c9ae
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointConstants.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint;
+
+/**
+ * @author pavery
+ */
+public interface IBreakpointConstants {
+	String ATTR_HIDDEN = "hidden"; //$NON-NLS-1$
+	/**
+	 * Setters of this attribute should use '/'for segment separators when
+	 * representing paths.
+	 */
+	String RESOURCE_PATH = "org.eclipse.wst.sse.ui.extensions.breakpoint.path"; //$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointProvider.java b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointProvider.java
new file mode 100644
index 0000000..b10cdf1
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointProvider.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
+
+/**
+ * Interface to provide breakpoint creation
+ */
+public interface IBreakpointProvider {
+
+	/**
+	 * Adds breakpoint to specified position
+	 * 
+	 * @param document
+	 *            IDocument object
+	 * @param input
+	 *            current editor input, not necessarily an IFileEditorInput or
+	 *            linked to a resource in any way
+	 * @param lineNumber
+	 *            current line number
+	 * @param offset
+	 *            current caret offset
+	 * @throws CoreException
+	 * @return IStatus the status after being asked to add a breakpoint. The
+	 *         Severity of ERROR should only be used if the location
+	 *         information is both valid for a breakpoint and one could not be
+	 *         added.  Any severity greater than INFO will be logged, and if
+	 *         no breakpoints were created, shown to the user.
+	 */
+	IStatus addBreakpoint(IDocument document, IEditorInput input, int lineNumber, int offset) throws CoreException;
+
+	/**
+	 * Returns corresponding resource from editor input
+	 * 
+	 * @param input
+	 * @return IResource
+	 */
+	IResource getResource(IEditorInput input);
+
+	/**
+	 * Set ISourceEditingTextTools object
+	 * 
+	 * @param tool
+	 *            ISourceEditingTextTools object
+	 */
+	void setSourceEditingTextTools(ISourceEditingTextTools tool);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IExtendedStorageEditorInput.java b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IExtendedStorageEditorInput.java
new file mode 100644
index 0000000..5e5d7f5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IExtendedStorageEditorInput.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint;
+
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.texteditor.IElementStateListener;
+
+public interface IExtendedStorageEditorInput extends IStorageEditorInput {
+	/**
+	 * Adds the given element state listener to this input. Has no effect if
+	 * an identical listener is already registered. Typically used by the
+	 * IDocumentProvider to register itself for change notification.
+	 * 
+	 * @param listener
+	 *            the listener
+	 */
+	void addElementStateListener(IElementStateListener listener);
+
+	/**
+	 * Removes the given element state listener from this input. Has no affect
+	 * if an identical listener is not registered.
+	 * 
+	 * @param listener
+	 *            the listener
+	 */
+	void removeElementStateListener(IElementStateListener listener);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/NodeLocation.java b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/NodeLocation.java
new file mode 100644
index 0000000..ff34c70
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/NodeLocation.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint;
+
+
+public interface NodeLocation {
+	/**
+	 * Returns the document end offset of the end tag, -1 of there is no end
+	 * tag
+	 * 
+	 * @return
+	 */
+	int getEndTagEndOffset();
+
+	/**
+	 * Returns the document start offset of the end tag, -1 of there is no end
+	 * tag
+	 * 
+	 * @return
+	 */
+	int getEndTagStartOffset();
+
+	/**
+	 * Returns the document end offset of the start tag, -1 of there is no
+	 * start tag
+	 * 
+	 * @return
+	 */
+	int getStartTagEndOffset();
+
+	/**
+	 * Returns the document start offset of the start tag, -1 of there is no
+	 * start tag
+	 * 
+	 * @return
+	 */
+	int getStartTagStartOffset();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/NullSourceEditingTextTools.java b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/NullSourceEditingTextTools.java
new file mode 100644
index 0000000..a926fa7
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/NullSourceEditingTextTools.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
+
+public class NullSourceEditingTextTools implements ISourceEditingTextTools {
+	public static final String ID = "sourceeditingtexttools"; //$NON-NLS-1$
+	private ITextEditor fTextEditor;
+
+	/**
+	 * @return
+	 */
+	public synchronized static ISourceEditingTextTools getInstance() {
+		return new NullSourceEditingTextTools();
+	}
+
+	private NullSourceEditingTextTools() {
+		super();
+	}
+
+	public int getCaretOffset() {
+		ISelection sel = fTextEditor.getSelectionProvider().getSelection();
+		if (sel instanceof ITextSelection) {
+			return ((ITextSelection) sel).getOffset();
+		}
+		return -1;
+	}
+
+	public IDocument getDocument() {
+		return fTextEditor.getDocumentProvider().getDocument(fTextEditor.getEditorInput());
+	}
+
+	public IEditorPart getEditorPart() {
+		return fTextEditor;
+	}
+
+	public ITextSelection getSelection() {
+		if (fTextEditor != null)
+			return (ITextSelection) fTextEditor.getSelectionProvider().getSelection();
+		return TextSelection.emptySelection();
+	}
+
+	public void setTextEditor(ITextEditor editor) {
+		fTextEditor = editor;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/ExclusionsTab.java b/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/ExclusionsTab.java
new file mode 100644
index 0000000..c6d9c5a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/ExclusionsTab.java
@@ -0,0 +1,374 @@
+/*******************************************************************************
+ * 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.sse.ui.internal.preferences.ui;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Locale;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
+import org.eclipse.wst.sse.core.internal.tasks.FileTaskScannerRegistryReader;
+import org.eclipse.wst.sse.core.internal.tasks.TaskTagPreferenceKeys;
+import org.eclipse.wst.sse.core.utils.StringUtils;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.util.Sorter;
+
+import com.ibm.icu.text.Collator;
+
+class ExclusionsTab implements IPreferenceTab {
+	private class ArrayTreeContentProvider implements ITreeContentProvider {
+		public ArrayTreeContentProvider() {
+			super();
+		}
+
+		public void dispose() {
+		}
+
+		public Object[] getChildren(Object parentElement) {
+			if (parentElement instanceof Object[])
+				return fContentTypeSorter.sort((Object[]) parentElement);
+			return new Object[0];
+		}
+
+		public Object[] getElements(Object inputElement) {
+			return getChildren(inputElement);
+		}
+
+		public Object getParent(Object element) {
+			return null;
+		}
+
+		public boolean hasChildren(Object element) {
+			return getChildren(element).length > 0;
+		}
+
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		}
+	}
+
+	private class ContentTypeLabelProvider extends LabelProvider {
+		public String getText(Object element) {
+			if (element != null) {
+				Object o = element;
+				if (o instanceof String) {
+					o = fContentTypeManager.getContentType(o.toString());
+				}
+				if (o instanceof IContentType) {
+					return ((IContentType) o).getName();
+				}
+			}
+			return super.getText(element);
+		}
+	}
+
+	/**
+	 * A QuickSorter that sorts and returns a IContentType-typed array
+	 */
+	private class ContentTypeSorter extends Sorter {
+		private Collator collator = Collator.getInstance(Locale.ENGLISH);
+
+		public boolean compare(Object elementOne, Object elementTwo) {
+			return (collator.compare(((IContentType) elementOne).getName(), ((IContentType) elementTwo).getName())) < 0;
+		}
+
+		public Object[] sort(Object[] unSortedCollection) {
+			Object[] types = super.sort(unSortedCollection);
+			IContentType[] sortedTypes = new IContentType[types.length];
+			if (types.length > 0) {
+				System.arraycopy(types, 0, sortedTypes, 0, sortedTypes.length);
+			}
+			return sortedTypes;
+		}
+	}
+
+	private class ContentTypeTreeProvider implements ITreeContentProvider {
+		public ContentTypeTreeProvider() {
+			super();
+		}
+
+		public void dispose() {
+		}
+
+		boolean equals(Object left, Object right) {
+			return left == null ? right == null : ((right != null) && left.equals(right));
+		}
+
+		public Object[] getChildren(Object parentElement) {
+			if (parentElement instanceof Object[]) {
+				return (Object[]) parentElement;
+			}
+			if (parentElement instanceof IContentType) {
+				List elements = new ArrayList(0);
+				IContentType[] allTypes = fContentTypeManager.getAllContentTypes();
+				for (int i = 0; i < allTypes.length; i++) {
+					if (!fSupportedContentTypes.contains(allTypes[i]) && equals(allTypes[i].getBaseType(), parentElement)) {
+						elements.add(allTypes[i]);
+					}
+				}
+				return fContentTypeSorter.sort(elements.toArray());
+			}
+			return new Object[0];
+		}
+
+		public Object[] getElements(Object inputElement) {
+			return getChildren(inputElement);
+		}
+
+		public Object getParent(Object element) {
+			Object parent = null;
+			if (element instanceof IContentType) {
+				parent = ((IContentType) element).getBaseType();
+			}
+			return parent;
+		}
+
+		public boolean hasChildren(Object element) {
+			return getChildren(element).length > 0;
+		}
+
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		}
+	}
+
+	/**
+	 * A QuickSorter that sorts and returns a String-typed array
+	 */
+	private class StringSorter extends Sorter {
+		Collator collator = Collator.getInstance(Locale.ENGLISH);
+
+		public boolean compare(Object elementOne, Object elementTwo) {
+			return (collator.compare(elementOne.toString(), elementTwo.toString()) < 0);
+		}
+
+		public Object[] sort(Object[] unSortedCollection) {
+			Object[] sortedCollection = super.sort(unSortedCollection);
+			String[] strings = new String[sortedCollection.length];
+			// copy the array so can return a new sorted collection
+			if (strings.length > 0) {
+				System.arraycopy(sortedCollection, 0, strings, 0, strings.length);
+			}
+			return strings;
+		}
+	}
+
+	private static final boolean _debugPreferences = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.core/tasks/preferences")); //$NON-NLS-1$ //$NON-NLS-2$
+
+	private CheckboxTreeViewer fContentTypeList;
+
+	private IContentTypeManager fContentTypeManager = null;
+
+	ContentTypeSorter fContentTypeSorter = new ContentTypeSorter();
+
+	private IContentType[] fIgnoreContentTypes = null;
+
+	private IContentType[] fOriginalIgnoreContentTypes = null;
+
+	private TaskTagPreferencePage fOwner = null;
+
+	private IScopeContext[] fPreferencesLookupOrder = null;
+
+	private IPreferencesService fPreferencesService = null;
+
+	private List fSupportedContentTypes = null;
+
+	public ExclusionsTab(TaskTagPreferencePage parent, IPreferencesService preferencesService, IScopeContext[] lookupOrder) {
+		super();
+		fOwner = parent;
+		fPreferencesLookupOrder = lookupOrder;
+		fPreferencesService = preferencesService;
+		fContentTypeManager = Platform.getContentTypeManager();
+
+		String[] supportedContentTypeIDs = FileTaskScannerRegistryReader.getInstance().getSupportedContentTypeIds();
+		fSupportedContentTypes = new ArrayList(supportedContentTypeIDs.length);
+		for (int i = 0; i < supportedContentTypeIDs.length; i++) {
+			IContentType type = fContentTypeManager.getContentType(supportedContentTypeIDs[i]);
+			if (type != null) {
+				fSupportedContentTypes.add(type);
+			}
+		}
+		String[] ignoreContentTypes = StringUtils.unpack(fPreferencesService.getString(TaskTagPreferenceKeys.TASK_TAG_NODE, TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED, SSECorePlugin.getDefault().getPluginPreferences().getDefaultString(TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED), fPreferencesLookupOrder));
+		List contentTypes = new ArrayList();
+		for (int i = 0; i < ignoreContentTypes.length; i++) {
+			IContentType type = fContentTypeManager.getContentType(ignoreContentTypes[i]);
+			if (type != null) {
+				contentTypes.add(type);
+			}
+		}
+		fOriginalIgnoreContentTypes = fIgnoreContentTypes = (IContentType[]) contentTypes.toArray(new IContentType[contentTypes.size()]);
+	}
+
+	public Control createContents(Composite tabFolder) {
+		Composite composite = new Composite(tabFolder, SWT.NONE);
+		composite.setLayout(new GridLayout(2, true));
+		Text description = new Text(composite, SWT.READ_ONLY | SWT.SINGLE);
+		description.setText(SSEUIMessages.TaskTagExclusionTab_02);
+//		description.setBackground(composite.getBackground());
+
+		fContentTypeList = new CheckboxTreeViewer(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+		fContentTypeList.setLabelProvider(new ContentTypeLabelProvider());
+		fContentTypeList.setContentProvider(new ArrayTreeContentProvider());
+
+		fContentTypeList.setInput(fSupportedContentTypes.toArray());
+		fContentTypeList.setCheckedElements(fSupportedContentTypes.toArray());
+		fContentTypeList.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
+		for (int i = 0; i < fIgnoreContentTypes.length; i++) {
+			fContentTypeList.setChecked(fIgnoreContentTypes[i], false);
+		}
+
+		Button selectAll = new Button(composite, SWT.PUSH);
+		selectAll.setText(SSEUIMessages.TaskTagPreferenceTab_17);
+		selectAll.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
+		selectAll.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				fContentTypeList.setCheckedElements(fSupportedContentTypes.toArray());
+			}
+		});
+
+		Button selectNone = new Button(composite, SWT.PUSH);
+		selectNone.setText(SSEUIMessages.TaskTagPreferenceTab_18);
+		selectNone.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
+		selectNone.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				fContentTypeList.setCheckedElements(new Object[0]);
+			}
+		});
+
+		new Label(composite, SWT.NONE).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+
+		Text affectedTypesLabel = new Text(composite, SWT.READ_ONLY | SWT.SINGLE);
+		affectedTypesLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+//		affectedTypesLabel.setBackground(composite.getBackground());
+		affectedTypesLabel.setText(SSEUIMessages.TaskTagExclusionTab_03);
+
+		final TreeViewer contentTypeTreeViewer = new TreeViewer(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+		contentTypeTreeViewer.setLabelProvider(new ContentTypeLabelProvider());
+		contentTypeTreeViewer.setContentProvider(new ContentTypeTreeProvider());
+		contentTypeTreeViewer.setInput(new Object[0]);
+		contentTypeTreeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
+
+		fContentTypeList.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				if (event.getSelection() instanceof IStructuredSelection) {
+					Object[] o = ((IStructuredSelection) event.getSelection()).toArray();
+					contentTypeTreeViewer.setInput(o);
+					contentTypeTreeViewer.expandAll();
+					if (o.length > 0) {
+						contentTypeTreeViewer.reveal(o[0]);
+					}
+				}
+			}
+		});
+
+		return composite;
+	}
+
+	public String getTitle() {
+		return SSEUIMessages.TaskTagExclusionTab_01;
+	}
+
+	public void performApply() {
+		save();
+	}
+
+	public void performDefaults() {
+		if (_debugPreferences) {
+			System.out.println("Loading defaults in " + getClass().getName()); //$NON-NLS-1$
+		}
+		IEclipsePreferences[] defaultPreferences = new IEclipsePreferences[fPreferencesLookupOrder.length - 1];
+		for (int i = 1; i < defaultPreferences.length; i++) {
+			defaultPreferences[i - 1] = fPreferencesLookupOrder[i].getNode(TaskTagPreferenceKeys.TASK_TAG_NODE);
+		}
+		String[] defaultIgnoreTypes = StringUtils.unpack(fPreferencesService.get(TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED, null, defaultPreferences)); //$NON-NLS-1$
+
+		List contentTypes = new ArrayList();
+		for (int i = 0; i < defaultIgnoreTypes.length; i++) {
+			IContentType type = fContentTypeManager.getContentType(defaultIgnoreTypes[i]);
+			if (type != null) {
+				contentTypes.add(type);
+			}
+		}
+		fIgnoreContentTypes = (IContentType[]) contentTypes.toArray(new IContentType[contentTypes.size()]);
+		fContentTypeList.setCheckedElements(fContentTypeManager.getAllContentTypes());
+		for (int i = 0; i < fIgnoreContentTypes.length; i++) {
+			fContentTypeList.setChecked(fIgnoreContentTypes[i], false);
+		}
+	}
+
+	public void performOk() {
+		List ignoredIds = save();
+		String[] ignoreIDs = (String[]) new StringSorter().sort(ignoredIds.toArray());
+		fIgnoreContentTypes = new IContentType[ignoreIDs.length];
+		for (int i = 0; i < ignoreIDs.length; i++) {
+			fIgnoreContentTypes[i] = fContentTypeManager.getContentType(ignoreIDs[i]);
+		}
+
+		if (!Arrays.equals(fOriginalIgnoreContentTypes, fIgnoreContentTypes)) {
+			fOwner.requestRedetection();
+		}
+		fOriginalIgnoreContentTypes = fIgnoreContentTypes;
+	}
+
+	private List save() {
+		List ignoredIds = new ArrayList();
+		List checked = Arrays.asList(fContentTypeList.getCheckedElements());
+		for (int i = 0; i < fSupportedContentTypes.size(); i++) {
+			if (!checked.contains(fSupportedContentTypes.get(i))) {
+				ignoredIds.add(((IContentType) fSupportedContentTypes.get(i)).getId());
+			}
+		}
+		IEclipsePreferences[] defaultPreferences = new IEclipsePreferences[fPreferencesLookupOrder.length - 1];
+		for (int i = 1; i < defaultPreferences.length; i++) {
+			defaultPreferences[i - 1] = fPreferencesLookupOrder[i].getNode(TaskTagPreferenceKeys.TASK_TAG_NODE);
+		}
+
+		String defaultIgnoredContentTypeIds = StringUtils.pack((String[]) new StringSorter().sort(StringUtils.unpack(fPreferencesService.get(TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED, "", defaultPreferences)))); //$NON-NLS-1$
+		String ignoredContentTypeIds = StringUtils.pack((String[]) new StringSorter().sort(ignoredIds.toArray()));
+		if (ignoredContentTypeIds.equals(defaultIgnoredContentTypeIds)) {
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED + " from scope " + fPreferencesLookupOrder[0].getName() + ":" + fPreferencesLookupOrder[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			}
+			fPreferencesLookupOrder[0].getNode(TaskTagPreferenceKeys.TASK_TAG_NODE).remove(TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED);
+		}
+		else {
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " setting " + TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED + " \"" + ignoredContentTypeIds + "\" in scope " + fPreferencesLookupOrder[0].getName() + ":" + fPreferencesLookupOrder[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			}
+			fPreferencesLookupOrder[0].getNode(TaskTagPreferenceKeys.TASK_TAG_NODE).put(TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED, ignoredContentTypeIds);
+		}
+		return ignoredIds;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/MainTab.java b/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/MainTab.java
new file mode 100644
index 0000000..6b633a0
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/MainTab.java
@@ -0,0 +1,452 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *	   David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag;
+import org.eclipse.wst.sse.core.internal.tasks.TaskTagPreferenceKeys;
+import org.eclipse.wst.sse.core.utils.StringUtils;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+
+import com.ibm.icu.util.StringTokenizer;
+
+class MainTab implements IPreferenceTab {
+	public class TaskTagDialog extends Dialog {
+		public TaskTag taskTag = null;
+
+		Combo priorityCombo = null;
+		Text tagText = null;
+
+		public TaskTagDialog(Shell parentShell) {
+			super(parentShell);
+			setShellStyle(getShellStyle() | SWT.RESIZE);
+		}
+
+		protected void configureShell(Shell newShell) {
+			super.configureShell(newShell);
+			newShell.setText(SSEUIMessages.TaskTagPreferenceTab_5); //$NON-NLS-1$
+		}
+
+		protected Control createButtonBar(Composite parent) {
+			Control c = super.createButtonBar(parent);
+			getButton(IDialogConstants.OK_ID).setEnabled(taskTag == null || taskTag.getTag().length() > 0);
+			return c;
+		}
+
+		protected Control createDialogArea(Composite parent) {
+			Composite composite = new Composite(parent, SWT.NONE);
+			composite.setLayout(new GridLayout(2, false));
+			GridData gridData = new GridData(GridData.FILL_BOTH);
+			gridData.widthHint = parent.getDisplay().getClientArea().width / 5;
+			composite.setLayoutData(gridData);
+			Label label = new Label(composite, SWT.NONE);
+			label.setText(SSEUIMessages.TaskTagPreferenceTab_6); //$NON-NLS-1$
+			label.setLayoutData(new GridData());
+			tagText = new Text(composite, SWT.BORDER);
+			tagText.setText(taskTag != null ? taskTag.getTag() : ""); //$NON-NLS-1$
+			tagText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+			tagText.addModifyListener(new ModifyListener() {
+				public void modifyText(ModifyEvent e) {
+					String testTag = tagText.getText();
+					String[] tags = new String[fTaskTags.length];
+					for (int i = 0; i < tags.length; i++) {
+						tags[i] = fTaskTags[i].getTag();
+					}
+					getButton(IDialogConstants.OK_ID).setEnabled(tagText.getText().length() > 0 && !Arrays.asList(tags).contains(testTag));
+					taskTag = new TaskTag(tagText.getText(), priorityCombo.getSelectionIndex());
+				}
+			});
+
+			label = new Label(composite, SWT.NONE);
+			label.setText(SSEUIMessages.TaskTagPreferenceTab_7); //$NON-NLS-1$
+			label.setLayoutData(new GridData());
+			priorityCombo = new Combo(composite, SWT.READ_ONLY | SWT.SINGLE);
+			priorityCombo.setItems(new String[]{SSEUIMessages.TaskTagPreferenceTab_0, SSEUIMessages.TaskTagPreferenceTab_1, SSEUIMessages.TaskTagPreferenceTab_2});
+			priorityCombo.select(taskTag != null ? taskTag.getPriority() : TaskTag.PRIORITY_NORMAL);
+			priorityCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+			priorityCombo.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					taskTag = new TaskTag(taskTag.getTag(), priorityCombo.getSelectionIndex());
+				}
+			});
+		    Dialog.applyDialogFont(parent);
+			return composite;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+		 */
+		protected void okPressed() {
+			taskTag = new TaskTag(tagText.getText(), priorityCombo.getSelectionIndex());
+			super.okPressed();
+		}
+	}
+
+	public class TaskTagTableLabelProvider extends LabelProvider implements ITableLabelProvider {
+		public TaskTagTableLabelProvider() {
+			super();
+		}
+
+		public Image getColumnImage(Object element, int columnIndex) {
+			return null;
+		}
+
+		public String getColumnText(Object element, int columnIndex) {
+			if (columnIndex < 1)
+				return ((TaskTag) element).getTag();
+			for (int i = 0; i < fTaskTags.length; i++) {
+				if (fTaskTags[i].equals(element)) {
+					if (fTaskTags[i].getPriority() == IMarker.PRIORITY_LOW) {
+						return SSEUIMessages.TaskTagPreferenceTab_0; //$NON-NLS-1$
+					}
+					else if (fTaskTags[i].getPriority() == IMarker.PRIORITY_HIGH) {
+						return SSEUIMessages.TaskTagPreferenceTab_2; //$NON-NLS-1$
+					}
+					else {
+						return SSEUIMessages.TaskTagPreferenceTab_1; //$NON-NLS-1$
+					}
+				}
+			}
+			return SSEUIMessages.TaskTagPreferenceTab_3; //$NON-NLS-1$
+		}
+	}
+
+	private static final boolean _debugPreferences = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.core/tasks/preferences")); //$NON-NLS-1$ //$NON-NLS-2$
+
+	private Control fControl;
+
+	private TaskTag[] fOriginalTaskTags;
+	private TaskTagPreferencePage fOwner = null;
+	private IScopeContext[] fPreferencesLookupOrder = null;
+
+	private IPreferencesService fPreferencesService = null;
+
+	private TaskTag[] fTaskTags;
+
+	private TableViewer valueTable = null;
+
+
+	public MainTab(TaskTagPreferencePage parent, IPreferencesService preferencesService, IScopeContext[] lookupOrder) {
+		super();
+		fOwner = parent;
+		fPreferencesLookupOrder = lookupOrder;
+		fPreferencesService = preferencesService;
+	}
+
+
+	private void addTag() {
+		TaskTagDialog dlg = new TaskTagDialog(fControl.getShell());
+		int result = dlg.open();
+		if (result == Window.OK) {
+			TaskTag newTag = dlg.taskTag;
+			List newTags = new ArrayList(Arrays.asList(fTaskTags));
+			newTags.add(newTag);
+			fTaskTags = (TaskTag[]) newTags.toArray(new TaskTag[newTags.size()]);
+			valueTable.setInput(fTaskTags);
+			valueTable.getTable().setSelection(fTaskTags.length - 1);
+		}
+	}
+
+	public Control createContents(Composite tabFolder) {
+		loadPreferenceValues();
+		fOriginalTaskTags = fTaskTags;
+
+		Composite composite = new Composite(tabFolder, SWT.NONE);
+		composite.setLayout(new GridLayout(2, false));
+		fControl = composite;
+
+		Text description = new Text(composite, SWT.READ_ONLY | SWT.SINGLE);
+		description.setText(SSEUIMessages.TaskTagPreferenceTab_33); //$NON-NLS-1$
+//		description.setBackground(composite.getBackground());
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=104403
+		Point sizeHint = description.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+		gd.widthHint = sizeHint.x;
+		description.setLayoutData(gd);
+
+		valueTable = new TableViewer(composite, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+		valueTable.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
+		TableColumn textColumn = new TableColumn(valueTable.getTable(), SWT.NONE, 0);
+		textColumn.setText(SSEUIMessages.TaskTagPreferenceTab_12); //$NON-NLS-1$
+		TableColumn priorityColumn = new TableColumn(valueTable.getTable(), SWT.NONE, 1);
+		priorityColumn.setText(SSEUIMessages.TaskTagPreferenceTab_13); //$NON-NLS-1$
+		valueTable.setContentProvider(new ArrayContentProvider());
+		valueTable.setLabelProvider(new TaskTagTableLabelProvider());
+		valueTable.getTable().setLinesVisible(true);
+		valueTable.getTable().setHeaderVisible(true);
+		TableLayout layout = new TableLayout();
+		layout.addColumnData(new ColumnWeightData(1, 140, true));
+		layout.addColumnData(new ColumnWeightData(1, 140, true));
+		valueTable.getTable().setLayout(layout);
+
+		Composite buttons = new Composite(composite, SWT.NONE);
+		buttons.setLayout(new GridLayout());
+		buttons.setLayoutData(new GridData(GridData.FILL_VERTICAL));
+
+		final Button addButton = new Button(buttons, SWT.PUSH);
+		addButton.setText(SSEUIMessages.TaskTagPreferenceTab_14); //$NON-NLS-1$
+		addButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+		final Button editButton = new Button(buttons, SWT.PUSH);
+		editButton.setText(SSEUIMessages.TaskTagPreferenceTab_15); //$NON-NLS-1$
+		editButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+		final Button removeButton = new Button(buttons, SWT.PUSH);
+		removeButton.setText(SSEUIMessages.TaskTagPreferenceTab_16); //$NON-NLS-1$
+		removeButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+
+		editButton.setEnabled(false);
+		removeButton.setEnabled(false);
+
+		Label warning = new Label(composite, SWT.NONE);
+		warning.setLayoutData(new GridData());
+		warning.setText(SSEUIMessages.TaskTagPreferenceTab_19); //$NON-NLS-1$
+
+		final ISelectionChangedListener selectionChangedListener = new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				ISelection selection = valueTable.getSelection();
+				editButton.setEnabled(((IStructuredSelection) selection).size() == 1);
+				removeButton.setEnabled(!selection.isEmpty());
+			}
+		};
+		valueTable.addPostSelectionChangedListener(selectionChangedListener);
+		addButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				addTag();
+				valueTable.getTable().setSelection(fTaskTags.length - 1);
+				selectionChangedListener.selectionChanged(null);
+			}
+		});
+		editButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				int i = valueTable.getTable().getSelectionIndex();
+				editTag(i);
+				if (i >= 0) {
+					valueTable.getTable().setSelection(i);
+					selectionChangedListener.selectionChanged(null);
+				}
+			}
+		});
+		removeButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				int i = valueTable.getTable().getSelectionIndex();
+				removeTags(valueTable.getSelection());
+				if (i >= 0 && i < fTaskTags.length) {
+					valueTable.getTable().setSelection(i);
+				}
+			}
+		});
+		valueTable.addDoubleClickListener(new IDoubleClickListener() {
+			public void doubleClick(DoubleClickEvent event) {
+				int i = valueTable.getTable().getSelectionIndex();
+				editTag(i);
+				if (i >= 0) {
+					valueTable.getTable().setSelection(i);
+					selectionChangedListener.selectionChanged(null);
+				}
+			}
+		});
+
+		valueTable.setInput(fTaskTags);
+
+		return composite;
+	}
+
+	/**
+	 * @param selection
+	 */
+	private void editTag(int i) {
+		if (i < 0) {
+			return;
+		}
+
+		int selection = valueTable.getTable().getSelectionIndex();
+		TaskTagDialog dlg = new TaskTagDialog(fControl.getShell());
+		dlg.taskTag = fTaskTags[selection];
+		int result = dlg.open();
+		if (result == Window.OK) {
+			fTaskTags[selection] = dlg.taskTag;
+			valueTable.refresh();
+		}
+	}
+
+	public String getTitle() {
+		return SSEUIMessages.TaskTagPreferenceTab_20;
+	}
+
+	private void loadPreferenceValues() {
+		String tags = fPreferencesService.getString(TaskTagPreferenceKeys.TASK_TAG_NODE, TaskTagPreferenceKeys.TASK_TAG_TAGS, "", fPreferencesLookupOrder); //$NON-NLS-1$
+		String priorities = fPreferencesService.getString(TaskTagPreferenceKeys.TASK_TAG_NODE, TaskTagPreferenceKeys.TASK_TAG_PRIORITIES, "", fPreferencesLookupOrder); //$NON-NLS-1$
+		loadTagsAndPrioritiesFrom(tags, priorities);
+	}
+
+	/**
+	 * @param tags
+	 * @param priorities
+	 */
+	private void loadTagsAndPrioritiesFrom(String tagString, String priorityString) {
+		String[] tags = StringUtils.unpack(tagString);
+
+		StringTokenizer toker = null;
+		List list = new ArrayList();
+
+		toker = new StringTokenizer(priorityString, ","); //$NON-NLS-1$
+		while (toker.hasMoreTokens()) {
+			Integer number = null;
+			try {
+				number = Integer.valueOf(toker.nextToken());
+			}
+			catch (NumberFormatException e) {
+				number = new Integer(IMarker.PRIORITY_NORMAL);
+			}
+			list.add(number);
+		}
+		Integer[] priorities = (Integer[]) list.toArray(new Integer[0]);
+
+		fTaskTags = new TaskTag[Math.min(tags.length, priorities.length)];
+		for (int i = 0; i < fTaskTags.length; i++) {
+			fTaskTags[i] = new TaskTag(tags[i], priorities[i].intValue());
+		}
+	}
+
+	public void performApply() {
+		save();
+
+		if (!Arrays.equals(fOriginalTaskTags, fTaskTags)) {
+			fOwner.requestRedetection();
+		}
+		fOriginalTaskTags = fTaskTags;
+	}
+
+	public void performDefaults() {
+		if (_debugPreferences) {
+			System.out.println("Loading defaults in " + getClass().getName()); //$NON-NLS-1$
+		}
+		IEclipsePreferences[] preferences = new IEclipsePreferences[fPreferencesLookupOrder.length];
+		for (int i = 0; i < preferences.length; i++) {
+			preferences[i] = fPreferencesLookupOrder[i].getNode(TaskTagPreferenceKeys.TASK_TAG_NODE);
+		}
+		String tags = fPreferencesService.get(TaskTagPreferenceKeys.TASK_TAG_TAGS, null, preferences);
+		String priorities = fPreferencesService.get(TaskTagPreferenceKeys.TASK_TAG_PRIORITIES, null, preferences);
+		loadTagsAndPrioritiesFrom(tags, priorities);
+		int selection = valueTable.getTable().getSelectionIndex();
+		valueTable.setInput(fTaskTags);
+		valueTable.getTable().setSelection(selection);
+	}
+
+	public void performOk() {
+		performApply();
+	}
+
+	/**
+	 * @param selection
+	 */
+	private void removeTags(ISelection selection) {
+		IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+		List taskTags = new ArrayList(Arrays.asList(fTaskTags));
+		taskTags.removeAll(structuredSelection.toList());
+		fTaskTags = (TaskTag[]) taskTags.toArray(new TaskTag[taskTags.size()]);
+		valueTable.setInput(fTaskTags);
+	}
+
+	private void save() {
+		IEclipsePreferences defaultPreferences = new DefaultScope().getNode(TaskTagPreferenceKeys.TASK_TAG_NODE);
+		String defaultTags = defaultPreferences.get(TaskTagPreferenceKeys.TASK_TAG_TAGS, null);
+		String defaultPriorities = defaultPreferences.get(TaskTagPreferenceKeys.TASK_TAG_PRIORITIES, null);
+
+		StringBuffer buf = new StringBuffer();
+		for (int i = 0; i < fTaskTags.length; i++) {
+			if (i > 0) {
+				buf.append(","); //$NON-NLS-1$
+			}
+			buf.append(fTaskTags[i].getTag());
+		}
+		String currentTags = buf.toString();
+		if (currentTags.equals(defaultTags) && !fPreferencesLookupOrder[0].getName().equals(DefaultScope.SCOPE)) {
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_TAGS + " from scope " + fPreferencesLookupOrder[0].getName() + ":" + fPreferencesLookupOrder[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			}
+			fPreferencesLookupOrder[0].getNode(TaskTagPreferenceKeys.TASK_TAG_NODE).remove(TaskTagPreferenceKeys.TASK_TAG_TAGS);
+		}
+		else {
+			fOwner.requestRedetection();
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " setting " + TaskTagPreferenceKeys.TASK_TAG_TAGS + " \"" + currentTags + "\" in scope " + fPreferencesLookupOrder[0].getName() + ":" + fPreferencesLookupOrder[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			}
+			fPreferencesLookupOrder[0].getNode(TaskTagPreferenceKeys.TASK_TAG_NODE).put(TaskTagPreferenceKeys.TASK_TAG_TAGS, currentTags);
+		}
+
+		StringBuffer buf2 = new StringBuffer();
+		for (int i = 0; i < fTaskTags.length; i++) {
+			if (i > 0) {
+				buf2.append(","); //$NON-NLS-1$
+			}
+			buf2.append(String.valueOf(fTaskTags[i].getPriority()));
+		}
+		String priorities = buf2.toString();
+
+		if (priorities.equals(defaultPriorities) && !fPreferencesLookupOrder[0].getName().equals(DefaultScope.SCOPE)) {
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_PRIORITIES + " from scope " + fPreferencesLookupOrder[0].getName() + ":" + fPreferencesLookupOrder[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			}
+			fPreferencesLookupOrder[0].getNode(TaskTagPreferenceKeys.TASK_TAG_NODE).remove(TaskTagPreferenceKeys.TASK_TAG_PRIORITIES);
+		}
+		else {
+			fOwner.requestRedetection();
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " setting " + TaskTagPreferenceKeys.TASK_TAG_PRIORITIES + " \"" + priorities + "\" in scope " + fPreferencesLookupOrder[0].getName() + ":" + fPreferencesLookupOrder[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			}
+			fPreferencesLookupOrder[0].getNode(TaskTagPreferenceKeys.TASK_TAG_NODE).put(TaskTagPreferenceKeys.TASK_TAG_PRIORITIES, priorities);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/PropertyPreferencePage.java b/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/PropertyPreferencePage.java
new file mode 100644
index 0000000..11b85ad
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/PropertyPreferencePage.java
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ProjectScope;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.dialogs.ControlEnableState;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.dialogs.ListDialog;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.views.navigator.ResourceSorter;
+import org.eclipse.wst.sse.core.internal.tasks.TaskTagPreferenceKeys;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+/**
+ * Based loosley on org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage
+ */
+abstract class PropertyPreferencePage extends PropertyPage implements IWorkbenchPreferencePage {
+	private static final boolean _debugPreferences = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/preferences-properties")); //$NON-NLS-1$ //$NON-NLS-2$
+	/*
+	 * Disable link data, prevents the display of a "workspace" or "project"
+	 * settings link to prevent recursive dialog launching
+	 */
+	private static final Object DISABLE_LINK = "DISABLE_LINK"; //$NON-NLS-1$
+
+	private Map fData = null;
+
+	private Button fEnableProjectSettings;
+
+	private Link fProjectSettingsLink;
+
+	public PropertyPreferencePage() {
+		super();
+	}
+
+	public final void applyData(Object data) {
+		super.applyData(data);
+		if (data instanceof Map) {
+			fData = (Map) data;
+			updateLinkEnablement();
+		}
+	}
+
+	protected abstract Control createCommonContents(Composite composite);
+
+	public final Control createContents(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NULL);
+
+		GridLayout layout = new GridLayout();
+		composite.setLayout(layout);
+		GridData data = new GridData(GridData.FILL_BOTH);
+		composite.setLayoutData(data);
+
+		Composite checkLinkComposite = new Composite(composite, SWT.NONE);
+		checkLinkComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		checkLinkComposite.setLayout(new GridLayout(2, false));
+
+		if (getProject() != null) {
+			fEnableProjectSettings = new Button(checkLinkComposite, SWT.CHECK);
+			fEnableProjectSettings.setText(SSEUIMessages.EnableProjectSettings); //$NON-NLS-1$//$NON-NLS-2$
+			fEnableProjectSettings.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
+			boolean enabledForProject = createPreferenceScopes()[0].getNode(getPreferenceNodeQualifier()).getBoolean(getProjectSettingsKey(), false);
+			fEnableProjectSettings.setSelection(enabledForProject);
+		}
+		else {
+			Label spacer = new Label(checkLinkComposite, SWT.CHECK);
+			spacer.setLayoutData(new GridData());
+		}
+
+		fProjectSettingsLink = new Link(checkLinkComposite, SWT.NONE);
+		fProjectSettingsLink.setLayoutData(new GridData(SWT.END, SWT.BEGINNING, true, false));
+
+		/*
+		 * "element" should be a project, if null, link to per-project
+		 * properties
+		 */
+		if (getProject() != null) {
+			fProjectSettingsLink.setText("<a>" + SSEUIMessages.ConfigureWorkspaceSettings + "</a>"); //$NON-NLS-1$//$NON-NLS-2$
+		}
+		else {
+			fProjectSettingsLink.setText("<a>" + SSEUIMessages.ConfigureProjectSettings + "</a>"); //$NON-NLS-1$//$NON-NLS-2$
+		}
+
+		updateLinkEnablement();
+
+		fProjectSettingsLink.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				widgetSelected(e);
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				if (getProject() == null) {
+					openProjectSettings();
+				}
+				else {
+					openWorkspaceSettings();
+				}
+			}
+
+		});
+
+		if (getProject() != null) {
+			Label line = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
+			line.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+		}
+
+		final Control common = createCommonContents(composite);
+		common.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		if (fEnableProjectSettings != null) {
+			SelectionAdapter selectionAdapter = new SelectionAdapter() {
+				ControlEnableState enablements = null;
+
+				public void widgetSelected(SelectionEvent e) {
+					super.widgetSelected(e);
+					if (fEnableProjectSettings.getSelection()) {
+						if (enablements != null) {
+							enablements.restore();
+							enablements = null;
+						}
+					}
+					else {
+						enablements = ControlEnableState.disable(common);
+					}
+				}
+			};
+			selectionAdapter.widgetSelected(null);
+			fEnableProjectSettings.addSelectionListener(selectionAdapter);
+		}
+
+		applyDialogFont(composite);
+		return composite;
+	}
+
+	public void createControl(Composite parent) {
+		if (getProject() != null) {
+			noDefaultAndApplyButton();
+		}
+		super.createControl(parent);
+	}
+
+	protected IScopeContext[] createPreferenceScopes() {
+		IProject project = getProject();
+		if (project != null) {
+			return new IScopeContext[]{new ProjectScope(project), new InstanceScope(), new DefaultScope()};
+		}
+		return new IScopeContext[]{new InstanceScope(), new DefaultScope()};
+	}
+
+	protected abstract String getPreferenceNodeQualifier();
+
+	protected abstract String getPreferencePageID();
+
+	protected IProject getProject() {
+		if (getElement() != null) {
+			if (getElement() instanceof IProject) {
+				return (IProject) getElement();
+			}
+			Object adapter = getElement().getAdapter(IProject.class);
+			if (adapter instanceof IProject) {
+				return (IProject) adapter;
+			}
+			adapter = getElement().getAdapter(IResource.class);
+			if (adapter instanceof IProject) {
+				return (IProject) adapter;
+			}
+		}
+		return null;
+	}
+
+	protected abstract String getProjectSettingsKey();
+
+	protected abstract String getPropertyPageID();
+
+	protected boolean isElementSettingsEnabled() {
+		return fEnableProjectSettings != null && fEnableProjectSettings.getSelection();
+	}
+
+	void openProjectSettings() {
+		ListDialog dialog = new ListDialog(getShell()) {
+
+			protected Control createDialogArea(Composite container) {
+				Control area = super.createDialogArea(container);
+				getTableViewer().setSorter(new ResourceSorter(ResourceSorter.NAME));
+				return area;
+			}
+		};
+		dialog.setMessage(SSEUIMessages.PropertyPreferencePage_02);
+		dialog.setContentProvider(new IStructuredContentProvider() {
+			public void dispose() {
+			}
+
+			public Object[] getElements(Object inputElement) {
+				return ((IWorkspace) inputElement).getRoot().getProjects();
+			}
+
+			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+			}
+		});
+		dialog.setLabelProvider(new DecoratingLabelProvider(new WorkbenchLabelProvider(), SSEUIPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator()));
+		dialog.setInput(ResourcesPlugin.getWorkspace());
+		dialog.setTitle(SSEUIMessages.PropertyPreferencePage_01);
+		if (dialog.open() == Window.OK) {
+			Object[] result = dialog.getResult();
+			if (result.length > 0) {
+				IProject project = (IProject) dialog.getResult()[0];
+				Map data = new HashMap();
+				data.put(DISABLE_LINK, Boolean.TRUE);
+				PreferencesUtil.createPropertyDialogOn(getShell(), project, getPropertyPageID(), new String[]{getPropertyPageID()}, data).open();
+			}
+		}
+	}
+
+	void openWorkspaceSettings() {
+		Map data = new HashMap();
+		data.put(DISABLE_LINK, Boolean.TRUE);
+		PreferencesUtil.createPreferenceDialogOn(getShell(), getPreferencePageID(), new String[]{getPreferencePageID()}, data).open();
+	}
+
+	public boolean performOk() {
+		boolean ok = super.performOk();
+		IScopeContext[] preferenceScopes = createPreferenceScopes();
+		if (getProject() != null) {
+			if (isElementSettingsEnabled()) {
+				if (_debugPreferences) {
+					System.out.println(getClass().getName() + " setting " + TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT + " (" + true + ") in scope " + preferenceScopes[0].getName() + ":" + preferenceScopes[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$  
+				}
+				preferenceScopes[0].getNode(getPreferenceNodeQualifier()).putBoolean(getProjectSettingsKey(), fEnableProjectSettings.getSelection());
+			}
+			else {
+				if (_debugPreferences) {
+					System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT + " from scope " + preferenceScopes[0].getName() + ":" + preferenceScopes[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				}
+				preferenceScopes[0].getNode(getPreferenceNodeQualifier()).remove(getProjectSettingsKey());
+			}
+		}
+		return ok;
+	}
+
+	private void updateLinkEnablement() {
+		if (fData != null && fProjectSettingsLink != null) {
+			fProjectSettingsLink.setEnabled(!Boolean.TRUE.equals(fData.get(DISABLE_LINK)));
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/TaskTagPreferencePage.java b/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/TaskTagPreferencePage.java
new file mode 100644
index 0000000..cb1be0f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/TaskTagPreferencePage.java
@@ -0,0 +1,353 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.jface.dialogs.ControlEnableState;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.sse.core.internal.tasks.TaskScanningScheduler;
+import org.eclipse.wst.sse.core.internal.tasks.TaskTagPreferenceKeys;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
+import org.eclipse.wst.sse.ui.internal.preferences.TabFolderLayout;
+import org.osgi.service.prefs.BackingStoreException;
+
+public class TaskTagPreferencePage extends PropertyPreferencePage {
+
+	private static final boolean _debugPreferences = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.core/tasks/preferences")); //$NON-NLS-1$ //$NON-NLS-2$
+	// Remember the last displayed tab for convenience
+	private static final String TASK_TAG_LAST_TAB = "task-tag-last-tab"; //$NON-NLS-1$
+
+	private int detectionRequested = 0;
+
+	private Button fEnableCheckbox = null;
+
+	private boolean fEnableTaskTags = true;
+
+	private boolean fOriginalEnableTaskTags = true;
+
+	private IPreferencesService fPreferencesService = null;
+
+	private Button fRedetectButton;
+
+	private SelectionListener fTabEnablementListener;
+
+	private TabFolder fTabFolder;
+	private IPreferenceTab[] fTabs = null;
+
+	public TaskTagPreferencePage() {
+		super();
+		fPreferencesService = Platform.getPreferencesService();
+	}
+
+	protected void contributeButtons(Composite parent) {
+		if (getElement() == null) {
+			((GridLayout) parent.getLayout()).numColumns += 2;
+			fRedetectButton = new Button(parent, SWT.PUSH);
+			fRedetectButton.setText(SSEUIMessages.TaskTagPreferencePage_32); //$NON-NLS-1$
+			fRedetectButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_FILL));
+			fRedetectButton.setEnabled(true);
+			fRedetectButton.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					Job redetectJob = new Job(SSEUIMessages.TaskTagPreferenceTab_27) { //$NON-NLS-1$
+						public Object getAdapter(Class adapter) {
+							return null;
+						}
+
+						protected IStatus run(IProgressMonitor monitor) {
+							TaskScanningScheduler.refresh();
+							return Status.OK_STATUS;
+						}
+					};
+					redetectJob.schedule();
+				}
+			});
+			Label spacer = new Label(parent, SWT.NONE);
+			spacer.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_CENTER));
+		}
+		super.contributeButtons(parent);
+	}
+
+	protected Control createCommonContents(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout compositeLayout = new GridLayout();
+		compositeLayout.marginLeft = 0;
+		compositeLayout.marginRight = 0;
+		composite.setLayout(compositeLayout);
+
+		IScopeContext[] preferenceScopes = createPreferenceScopes();
+		fOriginalEnableTaskTags = fEnableTaskTags = fPreferencesService.getBoolean(getPreferenceNodeQualifier(), TaskTagPreferenceKeys.TASK_TAG_ENABLE, false, preferenceScopes);
+		fEnableCheckbox = new Button(composite, SWT.CHECK);
+		fEnableCheckbox.setSelection(fEnableTaskTags);
+		fEnableCheckbox.setText(SSEUIMessages.TaskTagPreferenceTab_31); //$NON-NLS-1$
+		fEnableCheckbox.setSelection(fEnableTaskTags);
+		fEnableCheckbox.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING, GridData.VERTICAL_ALIGN_END, false, false, 1, 1));
+
+		fTabFolder = new TabFolder(composite, SWT.NONE);
+		fTabFolder.setLayout(new TabFolderLayout());
+		fTabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
+
+		TabItem taskItem = new TabItem(fTabFolder, SWT.NONE);
+		MainTab mainTab = new MainTab(this, fPreferencesService, preferenceScopes);
+		taskItem.setText(mainTab.getTitle());
+		final Control taskTagsControl = mainTab.createContents(fTabFolder);
+		taskItem.setControl(taskTagsControl);
+
+		TabItem exclusionItem = new TabItem(fTabFolder, SWT.NONE);
+		ExclusionsTab exclusionsTab = new ExclusionsTab(this, fPreferencesService, preferenceScopes);
+		exclusionItem.setText(exclusionsTab.getTitle());
+		final Control exclusionControl = exclusionsTab.createContents(fTabFolder);
+		exclusionItem.setControl(exclusionControl);
+
+		fTabs = new IPreferenceTab[]{mainTab, exclusionsTab};
+
+		fTabEnablementListener = new SelectionAdapter() {
+			ControlEnableState[] lastEnableStates = null;
+
+			public void widgetSelected(SelectionEvent e) {
+				fEnableTaskTags = fEnableCheckbox.getSelection();
+				if (fEnableTaskTags) {
+					if (lastEnableStates != null) {
+						for (int i = 0; i < lastEnableStates.length; i++) {
+							if (lastEnableStates[i] != null) {
+								lastEnableStates[i].restore();
+							}
+						}
+						lastEnableStates = null;
+						fTabFolder.redraw();
+					}
+				}
+				else if (lastEnableStates == null) {
+					lastEnableStates = new ControlEnableState[fTabs.length + 1];
+					lastEnableStates[0] = ControlEnableState.disable(taskTagsControl);
+					lastEnableStates[1] = ControlEnableState.disable(exclusionControl);
+					if (fRedetectButton != null) {
+						lastEnableStates[2] = ControlEnableState.disable(fRedetectButton);
+					}
+				}
+			}
+		};
+		fTabEnablementListener.widgetSelected(null);
+		fEnableCheckbox.addSelectionListener(fTabEnablementListener);
+
+		// restore last selected tab
+		int activeTab = new DefaultScope().getNode(getPreferenceNodeQualifier()).getInt(TASK_TAG_LAST_TAB, 0);
+		if (activeTab > 0) {
+			fTabFolder.setSelection(activeTab);
+		}
+
+		SSEUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.PREFWEBX_TASKTAGS_HELPID);
+		return composite;
+	}
+
+	protected String getPreferenceNodeQualifier() {
+		return TaskTagPreferenceKeys.TASK_TAG_NODE;
+	}
+
+	protected String getPreferencePageID() {
+		return "org.eclipse.wst.sse.ui.preferences.tasktags";//$NON-NLS-1$
+
+	}
+
+	protected String getProjectSettingsKey() {
+		return TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT;
+	}
+
+	protected String getPropertyPageID() {
+		return "org.eclipse.wst.sse.ui.project.properties.tasktags";//$NON-NLS-1$
+	}
+
+	public String getTitle() {
+		return SSEUIMessages.TaskTagPreferenceTab_20; //$NON-NLS-1$
+	}
+
+	public void init(IWorkbench workbench) {
+	}
+
+	public void performApply() {
+		super.performApply();
+		save();
+
+		for (int i = 0; i < fTabs.length; i++) {
+			fTabs[i].performApply();
+		}
+
+		promptForRedetectIfNecessary();
+	}
+
+	public void performDefaults() {
+		super.performDefaults();
+		IEclipsePreferences defaultPreferences = createPreferenceScopes()[1].getNode(getPreferenceNodeQualifier());
+		fEnableTaskTags = defaultPreferences.getBoolean(TaskTagPreferenceKeys.TASK_TAG_ENABLE, false);
+		fEnableCheckbox.setSelection(fEnableTaskTags);
+		for (int i = 0; i < fTabs.length; i++) {
+			fTabs[i].performDefaults();
+		}
+		fTabEnablementListener.widgetSelected(null);
+		if (_debugPreferences) {
+			System.out.println("Loading defaults in " + getClass().getName()); //$NON-NLS-1$
+		}
+	}
+
+	public boolean performOk() {
+		boolean ok = super.performOk();
+		save();
+
+		for (int i = 0; i < fTabs.length; i++) {
+			fTabs[i].performOk();
+		}
+
+		promptForRedetectIfNecessary();
+
+		// save last tab (use Default scope since it won't be persisted)
+		new DefaultScope().getNode(getPreferenceNodeQualifier()).putInt(TASK_TAG_LAST_TAB, fTabFolder.getSelectionIndex());
+
+		IScopeContext[] contexts = createPreferenceScopes();
+		// remove project-specific information if it's not enabled
+		if (getProject() != null && !isElementSettingsEnabled()) {
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT + " (" + true + ") in scope " + contexts[0].getName() + ":" + contexts[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$  
+			}
+			contexts[0].getNode(getPreferenceNodeQualifier()).remove(TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT);
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED + " (" + true + ") in scope " + contexts[0].getName() + ":" + contexts[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$  
+			}
+			contexts[0].getNode(getPreferenceNodeQualifier()).remove(TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED);
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_PRIORITIES + " (" + true + ") in scope " + contexts[0].getName() + ":" + contexts[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$  
+			}
+			contexts[0].getNode(getPreferenceNodeQualifier()).remove(TaskTagPreferenceKeys.TASK_TAG_PRIORITIES);
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_TAGS + " (" + true + ") in scope " + contexts[0].getName() + ":" + contexts[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$  
+			}
+			contexts[0].getNode(getPreferenceNodeQualifier()).remove(TaskTagPreferenceKeys.TASK_TAG_TAGS);
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_ENABLE + " (" + true + ") in scope " + contexts[0].getName() + ":" + contexts[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$  
+			}
+			contexts[0].getNode(getPreferenceNodeQualifier()).remove(TaskTagPreferenceKeys.TASK_TAG_ENABLE);
+		}
+		for (int i = 0; i < contexts.length; i++) {
+			try {
+				contexts[i].getNode(getPreferenceNodeQualifier()).flush();
+			}
+			catch (BackingStoreException e) {
+				Logger.logException("problem saving preference settings to scope " + contexts[i].getName(), e); //$NON-NLS-1$
+			}
+		}
+
+		return ok;
+	}
+
+
+	private void promptForRedetectIfNecessary() {
+		if (detectionRequested > 0) {
+			MessageDialog dialog = new MessageDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SSEUIMessages.TaskTagPreferenceTab_22, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().getImage(), SSEUIMessages.TaskTagPreferenceTab_23, MessageDialog.QUESTION, new String[]{SSEUIMessages.TaskTagPreferenceTab_24, SSEUIMessages.TaskTagPreferenceTab_25, SSEUIMessages.TaskTagPreferenceTab_26}, 2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+			int button = dialog.open();
+			if (button == 0) {
+				Job redetectJob = new Job(SSEUIMessages.TaskTagPreferenceTab_27) { //$NON-NLS-1$
+					public Object getAdapter(Class adapter) {
+						return null;
+					}
+
+					protected IStatus run(IProgressMonitor monitor) {
+						if (getProject() == null) {
+							if (_debugPreferences) {
+								System.out.println(getClass().getName() + ": rescanning all"); //$NON-NLS-1$
+							}
+							TaskScanningScheduler.refresh();
+						}
+						else {
+							if (_debugPreferences) {
+								System.out.println(getClass().getName() + ": rescanning " + getProject()); //$NON-NLS-1$
+							}
+							TaskScanningScheduler.refresh(getProject());
+						}
+						return Status.OK_STATUS;
+					}
+				};
+				redetectJob.schedule(500);
+			}
+			detectionRequested = 0;
+		}
+	}
+
+	void requestRedetection() {
+		detectionRequested++;
+	}
+
+	private void save() {
+		if (fEnableTaskTags != fOriginalEnableTaskTags) {
+			requestRedetection();
+		}
+		fOriginalEnableTaskTags = fEnableTaskTags;
+
+		IScopeContext[] preferenceScopes = createPreferenceScopes();
+		IEclipsePreferences defaultPreferences = preferenceScopes[1].getNode(getPreferenceNodeQualifier());
+		boolean defaultEnable = defaultPreferences.getBoolean(TaskTagPreferenceKeys.TASK_TAG_ENABLE, false);
+		if (fEnableTaskTags == defaultEnable) {
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_ENABLE + " from scope " + preferenceScopes[0].getName() + ":" + preferenceScopes[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
+			preferenceScopes[0].getNode(getPreferenceNodeQualifier()).remove(TaskTagPreferenceKeys.TASK_TAG_ENABLE);
+		}
+		else {
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " setting " + TaskTagPreferenceKeys.TASK_TAG_ENABLE + " \"" + fEnableTaskTags + "\" in scope " + preferenceScopes[0].getName() + ":" + preferenceScopes[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			}
+			preferenceScopes[0].getNode(getPreferenceNodeQualifier()).putBoolean(TaskTagPreferenceKeys.TASK_TAG_ENABLE, fEnableTaskTags);
+		}
+		if (getProject() != null && isElementSettingsEnabled()) {
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " setting " + TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT + " (" + true + ") in scope " + preferenceScopes[0].getName() + ":" + preferenceScopes[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$  
+			}
+			preferenceScopes[0].getNode(getPreferenceNodeQualifier()).putBoolean(TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT, true);
+		}
+		else {
+			if (_debugPreferences) {
+				System.out.println(getClass().getName() + " removing " + TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT + " from scope " + preferenceScopes[0].getName() + ":" + preferenceScopes[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			}
+			preferenceScopes[0].getNode(getPreferenceNodeQualifier()).remove(TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT);
+		}
+		try {
+			fPreferencesService.getRootNode().flush();
+		}
+		catch (BackingStoreException e) {
+			// log it, there is no recovery
+			Logger.logException(e);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/EditorExecutionContext.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/EditorExecutionContext.java
new file mode 100644
index 0000000..b40d9a5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/EditorExecutionContext.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
+import org.eclipse.wst.sse.core.internal.IExecutionDelegate;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+class EditorExecutionContext implements IExecutionDelegate {
+
+	/**
+	 * Reusable runnable for the Display execution queue to cut down on
+	 * garbage creation. Will make use of the progress service if possible.
+	 */
+	private static class ReusableUIRunner implements Runnable, IRunnableWithProgress {
+		private StructuredTextEditor editor;
+		private ISafeRunnable fRunnable = null;
+
+		ReusableUIRunner(StructuredTextEditor part) {
+			super();
+			editor = part;
+		}
+
+		/*
+		 * Expected to only be run by Display queue in the UI Thread
+		 * 
+		 * @see java.lang.Runnable#run()
+		 */
+		public void run() {
+			IWorkbenchPartSite site = editor.getEditorPart().getSite();
+			final IWorkbenchWindow workbenchWindow = (site == null) ? null : site.getWorkbenchWindow();
+			final IWorkbenchSiteProgressService jobService = (IWorkbenchSiteProgressService) ((site == null) ? null : site.getAdapter(IWorkbenchSiteProgressService.class));
+			/*
+			 * Try to use the progress service so the workbench can give more
+			 * feedback to the user (although editors seem to make less use of
+			 * the service than views -
+			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=86221 .
+			 */
+			if (workbenchWindow != null && jobService != null) {
+				/*
+				 * Doc is ambiguous, but it must be run from the UI thread -
+				 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=165180
+				 */
+				try {
+					jobService.runInUI(workbenchWindow, this, (ISchedulingRule) editor.getEditorPart().getEditorInput().getAdapter(IResource.class));
+				}
+				catch (InvocationTargetException e) {
+					Logger.logException(e);
+				}
+				catch (InterruptedException e) {
+					Logger.logException(e);
+				}
+			}
+			else {
+				/*
+				 * Run it directly and direct the UI of the editor. See
+				 * StructuredTextEditor's begin/end background job for other
+				 * activities to best accommodate (for example, there is a
+				 * "timed delay" before the editor itself leaves
+				 * background-update mode). NOTE: this execute method itself
+				 * is always called from inside of an ILock block, so another
+				 * block is not not needed here for all these sycnExec's.
+				 */
+				IWorkbench workbench = SSEUIPlugin.getInstance().getWorkbench();
+				final Display display = workbench.getDisplay();
+				if (display != null && !display.isDisposed()) {
+					editor.beginBackgroundOperation();
+					try {
+						/*
+						 * Here's where the document update/modification
+						 * occurs
+						 */
+						SafeRunner.run(fRunnable);
+					}
+					finally {
+						/*
+						 * This 'end' is just a signal to editor that this
+						 * particular update is done. Its up to the editor to
+						 * decide exactly when to leave its "background mode"
+						 */
+						editor.endBackgroundOperation();
+					}
+				}
+				fRunnable = null;
+			}
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse
+		 * .core.runtime.IProgressMonitor)
+		 */
+		public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+			if (fRunnable != null)
+				SafeRunner.run(fRunnable);
+		}
+
+		void setRunnable(ISafeRunnable r) {
+			fRunnable = r;
+		}
+	}
+
+	StructuredTextEditor fEditor;
+	private ReusableUIRunner fReusableRunner;
+
+	public EditorExecutionContext(StructuredTextEditor editor) {
+		super();
+		fEditor = editor;
+		fReusableRunner = new ReusableUIRunner(fEditor);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.wst.sse.core.internal.IExecutionDelegate#execute(java.lang
+	 * .Runnable)
+	 */
+	public void execute(final ISafeRunnable runnable) {
+		IWorkbench workbench = SSEUIPlugin.getInstance().getWorkbench();
+		final Display display = workbench.getDisplay();
+		if (display.getThread() == Thread.currentThread()) {
+			// *If already in display thread, we can simply run, "as usual"*/
+			SafeRunner.run(runnable);
+		}
+		else {
+			// *otherwise run through the reusable runner */
+			fReusableRunner.setRunnable(runnable);
+			display.syncExec(fReusableRunner);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/EncodingSupport.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/EncodingSupport.java
new file mode 100644
index 0000000..fd054ef
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/EncodingSupport.java
@@ -0,0 +1,139 @@
+/*******************************************************************************

+ * Copyright (c) 2008 IBM Corporation and others.

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ * 

+ * Contributors:

+ *     IBM Corporation - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.wst.sse.ui;

+

+import org.eclipse.ui.editors.text.DefaultEncodingSupport;

+import org.eclipse.ui.editors.text.IEncodingSupport;

+import org.eclipse.ui.texteditor.StatusTextEditor;

+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;

+

+/**

+ * An implementation that will try to use a <b>provisional</b> configuration

+ * if IEncodingSupport.class as a delegate. A delegate, if found, will be

+ * asked for encoding information before defaulting to the superclass

+ * implementation, but will be told to set the encoding after the superclass

+ * has. Delegates should not duplicate any functionality in the

+ * DefaultEncodingSupport implementation as they may be executed in addition

+ * to the default behavior.

+ */

+class EncodingSupport extends DefaultEncodingSupport {

+	private String[] fConfigurationPoints = null;

+	/** The editor this support is associated with. */

+	private StatusTextEditor fStatusTextEditor;

+

+	IEncodingSupport fSupportDelegate = null;

+

+	EncodingSupport(String[] configurationPoints) {

+		super();

+		fConfigurationPoints = configurationPoints;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * 

+	 * @see org.eclipse.ui.editors.text.DefaultEncodingSupport#dispose()

+	 */

+	public void dispose() {

+		super.dispose();

+

+		if (fSupportDelegate instanceof DefaultEncodingSupport) {

+			((DefaultEncodingSupport) fSupportDelegate).dispose();

+		}

+		fSupportDelegate = null;

+		fStatusTextEditor = null;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * 

+	 * @seeorg.eclipse.ui.editors.text.DefaultEncodingSupport#

+	 * getDefaultEncoding()

+	 */

+	public String getDefaultEncoding() {

+		IEncodingSupport delegate = getEncodingSupportDelegate();

+		if (delegate != null) {

+			return delegate.getDefaultEncoding();

+		}

+

+		return super.getDefaultEncoding();

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * 

+	 * @see org.eclipse.ui.editors.text.DefaultEncodingSupport#getEncoding ()

+	 */

+	public String getEncoding() {

+		IEncodingSupport delegate = getEncodingSupportDelegate();

+		if (delegate != null) {

+			return delegate.getEncoding();

+		}

+

+		return super.getEncoding();

+	}

+

+	IEncodingSupport getEncodingSupportDelegate() {

+		if (fSupportDelegate == null) {

+			ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();

+			for (int i = 0; fSupportDelegate == null && i < fConfigurationPoints.length; i++) {

+				fSupportDelegate = (IEncodingSupport) builder.getConfiguration(IEncodingSupport.class.getName(), fConfigurationPoints[i]);

+			}

+		}

+		return fSupportDelegate;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * 

+	 * @see

+	 * org.eclipse.ui.editors.text.DefaultEncodingSupport#initialize(org.eclipse

+	 * .ui.texteditor.StatusTextEditor)

+	 */

+	public void initialize(StatusTextEditor textEditor) {

+		super.initialize(textEditor);

+		fStatusTextEditor = textEditor;

+

+		IEncodingSupport encodingSupportDelegate = getEncodingSupportDelegate();

+		if (encodingSupportDelegate instanceof DefaultEncodingSupport) {

+			((DefaultEncodingSupport) encodingSupportDelegate).initialize(textEditor);

+		}

+	}

+

+	void reinitialize(String[] configurationPoints) {

+		if (fSupportDelegate instanceof DefaultEncodingSupport) {

+			((DefaultEncodingSupport) fSupportDelegate).dispose();

+		}

+		fSupportDelegate = null;

+

+		fConfigurationPoints = configurationPoints;

+

+		IEncodingSupport encodingSupportDelegate = getEncodingSupportDelegate();

+		if (encodingSupportDelegate instanceof DefaultEncodingSupport) {

+			((DefaultEncodingSupport) encodingSupportDelegate).initialize(fStatusTextEditor);

+		}

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * 

+	 * @see org.eclipse.ui.editors.text.DefaultEncodingSupport#setEncoding

+	 * (java.lang.String, boolean)

+	 */

+	protected void setEncoding(String encoding, boolean overwrite) {

+		super.setEncoding(encoding, overwrite);

+

+		IEncodingSupport delegate = getEncodingSupportDelegate();

+		if (delegate != null && overwrite) {

+			delegate.setEncoding(encoding);

+		}

+	}

+}

diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FoldingActionGroup.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FoldingActionGroup.java
new file mode 100644
index 0000000..7291cef
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FoldingActionGroup.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.ITextOperationTarget;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.source.projection.IProjectionListener;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.ui.editors.text.IFoldingCommandIds;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.IUpdate;
+import org.eclipse.ui.texteditor.ResourceAction;
+import org.eclipse.ui.texteditor.TextOperationAction;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.projection.AbstractStructuredFoldingStrategy;
+
+class FoldingActionGroup extends ActionGroup {
+	private static abstract class PreferenceAction extends ResourceAction implements IUpdate {
+		PreferenceAction(ResourceBundle bundle, String prefix, int style) {
+			super(bundle, prefix, style);
+		}
+	}
+
+	private ProjectionViewer fViewer;
+
+	private final PreferenceAction fToggle;
+	private final TextOperationAction fExpandAll;
+	private final IProjectionListener fProjectionListener;
+	private final TextOperationAction fCollapseAll;
+
+
+	/**
+	 * Creates a new projection action group for <code>editor</code>. If
+	 * the supplied viewer is not an instance of <code>ProjectionViewer</code>,
+	 * the action group is disabled.
+	 * 
+	 * @param editor
+	 *            the text editor to operate on
+	 * @param viewer
+	 *            the viewer of the editor
+	 */
+	public FoldingActionGroup(final ITextEditor editor, ITextViewer viewer) {
+		if (!(viewer instanceof ProjectionViewer)) {
+			fToggle = null;
+			fExpandAll = null;
+			fCollapseAll = null;
+			fProjectionListener = null;
+			return;
+		}
+
+		fViewer = (ProjectionViewer) viewer;
+
+		fProjectionListener = new IProjectionListener() {
+
+			public void projectionEnabled() {
+				update();
+			}
+
+			public void projectionDisabled() {
+				update();
+			}
+		};
+
+		fViewer.addProjectionListener(fProjectionListener);
+
+		fToggle = new PreferenceAction(SSEUIMessages.getResourceBundle(), "Projection_Toggle_", IAction.AS_CHECK_BOX) { //$NON-NLS-1$
+			public void run() {
+				IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
+				boolean current = store.getBoolean(AbstractStructuredFoldingStrategy.FOLDING_ENABLED);
+				store.setValue(AbstractStructuredFoldingStrategy.FOLDING_ENABLED, !current);
+			}
+
+			public void update() {
+				ITextOperationTarget target = (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class);
+
+				boolean isEnabled = (target != null && target.canDoOperation(ProjectionViewer.TOGGLE));
+				setEnabled(isEnabled);
+			}
+		};
+		
+		IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
+		boolean checked = store.getBoolean(AbstractStructuredFoldingStrategy.FOLDING_ENABLED);
+		fToggle.setChecked(checked);
+		fToggle.setActionDefinitionId(IFoldingCommandIds.FOLDING_TOGGLE);
+		editor.setAction("FoldingToggle", fToggle); //$NON-NLS-1$
+
+		fExpandAll = new TextOperationAction(SSEUIMessages.getResourceBundle(), "Projection_ExpandAll_", editor, ProjectionViewer.EXPAND_ALL, true); //$NON-NLS-1$
+		fExpandAll.setActionDefinitionId(IFoldingCommandIds.FOLDING_EXPAND_ALL);
+		editor.setAction("FoldingExpandAll", fExpandAll); //$NON-NLS-1$
+
+		fCollapseAll = new TextOperationAction(SSEUIMessages.getResourceBundle(), "Projection_CollapseAll_", editor, ProjectionViewer.COLLAPSE_ALL, true); //$NON-NLS-1$
+		fCollapseAll.setActionDefinitionId(IFoldingCommandIds.FOLDING_COLLAPSE_ALL);
+		editor.setAction("FoldingCollapseAll", fCollapseAll); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns <code>true</code> if the group is enabled.
+	 * 
+	 * <pre>
+	 *        Invariant: isEnabled() &lt;=&gt; fViewer and all actions are != null.
+	 * </pre>
+	 * 
+	 * @return <code>true</code> if the group is enabled
+	 */
+	protected boolean isEnabled() {
+		return fViewer != null;
+	}
+
+	/*
+	 * @see org.eclipse.ui.actions.ActionGroup#dispose()
+	 */
+	public void dispose() {
+		if (isEnabled()) {
+			fViewer.removeProjectionListener(fProjectionListener);
+			fViewer = null;
+		}
+		super.dispose();
+	}
+
+	/**
+	 * Updates the actions.
+	 */
+	protected void update() {
+		if (isEnabled()) {
+			fToggle.update();
+			fToggle.setChecked(fViewer.isProjectionMode());
+			fExpandAll.update();
+			fCollapseAll.update();
+		}
+	}
+
+	/**
+	 * Fills the menu with all folding actions.
+	 * 
+	 * @param manager
+	 *            the menu manager for the folding submenu
+	 */
+	public void fillMenu(IMenuManager manager) {
+		if (isEnabled()) {
+			update();
+			manager.add(fToggle);
+			manager.add(fExpandAll);
+			manager.add(fCollapseAll);
+		}
+	}
+
+	/*
+	 * @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
+	 */
+	public void updateActionBars() {
+		update();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/IContentSelectionProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/IContentSelectionProvider.java
new file mode 100644
index 0000000..84ab191
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/IContentSelectionProvider.java
@@ -0,0 +1,13 @@
+package org.eclipse.wst.sse.ui;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreeViewer;
+
+/**
+ * Allows contributors to redefine a selection when provided with the current
+ * selection.
+ * 
+ */
+public interface IContentSelectionProvider {
+	ISelection getSelection(TreeViewer viewer, ISelection selection);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/ISemanticHighlighting.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/ISemanticHighlighting.java
new file mode 100644
index 0000000..f8193de
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/ISemanticHighlighting.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.Position;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+
+/**
+ * This interface defines preferences and consumability for semantic highlighting.
+ * The preference keys provided by the implementation are stored within the preference store
+ * provided by the implementation. When a region is consumable by the semantic highlighting,
+ * the implementation provides an array of positions to style.
+ * 
+ * @since 3.1
+ *
+ */
+public interface ISemanticHighlighting {
+	
+	/**
+	 * The preference key that controls the text's bold attribute for the semantic highlighting
+	 * @return the bold preference key
+	 */
+	public String getBoldPreferenceKey();
+	
+	/**
+	 * The preference key that controls the text's underline attribute for the semantic highlighting
+	 * @return the bold preference key
+	 */
+	public String getUnderlinePreferenceKey();
+	
+	/**
+	 * The preference key that controls the text's strikethrough attribute for the semantic highlighting
+	 * @return the bold preference key
+	 */
+	public String getStrikethroughPreferenceKey();
+	
+	/**
+	 * The preference key that controls the text's italic attribute for the semantic highlighting
+	 * @return the bold preference key
+	 */
+	public String getItalicPreferenceKey();
+	
+	/**
+	 * The preference key that controls the text's color attribute for the semantic highlighting
+	 * @return the bold preference key
+	 */
+	public String getColorPreferenceKey();
+	
+	/**
+	 * The preference store that maintains the preferences for the semantic highlighting
+	 * @return the bold preference key
+	 */
+	public IPreferenceStore getPreferenceStore();
+	
+	/**
+	 * The preference key that controls if the semantic highlighting is enabled
+	 * @return the bold preference key
+	 */
+	public String getEnabledPreferenceKey();
+
+	/**
+	 * @return the display name
+	 */
+	public String getDisplayName();
+
+	/**
+	 * Returns an array of positions iff the semantic highlighting consumes any part of the structured document region.
+	 * <p>
+	 * NOTE: Implementors are not allowed to keep a reference on the region or on any object
+	 * retrieved from the region.
+	 * </p>
+	 *
+	 * @param region the structured document region
+	 * @return an array of positions to consume iff the semantic highlighting consumes any part of the structured document region, otherwise null
+	 */
+	public Position[] consumes(IStructuredDocumentRegion region);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/ISemanticHighlightingExtension.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/ISemanticHighlightingExtension.java
new file mode 100644
index 0000000..b73398e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/ISemanticHighlightingExtension.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import org.eclipse.jface.text.Position;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+
+/**
+ * Extends {@link org.eclipse.wst.sse.ui.ISemanticHighlighting} allowing clients to
+ * define consumability with respect to indexed regions containing the structured
+ * document region.
+ * 
+ */
+public interface ISemanticHighlightingExtension {
+
+	/**
+	 * Returns an array of positions iff the semantic highlighting consumes any part of the structured document region
+	 *
+	 * <p>
+	 * NOTE: Implementors are not allowed to keep a reference on the either regions or on any object
+	 * retrieved from the regions.
+	 * </p>
+	 *
+	 * @param documentRegion the structured document region
+	 * @param indexedRegion the indexed region that contains the <code>documentRegion</code>
+	 * @return an array of positions to consume iff the semantic highlighting consumes any part of the structured document region, otherwise null
+	 */
+	public Position[] consumes(IStructuredDocumentRegion documentRegion, IndexedRegion indexedRegion);
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredSourceViewerDecorationSupport.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredSourceViewerDecorationSupport.java
new file mode 100644
index 0000000..72486bd
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredSourceViewerDecorationSupport.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import org.eclipse.jface.text.source.AnnotationPainter;
+import org.eclipse.jface.text.source.IAnnotationAccess;
+import org.eclipse.jface.text.source.IOverviewRuler;
+import org.eclipse.jface.text.source.ISharedTextColors;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.texteditor.AnnotationPreference;
+import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;
+
+class StructuredSourceViewerDecorationSupport extends SourceViewerDecorationSupport {
+	public StructuredSourceViewerDecorationSupport(ISourceViewer sourceViewer, IOverviewRuler overviewRuler, IAnnotationAccess annotationAccess, ISharedTextColors sharedTextColors) {
+		super(sourceViewer, overviewRuler, annotationAccess, sharedTextColors);
+	}
+
+	protected AnnotationPainter createAnnotationPainter() {
+		/*
+		 * The new squiggly drawer depends on the presentation reconciler to
+		 * draw its squiggles. Unfortunately, StructuredTextEditors cannot use
+		 * the presentation reconciler because it conflicts with its
+		 * highlighter. Overriding createAnnotationPainter so that it is
+		 * forced to use the old squiggly painter instead of the new one. See
+		 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=201928
+		 */
+		AnnotationPainter painter = super.createAnnotationPainter();
+		// dont use new squiggly painter
+		painter.addTextStyleStrategy(AnnotationPreference.STYLE_SQUIGGLES, null);
+		// use old one
+		painter.addDrawingStrategy(AnnotationPreference.STYLE_SQUIGGLES, new AnnotationPainter.SquigglesStrategy());
+		// dont use new problem underline painter
+		painter.addTextStyleStrategy(AnnotationPreference.STYLE_PROBLEM_UNDERLINE, null);
+		// use old one
+		painter.addDrawingStrategy(AnnotationPreference.STYLE_PROBLEM_UNDERLINE, new AnnotationPainter.SquigglesStrategy());
+		return painter;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
new file mode 100644
index 0000000..3d0285d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
@@ -0,0 +1,3591 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.ResourceBundle;
+import java.util.Set;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.AbstractInformationControlManager;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IBlockTextSelection;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ISelectionValidator;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextOperationTarget;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension;
+import org.eclipse.jface.text.ITextViewerExtension2;
+import org.eclipse.jface.text.ITextViewerExtension5;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.information.IInformationPresenter;
+import org.eclipse.jface.text.information.IInformationProvider;
+import org.eclipse.jface.text.information.InformationPresenter;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.DefaultCharacterPairMatcher;
+import org.eclipse.jface.text.source.ICharacterPairMatcher;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.LineChangeHover;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.jface.text.source.projection.ProjectionSupport;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ILabelProvider;
+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.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.custom.VerifyKeyListener;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTarget;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorActionBarContributor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.contexts.IContextService;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.editors.text.ITextEditorHelpContextIds;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
+import org.eclipse.ui.part.IShowInTargetList;
+import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
+import org.eclipse.ui.texteditor.ChainedPreferenceStore;
+import org.eclipse.ui.texteditor.DefaultRangeIndicator;
+import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.IStatusField;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+import org.eclipse.ui.texteditor.ITextEditorExtension;
+import org.eclipse.ui.texteditor.ITextEditorExtension2;
+import org.eclipse.ui.texteditor.ITextEditorExtension3;
+import org.eclipse.ui.texteditor.ITextEditorExtension4;
+import org.eclipse.ui.texteditor.ITextEditorExtension5;
+import org.eclipse.ui.texteditor.IUpdate;
+import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
+import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;
+import org.eclipse.ui.texteditor.TextOperationAction;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector;
+import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento;
+import org.eclipse.wst.sse.core.internal.provisional.IModelStateListener;
+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.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.text.IExecutionDelegatable;
+import org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager;
+import org.eclipse.wst.sse.core.utils.StringUtils;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+import org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder;
+import org.eclipse.wst.sse.ui.internal.ExtendedEditorDropTargetAdapter;
+import org.eclipse.wst.sse.ui.internal.IExtendedContributor;
+import org.eclipse.wst.sse.ui.internal.IModelProvider;
+import org.eclipse.wst.sse.ui.internal.IPopupMenuContributor;
+import org.eclipse.wst.sse.ui.internal.IStructuredTextEditorActionConstants;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.ReadOnlyAwareDropTargetAdapter;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.StorageModelProvider;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+import org.eclipse.wst.sse.ui.internal.UnknownContentTypeDialog;
+import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;
+import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.sse.ui.internal.contentoutline.ConfigurableContentOutlinePage;
+import org.eclipse.wst.sse.ui.internal.debug.BreakpointRulerAction;
+import org.eclipse.wst.sse.ui.internal.debug.EditBreakpointAction;
+import org.eclipse.wst.sse.ui.internal.debug.ManageBreakpointAction;
+import org.eclipse.wst.sse.ui.internal.debug.ToggleBreakpointAction;
+import org.eclipse.wst.sse.ui.internal.debug.ToggleBreakpointsTarget;
+import org.eclipse.wst.sse.ui.internal.derived.HTMLTextPresenter;
+import org.eclipse.wst.sse.ui.internal.editor.EditorModelUtil;
+import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
+import org.eclipse.wst.sse.ui.internal.editor.SelectionConvertor;
+import org.eclipse.wst.sse.ui.internal.editor.StructuredModelDocumentProvider;
+import org.eclipse.wst.sse.ui.internal.extension.BreakpointProviderBuilder;
+import org.eclipse.wst.sse.ui.internal.hyperlink.OpenHyperlinkAction;
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+import org.eclipse.wst.sse.ui.internal.projection.AbstractStructuredFoldingStrategy;
+import org.eclipse.wst.sse.ui.internal.properties.ConfigurablePropertySheetPage;
+import org.eclipse.wst.sse.ui.internal.properties.ShowPropertiesAction;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ConfigurationPointCalculator;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.NullSourceEditingTextTools;
+import org.eclipse.wst.sse.ui.internal.provisional.preferences.CommonEditorPreferenceNames;
+import org.eclipse.wst.sse.ui.internal.quickoutline.QuickOutlineHandler;
+import org.eclipse.wst.sse.ui.internal.quickoutline.QuickOutlinePopupDialog;
+import org.eclipse.wst.sse.ui.internal.reconcile.DocumentRegionProcessor;
+import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory;
+import org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingManager;
+import org.eclipse.wst.sse.ui.internal.text.DocumentRegionEdgeMatcher;
+import org.eclipse.wst.sse.ui.internal.text.SourceInfoProvider;
+import org.eclipse.wst.sse.ui.internal.util.Assert;
+import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
+import org.eclipse.wst.sse.ui.quickoutline.AbstractQuickOutlineConfiguration;
+import org.eclipse.wst.sse.ui.reconcile.ISourceReconcilingListener;
+import org.eclipse.wst.sse.ui.typing.AbstractCharacterPairInserter;
+import org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration;
+import org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration;
+
+/**
+ * A Text Editor for editing structured models and structured documents.
+ * <p>
+ * This class is not meant to be subclassed.<br />
+ * New content types may associate source viewer, content outline, and
+ * property sheet configurations to extend the existing functionality.
+ * </p>
+ * 
+ * @see org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration
+ * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration
+ * @see org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration
+ * 
+ * @since 1.0
+ */
+
+public class StructuredTextEditor extends TextEditor {
+	private class GotoMatchingBracketHandler extends AbstractHandler {
+		public Object execute(ExecutionEvent arg0) throws ExecutionException {
+			gotoMatchingBracket();
+			return null;
+		}
+	}
+
+	private class InternalModelStateListener implements IModelStateListener {
+		public void modelAboutToBeChanged(IStructuredModel model) {
+			if (getTextViewer() != null) {
+				// getTextViewer().setRedraw(false);
+			}
+		}
+
+		public void modelAboutToBeReinitialized(IStructuredModel structuredModel) {
+			if (getTextViewer() != null) {
+				// getTextViewer().setRedraw(false);
+				getTextViewer().unconfigure();
+				setStatusLineMessage(null);
+			}
+		}
+
+		public void modelChanged(IStructuredModel model) {
+			if (getSourceViewer() != null) {
+				// getTextViewer().setRedraw(true);
+				// Since the model can be changed on a background
+				// thread, we will update menus on display thread,
+				// if we are not already on display thread,
+				// and if there is not an update already pending.
+				// (we can get lots of 'modelChanged' events in rapid
+				// succession, so only need to do one.
+				if (!fUpdateMenuTextPending) {
+					runOnDisplayThreadIfNeededed(new Runnable() {
+						public void run() {
+							updateMenuText();
+							fUpdateMenuTextPending = false;
+						}
+					});
+				}
+
+			}
+		}
+
+		public void modelDirtyStateChanged(IStructuredModel model, boolean isDirty) {
+			// do nothing
+		}
+
+		public void modelReinitialized(IStructuredModel structuredModel) {
+			try {
+				if (getSourceViewer() != null) {
+					SourceViewerConfiguration cfg = getSourceViewerConfiguration();
+					getSourceViewer().configure(cfg);
+				}
+			}
+			catch (Exception e) {
+				// https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=1166
+				// investigate each error case post beta
+				Logger.logException("problem trying to configure after model change", e); //$NON-NLS-1$
+			}
+			finally {
+				// so we don't freeze workbench (eg. during page language or
+				// content type change)
+				((ITextViewerExtension) getSourceViewer()).setRedraw(true);
+				
+				IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getService(IWorkbenchSiteProgressService.class);
+				if (service != null) {
+					service.warnOfContentChange();
+				}
+			}
+		}
+
+		// Note: this one should probably be used to
+		// control viewer
+		// instead of viewer having its own listener
+		public void modelResourceDeleted(IStructuredModel model) {
+			// do nothing
+		}
+
+		public void modelResourceMoved(IStructuredModel originalmodel, IStructuredModel movedmodel) {
+			// do nothing
+		}
+
+		/**
+		 * This 'Runnable' should be very brief, and should not "call out" to
+		 * other code especially if it depends on the state of the model.
+		 * 
+		 * @param r
+		 */
+		private void runOnDisplayThreadIfNeededed(Runnable r) {
+			// if there is no Display at all (that is, running headless),
+			// or if we are already running on the display thread, then
+			// simply execute the runnable.
+			if (getDisplay() == null || (Thread.currentThread() == getDisplay().getThread())) {
+				r.run();
+			}
+			else {
+				// otherwise force the runnable to run on the display thread.
+				getDisplay().asyncExec(r);
+			}
+		}
+	}
+	
+	/**
+	 * Listens to double-click and selection from the outline page
+	 */
+	private class OutlinePageListener implements IDoubleClickListener, ISelectionChangedListener {
+		public void doubleClick(DoubleClickEvent event) {
+			if (event.getSelection().isEmpty())
+				return;
+
+			int start = -1;
+			int length = 0;
+			if (event.getSelection() instanceof IStructuredSelection) {
+				ISelection currentSelection = getSelectionProvider().getSelection();
+				if (currentSelection instanceof IStructuredSelection) {
+					Object current = ((IStructuredSelection) currentSelection).toArray();
+					Object newSelection = ((IStructuredSelection) event.getSelection()).toArray();
+					if (!current.equals(newSelection)) {
+						IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+						Object o = selection.getFirstElement();
+						if (o instanceof IndexedRegion) {
+							start = ((IndexedRegion) o).getStartOffset();
+							length = ((IndexedRegion) o).getEndOffset() - start;
+						}
+						else if (o instanceof ITextRegion) {
+							start = ((ITextRegion) o).getStart();
+							length = ((ITextRegion) o).getEnd() - start;
+						}
+						else if (o instanceof IRegion) {
+							start = ((ITextRegion) o).getStart();
+							length = ((ITextRegion) o).getLength();
+						}
+					}
+				}
+			}
+			else if (event.getSelection() instanceof ITextSelection) {
+				start = ((ITextSelection) event.getSelection()).getOffset();
+				length = ((ITextSelection) event.getSelection()).getLength();
+			}
+			if (start > -1) {
+				getSourceViewer().setRangeIndication(start, length, false);
+				selectAndReveal(start, length);
+			}
+		}
+
+		public void selectionChanged(SelectionChangedEvent event) {
+			/*
+			 * Do not allow selection from other parts to affect selection in
+			 * the text widget if it has focus, or if we're still firing a
+			 * change of selection. Selection events "bouncing" off of other
+			 * parts are all that we can receive if we have focus (since we
+			 * forwarded our selection to the service just a moment ago), and
+			 * only the user should affect selection if we have focus.
+			 */
+
+			/* The isFiringSelection check only works if a selection listener */
+			if (event.getSelection().isEmpty() || fStructuredSelectionProvider.isFiringSelection())
+				return;
+
+			if (getSourceViewer() != null && getSourceViewer().getTextWidget() != null && !getSourceViewer().getTextWidget().isDisposed() && !getSourceViewer().getTextWidget().isFocusControl()) {
+				int start = -1;
+				int length = 0;
+				if (event.getSelection() instanceof IStructuredSelection) {
+					ISelection current = getSelectionProvider().getSelection();
+					if (current instanceof IStructuredSelection) {
+						Object[] currentSelection = ((IStructuredSelection) current).toArray();
+						Object[] newSelection = ((IStructuredSelection) event.getSelection()).toArray();
+						if (!Arrays.equals(currentSelection, newSelection)) {
+							if (newSelection.length > 0) {
+								/*
+								 * No ordering is guaranteed for multiple
+								 * selection
+								 */
+								Object o = newSelection[0];
+								if (o instanceof IndexedRegion) {
+									start = ((IndexedRegion) o).getStartOffset();
+									int end = ((IndexedRegion) o).getEndOffset();
+									if (newSelection.length > 1) {
+										for (int i = 1; i < newSelection.length; i++) {
+											start = Math.min(start, ((IndexedRegion) newSelection[i]).getStartOffset());
+											end = Math.max(end, ((IndexedRegion) newSelection[i]).getEndOffset());
+										}
+										length = end - start;
+									}
+								}
+								else if (o instanceof ITextRegion) {
+									start = ((ITextRegion) o).getStart();
+									int end = ((ITextRegion) o).getEnd();
+									if (newSelection.length > 1) {
+										for (int i = 1; i < newSelection.length; i++) {
+											start = Math.min(start, ((ITextRegion) newSelection[i]).getStart());
+											end = Math.max(end, ((ITextRegion) newSelection[i]).getEnd());
+										}
+										length = end - start;
+									}
+								}
+								else if (o instanceof IRegion) {
+									start = ((IRegion) o).getOffset();
+									int end = start + ((IRegion) o).getLength();
+									if (newSelection.length > 1) {
+										for (int i = 1; i < newSelection.length; i++) {
+											start = Math.min(start, ((IRegion) newSelection[i]).getOffset());
+											end = Math.max(end, ((IRegion) newSelection[i]).getOffset() + ((IRegion) newSelection[i]).getLength());
+										}
+										length = end - start;
+									}
+								}
+							}
+						}
+					}
+				}
+				else if (event.getSelection() instanceof ITextSelection) {
+					start = ((ITextSelection) event.getSelection()).getOffset();
+				}
+				if (start > -1) {
+					updateRangeIndication(event.getSelection());
+					selectAndReveal(start, length);
+				}
+			}
+		}
+	}
+
+	private class ShowInTargetListAdapter implements IShowInTargetList {
+		/**
+		 * Array of ID Strings that define the default show in targets for
+		 * this editor.
+		 * 
+		 * @see org.eclipse.ui.part.IShowInTargetList#getShowInTargetIds()
+		 * @return the array of ID Strings that define the default show in
+		 *         targets for this editor.
+		 */
+		public String[] getShowInTargetIds() {
+			return fShowInTargetIds;
+		}
+	}
+
+	/**
+	 * A post selection provider that wraps the provider implemented in
+	 * AbstractTextEditor to provide a StructuredTextSelection to post
+	 * selection listeners. Listens to selection changes from the source
+	 * viewer.
+	 */
+	private static class StructuredSelectionProvider implements IPostSelectionProvider, ISelectionValidator {
+		/**
+		 * A "hybrid" text and structured selection class containing the text
+		 * selection and a list of selected model objects. The determination
+		 * of which model objects matches the text selection is responsibility
+		 * of the StructuredSelectionProvider which created this selection
+		 * object.
+		 */
+		private static class StructuredTextSelection extends TextSelection implements IStructuredSelection {
+			private Object[] selectedStructured;
+
+			StructuredTextSelection(IDocument document, int offset, int length, Object[] selectedObjects) {
+				super(document, offset, length);
+				selectedStructured = selectedObjects;
+			}
+
+			StructuredTextSelection(IDocument document, ITextSelection selection, Object[] selectedObjects) {
+				this(document, selection.getOffset(), selection.getLength(), selectedObjects);
+			}
+
+			public Object getFirstElement() {
+				Object[] selectedStructures = getSelectedStructures();
+				return selectedStructures.length > 0 ? selectedStructures[0] : null;
+			}
+
+			private Object[] getSelectedStructures() {
+				return (selectedStructured != null) ? selectedStructured : new Object[0];
+			}
+
+			public boolean isEmpty() {
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=191327
+				return super.isEmpty() || getSelectedStructures().length == 0;
+			}
+
+			public Iterator iterator() {
+				return toList().iterator();
+			}
+
+			public int size() {
+				return (selectedStructured != null) ? selectedStructured.length : 0;
+			}
+
+			public Object[] toArray() {
+				return getSelectedStructures();
+			}
+
+			public List toList() {
+				return Arrays.asList(getSelectedStructures());
+			}
+
+			public String toString() {
+				return getOffset() + ":" + getLength() + "@" + getSelectedStructures(); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+		
+		private ISelectionProvider fParentProvider = null;
+		private boolean isFiringSelection = false;
+		private ListenerList listeners = new ListenerList();
+		private ListenerList postListeners = new ListenerList();
+		private ISelection fLastSelection = null;
+		private ISelectionProvider fLastSelectionProvider = null;
+		private SelectionChangedEvent fLastUpdatedSelectionChangedEvent = null;
+		private StructuredTextEditor fEditor;
+		/*
+		 * Responsible for finding the selected objects within a text
+		 * selection. Set/reset by the StructuredTextEditor based on a
+		 * per-model adapter on input.
+		 */
+		SelectionConvertor selectionConvertor = new SelectionConvertor();
+		
+		StructuredSelectionProvider(ISelectionProvider parentProvider, StructuredTextEditor structuredTextEditor) {
+			fParentProvider = parentProvider;
+			fEditor = structuredTextEditor;
+			fParentProvider.addSelectionChangedListener(new ISelectionChangedListener() {
+				public void selectionChanged(SelectionChangedEvent event) {
+					handleSelectionChanged(event);
+				}
+			});
+			if (fParentProvider instanceof IPostSelectionProvider) {
+				((IPostSelectionProvider) fParentProvider).addPostSelectionChangedListener(new ISelectionChangedListener() {
+					public void selectionChanged(SelectionChangedEvent event) {
+						handlePostSelectionChanged(event);
+					}
+				});
+			}
+		}
+
+		public void addPostSelectionChangedListener(ISelectionChangedListener listener) {
+			postListeners.add(listener);
+		}
+
+		public void addSelectionChangedListener(ISelectionChangedListener listener) {
+			listeners.add(listener);
+		}
+
+		public void dispose() {
+			fEditor = null;
+			listeners.clear();
+			postListeners.clear();
+			selectionConvertor = null;
+		}
+
+		private void fireSelectionChanged(final SelectionChangedEvent event, ListenerList listenerList) {
+			Object[] listeners = listenerList.getListeners();
+			isFiringSelection = true;
+			for (int i = 0; i < listeners.length; ++i) {
+				final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
+				SafeRunner.run(new SafeRunnable() {
+					public void run() {
+						l.selectionChanged(event);
+					}
+				});
+			}
+			isFiringSelection = false;
+		}
+
+		private ISelectionProvider getParentProvider() {
+			return fParentProvider;
+		}
+
+		public ISelection getSelection() {
+			fLastSelection = null;
+			fLastSelectionProvider = null;
+			fLastUpdatedSelectionChangedEvent = null;
+
+			/*
+			 * When a client explicitly asks for selection, provide the hybrid
+			 * result.
+			 */
+			ISelection selection = getParentProvider().getSelection();
+			if (!(selection instanceof IStructuredSelection) && selection instanceof ITextSelection) {
+				IStructuredModel structuredModel = null;
+				StructuredTextEditor localEditor = getStructuredTextEditor();
+				if (localEditor != null) {
+					structuredModel = localEditor.getInternalModel();
+					if (structuredModel != null) {
+						if (localEditor.isBlockSelectionModeEnabled()) {
+							/*
+							 * Block selection handling - find the overlapping
+							 * objects on each line, keeping in mind that the
+							 * selected block may not overlap actual lines or
+							 * columns of the document.
+							 * IBlockTextSelection.getRegions() should handle
+							 * that for us...
+							 */
+							IBlockTextSelection blockSelection = (IBlockTextSelection) selection;
+							IRegion[] regions = blockSelection.getRegions();
+							Set blockObjects = new LinkedHashSet();
+							for (int i = 0; i < regions.length; i++) {
+								Object[] objects = selectionConvertor.getElements(structuredModel, regions[i].getOffset(), regions[i].getLength());
+								for (int j = 0; j < objects.length; j++) {
+									blockObjects.add(objects[j]);
+								}
+							}
+							selection = new StructuredTextSelection(getDocument(), (ITextSelection) selection, blockObjects.toArray());
+						}
+						else {
+							int start = ((ITextSelection) selection).getOffset();
+							int end = start + ((ITextSelection) selection).getLength();
+							selection = new StructuredTextSelection(getDocument(), (ITextSelection) selection, selectionConvertor.getElements(structuredModel, start, end));
+						}
+					}
+				}
+				if (selection == null) {
+					selection = new StructuredTextSelection(getDocument(), (ITextSelection) selection, new Object[0]);
+				}
+			}
+			
+			return selection;
+		}
+
+		private StructuredTextEditor getStructuredTextEditor() {
+			return fEditor;
+		}
+
+		void handlePostSelectionChanged(SelectionChangedEvent event) {
+			SelectionChangedEvent updatedEvent = null;
+			if (fLastSelection == event.getSelection() && fLastSelectionProvider == event.getSelectionProvider()) {
+				updatedEvent = fLastUpdatedSelectionChangedEvent;
+			}
+			else {
+				updatedEvent = updateEvent(event);
+			}
+			// only update the range indicator on post selection
+			StructuredTextEditor localEditor = fEditor;
+
+			if (localEditor != null) {
+				localEditor.updateRangeIndication(updatedEvent.getSelection());
+				fireSelectionChanged(updatedEvent, postListeners);
+			}
+		}
+
+		void handleSelectionChanged(SelectionChangedEvent event) {
+			SelectionChangedEvent updatedEvent = event;
+			if (fLastSelection != event.getSelection() || fLastSelectionProvider != event.getSelectionProvider()) {
+				fLastSelection = event.getSelection();
+				fLastSelectionProvider = event.getSelectionProvider();
+				fLastUpdatedSelectionChangedEvent = updatedEvent = updateEvent(event);
+			}
+			fireSelectionChanged(updatedEvent, listeners);
+		}
+
+		IDocument getDocument() {
+			return fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
+		}
+
+
+		boolean isFiringSelection() {
+			return isFiringSelection;
+		}
+
+		public boolean isValid(ISelection selection) {
+			// ISSUE: is not clear default behavior should be true?
+			// But not clear is this default would apply for our editor.
+			boolean result = true;
+			// if editor is "gone", can not be valid
+			StructuredTextEditor e = getStructuredTextEditor();
+			if (e == null || e.fEditorDisposed) {
+				result = false;
+			}
+			// else defer to parent
+			else if (getParentProvider() instanceof ISelectionValidator) {
+				result = ((ISelectionValidator) getParentProvider()).isValid(selection);
+			}
+			return result;
+		}
+
+		public void removePostSelectionChangedListener(ISelectionChangedListener listener) {
+			postListeners.remove(listener);
+		}
+
+		public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+			listeners.remove(listener);
+		}
+
+		public void setSelection(ISelection selection) {
+			if (isFiringSelection()) {
+				return;
+			}
+
+			fLastSelection = null;
+			fLastSelectionProvider = null;
+			fLastUpdatedSelectionChangedEvent = null;
+
+			ISelection textSelection = updateSelection(selection);
+			getParentProvider().setSelection(textSelection);
+			StructuredTextEditor localEditor = getStructuredTextEditor();
+			if (localEditor != null) {
+				localEditor.updateRangeIndication(textSelection);
+			}
+		}
+
+		/**
+		 * Create a corresponding event that contains a
+		 * StructuredTextselection
+		 * 
+		 * @param event
+		 * @return
+		 */
+		private SelectionChangedEvent updateEvent(SelectionChangedEvent event) {
+			ISelection selection = event.getSelection();
+			if (selection instanceof ITextSelection && !(selection instanceof IStructuredSelection)) {
+				IStructuredModel structuredModel = null;
+				StructuredTextEditor localEditor = getStructuredTextEditor();
+				if (localEditor != null) {
+					structuredModel = localEditor.getInternalModel();
+					if (structuredModel != null) {
+						int start = ((ITextSelection) selection).getOffset();
+						int end = start + ((ITextSelection) selection).getLength();
+						selection = new StructuredTextSelection(getDocument(), (ITextSelection) event.getSelection(), selectionConvertor.getElements(structuredModel, start, end));
+					}
+				}
+				if (selection == null)
+					selection = new StructuredTextSelection(getDocument(), (ITextSelection) event.getSelection(), new Object[0]);
+			}
+			SelectionChangedEvent newEvent = new SelectionChangedEvent(event.getSelectionProvider(), selection);
+			return newEvent;
+		}
+
+		/**
+		 * Create a corresponding StructuredTextselection
+		 * 
+		 * @param selection
+		 * @return
+		 */
+		private ISelection updateSelection(ISelection selection) {
+			ISelection updated = selection;
+			if (selection instanceof IStructuredSelection && !(selection instanceof ITextSelection) && !selection.isEmpty()) {
+				Object[] selectedObjects = ((IStructuredSelection) selection).toArray();
+				if (selectedObjects.length > 0) {
+					int start = -1;
+					int length = 0;
+
+					// no ordering is guaranteed for multiple selection
+					Object o = selectedObjects[0];
+					if (o instanceof IndexedRegion) {
+						start = ((IndexedRegion) o).getStartOffset();
+						int end = ((IndexedRegion) o).getEndOffset();
+						if (selectedObjects.length > 1) {
+							for (int i = 1; i < selectedObjects.length; i++) {
+								start = Math.min(start, ((IndexedRegion) selectedObjects[i]).getStartOffset());
+								end = Math.max(end, ((IndexedRegion) selectedObjects[i]).getEndOffset());
+							}
+							length = end - start;
+						}
+					}
+					else if (o instanceof ITextRegion) {
+						start = ((ITextRegion) o).getStart();
+						int end = ((ITextRegion) o).getEnd();
+						if (selectedObjects.length > 1) {
+							for (int i = 1; i < selectedObjects.length; i++) {
+								start = Math.min(start, ((ITextRegion) selectedObjects[i]).getStart());
+								end = Math.max(end, ((ITextRegion) selectedObjects[i]).getEnd());
+							}
+							length = end - start;
+						}
+					}
+
+					if (start > -1) {
+						updated = new StructuredTextSelection(getDocument(), start, length, selectedObjects);
+					}
+				}
+			}
+			return updated;
+		}
+	}
+
+	class TimeOutExpired extends TimerTask {
+		public void run() {
+			getDisplay().syncExec(new Runnable() {
+				public void run() {
+					if (getDisplay() != null && !getDisplay().isDisposed())
+						endBusyStateInternal();
+				}
+			});
+		}
+
+	}
+
+	private class ConfigurationAndTarget {
+		private String fTargetId;
+		private StructuredTextViewerConfiguration fConfiguration;
+
+		public ConfigurationAndTarget(String targetId, StructuredTextViewerConfiguration config) {
+			fTargetId = targetId;
+			fConfiguration = config;
+		}
+
+		public String getTargetId() {
+			return fTargetId;
+		}
+
+		public StructuredTextViewerConfiguration getConfiguration() {
+			return fConfiguration;
+		}
+	}
+
+	private class CharacterPairListener implements VerifyKeyListener {
+		private CharacterPairing[] fInserters = new CharacterPairing[0];
+
+		/**
+		 * Add the pairing to the list of inserters
+		 * @param pairing
+		 */
+		void addInserter(CharacterPairing pairing) {
+			List pairings = new ArrayList(Arrays.asList(fInserters));
+			pairings.add(pairing);
+			fInserters = (CharacterPairing[]) pairings.toArray(new CharacterPairing[pairings.size()]);
+		}
+
+		void prioritize() {
+			Arrays.sort(fInserters);
+		}
+
+		/**
+		 * Perform cleanup on the character pair inserters
+		 */
+		void dispose() {
+			for (int i = 0; i < fInserters.length; i++) {
+				final AbstractCharacterPairInserter inserter = fInserters[i].inserter;
+				SafeRunner.run(new ISafeRunnable() {
+					public void handleException(Throwable exception) {
+						// rely on default logging
+					}
+
+					public void run() throws Exception {
+						inserter.dispose();
+					}
+				});
+			}
+		}
+
+		public void verifyKey(final VerifyEvent event) {
+			if (!event.doit || getInsertMode() != SMART_INSERT || isBlockSelectionModeEnabled() && isMultilineSelection())
+				return;
+			final boolean[] paired = { false };
+			for (int i = 0; i < fInserters.length; i++) {
+				final CharacterPairing pairing = fInserters[i];
+				// use a SafeRunner -- this is a critical function (typing)
+				SafeRunner.run(new ISafeRunnable() {
+					public void run() throws Exception {
+						final AbstractCharacterPairInserter inserter = pairing.inserter;
+						if (inserter.hasPair(event.character)) {
+							if (pair(event, inserter, pairing.partitions))
+								paired[0] = true;
+						}
+					}
+
+					public void handleException(Throwable exception) {
+						// rely on default logging
+					}
+				});
+				if (paired[0])
+					return;
+			}
+		}
+
+		private boolean pair(VerifyEvent event, AbstractCharacterPairInserter inserter, Set partitions) {
+			final ISourceViewer viewer = getSourceViewer();
+			final IDocument document = getSourceViewer().getDocument();
+			if (document != null) {
+				try {
+					final Point selection = viewer.getSelectedRange();
+					final int offset = selection.x;
+					final ITypedRegion partition = document.getPartition(offset);
+					if (partitions.contains(partition.getType())) {
+						// Don't modify if the editor input cannot be changed
+						if (!validateEditorInputState())
+							return false;
+						event.doit = !inserter.pair(viewer, event.character);
+						return true;
+					}
+				} catch (BadLocationException e) {
+				}
+			}
+			return false;
+		}
+
+		private boolean isMultilineSelection() {
+			ISelection selection = getSelectionProvider().getSelection();
+			if (selection instanceof ITextSelection) {
+				ITextSelection ts = (ITextSelection) selection;
+				return ts.getStartLine() != ts.getEndLine();
+			}
+			return false;
+		}
+	}
+
+	/**
+	 * Representation of a character pairing that includes its priority based on
+	 * its content type and how close it is to the content type of the file
+	 * in the editor.
+	 */
+	private class CharacterPairing implements Comparable {
+		int priority;
+		AbstractCharacterPairInserter inserter;
+		Set partitions;
+		public int compareTo(Object o) {
+			if (o == this)
+				return 0;
+			return this.priority - ((CharacterPairing) o).priority;
+		}
+	}
+	
+	private class PartListener implements IPartListener {
+
+		private ITextEditor fEditor;
+
+		public PartListener(ITextEditor editor) {
+			fEditor = editor;
+		}
+
+		public void partActivated(IWorkbenchPart part) {
+			if (part.getAdapter(ITextEditor.class) == fEditor) {
+				IReconciler reconciler = getSourceViewerConfiguration().getReconciler(getSourceViewer());
+				if (reconciler instanceof DocumentRegionProcessor) {
+					((DocumentRegionProcessor) reconciler).forceReconciling();
+				}
+			}
+		}
+
+		public void partBroughtToTop(IWorkbenchPart part) {
+		}
+
+		public void partClosed(IWorkbenchPart part) {
+		}
+
+		public void partDeactivated(IWorkbenchPart part) {
+		}
+
+		public void partOpened(IWorkbenchPart part) {
+		}
+		
+	}
+
+	/**
+	 * Not API. May be removed in the future.
+	 */
+	protected final static char[] BRACKETS = {'{', '}', '(', ')', '[', ']'};
+
+	private static final long BUSY_STATE_DELAY = 1000;
+	/**
+	 * Not API. May be removed in the future.
+	 */
+	protected static final String DOT = "."; //$NON-NLS-1$
+	private static final String EDITOR_CONTEXT_MENU_ID = "org.eclipse.wst.sse.ui.StructuredTextEditor.EditorContext"; //$NON-NLS-1$
+	private static final String EDITOR_CONTEXT_MENU_SUFFIX = ".source.EditorContext"; //$NON-NLS-1$
+
+	/** Non-NLS strings */
+	private static final String EDITOR_KEYBINDING_SCOPE_ID = "org.eclipse.wst.sse.ui.structuredTextEditorScope"; //$NON-NLS-1$
+	/**
+	 * Not API. May be removed in the future.
+	 */
+	public static final String GROUP_NAME_ADDITIONS = IWorkbenchActionConstants.MB_ADDITIONS; //$NON-NLS-1$
+
+	private static final String REDO_ACTION_DESC = SSEUIMessages.Redo___0___UI_; //$NON-NLS-1$ = "Redo: {0}."
+	private static final String REDO_ACTION_DESC_DEFAULT = SSEUIMessages.Redo_Text_Change__UI_; //$NON-NLS-1$ = "Redo Text Change."
+	private static final String REDO_ACTION_TEXT = SSEUIMessages._Redo__0___Ctrl_Y_UI_; //$NON-NLS-1$ = "&Redo {0} @Ctrl+Y"
+	private static final String REDO_ACTION_TEXT_DEFAULT = SSEUIMessages._Redo_Text_Change__Ctrl_Y_UI_; //$NON-NLS-1$ = "&Redo Text Change @Ctrl+Y"
+	private static final String RULER_CONTEXT_MENU_ID = "org.eclipse.wst.sse.ui.StructuredTextEditor.RulerContext"; //$NON-NLS-1$
+	private static final String RULER_CONTEXT_MENU_SUFFIX = ".source.RulerContext"; //$NON-NLS-1$
+
+	private final static String UNDERSCORE = "_"; //$NON-NLS-1$
+	/** Translatable strings */
+	private static final String UNDO_ACTION_DESC = SSEUIMessages.Undo___0___UI_; //$NON-NLS-1$ = "Undo: {0}."
+
+	private static final String UNDO_ACTION_DESC_DEFAULT = SSEUIMessages.Undo_Text_Change__UI_; //$NON-NLS-1$ = "Undo Text Change."
+	private static final String UNDO_ACTION_TEXT = SSEUIMessages._Undo__0___Ctrl_Z_UI_; //$NON-NLS-1$ = "&Undo {0} @Ctrl+Z"
+	private static final String UNDO_ACTION_TEXT_DEFAULT = SSEUIMessages._Undo_Text_Change__Ctrl_Z_UI_; //$NON-NLS-1$ = "&Undo Text Change @Ctrl+Z"
+	// development time/debug variables only
+	private int adapterRequests;
+
+	private long adapterTime;
+	private boolean fBackgroundJobEnded;
+	private boolean fBusyState;
+	private Timer fBusyTimer;
+	boolean fDirtyBeforeDocumentEvent = false;
+	int validateEditCount = 0;
+	private ExtendedEditorDropTargetAdapter fDropAdapter;
+	private DropTarget fDropTarget;
+	boolean fEditorDisposed = false;
+	private IEditorPart fEditorPart;
+	private InternalModelStateListener fInternalModelStateListener;
+	private IContentOutlinePage fOutlinePage;
+
+	private OutlinePageListener fOutlinePageListener = null;
+	/** This editor's projection support */
+	private ProjectionSupport fProjectionSupport;
+	private IPropertySheetPage fPropertySheetPage;
+
+	private ISourceReconcilingListener[] fReconcilingListeners = new ISourceReconcilingListener[0]; 
+	private IPartListener fPartListener;
+
+	private String fRememberTitle;
+	/** The ruler context menu to be disposed. */
+	private Menu fRulerContextMenu;
+	/** The ruler context menu manager to be disposed. */
+	private MenuManager fRulerContextMenuManager;
+
+	String[] fShowInTargetIds = new String[]{IPageLayout.ID_RES_NAV, IPageLayout.ID_PROJECT_EXPLORER, IPageLayout.ID_OUTLINE};
+
+	private IAction fShowPropertiesAction = null;
+	private IStructuredModel fStructuredModel;
+	StructuredSelectionProvider fStructuredSelectionProvider = null;
+	/** The text context menu to be disposed. */
+	private Menu fTextContextMenu;
+	/** The text context menu manager to be disposed. */
+	private MenuManager fTextContextMenuManager;
+	private String fViewerConfigurationTargetId;
+	/** The selection history of the editor */
+	private SelectionHistory fSelectionHistory;
+	/** The information presenter. */
+	private InformationPresenter fInformationPresenter;
+	private boolean fUpdateMenuTextPending;
+	/** The quick outline handler */
+	private QuickOutlineHandler fOutlineHandler;
+
+	private boolean shouldClose = false;
+	private long startPerfTime;
+	private boolean fisReleased;
+	/**
+	 * The action group for folding.
+	 */
+	private FoldingActionGroup fFoldingGroup;
+
+	private ILabelProvider fStatusLineLabelProvider;
+
+	private SemanticHighlightingManager fSemanticManager;
+	
+	private boolean fSelectionChangedFromGoto = false;
+
+	private final CharacterPairListener fPairInserter = new CharacterPairListener();
+
+	/**
+	 * Creates a new Structured Text Editor.
+	 */
+	public StructuredTextEditor() {
+		super();
+		initializeDocumentProvider(null);
+	}
+
+	private IStructuredModel aboutToSaveModel() {
+		IStructuredModel model = getInternalModel();
+		if (model != null) {
+			model.aboutToChangeModel();
+		}
+		return model;
+	}
+
+	protected void addSourceMenuActions(IMenuManager menu) {
+		IMenuManager subMenu= new MenuManager(SSEUIMessages.SourceMenu_label, IStructuredTextEditorActionConstants.SOURCE_CONTEXT_MENU_ID);
+		subMenu.add(new Separator(IStructuredTextEditorActionConstants.SOURCE_BEGIN));
+		subMenu.add(new Separator(IStructuredTextEditorActionConstants.SOURCE_ADDITIONS));
+		subMenu.add(new Separator(IStructuredTextEditorActionConstants.SOURCE_END));
+		menu.appendToGroup(ITextEditorActionConstants.GROUP_EDIT, subMenu);
+	}
+
+	protected void addRefactorMenuActions(IMenuManager menu) {
+		IMenuManager subMenu = new MenuManager(SSEUIMessages.RefactorMenu_label, IStructuredTextEditorActionConstants.REFACTOR_CONTEXT_MENU_ID);
+		menu.appendToGroup(ITextEditorActionConstants.GROUP_EDIT, subMenu);
+	}
+
+	protected void addContextMenuActions(IMenuManager menu) {
+		// Only offer actions that affect the text if the viewer allows
+		// modification and supports any of these operations
+
+		// Some Design editors (DTD) rely on this view for their own uses
+		menu.appendToGroup(IWorkbenchActionConstants.GROUP_ADD, fShowPropertiesAction);
+	}
+
+	private void addExtendedContextMenuActions(IMenuManager menu) {
+		IEditorActionBarContributor c = getEditorSite().getActionBarContributor();
+		if (c instanceof IPopupMenuContributor) {
+			((IPopupMenuContributor) c).contributeToPopupMenu(menu);
+		}
+		else {
+			ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder();
+			IExtendedContributor pmc = builder.readActionExtensions(getConfigurationPoints());
+			if (pmc != null) {
+				pmc.setActiveEditor(this);
+				pmc.contributeToPopupMenu(menu);
+			}
+		}
+	}
+
+	protected void addExtendedRulerContextMenuActions(IMenuManager menu) {
+		// none at this level
+	}
+
+
+
+	/**
+	 * Starts background mode.
+	 * <p>
+	 * Not API. May be removed in the future.
+	 * </p>
+	 */
+	void beginBackgroundOperation() {
+		fBackgroundJobEnded = false;
+		// if already in busy state, no need to do anything
+		// and, we only start, or reset, the timed busy
+		// state when we get the "endBackgroundOperation" call.
+		if (!inBusyState()) {
+			beginBusyStateInternal();
+		}
+	}
+
+	private void beginBusyStateInternal() {
+
+		fBusyState = true;
+		startBusyTimer();
+
+		ISourceViewer viewer = getSourceViewer();
+		if (viewer instanceof StructuredTextViewer) {
+			((StructuredTextViewer) viewer).beginBackgroundUpdate();
+
+		}
+		showBusy(true);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.ITextEditor#close(boolean)
+	 */
+	public void close(final boolean save) {
+		/*
+		 * Instead of us closing directly, we have to close with our
+		 * containing (multipage) editor, if it exists.
+		 */
+		if (getSite() == null) {
+			// if site hasn't been set yet, then we're not
+			// completely open
+			// so set a flag not to open
+			shouldClose = true;
+		}
+		else {
+			if (getEditorPart() != null) {
+				Display display = getSite().getShell().getDisplay();
+				display.asyncExec(new Runnable() {
+
+					public void run() {
+						getSite().getPage().closeEditor(getEditorPart(), save);
+					}
+				});
+			}
+			else {
+				super.close(save);
+			}
+		}
+	}
+	
+	private void activateContexts(IContextService service) {
+		if(service == null)
+			return;
+		
+		String[] definitions = getDefinitions(getConfigurationPoints());
+		
+		if(definitions != null) {
+			String[] contexts = null;
+			for(int i = 0; i < definitions.length; i++) {
+				contexts = StringUtils.unpack(definitions[i]);
+				for(int j = 0; j < contexts.length; j++)
+					service.activateContext(contexts[j].trim());
+			}
+		}
+		
+	}
+	
+	private String[] getDefinitions(String[] ids) {
+		ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+		String[] definitions = null;
+		
+		/* Iterate through the configuration ids until one is found that has
+		 * an activecontexts definition
+		 */
+		for(int i = 0; i < ids.length; i++) {
+			definitions = builder.getDefinitions("activecontexts", ids[i]); //$NON-NLS-1$
+			if(definitions != null && definitions.length > 0)
+				return definitions;
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#collectContextMenuPreferencePages()
+	 */
+	protected String[] collectContextMenuPreferencePages() {
+		List allIds = new ArrayList(0);
+
+		// get contributed preference pages
+		ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+		String[] configurationIds = getConfigurationPoints();
+		for (int i = 0; i < configurationIds.length; i++) {
+			String[] definitions = builder.getDefinitions("preferencepages", configurationIds[i]); //$NON-NLS-1$
+			for (int j = 0; j < definitions.length; j++) {
+				String someIds = definitions[j];
+				if (someIds != null && someIds.length() > 0) {
+					// supports multiple comma-delimited page IDs in one
+					// element
+					String[] ids = StringUtils.unpack(someIds);
+					for (int k = 0; k < ids.length; k++) {
+						// trim, just to keep things clean
+						String id = ids[k].trim();
+						if (!allIds.contains(id)) {
+							allIds.add(id);
+						}
+					}
+				}
+			}
+		}
+
+		// add pages contributed by super
+		String[] superPages = super.collectContextMenuPreferencePages();
+		for (int m = 0; m < superPages.length; m++) {
+			// trim, just to keep things clean
+			String id = superPages[m].trim();
+			if (!allIds.contains(id)) {
+				allIds.add(id);
+			}
+		}
+
+		return (String[]) allIds.toArray(new String[0]);
+	}
+
+	/**
+	 * Compute and set double-click action for the vertical ruler
+	 */
+	private void computeAndSetDoubleClickAction() {
+		/*
+		 * Make double-clicking on the ruler toggle a breakpoint instead of
+		 * toggling a bookmark. For lines where a breakpoint won't be created,
+		 * create a bookmark through the contributed RulerDoubleClick action.
+		 */
+		setAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK, new ToggleBreakpointAction(this, getVerticalRuler(), getAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK)));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.ExtendedTextEditor#configureSourceViewerDecorationSupport(org.eclipse.ui.texteditor.SourceViewerDecorationSupport)
+	 */
+	protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
+		support.setCharacterPairMatcher(createCharacterPairMatcher());
+		support.setMatchingCharacterPainterPreferenceKeys(EditorPreferenceNames.MATCHING_BRACKETS, EditorPreferenceNames.MATCHING_BRACKETS_COLOR);
+
+		super.configureSourceViewerDecorationSupport(support);
+	}
+
+	protected void createActions() {
+		super.createActions();
+		ResourceBundle resourceBundle = SSEUIMessages.getResourceBundle();
+		IWorkbenchHelpSystem helpSystem = SSEUIPlugin.getDefault().getWorkbench().getHelpSystem();
+		// TextView Action - moving the selected text to
+		// the clipboard
+		// override the cut/paste/delete action to make
+		// them run on read-only
+		// files
+		Action action = new TextOperationAction(resourceBundle, "Editor_Cut_", this, ITextOperationTarget.CUT, true); //$NON-NLS-1$
+		action.setActionDefinitionId(IWorkbenchActionDefinitionIds.CUT);
+		setAction(ITextEditorActionConstants.CUT, action);
+		helpSystem.setHelp(action, IAbstractTextEditorHelpContextIds.CUT_ACTION);
+		// TextView Action - inserting the clipboard
+		// content at the current
+		// position
+		// override the cut/paste/delete action to make
+		// them run on read-only
+		// files
+		action = new TextOperationAction(resourceBundle, "Editor_Paste_", this, ITextOperationTarget.PASTE, true); //$NON-NLS-1$
+		action.setActionDefinitionId(IWorkbenchActionDefinitionIds.PASTE);
+		setAction(ITextEditorActionConstants.PASTE, action);
+		helpSystem.setHelp(action, IAbstractTextEditorHelpContextIds.PASTE_ACTION);
+		// TextView Action - deleting the selected text or
+		// if selection is
+		// empty the character at the right of the current
+		// position
+		// override the cut/paste/delete action to make
+		// them run on read-only
+		// files
+		action = new TextOperationAction(resourceBundle, "Editor_Delete_", this, ITextOperationTarget.DELETE, true); //$NON-NLS-1$
+		action.setActionDefinitionId(IWorkbenchActionDefinitionIds.DELETE);
+		setAction(ITextEditorActionConstants.DELETE, action);
+		helpSystem.setHelp(action, IAbstractTextEditorHelpContextIds.DELETE_ACTION);
+		// SourceView Action - requesting content assist to
+		// show completetion
+		// proposals for the current insert position
+		action = new TextOperationAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS + UNDERSCORE, this, ISourceViewer.CONTENTASSIST_PROPOSALS, true);
+		helpSystem.setHelp(action, IHelpContextIds.CONTMNU_CONTENTASSIST_HELPID);
+		action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+		setAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS, action);
+		markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS, true);
+		// SourceView Action - requesting content assist to
+		// show the content
+		// information for the current insert position
+		action = new TextOperationAction(SSEUIMessages.getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION + UNDERSCORE, this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);
+		action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
+		setAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION, action);
+		markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION, true);
+		// StructuredTextViewer Action - requesting format
+		// of the whole
+		// document
+		action = new TextOperationAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT + UNDERSCORE, this, StructuredTextViewer.FORMAT_DOCUMENT);
+		helpSystem.setHelp(action, IHelpContextIds.CONTMNU_FORMAT_DOC_HELPID);
+		action.setActionDefinitionId(ActionDefinitionIds.FORMAT_DOCUMENT);
+		setAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT, action);
+		markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT, true);
+		markAsSelectionDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT, true);
+		// StructuredTextViewer Action - requesting format
+		// of the active
+		// elements
+		action = new TextOperationAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS + UNDERSCORE, this, StructuredTextViewer.FORMAT_ACTIVE_ELEMENTS);
+		helpSystem.setHelp(action, IHelpContextIds.CONTMNU_FORMAT_ELEMENTS_HELPID);
+		action.setActionDefinitionId(ActionDefinitionIds.FORMAT_ACTIVE_ELEMENTS);
+		setAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS, action);
+		markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS, true);
+		markAsSelectionDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS, true);
+
+		// StructuredTextEditor Action - add breakpoints (falling back to the
+		// current double-click if they can't be added)
+		action = new ToggleBreakpointAction(this, getVerticalRuler());
+		setAction(ActionDefinitionIds.TOGGLE_BREAKPOINTS, action);
+		// StructuredTextEditor Action - manage breakpoints
+		action = new ManageBreakpointAction(this, getVerticalRuler());
+		setAction(ActionDefinitionIds.MANAGE_BREAKPOINTS, action);
+		// StructuredTextEditor Action - edit breakpoints
+		action = new EditBreakpointAction(this, getVerticalRuler());
+		setAction(ActionDefinitionIds.EDIT_BREAKPOINTS, action);
+		// StructuredTextViewer Action - open file on selection
+		action = new OpenHyperlinkAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_OPEN_FILE + UNDERSCORE, this, getSourceViewer());
+		action.setActionDefinitionId(ActionDefinitionIds.OPEN_FILE);
+		setAction(StructuredTextEditorActionConstants.ACTION_NAME_OPEN_FILE, action);
+
+		computeAndSetDoubleClickAction();
+		
+		IHandler handler = new GotoMatchingBracketHandler();
+	    IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
+	    if (handlerService != null)
+	      handlerService.activateHandler(ActionDefinitionIds.GOTO_MATCHING_BRACKET, handler);
+	    if (handlerService != null) {
+	    	fOutlineHandler = new QuickOutlineHandler();
+	    	handlerService.activateHandler(ActionDefinitionIds.SHOW_OUTLINE, fOutlineHandler);
+	    }
+
+		fShowPropertiesAction = new ShowPropertiesAction(getEditorPart(), getSelectionProvider());
+		fFoldingGroup = new FoldingActionGroup(this, getSourceViewer());
+	}
+
+	protected LineChangeHover createChangeHover() {
+		return super.createChangeHover(); //new StructuredLineChangeHover();
+	}
+
+	protected ICharacterPairMatcher createCharacterPairMatcher() {
+		ICharacterPairMatcher matcher = null;
+		ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+		String[] ids = getConfigurationPoints();
+		for (int i = 0; matcher == null && i < ids.length; i++) {
+			matcher = (ICharacterPairMatcher) builder.getConfiguration(DocumentRegionEdgeMatcher.ID, ids[i]);
+		}
+		if (matcher == null) {
+			matcher = new DefaultCharacterPairMatcher(new char[]{'(', ')', '{', '}', '[', ']', '<', '>', '"', '"', '\'', '\''});
+		}
+		return matcher;
+	}
+
+	/**
+	 * Create a preference store that combines the source editor preferences
+	 * with the base editor's preferences.
+	 * 
+	 * @return IPreferenceStore
+	 */
+	private IPreferenceStore createCombinedPreferenceStore() {
+		IPreferenceStore sseEditorPrefs = SSEUIPlugin.getDefault().getPreferenceStore();
+		IPreferenceStore baseEditorPrefs = EditorsUI.getPreferenceStore();
+		return new ChainedPreferenceStore(new IPreferenceStore[]{sseEditorPrefs, baseEditorPrefs});
+	}
+
+	private ContentOutlineConfiguration createContentOutlineConfiguration() {
+		ContentOutlineConfiguration cfg = null;
+		ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+		String[] ids = getConfigurationPoints();
+		for (int i = 0; cfg == null && i < ids.length; i++) {
+			cfg = (ContentOutlineConfiguration) builder.getConfiguration(ExtendedConfigurationBuilder.CONTENTOUTLINECONFIGURATION, ids[i]);
+		}
+		return cfg;
+	}
+
+	protected void createModelDependentFields() {
+		if (fStructuredSelectionProvider != null) {
+			SelectionConvertor convertor = (SelectionConvertor) fStructuredModel.getAdapter(SelectionConvertor.class);
+			if (convertor != null)
+				fStructuredSelectionProvider.selectionConvertor = convertor;
+			else
+				fStructuredSelectionProvider.selectionConvertor = new SelectionConvertor();
+		}
+	}
+
+	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * Use StructuredTextViewerConfiguration if a viewerconfiguration has not
+	 * already been set. Also initialize StructuredTextViewer.
+	 * </p>
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createPartControl(Composite parent) {
+		IContextService contextService = (IContextService) getSite().getService(IContextService.class);
+		if (contextService != null)
+			contextService.activateContext(EDITOR_KEYBINDING_SCOPE_ID);
+
+		if (getSourceViewerConfiguration() == null) {
+			ConfigurationAndTarget cat = createSourceViewerConfiguration();
+			fViewerConfigurationTargetId = cat.getTargetId();
+			StructuredTextViewerConfiguration newViewerConfiguration = cat.getConfiguration();
+			setSourceViewerConfiguration(newViewerConfiguration);
+		}
+
+		super.createPartControl(parent);
+
+		// instead of calling setInput twice, use initializeSourceViewer() to
+		// handle source viewer initialization previously handled by setInput
+		initializeSourceViewer();
+
+		// update editor context menu, vertical ruler context menu, infopop
+		if (getInternalModel() != null) {
+			updateEditorControlsForContentType(getInternalModel().getContentTypeIdentifier());
+		}
+		else {
+			updateEditorControlsForContentType(null);
+		}
+
+		// used for Show Tooltip Description
+		IInformationControlCreator informationControlCreator = new IInformationControlCreator() {
+			public IInformationControl createInformationControl(Shell shell) {
+				boolean cutDown = false;
+				int style = cutDown ? SWT.NONE : (SWT.V_SCROLL | SWT.H_SCROLL);
+				return new DefaultInformationControl(shell, SWT.RESIZE | SWT.TOOL, style, new HTMLTextPresenter(cutDown));
+			}
+		};
+
+		fInformationPresenter = new InformationPresenter(informationControlCreator);
+		fInformationPresenter.setSizeConstraints(60, 10, true, true);
+		fInformationPresenter.install(getSourceViewer());
+		addReconcilingListeners(getSourceViewerConfiguration(), getTextViewer());
+		fPartListener = new PartListener(this);
+		getSite().getWorkbenchWindow().getPartService().addPartListener(fPartListener);
+		installSemanticHighlighting();
+		if (fOutlineHandler != null) {
+			IInformationPresenter presenter = configureOutlinePresenter(getSourceViewer(), getSourceViewerConfiguration());
+			if (presenter != null) {
+				presenter.install(getSourceViewer());
+				fOutlineHandler.configure(presenter);
+			}
+		}
+		installCharacterPairing();
+		ISourceViewer viewer = getSourceViewer();
+		if (viewer instanceof ITextViewerExtension)
+			((ITextViewerExtension) viewer).appendVerifyKeyListener(fPairInserter);
+		
+	}
+
+	protected PropertySheetConfiguration createPropertySheetConfiguration() {
+		PropertySheetConfiguration cfg = null;
+		ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+		String[] ids = getConfigurationPoints();
+		for (int i = 0; cfg == null && i < ids.length; i++) {
+			cfg = (PropertySheetConfiguration) builder.getConfiguration(ExtendedConfigurationBuilder.PROPERTYSHEETCONFIGURATION, ids[i]);
+		}
+		return cfg;
+	}
+
+	/**
+	 * Loads the Show In Target IDs from the Extended Configuration extension
+	 * point.
+	 * 
+	 * @return
+	 */
+	private String[] createShowInTargetIds() {
+		List allIds = new ArrayList(0);
+		ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+		String[] configurationIds = getConfigurationPoints();
+		for (int i = 0; i < configurationIds.length; i++) {
+			String[] definitions = builder.getDefinitions("showintarget", configurationIds[i]); //$NON-NLS-1$
+			for (int j = 0; j < definitions.length; j++) {
+				String someIds = definitions[j];
+				if (someIds != null && someIds.length() > 0) {
+					String[] ids = StringUtils.unpack(someIds);
+					for (int k = 0; k < ids.length; k++) {
+						// trim, just to keep things clean
+						String id = ids[k].trim();
+						if (!allIds.contains(id)) {
+							allIds.add(id);
+						}
+					}
+				}
+			}
+		}
+
+		if (!allIds.contains(IPageLayout.ID_RES_NAV)) {
+			allIds.add(IPageLayout.ID_RES_NAV);
+		}
+		if (!allIds.contains(IPageLayout.ID_PROJECT_EXPLORER)) {
+			allIds.add(IPageLayout.ID_PROJECT_EXPLORER);
+		}
+		if (!allIds.contains(IPageLayout.ID_OUTLINE)) {
+			allIds.add(IPageLayout.ID_OUTLINE);
+		}
+		return (String[]) allIds.toArray(new String[0]);
+	}
+
+	/**
+	 * @return
+	 */
+	private ISourceEditingTextTools createSourceEditingTextTools() {
+		ISourceEditingTextTools tools = null;
+		ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+		String[] ids = getConfigurationPoints();
+		for (int i = 0; tools == null && i < ids.length; i++) {
+			tools = (ISourceEditingTextTools) builder.getConfiguration(NullSourceEditingTextTools.ID, ids[i]);
+		}
+		if (tools == null) {
+			tools = NullSourceEditingTextTools.getInstance();
+			((NullSourceEditingTextTools) tools).setTextEditor(this);
+		}
+		Method method = null; //$NON-NLS-1$
+		try {
+			method = tools.getClass().getMethod("setTextEditor", new Class[]{StructuredTextEditor.class}); //$NON-NLS-1$
+		}
+		catch (NoSuchMethodException e) {
+		}
+		if (method == null) {
+			try {
+				method = tools.getClass().getMethod("setTextEditor", new Class[]{ITextEditor.class}); //$NON-NLS-1$
+			}
+			catch (NoSuchMethodException e) {
+			}
+		}
+		if (method == null) {
+			try {
+				method = tools.getClass().getMethod("setTextEditor", new Class[]{IEditorPart.class}); //$NON-NLS-1$
+			}
+			catch (NoSuchMethodException e) {
+			}
+		}
+		if (method != null) {
+			if (!method.isAccessible()) {
+				method.setAccessible(true);
+			}
+			try {
+				method.invoke(tools, new Object[]{this});
+			}
+			catch (Exception e) {
+				Logger.logException("Problem creating ISourceEditingTextTools implementation", e); //$NON-NLS-1$
+			}
+		}
+
+		return tools;
+	}
+
+	/**
+	 * Creates the source viewer to be used by this editor
+	 */
+	protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler verticalRuler, int styles) {
+		fAnnotationAccess = createAnnotationAccess();
+		fOverviewRuler = createOverviewRuler(getSharedColors());
+		StructuredTextViewer sourceViewer = createStructedTextViewer(parent, verticalRuler, styles);
+		initSourceViewer(sourceViewer);
+		return sourceViewer;
+	}
+
+	private ConfigurationAndTarget createSourceViewerConfiguration() {
+		ConfigurationAndTarget cat = null;
+		StructuredTextViewerConfiguration cfg = null;
+		ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+		String[] ids = getConfigurationPoints();
+		for (int i = 0; cfg == null && i < ids.length; i++) {
+			cfg = (StructuredTextViewerConfiguration) builder.getConfiguration(ExtendedConfigurationBuilder.SOURCEVIEWERCONFIGURATION, ids[i]);
+			cat = new ConfigurationAndTarget(ids[i], cfg);
+		}
+		if (cfg == null) {
+			cfg = new StructuredTextViewerConfiguration();
+			String targetid = getClass().getName() + "#default"; //$NON-NLS-1$
+			cat = new ConfigurationAndTarget(targetid, cfg);
+		}
+		return cat;
+	}
+
+	protected StructuredTextViewer createStructedTextViewer(Composite parent, IVerticalRuler verticalRuler, int styles) {
+		return new StructuredTextViewer(parent, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles);
+	}
+
+	protected void createUndoRedoActions() {
+		// overridden to add icons to actions
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=111877
+		super.createUndoRedoActions();
+		IAction action = getAction(ITextEditorActionConstants.UNDO);
+		if (action != null) {
+			action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_UNDO));
+		}
+
+		action = getAction(ITextEditorActionConstants.REDO);
+		if (action != null) {
+			action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IWorkbenchPart#dispose()
+	 */
+	public void dispose() {
+		Logger.trace("Source Editor", "StructuredTextEditor::dispose entry"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (org.eclipse.wst.sse.core.internal.util.Debug.perfTestAdapterClassLoading) {
+			System.out.println("Total calls to getAdapter: " + adapterRequests); //$NON-NLS-1$
+			System.out.println("Total time in getAdapter: " + adapterTime); //$NON-NLS-1$
+			System.out.println("Average time per call: " + (adapterTime / adapterRequests)); //$NON-NLS-1$
+		}
+
+		ISourceViewer viewer = getSourceViewer();
+		if (viewer instanceof ITextViewerExtension)
+			((ITextViewerExtension) viewer).removeVerifyKeyListener(fPairInserter);
+
+		// dispose of information presenter
+		if (fInformationPresenter != null) {
+			fInformationPresenter.dispose();
+			fInformationPresenter = null;
+		}
+
+		if (fOutlineHandler != null) {
+			fOutlineHandler.dispose();
+		}
+		// dispose of selection history
+		if (fSelectionHistory != null) {
+			fSelectionHistory.dispose();
+			fSelectionHistory = null;
+		}
+
+		if (fProjectionSupport != null) {
+			fProjectionSupport.dispose();
+			fProjectionSupport = null;
+		}
+
+		if (fFoldingGroup != null) {
+			fFoldingGroup.dispose();
+			fFoldingGroup = null;
+		}
+
+		// dispose of menus that were being tracked
+		if (fTextContextMenu != null) {
+			fTextContextMenu.dispose();
+		}
+		if (fRulerContextMenu != null) {
+			fRulerContextMenu.dispose();
+		}
+		if (fTextContextMenuManager != null) {
+			fTextContextMenuManager.removeMenuListener(getContextMenuListener());
+			fTextContextMenuManager.removeAll();
+			fTextContextMenuManager.dispose();
+		}
+		if (fRulerContextMenuManager != null) {
+			fRulerContextMenuManager.removeMenuListener(getContextMenuListener());
+			fRulerContextMenuManager.removeAll();
+			fRulerContextMenuManager.dispose();
+		}
+
+		// added this 2/20/2004 based on probe results --
+		// seems should be handled by setModel(null), but
+		// that's a more radical change.
+		// and, technically speaking, should not be needed,
+		// but makes a memory leak
+		// less severe.
+		if (fStructuredModel != null) {
+			fStructuredModel.removeModelStateListener(getInternalModelStateListener());
+		}
+
+		// BUG155335 - if there was no document provider, there was nothing
+		// added
+		// to document, so nothing to remove
+		if (getDocumentProvider() != null) {
+			IDocument doc = getDocumentProvider().getDocument(getEditorInput());
+			if (doc != null) {
+				if (doc instanceof IExecutionDelegatable) {
+					((IExecutionDelegatable) doc).setExecutionDelegate(null);
+				}
+			}
+		}
+
+		// some things in the configuration need to clean
+		// up after themselves
+		if (fOutlinePage != null) {
+			if (fOutlinePage instanceof ConfigurableContentOutlinePage && fOutlinePageListener != null) {
+				((ConfigurableContentOutlinePage) fOutlinePage).removeDoubleClickListener(fOutlinePageListener);
+			}
+			if (fOutlinePageListener != null) {
+				fOutlinePage.removeSelectionChangedListener(fOutlinePageListener);
+			}
+		}
+
+		fEditorDisposed = true;
+		disposeModelDependentFields();
+
+		if (fDropTarget != null)
+			fDropTarget.dispose();
+
+		if (fPartListener != null) {
+			getSite().getWorkbenchWindow().getPartService().removePartListener(fPartListener);
+			fPartListener = null;
+		}
+
+		uninstallSemanticHighlighting();
+
+		if (fPairInserter != null)
+			fPairInserter.dispose();
+
+
+		setPreferenceStore(null);
+
+		/*
+		 * Strictly speaking, but following null outs should not be needed,
+		 * but in the event of a memory leak, they make the memory leak less
+		 * severe
+		 */
+		fDropAdapter = null;
+		fDropTarget = null;
+
+		if (fStructuredSelectionProvider != null) {
+			fStructuredSelectionProvider.dispose();
+		}
+
+		setStatusLineMessage(null);
+
+		super.dispose();
+
+		Logger.trace("Source Editor", "StructuredTextEditor::dispose exit"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#disposeDocumentProvider()
+	 */
+	protected void disposeDocumentProvider() {
+		if (fStructuredModel != null && !fisReleased && !(getDocumentProvider() instanceof IModelProvider)) {
+			fStructuredModel.releaseFromEdit();
+			fisReleased = true;
+		}
+		super.disposeDocumentProvider();
+	}
+
+	/**
+	 * Disposes model specific editor helpers such as statusLineHelper.
+	 * Basically any code repeated in update() & dispose() should be placed
+	 * here.
+	 */
+	private void disposeModelDependentFields() {
+		if(fStructuredSelectionProvider != null)
+			fStructuredSelectionProvider.selectionConvertor = new SelectionConvertor();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.ITextEditor#doRevertToSaved()
+	 */
+	public void doRevertToSaved() {
+		super.doRevertToSaved();
+		if (fOutlinePage != null && fOutlinePage instanceof IUpdate) {
+			((IUpdate) fOutlinePage).update();
+		}
+		// reset undo
+		IDocument doc = getDocumentProvider().getDocument(getEditorInput());
+		if (doc instanceof IStructuredDocument) {
+			((IStructuredDocument) doc).getUndoManager().getCommandStack().flush();
+		}
+
+		// update menu text
+		updateMenuText();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void doSave(IProgressMonitor progressMonitor) {
+		IStructuredModel model = null;
+		try {
+			model = aboutToSaveModel();
+			updateEncodingMemento();
+			super.doSave(progressMonitor);
+		}
+		finally {
+			savedModel(model);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#doSetInput(org.eclipse.ui.IEditorInput)
+	 */
+	protected void doSetInput(IEditorInput input) throws CoreException {
+		IEditorInput oldInput = getEditorInput();
+		if (oldInput != null) {
+			IDocument olddoc = getDocumentProvider().getDocument(oldInput);
+			if (olddoc != null && olddoc instanceof IExecutionDelegatable) {
+				((IExecutionDelegatable) olddoc).setExecutionDelegate(null);
+			}
+		}
+
+		if (fStructuredModel != null && !(getDocumentProvider() instanceof IModelProvider)) {
+			fStructuredModel.releaseFromEdit();
+		}
+
+		//attempt to get the model for the given input
+		super.doSetInput(input);
+		IStructuredModel model = tryToGetModel(input);
+		
+		/* if could not get the model prompt user to update content type
+		 * if preferences allow, then try to get model again
+		 */
+		if(model == null &&	SSEUIPlugin.getDefault().getPreferenceStore().getBoolean(EditorPreferenceNames.SHOW_UNKNOWN_CONTENT_TYPE_MSG)) {
+			// display a dialog informing user of unknown content type giving them chance to update preferences
+			UnknownContentTypeDialog dialog = new UnknownContentTypeDialog(getSite().getShell(), SSEUIPlugin.getDefault().getPreferenceStore(), EditorPreferenceNames.SHOW_UNKNOWN_CONTENT_TYPE_MSG);
+			dialog.open();
+
+			//try to get model again in hopes user updated preferences
+			super.doSetInput(input);
+			model = tryToGetModel(input);
+			
+			//still could not get the model to open this editor so log
+			if(model == null) {
+				logUnexpectedDocumentKind(input);
+			}
+		}
+
+		if (fStructuredModel != null || model != null) {
+			setModel(model);
+		}
+
+		if (getInternalModel() != null) {
+			updateEditorControlsForContentType(getInternalModel().getContentTypeIdentifier());
+		}
+		else {
+			updateEditorControlsForContentType(null);
+		}
+
+		// start editor with smart insert mode
+		setInsertMode(SMART_INSERT);
+	}
+	
+	/**
+	 * <p>Attempts to get the {@link IStructuredModel} for the given {@link IEditorInput}</p>
+	 * 
+	 * @param input the {@link IEditorInput} to try and get the {@link IStructuredModel} for
+	 * 
+	 * @return The {@link IStructuredModel} associated with the given {@link IEditorInput} or
+	 * <code>null</code> if no associated {@link IStructuredModel} could be found.
+	 */
+	private IStructuredModel tryToGetModel(IEditorInput input) {
+		IStructuredModel model = null;
+		
+		IDocument newDocument = getDocumentProvider().getDocument(input);
+		if (newDocument instanceof IExecutionDelegatable) {
+			((IExecutionDelegatable) newDocument).setExecutionDelegate(new EditorExecutionContext(this));
+		}
+
+		// if we have a Model provider, get the model from it
+		if (getDocumentProvider() instanceof IModelProvider) {
+			model = ((IModelProvider) getDocumentProvider()).getModel(getEditorInput());
+			if (!model.isShared()) {
+				EditorModelUtil.addFactoriesTo(model);
+			}
+		}
+		else if (newDocument instanceof IStructuredDocument) {
+			// corresponding releaseFromEdit occurs in dispose()
+			model = StructuredModelManager.getModelManager().getModelForEdit((IStructuredDocument) newDocument);
+			EditorModelUtil.addFactoriesTo(model);
+		} 
+		
+		return model;
+	}
+
+	/**
+	 * Sets up this editor's context menu before it is made visible.
+	 * <p>
+	 * Not API. May be reduced to protected method in the future.
+	 * </p>
+	 * 
+	 * @param menu
+	 *            the menu
+	 */
+	public void editorContextMenuAboutToShow(IMenuManager menu) {
+		/*
+		 * To be consistent with the Java Editor, we want to remove ShiftRight
+		 * and ShiftLeft from the context menu.
+		 */
+		super.editorContextMenuAboutToShow(menu);
+		menu.remove(ITextEditorActionConstants.SHIFT_LEFT);
+		menu.remove(ITextEditorActionConstants.SHIFT_RIGHT);
+
+		addContextMenuActions(menu);
+		addSourceMenuActions(menu);
+		addRefactorMenuActions(menu);
+		addExtendedContextMenuActions(menu);
+	}
+
+	/**
+	 * End background mode.
+	 * <p>
+	 * Not API. May be removed in the future.
+	 * </p>
+	 */
+	void endBackgroundOperation() {
+		fBackgroundJobEnded = true;
+		// note, we don't immediately end our 'internal busy' state,
+		// since we may get many calls in a short period of
+		// time. We always wait for the time out.
+		resetBusyState();
+	}
+
+	/**
+	 * Note this method can be called indirectly from background job operation
+	 * ... but expected to be gaurded there with ILock, plus, can be called
+	 * directly from timer thread, so the timer's run method guards with ILock
+	 * too.
+	 */
+	private void endBusyStateInternal() {
+		if (fBackgroundJobEnded) {
+			fBusyTimer.cancel();
+			showBusy(false);
+
+			ISourceViewer viewer = getSourceViewer();
+			if (viewer instanceof StructuredTextViewer) {
+				((StructuredTextViewer) viewer).endBackgroundUpdate();
+			}
+			fBusyState = false;
+		}
+		else {
+			// we will only be in this branch for a back ground job that is
+			// taking
+			// longer than our normal time-out period (meaning we got notified
+			// of
+			// the timeout "inbetween" calls to 'begin' and
+			// 'endBackgroundOperation'.
+			// (which, remember, can only happen since there are many calls to
+			// begin/end in a short period of time, and we only "reset" on the
+			// 'ends').
+			// In this event, there's really nothing to do, we're still in
+			// "busy state"
+			// and should start a new reset cycle once endBackgroundjob is
+			// called.
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class required) {
+		if (org.eclipse.wst.sse.core.internal.util.Debug.perfTestAdapterClassLoading) {
+			startPerfTime = System.currentTimeMillis();
+		}
+		Object result = null;
+		// text editor
+		IStructuredModel internalModel = getInternalModel();
+		if (ITextEditor.class.equals(required) || ITextEditorExtension5.class.equals(required) || ITextEditorExtension4.class.equals(required) || ITextEditorExtension3.class.equals(required) || ITextEditorExtension2.class.equals(required) || ITextEditorExtension.class.equals(required)) {
+			result = this;
+		}
+		else if (IWorkbenchSiteProgressService.class.equals(required)) {
+			return getEditorPart().getSite().getAdapter(IWorkbenchSiteProgressService.class);
+		}
+		// content outline page
+		else if (IContentOutlinePage.class.equals(required)) {
+			if (fOutlinePage == null || fOutlinePage.getControl() == null || fOutlinePage.getControl().isDisposed()) {
+				ContentOutlineConfiguration cfg = createContentOutlineConfiguration();
+				if (cfg != null) {
+					ConfigurableContentOutlinePage outlinePage = new ConfigurableContentOutlinePage();
+					outlinePage.setConfiguration(cfg);
+					if (internalModel != null) {
+						outlinePage.setInputContentTypeIdentifier(internalModel.getContentTypeIdentifier());
+						outlinePage.setInput(internalModel);
+					}
+
+					if (fOutlinePageListener == null) {
+						fOutlinePageListener = new OutlinePageListener();
+					}
+
+					outlinePage.addSelectionChangedListener(fOutlinePageListener);
+					outlinePage.addDoubleClickListener(fOutlinePageListener);
+
+					fOutlinePage = outlinePage;
+				}
+			}
+			result = fOutlinePage;
+		}
+		// property sheet page, but only if the input's editable
+		else if (IPropertySheetPage.class.equals(required) && isEditable()) {
+			if (fPropertySheetPage == null || fPropertySheetPage.getControl() == null || fPropertySheetPage.getControl().isDisposed()) {
+				PropertySheetConfiguration cfg = createPropertySheetConfiguration();
+				if (cfg != null) {
+					ConfigurablePropertySheetPage propertySheetPage = new ConfigurablePropertySheetPage();
+					propertySheetPage.setConfiguration(cfg);
+					fPropertySheetPage = propertySheetPage;
+				}
+			}
+			result = fPropertySheetPage;
+		}
+		else if (IDocument.class.equals(required)) {
+			result = getDocumentProvider().getDocument(getEditorInput());
+		}
+		else if (ISourceEditingTextTools.class.equals(required)) {
+			result = createSourceEditingTextTools();
+		}
+		else if (IToggleBreakpointsTarget.class.equals(required)) {
+			result = ToggleBreakpointsTarget.getInstance();
+		}
+		else if (ITextEditorExtension4.class.equals(required)) {
+			result = this;
+		}
+		else if (IShowInTargetList.class.equals(required)) {
+			result = new ShowInTargetListAdapter();
+		}
+		else if (IVerticalRuler.class.equals(required)) {
+			return getVerticalRuler();
+		}
+		else if (SelectionHistory.class.equals(required)) {
+			if (fSelectionHistory == null)
+				fSelectionHistory = new SelectionHistory(this);
+			result = fSelectionHistory;
+		}
+		else if (IResource.class.equals(required)) {
+			IEditorInput input = getEditorInput();
+			if (input != null) {
+				result = input.getAdapter(required);
+			}
+		}
+		else {
+			if (result == null && internalModel != null) {
+				result = internalModel.getAdapter(required);
+			}
+			// others
+			if (result == null)
+				result = super.getAdapter(required);
+		}
+		if (result == null) {
+//			Logger.log(Logger.INFO_DEBUG, "StructuredTextEditor.getAdapter returning null for " + required); //$NON-NLS-1$
+		}
+		if (org.eclipse.wst.sse.core.internal.util.Debug.perfTestAdapterClassLoading) {
+			long stop = System.currentTimeMillis();
+			adapterRequests++;
+			adapterTime += (stop - startPerfTime);
+		}
+		if (org.eclipse.wst.sse.core.internal.util.Debug.perfTestAdapterClassLoading) {
+			System.out.println("Total calls to getAdapter: " + adapterRequests); //$NON-NLS-1$
+			System.out.println("Total time in getAdapter: " + adapterTime); //$NON-NLS-1$
+			System.out.println("Average time per call: " + (adapterTime / adapterRequests)); //$NON-NLS-1$
+		}
+		return result;
+	}
+
+	private String[] getConfigurationPoints() {
+		String contentTypeIdentifierID = null;
+		if (getInternalModel() != null) {
+			contentTypeIdentifierID = getInternalModel().getContentTypeIdentifier();
+		}
+		return ConfigurationPointCalculator.getConfigurationPoints(this, contentTypeIdentifierID, ConfigurationPointCalculator.SOURCE, StructuredTextEditor.class);
+	}
+
+	/**
+	 * added checks to overcome bug such that if we are shutting down in an
+	 * error condition, then viewer will have already been disposed.
+	 */
+	protected String getCursorPosition() {
+		String result = null;
+		// this may be too expensive in terms of
+		// performance, to do this check
+		// every time, just to gaurd against error
+		// condition.
+		// perhaps there's a better way?
+		if (getSourceViewer() != null && getSourceViewer().getTextWidget() != null && !getSourceViewer().getTextWidget().isDisposed()) {
+			result = super.getCursorPosition();
+		}
+		else {
+			result = "0:0"; //$NON-NLS-1$
+		}
+		return result;
+	}
+
+
+	Display getDisplay() {
+		return PlatformUI.getWorkbench().getDisplay();
+	}
+
+	/**
+	 * Returns this editor part.
+	 * <p>
+	 * Not API. May be removed in the future.
+	 * </p>
+	 * 
+	 * @return this editor part
+	 */
+	public IEditorPart getEditorPart() {
+		if (fEditorPart == null)
+			return this;
+		return fEditorPart;
+	}
+
+	IStructuredModel getInternalModel() {
+		return fStructuredModel;
+	}
+
+	private InternalModelStateListener getInternalModelStateListener() {
+		if (fInternalModelStateListener == null) {
+			fInternalModelStateListener = new InternalModelStateListener();
+		}
+		return fInternalModelStateListener;
+	}
+
+	/**
+	 * Returns this editor's StructuredModel.
+	 * <p>
+	 * Not API. Will be removed in the future.
+	 * </p>
+	 * 
+	 * @return returns this editor's IStructuredModel
+	 * @deprecated - This method allowed for uncontrolled access to the model
+	 *             instance and will be removed in the future. It is
+	 *             recommended that the current document provider be asked for
+	 *             the current document and the IModelManager then asked for
+	 *             the corresponding model with
+	 *             getExistingModelFor*(IDocument). Supported document
+	 *             providers ensure that the document maps to a shared
+	 *             structured model.
+	 */
+	public IStructuredModel getModel() {
+		IDocumentProvider documentProvider = getDocumentProvider();
+		
+		if (documentProvider == null) {
+			// this indicated an error in startup sequence
+			Logger.trace(getClass().getName(), "Program Info Only: document provider was null when model requested"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		
+		// Remember if we entered this method without a model existing
+		boolean initialModelNull = (fStructuredModel == null);
+		
+		if (fStructuredModel == null && documentProvider != null) {
+			// lazily set the model instance, although this is an ABNORMAL
+			// CODE PATH
+			if (documentProvider instanceof IModelProvider) {
+				fStructuredModel = ((IModelProvider) documentProvider).getModel(getEditorInput());
+				fisReleased = false;
+			}
+			else {
+				IDocument doc = documentProvider.getDocument(getEditorInput());
+				if (doc instanceof IStructuredDocument) {
+					/*
+					 * Called in this manner because getExistingModel can skip
+					 * some calculations always performed in getModelForEdit
+					 */
+					IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForEdit(doc);
+					if (model == null) {
+						model = StructuredModelManager.getModelManager().getModelForEdit((IStructuredDocument) doc);
+					}
+					fStructuredModel = model;
+					fisReleased = false;
+				}
+			}
+
+			EditorModelUtil.addFactoriesTo(fStructuredModel);
+
+			if (initialModelNull && fStructuredModel != null) {
+				/*
+				 * DMW: 9/1/2002 -- why is update called here? No change has
+				 * been indicated? I'd like to remove, but will leave for now
+				 * to avoid breaking this hack. Should measure/breakpoint to
+				 * see how large the problem is. May cause performance
+				 * problems.
+				 * 
+				 * DMW: 9/8/2002 -- not sure why this was here initially, but
+				 * the intent/hack must have been to call update if this was
+				 * the first time fStructuredModel was set. So, I added the
+				 * logic to check for that "first time" case. It would appear
+				 * we don't really need. may remove in future when can test
+				 * more.
+				 */
+				update();
+			}
+		}
+		return fStructuredModel;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.part.IWorkbenchPartOrientation#getOrientation()
+	 */
+	public int getOrientation() {
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88714
+		return SWT.LEFT_TO_RIGHT;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.ITextEditor#getSelectionProvider()
+	 */
+	public ISelectionProvider getSelectionProvider() {
+		if (fStructuredSelectionProvider == null) {
+			ISelectionProvider parentProvider = super.getSelectionProvider();
+			if (parentProvider != null) {
+				fStructuredSelectionProvider = new StructuredSelectionProvider(parentProvider, this);
+				fStructuredSelectionProvider.addPostSelectionChangedListener(new ISelectionChangedListener() {
+					public void selectionChanged(SelectionChangedEvent event) {
+						updateStatusLine(event.getSelection());
+					}
+				});
+				if (fStructuredModel != null) {
+					SelectionConvertor convertor = (SelectionConvertor) fStructuredModel.getAdapter(SelectionConvertor.class);
+					if (convertor != null) {
+						fStructuredSelectionProvider.selectionConvertor = convertor;
+					}
+				}
+			}
+		}
+		if (fStructuredSelectionProvider == null) {
+			return super.getSelectionProvider();
+		}
+		return fStructuredSelectionProvider;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#getStatusLineManager()
+	 * 
+	 * Overridden to use the top-level editor part's status line
+	 */
+	protected IStatusLineManager getStatusLineManager() {
+		return getEditorPart().getEditorSite().getActionBars().getStatusLineManager();
+	}
+
+	/**
+	 * Returns the editor's source viewer. This method was created to expose
+	 * the protected final getSourceViewer() method.
+	 * <p>
+	 * Not API. May be removed in the future.
+	 * </p>
+	 * 
+	 * @return the editor's source viewer
+	 */
+	public StructuredTextViewer getTextViewer() {
+		return (StructuredTextViewer) getSourceViewer();
+	}
+
+	/**
+	 * Jumps to the matching bracket.
+	 */
+	void gotoMatchingBracket() {
+		ICharacterPairMatcher matcher = createCharacterPairMatcher();
+		if (matcher == null)
+			return;
+
+		ISourceViewer sourceViewer = getSourceViewer();
+		IDocument document = sourceViewer.getDocument();
+		if (document == null)
+			return;
+
+		IRegion selection = getSignedSelection(sourceViewer);
+
+		int selectionLength = Math.abs(selection.getLength());
+		if (selectionLength > 1) {
+			setStatusLineErrorMessage(SSEUIMessages.GotoMatchingBracket_error_invalidSelection);
+			sourceViewer.getTextWidget().getDisplay().beep();
+			return;
+		}
+
+		int sourceCaretOffset = selection.getOffset() + selection.getLength();
+		IRegion region = matcher.match(document, sourceCaretOffset);
+		if (region == null) {
+			setStatusLineErrorMessage(SSEUIMessages.GotoMatchingBracket_error_noMatchingBracket);
+			sourceViewer.getTextWidget().getDisplay().beep();
+			return;
+		}
+
+		int offset = region.getOffset();
+		int length = region.getLength();
+
+		if (length < 1)
+			return;
+
+		int anchor = matcher.getAnchor();
+
+		// go to after the match if matching to the right
+		int targetOffset = (ICharacterPairMatcher.RIGHT == anchor) ? offset : offset + length;
+
+		boolean visible = false;
+		if (sourceViewer instanceof ITextViewerExtension5) {
+			ITextViewerExtension5 extension = (ITextViewerExtension5) sourceViewer;
+			visible = (extension.modelOffset2WidgetOffset(targetOffset) > -1);
+		}
+		else {
+			IRegion visibleRegion = sourceViewer.getVisibleRegion();
+			// http://dev.eclipse.org/bugs/show_bug.cgi?id=34195
+			visible = (targetOffset >= visibleRegion.getOffset() && targetOffset <= visibleRegion.getOffset() + visibleRegion.getLength());
+		}
+
+		if (!visible) {
+			setStatusLineErrorMessage(SSEUIMessages.GotoMatchingBracket_error_bracketOutsideSelectedElement);
+			sourceViewer.getTextWidget().getDisplay().beep();
+			return;
+		}
+
+		if (selection.getLength() < 0)
+			targetOffset -= selection.getLength();
+
+		if (sourceViewer != null) {
+			sourceViewer.setSelectedRange(targetOffset, selection.getLength());
+			sourceViewer.revealRange(targetOffset, selection.getLength());
+		}
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#handleCursorPositionChanged()
+	 */
+	protected void handleCursorPositionChanged() {
+		super.handleCursorPositionChanged();
+		updateStatusField(StructuredTextEditorActionConstants.STATUS_CATEGORY_OFFSET);
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#handlePreferenceStoreChanged(org.eclipse.jface.util.PropertyChangeEvent)
+	 */
+	protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
+		String property = event.getProperty();
+
+		if (EditorPreferenceNames.EDITOR_TEXT_HOVER_MODIFIERS.equals(property)) {
+			updateHoverBehavior();
+		}
+		
+		//enable or disable as you type validation
+		else if(CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS.equals(property)) {
+			IReconciler reconciler = this.getSourceViewerConfiguration().getReconciler(this.getSourceViewer());
+			if (reconciler instanceof DocumentRegionProcessor) {
+				((DocumentRegionProcessor) reconciler).setValidatorStrategyEnabled(isValidationEnabled());
+			}
+		}
+
+		else if (AbstractStructuredFoldingStrategy.FOLDING_ENABLED.equals(property)) {
+			if (getSourceViewer() instanceof ProjectionViewer) {
+				// install projection support if it has not even been
+				// installed yet
+				if (isFoldingEnabled() && (fProjectionSupport == null)) {
+					installProjectionSupport();
+				}
+				ProjectionViewer pv = (ProjectionViewer) getSourceViewer();
+				if (pv.isProjectionMode() != isFoldingEnabled()) {
+					if (pv.canDoOperation(ProjectionViewer.TOGGLE)) {
+						pv.doOperation(ProjectionViewer.TOGGLE);
+					}
+				}
+			}
+		}
+
+		// update content assist preferences
+		else if (EditorPreferenceNames.CODEASSIST_PROPOSALS_BACKGROUND.equals(property)) {
+			ISourceViewer sourceViewer = getSourceViewer();
+			if (sourceViewer != null) {
+				SourceViewerConfiguration configuration = getSourceViewerConfiguration();
+				if (configuration != null) {
+					IContentAssistant contentAssistant = configuration.getContentAssistant(sourceViewer);
+					if (contentAssistant instanceof ContentAssistant) {
+						ContentAssistant assistant = (ContentAssistant) contentAssistant;
+						RGB rgb = PreferenceConverter.getColor(getPreferenceStore(), EditorPreferenceNames.CODEASSIST_PROPOSALS_BACKGROUND);
+						Color color = EditorUtility.getColor(rgb);
+						assistant.setProposalSelectorBackground(color);
+					}
+				}
+			}
+		}
+
+		// update content assist preferences
+		else if (EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND.equals(property)) {
+			ISourceViewer sourceViewer = getSourceViewer();
+			if (sourceViewer != null) {
+				SourceViewerConfiguration configuration = getSourceViewerConfiguration();
+				if (configuration != null) {
+					IContentAssistant contentAssistant = configuration.getContentAssistant(sourceViewer);
+					if (contentAssistant instanceof ContentAssistant) {
+						ContentAssistant assistant = (ContentAssistant) contentAssistant;
+						RGB rgb = PreferenceConverter.getColor(getPreferenceStore(), EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND);
+						Color color = EditorUtility.getColor(rgb);
+						assistant.setProposalSelectorForeground(color);
+					}
+				}
+			}
+		}
+
+		// update content assist preferences
+		else if (EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND.equals(property)) {
+			ISourceViewer sourceViewer = getSourceViewer();
+			if (sourceViewer != null) {
+				SourceViewerConfiguration configuration = getSourceViewerConfiguration();
+				if (configuration != null) {
+					IContentAssistant contentAssistant = configuration.getContentAssistant(sourceViewer);
+					if (contentAssistant instanceof ContentAssistant) {
+						ContentAssistant assistant = (ContentAssistant) contentAssistant;
+						RGB rgb = PreferenceConverter.getColor(getPreferenceStore(), EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND);
+						Color color = EditorUtility.getColor(rgb);
+						assistant.setContextInformationPopupBackground(color);
+						assistant.setContextSelectorBackground(color);
+					}
+				}
+			}
+		}
+
+		// update content assist preferences
+		else if (EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND.equals(property)) {
+			ISourceViewer sourceViewer = getSourceViewer();
+			if (sourceViewer != null) {
+				SourceViewerConfiguration configuration = getSourceViewerConfiguration();
+				if (configuration != null) {
+					IContentAssistant contentAssistant = configuration.getContentAssistant(sourceViewer);
+					if (contentAssistant instanceof ContentAssistant) {
+						ContentAssistant assistant = (ContentAssistant) contentAssistant;
+						RGB rgb = PreferenceConverter.getColor(getPreferenceStore(), EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND);
+						Color color = EditorUtility.getColor(rgb);
+						assistant.setContextInformationPopupForeground(color);
+						assistant.setContextSelectorForeground(color);
+					}
+				}
+			}
+		}
+
+		super.handlePreferenceStoreChanged(event);
+	}
+
+	private boolean inBusyState() {
+		return fBusyState;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IEditorPart#init(org.eclipse.ui.IEditorSite,
+	 *      org.eclipse.ui.IEditorInput)
+	 */
+	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+		// if we've gotten an error elsewhere, before
+		// we've actually opened, then don't open.
+		if (shouldClose) {
+			setSite(site);
+			close(false);
+		}
+		else {
+			super.init(site, input);
+		}
+	}
+
+	/**
+	 * Set the document provider for this editor.
+	 * <p>
+	 * Not API. May be removed in the future.
+	 * </p>
+	 * 
+	 * @param documentProvider
+	 *            documentProvider to initialize
+	 */
+	public void initializeDocumentProvider(IDocumentProvider documentProvider) {
+		if (documentProvider != null) {
+			setDocumentProvider(documentProvider);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#initializeDragAndDrop(org.eclipse.jface.text.source.ISourceViewer)
+	 */
+	protected void initializeDragAndDrop(ISourceViewer viewer) {
+		IPreferenceStore store = getPreferenceStore();
+		if (store != null && store.getBoolean(PREFERENCE_TEXT_DRAG_AND_DROP_ENABLED))
+			initializeDrop(viewer);
+	}
+
+	protected void initializeDrop(ITextViewer textViewer) {
+		int operations = DND.DROP_COPY | DND.DROP_MOVE;
+		fDropTarget = new DropTarget(textViewer.getTextWidget(), operations);
+		fDropAdapter = new ReadOnlyAwareDropTargetAdapter(true);
+		fDropAdapter.setTargetEditor(this);
+		fDropAdapter.setTargetIDs(getConfigurationPoints());
+		fDropAdapter.setTextViewer(textViewer);
+		fDropTarget.setTransfer(fDropAdapter.getTransfers());
+		fDropTarget.addDropListener(fDropAdapter);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#initializeEditor()
+	 */
+	protected void initializeEditor() {
+		super.initializeEditor();
+
+		setPreferenceStore(createCombinedPreferenceStore());
+
+		setRangeIndicator(new DefaultRangeIndicator());
+		setEditorContextMenuId(EDITOR_CONTEXT_MENU_ID);
+		initializeDocumentProvider(null);
+		// set the infopop for source viewer
+		String helpId = getHelpContextId();
+		// no infopop set or using default text editor help, use default
+		if (helpId == null || ITextEditorHelpContextIds.TEXT_EDITOR.equals(helpId))
+			helpId = IHelpContextIds.XML_SOURCE_VIEW_HELPID;
+		setHelpContextId(helpId);
+		// defect 203158 - disable ruler context menu for
+		// beta
+		// setRulerContextMenuId(RULER_CONTEXT_MENU_ID);
+		configureInsertMode(SMART_INSERT, true);
+
+		// enable the base source editor activity when editor opens
+		try {
+			// FIXME: - commented out to avoid minor dependancy during
+			// transition to org.eclipse
+			// WTPActivityBridge.getInstance().enableActivity(CORE_SSE_ACTIVITY_ID,
+			// true);
+		}
+		catch (Exception t) {
+			// if something goes wrong with enabling activity, just log the
+			// error but dont
+			// have it break the editor
+			Logger.log(Logger.WARNING_DEBUG, t.getMessage(), t);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.editors.text.TextEditor#initializeKeyBindingScopes()
+	 */
+	protected void initializeKeyBindingScopes() {
+		setKeyBindingScopes(new String[]{EDITOR_KEYBINDING_SCOPE_ID});
+	}
+
+	/**
+	 * Initializes the editor's source viewer and other items that were source
+	 * viewer-dependent.
+	 */
+	private void initializeSourceViewer() {
+		IAction openHyperlinkAction = getAction(StructuredTextEditorActionConstants.ACTION_NAME_OPEN_FILE);
+		if (openHyperlinkAction instanceof OpenHyperlinkAction) {
+			((OpenHyperlinkAction) openHyperlinkAction).setHyperlinkDetectors(getSourceViewerConfiguration().getHyperlinkDetectors(getSourceViewer()));
+		}
+
+		// do not even install projection support until folding is actually
+		// enabled
+		if (isFoldingEnabled()) {
+			installProjectionSupport();
+		}
+	}
+
+	protected void initSourceViewer(StructuredTextViewer sourceViewer) {
+		// ensure decoration support is configured
+		getSourceViewerDecorationSupport(sourceViewer);
+	}
+
+	protected void installTextDragAndDrop(ISourceViewer viewer) {
+		// do nothing
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.editors.text.TextEditor#installEncodingSupport()
+	 */
+	protected void installEncodingSupport() {
+		fEncodingSupport = new EncodingSupport(getConfigurationPoints());
+		fEncodingSupport.initialize(this);
+	}
+
+	/**
+	 * Install everything necessary to get document folding working and enable
+	 * document folding
+	 */
+	private void installProjectionSupport() {
+		ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();
+
+		fProjectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
+		fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
+		fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
+		fProjectionSupport.setHoverControlCreator(new IInformationControlCreator() {
+			public IInformationControl createInformationControl(Shell parent) {
+				return new DefaultInformationControl(parent);
+			}
+		});
+		fProjectionSupport.install();
+
+		if (isFoldingEnabled())
+			projectionViewer.doOperation(ProjectionViewer.TOGGLE);
+	}
+
+	/**
+	 * Return whether document folding should be enabled according to the
+	 * preference store settings.
+	 * 
+	 * @return <code>true</code> if document folding should be enabled
+	 */
+	private boolean isFoldingEnabled() {
+		IPreferenceStore store = getPreferenceStore();
+		// check both preference store and vm argument
+		return (store.getBoolean(AbstractStructuredFoldingStrategy.FOLDING_ENABLED));
+	}
+	
+	/**
+	 * Determine if the user preference for as you type validation is enabled or not
+	 */
+	private boolean isValidationEnabled() {
+		return getPreferenceStore().getBoolean(CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS);
+	}
+
+	/**
+	 * <p>Logs a warning about how this {@link StructuredTextEditor} just opened an {@link IEditorInput}
+	 * it was not designed to open.</p>
+	 * 
+	 * @param input the {@link IEditorInput} this {@link StructuredTextEditor} was not designed to open
+	 * to log the message about.
+	 */
+	private void logUnexpectedDocumentKind(IEditorInput input) {
+		Logger.log(Logger.WARNING, "StructuredTextEditor being used without StructuredDocument"); //$NON-NLS-1$
+		String name = null;
+		if (input != null) {
+			name = input.getName();
+		}
+		else {
+			name = "input was null"; //$NON-NLS-1$
+		}
+		Logger.log(Logger.WARNING, "         Input Name: " + name); //$NON-NLS-1$
+		String implClass = null;
+		IDocument document = getDocumentProvider().getDocument(input);
+		if (document != null) {
+			implClass = document.getClass().getName();
+		}
+		else {
+			implClass = "document was null"; //$NON-NLS-1$
+		}
+		Logger.log(Logger.WARNING, "        Unexpected IDocumentProvider implementation: " + getDocumentProvider().getClass().getName()); //$NON-NLS-1$
+		Logger.log(Logger.WARNING, "        Unexpected IDocument implementation: " + implClass); //$NON-NLS-1$
+	}
+
+	/*
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#performRevert()
+	 */
+	protected void performRevert() {
+		ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();
+		projectionViewer.setRedraw(false);
+		try {
+
+			boolean projectionMode = projectionViewer.isProjectionMode();
+			if (projectionMode) {
+				projectionViewer.disableProjection();
+			}
+
+			super.performRevert();
+
+			if (projectionMode) {
+				projectionViewer.enableProjection();
+			}
+
+		}
+		finally {
+			projectionViewer.setRedraw(true);
+		}
+	}
+
+	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * Not API. May be reduced to protected method in the future.
+	 * </p>
+	 */
+	public void rememberSelection() {
+		/*
+		 * This method was made public for use by editors that use
+		 * StructuredTextEditor (like some clients)
+		 */
+		super.rememberSelection();
+	}
+
+
+	/**
+	 * both starts and resets the busy state timer
+	 */
+	private void resetBusyState() {
+		// reset the "busy" timeout
+		if (fBusyTimer != null) {
+			fBusyTimer.cancel();
+		}
+		startBusyTimer();
+	}
+
+	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * Not API. May be reduced to protected method in the future.
+	 * </p>
+	 */
+	public void restoreSelection() {
+		/*
+		 * This method was made public for use by editors that use
+		 * StructuredTextEditor (like some clients)
+		 */
+		// catch odd case where source viewer has no text
+		// widget (defect
+		// 227670)
+		if ((getSourceViewer() != null) && (getSourceViewer().getTextWidget() != null))
+			super.restoreSelection();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#rulerContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager)
+	 */
+	protected void rulerContextMenuAboutToShow(IMenuManager menu) {
+		super.rulerContextMenuAboutToShow(menu);
+
+		IMenuManager foldingMenu = new MenuManager(SSEUIMessages.Folding, "projection"); //$NON-NLS-1$
+		menu.appendToGroup(ITextEditorActionConstants.GROUP_RULERS, foldingMenu);
+
+		IAction action = getAction("FoldingToggle"); //$NON-NLS-1$
+		foldingMenu.add(action);
+		action = getAction("FoldingExpandAll"); //$NON-NLS-1$
+		foldingMenu.add(action);
+		action = getAction("FoldingCollapseAll"); //$NON-NLS-1$
+		foldingMenu.add(action);
+
+		IStructuredModel internalModel = getInternalModel();
+		if (internalModel != null) {
+			boolean debuggingAvailable = BreakpointProviderBuilder.getInstance().isAvailable(internalModel.getContentTypeIdentifier(), BreakpointRulerAction.getFileExtension(getEditorInput()));
+			if (debuggingAvailable) {
+				// append actions to "debug" group (created in
+				// AbstractDecoratedTextEditor.rulerContextMenuAboutToShow(IMenuManager)
+				menu.appendToGroup("debug", getAction(ActionDefinitionIds.TOGGLE_BREAKPOINTS)); //$NON-NLS-1$
+				menu.appendToGroup("debug", getAction(ActionDefinitionIds.MANAGE_BREAKPOINTS)); //$NON-NLS-1$
+				menu.appendToGroup("debug", getAction(ActionDefinitionIds.EDIT_BREAKPOINTS)); //$NON-NLS-1$
+			}
+			addExtendedRulerContextMenuActions(menu);
+		}
+	}
+
+	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * Overridden to expose part activation handling for multi-page editors.
+	 * </p>
+	 * <p>
+	 * Not API. May be reduced to protected method in the future.
+	 * </p>
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#safelySanityCheckState(org.eclipse.ui.IEditorInput)
+	 */
+	public void safelySanityCheckState(IEditorInput input) {
+		super.safelySanityCheckState(input);
+	}
+	
+	protected void sanityCheckState(IEditorInput input) {
+		try {
+			++validateEditCount;
+			super.sanityCheckState(input);
+		}
+		finally {
+			--validateEditCount;
+		}
+	}
+
+	private void savedModel(IStructuredModel model) {
+		if (model != null) {
+			model.changedModel();
+		}
+	}
+
+	/**
+	 * Ensure that the correct IDocumentProvider is used. For direct models, a
+	 * special provider is used. For StorageEditorInputs, use a custom
+	 * provider that creates a usable ResourceAnnotationModel. For everything
+	 * else, use the base support.
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#setDocumentProvider(org.eclipse.ui.IEditorInput)
+	 */
+	protected void setDocumentProvider(IEditorInput input) {
+		if (input instanceof IStructuredModel) {
+			// largely untested
+			setDocumentProvider(StructuredModelDocumentProvider.getInstance());
+		}
+		else if (input instanceof IStorageEditorInput && !(input instanceof IFileEditorInput)) {
+			setDocumentProvider(StorageModelProvider.getInstance());
+		}
+		else {
+			super.setDocumentProvider(input);
+		}
+	}
+
+	/**
+	 * Set editor part associated with this editor.
+	 * <p>
+	 * Not API. May be removed in the future.
+	 * </p>
+	 * 
+	 * @param editorPart
+	 *            editor part associated with this editor
+	 */
+	public void setEditorPart(IEditorPart editorPart) {
+		fEditorPart = editorPart;
+	}
+
+	/**
+	 * Sets the model field within this editor.
+	 * 
+	 * @deprecated - can eventually be eliminated
+	 */
+	private void setModel(IStructuredModel newModel) {
+		Assert.isNotNull(getDocumentProvider(), "document provider can not be null when setting model"); //$NON-NLS-1$
+		if (fStructuredModel != null) {
+			fStructuredModel.removeModelStateListener(getInternalModelStateListener());
+		}
+		fStructuredModel = newModel;
+		if (fStructuredModel != null) {
+			fStructuredModel.addModelStateListener(getInternalModelStateListener());
+		}
+		// update() should be called whenever the model is
+		// set or changed
+		update();
+	}
+
+	/**
+	 * Sets the editor's source viewer configuration which it uses to
+	 * configure it's internal source viewer. This method was overwritten so
+	 * that viewer configuration could be set after editor part was created.
+	 */
+	protected void setSourceViewerConfiguration(SourceViewerConfiguration config) {
+		SourceViewerConfiguration oldSourceViewerConfiguration = getSourceViewerConfiguration();
+		super.setSourceViewerConfiguration(config);
+		StructuredTextViewer stv = getTextViewer();
+		if (stv != null) {
+			/*
+			 * There should be no need to unconfigure before configure because
+			 * configure will also unconfigure before configuring
+			 */
+			removeReconcilingListeners(oldSourceViewerConfiguration, stv);
+			stv.unconfigure();
+			setStatusLineMessage(null);
+			stv.configure(config);
+			addReconcilingListeners(config, stv);
+		}
+	}
+	
+	private void removeReconcilingListeners(SourceViewerConfiguration config, StructuredTextViewer stv) {
+		IReconciler reconciler = config.getReconciler(stv);
+		if (reconciler instanceof DocumentRegionProcessor) {
+			for (int i = 0; i < fReconcilingListeners.length; i++) {
+				((DocumentRegionProcessor) reconciler).removeReconcilingListener(fReconcilingListeners[i]);
+			}
+		}
+	}
+
+	private void addReconcilingListeners(SourceViewerConfiguration config, StructuredTextViewer stv) {
+		try {
+			List reconcilingListeners = new ArrayList(fReconcilingListeners.length);
+			String[] ids = getConfigurationPoints();
+			for (int i = 0; i < ids.length; i++) {
+				reconcilingListeners.addAll(ExtendedConfigurationBuilder.getInstance().getConfigurations("sourceReconcilingListener", ids[i])); //$NON-NLS-1$
+			}
+			fReconcilingListeners = (ISourceReconcilingListener[]) reconcilingListeners.toArray(new ISourceReconcilingListener[reconcilingListeners.size()]);
+		}
+		catch (ClassCastException e) {
+			Logger.log(Logger.ERROR, "Configuration has a reconciling listener that does not implement ISourceReconcilingListener."); //$NON-NLS-1$
+		}
+
+		IReconciler reconciler = config.getReconciler(stv);
+		if (reconciler instanceof DocumentRegionProcessor) {
+			for (int i = 0; i < fReconcilingListeners.length; i++)
+				((DocumentRegionProcessor) reconciler).addReconcilingListener(fReconcilingListeners[i]);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.part.WorkbenchPart#showBusy(boolean)
+	 */
+	public void showBusy(boolean busy) {
+		if (busy) {
+			fRememberTitle = getPartName();
+			// update title and/or fonts and/or background
+			//
+			// temp solution, for testing, uses "busy"
+			setPartName(SSEUIMessages.busy); //$NON-NLS-1$
+		}
+		else {
+			// reset to what it was
+			setPartName(fRememberTitle);
+		}
+	}
+
+	private void startBusyTimer() {
+		// TODO: we need a resettable timer, so not so
+		// many are created
+		fBusyTimer = new Timer(true);
+		fBusyTimer.schedule(new TimeOutExpired(), BUSY_STATE_DELAY);
+	}
+
+	protected void uninstallTextDragAndDrop(ISourceViewer viewer) {
+		// do nothing
+	}
+
+	/**
+	 * Update should be called whenever the model is set or changed (as in
+	 * swapped)
+	 * <p>
+	 * Not API. May be removed in the future.
+	 * </p>
+	 */
+	public void update() {
+		if (fOutlinePage != null && fOutlinePage instanceof ConfigurableContentOutlinePage) {
+			ContentOutlineConfiguration cfg = createContentOutlineConfiguration();
+			((ConfigurableContentOutlinePage) fOutlinePage).setConfiguration(cfg);
+			IStructuredModel internalModel = getInternalModel();
+			((ConfigurableContentOutlinePage) fOutlinePage).setInputContentTypeIdentifier(internalModel.getContentTypeIdentifier());
+			((ConfigurableContentOutlinePage) fOutlinePage).setInput(internalModel);
+		}
+		if (fPropertySheetPage != null && fPropertySheetPage instanceof ConfigurablePropertySheetPage) {
+			PropertySheetConfiguration cfg = createPropertySheetConfiguration();
+			((ConfigurablePropertySheetPage) fPropertySheetPage).setConfiguration(cfg);
+		}
+		disposeModelDependentFields();
+
+		fShowInTargetIds = createShowInTargetIds();
+
+		if (getSourceViewerConfiguration() instanceof StructuredTextViewerConfiguration && fStatusLineLabelProvider != null) {
+			fStatusLineLabelProvider.dispose();
+		}
+
+		updateSourceViewerConfiguration();
+
+		if (getSourceViewerConfiguration() instanceof StructuredTextViewerConfiguration) {
+			fStatusLineLabelProvider = ((StructuredTextViewerConfiguration) getSourceViewerConfiguration()).getStatusLineLabelProvider(getSourceViewer());
+			updateStatusLine(null);
+		}
+
+		if (fEncodingSupport != null && fEncodingSupport instanceof EncodingSupport) {
+			((EncodingSupport) fEncodingSupport).reinitialize(getConfigurationPoints());
+		}
+
+		createModelDependentFields();
+	}
+
+	/**
+	 * Updates all content dependent actions.
+	 */
+	protected void updateContentDependentActions() {
+		super.updateContentDependentActions();
+		// super.updateContentDependentActions only updates
+		// the enable/disable
+		// state of all
+		// the content dependent actions.
+		// StructuredTextEditor's undo and redo actions
+		// have a detail label and
+		// description.
+		// They needed to be updated.
+		if (!fEditorDisposed)
+			updateMenuText();
+	}
+
+
+	/**
+	 * Updates the editor context menu by creating a new context menu with the
+	 * given menu id
+	 * 
+	 * @param contextMenuId
+	 *            Cannot be null
+	 */
+	private void updateEditorContextMenuId(String contextMenuId) {
+		// update editor context menu id if updating to a new id or if context
+		// menu is not already set up
+		if (!contextMenuId.equals(getEditorContextMenuId()) || (fTextContextMenu == null)) {
+			setEditorContextMenuId(contextMenuId);
+
+			if (getSourceViewer() != null) {
+				StyledText styledText = getSourceViewer().getTextWidget();
+				if (styledText != null) {
+					// dispose of previous context menu
+					if (fTextContextMenu != null) {
+						fTextContextMenu.dispose();
+					}
+					if (fTextContextMenuManager != null) {
+						fTextContextMenuManager.removeMenuListener(getContextMenuListener());
+						fTextContextMenuManager.removeAll();
+						fTextContextMenuManager.dispose();
+					}
+
+					fTextContextMenuManager = new MenuManager(getEditorContextMenuId(), getEditorContextMenuId());
+					fTextContextMenuManager.setRemoveAllWhenShown(true);
+					fTextContextMenuManager.addMenuListener(getContextMenuListener());
+
+					fTextContextMenu = fTextContextMenuManager.createContextMenu(styledText);
+					styledText.setMenu(fTextContextMenu);
+
+					getSite().registerContextMenu(getEditorContextMenuId(), fTextContextMenuManager, getSelectionProvider());
+
+					// also register this menu for source page part and
+					// structured text editor ids
+					String partId = getSite().getId();
+					if (partId != null) {
+						getSite().registerContextMenu(partId + EDITOR_CONTEXT_MENU_SUFFIX, fTextContextMenuManager, getSelectionProvider());
+					}
+					getSite().registerContextMenu(EDITOR_CONTEXT_MENU_ID, fTextContextMenuManager, getSelectionProvider());
+				}
+			}
+		}
+	}
+
+	/**
+	 * Updates editor context menu, vertical ruler menu, help context id for
+	 * new content type
+	 * 
+	 * @param contentType
+	 */
+	private void updateEditorControlsForContentType(String contentType) {
+		if (contentType == null) {
+			updateEditorContextMenuId(EDITOR_CONTEXT_MENU_ID);
+			updateRulerContextMenuId(RULER_CONTEXT_MENU_ID);
+			updateHelpContextId(ITextEditorHelpContextIds.TEXT_EDITOR);
+		}
+		else {
+			updateEditorContextMenuId(contentType + EDITOR_CONTEXT_MENU_SUFFIX);
+			updateRulerContextMenuId(contentType + RULER_CONTEXT_MENU_SUFFIX);
+			updateHelpContextId(contentType + "_source_HelpId"); //$NON-NLS-1$
+			
+			/* Activate the contexts defined for this editor */
+			activateContexts((IContextService) getSite().getService(IContextService.class));
+		}
+	}
+	
+	private void updateEncodingMemento() {
+		boolean failed = false;
+		IStructuredModel internalModel = getInternalModel();
+		if (internalModel != null) {
+			IStructuredDocument doc = internalModel.getStructuredDocument();
+			EncodingMemento memento = doc.getEncodingMemento();
+			IDocumentCharsetDetector detector = internalModel.getModelHandler().getEncodingDetector();
+			if (memento != null && detector != null) {
+				detector.set(doc);
+				try {
+					String newEncoding = detector.getEncoding();
+					if (newEncoding != null) {
+						memento.setDetectedCharsetName(newEncoding);
+					}
+				}
+				catch (IOException e) {
+					failed = true;
+				}
+			}
+			/**
+			 * Be sure to use the new value but only if no exception
+			 * occurred. (we may find cases we need to do more error recovery
+			 * there) should be near impossible to get IOException from
+			 * processing the _document_
+			 */
+			if (!failed) {
+				doc.setEncodingMemento(memento);
+			}
+		}
+	}
+
+	/**
+	 * Updates the help context of the editor with the given help context id
+	 * 
+	 * @param helpContextId
+	 *            Cannot be null
+	 */
+	private void updateHelpContextId(String helpContextId) {
+		if (!helpContextId.equals(getHelpContextId())) {
+			setHelpContextId(helpContextId);
+
+			if (getSourceViewer() != null) {
+				StyledText styledText = getSourceViewer().getTextWidget();
+				if (styledText != null) {
+					IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();
+					helpSystem.setHelp(styledText, getHelpContextId());
+				}
+			}
+		}
+	}
+
+	/*
+	 * Update the hovering behavior depending on the preferences.
+	 */
+	private void updateHoverBehavior() {
+		SourceViewerConfiguration configuration = getSourceViewerConfiguration();
+		String[] types = configuration.getConfiguredContentTypes(getSourceViewer());
+
+		for (int i = 0; i < types.length; i++) {
+
+			String t = types[i];
+
+			ISourceViewer sourceViewer = getSourceViewer();
+			if (sourceViewer instanceof ITextViewerExtension2) {
+				// Remove existing hovers
+				((ITextViewerExtension2) sourceViewer).removeTextHovers(t);
+
+				int[] stateMasks = configuration.getConfiguredTextHoverStateMasks(getSourceViewer(), t);
+
+				if (stateMasks != null) {
+					for (int j = 0; j < stateMasks.length; j++) {
+						int stateMask = stateMasks[j];
+						ITextHover textHover = configuration.getTextHover(sourceViewer, t, stateMask);
+						((ITextViewerExtension2) sourceViewer).setTextHover(textHover, t, stateMask);
+					}
+				}
+				else {
+					ITextHover textHover = configuration.getTextHover(sourceViewer, t);
+					((ITextViewerExtension2) sourceViewer).setTextHover(textHover, t, ITextViewerExtension2.DEFAULT_HOVER_STATE_MASK);
+				}
+			}
+			else
+				sourceViewer.setTextHover(configuration.getTextHover(sourceViewer, t), t);
+		}
+	}
+
+	private void updateMenuText() {
+		ITextViewer viewer = getTextViewer();
+		StyledText widget = null;
+		if (viewer != null)
+			widget = viewer.getTextWidget();
+
+		if (fStructuredModel != null && !fStructuredModel.isModelStateChanging() && viewer != null && widget != null && !widget.isDisposed()) {
+			// performance: don't force an update of the action bars unless
+			// required as it is expensive
+			String previousUndoText = null;
+			String previousUndoDesc = null;
+			String previousRedoText = null;
+			String previousRedoDesc = null;
+			boolean updateActions = false;
+			IAction undoAction = getAction(ITextEditorActionConstants.UNDO);
+			IAction redoAction = getAction(ITextEditorActionConstants.REDO);
+			if (undoAction != null) {
+				previousUndoText = undoAction.getText();
+				previousUndoDesc = undoAction.getDescription();
+				updateActions = updateActions || previousUndoText == null || previousUndoDesc == null;
+				undoAction.setText(UNDO_ACTION_TEXT_DEFAULT);
+				undoAction.setDescription(UNDO_ACTION_DESC_DEFAULT);
+			}
+			if (redoAction != null) {
+				previousRedoText = redoAction.getText();
+				previousRedoDesc = redoAction.getDescription();
+				updateActions = updateActions || previousRedoText == null || previousRedoDesc == null;
+				redoAction.setText(REDO_ACTION_TEXT_DEFAULT);
+				redoAction.setDescription(REDO_ACTION_DESC_DEFAULT);
+			}
+			if (fStructuredModel.getUndoManager() != null) {
+				IStructuredTextUndoManager undoManager = fStructuredModel.getUndoManager();
+				// get undo command
+				Command undoCommand = undoManager.getUndoCommand();
+				// set undo label and description
+				if (undoAction != null) {
+					undoAction.setEnabled(undoManager.undoable());
+					if (undoCommand != null) {
+						String label = undoCommand.getLabel();
+						if (label != null) {
+							String customText = MessageFormat.format(UNDO_ACTION_TEXT, new String[]{label});
+							updateActions = updateActions || customText == null || previousUndoText == null || !customText.equals(previousUndoText);
+							undoAction.setText(customText);
+						}
+						String desc = undoCommand.getDescription();
+						if (desc != null) {
+							String customDesc = MessageFormat.format(UNDO_ACTION_DESC, new String[]{desc});
+							updateActions = updateActions || customDesc == null || previousRedoDesc == null || !customDesc.equals(previousUndoDesc);
+							undoAction.setDescription(customDesc);
+						}
+					}
+				}
+				// get redo command
+				Command redoCommand = undoManager.getRedoCommand();
+				// set redo label and description
+				if (redoAction != null) {
+					redoAction.setEnabled(undoManager.redoable());
+					if (redoCommand != null) {
+						String label = redoCommand.getLabel();
+						if (label != null) {
+							String customText = MessageFormat.format(REDO_ACTION_TEXT, new String[]{label});
+							updateActions = updateActions || customText == null || previousRedoText == null || !customText.equals(previousRedoText);
+							redoAction.setText(customText);
+						}
+						String desc = redoCommand.getDescription();
+						if (desc != null) {
+							String customDesc = MessageFormat.format(REDO_ACTION_DESC, new String[]{desc});
+							updateActions = updateActions || customDesc == null || previousRedoDesc == null || !customDesc.equals(previousRedoDesc);
+							redoAction.setDescription(customDesc);
+						}
+					}
+				}
+			}
+			// tell the action bars to update
+			if (updateActions) {
+				if (getEditorSite().getActionBars() != null) {
+					getEditorSite().getActionBars().updateActionBars();
+				}
+				else if (getEditorPart() != null && getEditorPart().getEditorSite().getActionBars() != null) {
+					getEditorPart().getEditorSite().getActionBars().updateActionBars();
+				}
+			}
+		}
+	}
+
+	void updateRangeIndication(ISelection selection) {
+		boolean rangeUpdated = false;
+		if (selection instanceof IStructuredSelection && !((IStructuredSelection) selection).isEmpty()) {
+			Object[] objects = ((IStructuredSelection) selection).toArray();
+			if (objects.length > 0 && objects[0] instanceof IndexedRegion) {
+				int start = ((IndexedRegion) objects[0]).getStartOffset();
+				int end = ((IndexedRegion) objects[0]).getEndOffset();
+				if (objects.length > 1) {
+					for (int i = 1; i < objects.length; i++) {
+						start = Math.min(start, ((IndexedRegion) objects[i]).getStartOffset());
+						end = Math.max(end, ((IndexedRegion) objects[i]).getEndOffset());
+					}
+				}
+				getSourceViewer().setRangeIndication(start, end - start, false);
+				rangeUpdated = true;
+			}
+		}
+		if (!rangeUpdated && getSourceViewer() != null) {
+			if (selection instanceof ITextSelection) {
+				getSourceViewer().setRangeIndication(((ITextSelection) selection).getOffset(), ((ITextSelection) selection).getLength(), false);
+			}
+			else {
+				getSourceViewer().removeRangeIndication();
+			}
+		}
+	}
+
+
+	/**
+	 * Updates the editor vertical ruler menu by creating a new vertical ruler
+	 * context menu with the given menu id
+	 * 
+	 * @param rulerMenuId
+	 *            Cannot be null
+	 */
+	private void updateRulerContextMenuId(String rulerMenuId) {
+		// update ruler context menu id if updating to a new id or if context
+		// menu is not already set up
+		if (!rulerMenuId.equals(getRulerContextMenuId()) || (fRulerContextMenu == null)) {
+			setRulerContextMenuId(rulerMenuId);
+
+			if (getVerticalRuler() != null) {
+				// dispose of previous ruler context menu
+				if (fRulerContextMenu != null) {
+					fRulerContextMenu.dispose();
+				}
+				if (fRulerContextMenuManager != null) {
+					fRulerContextMenuManager.removeMenuListener(getContextMenuListener());
+					fRulerContextMenuManager.removeAll();
+					fRulerContextMenuManager.dispose();
+				}
+
+				fRulerContextMenuManager = new MenuManager(getRulerContextMenuId(), getRulerContextMenuId());
+				fRulerContextMenuManager.setRemoveAllWhenShown(true);
+				fRulerContextMenuManager.addMenuListener(getContextMenuListener());
+
+				Control rulerControl = getVerticalRuler().getControl();
+				fRulerContextMenu = fRulerContextMenuManager.createContextMenu(rulerControl);
+				rulerControl.setMenu(fRulerContextMenu);
+
+				getSite().registerContextMenu(getRulerContextMenuId(), fRulerContextMenuManager, getSelectionProvider());
+
+				// also register this menu for source page part and structured
+				// text editor ids
+				String partId = getSite().getId();
+				if (partId != null) {
+					getSite().registerContextMenu(partId + RULER_CONTEXT_MENU_SUFFIX, fRulerContextMenuManager, getSelectionProvider());
+				}
+				getSite().registerContextMenu(RULER_CONTEXT_MENU_ID, fRulerContextMenuManager, getSelectionProvider());
+			}
+		}
+	}
+
+	private void updateSourceViewerConfiguration() {
+		SourceViewerConfiguration configuration = getSourceViewerConfiguration();
+		// no need to update source viewer configuration if one does not exist
+		// yet
+		if (configuration == null) {
+			return;
+		}
+		// do not configure source viewer configuration twice
+		boolean configured = false;
+
+		// structuredtextviewer only works with
+		// structuredtextviewerconfiguration
+		if (!(configuration instanceof StructuredTextViewerConfiguration)) {
+			ConfigurationAndTarget cat = createSourceViewerConfiguration();
+			fViewerConfigurationTargetId = cat.getTargetId();
+			configuration = cat.getConfiguration();
+			setSourceViewerConfiguration(configuration);
+			configured = true;
+		}
+		else {
+			ConfigurationAndTarget cat = createSourceViewerConfiguration();
+			StructuredTextViewerConfiguration newViewerConfiguration = cat.getConfiguration();
+			if (!(cat.getTargetId().equals(fViewerConfigurationTargetId))) {
+				// d282894 use newViewerConfiguration
+				fViewerConfigurationTargetId = cat.getTargetId();
+				configuration = newViewerConfiguration;
+				setSourceViewerConfiguration(configuration);
+				configured = true;
+			}
+		}
+
+		if (getSourceViewer() != null) {
+			// not sure if really need to reconfigure when input changes
+			// (maybe only need to reset viewerconfig's document)
+			if (!configured)
+				getSourceViewer().configure(configuration);
+			IAction openHyperlinkAction = getAction(StructuredTextEditorActionConstants.ACTION_NAME_OPEN_FILE);
+			if (openHyperlinkAction instanceof OpenHyperlinkAction) {
+				((OpenHyperlinkAction) openHyperlinkAction).setHyperlinkDetectors(getSourceViewerConfiguration().getHyperlinkDetectors(getSourceViewer()));
+			}
+		}
+	}
+
+	protected void updateStatusField(String category) {
+		super.updateStatusField(category);
+
+		if (category == null)
+			return;
+
+		if (StructuredTextEditorActionConstants.STATUS_CATEGORY_OFFSET.equals(category)) {
+			IStatusField field = getStatusField(category);
+			ISourceViewer sourceViewer = getSourceViewer();
+			if (field != null && sourceViewer != null) {
+				Point selection = sourceViewer.getTextWidget().getSelection();
+				int offset1 = widgetOffset2ModelOffset(sourceViewer, selection.x);
+				int offset2 = widgetOffset2ModelOffset(sourceViewer, selection.y);
+				String text = null;
+				if (offset1 != offset2)
+					text = "[" + offset1 + "-" + offset2 + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				else
+					text = "[ " + offset1 + " ]"; //$NON-NLS-1$ //$NON-NLS-2$
+				field.setText(text == null ? fErrorLabel : text);
+			}
+		}
+	}
+	
+	public Annotation gotoAnnotation(boolean forward) {
+		Annotation result = super.gotoAnnotation(forward);
+		if(result != null)
+			fSelectionChangedFromGoto = true;
+		return result;
+	}
+
+	void updateStatusLine(ISelection selection) {
+		// Bug 210481 - Don't update the status line if the selection
+		// was caused by go to navigation
+		if(fSelectionChangedFromGoto) {
+			fSelectionChangedFromGoto = false;
+			return;
+		}
+		IStatusLineManager statusLineManager = getEditorSite().getActionBars().getStatusLineManager();
+		if (fStatusLineLabelProvider != null && statusLineManager != null) {
+			String text = null;
+			Image image = null;
+			if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+				Object firstElement = ((IStructuredSelection) selection).getFirstElement();
+				if (firstElement != null) {
+					text = fStatusLineLabelProvider.getText(firstElement);
+					image = fStatusLineLabelProvider.getImage((firstElement));
+				}
+			}
+			if (image == null) {
+				statusLineManager.setMessage(text);
+			}
+			else {
+				statusLineManager.setMessage(image, text);
+			}
+		}
+	}
+
+	/**
+	 * Returns the signed current selection.
+	 * The length will be negative if the resulting selection
+	 * is right-to-left (RtoL).
+	 * <p>
+	 * The selection offset is model based.
+	 * </p>
+	 *
+	 * @param sourceViewer the source viewer
+	 * @return a region denoting the current signed selection, for a resulting RtoL selections length is < 0
+	 */
+	IRegion getSignedSelection(ISourceViewer sourceViewer) {
+		StyledText text= sourceViewer.getTextWidget();
+		Point selection= text.getSelectionRange();
+
+		if (text.getCaretOffset() == selection.x) {
+			selection.x= selection.x + selection.y;
+			selection.y= -selection.y;
+		}
+
+		selection.x= widgetOffset2ModelOffset(sourceViewer, selection.x);
+
+		return new Region(selection.x, selection.y);
+	}
+
+	protected SourceViewerDecorationSupport getSourceViewerDecorationSupport(ISourceViewer viewer) {
+		/* Removed workaround for Bug [206913] source annotations are not painting in source editors.
+		 * With the new presentation reconciler, we no longer need to force the painting. This
+		 * actually caused Bug [219776] Wrong annotation display on macs. We forced the
+		 * Squiggles strategy, even when the native problem underline was specified for annotations */
+		return super.getSourceViewerDecorationSupport(viewer);
+	}
+
+	private void installCharacterPairing() {
+		IStructuredModel model = getInternalModel();
+		if (model != null) {
+			IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(SSEUIPlugin.ID, "characterPairing"); //$NON-NLS-1$
+			IContentTypeManager mgr = Platform.getContentTypeManager();
+			IContentType type = mgr.getContentType(model.getContentTypeIdentifier());
+			if (type != null) {
+				for (int i = 0; i < elements.length; i++) {
+					// Create the inserter
+					IConfigurationElement element = elements[i];
+					try {
+						IConfigurationElement[] contentTypes = element.getChildren("contentTypeIdentifier");
+						for (int j = 0; j < contentTypes.length; j++) {
+							String id = contentTypes[j].getAttribute("id");
+							if (id != null) {
+								IContentType targetType = mgr.getContentType(id);
+								int priority = calculatePriority(type, targetType, 0);
+								if (priority >= 0) {
+									final CharacterPairing pairing = new CharacterPairing();
+									pairing.priority = priority;
+									String[] partitions = StringUtils.unpack(contentTypes[j].getAttribute("partitions"));
+									pairing.partitions = new HashSet(partitions.length);
+									// Only add the inserter if there is at least one partition for the content type
+									for (int k = 0; k < partitions.length; k++) {
+										pairing.partitions.add(partitions[k]);
+									}
+
+									pairing.inserter = (AbstractCharacterPairInserter) element.createExecutableExtension("class");
+									if (pairing.inserter != null && partitions.length > 0) {
+										fPairInserter.addInserter(pairing);
+										/* use a SafeRunner since this method is also invoked during Part creation */
+										SafeRunner.run(new ISafeRunnable() {
+											public void run() throws Exception {
+												pairing.inserter.initialize();
+											}
+
+											public void handleException(Throwable exception) {
+												// rely on default logging
+											}
+										});
+									}
+								}
+							}
+						}
+					} catch (CoreException e) {
+						Logger.logException(e);
+					}
+				}
+				fPairInserter.prioritize();
+			}
+		}
+	}
+
+	/**
+	 * Calculates the priority of the target content type. The closer <code>targetType</code>
+	 * is to <code>type</code> the higher its priority.
+	 * 
+	 * @param type
+	 * @param targetType
+	 * @param priority
+	 * @return
+	 */
+	private int calculatePriority(IContentType type, IContentType targetType, int priority) {
+		if (type == null)
+			return -1;
+		if (type.getId().equals(targetType.getId()))
+			return priority;
+		return calculatePriority(type.getBaseType(), targetType, ++priority);
+	}
+
+	/**
+	 * Installs semantic highlighting on the editor
+	 */
+	private void installSemanticHighlighting() {
+		IStructuredModel model = getInternalModel();
+		if (fSemanticManager == null && model != null) {
+			fSemanticManager = new SemanticHighlightingManager();
+			fSemanticManager.install(getSourceViewer(), getPreferenceStore(), getSourceViewerConfiguration(), model.getContentTypeIdentifier());
+		}
+	}
+	
+	/**
+	 * Uninstalls semantic highlighting on the editor and performs cleanup
+	 */
+	private void uninstallSemanticHighlighting() {
+		if (fSemanticManager != null) {
+			fSemanticManager.uninstall();
+			fSemanticManager = null;
+		}
+	}
+
+	private IInformationPresenter configureOutlinePresenter(ISourceViewer sourceViewer, SourceViewerConfiguration config) {
+		InformationPresenter presenter = null;
+
+		// Get the quick outline configuration
+		AbstractQuickOutlineConfiguration cfg = null;
+		ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+		String[] ids = getConfigurationPoints();
+		for (int i = 0; cfg == null && i < ids.length; i++) {
+			cfg = (AbstractQuickOutlineConfiguration) builder.getConfiguration(ExtendedConfigurationBuilder.QUICKOUTLINECONFIGURATION, ids[i]);
+		}
+
+		if (cfg != null) {
+			presenter = new InformationPresenter(getOutlinePresenterControlCreator(cfg));
+			presenter.setDocumentPartitioning(config.getConfiguredDocumentPartitioning(sourceViewer));
+			presenter.setAnchor(AbstractInformationControlManager.ANCHOR_GLOBAL);
+			IInformationProvider provider = new SourceInfoProvider(this);
+			String[] contentTypes = config.getConfiguredContentTypes(sourceViewer);
+			for (int i = 0; i < contentTypes.length; i++) {
+				presenter.setInformationProvider(provider, contentTypes[i]);
+			}
+			presenter.setSizeConstraints(50, 20, true, false);
+		}
+		return presenter;
+	}
+
+	/**
+	 * Returns the outline presenter control creator. The creator is a 
+	 * factory creating outline presenter controls for the given source viewer. 
+	 *
+	 * @param sourceViewer the source viewer to be configured by this configuration
+	 * @return an information control creator
+	 */
+	private IInformationControlCreator getOutlinePresenterControlCreator(final AbstractQuickOutlineConfiguration config) {
+		return new IInformationControlCreator() {
+			public IInformationControl createInformationControl(Shell parent) {
+				int shellStyle = SWT.RESIZE;
+				return new QuickOutlinePopupDialog(parent, shellStyle, getInternalModel(), config);
+			}
+		};
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextInvocationContext.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextInvocationContext.java
new file mode 100644
index 0000000..241265c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextInvocationContext.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import java.util.Map;
+
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.TextInvocationContext;
+
+/**
+ * Provisional API: This class/interface is part of an interim API that is
+ * still under development and expected to change significantly before
+ * reaching stability. It is being made available at this early stage to
+ * solicit feedback from pioneering adopters on the understanding that any
+ * code that uses this API will almost certainly be broken (repeatedly) as the
+ * API evolves.
+ * 
+ * This class is not intended to be instantiated by clients.
+ * 
+ * Structured Text quick assist invocation context.
+ */
+public final class StructuredTextInvocationContext extends TextInvocationContext {
+	private Map fAttributes;
+
+	/**
+	 * @param sourceViewer
+	 * @param offset
+	 * @param length
+	 * @param attributes
+	 */
+	public StructuredTextInvocationContext(ISourceViewer sourceViewer, int offset, int length, Map attributes) {
+		super(sourceViewer, offset, length);
+		fAttributes = attributes;
+	}
+
+	/**
+	 * @param attributeName
+	 * @return the value of this attribute, or <tt>null</tt> when no such
+	 *         attribute is defined or that attribute's value has been set to
+	 *         <tt>null</tt>
+	 */
+	public Object getAttribute(String attributeName) {
+		return (fAttributes != null ? fAttributes.get(attributeName) : null);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextMultiPassContentFormatter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextMultiPassContentFormatter.java
new file mode 100644
index 0000000..88d48e5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextMultiPassContentFormatter.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.TypedPosition;
+import org.eclipse.jface.text.formatter.FormattingContextProperties;
+import org.eclipse.jface.text.formatter.IFormattingContext;
+import org.eclipse.jface.text.formatter.IFormattingStrategy;
+import org.eclipse.jface.text.formatter.MultiPassContentFormatter;
+import org.eclipse.wst.sse.core.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+
+/**
+ * Extends the MultiPassContentFormatter to allow clients to contribute
+ * additional slave formatting strategies via the
+ * <code>org.eclipse.wst.sse.ui.editorConfiguration</code> extension point
+ */
+class StructuredTextMultiPassContentFormatter extends MultiPassContentFormatter {
+	/**
+	 * The value of "type" attribute in the provisionalConfiguration element
+	 */
+	private static final String SLAVE_FORMATTING_STRATEGY_EXTENDED_ID = "slaveformattingstrategy"; //$NON-NLS-1$
+	/**
+	 * list of partition types that already have a formatting strategy
+	 */
+	private List fInstalledPartitionTypes;
+
+	/**
+	 * Creates a new content formatter.
+	 * 
+	 * @param partitioning
+	 *            the document partitioning for this formatter
+	 * @param type
+	 *            the default content type
+	 */
+	public StructuredTextMultiPassContentFormatter(final String partitioning, final String type) {
+		super(partitioning, type);
+	}
+
+	protected void formatMaster(IFormattingContext context, IDocument document, int offset, int length) {
+		// for debugging purposes
+		long startTime = System.currentTimeMillis();
+
+		super.formatMaster(context, document, offset, length);
+
+		if (Logger.DEBUG_FORMAT) {
+			long endTime = System.currentTimeMillis();
+			System.out.println("formatModel time: " + (endTime - startTime)); //$NON-NLS-1$
+		}
+	}
+
+	/*
+	 * Overwritten to check for additional slave formatting strategies
+	 * contributed via the editorConfiguration extension point.
+	 */
+	protected void formatSlave(IFormattingContext context, IDocument document, int offset, int length, String type) {
+		List installedTypes = getInstalledPartitionTypes();
+		if (installedTypes.contains(type)) {
+			// we've already set the slave formatter strategy so just perform
+			// as normal
+			super.formatSlave(context, document, offset, length, type);
+		}
+		else {
+			boolean findExtendedSlaveFormatter = true;
+
+			// need to figure out if there's already a slave formatter set, so
+			// just attempt to format as normal
+			super.formatSlave(context, document, offset, length, type);
+
+			// now, determine if slave formatter was already set by checking
+			// context (it would be set if there's already one)
+			Object contextPartition = context.getProperty(FormattingContextProperties.CONTEXT_PARTITION);
+			if (contextPartition instanceof TypedPosition) {
+				String contextType = ((TypedPosition) contextPartition).getType();
+				if (contextType == type) {
+					// there's already a slave formatter set, so just add it
+					// to the list of installed partition types for future
+					// reference
+					installedTypes.add(type);
+					findExtendedSlaveFormatter = false;
+				}
+			}
+			// no slave formatter is set yet, so try to find one contributed
+			// via the editorConfiguration extension point
+			if (findExtendedSlaveFormatter) {
+				Object configuration = ExtendedConfigurationBuilder.getInstance().getConfiguration(SLAVE_FORMATTING_STRATEGY_EXTENDED_ID, type);
+				if (configuration instanceof IFormattingStrategy) {
+					// found a formatter, so add it in
+					setSlaveStrategy((IFormattingStrategy) configuration, type);
+					// try to format slave again now that one is set
+					super.formatSlave(context, document, offset, length, type);
+				}
+				// note that we've already checked this partition type for
+				// future reference
+				installedTypes.add(type);
+			}
+		}
+	}
+
+	/**
+	 * Get the list of partition types that have already been evaluated for
+	 * slave formatting strategies for this formatter.
+	 * 
+	 * @return List
+	 */
+	private List getInstalledPartitionTypes() {
+		if (fInstalledPartitionTypes == null)
+			fInstalledPartitionTypes = new ArrayList();
+		return fInstalledPartitionTypes;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerConfiguration.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerConfiguration.java
new file mode 100644
index 0000000..1bcf291
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerConfiguration.java
@@ -0,0 +1,716 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IAutoEditStrategy;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentExtension3;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.ITextDoubleClickStrategy;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.IUndoManager;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.formatter.IContentFormatter;
+import org.eclipse.jface.text.hyperlink.IHyperlinkPresenter;
+import org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter;
+import org.eclipse.jface.text.information.IInformationPresenter;
+import org.eclipse.jface.text.information.IInformationProvider;
+import org.eclipse.jface.text.information.InformationPresenter;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.quickassist.IQuickAssistAssistant;
+import org.eclipse.jface.text.quickassist.QuickAssistAssistant;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
+import org.eclipse.ui.texteditor.ChainedPreferenceStore;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning;
+import org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner;
+import org.eclipse.wst.sse.ui.contentassist.StructuredContentAssistProcessor;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.StructuredTextAnnotationHover;
+import org.eclipse.wst.sse.ui.internal.contentassist.StructuredContentAssistant;
+import org.eclipse.wst.sse.ui.internal.correction.CompoundQuickAssistProcessor;
+import org.eclipse.wst.sse.ui.internal.derived.HTMLTextPresenter;
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
+import org.eclipse.wst.sse.ui.internal.provisional.style.ReconcilerHighlighter;
+import org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler;
+import org.eclipse.wst.sse.ui.internal.reconcile.StructuredRegionProcessor;
+import org.eclipse.wst.sse.ui.internal.rules.StructuredDocumentDamagerRepairer;
+import org.eclipse.wst.sse.ui.internal.taginfo.AnnotationHoverProcessor;
+import org.eclipse.wst.sse.ui.internal.taginfo.BestMatchHover;
+import org.eclipse.wst.sse.ui.internal.taginfo.ProblemAnnotationHoverProcessor;
+import org.eclipse.wst.sse.ui.internal.taginfo.TextHoverManager;
+import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
+
+
+/**
+ * Configuration for the source viewer used by StructuredTextEditor.<br />
+ * Note: While ISourceViewer is passed in for each get configuration, clients
+ * should create a new viewer configuration instance for each instance of
+ * source viewer as some methods return the same instance of an object,
+ * regardless of the sourceviewer.
+ * <p>
+ * Clients should subclass and override just those methods which must be
+ * specific to their needs.
+ * </p>
+ * 
+ * @see org.eclipse.wst.sse.ui.StructuredTextEditor
+ * @see org.eclipse.wst.sse.ui.internal.StructuredTextViewer
+ * @since 1.0
+ */
+public class StructuredTextViewerConfiguration extends TextSourceViewerConfiguration {
+	/**
+	 * One instance per configuration because creating a second assistant that
+	 * is added to a viewer can cause odd key-eating by the wrong one.
+	 */
+	private StructuredContentAssistant fContentAssistant = null;
+	
+	/*
+	 * One instance per configuration because it's just like content assistant
+	 */
+	private IQuickAssistAssistant fQuickAssistant = null;
+	/*
+	 * One instance per configuration
+	 */
+	private IReconciler fReconciler;
+	/**
+	 * Extended configuration provisionalConfiguration type to contribute
+	 * additional auto edit strategies
+	 */
+	private final String AUTOEDITSTRATEGY = "autoeditstrategy"; //$NON-NLS-1$
+	
+	private final String CONTENT_ASSIST_SIZE = "contentassistsize";
+	
+	private ReconcilerHighlighter fHighlighter = null;
+	
+	/**
+	 * Creates a structured text viewer configuration.
+	 */
+	public StructuredTextViewerConfiguration() {
+		super();
+		// initialize fPreferenceStore with same preference store used in
+		// StructuredTextEditor
+		fPreferenceStore = createCombinedPreferenceStore();
+	}
+
+	/**
+	 * Create a preference store that combines the source editor preferences
+	 * with the base editor's preferences.
+	 * 
+	 * @return IPreferenceStore
+	 */
+	private IPreferenceStore createCombinedPreferenceStore() {
+		IPreferenceStore sseEditorPrefs = SSEUIPlugin.getDefault().getPreferenceStore();
+		IPreferenceStore baseEditorPrefs = EditorsUI.getPreferenceStore();
+		return new ChainedPreferenceStore(new IPreferenceStore[]{sseEditorPrefs, baseEditorPrefs});
+	}
+
+	/**
+	 * Note: Clients cannot override this method because this method returns a
+	 * specially configured Annotation Hover for the StructuredTextViewer
+	 * 
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.editors.text.TextSourceViewerConfiguration#getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer)
+	 */
+	final public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
+		return new StructuredTextAnnotationHover() {
+			protected boolean isIncluded(Annotation annotation) {
+				return isShowInVerticalRuler(annotation);
+			}
+		};
+	}
+
+	/**
+	 * Get color for the preference key. Assumes fPreferenceStore is not null.
+	 * 
+	 * @param key
+	 * @return Color for preference key or null if none found
+	 */
+	private Color getColor(String key) {
+		RGB rgb = PreferenceConverter.getColor(fPreferenceStore, key);
+		return EditorUtility.getColor(rgb);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
+	 */
+	public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {
+		List allStrategies = new ArrayList(0);
+
+		IAutoEditStrategy[] superStrategies = super.getAutoEditStrategies(sourceViewer, contentType);
+		for (int i = 0; i < superStrategies.length; i++) {
+			allStrategies.add(superStrategies[i]);
+		}
+
+		// add auto edit strategies contributed by clients
+		List extendedAutoEdits = ExtendedConfigurationBuilder.getInstance().getConfigurations(AUTOEDITSTRATEGY, contentType);
+		if (!extendedAutoEdits.isEmpty()) {
+			allStrategies.addAll(extendedAutoEdits);
+		}
+
+		return (IAutoEditStrategy[]) allStrategies.toArray(new IAutoEditStrategy[allStrategies.size()]);
+	}
+
+	/**
+	 * Returns the configured partitioning for the given source viewer. The
+	 * partitioning is used when the querying content types from the source
+	 * viewer's input document.<br />
+	 * Note: Clients cannot override this method at this time.
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @return the configured partitioning
+	 * @see #getConfiguredContentTypes(ISourceViewer)
+	 */
+	final public String getConfiguredDocumentPartitioning(ISourceViewer sourceViewer) {
+		/*
+		 * This implementation returns default structured text partitioning
+		 */
+		return IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING;
+	}
+
+	public int[] getConfiguredTextHoverStateMasks(ISourceViewer sourceViewer, String contentType) {
+		/*
+		 * This implementation returns configured text hover state masks for
+		 * StructuredTextViewers
+		 */
+		TextHoverManager.TextHoverDescriptor[] hoverDescs = SSEUIPlugin.getDefault().getTextHoverManager().getTextHovers();
+		int stateMasks[] = new int[hoverDescs.length];
+		int stateMasksLength = 0;
+		for (int i = 0; i < hoverDescs.length; i++) {
+			if (hoverDescs[i].isEnabled()) {
+				int j = 0;
+				int stateMask = computeStateMask(hoverDescs[i].getModifierString());
+				while (j < stateMasksLength) {
+					if (stateMasks[j] == stateMask)
+						break;
+					j++;
+				}
+				if (j == stateMasksLength)
+					stateMasks[stateMasksLength++] = stateMask;
+			}
+		}
+		if (stateMasksLength == hoverDescs.length)
+			return stateMasks;
+
+		int[] shortenedStateMasks = new int[stateMasksLength];
+		System.arraycopy(stateMasks, 0, shortenedStateMasks, 0, stateMasksLength);
+		return shortenedStateMasks;
+	}
+
+	/**
+	 * Returns the content assistant ready to be used with the given source
+	 * viewer.<br />
+	 * Note: The same instance of IContentAssistant is returned regardless of
+	 * the source viewer passed in.
+	 * <p>
+	 * Clients should generally not override this method. Instead, clients
+	 * wanting to add their own processors should override
+	 * <code>getContentAssistProcessors(ISourceViewer, String)</code>
+	 * </p>
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @return a content assistant
+	 * @see #getContentAssistProcessors(ISourceViewer, String)
+	 */
+	public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+		/*
+		 * Note: This method was made final so that StructuredContentAssist is
+		 * always used and content assist extension point always works.
+		 */
+		if (fContentAssistant == null) {
+			fContentAssistant = new StructuredContentAssistant();
+
+			// content assistant configurations
+			fContentAssistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
+			fContentAssistant.enableAutoActivation(true);
+			fContentAssistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
+			fContentAssistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
+			fContentAssistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
+
+			// set content assist preferences
+			if (fPreferenceStore != null) {
+				int delay = fPreferenceStore.getInt(EditorPreferenceNames.CODEASSIST_AUTOACTIVATION_DELAY);
+				fContentAssistant.setAutoActivationDelay(delay);
+
+				Color color = getColor(EditorPreferenceNames.CODEASSIST_PROPOSALS_BACKGROUND);
+				fContentAssistant.setProposalSelectorBackground(color);
+
+				color = getColor(EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND);
+				fContentAssistant.setProposalSelectorForeground(color);
+
+				color = getColor(EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND);
+				fContentAssistant.setContextInformationPopupBackground(color);
+				fContentAssistant.setContextSelectorBackground(color);
+
+				color = getColor(EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND);
+				fContentAssistant.setContextInformationPopupForeground(color);
+				fContentAssistant.setContextSelectorForeground(color);
+			}
+			
+			// add content assist processors for each partition type
+			String[] types = getConfiguredContentTypes(sourceViewer);
+			for (int i = 0; i < types.length; i++) {
+				String type = types[i];
+
+				// add all content assist processors for current partiton type
+				IContentAssistProcessor[] processors = getContentAssistProcessors(sourceViewer, type);
+				if (processors != null) {
+					for (int j = 0; j < processors.length; j++) {
+						fContentAssistant.setContentAssistProcessor(processors[j], type);
+					}
+				}
+			}
+			IDialogSettings dialogSettings = SSEUIPlugin.getInstance().getDialogSettings();
+			if(dialogSettings != null) {
+				IDialogSettings section = dialogSettings.getSection(CONTENT_ASSIST_SIZE);
+				if(section == null) {
+					section = dialogSettings.addNewSection(CONTENT_ASSIST_SIZE);
+				}
+				fContentAssistant.setRestoreCompletionProposalSize(section);
+			}
+		}
+		return fContentAssistant;
+	}
+
+	/**
+	 * <p>Returns a {@link StructuredContentAssistProcessor} which can be contributed to through
+	 * the <tt>org.eclipse.wst.sse.ui.completionProposal</tt> extension point.</p>
+	 * 
+	 * <p>If an extender of this class overrides this method and does not include an
+	 * implementation of a {@link StructuredContentAssistProcessor} in their returned
+	 * processors then all of the contributions by the aforementioned extension point
+	 * will be left out.</p>
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @param partitionType
+	 *            the partition type for which the content assist processors
+	 *            are applicable
+	 * @return IContentAssistProcessors or null if should not be supported
+	 */
+	protected IContentAssistProcessor[] getContentAssistProcessors(ISourceViewer sourceViewer, String partitionType) {
+		IContentAssistProcessor processor = new StructuredContentAssistProcessor(
+				fContentAssistant, partitionType, sourceViewer, null);
+		return new IContentAssistProcessor[]{processor};
+	}
+
+	/**
+	 * Returns the content formatter ready to be used with the given source
+	 * viewer.
+	 * <p>
+	 * It is not recommended that clients override this method as it may
+	 * become <code>final</code> in the future and replaced by an extensible
+	 * framework.
+	 * </p>
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @return a content formatter or <code>null</code> if formatting should
+	 *         not be supported
+	 */
+	public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
+		// try to use the StructuredTextMultiPassContentFormatter so that it
+		// picks up any additional formatting strategies contributed via the
+		// editorConfiguration extension point
+		IContentFormatter formatter = null;
+		if (sourceViewer != null) {
+			IDocument document = sourceViewer.getDocument();
+			if (document instanceof IDocumentExtension3) {
+				String partitioning = getConfiguredDocumentPartitioning(sourceViewer);
+				IDocumentPartitioner partitioner = ((IDocumentExtension3) document).getDocumentPartitioner(partitioning);
+				if (partitioner instanceof StructuredTextPartitioner) {
+					String defaultPartitionType = ((StructuredTextPartitioner) partitioner).getDefaultPartitionType();
+					formatter = new StructuredTextMultiPassContentFormatter(partitioning, defaultPartitionType);
+				}
+			}
+		}
+
+		return formatter;
+	}
+
+	/**
+	 * Returns the double-click strategy ready to be used in this viewer when
+	 * double clicking onto text of the given content type. Note that if
+	 * clients want to contribute their own doubleclick strategy, they should
+	 * use <code>org.eclipse.wst.sse.ui.editorConfiguration</code> extension
+	 * point's <code>doubleClickStrategy</code> element instead of
+	 * overriding this method. If clients do override this method, please
+	 * remember to call <code>super.getDoubleClickStrategy()</code>.
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @param contentType
+	 *            the content type for which the strategy is applicable
+	 * @return a double-click strategy or <code>null</code> if double
+	 *         clicking should not be supported
+	 */
+	public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
+		ITextDoubleClickStrategy strategy = null;
+		Object extendedStrategy = ExtendedConfigurationBuilder.getInstance().getConfiguration(ExtendedConfigurationBuilder.DOUBLECLICKSTRATEGY, contentType);
+		if (extendedStrategy instanceof ITextDoubleClickStrategy) {
+			strategy = (ITextDoubleClickStrategy) extendedStrategy;
+		}
+		else {
+			strategy = super.getDoubleClickStrategy(sourceViewer, contentType);
+		}
+		return strategy;
+	}
+
+	/**
+	 * Returns the hyperlink presenter for the given source viewer.<br />
+	 * Note: Clients cannot override this method, and although it's no longer
+	 * necessary, it must remain for binary compatibility.
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @return a hyperlink presenter specially configured for
+	 *         StructuredTextViewer
+	 */
+	final public IHyperlinkPresenter getHyperlinkPresenter(ISourceViewer sourceViewer) {
+		if (fPreferenceStore == null) {
+			return super.getHyperlinkPresenter(sourceViewer);
+		}
+		return new MultipleHyperlinkPresenter(fPreferenceStore);
+	}
+	
+	/**
+	 * Returns the information control creator. The creator is a factory
+	 * creating information controls for the given source viewer.<br />
+	 * Note: Clients cannot override this method at this time.
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @return the information control creator
+	 */
+	final public IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer) {
+		// used by hover help
+		return new IInformationControlCreator() {
+			public IInformationControl createInformationControl(Shell parent) {
+				return new DefaultInformationControl(parent, new HTMLTextPresenter(true));
+			}
+		};
+	}
+
+	/**
+	 * Returns the information presenter ready to be used with the given
+	 * source viewer.
+	 * <p>
+	 * Clients cannot override this method. Instead, clients wanting to add
+	 * their own information providers should override
+	 * <code>getInformationProvider(ISourceViewer, String)</code>
+	 * </p>
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @return a content assistant
+	 * @see #getInformationProvider(ISourceViewer, String)
+	 */
+	final public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
+		InformationPresenter presenter = new InformationPresenter(getInformationPresenterControlCreator(sourceViewer));
+
+		// information presenter configurations
+		presenter.setSizeConstraints(60, 10, true, true);
+		presenter.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
+
+		// add information providers for each partition type
+		String[] types = getConfiguredContentTypes(sourceViewer);
+		for (int i = 0; i < types.length; i++) {
+			String type = types[i];
+
+			IInformationProvider provider = getInformationProvider(sourceViewer, type);
+			if (provider != null) {
+				presenter.setInformationProvider(provider, type);
+			}
+		}
+
+		return presenter;
+	}
+
+	/**
+	 * Returns the information provider that will be used for information
+	 * presentation in the given source viewer and for the given partition
+	 * type.
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @param partitionType
+	 *            the partition type for which the information provider is
+	 *            applicable
+	 * @return IInformationProvider or null if should not be supported
+	 * @deprecated instead of overriding this method to provide documentation
+	 *             information, adopters should use the
+	 *             <code>documentationTextHover</code> element in the
+	 *             <code>org.eclipse.wst.sse.ui.editorConfiguration</code>
+	 *             extension point
+	 */
+	protected IInformationProvider getInformationProvider(ISourceViewer sourceViewer, String partitionType) {
+		ITextHover bestMatchHover = new BestMatchHover(createDocumentationHovers(partitionType));
+		return new TextHoverInformationProvider(bestMatchHover);
+	}
+
+	/**
+	 * Returns the information presenter control creator. The creator is a
+	 * factory creating the presenter controls for the given source viewer.
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @return an information control creator
+	 */
+	private IInformationControlCreator getInformationPresenterControlCreator(ISourceViewer sourceViewer) {
+		return new IInformationControlCreator() {
+			public IInformationControl createInformationControl(Shell parent) {
+				int shellStyle = SWT.RESIZE | SWT.TOOL;
+				int style = SWT.V_SCROLL | SWT.H_SCROLL;
+				return new DefaultInformationControl(parent, shellStyle, style, new HTMLTextPresenter(false));
+			}
+		};
+	}
+
+	/**
+	 * Returns the line style providers that will be used for syntax
+	 * highlighting in the given source viewer.
+	 * <p>
+	 * Not fully API since return type LineStyleProvider is not API.
+	 * </p>
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @param partitionType
+	 *            the partition type for which the lineStyleProviders are
+	 *            applicable
+	 * @return LineStyleProvders or null if should not be supported
+	 */
+	public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
+		return null;
+	}
+
+	/**
+	 * See <code>getLineStyleProviders(ISourceViewer, String)</code> for
+	 * alternative way to provide highlighting information.
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @return always returns null
+	 * @see #getLineStyleProviders(ISourceViewer, String)
+	 */
+	public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
+		StructuredPresentationReconciler reconciler = new StructuredPresentationReconciler();
+		reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
+		
+		String[] contentTypes = getConfiguredContentTypes(sourceViewer);
+		
+		if(contentTypes != null) {
+			StructuredDocumentDamagerRepairer dr = null;
+			
+			for (int i = 0; i < contentTypes.length; i++) {
+				if (fHighlighter != null) {
+					LineStyleProvider provider = fHighlighter.getProvider(contentTypes[i]);
+					if (provider == null)
+						continue;
+					
+					dr = new StructuredDocumentDamagerRepairer(provider);
+					dr.setDocument(sourceViewer.getDocument());
+					reconciler.setDamager(dr, contentTypes[i]);
+					reconciler.setRepairer(dr, contentTypes[i]);
+				}
+			}
+		}
+		
+		return reconciler;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.editors.text.TextSourceViewerConfiguration#getOverviewRulerAnnotationHover(org.eclipse.jface.text.source.ISourceViewer)
+	 */
+	public IAnnotationHover getOverviewRulerAnnotationHover(ISourceViewer sourceViewer) {
+		return new StructuredTextAnnotationHover(true) {
+			protected boolean isIncluded(Annotation annotation) {
+				return isShowInOverviewRuler(annotation);
+			}
+		};
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getQuickAssistAssistant(org.eclipse.jface.text.source.ISourceViewer)
+	 */
+	public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
+		if (fQuickAssistant == null) {
+			IQuickAssistAssistant assistant = new QuickAssistAssistant();
+			assistant.setQuickAssistProcessor(new CompoundQuickAssistProcessor());
+			assistant.setInformationControlCreator(getQuickAssistAssistantInformationControlCreator());
+
+			// Waiting for color preferences, see:
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=133731
+			// set content assist preferences
+			if (fPreferenceStore != null) {
+				Color color = getColor(EditorPreferenceNames.CODEASSIST_PROPOSALS_BACKGROUND);
+				assistant.setProposalSelectorBackground(color);
+
+				color = getColor(EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND);
+				assistant.setProposalSelectorForeground(color);
+			}
+			fQuickAssistant = assistant;
+		}
+		return fQuickAssistant;
+	}
+
+	/**
+	 * Returns the information control creator for the quick assist assistant.
+	 * 
+	 * @return the information control creator
+	 */
+	private IInformationControlCreator getQuickAssistAssistantInformationControlCreator() {
+		return new IInformationControlCreator() {
+			public IInformationControl createInformationControl(Shell parent) {
+				return new DefaultInformationControl(parent, new HTMLTextPresenter(true));
+			}
+		};
+	}
+
+	/**
+	 * Returns the reconciler ready to be used with the given source viewer.<br />
+	 * Note: The same instance of IReconciler is returned regardless of the
+	 * source viewer passed in.
+	 * <p>
+	 * Clients cannot override this method. Instead, clients wanting to add
+	 * their own reconciling strategy should use the
+	 * <code>org.eclipse.wst.sse.ui.extensions.sourcevalidation</code>
+	 * extension point.
+	 * </p>
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @return a reconciler
+	 */
+	final public IReconciler getReconciler(ISourceViewer sourceViewer) {
+		IReconciler reconciler = null;
+		
+		if (sourceViewer != null) {
+			//Only create reconciler if sourceViewer is present
+			if (fReconciler == null && sourceViewer != null) {
+				StructuredRegionProcessor newReconciler = new StructuredRegionProcessor();
+	
+				// reconciler configurations
+				newReconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
+	
+				fReconciler = newReconciler;
+			}
+			reconciler = fReconciler;
+		}
+		
+		return reconciler;
+	}
+
+	/**
+	 * @since 2.0
+	 * @param treeViewer
+	 * @return a label provider providing the status line contents
+	 */
+	public ILabelProvider getStatusLineLabelProvider(ISourceViewer sourceViewer) {
+		return null;
+	}
+
+	/**
+	 * Create documentation hovers based on hovers contributed via
+	 * <code>org.eclipse.wst.sse.ui.editorConfiguration</code> extension
+	 * point
+	 * 
+	 * @param partitionType
+	 * @return
+	 */
+	private ITextHover[] createDocumentationHovers(String partitionType) {
+		List extendedTextHover = ExtendedConfigurationBuilder.getInstance().getConfigurations(ExtendedConfigurationBuilder.DOCUMENTATIONTEXTHOVER, partitionType);
+		ITextHover[] hovers = (ITextHover[]) extendedTextHover.toArray(new ITextHover[extendedTextHover.size()]);
+		return hovers;
+	}
+
+	public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) {
+		ITextHover textHover = null;
+
+		/*
+		 * Returns a default problem, annotation, and best match hover
+		 * depending on stateMask
+		 */
+		TextHoverManager.TextHoverDescriptor[] hoverDescs = SSEUIPlugin.getDefault().getTextHoverManager().getTextHovers();
+		int i = 0;
+		while (i < hoverDescs.length && textHover == null) {
+			if (hoverDescs[i].isEnabled() && computeStateMask(hoverDescs[i].getModifierString()) == stateMask) {
+				String hoverType = hoverDescs[i].getId();
+				if (TextHoverManager.PROBLEM_HOVER.equalsIgnoreCase(hoverType))
+					textHover = new ProblemAnnotationHoverProcessor();
+				else if (TextHoverManager.ANNOTATION_HOVER.equalsIgnoreCase(hoverType))
+					textHover = new AnnotationHoverProcessor();
+				else if (TextHoverManager.COMBINATION_HOVER.equalsIgnoreCase(hoverType))
+					textHover = new BestMatchHover(createDocumentationHovers(contentType));
+				else if (TextHoverManager.DOCUMENTATION_HOVER.equalsIgnoreCase(hoverType)) {
+					ITextHover[] hovers = createDocumentationHovers(contentType);
+					if (hovers.length > 0) {
+						textHover = hovers[0];
+					}
+				}
+			}
+			i++;
+		}
+		return textHover;
+	}
+
+	/**
+	 * Returns the undo manager for the given source viewer.<br />
+	 * Note: Clients cannot override this method because this method returns a
+	 * specially configured undo manager for the StructuredTextViewer.
+	 * 
+	 * @param sourceViewer
+	 *            the source viewer to be configured by this configuration
+	 * @return an undo manager specially configured for StructuredTextViewer
+	 */
+	final public IUndoManager getUndoManager(ISourceViewer sourceViewer) {
+		/*
+		 * This implementation returns an UndoManager that is used exclusively
+		 * in StructuredTextViewer
+		 */
+		return new StructuredTextViewerUndoManager();
+	}
+	
+	public void setHighlighter(ReconcilerHighlighter highlighter) {
+		fHighlighter = highlighter;
+	}
+	
+	/**
+	 * @return the associated content assistnat
+	 */
+	protected StructuredContentAssistant getContentAssistant() {
+		return this.fContentAssistant;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerUndoManager.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerUndoManager.java
new file mode 100644
index 0000000..1564bc5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerUndoManager.java
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.IUndoManager;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+
+
+/**
+ * Undo manager exclusively for StructuredTextViewers ONLY. This undo manager
+ * is aware that structured documents have their own undo manager. This
+ * handles communication between IUndoManager and IStructuredTextUndoManager.
+ */
+class StructuredTextViewerUndoManager implements IUndoManager {
+	class UndoNotifier implements ISelectionChangedListener {
+		public void selectionChanged(SelectionChangedEvent event) {
+			if ((fUndoManager != null) && (event != null)) {
+				if (event.getSelection() instanceof ITextSelection) {
+					fUndoManager.forceEndOfPendingCommand(this, ((ITextSelection) event.getSelection()).getOffset(), ((ITextSelection) event.getSelection()).getLength());
+				}
+			}
+		}
+
+	}
+
+	private StructuredTextViewer fTextViewer = null;
+	private IStructuredTextUndoManager fUndoManager = null;
+	private ISelectionChangedListener fUndoNotifier = new UndoNotifier();
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.IUndoManager#beginCompoundChange()
+	 */
+	public void beginCompoundChange() {
+		// forward the request to the model-based undo manager
+		if (fUndoManager != null)
+			fUndoManager.beginRecording(fTextViewer);
+	}
+
+	/**
+	 * Associates a viewer to this undo manager and also attempts to get the
+	 * correct document-specific undo manager.
+	 * 
+	 * @param viewer -
+	 *            Assumes viewer instanceof StructuredTextViewer
+	 */
+	public void connect(ITextViewer viewer) {
+		// future_TODO could probably optimize this to check if already
+		// connected to same viewer/undo manager, dont do anything
+
+		// disconnect from any old manager/viewer
+		disconnect();
+
+		// connect to new viewer/undo manager
+		fTextViewer = (StructuredTextViewer) viewer;
+		IDocument doc = fTextViewer.getDocument();
+		if (doc instanceof IStructuredDocument) {
+			IStructuredDocument structuredDocument = (IStructuredDocument) doc;
+			setDocument(structuredDocument);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.IUndoManager#disconnect()
+	 */
+	public void disconnect() {
+		// disconnect the viewer from the undo manager
+		if (fUndoManager != null) {
+			fTextViewer.removeSelectionChangedListener(fUndoNotifier);
+			fUndoManager.disconnect(fTextViewer);
+		}
+
+		// null out the viewer and undo manager
+		fTextViewer = null;
+		fUndoManager = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.IUndoManager#endCompoundChange()
+	 */
+	public void endCompoundChange() {
+		// forward the request to the model-based undo manager
+		if (fUndoManager != null)
+			fUndoManager.endRecording(fTextViewer);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.IUndoManager#redo()
+	 */
+	public void redo() {
+		// forward the request to the model-based undo manager
+		if (fUndoManager != null)
+			fUndoManager.redo(fTextViewer);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.IUndoManager#redoable()
+	 */
+	public boolean redoable() {
+		boolean canRedo = false;
+
+		// forward the request to the model-based undo manager
+		if (fUndoManager != null)
+			canRedo = fUndoManager.redoable();
+
+		return canRedo;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.IUndoManager#reset()
+	 */
+	public void reset() {
+		// cannot really reset model-based undo manager because other clients
+		// will be affected
+	}
+
+	/**
+	 * Disconnect from the old undo manager and connect to the undo manager
+	 * associated with the new document.
+	 * 
+	 * @param document -
+	 *            assumes document is not null
+	 */
+	public void setDocument(IStructuredDocument document) {
+		if (fUndoManager != null) {
+			fTextViewer.removeSelectionChangedListener(fUndoNotifier);
+			fUndoManager.disconnect(fTextViewer);
+		}
+
+		fUndoManager = document.getUndoManager();
+		if (fUndoManager != null) {
+			fUndoManager.connect(fTextViewer);
+			fTextViewer.addSelectionChangedListener(fUndoNotifier);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.IUndoManager#setMaximalUndoLevel(int)
+	 */
+	public void setMaximalUndoLevel(int undoLevel) {
+		// cannot really set maximal undo level on model-based undo manager
+		// because other clients will be affected
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.IUndoManager#undo()
+	 */
+	public void undo() {
+		// forward the request to the model-based undo manager
+		if (fUndoManager != null)
+			fUndoManager.undo(fTextViewer);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.IUndoManager#undoable()
+	 */
+	public boolean undoable() {
+		boolean canUndo = false;
+
+		// forward the request to the model-based undo manager
+		if (fUndoManager != null)
+			canUndo = fUndoManager.undoable();
+
+		return canUndo;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/TextHoverInformationProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/TextHoverInformationProvider.java
new file mode 100644
index 0000000..b6e2c1f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/TextHoverInformationProvider.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui;
+
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.information.IInformationProvider;
+import org.eclipse.jface.text.information.IInformationProviderExtension;
+import org.eclipse.jface.text.information.IInformationProviderExtension2;
+
+class TextHoverInformationProvider implements IInformationProvider, IInformationProviderExtension, IInformationProviderExtension2 {
+	private ITextHover fTextHover;
+
+	public TextHoverInformationProvider(ITextHover hover) {
+		fTextHover = hover;
+	}
+
+	public String getInformation(ITextViewer textViewer, IRegion subject) {
+		return (String) getInformation2(textViewer, subject);
+	}
+
+	public Object getInformation2(ITextViewer textViewer, IRegion subject) {
+		return fTextHover.getHoverInfo(textViewer, subject);
+	}
+
+	public IInformationControlCreator getInformationPresenterControlCreator() {
+		return null;
+	}
+
+	public IRegion getSubject(ITextViewer textViewer, int offset) {
+		return fTextHover.getHoverRegion(textViewer, offset);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/CompletionProposalInvocationContext.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/CompletionProposalInvocationContext.java
new file mode 100644
index 0000000..9ac2f0c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/CompletionProposalInvocationContext.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.contentassist;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+/**
+ * <p>Helpful class for passing around information about the invocation context
+ * of a content assist request</p>
+ * 
+ * @base org.eclipse.jdt.ui.text.java.ContentAssistInvocationContext
+ */
+public class CompletionProposalInvocationContext {
+	/** the viewer that was used to invoke content assist */
+	private final ITextViewer fViewer;
+	
+	/** the character offset where content assist was invoked in the viewer */
+	private final int fInvocationOffset;
+	
+	/** the partition type where content assist was invoked */
+	private String fPartitionType;
+	
+	/**
+	 * <p>Create a new context</p>
+	 * 
+	 * @param viewer {@link ITextViewer} that was used to invoke content assist
+	 * @param invocationOffset character offset where content assist was invoked in the viewer
+	 */
+	public CompletionProposalInvocationContext(ITextViewer viewer, int invocationOffset) {
+		fViewer = viewer;
+		fInvocationOffset = invocationOffset;
+		fPartitionType = null;
+	}
+	
+	/**
+	 * @return {@link IDocument} that content assist was invoked on
+	 */
+	public IDocument getDocument() {
+		return fViewer.getDocument();
+	}
+	
+	/**
+	 * @return {@link ITextViewer} that was used to invoke content assist
+	 */
+	public ITextViewer getViewer() {
+		return fViewer;
+	}
+	
+	/**
+	 * @return character offset where content assist was invoked in the viewer
+	 */
+	public int getInvocationOffset() {
+		return fInvocationOffset;
+	}
+	
+	/**
+	 * @return the partition type where content assist was invoked
+	 */
+	public String getInvocationPartitionType() {
+		if(fPartitionType == null) {
+			fPartitionType = ""; //$NON-NLS-1$
+			try {
+				fPartitionType = this.getDocument().getPartition(this.fInvocationOffset).getType();
+			} catch (BadLocationException e) {
+				// should never happen, nothing we can do about it if it does
+				Logger.logException("Could not get the partition type at content assist invocation offset", e); //$NON-NLS-1$
+			}
+		}
+		return fPartitionType;
+	}
+	
+	/**
+	 * <p>Invocation contexts are equal if they describe the same context and are of the same type.
+	 * This implementation checks for <code>null</code> values and class equality. Subclasses
+	 * should extend this method by adding checks for their context relevant fields (but not
+	 * necessarily cached values).</p>
+	 * <p>
+	 * Example:
+	 *
+	 * <pre>
+	 * class MyContext extends ContentAssistInvocationContext {
+	 * 	private final Object fState;
+	 * 	private Object fCachedInfo;
+	 *
+	 * 	...
+	 *
+	 * 	public boolean equals(Object obj) {
+	 * 		if (!super.equals(obj))
+	 * 			return false;
+	 * 		MyContext other= (MyContext) obj;
+	 * 		return fState.equals(other.fState);
+	 * 	}
+	 * }
+	 * </pre>
+	 *
+	 * </p>
+	 * <p>
+	 * Subclasses should also extend {@link Object#hashCode()}.
+	 * </p>
+	 *
+	 * @param obj {@inheritDoc}
+	 * @return {@inheritDoc}
+	 */
+	public boolean equals(Object obj) {
+		boolean equal = false;
+		if(obj instanceof CompletionProposalInvocationContext) {
+			CompletionProposalInvocationContext other = (CompletionProposalInvocationContext) obj;
+			equal = (fViewer == null && other.fViewer == null || fViewer != null && fViewer.equals(other.fViewer)) &&
+					fInvocationOffset == other.fInvocationOffset;
+		}
+		return equal;
+	}
+
+	/**
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return 23459213 << 5 | (fViewer == null ? 0 : fViewer.hashCode() << 3) | fInvocationOffset;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/ICompletionProposalComputer.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/ICompletionProposalComputer.java
new file mode 100644
index 0000000..b4f608a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/ICompletionProposalComputer.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.contentassist;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+
+/**
+ * <p>Computes completions and context information displayed by the SSE editor content assistant.
+ * Contributions to the <tt>org.eclipse.wst.sse.ui.completionProposal</tt> extension point
+ * must implement this interface.</p>
+ * 
+ * @base org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer
+ */
+public interface ICompletionProposalComputer {
+	/**
+	 * Informs the computer that a content assist session has started. This call will always be
+	 * followed by a {@link #sessionEnded()} call, but not necessarily by calls to
+	 * {@link #computeCompletionProposals(CompletionProposalInvocationContext, IProgressMonitor) computeCompletionProposals}
+	 * or
+	 * {@link #computeContextInformation(CompletionProposalInvocationContext, IProgressMonitor) computeContextInformation}.
+	 */
+	void sessionStarted();
+
+	/**
+	 * Returns a list of completion proposals valid at the given invocation context.
+	 *
+	 * @param context the context of the content assist invocation
+	 * @param monitor a progress monitor to report progress. The monitor is private to this
+	 *        invocation, i.e. there is no need for the receiver to spawn a sub monitor.
+	 * @return a list of completion proposals (element type: {@link ICompletionProposal})
+	 */
+	List computeCompletionProposals(CompletionProposalInvocationContext context, IProgressMonitor monitor);
+
+	/**
+	 * Returns context information objects valid at the given invocation context.
+	 *
+	 * @param context the context of the content assist invocation
+	 * @param monitor a progress monitor to report progress. The monitor is private to this
+	 *        invocation, i.e. there is no need for the receiver to spawn a sub monitor.
+	 * @return a list of context information objects (element type: {@link IContextInformation})
+	 */
+	List computeContextInformation(CompletionProposalInvocationContext context, IProgressMonitor monitor);
+
+	/**
+	 * Returns the reason why this computer was unable to produce any completion proposals or
+	 * context information.
+	 *
+	 * @return an error message or <code>null</code> if no error occurred
+	 */
+	String getErrorMessage();
+
+	/**
+	 * Informs the computer that a content assist session has ended. This call will always be after
+	 * any calls to
+	 * {@linkplain #computeCompletionProposals(CompletionProposalInvocationContext, IProgressMonitor) computeCompletionProposals}
+	 * and
+	 * {@linkplain #computeContextInformation(CompletionProposalInvocationContext, IProgressMonitor) computeContextInformation}.
+	 */
+	void sessionEnded();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/StructuredContentAssistProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/StructuredContentAssistProcessor.java
new file mode 100644
index 0000000..3799a35
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/StructuredContentAssistProcessor.java
@@ -0,0 +1,905 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.contentassist;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.action.LegacyActionTools;
+import org.eclipse.jface.bindings.TriggerSequence;
+import org.eclipse.jface.bindings.keys.KeySequence;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextInputListener;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.ContentAssistEvent;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.ICompletionListener;
+import org.eclipse.jface.text.contentassist.ICompletionListenerExtension;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistantExtension2;
+import org.eclipse.jface.text.contentassist.IContentAssistantExtension3;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.ui.keys.IBindingService;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+import org.eclipse.wst.sse.ui.internal.IReleasable;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalCategory;
+import org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalComputerRegistry;
+import org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposoalCatigoriesConfigurationRegistry;
+import org.eclipse.wst.sse.ui.internal.contentassist.CompoundContentAssistProcessor;
+import org.eclipse.wst.sse.ui.internal.contentassist.ContextInformationValidator;
+import org.eclipse.wst.sse.ui.internal.contentassist.OptionalMessageDialog;
+import org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationReader;
+import org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter;
+
+
+/**
+ * <p>A content assist processor that aggregates the proposals of the
+ * {@link org.eclipse.wst.sse.ui.contentassist.ICompletionProposalComputer}s contributed via the
+ * <code>org.eclipse.wst.sse.ui.completionProposal</code> extension point.</p>
+ * <p>
+ * Extenders may extend:
+ * <ul>
+ * <li>{@link #propertyChange(PropertyChangeEvent)}to react to property change events
+ * that occur in the {@link IPreferenceStore} given to the constructor in case the behavior
+ * of the processor needs to change according to user preferences</li>
+ * <li>{@link #getCompletionProposalAutoActivationCharacters()}</li>
+ * <li>{@link #getContextInformationAutoActivationCharacters()}</li>
+ * <li>{@link #filterAndSortProposals(List, IProgressMonitor, CompletionProposalInvocationContext)}
+ * to add sorting and filtering</li>
+ * <li>{@link #filterAndSortContextInformation(List, IProgressMonitor)} to add sorting and filtering</li>
+ * <li>{@link #createProgressMonitor()} to change the way progress is reported</li>
+ * <li>{@link #createContext(ITextViewer, int)} to provide the context object
+ * passed to the computers</li>
+ * <li>{@link #getContextInformationValidator()} to add context validation (needed if any
+ * contexts are provided)</li>
+ * <li>{@link #getErrorMessage()} to change error reporting</li>
+ * </ul>
+ * </p>
+ * 
+ * @base org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor
+ */
+public class StructuredContentAssistProcessor implements IContentAssistProcessor, IPropertyChangeListener, IReleasable {
+
+	/** Legacy editor configuration extension point. */
+	private static final String CONTENT_ASSIST_PROCESSOR_EXTENDED_ID = "contentassistprocessor"; //$NON-NLS-1$
+
+	/** Content assist processors added through the now legacy editor configuration extension point */
+	private List fLegacyExtendedContentAssistProcessors;
+	
+	/**
+	 * Dialog settings key for the "all categories are disabled" warning dialog. See
+	 * {@link OptionalMessageDialog}.
+	 */
+	private static final String PREF_WARN_ABOUT_EMPTY_ASSIST_CATEGORY= "EmptyDefaultAssistCategory"; //$NON-NLS-1$
+
+	/**
+	 * Used to sort categories by their page order so they are cycled in the correct order
+	 */
+	private final Comparator PAGE_ORDER_COMPARATOR = new Comparator() {
+		public int compare(Object o1, Object o2) {
+			CompletionProposalCategory d1= (CompletionProposalCategory) o1;
+			CompletionProposalCategory d2= (CompletionProposalCategory) o2;
+
+			return d1.getPageSortRank(fContentTypeID) - d2.getPageSortRank(fContentTypeID);
+		}
+	};
+	
+	/**
+	 * Used to sort categories by their default page order so they are
+	 * ordered correctly on the default page
+	 */
+	private final Comparator DEFAULT_PAGE_ORDER_COMPARATOR = new Comparator() {
+		public int compare(Object o1, Object o2) {
+			CompletionProposalCategory d1= (CompletionProposalCategory) o1;
+			CompletionProposalCategory d2= (CompletionProposalCategory) o2;
+
+			return d1.getDefaultPageSortRank(fContentTypeID) - d2.getDefaultPageSortRank(fContentTypeID);
+		}
+	};
+
+	/** List of {@link CompletionProposalCategory}s supported by this processor */
+	private List fCategories;
+	
+	/** content type ID this processor is associated with */
+	String fContentTypeID;
+	
+	/** partition type ID this processor is associated with */
+	private final String fPartitionTypeID;
+	
+	/** Content assistant used for giving the user status messages and listening to completion results*/
+	private final ContentAssistant fAssistant;
+
+	/* cycling stuff */
+	private int fRepetition= -1;
+	private List fCategoryIteration = null;
+	private String fIterationGesture = null;
+	private int fNumberOfComputedResults = 0;
+	private String fErrorMessage;
+	
+	/** Optionally specified preference store for listening to property change events */
+	private IPreferenceStore fPreferenceStore;
+	
+	/** The viewer this processor is associated with */
+	private ITextViewer fViewer;
+
+	/**
+	 * the {@link ITextInputListener} used to set the content type when
+	 * a document is set for this processors associated viewer.
+	 */
+	private ITextInputListener fTextInputListener;
+	
+	/** the context information validator for this processor */
+	private IContextInformationValidator fContextInformationValidator;
+	
+	/**
+	 * <p>Create a new content assist processor for a specific partition type. 
+	 * The content type will be determined when a document is set on the viewer</p>
+	 * 
+	 * <p>If the given {@link IPreferenceStore} is not <code>null</code> then this
+	 * processor will be registered as a {@link IPropertyChangeListener} on the given store
+	 * so that implementers of this class can change the way the processor acts based on
+	 * user preferences</p>
+	 * 
+	 * @param assistant {@link ContentAssistant} to use
+	 * @param partitionTypeID the partition type this processor is for
+	 * @param viewer {@link ITextViewer} this processor is acting in
+	 * @param preferenceStore This processor will be registered as a {@link IPropertyChangeListener}
+	 * on this store and the processor itself will take care of removing itself as a listener, if
+	 * <code>null</code> then will not be registered as a {@link IPropertyChangeListener}
+	 */
+	public StructuredContentAssistProcessor(ContentAssistant assistant, String partitionTypeID,
+			ITextViewer viewer, IPreferenceStore preferenceStore) {
+		
+		Assert.isNotNull(partitionTypeID);
+		Assert.isNotNull(assistant);
+		
+		//be sure the registry has been loaded, none blocking
+		CompletionProposalComputerRegistry.getDefault().initialize();
+		
+		//register on the preference store
+		this.fPreferenceStore = preferenceStore;
+		if(this.fPreferenceStore != null) {
+			this.fPreferenceStore.addPropertyChangeListener(this);
+		}
+		
+		//The content type can not be determined until a document has been set
+		this.fContentTypeID = null;
+		this.fViewer = viewer;
+		if(viewer != null) {
+			this.fTextInputListener = new TextInputListener();
+			viewer.addTextInputListener(this.fTextInputListener);
+		
+			if(viewer.getDocument() != null) {
+				/* it is highly unlike the document has already been set, but check
+				 * just for sanity
+				 */
+				this.fTextInputListener.inputDocumentChanged(null, viewer.getDocument());
+			}
+		}
+		
+		//set the associated partition type
+		this.fPartitionTypeID = partitionTypeID;
+		
+		//add completion listener
+		fAssistant = assistant;
+		fAssistant.addCompletionListener(new CompletionListener());
+		
+		//lazy load these to speed up initial editor opening
+		fLegacyExtendedContentAssistProcessors = null;
+		fCategories = null;
+	}
+
+	/**
+	 * <p>Collect the proposals using the extension points</p>
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
+	 */
+	public final ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+		clearState();
+
+		IProgressMonitor monitor= createProgressMonitor();
+		monitor.beginTask(SSEUIMessages.ContentAssist_computing_proposals, getProposalCategories().size() + 1);
+
+		CompletionProposalInvocationContext context = createContext(viewer, offset);
+
+		monitor.subTask(SSEUIMessages.ContentAssist_collecting_proposals);
+		List proposals = collectProposals(viewer, offset, monitor, context);
+
+		monitor.subTask(SSEUIMessages.ContentAssist_sorting_proposals);
+		List filtered = filterAndSortProposals(proposals, monitor, context);
+		fNumberOfComputedResults= filtered.size();
+
+		ICompletionProposal[] result= (ICompletionProposal[]) filtered.toArray(new ICompletionProposal[filtered.size()]);
+		monitor.done();
+
+		return result;
+	}
+
+	/**
+	 * <p>Collect the context information using the extension points</p>
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
+	 */
+	public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+		clearState();
+
+		IProgressMonitor monitor= createProgressMonitor();
+		monitor.beginTask(SSEUIMessages.ContentAssist_computing_contexts, getProposalCategories().size() + 1);
+
+		monitor.subTask(SSEUIMessages.ContentAssist_collecting_contexts);
+		List proposals= collectContextInformation(viewer, offset, monitor);
+
+		monitor.subTask(SSEUIMessages.ContentAssist_sorting_contexts);
+		List filtered= filterAndSortContextInformation(proposals, monitor);
+		fNumberOfComputedResults= filtered.size();
+
+		IContextInformation[] result= (IContextInformation[]) filtered.toArray(new IContextInformation[filtered.size()]);
+		monitor.done();
+		return result;
+	}
+
+	/**
+	 * <p>Default implementation is to return <code>null</code></p>
+	 * <p>Extenders may override</p>
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+	 */
+	public char[] getCompletionProposalAutoActivationCharacters() {
+		return null;
+	}
+
+	/**
+	 * <p>Default implementation is to return <code>null</code></p>
+	 * <p>Extenders may override</p>
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
+	 */
+	public char[] getContextInformationAutoActivationCharacters() {
+		return null;
+	}
+
+	/**
+	 * <p>Extenders may override this function to change error reporting</p>
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
+	 */
+	public String getErrorMessage() {
+		if (fErrorMessage != null)
+			return fErrorMessage;
+		if (fNumberOfComputedResults > 0)
+			return null;
+		return SSEUIMessages.ContentAssist_no_completions;
+	}
+
+	/**
+	 * @see org.eclipse.wst.sse.ui.contentassist.StructuredContentAssistProcessor#getContextInformationValidator()
+	 */
+	public IContextInformationValidator getContextInformationValidator() {
+		if (this.fContextInformationValidator == null) {
+			this.fContextInformationValidator = new ContextInformationValidator();
+		}
+		return this.fContextInformationValidator;
+	}
+	
+	/**
+	 * <p>Extenders may override, but should always be sure to call the super implementation</p>
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.IReleasable#release()
+	 */
+	public void release() {
+		if(this.fPreferenceStore != null) {
+			this.fPreferenceStore.removePropertyChangeListener(this);
+			this.fPreferenceStore = null;
+		}
+		
+		if(this.fViewer != null) {
+			this.fViewer.removeTextInputListener(this.fTextInputListener);
+			this.fViewer = null;
+		}
+	}
+	
+	/**
+	 * <p>Intended to be overridden by extenders wishing to change the behavior
+	 * of the processor based on user preferences from the store optionally 
+	 * associated with this processor.  If no store was given to the constructor
+	 * when creating this assistant then this method will never be invoked.</p>
+	 * 
+	 * <p>The default implementation does not react to the events in any way</p>
+	 * 
+	 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+	 */
+	public void propertyChange(PropertyChangeEvent event) {
+	}
+	
+	/**
+	 * <p>Filters and sorts the proposals. The passed list may be modified
+	 * and returned, or a new list may be created and returned.</p>
+	 * 
+	 * <p>The default implementation does not do any sorting or filtering.</p>
+	 * <p>Extenders may override this function.</p>
+	 *
+	 * @param proposals the list of collected proposals (element type:
+	 *        {@link ICompletionProposal})
+	 * @param monitor a progress monitor
+	 * @param context TODO
+	 * @return the list of filtered and sorted proposals, ready for
+	 *         display (element type: {@link ICompletionProposal})
+	 */
+	protected List filterAndSortProposals(List proposals, IProgressMonitor monitor, CompletionProposalInvocationContext context) {
+		return proposals;
+	}
+	
+	/**
+	 * <p>Filters and sorts the context information objects. The passed
+	 * list may be modified and returned, or a new list may be created
+	 * and returned.</p>
+	 * 
+	 * <p>The default implementation does not do any sorting or filtering</p>
+	 * <p>Extenders may override this method</p>
+	 *
+	 * @param contexts the list of collected proposals (element type:
+	 *        {@link IContextInformation})
+	 * @param monitor a progress monitor
+	 * @return the list of filtered and sorted proposals, ready for
+	 *         display (element type: {@link IContextInformation})
+	 */
+	protected List filterAndSortContextInformation(List contexts, IProgressMonitor monitor) {
+		return contexts;
+	}
+
+	/**
+	 * <p>Creates a progress monitor.</p>
+	 * <p>The default implementation creates a {@link NullProgressMonitor}.</p>
+	 *
+	 * <p>Extenders may override this method</p>
+	 *
+	 * @return a progress monitor
+	 */
+	protected IProgressMonitor createProgressMonitor() {
+		return new NullProgressMonitor();
+	}
+
+	/**
+	 * <p>Creates the context that is passed to the completion proposal
+	 * computers.</p>
+	 * 
+	 * <p>Extenders may override this method</p>
+	 *
+	 * @param viewer the viewer that content assist is invoked on
+	 * @param offset the content assist offset
+	 * @return the context to be passed to the computers
+	 */
+	protected CompletionProposalInvocationContext createContext(ITextViewer viewer, int offset) {
+		return new CompletionProposalInvocationContext(viewer, offset);
+	}
+	
+	/**
+	 * @return the associated preference store
+	 */
+	protected IPreferenceStore getPreferenceStore() {
+		return this.fPreferenceStore;
+	}
+	
+	/**
+	 * Clears the state
+	 */
+	private void clearState() {
+		fErrorMessage=null;
+		fNumberOfComputedResults= 0;
+	}
+
+	/**
+	 * <p>Collects the proposals from the extensions.</p>
+	 *
+	 * @param viewer the text viewer
+	 * @param offset the offset
+	 * @param monitor the progress monitor
+	 * @param context the code assist invocation context
+	 * @return the list of proposals
+	 */
+	private List collectProposals(ITextViewer viewer, int offset, IProgressMonitor monitor, CompletionProposalInvocationContext context) {
+		List proposals = new ArrayList();
+		List categories = getCategories();
+		for (Iterator it = categories.iterator(); it.hasNext();) {
+			CompletionProposalCategory cat = (CompletionProposalCategory) it.next();
+			List computed = cat.computeCompletionProposals(context, this.fContentTypeID, this.fPartitionTypeID, new SubProgressMonitor(monitor, 1));
+			proposals.addAll(computed);
+			if (fErrorMessage == null) {
+				fErrorMessage= cat.getErrorMessage();
+			}
+		}
+		
+		// if default page
+		// Deal with adding in proposals from processors added through the legacy extension
+		if (isFirstPage() && getLegacyExtendedContentAssistProcessors() != null &&
+				!getLegacyExtendedContentAssistProcessors().isEmpty()) {
+			
+			Iterator iter = getLegacyExtendedContentAssistProcessors().iterator();
+			while (iter.hasNext()) {
+				IContentAssistProcessor legacyProcessor = (IContentAssistProcessor) iter.next();
+				ICompletionProposal[] legacyComputed = legacyProcessor.computeCompletionProposals(viewer, offset);
+				proposals.addAll(Arrays.asList(legacyComputed));
+			}
+		}
+		
+		return proposals;
+	}
+	
+	/**
+	 * <p>Collects the context information from the extensions.</p>
+	 * 
+	 * @param viewer
+	 * @param offset
+	 * @param monitor
+	 * @return
+	 */
+	private List collectContextInformation(ITextViewer viewer, int offset, IProgressMonitor monitor) {
+		List proposals = new ArrayList();
+		CompletionProposalInvocationContext context= createContext(viewer, offset);
+
+		List providers= getCategories();
+		for (Iterator it= providers.iterator(); it.hasNext();) {
+			CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
+			List computed= cat.computeContextInformation(context, this.fContentTypeID, this.fPartitionTypeID, new SubProgressMonitor(monitor, 1));
+			proposals.addAll(computed);
+			if (fErrorMessage == null) {
+				fErrorMessage= cat.getErrorMessage();
+			}
+		}
+		
+		// Deal with adding in contexts from processors added through the legacy extension
+		if (getLegacyExtendedContentAssistProcessors() != null &&
+				!getLegacyExtendedContentAssistProcessors().isEmpty()) {
+			
+			Iterator iter = getLegacyExtendedContentAssistProcessors().iterator();
+			while (iter.hasNext()) {
+				IContentAssistProcessor legacyProcessor = (IContentAssistProcessor) iter.next();
+				IContextInformation[] legacyComputed = legacyProcessor.computeContextInformation(viewer, offset);
+				if(legacyComputed != null) {
+					proposals.addAll(Arrays.asList(legacyComputed));
+				}
+			}
+		}
+
+		return proposals;
+	}
+
+	/**
+	 * @return the next set of categories
+	 */
+	private List getCategories() {
+		List categories;
+		if (fCategoryIteration == null) {
+			categories =  getProposalCategories();
+		} else {
+			int iteration= fRepetition % fCategoryIteration.size();
+			fAssistant.setStatusMessage(createIterationMessage());
+			fAssistant.setEmptyMessage(createEmptyMessage());
+			fRepetition++;
+	
+			categories = (List) fCategoryIteration.get(iteration);
+		}
+		
+		return categories;
+	}
+
+	/**
+	 *  This may show the warning dialog if all categories are disabled
+	 */
+	private void resetCategoryIteration() {
+		fCategoryIteration = getCategoryIteration();
+	}
+
+	/**
+	 * @return {@link List} of {@link List}s of {@link CompletionProposalCategory}s, this is
+	 * the ordered list of the completion categories to cycle through
+	 */
+	private List getCategoryIteration() {
+		List sequence= new ArrayList();
+		sequence.add(getDefaultCategories());
+		for (Iterator it= getSortedOwnPageCategories().iterator(); it.hasNext();) {
+			CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
+			sequence.add(Collections.singletonList(cat));
+		}
+		return sequence;
+	}
+
+	/**
+	 * @return the sorted categories for the default page
+	 */
+	private List getDefaultCategories() {
+		// default mix - enable all included computers
+		List included= getDefaultCategoriesUnchecked();
+
+		if (included.size() == 0 && CompletionProposalComputerRegistry.getDefault().hasUninstalledComputers()) {
+			if (informUserAboutEmptyDefaultCategory()) {
+				// preferences were restored - recompute the default categories
+				included= getDefaultCategoriesUnchecked();
+			}
+			CompletionProposalComputerRegistry.getDefault().resetUnistalledComputers();
+		}
+		
+		Collections.sort(included, DEFAULT_PAGE_ORDER_COMPARATOR);
+
+		return included;
+	}
+
+	/**
+	 * <p>Gets the default categories with no error checking.</p>
+	 * 
+	 * @return the default {@link CompletionProposalCategory}s
+	 */
+	private List getDefaultCategoriesUnchecked() {
+		List included = new ArrayList();
+		for (Iterator it = getProposalCategories().iterator(); it.hasNext();) {
+			CompletionProposalCategory category = (CompletionProposalCategory) it.next();
+			if (category.isIncludedOnDefaultPage(this.fContentTypeID) && category.hasComputers(fContentTypeID, fPartitionTypeID))
+				included.add(category);
+		}
+		return included;
+	}
+
+	/**
+	 * <p>Informs the user about the fact that there are no enabled categories in the default content
+	 * assist set and shows a link to the preferences.</p>
+	 *
+	 * @return  <code>true</code> if the default should be restored
+	 */
+	private boolean informUserAboutEmptyDefaultCategory() {
+		/*If warn about empty default category and there are associated properties for this
+		 * processors content type and those properties have an associated properties page then
+		 * display warning message to user.
+		 */
+		ICompletionProposalCategoriesConfigurationReader properties = CompletionProposoalCatigoriesConfigurationRegistry.getDefault().getReadableConfiguration(this.fContentTypeID);
+		if (OptionalMessageDialog.isDialogEnabled(PREF_WARN_ABOUT_EMPTY_ASSIST_CATEGORY) &&
+				properties instanceof ICompletionProposalCategoriesConfigurationWriter  &&
+				((ICompletionProposalCategoriesConfigurationWriter)properties).hasAssociatedPropertiesPage()) {
+			
+			ICompletionProposalCategoriesConfigurationWriter propertiesExtension = (ICompletionProposalCategoriesConfigurationWriter)properties;
+			
+			final Shell shell= SSEUIPlugin.getActiveWorkbenchShell();
+			String title= SSEUIMessages.ContentAssist_all_disabled_title;
+			String message= SSEUIMessages.ContentAssist_all_disabled_message;
+			// see PreferencePage#createControl for the 'defaults' label
+			final String restoreButtonLabel= JFaceResources.getString("defaults"); //$NON-NLS-1$
+			final String linkMessage= NLS.bind(SSEUIMessages.ContentAssist_all_disabled_preference_link, LegacyActionTools.removeMnemonics(restoreButtonLabel));
+			final int restoreId= IDialogConstants.CLIENT_ID + 10;
+			final int settingsId= IDialogConstants.CLIENT_ID + 11;
+			final OptionalMessageDialog dialog= new OptionalMessageDialog(PREF_WARN_ABOUT_EMPTY_ASSIST_CATEGORY, shell, title, null /* default image */, message, MessageDialog.WARNING, new String[] { restoreButtonLabel, IDialogConstants.CLOSE_LABEL }, 1) {
+				/*
+				 * @see org.eclipse.jdt.internal.ui.dialogs.OptionalMessageDialog#createCustomArea(org.eclipse.swt.widgets.Composite)
+				 */
+				protected Control createCustomArea(Composite composite) {
+					// wrap link and checkbox in one composite without space
+					Composite parent= new Composite(composite, SWT.NONE);
+					GridLayout layout= new GridLayout();
+					layout.marginHeight= 0;
+					layout.marginWidth= 0;
+					layout.verticalSpacing= 0;
+					parent.setLayout(layout);
+
+					Composite linkComposite= new Composite(parent, SWT.NONE);
+					layout= new GridLayout();
+					layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+					layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+					layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+					linkComposite.setLayout(layout);
+
+	        		Link link= new Link(linkComposite, SWT.NONE);
+	        		link.setText(linkMessage);
+	        		link.addSelectionListener(new SelectionAdapter() {
+	        			public void widgetSelected(SelectionEvent e) {
+	        				setReturnCode(settingsId);
+	        				close();
+	        			}
+	        		});
+	        		GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false);
+	        		gridData.widthHint= this.getMinimumMessageWidth();
+					link.setLayoutData(gridData);
+
+					// create checkbox and "don't show this message" prompt
+					super.createCustomArea(parent);
+
+					return parent;
+	        	}
+
+				/*
+				 * @see org.eclipse.jface.dialogs.MessageDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
+				 */
+				protected void createButtonsForButtonBar(Composite parent) {
+			        Button[] buttons= new Button[2];
+					buttons[0]= createButton(parent, restoreId, restoreButtonLabel, false);
+			        buttons[1]= createButton(parent, IDialogConstants.CLOSE_ID, IDialogConstants.CLOSE_LABEL, true);
+			        setButtons(buttons);
+				}
+	        };
+	        int returnValue = dialog.open();
+	        
+	        //based on user actions either reset defaults or open preference dialog
+	        if (restoreId == returnValue || settingsId == returnValue) {
+	        	if (restoreId == returnValue) {
+	        		propertiesExtension.loadDefaults();
+	        		propertiesExtension.saveConfiguration();
+	        	}
+	        	if (settingsId == returnValue) {
+					PreferencesUtil.createPreferenceDialogOn(shell,
+							propertiesExtension.getPropertiesPageID(), null, null).open();
+	        	}
+	        	
+	        	return true;
+	        }
+		}
+		return false;
+	}
+
+	/**
+	 * @return a sorted {@link List} of {@link CompletionProposalCategory}s that
+	 * should be displayed on their own content assist page
+	 */
+	private List getSortedOwnPageCategories() {
+		ArrayList sorted= new ArrayList();
+		for (Iterator it= getProposalCategories().iterator(); it.hasNext();) {
+			CompletionProposalCategory category= (CompletionProposalCategory) it.next();
+			if (category.isDisplayedOnOwnPage(this.fContentTypeID) && 
+					category.hasComputers(fContentTypeID, fPartitionTypeID)) {
+				
+				sorted.add(category);
+			}
+		}
+		Collections.sort(sorted, PAGE_ORDER_COMPARATOR);
+		return sorted;
+	}
+
+	/**
+	 * @return a user message describing that there are no content assist suggestions for the current page
+	 */
+	private String createEmptyMessage() {
+		return NLS.bind(SSEUIMessages.ContentAssist_no_message, new String[]{getCategoryLabel(fRepetition)});
+	}
+
+	/**
+	 * @return user message describing what the next page of content assist holds
+	 */
+	private String createIterationMessage() {
+		return NLS.bind(SSEUIMessages.ContentAssist_toggle_affordance_update_message,
+				new String[]{ getCategoryLabel(fRepetition), fIterationGesture, getCategoryLabel(fRepetition + 1) });
+	}
+
+	/**
+	 * @param repetition which category to get the label for
+	 * @return the label of the category
+	 */
+	private String getCategoryLabel(int repetition) {
+		int iteration= repetition % fCategoryIteration.size();
+		if (iteration == 0)
+			return SSEUIMessages.ContentAssist_defaultProposalCategory_title;
+		return ((CompletionProposalCategory) ((List) fCategoryIteration.get(iteration)).get(0)).getDisplayName();
+	}
+
+	/**
+	 * @return {@link String} representing the user command to iterate to the next page
+	 */
+	private String getIterationGesture() {
+		TriggerSequence binding= getIterationBinding();
+		return binding != null ?
+				NLS.bind(SSEUIMessages.ContentAssist_press, new Object[] { binding.format() })
+				: SSEUIMessages.ContentAssist_click;
+	}
+
+	/**
+	 * @return {@link KeySequence} used by user to iterate to the next page
+	 */
+	private KeySequence getIterationBinding() {
+	    final IBindingService bindingSvc= (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+		TriggerSequence binding= bindingSvc.getBestActiveBindingFor(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+		if (binding instanceof KeySequence)
+			return (KeySequence) binding;
+		return null;
+    }
+	
+	/**
+	 * @return <code>true</code> if displaying first page, <code>false</code> otherwise
+	 */
+	private boolean isFirstPage() {
+		return fCategoryIteration.size() == 1 || fRepetition % fCategoryIteration.size() == 1;
+	}
+	
+	/**
+	 * <p><b>NOTE: </b>This method should be used over accessing the
+	 * {@link #fLegacyExtendedContentAssistProcessors} field directly so as to
+	 * facilitate the lazy initialization of the field.</p>
+	 * 
+	 * @return the legacy extended content assist processors
+	 */
+	private List getLegacyExtendedContentAssistProcessors() {
+		if(fLegacyExtendedContentAssistProcessors == null) {
+			fLegacyExtendedContentAssistProcessors =
+				ExtendedConfigurationBuilder.getInstance().getConfigurations(
+						CONTENT_ASSIST_PROCESSOR_EXTENDED_ID, fPartitionTypeID);
+		}
+		
+		return fLegacyExtendedContentAssistProcessors;
+	}
+	
+	/**
+	 * <p><b>NOTE: </b>This method should be used over accessing the {@link #fCategories}
+	 * field directly so as to facilitate the lazy initialization of the field.</p>
+	 * 
+	 * @return the categories associated with the content type this processor is associated with
+	 */
+	private List getProposalCategories() {
+		if(fCategories == null) {
+			fCategories =
+				CompletionProposalComputerRegistry.getDefault().getProposalCategories(fContentTypeID);
+		}
+		
+		return fCategories;
+	}
+	
+	/**
+	 * The completion listener class for this processor.
+	 */
+	private final class CompletionListener implements ICompletionListener, ICompletionListenerExtension {
+		/**
+		 * @see org.eclipse.jface.text.contentassist.ICompletionListener#assistSessionStarted(org.eclipse.jface.text.contentassist.ContentAssistEvent)
+		 */
+		public void assistSessionStarted(ContentAssistEvent event) {
+			if (event.processor == StructuredContentAssistProcessor.this ||
+					(event.processor instanceof CompoundContentAssistProcessor &&
+							((CompoundContentAssistProcessor)event.processor).containsProcessor(StructuredContentAssistProcessor.this))) {
+				
+				fIterationGesture= getIterationGesture();
+				KeySequence binding= getIterationBinding();
+	
+				// This may show the warning dialog if all categories are disabled
+				resetCategoryIteration();
+				for (Iterator it= StructuredContentAssistProcessor.this.getProposalCategories().iterator(); it.hasNext();) {
+					CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
+					cat.sessionStarted();
+				}
+	
+				fRepetition= 0;
+				if (event.assistant instanceof IContentAssistantExtension2) {
+					IContentAssistantExtension2 extension= (IContentAssistantExtension2) event.assistant;
+	
+					if (fCategoryIteration.size() == 1) {
+						extension.setRepeatedInvocationMode(false);
+						extension.setShowEmptyList(false);
+					} else {
+						extension.setRepeatedInvocationMode(true);
+						extension.setStatusLineVisible(true);
+						extension.setStatusMessage(createIterationMessage());
+						extension.setShowEmptyList(true);
+						if (extension instanceof IContentAssistantExtension3) {
+							IContentAssistantExtension3 ext3= (IContentAssistantExtension3) extension;
+							((ContentAssistant) ext3).setRepeatedInvocationTrigger(binding);
+						}
+					}
+				}
+			}
+		}
+
+		/**
+		 * @see org.eclipse.jface.text.contentassist.ICompletionListener#assistSessionEnded(org.eclipse.jface.text.contentassist.ContentAssistEvent)
+		 */
+		public void assistSessionEnded(ContentAssistEvent event) {
+			if (event.processor == StructuredContentAssistProcessor.this ||	(event.processor instanceof CompoundContentAssistProcessor && ((CompoundContentAssistProcessor)event.processor).containsProcessor(StructuredContentAssistProcessor.this))) {
+				for (Iterator it= StructuredContentAssistProcessor.this.getProposalCategories().iterator(); it.hasNext();) {
+					CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
+					cat.sessionEnded();
+				}
+	
+				fCategoryIteration= null;
+				fRepetition= -1;
+				fIterationGesture= null;
+				if (event.assistant instanceof IContentAssistantExtension2) {
+					IContentAssistantExtension2 extension= (IContentAssistantExtension2) event.assistant;
+					extension.setShowEmptyList(false);
+					extension.setRepeatedInvocationMode(false);
+					extension.setStatusLineVisible(false);
+					if (extension instanceof IContentAssistantExtension3) {
+						IContentAssistantExtension3 ext3= (IContentAssistantExtension3) extension;
+						((ContentAssistant) ext3).setRepeatedInvocationTrigger(null);
+					}
+				}
+			}
+		}
+
+		/**
+		 * @see org.eclipse.jface.text.contentassist.ICompletionListener#selectionChanged(org.eclipse.jface.text.contentassist.ICompletionProposal, boolean)
+		 */
+		public void selectionChanged(ICompletionProposal proposal, boolean smartToggle) {
+			//ignore
+		}
+
+		/**
+		 * @see org.eclipse.jface.text.contentassist.ICompletionListenerExtension#assistSessionRestarted(org.eclipse.jface.text.contentassist.ContentAssistEvent)
+		 */
+		public void assistSessionRestarted(ContentAssistEvent event) {
+			fRepetition= 0;
+		}
+	}
+	
+	/**
+	 * 
+	 */
+	private class TextInputListener implements ITextInputListener {
+
+		/**
+		 * <p>Set the content type based on the new document if it has not already been
+		 * set yet.</p>
+		 * 
+		 * @see org.eclipse.jface.text.ITextInputListener#inputDocumentChanged(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocument)
+		 */
+		public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
+			if(fContentTypeID == null) {
+				if(newInput instanceof IStructuredDocument) {
+					IStructuredModel model = null;
+					try {
+						model = StructuredModelManager.getModelManager().getModelForRead((IStructuredDocument)newInput);
+						if(model != null) {
+							fContentTypeID = model.getContentTypeIdentifier();
+						}
+					} finally {
+						if(model != null) {
+							model.releaseFromRead();
+						}
+					}
+				}
+			}
+		}
+		
+		/**
+		 * <p>Ignored</p>
+		 * 
+		 * @see org.eclipse.jface.text.ITextInputListener#inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocument)
+		 */
+		public void inputDocumentAboutToBeChanged(IDocument oldInput,
+				IDocument newInput) {
+			//ignore
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/AbstractDropAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/AbstractDropAction.java
new file mode 100644
index 0000000..cd54849
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/AbstractDropAction.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
+
+/**
+ */
+public abstract class AbstractDropAction implements IDropAction {
+
+	/*
+	 * Replaces targetEditor's current selection by "text"
+	 */
+	protected boolean insert(String text, IEditorPart targetEditor) {
+		if (text == null || text.length() == 0) {
+			return true;
+		}
+
+		ITextSelection textSelection = null;
+		IDocument doc = null;
+		ISelection selection = null;
+
+		ISourceEditingTextTools tools = (ISourceEditingTextTools) targetEditor.getAdapter(ISourceEditingTextTools.class);
+		if (tools != null) {
+			doc = tools.getDocument();
+			selection = tools.getSelection();
+		}
+
+		ITextEditor textEditor = null;
+		if (targetEditor instanceof ITextEditor) {
+			textEditor = (ITextEditor) targetEditor;
+		}
+		if (textEditor == null) {
+			textEditor = (ITextEditor) ((IAdaptable) targetEditor).getAdapter(ITextEditor.class);
+		}
+		if (textEditor == null && tools != null && tools.getEditorPart() instanceof ITextEditor) {
+			textEditor = (ITextEditor) tools.getEditorPart();
+		}
+		if (textEditor == null && tools != null && tools.getEditorPart() != null) {
+			textEditor = (ITextEditor) tools.getEditorPart().getAdapter(ITextEditor.class);
+		}
+
+		if (selection == null && textEditor != null) {
+			selection = textEditor.getSelectionProvider().getSelection();
+		}
+		if (doc == null && textEditor != null) {
+			doc = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
+		}
+
+		if (selection instanceof ITextSelection) {
+			textSelection = (ITextSelection) selection;
+			try {
+				doc.replace(textSelection.getOffset(), textSelection.getLength(), text);
+			}
+			catch (BadLocationException e) {
+				return false;
+			}
+		}
+		if (textEditor != null && textSelection != null) {
+			ISelectionProvider sp = textEditor.getSelectionProvider();
+			ITextSelection sel = new TextSelection(textSelection.getOffset(), text.length());
+			sp.setSelection(sel);
+			textEditor.selectAndReveal(sel.getOffset(), sel.getLength());
+		}
+
+		return true;
+	}
+
+	public boolean isSupportedData(Object data) {
+		return true;
+	}
+
+	public abstract boolean run(DropTargetEvent event, IEditorPart targetEditor);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/CaretMediator.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/CaretMediator.java
new file mode 100644
index 0000000..33f0311
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/CaretMediator.java
@@ -0,0 +1,284 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.wst.sse.core.internal.util.Debug;
+import org.eclipse.wst.sse.core.internal.util.Utilities;
+import org.eclipse.wst.sse.ui.internal.view.events.CaretEvent;
+import org.eclipse.wst.sse.ui.internal.view.events.ICaretListener;
+
+/**
+ * Has the responsibility of listening for key events, and mouse events,
+ * deciding if the caret has moved (without a text change), and if so, will
+ * notify CaretListeners that the caret has moved. Objects which are
+ * interested in ALL caret postion changes will also have to listen for
+ * textChanged events.
+ * 
+ * @deprecated - use base selection notification
+ */
+public class CaretMediator implements Listener {
+
+	class CaretMediatorListener implements KeyListener, MouseListener {
+		public void keyPressed(KeyEvent e) {
+			internalKeyPressed(e);
+		}
+
+		public void keyReleased(KeyEvent e) {
+			internalKeyReleased(e);
+		}
+
+		public void mouseDoubleClick(MouseEvent e) {
+		}
+
+		public void mouseDown(MouseEvent e) {
+			internalMouseDown(e);
+		}
+
+		public void mouseUp(MouseEvent e) {
+			internalMouseUp(e);
+		}
+	}
+
+	class RefreshDelayJob extends Job {
+		private int fDelay = 0;
+		RefreshDelayJob(int delay) {
+			super(SSEUIMessages.caret_update); //$NON-NLS-1$
+			setSystem(true);
+			fDelay = delay;
+		}
+
+		/**
+		 * Setup a delayed CaretEvent firing
+		 */
+		void touch() {
+			cancel();
+			schedule(fDelay);
+		}
+
+		protected IStatus run(IProgressMonitor monitor) {
+			handleEvent(null);
+			return Status.OK_STATUS;
+		}
+	}
+	
+	RefreshDelayJob fDelayer = null;
+	private static final int DELAY = 300;
+
+	/** used just for debug print outs */
+	private long endTime;
+	private long startTime;
+
+	protected ICaretListener[] fCaretListeners;
+	protected CaretMediatorListener internalListener;
+	protected StyledText textWidget;
+
+	/**
+	 * CaretMediator constructor comment.
+	 */
+	public CaretMediator() {
+		super();
+	}
+
+	/**
+	 * CaretMediator constructor comment. Must always provide the widget its
+	 * supposed to listen to.
+	 */
+	public CaretMediator(StyledText styledTextWidget) {
+		this();
+		setTextWidget(styledTextWidget);
+	}
+
+	public synchronized void addCaretListener(ICaretListener listener) {
+		if (Debug.debugStructuredDocument) {
+			System.out.println("CaretMediator::addCaretListener. Request to add an instance of " + listener.getClass() + " as a listener on caretlistner.");//$NON-NLS-2$//$NON-NLS-1$
+		}
+		// make sure listener is not already in listening array
+		// (and if it is, print a warning to aid debugging, if needed)
+
+		if (Utilities.contains(fCaretListeners, listener)) {
+			if (Debug.displayWarnings) {
+				System.out.println("CaretMediator::addCaretListener. listener " + listener + " was added more than once. ");//$NON-NLS-2$//$NON-NLS-1$
+			}
+		} else {
+			if (Debug.debugStructuredDocument) {
+				System.out.println("CaretMediator::addCaretListener. Adding an instance of " + listener.getClass() + " as a listener on caret mediator.");//$NON-NLS-2$//$NON-NLS-1$
+			}
+			int oldSize = 0;
+			if (fCaretListeners != null) {
+				// normally won't be null, but we need to be sure, for first
+				// time through
+				oldSize = fCaretListeners.length;
+			}
+			int newSize = oldSize + 1;
+			ICaretListener[] newListeners = new ICaretListener[newSize];
+			if (fCaretListeners != null) {
+				System.arraycopy(fCaretListeners, 0, newListeners, 0, oldSize);
+			}
+			// add listener to last position
+			newListeners[newSize - 1] = listener;
+			//
+			// now switch new for old
+			fCaretListeners = newListeners;
+
+		}
+	}
+
+	protected void fireCaretEvent(CaretEvent event) {
+		if (fCaretListeners != null) {
+			// we must assign listeners to local variable to be thread safe,
+			// since the add and remove listner methods
+			// can change this object's actual instance of the listener array
+			// from another thread
+			// (and since object assignment is atomic, we don't need to
+			// synchronize
+			ICaretListener[] holdListeners = fCaretListeners;
+			//
+			for (int i = 0; i < holdListeners.length; i++) {
+				holdListeners[i].caretMoved(event);
+			}
+		}
+	}
+
+	public void handleEvent(Event e) {
+		Display display = null;
+
+		if (Debug.debugCaretMediator) {
+			endTime = System.currentTimeMillis();
+			System.out.println("Timer fired: " + (endTime - startTime)); //$NON-NLS-1$
+		}
+
+		// check if 'okToUse'
+		if (textWidget != null && !textWidget.isDisposed()) {
+			display = textWidget.getDisplay();
+			if ((display != null) && (!display.isDisposed())) {
+				display.asyncExec(new Runnable() {
+					public void run() {
+						if (textWidget != null && !textWidget.isDisposed()) {
+							fireCaretEvent(new CaretEvent(textWidget, textWidget.getCaretOffset()));
+						}
+					}
+				});
+			}
+		}
+	}
+
+	protected void internalKeyPressed(KeyEvent e) {
+		fDelayer.cancel();
+	}
+
+	protected void internalKeyReleased(KeyEvent e) {
+		switch (e.keyCode) {
+			case SWT.ARROW_DOWN :
+			case SWT.ARROW_UP :
+			case SWT.ARROW_LEFT :
+			case SWT.ARROW_RIGHT :
+			case SWT.HOME :
+			case SWT.END :
+			case SWT.PAGE_DOWN :
+			case SWT.PAGE_UP : {
+				fDelayer.touch();
+				break;
+			}
+			default : {
+				// always update cursor postion, even during normal typing
+				// (the logic may look funny, since we always to the same
+				// thing, but we haven't always done the same thing, so I
+				// wanted to leave that fact documented via code.)
+				fDelayer.touch();
+			}
+		}
+	}
+
+	protected void internalMouseDown(MouseEvent e) {
+		fDelayer.cancel();
+	}
+
+	protected void internalMouseUp(MouseEvent e) {
+		// Note, even during a swipe select, when the mouse button goes up,
+		// and the widget is
+		// queried for the current caret postion, it always returns the
+		// beginning of the selection,
+		// which is desirable (at least for the known use of this feature,
+		// which is to signal
+		// that the property sheet can update itself.
+		fDelayer.touch();
+	}
+
+	public void release() {
+		fDelayer.cancel();
+		if (textWidget != null && !textWidget.isDisposed()) {
+			textWidget.removeKeyListener(internalListener);
+			textWidget.removeMouseListener(internalListener);
+			textWidget = null;
+		}
+	}
+
+	public synchronized void removeCaretListener(ICaretListener listener) {
+		if ((fCaretListeners != null) && (listener != null)) {
+			// if its not in the listeners, we'll ignore the request
+			if (Utilities.contains(fCaretListeners, listener)) {
+				int oldSize = fCaretListeners.length;
+				int newSize = oldSize - 1;
+				ICaretListener[] newListeners = new ICaretListener[newSize];
+				int index = 0;
+				for (int i = 0; i < oldSize; i++) {
+					if (fCaretListeners[i] == listener) { // ignore
+					} else {
+						// copy old to new if its not the one we are removing
+						newListeners[index++] = fCaretListeners[i];
+					}
+				}
+				// now that we have a new array, let's switch it for the old
+				// one
+				fCaretListeners = newListeners;
+			}
+		}
+	}
+
+	public void setTextWidget(StyledText newTextWidget) {
+		if(fDelayer == null) {
+			fDelayer = new RefreshDelayJob(DELAY);
+		}
+
+		// unhook from previous, if any
+		if (this.textWidget != null) {
+			fDelayer.cancel();
+			this.textWidget.removeKeyListener(internalListener);
+			this.textWidget.removeMouseListener(internalListener);
+		}
+
+		this.textWidget = newTextWidget;
+
+		if (internalListener == null) {
+			internalListener = new CaretMediatorListener();
+		}
+
+		if (this.textWidget != null) {
+			this.textWidget.addKeyListener(internalListener);
+			this.textWidget.addMouseListener(internalListener);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java
new file mode 100644
index 0000000..8ec6fa8
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.wst.sse.core.utils.StringUtils;
+import org.eclipse.wst.sse.ui.internal.extension.RegistryReader;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * Simple generic ID to class to mapping. Loads a specified class defined in a
+ * configuration element with the matching type and target ID. Example
+ * plugin.xml section:
+ * 
+ * &lt;extension
+ * point=&quot;org.eclipse.wst.sse.ui.editorConfiguration&quot;&gt;contentoutlineconfiguration
+ * target=&quot;org.eclipse.wst.sse.dtd.core.dtdsource&quot;
+ * class=&quot;org.eclipse.wst.sse.ui.dtd.views.contentoutline.DTDContentOutlineConfiguration&quot;/&gt;
+ * &lt;/extension&gt;
+ * 
+ * Used in code by getConfiguration(&quot;contentoutlineconfiguration&quot;,
+ * &quot;org.eclipse.wst.dtd.ui.StructuredTextEditorDTD&quot;);
+ * 
+ */
+public class ExtendedConfigurationBuilder extends RegistryReader {
+	/**
+	 * Extension type to pass into getConfigurations to get content outline
+	 * configuration
+	 */
+	public static final String CONTENTOUTLINECONFIGURATION = "contentOutlineConfiguration"; //$NON-NLS-1$
+	/**
+	 * Extension type to pass into getConfigurations to get property sheet
+	 * configuration
+	 */
+	public static final String PROPERTYSHEETCONFIGURATION = "propertySheetConfiguration"; //$NON-NLS-1$
+	/**
+	 * Extension type to pass into getConfigurations to get source viewer
+	 * configuration
+	 */
+	public static final String SOURCEVIEWERCONFIGURATION = "sourceViewerConfiguration"; //$NON-NLS-1$
+	/**
+	 * Extension type to pass into getConfigurations to get documentation text
+	 * hover
+	 */
+	public static final String DOCUMENTATIONTEXTHOVER = "documentationTextHover"; //$NON-NLS-1$
+	/**
+	 * Extension type to pass into getConfigurations to get double click
+	 * strategy
+	 */
+	public static final String DOUBLECLICKSTRATEGY = "doubleClickStrategy"; //$NON-NLS-1$
+	/**
+	 * Extension type to pass into getConfigurations to get quick outline
+	 * configuration
+	 */
+	public static final String QUICKOUTLINECONFIGURATION = "quickOutlineConfiguration"; //$NON-NLS-1$
+
+	private static final String ATT_CLASS = "class"; //$NON-NLS-1$
+	private static final String ATT_TARGET = "target"; //$NON-NLS-1$
+	private static final String ATT_TYPE = "type"; //$NON-NLS-1$
+	private static final String CONFIGURATION = "provisionalConfiguration"; //$NON-NLS-1$
+	private static Map configurationMap = null;
+	private final static boolean debugTime = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/extendedconfigurationbuilder/time")); //$NON-NLS-1$  //$NON-NLS-2$
+	private static final String DEFINITION = "provisionalDefinition"; //$NON-NLS-1$
+	private static final String EP_EXTENDEDCONFIGURATION = "editorConfiguration"; //$NON-NLS-1$
+	private static ExtendedConfigurationBuilder instance = null;
+	public static final String VALUE = "value"; //$NON-NLS-1$
+
+	/**
+	 * Creates an extension. If the extension plugin has not been loaded a
+	 * busy cursor will be activated during the duration of the load.
+	 * 
+	 * @param element
+	 *            the config element defining the extension
+	 * @param classAttribute
+	 *            the name of the attribute carrying the class
+	 * @returns the extension object if successful. If an error occurs when
+	 *          createing executable extension, the exception is logged, and
+	 *          null returned.
+	 */
+	static Object createExtension(final IConfigurationElement element, final String classAttribute, final String targetID) {
+		final Object[] result = new Object[1];
+		String pluginId = element.getDeclaringExtension().getNamespace();
+		Bundle bundle = Platform.getBundle(pluginId);
+		if (bundle.getState() == Bundle.ACTIVE) {
+			try {
+				result[0] = element.createExecutableExtension(classAttribute);
+			}
+			catch (Exception e) {
+				// catch and log ANY exception while creating the extension
+				Logger.logException("error loading class " + classAttribute + " for " + targetID, e); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+		else {
+			BusyIndicator.showWhile(null, new Runnable() {
+				public void run() {
+					try {
+						result[0] = element.createExecutableExtension(classAttribute);
+					}
+					catch (Exception e) {
+						// catch and log ANY exception from extension point
+						Logger.logException("error loading class " + classAttribute + " for " + targetID, e); //$NON-NLS-1$ //$NON-NLS-2$
+					}
+				}
+			});
+		}
+		return result[0];
+	}
+
+	public synchronized static ExtendedConfigurationBuilder getInstance() {
+		if (instance == null)
+			instance = new ExtendedConfigurationBuilder();
+		return instance;
+	}
+
+	long time0 = 0;
+
+	private ExtendedConfigurationBuilder() {
+		super();
+	}
+
+	private List createConfigurations(List configurations, String extensionType, String targetID) {
+		if (configurations == null)
+			return new ArrayList(0);
+		List result = new ArrayList(1);
+		for (int i = 0; i < configurations.size(); i++) {
+			IConfigurationElement element = (IConfigurationElement) configurations.get(i);
+			if ((element.getName().equals(extensionType) || (element.getName().equals(CONFIGURATION) && extensionType.equals(element.getAttribute(ATT_TYPE))))) {
+				String[] targets = StringUtils.unpack(element.getAttribute(ATT_TARGET));
+				for (int j = 0; j < targets.length; j++) {
+					if (targetID.equals(targets[j].trim())) {
+						Object o = createExtension(element, ATT_CLASS, targetID);
+						if (o != null) {
+							result.add(o);
+						}
+					}
+				}
+			}
+		}
+		return result;
+	}
+
+	private IConfigurationElement[] findConfigurationElements(List configurations, String extensionType, String targetID) {
+		if (configurations == null)
+			return new IConfigurationElement[0];
+		List result = new ArrayList(1);
+		for (int i = 0; i < configurations.size(); i++) {
+			IConfigurationElement element = (IConfigurationElement) configurations.get(i);
+			if ((element.getName().equals(extensionType) || (element.getName().equals(DEFINITION) && extensionType.equals(element.getAttribute(ATT_TYPE))))) {
+				String[] targets = StringUtils.unpack(element.getAttribute(ATT_TARGET));
+				for (int j = 0; j < targets.length; j++) {
+					if (targetID.equals(targets[j].trim())) {
+						result.add(element);
+					}
+				}
+			}
+		}
+		return (IConfigurationElement[]) result.toArray(new IConfigurationElement[0]);
+	}
+
+	/**
+	 * Returns a configuration for the given extensionType matching the
+	 * targetID, if one is available. If more than one configuration is
+	 * defined, the first one found is returned.
+	 * 
+	 * @param extensionType
+	 * @param targetID
+	 * @return a configuration object, if one was defined
+	 */
+	public Object getConfiguration(String extensionType, String targetID) {
+		if (targetID == null || targetID.length() == 0)
+			return null;
+		List configurations = getConfigurations(extensionType, targetID);
+		if (configurations.isEmpty())
+			return null;
+		return configurations.get(0);
+	}
+
+	/**
+	 * Returns all configurations for the given extensionType matching the
+	 * targetID, if any are available.
+	 * 
+	 * @param extensionType
+	 * @param targetID
+	 * @return a List of configuration objects, which may or may not be empty
+	 */
+	public List getConfigurations(String extensionType, String targetID) {
+		if (targetID == null || targetID.length() == 0)
+			return new ArrayList(0);
+		if (configurationMap == null) {
+			configurationMap = new HashMap(0);
+			synchronized (configurationMap) {
+				readRegistry(Platform.getExtensionRegistry(), SSEUIPlugin.ID, EP_EXTENDEDCONFIGURATION);
+				if (debugTime) {
+					System.out.println(getClass().getName() + "#readRegistry():  " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+					time0 = System.currentTimeMillis();
+				}
+			}
+		}
+		List extensions = (List) configurationMap.get(extensionType);
+		List configurations = createConfigurations(extensions, extensionType, targetID);
+		if (debugTime) {
+			if (!configurations.isEmpty())
+				System.out.println(getClass().getName() + "#getConfiguration(" + extensionType + ", " + targetID + "): configurations loaded in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			else
+				System.out.println(getClass().getName() + "#getConfiguration(" + extensionType + ", " + targetID + "): ran in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		}
+		return configurations;
+	}
+
+	/**
+	 * Returns all declared definitions for the given extensionType matching
+	 * the targetID, if any are available.
+	 * 
+	 * @param extensionType
+	 * @param targetID
+	 * @return An array containing the definitions, empty if none were
+	 *         declared
+	 */
+	public String[] getDefinitions(String extensionType, String targetID) {
+		if (targetID == null || targetID.length() == 0)
+			return new String[0];
+		if (debugTime) {
+			time0 = System.currentTimeMillis();
+		}
+		if (configurationMap == null) {
+			configurationMap = new HashMap(0);
+			synchronized (configurationMap) {
+				readRegistry(Platform.getExtensionRegistry(), SSEUIPlugin.ID, EP_EXTENDEDCONFIGURATION);
+				if (debugTime) {
+					System.out.println(getClass().getName() + "#readRegistry():  " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+					time0 = System.currentTimeMillis();
+				}
+			}
+		}
+		List definitions = (List) configurationMap.get(extensionType);
+		IConfigurationElement[] elements = findConfigurationElements(definitions, extensionType, targetID);
+		String[] values = new String[elements.length];
+		for (int i = 0; i < values.length; i++) {
+			values[i] = elements[i].getAttribute(VALUE);
+		}
+		if (debugTime) {
+			if (values.length > 0)
+				System.out.println(getClass().getName() + "#getDefinitions(" + extensionType + ", " + targetID + "): definition loaded in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			else
+				System.out.println(getClass().getName() + "#getDefinitions(" + extensionType + ", " + targetID + "): ran in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		}
+		return values;
+	}
+
+	protected boolean readElement(IConfigurationElement element) {
+		String name = element.getName();
+		if (name.equals(CONFIGURATION) || name.equals(DEFINITION))
+			name = element.getAttribute(ATT_TYPE);
+		List configurations = (List) configurationMap.get(name);
+		if (configurations == null) {
+			configurations = new ArrayList(1);
+			configurationMap.put(name, configurations);
+		}
+		configurations.add(element);
+		return true;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedEditorActionBuilder.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedEditorActionBuilder.java
new file mode 100644
index 0000000..0277646
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedEditorActionBuilder.java
@@ -0,0 +1,789 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IKeyBindingService;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.part.MultiPageEditorSite;
+import org.eclipse.ui.texteditor.IUpdate;
+import org.eclipse.wst.sse.ui.internal.extension.ActionDescriptor;
+import org.eclipse.wst.sse.ui.internal.extension.IExtendedEditorActionProxyForDelayLoading;
+import org.eclipse.wst.sse.ui.internal.extension.RegistryReader;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
+
+
+/**
+ * This class reads the registry for extensions that plug into 'editorActions'
+ * extension point.
+ */
+
+public class ExtendedEditorActionBuilder extends RegistryReader {
+
+	public class ExtendedContributor implements IExtendedContributor, IMenuListener {
+		private IExtendedSimpleEditor activeExtendedEditor = null;
+
+		private List cache;
+		private Map map = new HashMap();
+		private IMenuManager menuBar = null;
+
+		private Set menus = new HashSet();
+
+		public ExtendedContributor(List cache) {
+			this.cache = cache;
+		}
+
+		private IExtendedSimpleEditor computeExtendedEditor(final IEditorPart editor) {
+			IExtendedSimpleEditor simpleEditor = null;
+			if (editor instanceof IExtendedSimpleEditor) {
+				simpleEditor = (IExtendedSimpleEditor) editor;
+			}
+			if (editor != null && simpleEditor == null) {
+				final ISourceEditingTextTools tools = (ISourceEditingTextTools) editor.getAdapter(ISourceEditingTextTools.class);
+				if (tools != null) {
+					simpleEditor = new IExtendedSimpleEditor() {
+						public int getCaretPosition() {
+							return tools.getCaretOffset();
+						}
+
+						public IDocument getDocument() {
+							return tools.getDocument();
+						}
+
+						public IEditorPart getEditorPart() {
+							return tools.getEditorPart();
+						}
+
+						public Point getSelectionRange() {
+							ITextSelection selection = tools.getSelection();
+							return new Point(selection.getOffset(), selection.getOffset() + selection.getLength());
+						}
+
+					};
+				}
+			}
+			return simpleEditor;
+		}
+
+		public void contributeToMenu(IMenuManager menu) {
+			menuBar = menu;
+			long time0 = System.currentTimeMillis();
+			for (int i = 0; i < cache.size(); i++) {
+				Object obj = cache.get(i);
+				if (obj instanceof IConfigurationElement) {
+					IConfigurationElement menuElement = (IConfigurationElement) obj;
+					if ((menuElement.getName()).equals(TAG_MENU)) {
+						contributeMenu(menuElement, menu, true);
+						if (debugMenu)
+							System.out.println(getClass().getName() + "#contributeToMenu() added: " + menuElement.getAttribute(ATT_ID)); //$NON-NLS-1$
+					}
+				}
+				else if (obj instanceof ActionDescriptor) {
+					try {
+						ActionDescriptor ad = (ActionDescriptor) obj;
+						IMenuManager mm = contributeMenuAction(ad, menu, true, false);
+						if (mm != null) {
+							map.put(ad.getContributionItem(), mm);
+							mm.addMenuListener(this);
+							menus.add(mm);
+							if (debugMenu)
+								System.out.println(getClass().getName() + "#contributeToMenu() added: " + ad.getId()); //$NON-NLS-1$
+						}
+					}
+					catch (Exception e) {
+						Logger.logException("contributing to menu", e); //$NON-NLS-1$
+					}
+				}
+			}
+			if (debugContributeTime)
+				System.out.println(getClass().getName() + "#contributeToMenu(): ran in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+
+		public void contributeToPopupMenu(IMenuManager menu) {
+			long time0 = System.currentTimeMillis();
+			for (int i = 0; i < cache.size(); i++) {
+				Object obj = cache.get(i);
+				if (obj instanceof IConfigurationElement) {
+					IConfigurationElement menuElement = (IConfigurationElement) obj;
+					if ((menuElement.getName()).equals(TAG_POPUPMENU)) {
+						contributeMenu(menuElement, menu, true);
+					}
+				}
+				else if (obj instanceof ActionDescriptor) {
+					try {
+						ActionDescriptor ad = (ActionDescriptor) obj;
+						IAction a = ad.getAction();
+						if (a instanceof IExtendedEditorAction) {
+							// uncaught exceptions could cause the menu to not
+							// be shown
+							try {
+								if (((ad.getPopupMenuPath() != null) || (ad.getPopupMenuGroup() != null)) && (a instanceof IExtendedEditorActionProxyForDelayLoading)) {
+								    ((IExtendedEditorActionProxyForDelayLoading)a).realize();
+								}
+
+								IExtendedEditorAction eea = (IExtendedEditorAction) a;
+								eea.setActiveExtendedEditor(activeExtendedEditor);
+								eea.update();
+								if (eea.isVisible()) {
+									IMenuManager parent = contributeMenuAction(ad, menu, true, true);
+									if (debugPopup && parent != null)
+										System.out.println(getClass().getName() + "#contributeToPopupMenu() added: " + ad.getId()); //$NON-NLS-1$
+								}
+							}
+							catch (Exception e) {
+								Logger.logException(e);
+							}
+
+						}
+						else {
+							IMenuManager parent = contributeMenuAction(ad, menu, true, true);
+							if (debugPopup && parent != null)
+								System.out.println(getClass().getName() + "#contributeToPopupMenu() added: " + ad.getId()); //$NON-NLS-1$
+						}
+					}
+					catch (Exception e) {
+						Logger.logException("contributing to popup", e); //$NON-NLS-1$
+					}
+				}
+			}
+			if (debugContributeTime)
+				System.out.println(getClass().getName() + "#contributeToPopupMenu(): ran in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+
+		public void contributeToStatusLine(IStatusLineManager manager) {
+			// nothing from here
+		}
+
+		public void contributeToToolBar(IToolBarManager manager) {
+			long time0 = System.currentTimeMillis();
+			for (int i = 0; i < cache.size(); i++) {
+				Object obj = cache.get(i);
+				if (obj instanceof ActionDescriptor) {
+					try {
+						ActionDescriptor ad = (ActionDescriptor) obj;
+						IAction a = ad.getAction();
+						if (a instanceof IExtendedEditorAction) {
+							if (((ad.getToolbarPath() != null) || (ad.getToolbarGroup() != null)) && (a instanceof IExtendedEditorActionProxyForDelayLoading)) {
+							    ((IExtendedEditorActionProxyForDelayLoading)a).realize();
+							}
+							IExtendedEditorAction eea = (IExtendedEditorAction) a;
+							eea.setActiveExtendedEditor(activeExtendedEditor);
+							eea.update();
+							if (eea.isVisible()) {
+								boolean contributed = contributeToolbarAction(ad, manager, true);
+								if (debugToolbar && contributed)
+									System.out.println(getClass().getName() + "#contributeToToolBar() added: " + ad.getId()); //$NON-NLS-1$
+							}
+							else {
+								if (debugToolbar)
+									System.out.println(getClass().getName() + "#contributeToToolBar(): [skipped] " + ad.getId()); //$NON-NLS-1$
+							}
+						}
+						else {
+							boolean contributed = contributeToolbarAction(ad, manager, true);
+							if (debugToolbar && contributed)
+								System.out.println(getClass().getName() + "#contributeToToolBar() added: " + ad.getId()); //$NON-NLS-1$
+						}
+					}
+					catch (Exception e) {
+						Logger.logException("contributing to toolbar", e); //$NON-NLS-1$
+					}
+				}
+			}
+			if (debugContributeTime)
+				System.out.println(getClass().getName() + "#contributeToToolBar(): ran in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+
+		public void dispose() {
+			Iterator it = menus.iterator();
+			while (it.hasNext()) {
+				Object o = it.next();
+				if (o instanceof IMenuManager) {
+					((IMenuManager) o).removeMenuListener(this);
+				}
+			}
+		}
+
+		public void init(IActionBars bars, IWorkbenchPage page) {
+			// nothing from here
+		}
+
+		public void menuAboutToShow(IMenuManager menu) {
+			// slows down the menu and interferes with it for other editors;
+			// optimize on visibility
+			IEditorSite site = null;
+			boolean activeEditorIsVisible = false;
+
+			if (activeExtendedEditor != null && activeExtendedEditor.getEditorPart() != null)
+				site = activeExtendedEditor.getEditorPart().getEditorSite();
+			if (site == null)
+				return;
+
+			// Eclipse bug 48784 - [MPE] ClassCast exception Workbench page
+			// isPartVisiable for MultiPageSite
+			if (site instanceof MultiPageEditorSite) {
+				Object multiPageEditor = ((MultiPageEditorSite) site).getMultiPageEditor();
+				activeEditorIsVisible = multiPageEditor.equals(site.getPage().getActiveEditor()) || multiPageEditor.equals(site.getPage().getActivePart());
+			}
+			else {
+				activeEditorIsVisible = site.getWorkbenchWindow().getPartService().getActivePart().equals(activeExtendedEditor.getEditorPart());
+			}
+			// due to a delay class loading, don't return now
+//			if (!activeEditorIsVisible)
+//				return;
+
+			IContributionItem[] items = menu.getItems();
+			if (items == null || items.length == 0)
+				return;
+
+			for (int i = 0; i < items.length; ++i) {
+				// add menu listener to submenu
+				if (items[i] instanceof IMenuManager) {
+					((IMenuManager) items[i]).addMenuListener(this);
+					menus.add(items[i]);
+				}
+			}
+
+			Set keys = map.keySet();
+			Iterator it = keys.iterator();
+			boolean needActionContributionItemUpdate = false;
+			while (it.hasNext()) {
+				IContributionItem item = (IContributionItem) it.next();
+				IMenuManager mm = (IMenuManager) map.get(item);
+				if (menu.getId() != null && menu.getId().equals(mm.getId()) && item instanceof ActionContributionItem) {
+					try {
+						IAction action = ((ActionContributionItem) item).getAction();
+
+						if (action instanceof IExtendedEditorActionProxyForDelayLoading) {
+						    IExtendedEditorActionProxyForDelayLoading eea = (IExtendedEditorActionProxyForDelayLoading)action;
+						    if (eea.isBundleActive() == true && eea.isRealized() == false) {
+						        eea.realize();
+						        needActionContributionItemUpdate = true;
+						    }
+						}
+
+						if (activeEditorIsVisible || needActionContributionItemUpdate) {
+							if (action instanceof IUpdate) {
+								((IUpdate) action).update();
+							}
+						}
+
+						if (activeEditorIsVisible || needActionContributionItemUpdate) {
+							boolean visible = true;
+							if (action instanceof IExtendedEditorAction) {
+								visible = ((IExtendedEditorAction) action).isVisible();
+							}
+							item.setVisible(visible);
+						}
+
+						if (needActionContributionItemUpdate) {
+						    ((ActionContributionItem)item).update();
+						}
+
+					}
+					catch (Exception e) {
+						Logger.logException("updating actions", e); //$NON-NLS-1$
+					}
+				}
+			}
+			if (activeEditorIsVisible || needActionContributionItemUpdate) {
+			    if (needActionContributionItemUpdate) {
+			        // the action is realized so that need to update the menu w/
+			        // force set to true
+			        menu.update(true);
+			    } else {
+			        menu.update(false);
+			    }
+			}
+		}
+
+		public void setActiveEditor(IEditorPart editor) {
+			activeExtendedEditor = computeExtendedEditor(editor);
+			IKeyBindingService svc = (editor != null) ? editor.getEditorSite().getKeyBindingService() : null;
+			for (int i = 0; i < cache.size(); i++) {
+				Object obj = cache.get(i);
+				if (obj instanceof ActionDescriptor) {
+					ActionDescriptor ad = (ActionDescriptor) obj;
+					try {
+						IAction action = ad.getAction();
+						if (action instanceof IExtendedEditorAction) {
+							((IExtendedEditorAction) action).setActiveExtendedEditor(activeExtendedEditor);
+							((IExtendedEditorAction) action).update();
+							// update visibility right now so that the menu
+							// will show/hide properly
+							if (!((IExtendedEditorAction) action).isVisible() && ad.getContributionItem() != null)
+								ad.getContributionItem().setVisible(false);
+							if (svc != null && action.getActionDefinitionId() != null) {
+								svc.registerAction(action);
+							}
+						}
+					}
+					catch (Exception e) {
+						Logger.logException("setting active editor on actions", e); //$NON-NLS-1$
+					}
+				}
+			}
+
+			if (menuBar != null && editor != null) {
+				// Class clz = editor.getClass();
+				// while (clz != null) {
+				// if (clz.getName().equals(targetID)) {
+				// contributeToMenu(menuBar);
+				// break;
+				// }
+				// clz = clz.getSuperclass();
+				// }
+				if (targetIDs.contains(editor.getEditorSite().getId())) {
+					contributeToMenu(menuBar);
+				}
+			}
+
+			updateToolbarActions();
+		}
+
+		public void updateToolbarActions() {
+			for (int i = 0; i < cache.size(); i++) {
+				Object obj = cache.get(i);
+				if (obj instanceof ActionDescriptor) {
+					try {
+						ActionDescriptor ad = (ActionDescriptor) obj;
+						if (ad.getToolbarPath() != null) {
+							IAction action = ad.getAction();
+							if (action instanceof IUpdate) {
+								((IUpdate) action).update();
+							}
+						}
+					}
+					catch (Exception e) {
+						Logger.logException("updating toolbar actions", e); //$NON-NLS-1$
+					}
+				}
+			}
+		}
+	}
+
+	public static final String ATT_ID = "id"; //$NON-NLS-1$
+	public static final String ATT_LABEL = "label"; //$NON-NLS-1$
+	public static final String ATT_NAME = "name"; //$NON-NLS-1$
+	public static final String ATT_PATH = "path"; //$NON-NLS-1$
+
+	public static final String ATT_TARGET_ID = "targetID"; //$NON-NLS-1$
+	protected final static boolean debugContributeTime = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/extendededitoractionbuilder/contributetime")); //$NON-NLS-1$  //$NON-NLS-2$
+
+	protected final static boolean debugMenu = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/extendededitoractionbuilder/debugmenu")); //$NON-NLS-1$  //$NON-NLS-2$;
+	protected final static boolean debugPopup = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/extendededitoractionbuilder/debugpopup")); //$NON-NLS-1$  //$NON-NLS-2$;
+	protected final static boolean debugReadTime = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/extendededitoractionbuilder/readtime")); //$NON-NLS-1$  //$NON-NLS-2$
+	protected final static boolean debugToolbar = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/extendededitoractionbuilder/debugtoolbar")); //$NON-NLS-1$  //$NON-NLS-2$;
+
+	private static final String EXTENDED_EDITOR = "extendedEditor"; //$NON-NLS-1$
+
+	public static final String PL_EXTENDED_EDITOR_ACTIONS = "extendedEditorActions"; //$NON-NLS-1$
+
+	public static final String PLUGIN_ID = "org.eclipse.wst.sse.ui"; //$NON-NLS-1$
+	public static final String TAG_ACTION = "action"; //$NON-NLS-1$
+
+	public static final String TAG_CONTRIBUTION_TYPE = "editorContribution"; //$NON-NLS-1$
+
+	public static final String TAG_MENU = "menu"; //$NON-NLS-1$
+	public static final String TAG_POPUPMENU = "popupmenu"; //$NON-NLS-1$
+	public static final String TAG_RULERMENU = "rulermenu"; //$NON-NLS-1$
+	public static final String TAG_SEPARATOR = "separator"; //$NON-NLS-1$
+
+	protected List readingCache;
+
+	protected String targetContributionTag;
+	protected List targetIDs;
+
+	/**
+	 * The constructor.
+	 */
+	public ExtendedEditorActionBuilder() {
+		super();
+	}
+
+	/**
+	 * Creates a menu from the information in the menu configuration element
+	 * and adds it into the provided menu manager. If 'appendIfMissing' is
+	 * true, and menu path slot is not found, it will be created and menu will
+	 * be added into it. Otherwise, add operation will fail.
+	 */
+	protected void contributeMenu(IConfigurationElement menuElement, IMenuManager mng, boolean appendIfMissing) {
+		// Get config data.
+		String id = menuElement.getAttribute(ATT_ID);
+		String label = menuElement.getAttribute(ATT_LABEL);
+		String path = menuElement.getAttribute(ATT_PATH);
+		if (label == null) {
+			Logger.log(Logger.ERROR, "Invalid Menu Extension (label == null): " + id); //$NON-NLS-1$
+			return;
+		}
+
+		// Calculate menu path and group.
+		String group = null;
+		if (path != null) {
+			int loc = path.lastIndexOf('/');
+			if (loc != -1) {
+				group = path.substring(loc + 1);
+				path = path.substring(0, loc);
+			}
+			else {
+				// assume that path represents a slot
+				// so actual path portion should be null
+				group = path;
+				path = null;
+			}
+		}
+
+		// Find parent menu.
+		IMenuManager parent = mng;
+		if (path != null) {
+			parent = mng.findMenuUsingPath(path);
+			if (parent == null) {
+				// Logger.log("Invalid Menu Extension (Path is invalid): " +
+				// id);//$NON-NLS-1$
+				return;
+			}
+			// IMenuManager.findMenuUsingPath() returns invisible menu item if
+			// the manager can't find
+			// the specified path and create new MenuManager for it.
+			// I don't know this is a specification or bug.
+			// Anyway, to ensure the menu can be visible, setVisible(true)
+			// needs to be called.
+			parent.setVisible(true);
+		}
+
+		// Find reference group.
+		if (group == null)
+			group = IWorkbenchActionConstants.MB_ADDITIONS;
+		IContributionItem sep = parent.find(group);
+		if (sep == null) {
+			if (appendIfMissing)
+				parent.add(new Separator(group));
+			else {
+				Logger.log(Logger.ERROR, "Invalid Menu Extension (Group is invalid): " + id); //$NON-NLS-1$
+				return;
+			}
+		}
+
+		// If the menu does not exist create it.
+		IMenuManager newMenu = parent.findMenuUsingPath(id);
+		if (newMenu == null)
+			newMenu = new MenuManager(label, id);
+
+		// Create separators.
+		IConfigurationElement[] children = menuElement.getChildren(TAG_SEPARATOR);
+		for (int i = 0; i < children.length; i++) {
+			contributeSeparator(newMenu, children[i]);
+		}
+
+		// Add new menu
+		try {
+			parent.insertAfter(group, newMenu);
+		}
+		catch (IllegalArgumentException e) {
+			Logger.log(Logger.ERROR, "Invalid Menu Extension (Group is missing): " + id); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Contributes action from action descriptor into the provided menu
+	 * manager.
+	 */
+	protected IMenuManager contributeMenuAction(ActionDescriptor ad, IMenuManager menu, boolean appendIfMissing, boolean popupmenu) {
+		if (ad.getContributionItem() == null || ad.getAction() == null)
+			return null;
+
+		// Get config data.
+		String mpath = popupmenu ? ad.getPopupMenuPath() : ad.getMenuPath();
+		String mgroup = popupmenu ? ad.getPopupMenuGroup() : ad.getMenuGroup();
+		if (mpath == null && mgroup == null)
+			return null;
+
+		// Find parent menu.
+		IMenuManager parent = menu;
+		if (mpath != null) {
+			parent = parent.findMenuUsingPath(mpath);
+			if (parent == null) {
+				// Logger.log("Invalid Menu Extension (Path is invalid): " +
+				// ad.getId()); //$NON-NLS-1$
+				return null;
+			}
+			// IMenuManager.findMenuUsingPath() returns invisible menu item if
+			// the manager can't find
+			// the specified path and create new MenuManager for it.
+			// I don't know this is a specification or bug.
+			// Anyway, to ensure the menu can be visible, setVisible(true)
+			// needs to be called.
+			parent.setVisible(true);
+		}
+
+		// First remove existing menu item
+		IContributionItem item = parent.find(ad.getId());
+		if (item != null) {
+			parent.remove(ad.getId());
+		}
+
+		// Find reference group.
+		if (mgroup == null)
+			mgroup = IWorkbenchActionConstants.MB_ADDITIONS;
+		IContributionItem sep = parent.find(mgroup);
+		if (sep == null) {
+			if (appendIfMissing)
+				parent.add(sep = new Separator(mgroup));
+			else {
+				Logger.log(Logger.ERROR, "Invalid Menu Extension (Group is invalid): " + ad.getId()); //$NON-NLS-1$
+				return null;
+			}
+		}
+
+		// Add action.
+		try {
+			if (popupmenu) {
+				// Context menu need a newly created contribution item
+				if (sep != null && sep.isGroupMarker())
+					parent.appendToGroup(sep.getId(), ad.getAction());
+				else
+					parent.insertAfter(mgroup, ad.getAction());
+			}
+			else {
+				// Normal menu need to add existing contribution item to
+				// remove it from menu listener
+				if (sep != null && sep.isGroupMarker())
+					parent.appendToGroup(sep.getId(), ad.getContributionItem());
+				else
+					parent.insertAfter(mgroup, ad.getContributionItem());
+			}
+		}
+		catch (IllegalArgumentException e) {
+			Logger.log(Logger.ERROR, "Invalid Menu Extension (Group is missing): " + ad.getId()); //$NON-NLS-1$
+			parent = null;
+		}
+
+		return parent;
+	}
+
+	/**
+	 * Creates a named menu separator from the information in the
+	 * configuration element. If the separator already exists do not create a
+	 * second.
+	 */
+	protected boolean contributeSeparator(IMenuManager menu, IConfigurationElement element) {
+		String id = element.getAttribute(ATT_NAME);
+		if (id == null || id.length() <= 0)
+			return false;
+		IContributionItem sep = menu.find(id);
+		if (sep != null)
+			return false;
+		menu.add(new Separator(id));
+		return true;
+	}
+
+	/**
+	 * Contributes action from the action descriptor into the provided tool
+	 * bar manager.
+	 */
+	protected boolean contributeToolbarAction(ActionDescriptor ad, IToolBarManager toolbar, boolean appendIfMissing) {
+		if (ad.getContributionItem() == null || ad.getAction() == null)
+			return false;
+
+		// Get config data.
+		String tpath = ad.getToolbarPath();
+		String tgroup = ad.getToolbarGroup();
+		if (tpath == null && tgroup == null)
+			return false;
+
+		// First remove existing toolbar item
+		IContributionItem item = toolbar.find(ad.getId());
+		if (item != null) {
+			toolbar.remove(ad.getId());
+		}
+
+		// Find reference group.
+		if (tgroup == null)
+			tgroup = IWorkbenchActionConstants.MB_ADDITIONS;
+		IContributionItem sep = toolbar.find(tgroup);
+		if (sep == null) {
+			if (appendIfMissing)
+				toolbar.add(new Separator(tgroup));
+			else {
+				Logger.log(Logger.ERROR, "Invalid Toolbar Extension (Group is invalid): " + ad.getId()); //$NON-NLS-1$
+				return false;
+			}
+		}
+
+		// Add action to tool bar.
+		try {
+			if (sep != null && sep.isGroupMarker())
+				toolbar.appendToGroup(sep.getId(), ad.getAction());
+			else
+				toolbar.insertAfter(tgroup, ad.getAction());
+		}
+		catch (IllegalArgumentException e) {
+			Logger.log(Logger.ERROR, "Invalid Toolbar Extension (Group is missing): " + ad.getId()); //$NON-NLS-1$
+			return false;
+		}
+		return true;
+	}
+
+	/**
+	 * This factory method returns a new ActionDescriptor for the
+	 * configuration element. It should be implemented by subclasses.
+	 */
+	protected ActionDescriptor createActionDescriptor(IConfigurationElement element) {
+		ActionDescriptor ad = null;
+		try {
+			ad = new ActionDescriptor(element);
+			// these cases like "class not found" are handled
+			// at lower level, so no action if formed. In that
+			// case, we also don't want to form an action descriptor.
+			if ((ad != null) && (ad.getAction() == null)) {
+				ad = null;
+			}
+		}
+		catch (Exception e) {
+			Logger.traceException(EXTENDED_EDITOR, e);
+			ad = null;
+		}
+		return ad;
+	}
+
+	/**
+	 * Returns the name of the part ID attribute that is expected in the
+	 * target extension.
+	 */
+	protected String getTargetID(IConfigurationElement element) {
+		String value = element.getAttribute(ATT_TARGET_ID);
+		return value != null ? value : "???"; //$NON-NLS-1$
+	}
+
+	/**
+	 * Reads editor contributor if specified directly in the 'editor'
+	 * extension point, and all external contributions for this editor's ID
+	 * registered in 'editorActions' extension point.
+	 */
+	public IExtendedContributor readActionExtensions(String editorId) {
+		return readActionExtensions(new String[]{editorId});
+	}
+
+	/**
+	 * Reads editor contributor if specified directly in the 'editor'
+	 * extension point, and all external contributions for this editor's ID
+	 * registered in 'editorActions' extension point.
+	 */
+	public IExtendedContributor readActionExtensions(String[] ids) {
+		long time0 = System.currentTimeMillis();
+		ExtendedContributor ext = null;
+		readContributions(ids, TAG_CONTRIBUTION_TYPE, PL_EXTENDED_EDITOR_ACTIONS);
+		if (debugReadTime) {
+			String idlist = ""; //$NON-NLS-1$
+			if (ids.length > 0) {
+				for (int i = 0; i < ids.length; i++) {
+					idlist += ids[i];
+					if (i < ids.length - 1)
+						idlist += ","; //$NON-NLS-1$
+				}
+			}
+			System.out.println(getClass().getName() + "#readActionExtensions(" + idlist + "): read in " + (System.currentTimeMillis() - time0) + "ms [" + (readingCache != null ? readingCache.size() : 0) + " contributions]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		}
+		if (readingCache != null) {
+			ext = new ExtendedContributor(readingCache);
+			readingCache = null;
+		}
+		return ext;
+	}
+
+	/**
+	 * Reads the contributions from the registry for the provided workbench
+	 * part and the provided extension point IDs.
+	 */
+	protected void readContributions(String[] ids, String tag, String extensionPoint) {
+		readingCache = null;
+		targetIDs = Arrays.asList(ids);
+		targetContributionTag = tag;
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		readRegistry(registry, PLUGIN_ID, extensionPoint);
+	}
+
+	/**
+	 * Implements abstract method to handle the provided XML element in the
+	 * registry.
+	 */
+	protected boolean readElement(IConfigurationElement element) {
+		String tag = element.getName();
+		if (tag.equals(targetContributionTag)) {
+			String id = getTargetID(element);
+			if (id == null || !targetIDs.contains(id)) {
+				// This is not of interest to us - don't go deeper
+				return true;
+			}
+		}
+		else if (tag.equals(TAG_MENU)) {
+			if (readingCache == null)
+				readingCache = new ArrayList();
+			readingCache.add(element);
+			return true; // just cache the element - don't go into it
+		}
+		else if (tag.equals(TAG_POPUPMENU)) {
+			if (readingCache == null)
+				readingCache = new ArrayList();
+			readingCache.add(element);
+			return true; // just cache the element - don't go into it
+		}
+		else if (tag.equals(TAG_RULERMENU)) {
+			if (readingCache == null)
+				readingCache = new ArrayList();
+			readingCache.add(element);
+			return true; // just cache the element - don't go into it
+		}
+		else if (tag.equals(TAG_ACTION)) {
+			if (readingCache == null)
+				readingCache = new ArrayList();
+			ActionDescriptor ad = createActionDescriptor(element);
+			if (ad != null)
+				readingCache.add(ad);
+			return true; // just cache the action - don't go into
+		}
+		else {
+			return false;
+		}
+
+		readElementChildren(element);
+		return true;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedEditorDropTargetAdapter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedEditorDropTargetAdapter.java
new file mode 100644
index 0000000..bf0b04e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedEditorDropTargetAdapter.java
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetAdapter;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.TransferBuilder.TransferProxyForDelayLoading;
+
+/**
+ * ExtendedEditorDropTargetAdapter
+ */
+public class ExtendedEditorDropTargetAdapter extends DropTargetAdapter {
+	private String[] editorIds;
+	private Point originalRange = null;
+	private IEditorPart targetEditor = null;
+	private ITextViewer textViewer = null;
+
+	private Transfer[] transfers = null;
+
+	private boolean useProxy;
+
+	/**
+	 * @deprecated use ExtendedEditorDropTargetAdapter(boolean useProxy) for
+	 *             the performance
+	 */
+	public ExtendedEditorDropTargetAdapter() {
+		this(false);
+	}
+
+	public ExtendedEditorDropTargetAdapter(boolean useProxy) {
+		super();
+		this.useProxy = useProxy;
+	}
+
+	protected boolean doDrop(Transfer transfer, DropTargetEvent event) {
+		TransferBuilder tb = new TransferBuilder(useProxy);
+
+		IDropAction[] as = null;
+		if (editorIds != null && editorIds.length > 0)
+			as = tb.getDropActions(editorIds, transfer);
+		else
+			as = tb.getDropActions(getTargetEditor().getClass().getName(), transfer);
+
+		for (int i = 0; i < as.length; ++i) {
+			IDropAction da = as[i];
+			Transfer actualTransfer;
+			if (transfer instanceof TransferProxyForDelayLoading) {
+				actualTransfer = ((TransferProxyForDelayLoading) transfer).getTransferClass();
+			}
+			else {
+				actualTransfer = transfer;
+			}
+			if (actualTransfer instanceof FileTransfer) {
+				if (event.data == null) {
+					Logger.log(Logger.ERROR, "No data in DropTargetEvent from " + event.widget); //$NON-NLS-1$
+					return false;
+				}
+				String[] strs = (String[]) event.data;
+				boolean[] bs = new boolean[strs.length];
+				int c = 0;
+				for (int j = 0; j < strs.length; ++j) {
+					bs[j] = false;
+					if (da.isSupportedData(strs[j])) {
+						event.data = new String[]{strs[j]};
+						if (!da.run(event, targetEditor)) {
+							bs[j] = true;
+							c++;
+						}
+					}
+					else {
+						bs[j] = true;
+						c++;
+					}
+				}
+				if (c == 0) {
+					return true;
+				}
+
+				int k = 0;
+				String[] rests = new String[c];
+				for (int j = 0; j < strs.length; ++j) {
+					if (bs[j])
+						rests[k++] = strs[j];
+				}
+				event.data = rests;
+			}
+			else if (da.isSupportedData(event.data)) {
+				if (da.run(event, targetEditor)) {
+					return true;
+				}
+			}
+		}
+
+		return false;
+	}
+
+	/**
+	 */
+	public void dragEnter(DropTargetEvent event) {
+		TransferData data = null;
+		Transfer[] ts = getTransfers();
+		for (int i = 0; i < ts.length; i++) {
+			for (int j = 0; j < event.dataTypes.length; j++) {
+				if (ts[i].isSupportedType(event.dataTypes[j])) {
+					data = event.dataTypes[j];
+					break;
+				}
+			}
+			if (data != null) {
+				event.currentDataType = data;
+				break;
+			}
+		}
+
+		if (textViewer != null) {
+			originalRange = textViewer.getSelectedRange();
+		}
+	}
+
+	public void dragLeave(DropTargetEvent event) {
+		if (textViewer != null) {
+			textViewer.setSelectedRange(originalRange.x, originalRange.y);
+		}
+		else {
+			originalRange = null;
+		}
+	}
+
+	/**
+	 * Scroll the visible area as needed
+	 */
+	public void dragOver(DropTargetEvent event) {
+		event.operations &= ~DND.DROP_MOVE;
+		event.detail = DND.DROP_COPY;
+		event.feedback |= DND.FEEDBACK_SCROLL;
+	}
+
+	/**
+	 */
+	public void drop(DropTargetEvent event) {
+		if (event.operations == DND.DROP_NONE)
+			return;
+
+		Transfer[] ts = getTransfers();
+		for (int i = 0; i < ts.length; i++) {
+			if (ts[i].isSupportedType(event.currentDataType)) {
+				if (doDrop(ts[i], event)) {
+					IEditorPart part = targetEditor;
+					if (targetEditor instanceof StructuredTextEditor){
+						part = ((StructuredTextEditor) targetEditor).getEditorPart();
+					}
+					targetEditor.getSite().getPage().activate(part);
+					break;
+				}
+			}
+		}
+	}
+
+	public IEditorPart getTargetEditor() {
+		return targetEditor;
+	}
+
+	public ITextViewer getTextViewer() {
+		return textViewer;
+	}
+
+	/**
+	 * @return org.eclipse.swt.dnd.Transfer[]
+	 */
+	public Transfer[] getTransfers() {
+		if (transfers == null) {
+			TransferBuilder tb = new TransferBuilder(useProxy);
+			if (editorIds == null || editorIds.length == 0)
+				transfers = tb.getDropTargetTransfers(getTargetEditor().getClass().getName());
+			else
+				transfers = tb.getDropTargetTransfers(editorIds);
+		}
+		return transfers;
+	}
+
+	/**
+	 */
+	public void setTargetEditor(IEditorPart targetEditor) {
+		this.targetEditor = targetEditor;
+	}
+
+	public void setTargetIDs(String[] ids) {
+		editorIds = ids;
+	}
+
+	public void setTextViewer(ITextViewer textViewer) {
+		this.textViewer = textViewer;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/FileDropAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/FileDropAction.java
new file mode 100644
index 0000000..a68de9e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/FileDropAction.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.ui.IEditorPart;
+
+/**
+ * Action for file drop
+ */
+public class FileDropAction extends AbstractDropAction {
+	public boolean run(DropTargetEvent event, IEditorPart targetEditor) {
+		String[] strs = (String[]) event.data;
+		if (strs == null || strs.length == 0) {
+			return false;
+		}
+
+		String str = ""; //$NON-NLS-1$
+		for (int i = 0; i < strs.length; ++i) {
+			IPath path = new Path(strs[i]);
+			IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+			IFile file = root.getFileForLocation(path);
+			if (file != null) {
+				path = file.getProjectRelativePath();
+			}
+
+			str += "\"" + path.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+		}
+
+		return insert(str, targetEditor);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/FormatProcessorsExtensionReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/FormatProcessorsExtensionReader.java
new file mode 100644
index 0000000..a8f10ab
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/FormatProcessorsExtensionReader.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
+import org.eclipse.wst.sse.ui.internal.extension.RegistryReader;
+import org.osgi.framework.Bundle;
+
+public class FormatProcessorsExtensionReader extends RegistryReader {
+	private static FormatProcessorsExtensionReader instance;
+
+	public synchronized static FormatProcessorsExtensionReader getInstance() {
+		if (instance == null) {
+			instance = new FormatProcessorsExtensionReader();
+
+			IExtensionRegistry registry = Platform.getExtensionRegistry();
+			instance.readRegistry(registry, "org.eclipse.wst.sse.core", "formatProcessors"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		return instance;
+	}
+
+	private Map map = new HashMap();
+//	 TODO: private field never read locally
+	String processorClassName;
+
+	public IStructuredFormatProcessor getFormatProcessor(String contentTypeId) {
+		if (contentTypeId == null)
+			return null;
+
+		IStructuredFormatProcessor formatProcessor = null;
+		if (map.containsKey(contentTypeId)) {
+			formatProcessor = (IStructuredFormatProcessor) map.get(contentTypeId);
+		} else {
+			IContentTypeManager manager = Platform.getContentTypeManager();
+			IContentType queryContentType = manager.getContentType(contentTypeId);
+			boolean found = false;
+			for (Iterator iter = map.keySet().iterator(); iter.hasNext();) {
+				String elementContentTypeId = (String) iter.next();
+				IContentType elementContentType = manager.getContentType(elementContentTypeId);
+				if (queryContentType.isKindOf(elementContentType)) {
+					formatProcessor = (IStructuredFormatProcessor) map.get(elementContentTypeId);
+					map.put(contentTypeId, formatProcessor);
+					found = true;
+					break;
+				}
+			}
+
+			if (!found)
+				map.put(contentTypeId, null);
+		}
+
+		return formatProcessor;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.extension.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
+	 */
+	protected boolean readElement(IConfigurationElement element) {
+		if (element.getName().equals("processor")) { //$NON-NLS-1$
+			String contentTypeId = element.getAttribute("contentTypeId"); //$NON-NLS-1$
+			String processorClassName = element.getAttribute("class"); //$NON-NLS-1$
+			String pluginID = element.getDeclaringExtension().getNamespace();
+			Bundle bundle = Platform.getBundle(pluginID);
+
+			try {
+				IStructuredFormatProcessor processor = (IStructuredFormatProcessor)bundle.loadClass(processorClassName).newInstance();
+				map.put(contentTypeId, processor);
+
+				return true;
+			} catch (InstantiationException e) {
+				e.printStackTrace();
+			} catch (IllegalAccessException e) {
+				e.printStackTrace();
+			} catch (ClassNotFoundException e) {
+				e.printStackTrace();
+			}
+		}
+
+		return false;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/GotoAnnotationAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/GotoAnnotationAction.java
new file mode 100644
index 0000000..67de28a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/GotoAnnotationAction.java
@@ -0,0 +1,378 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IEditorActionBarContributor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.part.EditorActionBarContributor;
+import org.eclipse.ui.texteditor.AnnotationPreference;
+import org.eclipse.ui.texteditor.IEditorStatusLine;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.SimpleMarkerAnnotation;
+import org.eclipse.ui.texteditor.TextEditorAction;
+
+/**
+ * Based on org.eclipse.jdt.internal.ui.javaeditor.GotoAnnotationAction and
+ * the org.eclipse.jdt.internal.ui.JavaEditor's gotoError() method. Rewritten
+ * based on 3.0M7 version to operate generically.
+ * 
+ * @deprecated - use org.eclipse.ui.texteditor.GotoAnnotationAction
+ * 
+ */
+public class GotoAnnotationAction extends TextEditorAction {
+
+	private static final boolean _debug = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/gotoNextAnnotation")); //$NON-NLS-1$  //$NON-NLS-2$
+
+	/**
+	 * Clears the status line on selection changed.
+	 */
+	protected class StatusLineClearer implements ISelectionChangedListener {
+		IStatusLineManager fStatusLineManager = null;
+
+		protected StatusLineClearer(IStatusLineManager mgr) {
+			super();
+			fStatusLineManager = mgr;
+		}
+
+		/*
+		 * @see ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+		 */
+		public void selectionChanged(SelectionChangedEvent event) {
+			getTextEditor().getSelectionProvider().removeSelectionChangedListener(StatusLineClearer.this);
+
+			fStatusLineManager.setErrorMessage(null, null);
+			fStatusLineManager.setMessage(null, null);
+		}
+	}
+
+	private boolean fForward;
+	private String fLabel;
+
+	private String fPrefix;
+
+	/**
+	 * @param prefix
+	 * @param editor
+	 */
+	public GotoAnnotationAction(String prefix, boolean forward) {
+		super(SSEUIMessages.getResourceBundle(), prefix, null);
+		fForward = forward;
+		fPrefix = prefix;
+		fLabel = SSEUIMessages.getResourceBundle().getString(fPrefix);
+	}
+
+	/*
+	 * This is the default label used for description
+	 */
+	public String getDefaultLabel() {
+		return fLabel;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.Action#getDescription()
+	 */
+	public String getDescription() {
+		return getDefaultLabel();
+	}
+
+	/**
+	 * Returns the annotation closest to the given range respecting the given
+	 * direction. If an annotation is found, the annotations current position
+	 * is copied into the provided annotation position.
+	 * 
+	 * @param offset
+	 *            the region offset
+	 * @param length
+	 *            the region length
+	 * @param forward
+	 *            <code>true</code> for forwards, <code>false</code> for
+	 *            backward
+	 * @param annotationPosition
+	 *            the position of the found annotation
+	 * @return the found annotation
+	 */
+	protected Annotation getNextAnnotation(final int offset, final int length, boolean forward, Position annotationPosition) {
+		Annotation nextAnnotation = null;
+		Position nextAnnotationPosition = null;
+		Annotation containingAnnotation = null;
+		Position containingAnnotationPosition = null;
+		boolean currentAnnotation = false;
+
+		IDocument document = getTextEditor().getDocumentProvider().getDocument(getTextEditor().getEditorInput());
+		int endOfDocument = document.getLength();
+		int distance = Integer.MAX_VALUE;
+
+		IAnnotationModel model = getTextEditor().getDocumentProvider().getAnnotationModel(getTextEditor().getEditorInput());
+		// external files may not have an annotation model
+		if (model != null) {
+			Iterator e = model.getAnnotationIterator();
+			while (e.hasNext()) {
+				Annotation a = (Annotation) e.next();
+				if (!isNavigationTarget(a))
+					continue;
+
+				Position p = model.getPosition(a);
+				if (p == null)
+					continue;
+
+				if (forward && p.offset == offset || !forward && p.offset + p.getLength() == offset + length) {
+					if (containingAnnotation == null || (forward && p.length >= containingAnnotationPosition.length || !forward && p.length >= containingAnnotationPosition.length)) {
+						containingAnnotation = a;
+						containingAnnotationPosition = p;
+						currentAnnotation = p.length == length;
+					}
+				}
+				else {
+					int currentDistance = 0;
+
+					if (forward) {
+						currentDistance = p.getOffset() - offset;
+						if (currentDistance < 0) {
+							currentDistance = endOfDocument + currentDistance;
+						}
+
+						if (currentDistance < distance || currentDistance == distance && p.length < nextAnnotationPosition.length) {
+							distance = currentDistance;
+							nextAnnotation = a;
+							nextAnnotationPosition = p;
+						}
+					}
+					else {
+						currentDistance = offset + length - (p.getOffset() + p.length);
+						if (currentDistance < 0)
+							currentDistance = endOfDocument + currentDistance;
+
+						if (currentDistance < distance || currentDistance == distance && p.length < nextAnnotationPosition.length) {
+							distance = currentDistance;
+							nextAnnotation = a;
+							nextAnnotationPosition = p;
+						}
+					}
+				}
+			}
+		}
+		if (containingAnnotationPosition != null && (!currentAnnotation || nextAnnotation == null)) {
+			annotationPosition.setOffset(containingAnnotationPosition.getOffset());
+			annotationPosition.setLength(containingAnnotationPosition.getLength());
+			return containingAnnotation;
+		}
+		if (nextAnnotationPosition != null) {
+			annotationPosition.setOffset(nextAnnotationPosition.getOffset());
+			annotationPosition.setLength(nextAnnotationPosition.getLength());
+		}
+
+		return nextAnnotation;
+	}
+
+	private IStatusLineManager getStatusLineManager() {
+		// The original JavaEditor M7 implementation made use of an adapter,
+		// but that approach
+		// fails with a MultiPageEditorSite
+		
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (window == null)
+			return null;
+		IWorkbenchPage page = window.getActivePage();
+		if (page == null)
+			return null;
+		IEditorPart editor = page.getActiveEditor();
+		if (editor == null)
+			return null;
+		IEditorActionBarContributor contributor = editor.getEditorSite().getActionBarContributor();
+		if (contributor instanceof EditorActionBarContributor) {
+			return ((EditorActionBarContributor) contributor).getActionBars().getStatusLineManager();
+		}
+		return null;
+	}
+
+	public String getText() {
+		return getDefaultLabel();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.Action#getToolTipText()
+	 */
+	public String getToolTipText() {
+		return getDefaultLabel();
+	}
+
+	/**
+	 * Jumps to the error next according to the given direction based off
+	 * JavaEditor#gotoAnnotation()
+	 * 
+	 * @param forward
+	 *            is the direction
+	 */
+	public void gotoAnnotation(boolean forward) {
+		ITextSelection selection = (ITextSelection) getTextEditor().getSelectionProvider().getSelection();
+		Position position = new Position(0, 0);
+		if (false /* delayed - see bug 18316 */) {
+			getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
+			getTextEditor().selectAndReveal(position.getOffset(), position.getLength());
+		}
+		else /* no delay - see bug 18316 */{
+			Annotation annotation = getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
+			IEditorStatusLine editorStatusLine = (IEditorStatusLine) getTextEditor().getAdapter(IEditorStatusLine.class);
+			if (editorStatusLine != null) {
+				editorStatusLine.setMessage(true, null, null);
+				editorStatusLine.setMessage(false, null, null);
+			}
+			else {
+				IStatusLineManager mgr = getStatusLineManager();
+				if (mgr != null) {
+					mgr.setErrorMessage(null);
+					mgr.setMessage(null, null);
+				}
+			}
+			if (annotation != null) {
+				updateAnnotationViews(annotation);
+				if (_debug) {
+					System.out.println("select and reveal " + annotation.getType() + "@" + position.getOffset() + ":" + position.getLength()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				}
+				getTextEditor().selectAndReveal(position.getOffset(), position.getLength());
+				if (editorStatusLine != null) {
+					editorStatusLine.setMessage(true, null, null);
+					editorStatusLine.setMessage(false, annotation.getText(), null);
+				}
+				else {
+					IStatusLineManager mgr = getStatusLineManager();
+					if (mgr != null) {
+						mgr.setErrorMessage(null);
+						mgr.setMessage(null, annotation.getText());
+					}
+					getTextEditor().getSelectionProvider().addSelectionChangedListener(new StatusLineClearer(mgr));
+				}
+			}
+		}
+	}
+
+	/**
+	 * Returns whether the given annotation is configured as a target for the
+	 * "Go to Next/Previous Annotation" actions
+	 * 
+	 * @param annotation
+	 *            the annotation
+	 * @return <code>true</code> if this is a target, <code>false</code>
+	 *         otherwise
+	 * @see Eclipse 3.0
+	 */
+	protected boolean isNavigationTarget(Annotation annotation) {
+		Preferences preferences = EditorsUI.getPluginPreferences();
+		AnnotationPreference preference = EditorsUI.getAnnotationPreferenceLookup().getAnnotationPreference(annotation);
+		// See bug 41689
+		// String key= forward ? preference.getIsGoToNextNavigationTargetKey()
+		// : preference.getIsGoToPreviousNavigationTargetKey();
+		String key = preference == null ? null : preference.getIsGoToNextNavigationTargetKey();
+		return (key != null && preferences.getBoolean(key));
+	}
+
+	public void run() {
+		gotoAnnotation(fForward);
+	}
+
+	public void setEditor(ITextEditor editor) {
+		super.setEditor(editor);
+		update();
+	}
+
+	/**
+	 * Updates the annotation views that show the given annotation.
+	 * 
+	 * @param annotation
+	 *            the annotation
+	 */
+	protected void updateAnnotationViews(Annotation annotation) {
+		IMarker marker = null;
+		if (annotation instanceof SimpleMarkerAnnotation)
+			marker = ((SimpleMarkerAnnotation) annotation).getMarker();
+
+		if (marker != null) {
+			try {
+				IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+				if (window != null) {
+					IWorkbenchPage page = window.getActivePage();
+					if (page != null) {
+						IViewPart view = null;
+						if (marker.isSubtypeOf(IMarker.PROBLEM)) {
+							view = page.findView(IPageLayout.ID_PROBLEM_VIEW);
+						}
+						else if (marker.isSubtypeOf(IMarker.TASK)) {
+							view = page.findView(IPageLayout.ID_TASK_LIST);
+						}
+						else if (marker.isSubtypeOf(IMarker.BOOKMARK)) {
+							view = page.findView(IPageLayout.ID_BOOKMARKS);
+						}
+//						else if (marker.isSubtypeOf(IBreakpoint.BREAKPOINT_MARKER)) {
+//							view = page.findView(IDebugUIConstants.ID_BREAKPOINT_VIEW);
+//						}
+						
+						if (view == null) {
+							view = page.findView("org.eclipse.ui.views.AllMarkersView");
+						}
+						// If the view isn't open on this perspective, don't
+						// interact with it
+						if (view != null) {
+							Method method = view.getClass().getMethod("setSelection", new Class[]{IStructuredSelection.class, boolean.class}); //$NON-NLS-1$
+							if (method != null) {
+								method.invoke(view, new Object[]{new StructuredSelection(marker), Boolean.TRUE});
+								page.bringToTop(view);
+							}
+						}
+					}
+				}
+			}
+			// ignore exceptions, don't update any of the lists, just set
+			// statusline
+			catch (CoreException x) {
+				//
+			}
+			catch (NoSuchMethodException x) {
+				//
+			}
+			catch (IllegalAccessException x) {
+				//
+			}
+			catch (InvocationTargetException x) {
+				//
+			}
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IActionValidator.java
similarity index 80%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IActionValidator.java
index 607270a..7995be7 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IActionValidator.java
@@ -10,11 +10,8 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
 
-
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-public interface UpdateListener {
-
-	public void updateOccured(Object object, Object arg);
+public interface IActionValidator {
+	boolean isValidAction();
 }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IDropAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IDropAction.java
new file mode 100644
index 0000000..7c751bb
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IDropAction.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.ui.IEditorPart;
+
+/**
+ */
+public interface IDropAction {
+
+
+	/**
+	 * @param data
+	 *            DropTargetEvent.data will be passed.
+	 * @return boolean true for supported data type
+	 */
+	public boolean isSupportedData(Object data);
+
+	/**
+	 * @return boolean true for the action is actually processed false for the
+	 *         action is not processed.
+	 */
+	public boolean run(DropTargetEvent event, IEditorPart targetEditor);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedContributor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedContributor.java
new file mode 100644
index 0000000..e178a36
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedContributor.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.ui.IEditorActionBarContributor;
+
+public interface IExtendedContributor extends IEditorActionBarContributor, IPopupMenuContributor {
+	public void contributeToMenu(IMenuManager menu);
+
+	public void contributeToStatusLine(IStatusLineManager manager);
+
+	public void contributeToToolBar(IToolBarManager manager);
+
+	public void updateToolbarActions();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedEditorAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedEditorAction.java
new file mode 100644
index 0000000..1bfe47c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedEditorAction.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+
+import org.eclipse.ui.texteditor.IUpdate;
+
+public interface IExtendedEditorAction extends IUpdate {
+
+	/**
+	 * Returns whether this action item is visible
+	 * 
+	 * @return <code>true</code> if this item is visible, and
+	 *         <code>false</code> otherwise
+	 */
+	public boolean isVisible();
+
+	/**
+	 * Sets the active editor for the action. Implementors should disconnect
+	 * from the old editor, connect to the new editor, and update the action
+	 * to reflect the new editor.
+	 * 
+	 * @param targetEditor
+	 *            the new editor target
+	 */
+	public void setActiveExtendedEditor(IExtendedSimpleEditor targetEditor);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedMarkupEditor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedMarkupEditor.java
new file mode 100644
index 0000000..4f646d3
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedMarkupEditor.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+
+import java.util.List;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
+/**
+ * IExtendedMarkupEditor
+ * 
+ * @deprecated use the editor's ISourceEditingTextTools adapter and cast to
+ *             IDOMSourceEditingTextTools when appropriate
+ */
+public interface IExtendedMarkupEditor  {
+
+	/**
+	 * @deprecated - use the IDOMSourceEditingTextTools.getNode(int) method
+	 *             with ISourceEditingTextTools.getCaretOffset()
+	 * @return
+	 */
+	public Node getCaretNode();
+
+	/**
+	 * @deprecated - use method on IDOMSourceEditingTextTools
+	 */
+	public Document getDOMDocument();
+
+	/**
+	 * @deprecated - some editors will provide the list of selected nodes as
+	 *             part of ISourceEditingTextTools.getSelection()
+	 */
+	public List getSelectedNodes();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedSimpleEditor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedSimpleEditor.java
new file mode 100644
index 0000000..b187827
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedSimpleEditor.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+/**
+ * @deprecated, obtain a ISourceEditingTextTools adapter from the editor part
+ */
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IEditorPart;
+
+public interface IExtendedSimpleEditor {
+
+	public int getCaretPosition();
+
+	public IDocument getDocument();
+
+	public IEditorPart getEditorPart();
+
+	public Point getSelectionRange();
+
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IModelProvider.java
similarity index 69%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IModelProvider.java
index 607270a..f25e288 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IModelProvider.java
@@ -10,11 +10,12 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
 
 
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-public interface UpdateListener {
-
-	public void updateOccured(Object object, Object arg);
+public interface IModelProvider extends IDocumentProvider {
+	IStructuredModel getModel(Object element);
 }
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IPopupMenuContributor.java
similarity index 76%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IPopupMenuContributor.java
index 607270a..9647204 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IPopupMenuContributor.java
@@ -10,11 +10,13 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
 
 
-package org.eclipse.wst.xml.ui.internal.dialogs;
 
-public interface UpdateListener {
+import org.eclipse.jface.action.IMenuManager;
 
-	public void updateOccured(Object object, Object arg);
+public interface IPopupMenuContributor {
+
+	public void contributeToPopupMenu(IMenuManager menu);
 }
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IReleasable.java
similarity index 78%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IReleasable.java
index 607270a..44a599d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IReleasable.java
@@ -10,11 +10,11 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
 
-
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-public interface UpdateListener {
-
-	public void updateOccured(Object object, Object arg);
+public interface IReleasable {
+	/**
+	 * Generic catch-all for releasing resources and other references
+	 */
+	void release();
 }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ISourceViewerActionBarContributor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ISourceViewerActionBarContributor.java
new file mode 100644
index 0000000..228a968
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ISourceViewerActionBarContributor.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+
+import org.eclipse.ui.IEditorActionBarContributor;
+
+public interface ISourceViewerActionBarContributor extends IEditorActionBarContributor {
+
+	/**
+	 * Enables disables actions that are specific to the source viewer (and
+	 * should only work when the source viewer is enabled)
+	 * 
+	 * @param enabled
+	 *            true if source viewer is currently enabled, false otherwise
+	 */
+	public void setViewerSpecificContributionsEnabled(boolean enabled);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IStructuredTextEditorActionConstants.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IStructuredTextEditorActionConstants.java
new file mode 100644
index 0000000..d4b131c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IStructuredTextEditorActionConstants.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+public interface IStructuredTextEditorActionConstants {
+	String SOURCE_CONTEXT_MENU_ID = "sourcePopupMenuId"; //$NON-NLS-1$
+	String SOURCE_BEGIN = "sourceBegin"; //$NON-NLS-1$
+	String SOURCE_ADDITIONS = "additions"; //$NON-NLS-1$
+	String SOURCE_END = "sourceEnd"; //$NON-NLS-1$
+
+	String REFACTOR_CONTEXT_MENU_ID = "refactorPopupMenuId"; //$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ITemporaryAnnotation.java
similarity index 80%
rename from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
rename to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ITemporaryAnnotation.java
index 607270a..68f6441 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ITemporaryAnnotation.java
@@ -10,11 +10,8 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
 
-
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-public interface UpdateListener {
-
-	public void updateOccured(Object object, Object arg);
+public interface ITemporaryAnnotation {
+	Object getKey();
 }
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/Logger.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/Logger.java
similarity index 86%
rename from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/Logger.java
rename to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/Logger.java
index b98e7ab..906e3f2 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/Logger.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/Logger.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,25 +10,25 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal;
+package org.eclipse.wst.sse.ui.internal;
 
 
 
-import com.ibm.icu.util.StringTokenizer;
-
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
 import org.osgi.framework.Bundle;
 
+import com.ibm.icu.util.StringTokenizer;
+
 /**
  * Small convenience class to log messages to plugin's log file and also, if
  * desired, the console. This class should only be used by classes in this
  * plugin. Other plugins should make their own copy, with appropriate ID.
  */
 public class Logger {
-	private static final String PLUGIN_ID = "org.eclipse.wst.xml.ui"; //$NON-NLS-1$
-
+	private static final String PLUGIN_ID = "org.eclipse.wst.sse.ui"; //$NON-NLS-1$
+	
 	public static final int ERROR = IStatus.ERROR; // 4
 	public static final int ERROR_DEBUG = 200 + ERROR;
 	public static final int INFO = IStatus.INFO; // 1
@@ -54,10 +54,9 @@
 	 *            exception thrown
 	 */
 	protected static void _log(int level, String message, Throwable exception) {
-		if ((level == OK_DEBUG) || (level == INFO_DEBUG) || (level == WARNING_DEBUG) || (level == ERROR_DEBUG)) {
-			if (!isDebugging()) {
+		if (level == OK_DEBUG || level == INFO_DEBUG || level == WARNING_DEBUG || level == ERROR_DEBUG) {
+			if (!isDebugging())
 				return;
-			}
 		}
 
 		int severity = IStatus.OK;
@@ -76,6 +75,16 @@
 		}
 		message = (message != null) ? message : "null"; //$NON-NLS-1$
 		Status statusObj = new Status(severity, PLUGIN_ID, severity, message, exception);
+		_log(statusObj);
+
+	}
+	
+	/**
+	 * Adds {@link IStatus} to the log.
+	 * 
+	 * @param statusObj {@link IStatus} to add to the log
+	 */
+	protected static void _log(IStatus statusObj) {
 		Bundle bundle = Platform.getBundle(PLUGIN_ID);
 		if (bundle != null) {
 			Platform.getLog(bundle).log(statusObj);
@@ -96,9 +105,9 @@
 			message = (message != null) ? message : "null"; //$NON-NLS-1$
 			Status statusObj = new Status(IStatus.OK, PLUGIN_ID, IStatus.OK, message, exception);
 			Bundle bundle = Platform.getBundle(PLUGIN_ID);
-			if (bundle != null) {
+			if (bundle != null) 
 				Platform.getLog(bundle).log(statusObj);
-			}
+
 		}
 	}
 
@@ -116,9 +125,8 @@
 	 * @return true if tracing category, false otherwise
 	 */
 	public static boolean isTracing(String category) {
-		if (!isDebugging()) {
+		if (!isDebugging())
 			return false;
-		}
 
 		String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION);
 		if (traceFilter != null) {
@@ -140,6 +148,15 @@
 	public static void log(int level, String message, Throwable exception) {
 		_log(level, message, exception);
 	}
+	
+	/**
+	 * <p>Allows an already constructed status to be logged</p>
+	 * 
+	 * @param status {@link IStatus} to log.
+	 */
+	public static void log(IStatus status) {
+		_log(status);
+	}
 
 	public static void logException(String message, Throwable exception) {
 		_log(ERROR, message, exception);
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/PreferenceInitializer.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/PreferenceInitializer.java
new file mode 100644
index 0000000..20c8cca
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/PreferenceInitializer.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.resource.ColorRegistry;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
+import org.eclipse.wst.sse.ui.internal.projection.AbstractStructuredFoldingStrategy;
+import org.eclipse.wst.sse.ui.internal.provisional.preferences.CommonEditorPreferenceNames;
+
+
+public class PreferenceInitializer extends AbstractPreferenceInitializer {
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+	 */
+	public void initializeDefaultPreferences() {
+		IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
+		ColorRegistry registry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
+		
+		// use the base annotation & quick diff preference page
+		EditorsUI.useAnnotationsPreferencePage(store);
+		EditorsUI.useQuickDiffPreferencePage(store);
+
+		// let annotations show up in the vertical ruler if that's what the
+		// preference is
+		//		// these annotation preferences have a different default value than
+		// the one the base provides
+		//		store.setDefault("errorIndicationInVerticalRuler", false);
+		// //$NON-NLS-1$
+		//		store.setDefault("warningIndicationInVerticalRuler", false);
+		// //$NON-NLS-1$
+
+		// these annotation preferences are not part of base text editor
+		// preference
+		store.setDefault(CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS, true);
+
+		setMatchingBracketsPreferences(store, registry);
+
+		// hover help preferences are not part of base text editor preference
+		String mod2Name = Action.findModifierString(SWT.MOD2); // SWT.COMMAND
+		// on Mac;
+		// SWT.CONTROL
+		// elsewhere
+		store.setDefault(EditorPreferenceNames.EDITOR_TEXT_HOVER_MODIFIERS, "combinationHover|true|0;problemHover|false|0;documentationHover|false|0;annotationHover|true|" + mod2Name); //$NON-NLS-1$
+
+		// set default read-only foreground color scale value
+		store.setDefault(EditorPreferenceNames.READ_ONLY_FOREGROUND_SCALE, 30);
+		
+		// set default enable folding value
+		store.setDefault(AbstractStructuredFoldingStrategy.FOLDING_ENABLED, true);
+		
+		// set default for show message dialog when unknown content type in editor
+		store.setDefault(EditorPreferenceNames.SHOW_UNKNOWN_CONTENT_TYPE_MSG, true);
+		
+		// set content assist defaults
+		store.setDefault(EditorPreferenceNames.CODEASSIST_AUTOACTIVATION_DELAY, 500);
+		PreferenceConverter.setDefault(store, EditorPreferenceNames.CODEASSIST_PROPOSALS_BACKGROUND, ColorHelper.findRGB(registry, EditorPreferenceNames.CODEASSIST_PROPOSALS_BACKGROUND, new RGB(255, 255, 255)));
+		PreferenceConverter.setDefault(store, EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND, ColorHelper.findRGB(registry, EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND, new RGB(0, 0, 0)));
+		PreferenceConverter.setDefault(store, EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND, ColorHelper.findRGB(registry, EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND, new RGB(255, 255, 255)));
+		PreferenceConverter.setDefault(store, EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND, ColorHelper.findRGB(registry, EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND, new RGB(0, 0, 0)));
+
+		store.setDefault(EditorPreferenceNames.SEMANTIC_HIGHLIGHTING, true);
+	}
+
+	private void setMatchingBracketsPreferences(IPreferenceStore store, ColorRegistry registry) {
+		// matching brackets is not part of base text editor preference
+		store.setDefault(EditorPreferenceNames.MATCHING_BRACKETS, true);
+		PreferenceConverter.setDefault(store, EditorPreferenceNames.MATCHING_BRACKETS_COLOR, ColorHelper.findRGB(registry, EditorPreferenceNames.MATCHING_BRACKETS_COLOR, new RGB(192, 192, 192)));
+	}
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ReadOnlyAwareDropTargetAdapter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ReadOnlyAwareDropTargetAdapter.java
new file mode 100644
index 0000000..69a968b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ReadOnlyAwareDropTargetAdapter.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+
+
+public class ReadOnlyAwareDropTargetAdapter extends ExtendedEditorDropTargetAdapter {
+
+	/**
+	 * @deprecated - use ReadOnlyAwareDropTargetAdapter(boolean useProxy) for
+	 *             the performance
+	 */
+	public ReadOnlyAwareDropTargetAdapter() {
+		super();
+	}
+
+	public ReadOnlyAwareDropTargetAdapter(boolean useProxy) {
+		super(useProxy);
+	}
+
+	public void drop(DropTargetEvent event) {
+		IDocument document = getTextViewer().getDocument();
+		if (document instanceof IStructuredDocument) {
+			Point range = getTextViewer().getSelectedRange();
+			if (((IStructuredDocument) document).containsReadOnly(range.x, range.y)) {
+				event.operations = DND.DROP_NONE;
+				event.detail = DND.DROP_NONE;
+				getTextViewer().getTextWidget().redraw();
+				getTextViewer().getTextWidget().update();
+				getTextViewer().getTextWidget().getDisplay().beep();
+			}
+		}
+		super.drop(event);
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIMessages.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIMessages.java
new file mode 100644
index 0000000..7450860
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIMessages.java
@@ -0,0 +1,466 @@
+/**********************************************************************
+ * Copyright (c) 2005, 2010 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 - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Strings used by SSE UI
+ * 
+ * @plannedfor 1.0
+ */
+public class SSEUIMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.wst.sse.ui.internal.SSEUIPluginResources";//$NON-NLS-1$
+	private static ResourceBundle fResourceBundle;
+
+	public static ResourceBundle getResourceBundle() {
+		try {
+			if (fResourceBundle == null)
+				fResourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
+		}
+		catch (MissingResourceException x) {
+			fResourceBundle = null;
+		}
+		return fResourceBundle;
+	}
+
+	private SSEUIMessages() {
+		// cannot create new instance
+	}
+
+    static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME, SSEUIMessages.class);
+	}
+
+	public static String Error_opening_file_UI_;
+	public static String _UI_File_is_read_only;
+	public static String _32concat_EXC_;
+	public static String Multiple_errors;
+	public static String _Undo_Text_Change__Ctrl_Z_UI_;
+	public static String Undo_Text_Change__UI_;
+	public static String _Undo__0___Ctrl_Z_UI_;
+	public static String Undo___0___UI_;
+	public static String _Redo_Text_Change__Ctrl_Y_UI_;
+	public static String Redo_Text_Change__UI_;
+	public static String _Redo__0___Ctrl_Y_UI_;
+	public static String Redo___0___UI_;
+	public static String Format_Document_UI_;
+	public static String Format_Active_Elements_UI_;
+	public static String Text_Cut_UI_;
+	public static String Text_Paste_UI_;
+
+	public static String Cleanup_Document_UI_;
+
+	public static String Editor_Cut_label;
+	public static String Editor_Cut_tooltip;
+	public static String Editor_Cut_image;
+	public static String Editor_Cut_description;
+	public static String Editor_Copy_label;
+	public static String Editor_Copy_tooltip;
+	public static String Editor_Copy_image;
+	public static String Editor_Copy_description;
+	public static String Editor_Paste_label;
+	public static String Editor_Paste_tooltip;
+	public static String Editor_Paste_image;
+	public static String Editor_Paste_description;
+	public static String Editor_Delete_label;
+	public static String Editor_Delete_tooltip;
+	public static String Editor_Delete_image;
+	public static String Editor_Delete_description;
+
+	public static String ContentAssistProposals_label;
+	public static String ContentAssistProposals_tooltip;
+	public static String ContentAssistProposals_description;
+	public static String QuickFix_label;
+	public static String QuickFix_tooltip;
+	public static String QuickFix_image;
+	public static String QuickFix_description;
+	public static String ToggleComment_label;
+	public static String ToggleComment_tooltip;
+	public static String ToggleComment_image;
+	public static String ToggleComment_description;
+	public static String AddBlockComment_label;
+	public static String AddBlockComment_tooltip;
+	public static String AddBlockComment_image;
+	public static String AddBlockComment_description;
+	public static String RemoveBlockComment_label;
+	public static String RemoveBlockComment_tooltip;
+	public static String RemoveBlockComment_image;
+	public static String RemoveBlockComment_description;
+	public static String CleanupDocument_label;
+	public static String CleanupDocument_tooltip;
+	public static String CleanupDocument_image;
+	public static String CleanupDocument_description;
+	public static String FormatDocument_label;
+	public static String FormatDocument_tooltip;
+	public static String FormatDocument_image;
+	public static String FormatDocument_description;
+	public static String FormatActiveElements_label;
+	public static String FormatActiveElements_tooltip;
+	public static String FormatActiveElements_image;
+	public static String FormatActiveElements_description;
+	public static String OpenFileFromSource_label;
+	public static String OpenFileFromSource_tooltip;
+	public static String OpenFileFromSource_image;
+	public static String OpenFileFromSource_description;
+	public static String StructureSelectEnclosing_label;
+	public static String StructureSelectEnclosing_tooltip;
+	public static String StructureSelectEnclosing_description;
+	public static String StructureSelectNext_label;
+	public static String StructureSelectNext_tooltip;
+	public static String StructureSelectNext_description;
+	public static String StructureSelectPrevious_label;
+	public static String StructureSelectPrevious_tooltip;
+	public static String StructureSelectPrevious_description;
+	public static String StructureSelectHistory_label;
+	public static String StructureSelectHistory_tooltip;
+	public static String StructureSelectHistory_description;
+	public static String Text_Shift_Right_UI_;
+	public static String Text_Shift_Left_UI_;
+
+	public static String _4concat;
+	public static String Content_type__UI_;
+	public static String Foreground_UI_;
+	public static String Background_UI_;
+	public static String Bold_UI_;
+	public static String Italics_UI;
+	public static String Restore_Default_UI_;
+	public static String Sample_text__UI_;
+
+	public static String AddBreakpoint_label;
+	public static String AddBreakpoint_tooltip;
+	public static String AddBreakpoint_description;
+	public static String AddBreakpoint_error_dialog_title;
+	public static String AddBreakpoint_error_dialog_message;
+	public static String ToggleBreakpoint_label;
+	public static String ToggleBreakpoint_tooltip;
+	public static String ToggleBreakpoint_description;
+	public static String EnableBreakpoint_label;
+	public static String EnableBreakpoint_tooltip;
+	public static String EnableBreakpoint_description;
+	public static String DisableBreakpoint_label;
+	public static String DisableBreakpoint_tooltip;
+	public static String DisableBreakpoint_description;
+	public static String ManageBreakpoints_add_label;
+	public static String ManageBreakpoints_remove_label;
+	public static String ManageBreakpoints_tooltip;
+	public static String ManageBreakpoints_error_adding_title1;
+	public static String ManageBreakpoints_error_adding_message1;
+
+	public static String AbstractColorPageDescription;
+	public static String SyntaxColoring_Link;
+	public static String SyntaxColoring_Description;
+	public static String EditorModelUtil_0;
+	public static String EditorModelUtil_1;
+
+	// TODO: These should be removed when ContentSettingsPropertyPage is
+	// deleted
+	// web content settings
+	public static String UI_Default_HTML_DOCTYPE_ID___1;
+	public static String UI_CSS_profile___2;
+	public static String UI_Target_Device___3;
+
+	public static String Editor_ToggleInsertMode_label;
+
+	//
+	// These strings are used in Workbench menu bar
+	//
+	public static String ExpandSelectionToMenu_label;
+	public static String SourceMenu_label;
+	public static String RefactorMenu_label;
+
+	public static String FindOccurrencesActionProvider_0;
+	public static String RemoveAction_0;
+	public static String ShowPropertiesAction_0;
+	public static String ContentOutlineConfiguration_0;
+	public static String ContentOutlineConfiguration_1;
+	public static String AbstractOpenOn_0;
+	public static String FormatActionDelegate_jobName;
+	public static String FormatActionDelegate_errorStatusMessage;
+	public static String FormatActionDelegate_3;
+	public static String FormatActionDelegate_4;
+	public static String FormatActionDelegate_5;
+
+	public static String TranslucencyPreferenceTab_0;
+	public static String TranslucencyPreferenceTab_1;
+	public static String StructuredTextEditorPreferencePage_2;
+	public static String StructuredTextEditorPreferencePage_6;
+	public static String StructuredTextEditorPreferencePage_20;
+	public static String StructuredTextEditorPreferencePage_23;
+	public static String StructuredTextEditorPreferencePage_24;
+	public static String StructuredTextEditorPreferencePage_30;
+	public static String StructuredTextEditorPreferencePage_37;
+	public static String StructuredTextEditorPreferencePage_38;
+	public static String StructuredTextEditorPreferencePage_40;
+	public static String StructuredTextEditorPreferencePage_41;
+	public static String StructuredTextEditorPreferencePage_42;
+	public static String StructuredTextEditorPreferencePage_43;
+	public static String StructuredTextEditorPreferencePage_44;
+	public static String TaskTagPreferenceTab_0;
+	public static String TaskTagPreferenceTab_1;
+	public static String TaskTagPreferenceTab_2;
+	public static String TaskTagPreferenceTab_3;
+	public static String TaskTagPreferenceTab_5;
+	public static String TaskTagPreferenceTab_6;
+	public static String TaskTagPreferenceTab_7;
+	public static String TaskTagPreferenceTab_12;
+	public static String TaskTagPreferenceTab_13;
+	public static String TaskTagPreferenceTab_14;
+	public static String TaskTagPreferenceTab_15;
+	public static String TaskTagPreferenceTab_16;
+	public static String TaskTagPreferenceTab_17;
+	public static String TaskTagPreferenceTab_18;
+	public static String TaskTagPreferenceTab_19;
+	public static String TaskTagPreferenceTab_20;
+	public static String TaskTagPreferenceTab_22;
+	public static String TaskTagPreferenceTab_23;
+	public static String TaskTagPreferenceTab_24;
+	public static String TaskTagPreferenceTab_25;
+	public static String TaskTagPreferenceTab_26;
+	public static String TaskTagPreferenceTab_27;
+	public static String TaskTagPreferenceTab_28;
+	public static String TaskTagPreferenceTab_29;
+	public static String TaskTagPreferenceTab_30;
+	public static String TaskTagPreferenceTab_31;
+	public static String TaskTagPreferencePage_32;
+	public static String TaskTagPreferenceTab_33;
+	public static String TaskTagExclusionTab_01;
+	public static String TaskTagExclusionTab_02;
+	public static String TaskTagExclusionTab_03;
+
+	public static String PropertyPreferencePage_01;
+	public static String PropertyPreferencePage_02;
+
+	public static String FilePreferencePage_0;
+	public static String NoModificationCompletionProposal_0;
+	public static String ToggleBreakpointAction_0;
+	public static String ManageBreakpointAction_0;
+	public static String ManageBreakpointAction_1;
+	public static String EditBreakpointAction_0;
+	// Used in Structured Text Editor Preference Page / Hovers Tab
+	public static String TextHoverPreferenceTab_title;
+	public static String TextHoverPreferenceTab_hoverPreferences;
+	public static String TextHoverPreferenceTab_keyModifier;
+	public static String TextHoverPreferenceTab_description;
+	public static String TextHoverPreferenceTab_modifierIsNotValid;
+	public static String TextHoverPreferenceTab_modifierIsNotValidForHover;
+	public static String TextHoverPreferenceTab_duplicateModifier;
+	public static String TextHoverPreferenceTab_nameColumnTitle;
+	public static String TextHoverPreferenceTab_modifierColumnTitle;
+	public static String TextHoverPreferenceTab_delimiter;
+	public static String TextHoverPreferenceTab_insertDelimiterAndModifierAndDelimiter;
+	public static String TextHoverPreferenceTab_insertModifierAndDelimiter;
+	public static String TextHoverPreferenceTab_insertDelimiterAndModifier;
+
+	// used dynamically
+	public static String combinationHover_label;
+	public static String combinationHover_desc;
+	public static String problemHover_label;
+	public static String problemHover_desc;
+	public static String documentationHover_label;
+	public static String documentationHover_desc;
+	public static String annotationHover_label;
+	public static String annotationHover_desc;
+
+	public static String EditStructuredTextEditorPreferencesAction_0;
+	public static String StructuredTextEditorPreferencePage_0;
+	public static String StructuredTextEditorPreferencePage_1;
+	public static String PreferenceManager_0;
+
+	public static String OccurrencesSearchQuery_0;
+	public static String OccurrencesSearchQuery_2;
+	public static String ShowView_errorTitle;
+	public static String proc_dirty_regions_0;
+
+	public static String textHoverMakeStickyHint;
+
+	// Encoding
+	public static String EncodingPreferencePage_0;
+	public static String EncodingPreferencePage_1;
+
+	public static String busy;
+	public static String caret_update;
+	public static String EmptyFilePreferencePage_0;
+
+	public static String OffsetStatusLineContributionItem_0;
+	public static String OffsetStatusLineContributionItem_2;
+	public static String OffsetStatusLineContributionItem_3;
+	public static String OffsetStatusLineContributionItem_4;
+	public static String OffsetStatusLineContributionItem_5;
+	public static String OffsetStatusLineContributionItem_6;
+	public static String OffsetStatusLineContributionItem_7;
+	public static String OffsetStatusLineContributionItem_8;
+	public static String OffsetStatusLineContributionItem_9;
+	public static String OffsetStatusLineContributionItem_10;
+	public static String OffsetStatusLineContributionItem_11;
+	public static String OffsetStatusLineContributionItem_12;
+	public static String OffsetStatusLineContributionItem_13;
+	public static String OffsetStatusLineContributionItem_14;
+	public static String OffsetStatusLineContributionItem_15;
+	public static String OffsetStatusLineContributionItem_16;
+	public static String OffsetStatusLineContributionItem_17;
+	public static String OffsetStatusLineContributionItem_18;
+	public static String OffsetStatusLineContributionItem_19;
+	public static String OffsetStatusLineContributionItem_20;
+
+	/*
+	 * *****Below are possibly unused strings that may be removed *****
+	 */
+	public static String Save_label;
+	public static String An_error_has_occurred_when_ERROR_;
+	public static String Problems_During_Save_As_UI_;
+	public static String Save_could_not_be_complete_UI_;
+	public static String SemanticHighlightingReconciler_0;
+	public static String ManageBreakpoints_error_removing_title1;
+	public static String ManageBreakpoints_error_removing_message1;
+	public static String ManageBreakpoints_error_retrieving_message;
+	public static String JSPSourcePreferencePageDescription;
+	public static String Editor_error_save_message;
+	public static String Editor_error_save_title;
+	public static String Editor_warning_save_delete;
+
+	public static String Previous_annotation;
+	public static String Next_annotation;
+
+	public static String AnnotationTypes_Errors;
+	public static String AnnotationTypes_Warnings;
+	public static String AnnotationTypes_Tasks;
+	public static String AnnotationTypes_SearchResults;
+	public static String AnnotationTypes_Bookmarks;
+	public static String AnnotationTypes_Others;
+
+	public static String Editor_ConvertToWindows_label;
+	public static String Editor_ConvertToWindows_tooltip;
+	public static String Editor_ConvertToWindows_image;
+	public static String Editor_ConvertToWindows_description;
+
+	public static String Editor_ConvertToUNIX_label;
+	public static String Editor_ConvertToUNIX_tooltip;
+	public static String Editor_ConvertToUNIX_image;
+	public static String Editor_ConvertToUNIX_description;
+
+	public static String Editor_ConvertToMac_label;
+	public static String Editor_ConvertToMac_tooltip;
+	public static String Editor_ConvertToMac_image;
+	public static String Editor_ConvertToMac_description;
+	public static String ConvertLineDelimitersMenu_label;
+	public static String FindOccurrences_label;
+
+	public static String ConvertLineDelimitersToCRLFActionDelegate_jobName;
+	public static String ConvertLineDelimitersToCRLFActionDelegate_errorStatusMessage;
+	public static String ConvertLineDelimitersToCRLFActionDelegate_3;
+	public static String ConvertLineDelimitersToCRLFActionDelegate_4;
+
+	public static String TextHoverPreferenceTab_annotationRollover;
+	public static String TextHoverPreferenceTab_showAffordance;
+	public static String TextHoverPreferenceTab_enabled;
+
+	public static String BasicFindOccurrencesAction_0;
+	public static String BasicSearchLabelProvider_0;
+	public static String NavigationPreferenceTab_0;
+	public static String OccurrencesSearchQuery_1;
+	public static String FileModelProvider_0;
+	public static String JFaceNodeAdapter_0;
+
+	public static String ConfigureProjectSettings;
+	public static String ConfigureWorkspaceSettings;
+	public static String EnableProjectSettings;
+	
+	public static String GotoMatchingBracket_label;
+	public static String GotoMatchingBracket_description;
+	public static String GotoMatchingBracket_tooltip;
+	public static String GotoMatchingBracket_error_invalidSelection;
+	public static String GotoMatchingBracket_error_noMatchingBracket;
+	public static String GotoMatchingBracket_error_bracketOutsideSelectedElement;
+
+	public static String LoadingReferencedGrammars;
+
+	public static String Folding;
+	public static String StructuredTextEditorPreferencePage_3;
+	public static String Projection_Toggle_label;
+	public static String Projection_Toggle_tooltip;
+	public static String Projection_Toggle_description;
+	public static String Projection_Toggle_image;
+	public static String Projection_ExpandAll_label;
+	public static String Projection_ExpandAll_tooltip;
+	public static String Projection_ExpandAll_description;
+	public static String Projection_ExpandAll_image;
+	public static String Projection_CollapseAll_label;
+	public static String Projection_CollapseAll_tooltip;
+	public static String Projection_CollapseAll_description;
+	public static String Projection_CollapseAll_image;
+
+	// These strings are accessed using resource bundle and in properties
+	// file, need to use '.' instead of '_' in some keys
+	public static String Editor_ManageBookmarks_tooltip;
+	public static String Editor_ManageBookmarks_image;
+	public static String Editor_ManageBookmarks_description;
+	public static String Editor_ManageBookmarks_add_label;
+	public static String Editor_ManageBookmarks_remove_label;
+	public static String Editor_ManageBookmarks_add_dialog_title;
+	public static String Editor_ManageBookmarks_add_dialog_message;
+	public static String Editor_ManageBookmarks_error_dialog_title;
+	public static String Editor_ManageBookmarks_error_dialog_message;
+	public static String Editor_ManageTasks_tooltip;
+	public static String Editor_ManageTasks_image;
+	public static String Editor_ManageTasks_description;
+	public static String Editor_ManageTasks_add_label;
+	public static String Editor_ManageTasks_remove_label;
+	public static String Editor_ManageTasks_add_dialog_title;
+	public static String Editor_ManageTasks_add_dialog_message;
+	public static String Editor_ManageTasks_error_dialog_title;
+	public static String Editor_ManageTasks_error_dialog_message;
+	/*
+	 * *****Above are possibly unused strings that may be removed*****
+	 */
+	
+	public static String StructuredTextEditorPreferencePage_39;
+	public static String StructuredTextEditor_0;
+	public static String UnknownContentTypeDialog_0;
+	public static String UnknownContentTypeDialog_1;
+	public static String UnknownContentTypeDialog_2;
+	public static String StyledTextColorPicker_0;
+	
+	public static String TextSearchLabelProvider_matchCountFormat;
+	
+	//content assist messages
+	public static String ContentAssist_computing_proposals;
+	public static String ContentAssist_collecting_proposals;
+	public static String ContentAssist_sorting_proposals;
+	public static String ContentAssist_collecting_contexts;
+	public static String ContentAssist_computing_contexts;
+	public static String ContentAssist_sorting_contexts;
+	public static String ContentAssist_no_completions;
+	public static String ContentAssist_all_disabled_title;
+	public static String ContentAssist_all_disabled_message;
+	public static String ContentAssist_all_disabled_preference_link;
+	public static String ContentAssist_no_message;
+	public static String ContentAssist_toggle_affordance_update_message;
+	public static String ContentAssist_defaultProposalCategory_title;
+	public static String ContentAssist_press;
+	public static String ContentAssist_click;
+	public static String OptionalMessageDialog_dontShowAgain;
+	
+	//content assist preference messages
+	public static String CodeAssistAdvancedConfigurationBlock_page_description;
+	public static String CodeAssistAdvancedConfigurationBlock_no_shortcut;
+	public static String CodeAssistAdvancedConfigurationBlock_Up;
+	public static String CodeAssistAdvancedConfigurationBlock_Down;
+	public static String CodeAssistAdvancedConfigurationBlock_separate_table_description;
+	public static String CodeAssistAdvancedConfigurationBlock_default_table_description;
+	public static String CodeAssistAdvancedConfigurationBlock_default_table_category_column_title;
+	public static String CodeAssistAdvancedConfigurationBlock_PagesDown;
+	public static String CodeAssistAdvancedConfigurationBlock_PagesUp;
+	public static String CodeAssistAdvancedConfigurationBlock_separate_table_category_column_title;
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java
new file mode 100644
index 0000000..d46cf03
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.forms.FormColors;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistry;
+import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistryImpl;
+import org.eclipse.wst.sse.ui.internal.taginfo.TextHoverManager;
+import org.osgi.framework.BundleContext;
+
+
+public class SSEUIPlugin extends AbstractUIPlugin {
+
+	public final static String ID = "org.eclipse.wst.sse.ui"; //$NON-NLS-1$
+
+	static SSEUIPlugin instance = null;
+	
+	private FormToolkit fDialogsFormToolkit;
+
+	public static SSEUIPlugin getDefault() {
+		return instance;
+	}
+
+	public synchronized static SSEUIPlugin getInstance() {
+		return instance;
+	}
+
+	private TextHoverManager fTextHoverManager;
+
+	public SSEUIPlugin() {
+		super();
+		instance = this;
+	}
+
+	public AdapterFactoryRegistry getAdapterFactoryRegistry() {
+		return AdapterFactoryRegistryImpl.getInstance();
+
+	}
+
+	/**
+	 * Return text hover manager
+	 * 
+	 * @return TextHoverManager
+	 */
+	public TextHoverManager getTextHoverManager() {
+		if (fTextHoverManager == null) {
+			fTextHoverManager = new TextHoverManager();
+		}
+		return fTextHoverManager;
+	}
+
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+	}
+	
+	public FormToolkit getDialogsFormToolkit() {
+		if (fDialogsFormToolkit == null) {
+			FormColors colors= new FormColors(Display.getCurrent());
+			colors.setBackground(null);
+			colors.setForeground(null);	
+			fDialogsFormToolkit= new FormToolkit(colors);
+		}
+		return fDialogsFormToolkit;
+	}
+
+	public void stop(BundleContext context) throws Exception {
+		super.stop(context);
+	}
+
+	/**
+	 * <p>A utility function for getting the active workbench shell.</p>
+	 * 
+	 * @return the active workbench {@link Shell}
+	 */
+	public static Shell getActiveWorkbenchShell() {
+		 IWorkbenchWindow window = getDefault().getWorkbench().getActiveWorkbenchWindow();
+		 if (window != null) {
+		 	return window.getShell();
+		 }
+		 return null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties
new file mode 100644
index 0000000..aa04685
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties
@@ -0,0 +1,444 @@
+###############################################################################
+# Copyright (c) 2001, 2009 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
+#     Jens Lukowski/Innoopract - initial renaming/restructuring
+#
+###############################################################################
+Error_opening_file_UI_=Error opening file
+_UI_File_is_read_only=File {0} is read-only.
+_32concat_EXC_=Editor could not be open on {0}
+Multiple_errors=Multiple annotations found at this line:
+_Undo_Text_Change__Ctrl_Z_UI_=&Undo Text Change @Ctrl+Z
+Undo_Text_Change__UI_=Undo Text Change.
+_Undo__0___Ctrl_Z_UI_=&Undo {0} @Ctrl+Z
+Undo___0___UI_=Undo: {0}.
+_Redo_Text_Change__Ctrl_Y_UI_=&Redo Text Change @Ctrl+Y
+Redo_Text_Change__UI_=Redo Text Change.
+_Redo__0___Ctrl_Y_UI_=&Redo {0} @Ctrl+Y
+Redo___0___UI_=Redo: {0}.
+Format_Document_UI_=Format
+Format_Active_Elements_UI_=Format Active Elements
+Text_Cut_UI_=Text Cut
+Text_Paste_UI_=Text Paste
+###############################################################################
+Cleanup_Document_UI_=Cleanup Document
+
+Editor_Cut_label=Cu&t@Ctrl+X
+Editor_Cut_tooltip=Cut
+Editor_Cut_image=
+Editor_Cut_description=Cut
+
+Editor_Copy_label=&Copy@Ctrl+C
+Editor_Copy_tooltip=Copy
+Editor_Copy_image=
+Editor_Copy_description=Copy
+
+Editor_Paste_label=&Paste@Ctrl+V
+Editor_Paste_tooltip=Paste
+Editor_Paste_image=
+Editor_Paste_description=Paste
+
+Editor_Delete_label=&Delete@Delete
+Editor_Delete_tooltip=Delete
+Editor_Delete_image=
+Editor_Delete_description=Delete
+
+ContentAssistProposals_label=Con&tent Assist
+ContentAssistProposals_tooltip=Content Assist
+ContentAssistProposals_description=Content Assist
+
+QuickFix_label=&Quick Fix
+QuickFix_tooltip=Quick Fix
+QuickFix_image=
+QuickFix_description=Quick Fix
+
+ToggleComment_label=Togg&le Comment
+ToggleComment_tooltip=Toggle Comment
+ToggleComment_image=
+ToggleComment_description=Toggle Comment
+AddBlockComment_label=Add &Block Comment
+AddBlockComment_tooltip=Add Block Comment
+AddBlockComment_image=
+AddBlockComment_description=Add Block Comment
+RemoveBlockComment_label=Remove Bloc&k Comment
+RemoveBlockComment_tooltip=Remove Block Comment
+RemoveBlockComment_image=
+RemoveBlockComment_description=Remove Block Comment
+CleanupDocument_label=C&leanup Document...
+CleanupDocument_tooltip=Cleanup Document
+CleanupDocument_image=
+CleanupDocument_description=Cleanup Document
+FormatDocument_label=&Format
+FormatDocument_tooltip=Format
+FormatDocument_image=
+FormatDocument_description=Format
+FormatActiveElements_label=Format Act&ive Elements
+FormatActiveElements_tooltip=Format Active Elements
+FormatActiveElements_image=
+FormatActiveElements_description=Format Active Elements
+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
+StructureSelectEnclosing_label=&Enclosing Element
+StructureSelectEnclosing_tooltip=Expand selection to include enclosing element
+StructureSelectEnclosing_description=Expand selection to include enclosing element
+StructureSelectNext_label=&Next Element
+StructureSelectNext_tooltip=Expand selection to include next sibling
+StructureSelectNext_description=Expand selection to include next sibling
+StructureSelectPrevious_label=&Previous Element
+StructureSelectPrevious_tooltip=Expand selection to include previous sibling
+StructureSelectPrevious_description=Expand selection to include previous sibling
+StructureSelectHistory_label=&Restore Last Selection
+StructureSelectHistory_tooltip=Restore last selection
+StructureSelectHistory_description=Restore last selection
+Text_Shift_Right_UI_=Text Shift Right
+Text_Shift_Left_UI_=Text Shift Left
+
+_4concat=''{0}'' is not a valid input
+## The following strings are for "XML->XML Source->XML Style" Preferences, "Web Tools->Source->HTML Style" Preferences, and "Web Tools->Source->JavaScript Style" Preferences
+Content_type__UI_=Co&ntent type:
+Foreground_UI_=&Foreground:
+Background_UI_=Backgr&ound:
+Bold_UI_=B&old
+Italics_UI=Italics
+Restore_Default_UI_=&Restore Default
+Sample_text__UI_=&Sample text:
+##
+AddBreakpoint_label=Add &Breakpoint
+AddBreakpoint_tooltip=Add Breakpoint
+AddBreakpoint_description=Add Breakpoint
+AddBreakpoint_error_dialog_title=Add Breakpoint
+AddBreakpoint_error_dialog_message=Cannot add breakpoint
+##
+ToggleBreakpoint_label=Toggle Breakpoint
+ToggleBreakpoint_tooltip=Toggle Breakpoint
+ToggleBreakpoint_description=Toggle Breakpoint
+##
+EnableBreakpoint_label=Enable Breakpoint
+EnableBreakpoint_tooltip=Enable Breakpoint
+EnableBreakpoint_description=Enable Breakpoint
+##
+DisableBreakpoint_label=Disable Breakpoint
+DisableBreakpoint_tooltip=Disable Breakpoint
+DisableBreakpoint_description=Disable Breakpoint
+##
+ManageBreakpoints_add_label=Add &Breakpoint
+ManageBreakpoints_remove_label=Remove Breakpoint
+ManageBreakpoints_tooltip=Add/Remove Breakpoint
+ManageBreakpoints_error_adding_title1=Add Breakpoint
+ManageBreakpoints_error_adding_message1=Cannot add breakpoint
+
+AbstractColorPageDescription=Customize the syntax highlighting by selecting the type of text whose style you want to customize from either the combo box or the sample text area
+##
+EditorModelUtil_0=model in invalid state
+EditorModelUtil_1=There was a problem adding adapter factories
+
+# web content settings
+UI_Default_HTML_DOCTYPE_ID___1=&Document type:
+UI_CSS_profile___2=&CSS profile:
+UI_Target_Device___3=&Target device:
+
+Editor_ToggleInsertMode_label=Sma&rt Insert Mode
+
+##########################################################################
+# These strings are used in Workbench menu bar
+##########################################################################
+ExpandSelectionToMenu_label=E&xpand Selection To
+SourceMenu_label=&Source
+RefactorMenu_label=Refac&tor
+#
+FindOccurrencesActionProvider_0=Current selection does not resolve to a searchable element
+RemoveAction_0=Remove Property
+ShowPropertiesAction_0=P&roperties
+ContentOutlineConfiguration_0=Collapse All
+ContentOutlineConfiguration_1=Link with Editor
+AbstractOpenOn_0=Current text selection does not resolve to a file
+FormatActionDelegate_jobName=Formatting...
+FormatActionDelegate_errorStatusMessage=Exceptions occurred while formatting documents
+FormatActionDelegate_3=Formatting {0}
+FormatActionDelegate_4=Exception occurred while formatting document {0}
+FormatActionDelegate_5=MalformedInputException occurred while formatting document {0}
+TranslucencyPreferenceTab_0=Read-Only text style
+TranslucencyPreferenceTab_1=Read-Only contrast percentage:
+StructuredTextEditorPreferencePage_2=Matching brackets highlight
+StructuredTextEditorPreferencePage_6=The following preferences apply to the HTML, JSP, XML, and other source editors.
+StructuredTextEditorPreferencePage_20=Highlight &matching brackets
+StructuredTextEditorPreferencePage_23=Appearance co&lor options:
+StructuredTextEditorPreferencePage_24=C&olor:
+StructuredTextEditorPreferencePage_30=&Report problems as you type
+StructuredTextEditorPreferencePage_37=Empty input
+StructuredTextEditorPreferencePage_38=is not a valid input.
+StructuredTextEditorPreferencePage_39=Inform when &unsupported content type is in editor
+StructuredTextEditorPreferencePage_40=Also see the <a>''{0}''</a> preferences.
+StructuredTextEditorPreferencePage_41=Completion proposal background
+StructuredTextEditorPreferencePage_42=Completion proposal foreground
+StructuredTextEditorPreferencePage_43=Parameter hints background
+StructuredTextEditorPreferencePage_44=Parameter hints foreground
+TaskTagPreferenceTab_0=Low
+TaskTagPreferenceTab_1=Normal
+TaskTagPreferenceTab_2=High
+TaskTagPreferenceTab_3=N/A
+TaskTagPreferenceTab_5=Task Tag
+TaskTagPreferenceTab_6=Tag:
+TaskTagPreferenceTab_7=Priority:
+TaskTagPreferenceTab_12=Tag
+TaskTagPreferenceTab_13=Priority
+TaskTagPreferenceTab_14=New...
+TaskTagPreferenceTab_15=Edit...
+TaskTagPreferenceTab_16=Remove
+TaskTagPreferenceTab_17=Select All
+TaskTagPreferenceTab_18=Deselect All
+TaskTagPreferenceTab_19=Note: tags are case insensitive
+TaskTagPreferenceTab_20=Task Tags
+TaskTagPreferenceTab_22=Task Tags Settings Changed
+TaskTagPreferenceTab_23=The task tags settings have changed.  Make these changes effective now?
+TaskTagPreferenceTab_24=Yes
+TaskTagPreferenceTab_25=No
+TaskTagPreferenceTab_26=Cancel
+TaskTagPreferenceTab_27=Scanning files for tasks
+TaskTagPreferenceTab_28=detection aborted
+TaskTagPreferenceTab_29=detection completed
+TaskTagPreferenceTab_30=detection encountered errors
+TaskTagPreferenceTab_31=Enable searching for Task Tags
+TaskTagPreferencePage_32=Clean and redetect Tasks
+TaskTagPreferenceTab_33=Tags in comments indicating Tasks:
+TaskTagExclusionTab_01=Filters
+TaskTagExclusionTab_02=Scan the selected Content Types:
+TaskTagExclusionTab_03=Affected Content Types:
+
+PropertyPreferencePage_01=Project Specific Configuration
+PropertyPreferencePage_02=Select the project to configure:
+
+FilePreferencePage_0=Expand the tree to edit preferences for a specific content type.
+NoModificationCompletionProposal_0=No corrections available
+ToggleBreakpointAction_0=Toggle &Breakpoints
+ManageBreakpointAction_0=&Enable Breakpoints
+ManageBreakpointAction_1=&Disable Breakpoints
+EditBreakpointAction_0=Breakpoint &Properties...
+## Used in Structured Text Editor Preference Page / Hovers Tab
+TextHoverPreferenceTab_title=Hovers
+TextHoverPreferenceTab_hoverPreferences=Text &Hover key modifier preferences:
+TextHoverPreferenceTab_keyModifier=Pressed key &modifier while hovering:
+TextHoverPreferenceTab_description=Description:
+TextHoverPreferenceTab_modifierIsNotValid=Modifier ''{0}'' is not valid.
+TextHoverPreferenceTab_modifierIsNotValidForHover=Modifier ''{0}'' for ''{1}'' hover is not valid.
+TextHoverPreferenceTab_duplicateModifier=''{0}'' hover uses the same modifier as ''{1}'' hover.
+TextHoverPreferenceTab_nameColumnTitle=Text Hover Name
+TextHoverPreferenceTab_modifierColumnTitle=Pressed Key Modifier While Hovering
+TextHoverPreferenceTab_delimiter=+
+TextHoverPreferenceTab_insertDelimiterAndModifierAndDelimiter=\ + {0} +
+TextHoverPreferenceTab_insertModifierAndDelimiter=\ {0} +
+TextHoverPreferenceTab_insertDelimiterAndModifier=\ + {0}
+combinationHover_label=Combined Hover
+combinationHover_desc=Tries the hovers in the sequence listed in the table below this one and uses the one which fits best for the selected element and the current context.
+problemHover_label=Problem Description
+problemHover_desc=Shows the description of the selected problem.
+documentationHover_label=Documentation Description
+documentationHover_desc=Shows the documentation of the selected element.
+annotationHover_label=Annotation Description
+annotationHover_desc=Shows the description of the selected annotation.
+EditStructuredTextEditorPreferencesAction_0=Editor Preferences
+StructuredTextEditorPreferencePage_0=Appearance
+StructuredTextEditorPreferencePage_1=Enable &semantic highlighting
+PreferenceManager_0=Original Error:
+
+OccurrencesSearchQuery_0={0} - {1} occurrences in {2}
+OccurrencesSearchQuery_2=file
+ShowView_errorTitle=Problems Showing View
+proc_dirty_regions_0 = Processing Dirty Regions
+
+textHoverMakeStickyHint=Press ''{0}'' for focus.
+
+## Encoding
+EncodingPreferencePage_0=Encoding settings for Web and XML files:
+EncodingPreferencePage_1=Use 3 byte BOM (Byte Order Mark) when saving UTF-8 encoded files
+busy=busy
+caret_update=caret update
+EmptyFilePreferencePage_0=This category ID has been replaced by 'org.eclipse.wst.xml.ui.preferences.xml' and 'org.eclipse.wst.html.ui.preferences.web'
+OffsetStatusLineContributionItem_0=Selection Information:
+OffsetStatusLineContributionItem_2=Partitions
+OffsetStatusLineContributionItem_3=ITextRegions
+OffsetStatusLineContributionItem_4=Structured Model Content-Type: 
+OffsetStatusLineContributionItem_5=Model Handler: 
+OffsetStatusLineContributionItem_6=Document Class: 
+OffsetStatusLineContributionItem_7=Document Provider Class: 
+OffsetStatusLineContributionItem_8=Partitionings:
+OffsetStatusLineContributionItem_9=Start
+OffsetStatusLineContributionItem_10=Length
+OffsetStatusLineContributionItem_11=Type
+OffsetStatusLineContributionItem_12=Input Type: 
+OffsetStatusLineContributionItem_13=Partitioner: 
+OffsetStatusLineContributionItem_14=Structured Selection
+OffsetStatusLineContributionItem_15=Start
+OffsetStatusLineContributionItem_16=Length
+OffsetStatusLineContributionItem_17=Text Length
+OffsetStatusLineContributionItem_18=Context
+OffsetStatusLineContributionItem_19=Workbench Selection
+OffsetStatusLineContributionItem_20=Indexed Regions
+
+StructuredTextEditor_0=Unsupported content type warning
+UnknownContentTypeDialog_0=Unsupported Content Type
+UnknownContentTypeDialog_1=Do not show this message again
+UnknownContentTypeDialog_2=Unsupported content type in editor.\nTo associate file extension with a supported content type,\nplease see <a>Content Types Preference Page</a>
+
+################################################################################
+## Below are possibly unused strings that may be removed
+################################################################################
+Save_label=&Save
+An_error_has_occurred_when_ERROR_=An error has occurred when retrieving resources for the source editor. The Eclipse Workbench installation may have been corrupted.
+## save as problems (next two) should match what is in workbench
+Problems_During_Save_As_UI_=Problems During Save As...
+Save_could_not_be_complete_UI_=Save could not be completed.
+SemanticHighlightingReconciler_0=Semantic Highlighting Job
+ManageBreakpoints_error_removing_title1=Remove Breakpoint
+ManageBreakpoints_error_removing_message1=Cannot remove breakpoint
+ManageBreakpoints_error_retrieving_message=Retrieving markers failed:
+JSPSourcePreferencePageDescription=Embedded content type\'s source preferences will be used. Select the file type for customization
+# The following lines copied from org\eclipse\ui\editors\text\TextEditorMessages.properties in org.eclipse.ui plugin
+Editor_error_save_message=Save could not be completed. {0}
+Editor_error_save_title=Problems During Save As...
+Editor_warning_save_delete=The original file ''{0}'' has been deleted.
+
+# actions
+Previous_annotation=Previous Annotation
+Next_annotation=Next Annotation
+# Annotation Types
+AnnotationTypes_Errors=Errors
+AnnotationTypes_Warnings=Warnings
+AnnotationTypes_Tasks=Tasks
+AnnotationTypes_SearchResults=Search Results
+AnnotationTypes_Bookmarks=Bookmarks
+AnnotationTypes_Others=Others
+
+Editor_ConvertToWindows_label=&Windows
+Editor_ConvertToWindows_tooltip=Converts line delimiters to Windows
+Editor_ConvertToWindows_image=
+Editor_ConvertToWindows_description=Converts line delimiters to Windows
+
+Editor_ConvertToUNIX_label=&UNIX
+Editor_ConvertToUNIX_tooltip=Converts line delimiters to UNIX
+Editor_ConvertToUNIX_image=
+Editor_ConvertToUNIX_description=Converts line delimiters to UNIX
+
+Editor_ConvertToMac_label=&Mac
+Editor_ConvertToMac_tooltip=Converts line delimiters to Mac
+Editor_ConvertToMac_image=
+Editor_ConvertToMac_description=Converts line delimiters to Mac
+ConvertLineDelimitersMenu_label=Co&nvert Line Delimiters to
+FindOccurrences_label=O&ccurrences in File
+
+ConvertLineDelimitersToCRLFActionDelegate_jobName=Converting line delimiters
+ConvertLineDelimitersToCRLFActionDelegate_errorStatusMessage=Exceptions occurred while converting line delimiters
+ConvertLineDelimitersToCRLFActionDelegate_3=Converting line delimiters for {0}
+ConvertLineDelimitersToCRLFActionDelegate_4=Exception occurred while converting line delimiters for document {0}
+TextHoverPreferenceTab_annotationRollover=&Enable annotation roll-over (on new editors)
+TextHoverPreferenceTab_showAffordance=&Show affordance in hover on how to make it sticky
+TextHoverPreferenceTab_enabled=&Enabled
+
+BasicFindOccurrencesAction_0=region match:
+BasicSearchLabelProvider_0=line
+NavigationPreferenceTab_0=Modifier ''{0}'' is not valid.
+OccurrencesSearchQuery_1={0} - 1 Occurrence in {1}
+FileModelProvider_0=Error reloading {0}
+JFaceNodeAdapter_0=Update Outline
+
+ConfigureProjectSettings=Configure Project Specific Settings...
+ConfigureWorkspaceSettings=Configure Workspace Settings...
+EnableProjectSettings=Enable project specific settings
+
+LoadingReferencedGrammars=Loading referenced grammars
+
+## Folding
+Folding=Folding
+StructuredTextEditorPreferencePage_3=Enable &folding
+Projection_Toggle_label= &Enable Folding
+Projection_Toggle_tooltip= Toggles Folding
+Projection_Toggle_description= Toggles folding for the current editor
+Projection_Toggle_image=
+Projection_ExpandAll_label= Expand &All
+Projection_ExpandAll_tooltip= Expands All Collapsed Regions
+Projection_ExpandAll_description= Expands any collapsed regions in the current editor
+Projection_ExpandAll_image=
+Projection_CollapseAll_label= Collapse A&ll
+Projection_CollapseAll_tooltip= Collapses All Expanded Regions
+Projection_CollapseAll_description= Collapse any expanded regions in the current editor
+Projection_CollapseAll_image=
+
+## These are copied from org.eclipse.ui.texteditor.EditorMessages.properties
+## They are needed temporarily until CMVC defect 203158 / Bugzilla defect 20054 is fixed
+Editor_ManageBookmarks_tooltip=Adds and Removes Bookmarks
+Editor_ManageBookmarks_image=
+Editor_ManageBookmarks_description=Adds and removes Bookmarks
+Editor_ManageBookmarks_add_label=Add Boo&kmark...
+Editor_ManageBookmarks_remove_label=Remove Boo&kmark
+Editor_ManageBookmarks_add_dialog_title=Add Bookmark
+Editor_ManageBookmarks_add_dialog_message=Enter Bookmark name
+Editor_ManageBookmarks_error_dialog_title=Managing Bookmarks
+Editor_ManageBookmarks_error_dialog_message=Problems managing bookmarks
+
+Editor_ManageTasks_tooltip=Adds and Removes Tasks
+Editor_ManageTasks_image=
+Editor_ManageTasks_description=Adds and removes Tasks
+Editor_ManageTasks_add_label=Add &Task...
+Editor_ManageTasks_remove_label=Remove &Task
+Editor_ManageTasks_add_dialog_title=Add Task
+Editor_ManageTasks_add_dialog_message=Enter Task description
+Editor_ManageTasks_error_dialog_title=Managing Tasks
+Editor_ManageTasks_error_dialog_message=Problems managing tasks
+################################################################################
+## Above are possibly unused strings that may be removed
+###############################################################################
+StyledTextColorPicker_0=Pick a color
+SyntaxColoring_Link=Default colors and font can be configured on the <a href=\"org.eclipse.ui.preferencePages.GeneralTextEditor\">Text Editors</a> and on the <a href=\"org.eclipse.ui.preferencePages.ColorsAndFonts\">Colors and Fonts</a> preference pages.  Decorations for annotations can be configured on the <a href=\"org.eclipse.ui.editors.preferencePages.Annotations\">Annotations</a> preference page.
+SyntaxColoring_Description=Customize the syntax highlighting by selecting the type of text whose style you want to customize from either the list or the example text area.
+
+GotoMatchingBracket_label= Matching &Bracket
+GotoMatchingBracket_tooltip=Go to Matching Bracket
+GotoMatchingBracket_description=Go to Matching Bracket
+GotoMatchingBracket_error_invalidSelection=No bracket selected
+GotoMatchingBracket_error_noMatchingBracket=No matching bracket found
+GotoMatchingBracket_error_bracketOutsideSelectedElement=Matching bracket is outside the selected element
+
+TextSearchLabelProvider_matchCountFormat=({0} matches)
+
+
+##################################################
+## Content Assist Strings
+##################################################
+ContentAssist_computing_proposals=Computing completion proposals
+ContentAssist_collecting_proposals=Collecting completion proposals
+ContentAssist_sorting_proposals=Sorting completion proposals
+ContentAssist_collecting_contexts=Collecting context information
+ContentAssist_computing_contexts=Computing context information
+ContentAssist_sorting_contexts=Sorting context information
+ContentAssist_no_completions=No completions available.
+ContentAssist_all_disabled_title=Content Assist Problem
+ContentAssist_all_disabled_message=Some content proposal kinds have been uninstalled. It is recommended to review the content assist settings.
+ContentAssist_all_disabled_preference_link=Change the settings on the <a>Content Assist preference page</a> or click ''{0}'' to restore the default behavior.
+ContentAssist_no_message= No {0}
+ContentAssist_toggle_affordance_update_message={1} to show {2}
+ContentAssist_defaultProposalCategory_title=Default Proposals
+ContentAssist_press=Press ''{0}''
+ContentAssist_click=Click
+OptionalMessageDialog_dontShowAgain= Do not show this &message again
+
+##################################################
+## Content Assist Properties page Strings
+##################################################
+CodeAssistAdvancedConfigurationBlock_page_description=Configure the behavior of the content assist ({0}) command.
+CodeAssistAdvancedConfigurationBlock_no_shortcut=no shortcut
+CodeAssistAdvancedConfigurationBlock_Up=&Up
+CodeAssistAdvancedConfigurationBlock_Down=D&own
+CodeAssistAdvancedConfigurationBlock_default_table_description=Select the proposal &categories contained in the 'default' content assist list:
+CodeAssistAdvancedConfigurationBlock_default_table_category_column_title=Default Proposal Categories
+CodeAssistAdvancedConfigurationBlock_PagesDown=Do&wn
+CodeAssistAdvancedConfigurationBlock_PagesUp=U&p
+CodeAssistAdvancedConfigurationBlock_separate_table_description=Select the &enablement and order of proposal categories that are cycled through when repeatedly invoking content assist:
+CodeAssistAdvancedConfigurationBlock_separate_table_category_column_title=Content Assist Pages
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ShowViewAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ShowViewAction.java
new file mode 100644
index 0000000..6e3aa63
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ShowViewAction.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * Surfaces a View.
+ * 
+ * @author Nitin Dahyabhai
+ */
+public abstract class ShowViewAction extends Action {
+	/**
+	 *  
+	 */
+	public ShowViewAction() {
+		super();
+	}
+
+	/**
+	 * @param text
+	 */
+	public ShowViewAction(String text) {
+		super(text);
+	}
+
+	/**
+	 * @param text
+	 * @param image
+	 */
+	public ShowViewAction(String text, ImageDescriptor image) {
+		super(text, image);
+	}
+
+	/**
+	 * @param text
+	 * @param style
+	 */
+	public ShowViewAction(String text, int style) {
+		super(text, style);
+	}
+
+	/**
+	 * @return
+	 */
+	protected abstract String getViewID();
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	public void run() {
+		super.run();
+		showView();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
+	 */
+	public void runWithEvent(Event event) {
+		super.runWithEvent(event);
+		showView();
+	}
+
+	/**
+	 *  
+	 */
+	private void showView() {
+		IWorkbenchWindow window = SSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
+		IWorkbenchPage page = window.getActivePage();
+		if (page != null) {
+			try {
+				page.showView(getViewID());
+			} catch (PartInitException e) {
+				ErrorDialog.openError(window.getShell(), SSEUIMessages.ShowView_errorTitle, //$NON-NLS-1$
+							e.getMessage(), e.getStatus());
+			}
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StorageModelProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StorageModelProvider.java
new file mode 100644
index 0000000..5082372
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StorageModelProvider.java
@@ -0,0 +1,763 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IEncodedStorage;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.AnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPathEditorInput;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.editors.text.FileDocumentProvider;
+import org.eclipse.ui.editors.text.ILocationProvider;
+import org.eclipse.ui.editors.text.StorageDocumentProvider;
+import org.eclipse.ui.texteditor.DocumentProviderRegistry;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.IElementStateListener;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.encoding.CodedReaderCreator;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.util.Utilities;
+import org.eclipse.wst.sse.ui.internal.debug.BreakpointRulerAction;
+import org.eclipse.wst.sse.ui.internal.editor.EditorModelUtil;
+import org.eclipse.wst.sse.ui.internal.extension.BreakpointProviderBuilder;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IExtendedStorageEditorInput;
+
+/**
+ * A StorageDocumentProvider that is IStructuredModel aware
+ */
+public class StorageModelProvider extends StorageDocumentProvider implements IModelProvider {
+
+	private class InternalElementStateListener implements IElementStateListener {
+		public void elementContentAboutToBeReplaced(Object element) {
+			if (debugElementStatelistener) {
+				System.out.println("StorageModelProvider: elementContentAboutToBeReplaced: " + ((IEditorInput) element).getName()); //$NON-NLS-1$
+			}
+			// we just forward the event
+			StorageModelProvider.this.fireElementContentAboutToBeReplaced(element);
+		}
+
+		public void elementContentReplaced(Object element) {
+			if (debugElementStatelistener) {
+				System.out.println("StorageModelProvider: elementContentReplaced: " + ((IEditorInput) element).getName()); //$NON-NLS-1$
+			}
+
+			StorageInfo info = (StorageInfo) getElementInfo(element);
+			
+			if (info == null)
+				return;
+
+			/**
+			 * Force a reload of the markers into annotations since their
+			 * previous Positions have been deleted. Disconnecting and
+			 * reconnecting forces a call to the private catchupWithMarkers
+			 * method.
+			 */
+			if (info.fModel != null) {
+				info.fModel.disconnect(info.fDocument);
+			}
+
+			Reader reader = null;
+			IStructuredDocument innerdocument = null;
+			try {
+				// update document from input's contents
+				CodedReaderCreator codedReaderCreator = new CodedReaderCreator(calculateID((IStorageEditorInput) element), Utilities.getMarkSupportedStream(((IStorageEditorInput) element).getStorage().getContents()));
+				reader = codedReaderCreator.getCodedReader();
+
+				innerdocument = (IStructuredDocument) info.fDocument;
+
+				int originalLengthToReplace = innerdocument.getLength();
+
+				StringBuffer stringBuffer = new StringBuffer();
+				int bufferSize = 2048;
+				char[] buffer = new char[bufferSize];
+				int nRead = 0;
+				boolean eof = false;
+				while (!eof) {
+					nRead = reader.read(buffer, 0, bufferSize);
+					if (nRead == -1) {
+						eof = true;
+					}
+					else {
+						stringBuffer.append(buffer, 0, nRead);
+					}
+				}
+				innerdocument.replaceText(this, 0, originalLengthToReplace, stringBuffer.toString(), true);
+			}
+			catch (CoreException e) {
+				Logger.logException(e);
+			}
+			catch (IOException e) {
+				Logger.logException(e);
+			}
+			finally {
+				if (reader != null) {
+					try {
+						reader.close();
+					}
+					catch (IOException e1) {
+						// would be highly unusual
+						Logger.logException(e1);
+					}
+				}
+			}
+
+			// forward the event
+			if (info.fCanBeSaved) {
+				info.fCanBeSaved = false;
+				addUnchangedElementListeners(element, info);
+			}
+			fireElementContentReplaced(element);
+			fireElementDirtyStateChanged(element, false);
+
+			if (info != null && info.fModel != null) {
+				info.fModel.connect(info.fDocument);
+			}
+		}
+
+		public void elementDeleted(Object element) {
+			if (debugElementStatelistener) {
+				System.out.println("StorageModelProvider: elementDeleted: " + ((IEditorInput) element).getName()); //$NON-NLS-1$
+			}
+			// we just forward the event
+			StorageModelProvider.this.fireElementDeleted(element);
+		}
+
+		public void elementDirtyStateChanged(Object element, boolean isDirty) {
+			if (debugElementStatelistener) {
+				System.out.println("StorageModelProvider: elementDirtyStateChanged: " + ((IEditorInput) element).getName() + " (" + isDirty + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
+			// we just forward the event
+			StorageModelProvider.this.fireElementDirtyStateChanged(element, isDirty);
+		}
+
+		public void elementMoved(Object originalElement, Object movedElement) {
+			if (debugElementStatelistener) {
+				System.out.println("StorageModelProvider: elementMoved " + originalElement + " --> " + movedElement); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			// we just forward the event
+			StorageModelProvider.this.fireElementMoved(originalElement, movedElement);
+		}
+	}
+
+	/**
+	 * Collection of info that goes with a model.
+	 */
+	private class ModelInfo {
+		public IEditorInput fElement;
+		public boolean fShouldReleaseOnInfoDispose;
+		public IStructuredModel fStructuredModel;
+
+		public ModelInfo(IStructuredModel structuredModel, IEditorInput element, boolean selfCreated) {
+			fElement = element;
+			fStructuredModel = structuredModel;
+			fShouldReleaseOnInfoDispose = selfCreated;
+		}
+	}
+
+	static final boolean debugElementStatelistener = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/storagemodelprovider/elementstatelistener")); //$NON-NLS-1$ //$NON-NLS-2$
+	static final boolean debugOperations = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/storagemodelprovider/operations")); //$NON-NLS-1$ //$NON-NLS-2$
+
+	private static StorageModelProvider fInstance = null;
+
+	public synchronized static StorageModelProvider getInstance() {
+		if (fInstance == null)
+			fInstance = new StorageModelProvider();
+		return fInstance;
+	}
+
+	private IElementStateListener fInternalListener;
+	/** IStructuredModel information of all connected elements */
+	private Map fModelInfoMap = new HashMap();
+	private boolean fReuseModelDocument = true;
+
+	private StorageModelProvider() {
+		super();
+		fInternalListener = new InternalElementStateListener();
+	}
+
+	String calculateBaseLocation(IStorageEditorInput input) {
+		String location = null;
+		if (input instanceof IPathEditorInput) {
+			IPath path = ((IPathEditorInput) input).getPath();
+			if (path != null) {
+				location = path.toString();
+			}
+		}
+		if (location == null && input instanceof ILocationProvider) {
+			IPath path = ((ILocationProvider) input).getPath(input);
+			if (path != null) {
+				location = path.toString();
+			}
+		}
+		if (location == null) {
+			try {
+				IStorage storage = input.getStorage();
+				if (storage != null) {
+					IPath storagePath = storage.getFullPath();
+					String name = storage.getName();
+					if (storagePath != null) {
+						// If they are different, the IStorage contract is not
+						// being honored
+						// (https://bugs.eclipse.org/bugs/show_bug.cgi?id=73098).
+						// Favor the name.
+						if (!storagePath.lastSegment().equals(name)) {
+							IPath workingPath = storagePath.addTrailingSeparator();
+							location = workingPath.append(name).toString();
+						}
+						else {
+							location = storagePath.makeAbsolute().toString();
+						}
+					}
+					if (location == null)
+						location = name;
+				}
+			}
+			catch (CoreException e) {
+				Logger.logException(e);
+			}
+			finally {
+				if (location == null)
+					location = input.getName();
+			}
+		}
+		return location;
+	}
+
+	String calculateID(IStorageEditorInput input) {
+		/**
+		 * Typically CVS will return a path of "filename.ext" and the input's
+		 * name will be "filename.ext version". The path must be used to load
+		 * the model so that the suffix will be available to compute the
+		 * contentType properly. The editor input name can then be set as the
+		 * base location for display on the editor title bar.
+		 * 
+		 */
+		String path = null;
+		if (input instanceof ILocationProvider) {
+			IPath ipath = ((ILocationProvider) input).getPath(input);
+			if (ipath != null) {
+				path = ipath.toString();
+			}
+		}
+		if (path == null) {
+			try {
+				IStorage storage = input.getStorage();
+				if (storage != null) {
+					IPath storagePath = storage.getFullPath();
+					String name = storage.getName();
+					if (storagePath != null) {
+						// If they are different, the IStorage contract is not
+						// being honored
+						// (https://bugs.eclipse.org/bugs/show_bug.cgi?id=73098).
+						// Favor the name.
+						if (!storagePath.lastSegment().equals(name)) {
+							IPath workingPath = storagePath.addTrailingSeparator();
+							path = workingPath.append(name).toString();
+						}
+						else {
+							path = storagePath.makeAbsolute().toString();
+						}
+					}
+					if (path == null)
+						path = name;
+				}
+			}
+			catch (CoreException e) {
+				Logger.logException(e);
+			}
+			finally {
+				if (path == null)
+					path = input.getName(); //$NON-NLS-1$
+			}
+		}
+		/*
+		 * Prepend the hash to the path value so that we have a 1:1:1 match
+		 * between editor inputs, element info, and models. The editor manager
+		 * should help prevent needlessly duplicated models as long as two
+		 * editor inputs from the same storage indicate they're equals().
+		 */
+		path = input.hashCode() + "#" + path; //$NON-NLS-1$
+		return path;
+	}
+
+	// public boolean canSaveDocument(Object element) {
+	// return false;
+	// }
+
+	protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
+		IAnnotationModel model = null;
+		if (debugOperations) {
+			if (element instanceof IStorageEditorInput)
+				System.out.println("StorageModelProvider: createAnnotationModel for " + ((IStorageEditorInput) element).getStorage().getFullPath()); //$NON-NLS-1$
+			else
+				System.out.println("StorageModelProvider: createAnnotationModel for " + element); //$NON-NLS-1$
+		}
+		if (element instanceof IStorageEditorInput) {
+			IStorageEditorInput input = (IStorageEditorInput) element;
+			String contentType = (getModel(input) != null ? getModel(input).getContentTypeIdentifier() : null);
+			String ext = BreakpointRulerAction.getFileExtension((IEditorInput) element);
+			IResource res = BreakpointProviderBuilder.getInstance().getResource(input, contentType, ext);
+			String id = input.getName();
+			if (input.getStorage() != null && input.getStorage().getFullPath() != null) {
+				id = input.getStorage().getFullPath().toString();
+			}
+			// we can only create a resource marker annotationmodel off of a
+			// valid resource
+			if (res != null)
+				model = new StructuredResourceMarkerAnnotationModel(res, id);
+			else
+				model = new AnnotationModel();
+		}
+		if (model == null) {
+			model = super.createAnnotationModel(element);
+		}
+		return model;
+	}
+
+	protected IDocument createDocument(Object element) {
+		if (debugOperations) {
+			if (element instanceof IStorageEditorInput)
+				try {
+					System.out.println("StorageModelProvider: createDocument for " + ((IStorageEditorInput) element).getStorage().getFullPath()); //$NON-NLS-1$
+				}
+				catch (CoreException e) {
+					System.out.println("StorageModelProvider: createDocument for " + element + "(exception caught)"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			else {
+				System.out.println("StorageModelProvider: createDocument for " + element); //$NON-NLS-1$
+			}
+		}
+
+		// The following is largely copied from FileModelProvider
+
+		IDocument document = null;
+		if (element instanceof IEditorInput) {
+			// create a new IDocument for the element; should always reflect
+			// the contents of the resource
+			ModelInfo info = getModelInfoFor((IEditorInput) element);
+			if (info == null) {
+				throw new IllegalArgumentException("no corresponding model info found"); //$NON-NLS-1$
+			}
+			IStructuredModel model = info.fStructuredModel;
+			if (model != null) {
+				if (!fReuseModelDocument && element instanceof IStorageEditorInput) {
+					Reader reader = null;
+					IStructuredDocument innerdocument = null;
+					try {
+						// update document from input's contents
+
+						CodedReaderCreator codedReaderCreator = new CodedReaderCreator(calculateID((IStorageEditorInput) element), Utilities.getMarkSupportedStream(((IStorageEditorInput) element).getStorage().getContents()));
+						reader = codedReaderCreator.getCodedReader();
+
+						innerdocument = model.getStructuredDocument();
+
+						int originalLengthToReplace = innerdocument.getLength();
+
+						/*
+						 * TODO_future: we could implement with sequential
+						 * rewrite, if we don't pickup automatically from
+						 * FileBuffer support, so not so much has to be pulled
+						 * into memory (as an extra big string), but we need
+						 * to carry that API through so that StructuredModel
+						 * is not notified until done.
+						 */
+
+						// innerdocument.startSequentialRewrite(true);
+						// innerdocument.replaceText(this, 0,
+						// innerdocument.getLength(), "");
+						StringBuffer stringBuffer = new StringBuffer();
+						int bufferSize = 2048;
+						char[] buffer = new char[bufferSize];
+						int nRead = 0;
+						boolean eof = false;
+						while (!eof) {
+							nRead = reader.read(buffer, 0, bufferSize);
+							if (nRead == -1) {
+								eof = true;
+							}
+							else {
+								stringBuffer.append(buffer, 0, nRead);
+								// innerdocument.replaceText(this,
+								// innerdocument.getLength(), 0, new
+								// String(buffer, 0, nRead));
+							}
+						}
+						// ignore read-only settings if reverting whole
+						// document
+						innerdocument.replaceText(this, 0, originalLengthToReplace, stringBuffer.toString(), true);
+						model.setDirtyState(false);
+
+					}
+					catch (CoreException e) {
+						Logger.logException(e);
+					}
+					catch (IOException e) {
+						Logger.logException(e);
+					}
+					finally {
+						if (reader != null) {
+							try {
+								reader.close();
+							}
+							catch (IOException e1) {
+								// would be highly unusual
+								Logger.logException(e1);
+							}
+						}
+						// if (innerdocument != null) {
+						// innerdocument.stopSequentialRewrite();
+						// }
+					}
+
+				}
+				if (document == null) {
+					document = model.getStructuredDocument();
+				}
+			}
+		}
+		return document;
+	}
+
+	/**
+	 * Also create ModelInfo - extra resource synchronization classes should
+	 * be stored within the ModelInfo
+	 */
+	protected ElementInfo createElementInfo(Object element) throws CoreException {
+		// create the corresponding ModelInfo if necessary
+		if (debugOperations) {
+			if (element instanceof IStorageEditorInput)
+				try {
+					System.out.println("StorageModelProvider: createElementInfo for " + ((IStorageEditorInput) element).getStorage().getFullPath()); //$NON-NLS-1$
+				}
+				catch (CoreException e) {
+					System.out.println("StorageModelProvider: createElementInfo for " + element + "(exception caught)"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			else
+				System.out.println("storageModelProvider: createElementInfo for " + element); //$NON-NLS-1$
+		}
+
+		if (getModelInfoFor((IEditorInput) element) == null) {
+			createModelInfo((IEditorInput) element);
+		}
+
+		ElementInfo info = super.createElementInfo(element);
+		return info;
+	}
+
+	public void createModelInfo(IEditorInput input) {
+		if (getModelInfoFor(input) == null) {
+			IStructuredModel structuredModel = selfCreateModel(input);
+			if (structuredModel != null) {
+				createModelInfo(input, structuredModel, true);
+			}
+		}
+	}
+
+	/**
+	 * To be used when model is provided to us, ensures that when setInput is
+	 * used on this input, the given model will be used.
+	 */
+	public void createModelInfo(IEditorInput input, IStructuredModel structuredModel, boolean releaseModelOnDisconnect) {
+		// we have to make sure factories are added, whether we created or
+		// not.
+		if (getModelInfoFor(input) != null || getModelInfoFor(structuredModel) != null) {
+			if (debugOperations) {
+				if (input instanceof IStorageEditorInput) {
+
+					try {
+						System.out.println("StorageModelProvider: DUPLICATE createModelInfo for " + ((IStorageEditorInput) input).getStorage().getFullPath()); //$NON-NLS-1$
+					}
+					catch (CoreException e) {
+						System.out.println("StorageModelProvider: DUPLICATE createModelInfo for " + input + "(exception caught)"); //$NON-NLS-1$ //$NON-NLS-2$
+					}
+				}
+				else {
+					System.out.println("storageModelProvider: DUPLICATE createModelInfo for " + input); //$NON-NLS-1$
+				}
+			}
+			return;
+		}
+
+		if (debugOperations) {
+			if (input instanceof IStorageEditorInput) {
+				try {
+					System.out.println("StorageModelProvider: createModelInfo for " + ((IStorageEditorInput) input).getStorage().getFullPath()); //$NON-NLS-1$
+				}
+				catch (CoreException e) {
+					System.out.println("StorageModelProvider: createModelInfo for " + input + "(exception caught)"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			}
+			else {
+				System.out.println("StorageModelProvider: createModelInfo for " + input); //$NON-NLS-1$
+			}
+		}
+
+
+		if (input instanceof IExtendedStorageEditorInput) {
+			((IExtendedStorageEditorInput) input).addElementStateListener(fInternalListener);
+		}
+
+		EditorModelUtil.addFactoriesTo(structuredModel);
+
+		ModelInfo modelInfo = new ModelInfo(structuredModel, input, releaseModelOnDisconnect);
+		fModelInfoMap.put(input, modelInfo);
+	}
+
+	protected void disposeElementInfo(Object element, ElementInfo info) {
+		if (debugOperations) {
+			if (element instanceof IStorageEditorInput) {
+				try {
+					System.out.println("StorageModelProvider: disposeElementInfo for " + ((IStorageEditorInput) element).getStorage().getFullPath()); //$NON-NLS-1$
+				}
+				catch (CoreException e) {
+					System.out.println("StorageModelProvider: disposeElementInfo for " + element + "(exception caught)"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			}
+			else {
+				System.out.println("StorageModelProvider: disposeElementInfo for " + element); //$NON-NLS-1$
+			}
+		}
+
+		if (element instanceof IEditorInput) {
+			IEditorInput input = (IEditorInput) element;
+			ModelInfo modelInfo = getModelInfoFor(input);
+			disposeModelInfo(modelInfo);
+		}
+		super.disposeElementInfo(element, info);
+	}
+
+	/**
+	 * disconnect from this model info
+	 * 
+	 * @param info
+	 */
+	public void disposeModelInfo(ModelInfo info) {
+		if (debugOperations) {
+			if (info.fElement instanceof IStorageEditorInput) {
+				try {
+					System.out.println("StorageModelProvider: disposeModelInfo for " + ((IStorageEditorInput) info.fElement).getStorage().getFullPath()); //$NON-NLS-1$
+				}
+				catch (CoreException e) {
+					System.out.println("StorageModelProvider: disposeModelInfo for " + info.fElement + "(exception caught)"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			}
+			else {
+				System.out.println("StorageModelProvider: disposeModelInfo for " + info.fElement); //$NON-NLS-1$
+			}
+		}
+
+		if (info.fElement instanceof IStorageEditorInput) {
+			if (info.fElement instanceof IExtendedStorageEditorInput) {
+				((IExtendedStorageEditorInput) info.fElement).removeElementStateListener(fInternalListener);
+			}
+			if (info.fShouldReleaseOnInfoDispose) {
+				info.fStructuredModel.releaseFromEdit();
+			}
+		}
+		fModelInfoMap.remove(info.fElement);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractDocumentProvider#doResetDocument(java.lang.Object,
+	 *      org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected void doResetDocument(Object element, IProgressMonitor monitor) throws CoreException {
+		fReuseModelDocument = false;
+		super.doResetDocument(element, monitor);
+		fReuseModelDocument = true;
+	}
+
+	/**
+	 * @see org.eclipse.ui.texteditor.AbstractDocumentProvider#doSaveDocument(org.eclipse.core.runtime.IProgressMonitor,
+	 *      java.lang.Object, org.eclipse.jface.text.IDocument, boolean)
+	 */
+	protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
+		IDocumentProvider provider = null;
+		// BUG119211 - try to use registered document provider if possible
+		if (element instanceof IEditorInput) {
+			provider = DocumentProviderRegistry.getDefault().getDocumentProvider((IEditorInput) element);
+		}
+		if (provider == null)
+			provider = new FileDocumentProvider();
+		provider.saveDocument(monitor, element, document, overwrite);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.editors.text.StorageDocumentProvider#getPersistedEncoding(java.lang.Object)
+	 */
+	protected String getPersistedEncoding(Object element) {
+		String charset = super.getPersistedEncoding(element);
+		if (charset == null && element instanceof IStorageEditorInput) {
+			IStorage storage;
+			try {
+				storage = ((IStorageEditorInput) element).getStorage();
+				if (storage != null && !(storage instanceof IEncodedStorage)) {
+					InputStream contents = null;
+					try {
+						contents = storage.getContents();
+						if (contents != null) {
+							QualifiedName[] detectionOptions = new QualifiedName[]{IContentDescription.BYTE_ORDER_MARK, IContentDescription.CHARSET};
+							IContentDescription description = Platform.getContentTypeManager().getDescriptionFor(contents, storage.getName(), detectionOptions);
+							if (description != null) {
+								charset = description.getCharset();
+							}
+						}
+
+					}
+					catch (IOException e) {
+					}
+					finally {
+						if (contents != null)
+							try {
+								contents.close();
+							}
+							catch (IOException e) {
+								// do nothing
+							}
+					}
+				}
+			}
+			catch (CoreException e) {
+				Logger.logException(e);
+			}
+		}
+		return charset;
+	}
+
+	public IStructuredModel getModel(IEditorInput element) {
+		IStructuredModel result = null;
+		ModelInfo info = getModelInfoFor(element);
+		if (info != null) {
+			result = info.fStructuredModel;
+		}
+		return result;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.IModelProvider#getModel(java.lang.Object)
+	 */
+	public IStructuredModel getModel(Object element) {
+		if (element instanceof IEditorInput)
+			return getModel((IEditorInput) element);
+		return null;
+	}
+
+	private ModelInfo getModelInfoFor(IEditorInput element) {
+		ModelInfo result = (ModelInfo) fModelInfoMap.get(element);
+		return result;
+	}
+
+	private ModelInfo getModelInfoFor(IStructuredModel structuredModel) {
+		ModelInfo result = null;
+		if (structuredModel != null) {
+			ModelInfo[] modelInfos = (ModelInfo[]) fModelInfoMap.values().toArray(new ModelInfo[0]);
+			for (int i = 0; i < modelInfos.length; i++) {
+				ModelInfo info = modelInfos[i];
+				if (structuredModel.equals(info.fStructuredModel)) {
+					result = info;
+					break;
+				}
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Method loadModel.
+	 * 
+	 * @param input
+	 * @return IStructuredModel
+	 */
+	public IStructuredModel loadModel(IStorageEditorInput input) {
+		return loadModel(input, false);
+	}
+
+	/**
+	 * Method loadModel.
+	 * 
+	 * @param input
+	 * @param logExceptions
+	 * @return IStructuredModel
+	 */
+	public IStructuredModel loadModel(IStorageEditorInput input, boolean logExceptions) {
+		String id = calculateID(input);
+		if (id == null) {
+			return null;
+		}
+
+		InputStream contents = null;
+		try {
+			contents = input.getStorage().getContents();
+		}
+		catch (CoreException noStorageExc) {
+			if (logExceptions)
+				Logger.logException(NLS.bind(SSEUIMessages._32concat_EXC_, new Object[]{input.getName()}), noStorageExc);
+		}
+
+		IStructuredModel model = null;
+		try {
+			// first parameter must be unique
+			model = StructuredModelManager.getModelManager().getModelForEdit(id, contents, null);
+			model.setBaseLocation(calculateBaseLocation(input));
+		}
+		catch (IOException e) {
+			if (logExceptions)
+				Logger.logException(NLS.bind(SSEUIMessages._32concat_EXC_, new Object[]{input}), e);
+		}
+		finally {
+			if (contents != null) {
+				try {
+					contents.close();
+				}
+				catch (IOException e) {
+					// nothing
+				}
+				catch (Exception e) {
+					Logger.logException(e);
+				}
+			}
+		}
+		return model;
+	}
+
+	/**
+	 * @param input
+	 * @return
+	 */
+	private IStructuredModel selfCreateModel(IEditorInput input) {
+		return loadModel((IStorageEditorInput) input);
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredDocumentToTextAdapter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredDocumentToTextAdapter.java
new file mode 100644
index 0000000..4a276fd
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredDocumentToTextAdapter.java
@@ -0,0 +1,1332 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.jobs.ILock;
+import org.eclipse.jface.text.AbstractDocument;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.ConfigurableLineTracker;
+import org.eclipse.jface.text.DefaultLineTracker;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentAdapter;
+import org.eclipse.jface.text.IDocumentAdapterExtension;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.IRepairableDocument;
+import org.eclipse.jface.text.ITextStore;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.projection.ProjectionDocument;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.custom.TextChangeListener;
+import org.eclipse.swt.custom.TextChangedEvent;
+import org.eclipse.swt.custom.TextChangingEvent;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.sse.core.internal.ILockable;
+import org.eclipse.wst.sse.core.internal.provisional.events.IStructuredDocumentListener;
+import org.eclipse.wst.sse.core.internal.provisional.events.NewDocumentEvent;
+import org.eclipse.wst.sse.core.internal.provisional.events.NoChangeEvent;
+import org.eclipse.wst.sse.core.internal.provisional.events.RegionChangedEvent;
+import org.eclipse.wst.sse.core.internal.provisional.events.RegionsReplacedEvent;
+import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent;
+import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentRegionsReplacedEvent;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.sse.core.internal.util.Debug;
+import org.eclipse.wst.sse.core.internal.util.Utilities;
+import org.eclipse.wst.sse.ui.internal.util.Assert;
+
+
+/**
+ * Adapts IStructuredDocument events and methods to StyledTextContent events
+ * and methods
+ */
+public class StructuredDocumentToTextAdapter implements IDocumentAdapter, IDocumentAdapterExtension {
+
+	private class DocumentClone extends AbstractDocument {
+
+
+		/**
+		 * Creates a new document clone with the given content.
+		 * 
+		 * @param content
+		 *            the content
+		 * @param lineDelimiters
+		 *            the line delimiters
+		 */
+		public DocumentClone(String content, String[] lineDelimiters) {
+			super();
+			setTextStore(new StringTextStore(content));
+			ConfigurableLineTracker tracker = new ConfigurableLineTracker(lineDelimiters);
+			setLineTracker(tracker);
+			getTracker().set(content);
+			completeInitialization();
+		}
+	}
+
+	// A pre-notification listener for the viewer's Document
+	class DocumentListener implements IDocumentListener {
+		protected boolean allTextChanged = false;
+
+		protected DocumentEvent currentEvent;
+
+		synchronized public void documentAboutToBeChanged(DocumentEvent event) {
+			if (isStoppedForwardingChanges())
+				return;
+
+			pendingDocumentChangedEvent = true;
+			allTextChanged = event.getOffset() <= 0 && event.getLength() >= StructuredDocumentToTextAdapter.this.getDocument().getLength();
+			currentEvent = event;
+
+			StructuredDocumentToTextAdapter.this.relayTextChanging(event.getOffset(), event.getLength(), event.getText());
+		}
+
+		synchronized public void documentChanged(DocumentEvent event) {
+			if (isStoppedForwardingChanges())
+				return;
+
+			if (currentEvent != null && event == currentEvent) {
+				if (allTextChanged) {
+					StructuredDocumentToTextAdapter.this.relayTextSet();
+				}
+				else {
+					// temp work around for immediate thread
+					// problem.
+					// should have more general solution
+					// soon. 'syncExec' are rumored to be
+					// prone to hang.
+					StructuredDocumentToTextAdapter.this.relayTextChanged();
+				}
+			}
+
+			currentEvent = null;
+			pendingDocumentChangedEvent = false;
+			handlePendingEvents();
+			lastEvent = null;
+
+		}
+	}
+
+	private static class StringTextStore implements ITextStore {
+
+		private String fContent;
+
+		/**
+		 * Creates a new string text store with the given content.
+		 * 
+		 * @param content
+		 *            the content
+		 */
+		public StringTextStore(String content) {
+			Assert.isNotNull(content, "content can not be null when setting text store"); //$NON-NLS-1$
+			fContent = content;
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.ITextStore#get(int)
+		 */
+		public char get(int offset) {
+			return fContent.charAt(offset);
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.ITextStore#get(int, int)
+		 */
+		public String get(int offset, int length) {
+			return fContent.substring(offset, offset + length);
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.ITextStore#getLength()
+		 */
+		public int getLength() {
+			return fContent.length();
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.ITextStore#replace(int, int,
+		 *      java.lang.String)
+		 */
+		public void replace(int offset, int length, String text) {
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.ITextStore#set(java.lang.String)
+		 */
+		public void set(String text) {
+		}
+
+	}
+
+	/**
+	 * Changes to the Document/IStructuredDocument can extend beyond the text
+	 * change area and require more redrawing to keep the hilighting correct.
+	 * The event must be saved so that the redraw is only sent after a
+	 * textChanged event is received.
+	 */
+	class StructuredDocumentListener implements IStructuredDocumentListener {
+
+		public void newModel(NewDocumentEvent structuredDocumentEvent) {
+
+			if (isStoppedForwardingChanges()) {
+				// if
+				// (StructuredDocumentToTextAdapter.this.fStopRelayingChanges)
+				// {
+				if (Debug.debugStructuredDocument) {
+					System.out.println("skipped relaying StructuredDocumentEvent " + structuredDocumentEvent.getClass().getName()); //$NON-NLS-1$
+				}
+				return;
+			}
+			// should use textSet when all contents have
+			// changed
+			// otherwise need to use the pair of
+			// textChanging and
+			// textChanged.
+			StructuredDocumentToTextAdapter.this.lastEvent = structuredDocumentEvent;
+		}
+
+		public void noChange(final NoChangeEvent structuredDocumentEvent) {
+
+			if (Debug.debugStructuredDocument) {
+				System.out.println("skipped relaying StructuredDocumentEvent " + structuredDocumentEvent.getClass().getName()); //$NON-NLS-1$
+			}
+			if (structuredDocumentEvent.reason == NoChangeEvent.READ_ONLY_STATE_CHANGE) {
+				if (pendingDocumentChangedEvent) {
+					if (lastEventQueue == null) {
+						lastEventQueue = new ArrayList();
+					}
+					lastEventQueue.add(structuredDocumentEvent);
+				}
+				else {
+					StructuredDocumentToTextAdapter.this.lastEvent = structuredDocumentEvent;
+				}
+			}
+		}
+
+		public void nodesReplaced(StructuredDocumentRegionsReplacedEvent structuredDocumentEvent) {
+
+			if (isStoppedForwardingChanges()) {
+				// if
+				// (StructuredDocumentToTextAdapter.this.fStopRelayingChanges)
+				// {
+				if (Debug.debugStructuredDocument) {
+					System.out.println("not relaying StructuredDocumentEvent " + structuredDocumentEvent.getClass().getName()); //$NON-NLS-1$
+				}
+				return;
+			}
+			if (Debug.debugStructuredDocument) {
+				System.out.println("saving StructuredDocumentEvent " + structuredDocumentEvent.getClass().getName()); //$NON-NLS-1$
+			}
+			StructuredDocumentToTextAdapter.this.lastEvent = structuredDocumentEvent;
+		}
+
+		public void regionChanged(RegionChangedEvent structuredDocumentEvent) {
+
+			if (isStoppedForwardingChanges()) {
+				// if
+				// (StructuredDocumentToTextAdapter.this.fStopRelayingChanges)
+				// {
+				if (Debug.debugStructuredDocument) {
+					System.out.println("not relaying StructuredDocumentEvent " + structuredDocumentEvent.getClass().getName()); //$NON-NLS-1$
+				}
+				return;
+			}
+			if (Debug.debugStructuredDocument) {
+				System.out.println("saving StructuredDocumentEvent " + structuredDocumentEvent.getClass().getName()); //$NON-NLS-1$
+			}
+			StructuredDocumentToTextAdapter.this.lastEvent = structuredDocumentEvent;
+		}
+
+		public void regionsReplaced(RegionsReplacedEvent structuredDocumentEvent) {
+
+			if (isStoppedForwardingChanges()) {
+				// if
+				// (StructuredDocumentToTextAdapter.this.fStopRelayingChanges)
+				// {
+				if (Debug.debugStructuredDocument) {
+					System.out.println("not relaying StructuredDocumentEvent " + structuredDocumentEvent.getClass().getName()); //$NON-NLS-1$
+				}
+				return;
+			}
+			if (Debug.debugStructuredDocument) {
+				System.out.println("saving StructuredDocumentEvent " + structuredDocumentEvent.getClass().getName()); //$NON-NLS-1$
+			}
+			StructuredDocumentToTextAdapter.this.lastEvent = structuredDocumentEvent;
+		}
+	}
+
+	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+	private final static boolean redrawBackground = true;
+
+	/** The visible child document. */
+	private ProjectionDocument fChildDocument;
+
+	/** The master document */
+	private IDocument fDocument;
+	/** The document clone for the non-forwarding case. */
+	private IDocument fDocumentClone;
+
+	// only use this temp work around if on GTK
+	// it causes funny "cursor blinking" if used on windows
+	private final boolean forceRedrawOnRegionChanged = Platform.getWS().equals("gtk"); //$NON-NLS-1$
+	/** The original content */
+	private String fOriginalContent;
+	/** The original line delimiters */
+	private String[] fOriginalLineDelimiters;
+
+	private int fStopRelayingChangesRequests = 0;
+
+	private StyledText fStyledTextWidget;
+
+	/** The registered text changed listeners */
+	TextChangeListener[] fTextChangeListeners;
+	protected DocumentListener internalDocumentListener;
+
+	// The listeners for relaying DocumentEvents and
+	// requesting repaints
+	// after modification
+	private IStructuredDocumentListener internalStructuredDocumentListener;
+
+	protected StructuredDocumentEvent lastEvent = null;
+	List lastEventQueue;
+	boolean pendingDocumentChangedEvent;
+
+	private static final boolean DEBUG = false;
+
+	/**
+	 * TEST ONLY - TEST ONLY - TEST ONLY NOT API use this constructor only for
+	 * tests. Creates a new document adapter which is initiallly not connected
+	 * to any document.
+	 */
+	public StructuredDocumentToTextAdapter() {
+
+		internalStructuredDocumentListener = new StructuredDocumentListener();
+		internalDocumentListener = new DocumentListener();
+		// for testing only
+		// setDocument(getModelManager().createStructuredDocumentFor(ContentTypeIdentifierForXML.ContentTypeID_XML));
+	}
+
+	/**
+	 * Creates a new document adapter which is initiallly not connected to any
+	 * document.
+	 */
+	public StructuredDocumentToTextAdapter(StyledText styledTextWidget) {
+
+		// do not use 'this()' in this case
+		super();
+		internalStructuredDocumentListener = new StructuredDocumentListener();
+		internalDocumentListener = new DocumentListener();
+		fStyledTextWidget = styledTextWidget;
+	}
+
+	private void _setDocument(IDocument newDoc) {
+		if (fDocument instanceof IStructuredDocument) {
+			((IStructuredDocument) fDocument).removeDocumentChangedListener(internalStructuredDocumentListener);
+		}
+		fDocument = newDoc;
+		if (!isStoppedForwardingChanges()) {
+			fDocumentClone = null;
+			fOriginalContent = getDocument() != null ? getDocument().get() : null;
+			fOriginalLineDelimiters = getDocument() != null ? getDocument().getLegalLineDelimiters() : null;
+		}
+
+		if (DEBUG && fDocument != null && !(fDocument instanceof ILockable)) {
+
+			System.out.println("Warning: non ILockable document used in StructuredDocumentToTextAdapter"); //$NON-NLS-1$
+			System.out.println("         document updates on non-display thread will not be safe if editor open"); //$NON-NLS-1$
+		}
+		if (fDocument instanceof IStructuredDocument) {
+			((IStructuredDocument) fDocument).addDocumentChangedListener(internalStructuredDocumentListener);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.swt.custom.StyledTextContent#addTextChangeListener(org.eclipse.swt.custom.TextChangeListener)
+	 */
+	public synchronized void addTextChangeListener(TextChangeListener listener) {
+
+		// make sure listener is not already in listening
+		// (and if it is, print a warning to aid debugging,
+		// if needed)
+
+		if (Utilities.contains(fTextChangeListeners, listener)) {
+			if (Debug.displayWarnings) {
+				System.out.println("StructuredDocumentToTextAdapter::addTextChangedListeners. listener " + listener + " was added more than once. "); //$NON-NLS-2$//$NON-NLS-1$
+			}
+		}
+		else {
+			if (Debug.debugStructuredDocument) {
+				System.out.println("StructuredDocumentToTextAdapter::addTextChangedListeners. Adding an instance of " + listener.getClass() + " as a listener on text adapter."); //$NON-NLS-2$//$NON-NLS-1$
+			}
+			int oldSize = 0;
+			if (fTextChangeListeners != null) {
+				// normally won't be null, but we need to be
+				// sure, for first time through
+				oldSize = fTextChangeListeners.length;
+			}
+			int newSize = oldSize + 1;
+			TextChangeListener[] newListeners = new TextChangeListener[newSize];
+			if (fTextChangeListeners != null) {
+				System.arraycopy(fTextChangeListeners, 0, newListeners, 0, oldSize);
+			}
+			// add listener to last position
+			newListeners[newSize - 1] = listener;
+			//
+			// now switch new for old
+			fTextChangeListeners = newListeners;
+			//
+		}
+	}
+
+	/*
+	 * @see org.eclipse.swt.custom.StyledTextContent#getCharCount()
+	 */
+	public int getCharCount() {
+
+		// getDocument can sometimes be null during startup
+		// and dispose
+		int result = 0;
+		IDocument doc = getDocument();
+		if (doc != null) {
+			result = getSafeDocument().getLength();
+		}
+		return result;
+	}
+
+	private IDocument getClonedDocument() {
+		if (fDocumentClone == null) {
+			String content = fOriginalContent == null ? "" : fOriginalContent; //$NON-NLS-1$
+			String[] delims = fOriginalLineDelimiters == null ? DefaultLineTracker.DELIMITERS : fOriginalLineDelimiters;
+			fDocumentClone = new DocumentClone(content, delims);
+		}
+		return fDocumentClone;
+	}
+
+	Display getDisplay() {
+
+		// Note: the workbench should always have a display
+		// (unless running headless), whereas Display.getCurrent()
+		// only returns the display if the currently executing thread
+		// has one.
+		if (PlatformUI.isWorkbenchRunning())
+			return PlatformUI.getWorkbench().getDisplay();
+		else
+			return null;
+	}
+
+	/**
+	 * Returns the visible document.
+	 * 
+	 * @return IDocument
+	 */
+	protected IDocument getDocument() {
+
+		if (fChildDocument == null)
+			return fDocument;
+		return fChildDocument;
+	}
+
+	/**
+	 * Returns region in master document of given region (should be region in
+	 * projection document)
+	 * 
+	 * @return region if no projection document exists, region of master
+	 *         document if possible, null otherwise
+	 */
+	private IRegion getProjectionToMasterRegion(IRegion region) {
+		IRegion originalRegion = region;
+		if (fChildDocument != null) {
+			try {
+				originalRegion = fChildDocument.getProjectionMapping().toOriginRegion(region);
+			}
+			catch (BadLocationException e) {
+				Logger.logException(e);
+			}
+		}
+
+		return originalRegion;
+	}
+
+	/**
+	 * Returns offset in projection document of given offset (should be offset
+	 * in master document)
+	 * 
+	 * @return offset if no projection document exists, offset of projection
+	 *         document if possible, -1 otherwise
+	 */
+	private int getMasterToProjectionOffset(int offset) {
+		int originalOffset = offset;
+		if (fChildDocument != null) {
+			try {
+				originalOffset = fChildDocument.getProjectionMapping().toImageOffset(offset);
+			}
+			catch (BadLocationException e) {
+				Logger.logException(e);
+			}
+		}
+
+		return originalOffset;
+	}
+
+	/**
+	 * Return the line at the given character offset without delimiters.
+	 * <p>
+	 * 
+	 * @param offset
+	 *            offset of the line to return. Does not include delimiters of
+	 *            preceeding lines. Offset 0 is the first character of the
+	 *            document.
+	 * @return the line text without delimiters
+	 */
+	public java.lang.String getLine(int lineNumber) {
+
+		String result = null;
+		if (lineNumber >= getLineCount()) {
+			if (Debug.displayWarnings) {
+				System.out.println("Development Debug: IStructuredDocument:getLine() error. lineNumber requested (" + lineNumber + ") was greater than number of lines(" + getLineCount() + "). EmptyString returned"); //$NON-NLS-1$//$NON-NLS-3$//$NON-NLS-2$
+			}
+			result = EMPTY_STRING;
+		}
+		else {
+			IDocument doc = getSafeDocument();
+			if (doc == null) {
+				result = EMPTY_STRING;
+			}
+			else {
+				try {
+					IRegion r = doc.getLineInformation(lineNumber);
+					if (r.getLength() > 0) {
+						result = doc.get(r.getOffset(), r.getLength());
+					}
+					else {
+						result = EMPTY_STRING;
+					}
+				}
+				catch (BadLocationException e) {
+					result = EMPTY_STRING;
+				}
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Tries to repair the line information.
+	 * 
+	 * @param document
+	 *            the document
+	 * @see IRepairableDocument#repairLineInformation()
+	 * @see Eclipse 3.0
+	 */
+	private void repairLineInformation(IDocument document) {
+		if (document instanceof IRepairableDocument) {
+			IRepairableDocument repairable = (IRepairableDocument) document;
+			repairable.repairLineInformation();
+		}
+	}
+
+	/**
+	 * Return the line index at the given character offset.
+	 * <p>
+	 * 
+	 * @param offset
+	 *            offset of the line to return. The first character of the
+	 *            document is at offset 0. An offset of getLength() is valid
+	 *            and should answer the number of lines.
+	 * @return the line index. The first line is at index 0. If the character
+	 *         at offset is a delimiter character, answer the line index of
+	 *         the line that is delimited. For example, text = "\r\n\r\n",
+	 *         delimiter = "\r\n", then: getLineAtOffset(0) == 0
+	 *         getLineAtOffset(1) == 0 getLineAtOffset(2) == 1
+	 *         getLineAtOffset(3) == 1 getLineAtOffset(4) == 2
+	 */
+	public int getLineAtOffset(int offset) {
+
+		int result = 0;
+		IDocument doc = getSafeDocument();
+		if (doc != null) {
+			try {
+				result = doc.getLineOfOffset(offset);
+			}
+			catch (BadLocationException x) {
+				repairLineInformation(doc);
+				try {
+					result = doc.getLineOfOffset(offset);
+				}
+				catch (BadLocationException x2) {
+					// should not occur, but seems to for projection
+					// documents, related to repainting overview ruler
+					result = 0;
+				}
+			}
+		}
+		return result;
+	}
+
+	public int getLineCount() {
+		int result = 0;
+		IDocument doc = getSafeDocument();
+		if (doc != null) {
+			result = doc.getNumberOfLines();
+		}
+		return result;
+	}
+
+	/*
+	 * @see org.eclipse.swt.custom.StyledTextContent#getLineDelimiter
+	 */
+	public String getLineDelimiter() {
+		String result = null;
+		if (getParentDocument() instanceof IStructuredDocument) {
+			result = ((IStructuredDocument) getParentDocument()).getLineDelimiter();
+		}
+		else {
+			IDocument doc = getSafeDocument();
+			result = TextUtilities.getDefaultLineDelimiter(doc);
+		}
+		return result;
+	}
+
+	/**
+	 * Return the character offset of the first character of the given line.
+	 * <p>
+	 * 
+	 * @param lineIndex
+	 *            index of the line. The first line is at index 0.
+	 * @return offset offset of the first character of the line. The first
+	 *         character of the document is at offset 0. The return value
+	 *         should include line delimiters. For example, text =
+	 *         "\r\ntest\r\n", delimiter = "\r\n", then: getOffsetAtLine(0) ==
+	 *         0 getOffsetAtLine(1) == 2 getOffsetAtLine(2) == 8 NOTE: When
+	 *         there is no text (i.e., no lines), getOffsetAtLine(0) is a
+	 *         valid call that should return 0.
+	 */
+	public int getOffsetAtLine(int lineIndex) {
+
+		int result = 0;
+		IDocument doc = getSafeDocument();
+		if (doc != null) {
+			try {
+				result = doc.getLineOffset(lineIndex);
+			}
+			catch (BadLocationException e) {
+				result = 0;
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Returns the parent document
+	 * 
+	 * @return the parent document
+	 */
+	private IDocument getParentDocument() {
+		return fDocument;
+	}
+
+	/**
+	 * This is the document to use for request from the StyledText widget. Its
+	 * either the live documnet or a clone of it, depending on stop/resume
+	 * state.
+	 */
+	private IDocument getSafeDocument() {
+		IDocument result = null;
+		if (isStoppedForwardingChanges()) {
+			result = getClonedDocument();
+		}
+		else {
+			// note, this document can be normal structured text document,
+			// or the projection/child document
+			result = getDocument();
+		}
+		return result;
+	}
+
+	/**
+	 * @return org.eclipse.swt.custom.StyledText
+	 */
+	StyledText getStyledTextWidget() {
+		return fStyledTextWidget;
+	}
+
+	/**
+	 * Returns a string representing the content at the given range.
+	 * <p>
+	 * 
+	 * @param start
+	 *            the start offset of the text to return. Offset 0 is the
+	 *            first character of the document.
+	 * @param length
+	 *            the length of the text to return
+	 * @return the text at the given range
+	 */
+	public String getTextRange(int start, int length) {
+		String result = null;
+		try {
+			IDocument doc = getSafeDocument();
+			result = doc.get(start, length);
+		}
+		catch (BadLocationException e) {
+			result = EMPTY_STRING;
+		}
+		return result;
+	}
+
+	/**
+	 * assume only for "no change" events, for now
+	 */
+	protected void handlePendingEvents() {
+
+		if (lastEventQueue == null)
+			return;
+
+		Iterator iterator = lastEventQueue.iterator();
+		while (iterator.hasNext()) {
+			NoChangeEvent noChangeEvent = (NoChangeEvent) iterator.next();
+			redrawNoChange(noChangeEvent);
+		}
+
+		lastEventQueue = null;
+		lastEvent = null;
+	}
+
+	boolean isStoppedForwardingChanges() {
+		return fStopRelayingChangesRequests > 0;
+	}
+
+	/**
+	 * this method is assumed to be called only for read only region changes.
+	 */
+	protected void redrawNoChange(NoChangeEvent structuredDocumentEvent) {
+
+		if (isStoppedForwardingChanges())
+			return;
+		if (Debug.debugStructuredDocument) {
+			System.out.println("maybe redraw stuff"); //$NON-NLS-1$
+		}
+
+		int startOffset = structuredDocumentEvent.getOffset();
+		int length = structuredDocumentEvent.getLength();
+		redrawRangeWithLength(startOffset, length);
+
+	}
+
+	/**
+	 * Request a redraw of the text range occupied by the given
+	 * StructuredDocumentRegionsReplacedEvent
+	 * 
+	 * @param structuredDocumentEvent
+	 */
+	protected void redrawNodesReplaced(StructuredDocumentRegionsReplacedEvent structuredDocumentEvent) {
+
+		if (isStoppedForwardingChanges())
+			return;
+		if (Debug.debugStructuredDocument) {
+			System.out.println("maybe redraw stuff"); //$NON-NLS-1$
+		}
+		// just the new stuff
+		IStructuredDocumentRegionList newStructuredDocumentRegions = structuredDocumentEvent.getNewStructuredDocumentRegions();
+
+		int nNewNodes = newStructuredDocumentRegions.getLength();
+		if (nNewNodes > 0) {
+			IStructuredDocumentRegion firstNode = newStructuredDocumentRegions.item(0);
+			IStructuredDocumentRegion lastNode = newStructuredDocumentRegions.item(nNewNodes - 1);
+			redrawRange(firstNode.getStartOffset(), lastNode.getEndOffset());
+		}
+	}
+
+	/**
+	 * Redraws the give offsets in terms of the StructuredDocument. If only
+	 * part of the model is visible, ensures that only the visible portion of
+	 * the given range is redrawn.
+	 * 
+	 * @param startModelOffset
+	 * @param endModelOffset
+	 */
+	private void redrawRange(final int startModelOffset, final int endModelOffset) {
+
+		if (getDocument() == null)
+			return;
+		if (Debug.debugStructuredDocument) {
+			System.out.println("redraw stuff: " + startModelOffset + "-" + endModelOffset); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		if (fChildDocument == null) {
+			Runnable runnable = new Runnable() {
+				public void run() {
+					getStyledTextWidget().redrawRange(startModelOffset, endModelOffset - startModelOffset, redrawBackground);
+				}
+			};
+			runOnDisplayThreadIfNeedede(runnable);
+
+		}
+		else {
+			int high = getDocument().getLength();
+			int startOffset = getMasterToProjectionOffset(startModelOffset);
+
+			int endOffset = getMasterToProjectionOffset(endModelOffset);
+
+			// if offsets were not visible, just try to redraw everything in
+			// the child document
+			// // not visible
+			// if (endOffset < 0 || startOffset > high)
+			// return;
+			// restrict lower bound
+			if (startOffset < 0) {
+				startOffset = 0;
+			}
+			// restrict upper bound
+			// if (endOffset > high) {
+			// endOffset = high;
+			// }
+			if (endOffset < 0) {
+				endOffset = high;
+			}
+
+			int length = endOffset - startOffset;
+			// redrawBackground with false would be faster
+			// but assumes background (or font) is not
+			// changing
+			final int finalStartOffset = startOffset;
+			final int finallength = length;
+
+			Runnable runnable = new Runnable() {
+				public void run() {
+					getStyledTextWidget().redrawRange(finalStartOffset, finallength, redrawBackground);
+				}
+			};
+			runOnDisplayThreadIfNeedede(runnable);
+
+		}
+	}
+
+	/**
+	 * Redraws the give offsets in terms of the Flat Node model. If only part
+	 * of the model is visible, ensures that only the visible portion of the
+	 * given range is redrawn.
+	 * 
+	 * @param startModelOffset
+	 * @param endModelOffset
+	 */
+	private void redrawRangeWithLength(final int startModelOffset, final int length) {
+
+		if (getDocument() == null)
+			return;
+		if (Debug.debugStructuredDocument) {
+			System.out.println("redraw stuff: " + startModelOffset + "-" + length); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		if (fChildDocument == null) {
+			Runnable runnable = new Runnable() {
+				public void run() {
+					getStyledTextWidget().redrawRange(startModelOffset, length, redrawBackground);
+				}
+			};
+			runOnDisplayThreadIfNeedede(runnable);
+		}
+		else {
+			int high = getDocument().getLength();
+			// TODO need to take into account segmented visible regions
+			int startOffset = getMasterToProjectionOffset(startModelOffset);
+			// not visible
+			if (startOffset > high || length < 1)
+				return;
+			// restrict lower bound
+			if (startOffset < 0) {
+				startOffset = 0;
+			}
+			int endOffset = startOffset + length - 1;
+			// restrict upper bound
+			if (endOffset > high) {
+				endOffset = high;
+			}
+
+			// note: length of the child documnet should be
+			// updated,
+			// need to investigate why its not at this
+			// point, but is
+			// probably just because the document event
+			// handling is not
+			// completely finished.
+			int newLength = endOffset - startOffset; // d283007
+
+			// redrawBackground with false would be faster
+			// but assumes background (or font) is not
+			// changing
+			final int finalStartOffset = startOffset;
+			final int finalNewLength = newLength;
+			Runnable runnable = new Runnable() {
+				public void run() {
+					getStyledTextWidget().redrawRange(finalStartOffset, finalNewLength, redrawBackground);
+				}
+			};
+			runOnDisplayThreadIfNeedede(runnable);
+		}
+	}
+
+	/**
+	 * Request a redraw of the text range occupied by the given
+	 * RegionChangedEvent for certain (not all) ITextRegion contexts
+	 * 
+	 * @param structuredDocumentEvent
+	 */
+	protected void redrawRegionChanged(RegionChangedEvent structuredDocumentEvent) {
+
+		if (isStoppedForwardingChanges()) {
+			return;
+		}
+		if (Debug.debugStructuredDocument) {
+			System.out.println("maybe redraw stuff"); //$NON-NLS-1$
+		}
+
+
+		// (nsd) TODO: try to make this reliable somehow
+		// without being directly content dependent
+		// if ((region instanceof ITextRegionContainer) ||
+		// (type == XMLJSPRegionContexts.BLOCK_TEXT) ||
+		// (type == XMLJSPRegionContexts.JSP_CONTENT)) {
+		// IStructuredDocumentRegion flatNode =
+		// structuredDocumentEvent.getStructuredDocumentRegion();
+		// // redraw background of false is faster,
+		// // but assumes background (or font) is not
+		// changing
+		// redrawRange(flatNode.getStartOffset(region),
+		// flatNode.getEndOffset(region));
+		// }
+		if (forceRedrawOnRegionChanged) {
+			// workaround for redrawing problems on Linux-GTK
+			int startOffset = structuredDocumentEvent.getOffset();
+			int endOffset = structuredDocumentEvent.getOffset() + structuredDocumentEvent.getLength();
+			try {
+				IRegion startLine = structuredDocumentEvent.fDocument.getLineInformationOfOffset(startOffset);
+				IRegion endLine = structuredDocumentEvent.fDocument.getLineInformationOfOffset(endOffset);
+				if (startLine != null && endLine != null) {
+					redrawRange(startLine.getOffset(), endLine.getOffset() + endLine.getLength());
+				}
+			}
+			catch (BadLocationException e) {
+				// nothing for now
+			}
+		}
+	}
+
+	/**
+	 * Request a redraw of the text range occupied by the given
+	 * RegionsReplacedEvent
+	 * 
+	 * @param structuredDocumentEvent
+	 */
+	protected void redrawRegionsReplaced(RegionsReplacedEvent structuredDocumentEvent) {
+
+		if (isStoppedForwardingChanges())
+			return;
+		if (Debug.debugStructuredDocument) {
+			System.out.println("maybe redraw stuff"); //$NON-NLS-1$
+		}
+		ITextRegionList newRegions = structuredDocumentEvent.getNewRegions();
+		int nRegions = newRegions.size();
+		if (nRegions > 0) {
+			ITextRegion firstRegion = newRegions.get(0);
+			ITextRegion lastRegion = newRegions.get(nRegions - 1);
+			IStructuredDocumentRegion flatNode = structuredDocumentEvent.getStructuredDocumentRegion();
+			redrawRange(flatNode.getStartOffset(firstRegion), flatNode.getEndOffset(lastRegion));
+		}
+	}
+
+	protected void redrawTextChanged() {
+
+		if (lastEvent != null) {
+			// update display, since some cases can effect
+			// highlighting beyond the changed text area.
+			if (lastEvent instanceof StructuredDocumentRegionsReplacedEvent)
+				redrawNodesReplaced((StructuredDocumentRegionsReplacedEvent) lastEvent);
+			if (lastEvent instanceof RegionsReplacedEvent)
+				redrawRegionsReplaced((RegionsReplacedEvent) lastEvent);
+			if (lastEvent instanceof RegionChangedEvent)
+				redrawRegionChanged((RegionChangedEvent) lastEvent);
+			// moved following line to 'document changed' so
+			// the "last event" can be
+			// re-drawn after pending re-draws
+			// lastEvent = null;
+		}
+	}
+
+	/**
+	 * Sends a text replace event to all registered listeners.
+	 */
+	protected void relayTextChanged() {
+
+		if (isStoppedForwardingChanges()) {
+			if (Debug.debugStructuredDocument && getDocument() != null) {
+				System.out.println("NOT relaying text changed (" + getDocument().getLength() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			return;
+		}
+		if (Debug.debugStructuredDocument && getDocument() != null) {
+			System.out.println("relaying text changed (" + getDocument().getLength() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		final TextChangedEvent textChangedEvent = new TextChangedEvent(this);
+
+		// we must assign listeners to local variable, since
+		// the add and remove listener
+		// methods can change the actual instance of the
+		// listener array from another thread
+
+		Runnable runnable = new Runnable() {
+			public void run() {
+				if (fTextChangeListeners != null) {
+					Object[] holdListeners = fTextChangeListeners;
+					for (int i = 0; i < holdListeners.length; i++) {
+						// this is a safe cast, since addListeners
+						// requires a IStructuredDocumentListener
+						((TextChangeListener) holdListeners[i]).textChanged(textChangedEvent);
+					}
+				}
+			}
+		};
+		runOnDisplayThreadIfNeedede(runnable);
+		redrawTextChanged();
+	}
+
+	/**
+	 * Sends a text change to all registered listeners
+	 */
+	protected void relayTextChanging(int requestedStart, int requestedLength, String requestedChange) {
+
+		if (getDocument() == null)
+			return;
+		if (isStoppedForwardingChanges()) {
+			if (Debug.debugStructuredDocument && getDocument() != null) {
+				System.out.println("NOT relaying text changing: " + requestedStart + ":" + getDocument().getLength()); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			return;
+		}
+		if (Debug.debugStructuredDocument && getDocument() != null) {
+			System.out.println("relaying text changing: " + requestedStart + ":" + getDocument().getLength()); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		lastEvent = null;
+		try {
+			final TextChangingEvent textChangingEvent = new TextChangingEvent(this);
+
+			textChangingEvent.start = requestedStart;
+			textChangingEvent.replaceCharCount = requestedLength;
+			textChangingEvent.newCharCount = (requestedChange == null ? 0 : requestedChange.length());
+			textChangingEvent.replaceLineCount = getDocument().getNumberOfLines(requestedStart, requestedLength) - 1;
+			textChangingEvent.newText = requestedChange;
+			textChangingEvent.newLineCount = (requestedChange == null ? 0 : getDocument().computeNumberOfLines(requestedChange));
+
+			// we must assign listeners to local variable,
+			// since the add and remove listner
+			// methods can change the actual instance of the
+			// listener array from another thread
+			Runnable runnable = new Runnable() {
+				public void run() {
+					if (fTextChangeListeners != null) {
+						TextChangeListener[] holdListeners = fTextChangeListeners;
+						for (int i = 0; i < holdListeners.length; i++) {
+							// this is a safe cast, since
+							// addListeners requires a
+							// IStructuredDocumentListener
+							holdListeners[i].textChanging(textChangingEvent);
+						}
+					}
+				}
+			};
+			runOnDisplayThreadIfNeedede(runnable);
+		}
+		catch (BadLocationException e) {
+			// log for now, unless we find reason not to
+			Logger.log(Logger.INFO, e.getMessage());
+		}
+	}
+
+	/**
+	 * Sends a text set event to all registered listeners. Widget should
+	 * redraw itself automatically.
+	 */
+	protected void relayTextSet() {
+
+		if (isStoppedForwardingChanges()) {
+			if (Debug.debugStructuredDocument && getDocument() != null) {
+				System.out.println("NOT relaying text set (" + getDocument().getLength() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			return;
+		}
+		if (Debug.debugStructuredDocument && getDocument() != null) {
+			System.out.println("relaying text set (" + getDocument().getLength() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		lastEvent = null;
+		final TextChangedEvent textChangedEvent = new TextChangedEvent(this);
+
+		// we must assign listeners to local variable, since
+		// the add and remove listner
+		// methods can change the actual instance of the
+		// listener array from another thread
+		Runnable runnable = new Runnable() {
+			public void run() {
+				if (fTextChangeListeners != null) {
+					TextChangeListener[] holdListeners = fTextChangeListeners;
+					for (int i = 0; i < holdListeners.length; i++) {
+						holdListeners[i].textSet(textChangedEvent);
+					}
+				}
+			}
+		};
+		runOnDisplayThreadIfNeedede(runnable);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.swt.custom.StyledTextContent#removeTextChangeListener(org.eclipse.swt.custom.TextChangeListener)
+	 */
+	public synchronized void removeTextChangeListener(final TextChangeListener listener) {
+
+		if ((fTextChangeListeners != null) && (listener != null)) {
+			// if its not in the listeners, we'll ignore the
+			// request
+			if (!Utilities.contains(fTextChangeListeners, listener)) {
+				if (Debug.displayWarnings) {
+					System.out.println("StructuredDocumentToTextAdapter::removeTextChangedListeners. listener " + listener + " was not present. "); //$NON-NLS-2$//$NON-NLS-1$
+				}
+			}
+			else {
+				if (Debug.debugStructuredDocument) {
+					System.out.println("StructuredDocumentToTextAdapter::addTextChangedListeners. Removing an instance of " + listener.getClass() + " as a listener on text adapter."); //$NON-NLS-2$//$NON-NLS-1$
+				}
+				final int oldSize = fTextChangeListeners.length;
+				int newSize = oldSize - 1;
+				final TextChangeListener[] newListeners = new TextChangeListener[newSize];
+
+				Runnable runnable = new Runnable() {
+					public void run() {
+						int index = 0;
+						for (int i = 0; i < oldSize; i++) {
+							if (fTextChangeListeners[i] != listener) {
+								// copy old to new if its not the
+								// one we are removing
+								newListeners[index++] = fTextChangeListeners[i];
+							}
+						}
+					}
+				};
+				runOnDisplayThreadIfNeedede(runnable);
+				// now that we have a new array, let's
+				// switch it for the old one
+				fTextChangeListeners = newListeners;
+			}
+		}
+	}
+
+	/**
+	 * Replace the text with "newText" starting at position "start" for a
+	 * length of "replaceLength".
+	 * <p>
+	 * Implementors have to notify TextChanged listeners after the content has
+	 * been updated. The TextChangedEvent should be set as follows:
+	 * <ul>
+	 * <li>event.type = SWT.TextReplaced
+	 * <li>event.start = start of the replaced text
+	 * <li>event.numReplacedLines = number of replaced lines
+	 * <li>event.numNewLines = number of new lines
+	 * <li>event.replacedLength = length of the replaced text
+	 * <li>event.newLength = length of the new text
+	 * </ul>
+	 * <b>NOTE: </b> numNewLines is the number of inserted lines and
+	 * numReplacedLines is the number of deleted lines based on the change
+	 * that occurs visually. For example:
+	 * <ul>
+	 * <li>(replacedText, newText) ==> (numReplacedLines, numNewLines)
+	 * <li>("", "\n") ==> (0, 1)
+	 * <li>("\n\n", "a") ==> (2, 0)
+	 * <li>("a", "\n\n") ==> (0, 2)
+	 * <li>("\n", "") ==> (1, 0)
+	 * </ul>
+	 * </p>
+	 * 
+	 * @param start
+	 *            start offset of text to replace, none of the offsets include
+	 *            delimiters of preceeding lines, offset 0 is the first
+	 *            character of the document
+	 * @param replaceLength
+	 *            start offset of text to replace
+	 * @param newText
+	 *            start offset of text to replace
+	 */
+	public void replaceTextRange(int start, int replaceLength, String text) {
+
+		if (getParentDocument() instanceof IStructuredDocument) {
+			// the structuredDocument initiates the "changing"
+			// and "changed" events.
+			// they are both fired by the time this method
+			// returns.
+			IRegion region = getProjectionToMasterRegion(new Region(start, replaceLength));
+			if (region != null) {
+				((IStructuredDocument) getParentDocument()).replaceText(this, region.getOffset(), region.getLength(), text);
+				return;
+			}
+		}
+		// default is to just try and replace text range in current document
+		try {
+			getDocument().replace(start, replaceLength, text);
+		}
+		catch (BadLocationException e) {
+			// log for now, unless we find reason not to
+			Logger.log(Logger.INFO, e.getMessage());
+		}
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.IDocumentAdapterExtension#resumeForwardingDocumentChanges()
+	 */
+	public void resumeForwardingDocumentChanges() {
+
+		// from re-reading the textSet API in StyledText, we
+		// must call
+		// textSet if all the contents changed. If all the
+		// contents did
+		// not change, we need to call the pair of APIs,
+		// textChanging and
+		// textChanged. So, if we ever keep careful track of
+		// changes
+		// during stop forwarding and resume forwarding, we
+		// can
+		// investigate change make use of the pair of APIs.
+		fStopRelayingChangesRequests--;
+		if (fStopRelayingChangesRequests == 0) {
+			// fIsForwarding= true;
+			fDocumentClone = null;
+			fOriginalContent = null;
+			fOriginalLineDelimiters = null;
+			// fireTextSet();
+			relayTextSet();
+		}
+	}
+
+	/**
+	 * This 'Runnable' should be very brief, and should not "call out" to
+	 * other code which itself might call syncExec, or deadlock might occur.
+	 * 
+	 * @param r
+	 */
+	private void runOnDisplayThreadIfNeedede(Runnable r) {
+		// if there is no Display at all (that is, running headless),
+		// or if we are already running on the display thread, then
+		// simply execute the runnable.
+		if (getDisplay() == null || (Thread.currentThread() == getDisplay().getThread())) {
+			r.run();
+		}
+		else {
+			// otherwise force the runnable to run on the display thread.
+			//
+			// Its unclear if we need this at all, once
+			// we "force" document update to always take place on display
+			// thread.
+			IDocument doc = getDocument();
+			if (doc instanceof ILockable) {
+
+				ILock lock = null;
+				try {
+					lock = ((ILockable) doc).getLockObject();
+					lock.acquire();
+					getDisplay().syncExec(r);
+				}
+				finally {
+					if (lock != null) {
+						lock.release();
+					}
+				}
+			}
+			else {
+				// else, ignore!, since risk of deadlock
+				throw new IllegalStateException("non lockable document used for structuredDocumentToTextAdapter"); //$NON-NLS-1$
+			}
+		}
+	}
+
+	/**
+	 * @param newModel
+	 */
+	public void setDocument(IDocument document) {
+
+		if (getDocument() != null) {
+			getDocument().removePrenotifiedDocumentListener(internalDocumentListener);
+		}
+		lastEvent = null;
+		if (document instanceof ProjectionDocument) {
+			fChildDocument = (ProjectionDocument) document;
+			_setDocument(fChildDocument.getMasterDocument());
+		}
+		else {
+			fChildDocument = null;
+			_setDocument(document);
+		}
+		if (getDocument() != null) {
+			getDocument().addPrenotifiedDocumentListener(internalDocumentListener);
+		}
+	}
+
+	/**
+	 * @see IDocument#setText
+	 */
+	public void setText(String string) {
+
+		if (isStoppedForwardingChanges()) {
+			fDocumentClone = null;
+			fOriginalContent = getDocument().get();
+			fOriginalLineDelimiters = getDocument().getLegalLineDelimiters();
+		}
+		else if (getParentDocument() instanceof IStructuredDocument) {
+			((IStructuredDocument) getDocument()).setText(this, string);
+		}
+		else {
+			getDocument().set(string);
+		}
+		relayTextSet();
+	}
+
+	/**
+	 * This method was added to make testing easier. Normally, the widget is
+	 * specified on the constructor.
+	 */
+	public void setWidget(StyledText widget) {
+
+		fStyledTextWidget = widget;
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.IDocumentAdapterExtension#stopForwardingDocumentChanges()
+	 */
+	public void stopForwardingDocumentChanges() {
+
+		fStopRelayingChangesRequests++;
+		// only need to take snapshot on first request
+		if (fStopRelayingChangesRequests == 1) {
+			fDocumentClone = null;
+			fOriginalContent = getDocument().get();
+			fOriginalLineDelimiters = getDocument().getLegalLineDelimiters();
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredLineChangeHover.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredLineChangeHover.java
new file mode 100644
index 0000000..69d5d28
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredLineChangeHover.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.source.LineChangeHover;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * Escapes diff hover presentation text (converts < to &lt; > to &gt; etc...)
+ * so that html in the diff file (displayed in hover) isn't presented as style
+ * (bold, italic, colors, etc...)
+ * 
+ * @deprecated
+ */
+public class StructuredLineChangeHover extends LineChangeHover {
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.source.IAnnotationHoverExtension#getHoverControlCreator()
+	 */
+	public IInformationControlCreator getHoverControlCreator() {
+		// use the default information control creator that just displays text
+		// as text, not html content
+		// because there is no special html that should be presented when just
+		// showing diff
+		// in the future, sourceviewer should be used instead of this plain
+		// text control like java uses
+		// SourceViewerInformationControl
+		return new IInformationControlCreator() {
+			public IInformationControl createInformationControl(Shell parent) {
+				return new DefaultInformationControl(parent);
+			}
+		};
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredMarkerAnnotation.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredMarkerAnnotation.java
new file mode 100644
index 0000000..ed26973
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredMarkerAnnotation.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.text.source.IAnnotationPresentation;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
+
+
+/**
+ * This is overridden to get around the problem of being registered as a
+ * org.eclipse.wst.validation.core.problemmarker rather than a
+ * org.eclipse.core.resource.problemmarker causing all problems to be skipped
+ * in the OverviewRuler
+ */
+public class StructuredMarkerAnnotation extends MarkerAnnotation implements IAnnotationPresentation {
+	// controls if icon should be painted gray
+	private boolean fIsGrayed = false;
+	String fAnnotationType = null;
+
+	StructuredMarkerAnnotation(IMarker marker) {
+		super(marker);
+	}
+
+	public final String getAnnotationType() {
+		if (fAnnotationType==null){
+			initAnnotationType();
+		}
+		return fAnnotationType;
+	}
+
+	/**
+	 * Eventually will have to use IAnnotationPresentation &
+	 * IAnnotationExtension
+	 * 
+	 * @see org.eclipse.ui.texteditor.MarkerAnnotation#getImage(org.eclipse.swt.widgets.Display)
+	 */
+	protected Image getImage(Display display) {
+		Image image = null;
+		String annotationType = getAnnotationType();
+		if (annotationType == TemporaryAnnotation.ANNOT_ERROR) {
+			image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
+		}
+		else if (annotationType == TemporaryAnnotation.ANNOT_WARNING) {
+			image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
+		}
+		else if (annotationType == TemporaryAnnotation.ANNOT_INFO) {
+			image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK);
+		}
+
+		if (image != null && isGrayed())
+			setImage(getGrayImage(display, image));
+		else
+			setImage(image);
+
+		return super.getImage(display);
+	}
+
+	private Image getGrayImage(Display display, Image image) {
+		if (image != null) {
+			String key = Integer.toString(image.hashCode());
+			// make sure we cache the gray image
+			Image grayImage = JFaceResources.getImageRegistry().get(key);
+			if (grayImage == null) {
+				grayImage = new Image(display, image, SWT.IMAGE_GRAY);
+				JFaceResources.getImageRegistry().put(key, grayImage);
+			}
+			image = grayImage;
+		}
+		return image;
+	}
+
+	public final boolean isGrayed() {
+		return fIsGrayed;
+	}
+
+	public final void setGrayed(boolean grayed) {
+		fIsGrayed = grayed;
+	}
+
+	/**
+	 * Initializes the annotation's icon representation and its drawing layer
+	 * based upon the properties of the underlying marker.
+	 */
+	protected void initAnnotationType() {
+
+		IMarker marker = getMarker();
+		fAnnotationType = TemporaryAnnotation.ANNOT_UNKNOWN;
+		try {
+			if (marker.isSubtypeOf(IMarker.PROBLEM)) {
+				int severity = marker.getAttribute(IMarker.SEVERITY, -1);
+				switch (severity) {
+					case IMarker.SEVERITY_ERROR :
+						fAnnotationType = TemporaryAnnotation.ANNOT_ERROR;
+						break;
+					case IMarker.SEVERITY_WARNING :
+						fAnnotationType = TemporaryAnnotation.ANNOT_WARNING;
+						break;
+					case IMarker.SEVERITY_INFO :
+						fAnnotationType = TemporaryAnnotation.ANNOT_INFO;
+						break;
+				}
+			}
+
+		}
+		catch (CoreException e) {
+			Logger.logException(e);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModel.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModel.java
new file mode 100644
index 0000000..73d6bab
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModel.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.Position;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+import org.eclipse.ui.texteditor.MarkerUtilities;
+import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IBreakpointConstants;
+
+
+/**
+ * Source editor resource marker annotation model implementation
+ */
+public class StructuredResourceMarkerAnnotationModel extends ResourceMarkerAnnotationModel {
+	/**
+	 * Loading of markers when working with non-IResources is accomplished by
+	 * adding the markers to the workspace root with an additional key, whose
+	 * value uses '/' for segment separators when representing paths,
+	 * determining whether they're added into the annotation model.
+	 * 
+	 * Setters of this attribute should use '/'for segment separators when
+	 * representing paths.
+	 */
+	public final static String SECONDARY_ID_KEY = IBreakpointConstants.RESOURCE_PATH;
+	
+	protected IResource fMarkerResource;
+	protected String fSecondaryMarkerAttributeValue;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param resource
+	 */
+	public StructuredResourceMarkerAnnotationModel(IResource resource) {
+		super(resource);
+		fMarkerResource = resource;
+	}
+
+	public StructuredResourceMarkerAnnotationModel(IResource resource, String secondaryID) {
+		super(resource);
+		fMarkerResource = resource;
+		fSecondaryMarkerAttributeValue = secondaryID;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel#createMarkerAnnotation(org.eclipse.core.resources.IMarker)
+	 */
+	protected MarkerAnnotation createMarkerAnnotation(IMarker marker) {
+		/*
+		 * We need to do some special processing if marker is a validation
+		 * (aka problem) marker or if marker is a breakpoint marker so create
+		 * a special marker annotation for those markers. Otherwise, use
+		 * default.
+		 */
+		if (MarkerUtilities.isMarkerType(marker, IMarker.PROBLEM)) {
+			return new StructuredMarkerAnnotation(marker);
+		}
+		return super.createMarkerAnnotation(marker);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel#getMarkerPosition(org.eclipse.core.resources.IMarker)
+	 */
+	public Position getMarkerPosition(IMarker marker) {
+		Position pos = super.getMarkerPosition(marker);
+
+		// if ((pos == null || pos.getLength() == 0) && marker.getType() ==
+		// IInternalDebugUIConstants.ANN_INSTR_POINTER_CURRENT) {
+		if (pos == null || pos.getLength() == 0) {
+			// We probably should create position from marker if marker
+			// attributes specify a valid position
+			pos = createPositionFromMarker(marker);
+		}
+
+		return pos;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel#isAcceptable(org.eclipse.core.resources.IMarker)
+	 */
+	protected boolean isAcceptable(IMarker marker) {
+		try {
+			Object attr = marker.getAttribute(IBreakpointConstants.ATTR_HIDDEN);
+			if (attr != null && Boolean.TRUE.equals(attr))
+				return false;
+		}
+		catch (CoreException e) {
+			// ignore
+		}
+
+		if (fSecondaryMarkerAttributeValue == null)
+			return super.isAcceptable(marker);
+		String markerSecondaryMarkerAttributeValue = marker.getAttribute(SECONDARY_ID_KEY, ""); //$NON-NLS-1$
+		boolean isSameFile = fSecondaryMarkerAttributeValue.equalsIgnoreCase(markerSecondaryMarkerAttributeValue);
+		return super.isAcceptable(marker) && isSameFile;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModelFactory.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModelFactory.java
new file mode 100644
index 0000000..6e5b235
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModelFactory.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModelFactory;
+
+/**
+ * 
+ * @author nsd
+ * 
+ * Used by the org.eclipse.core.filebuffers.annotationModelCreation extension
+ * point
+ */
+public class StructuredResourceMarkerAnnotationModelFactory extends ResourceMarkerAnnotationModelFactory {
+
+	public StructuredResourceMarkerAnnotationModelFactory() {
+		super();
+	}
+
+	/*
+	 * @see org.eclipse.core.filebuffers.IAnnotationModelFactory#createAnnotationModel(org.eclipse.core.runtime.IPath)
+	 */
+	public IAnnotationModel createAnnotationModel(IPath location) {
+		IAnnotationModel model = null;
+		IFile file = FileBuffers.getWorkspaceFileAtLocation(location);
+		if (file != null) {
+			model = new StructuredResourceMarkerAnnotationModel(file);
+		}
+		else {
+			model = new StructuredResourceMarkerAnnotationModel(ResourcesPlugin.getWorkspace().getRoot(), location.toString());
+		}
+		return model;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextAnnotationHover.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextAnnotationHover.java
new file mode 100644
index 0000000..624a3f7
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextAnnotationHover.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jface.internal.text.html.HTMLPrinter;
+import org.eclipse.jface.text.source.DefaultAnnotationHover;
+
+/**
+ * Determines all messages for the given line and collects, concatenates, and
+ * formats them in HTML. Use of the internal HTMLPrinter was observed in
+ * org.eclipse.jdt.internal.ui.text.HTMLAnnotationHover .
+ */
+public class StructuredTextAnnotationHover extends DefaultAnnotationHover {
+
+	public StructuredTextAnnotationHover() {
+		super();
+	}
+
+	public StructuredTextAnnotationHover(boolean showLineNumber) {
+		super(showLineNumber);
+	}
+
+	/*
+	 * Formats a message as HTML text.
+	 */
+	protected String formatSingleMessage(String message) {
+		StringBuffer buffer = new StringBuffer();
+		HTMLPrinter.addPageProlog(buffer);
+		HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message));
+		HTMLPrinter.addPageEpilog(buffer);
+		return buffer.toString();
+	}
+
+	/*
+	 * Formats several message as HTML text.
+	 */
+	protected String formatMultipleMessages(List messages) {
+		StringBuffer buffer = new StringBuffer();
+		HTMLPrinter.addPageProlog(buffer);
+		HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(SSEUIMessages.Multiple_errors));
+
+		HTMLPrinter.startBulletList(buffer);
+		Set collectedMessages = new HashSet();
+		Iterator e = messages.iterator();
+		while (e.hasNext()) {
+			String converted = HTMLPrinter.convertToHTMLContent((String) e.next());
+			collectedMessages.add(converted);
+		}
+		e = collectedMessages.iterator();
+		while (e.hasNext()) {
+			HTMLPrinter.addBullet(buffer, e.next().toString());
+		}
+		HTMLPrinter.endBulletList(buffer);
+
+		HTMLPrinter.addPageEpilog(buffer);
+		return buffer.toString();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.IReleasable#release()
+	 */
+	public void release() {
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextLineBreakingReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextLineBreakingReader.java
new file mode 100644
index 0000000..7fe3deb
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextLineBreakingReader.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Reader;
+
+import org.eclipse.swt.graphics.GC;
+
+/*
+ * Not a real reader. Could change if requested
+ */
+public class StructuredTextLineBreakingReader {
+	private GC fGC;
+	private int fIndex;
+	private String fLine;
+	private int fMaxWidth;
+
+	private BufferedReader fReader;
+
+	/**
+	 * Creates a reader that breaks an input text to fit in a given width.
+	 * 
+	 * @param reader
+	 *            Reader of the input text
+	 * @param gc
+	 *            The graphic context that defines the currently used font
+	 *            sizes
+	 * @param maxLineWidth
+	 *            The max width (pixes) where the text has to fit in
+	 */
+	public StructuredTextLineBreakingReader(Reader reader, GC gc, int maxLineWidth) {
+		fReader = new BufferedReader(reader);
+		fGC = gc;
+		fMaxWidth = maxLineWidth;
+		fLine = null;
+		fIndex = 0;
+	}
+
+	private int findNextBreakIndex(int currIndex) {
+		int currWidth = 0;
+		int lineLength = fLine.length();
+
+		while (currIndex < lineLength) {
+			char ch = fLine.charAt(currIndex);
+			int nextIndex = currIndex + 1;
+			// leading whitespaces are counted to the following word
+			if (Character.isWhitespace(ch)) {
+				while (nextIndex < lineLength && Character.isWhitespace(fLine.charAt(nextIndex))) {
+					nextIndex++;
+				}
+			}
+			while (nextIndex < lineLength && !Character.isWhitespace(fLine.charAt(nextIndex))) {
+				nextIndex++;
+			}
+			String word = fLine.substring(currIndex, nextIndex);
+			int wordWidth = fGC.textExtent(word).x;
+			int nextWidth = wordWidth + currWidth;
+			if (nextWidth > fMaxWidth && wordWidth < fMaxWidth) {
+				return currIndex;
+			}
+			currWidth = nextWidth;
+			currIndex = nextIndex;
+		}
+		return currIndex;
+	}
+
+	private int findWordBegin(int idx) {
+		while (idx < fLine.length() && Character.isWhitespace(fLine.charAt(idx))) {
+			idx++;
+		}
+		return idx;
+	}
+
+	/**
+	 * Reads the next line. The lengths of the line will not exceed the gived
+	 * maximum width.
+	 */
+	public String readLine() throws IOException {
+		if (fLine == null) {
+			String line = fReader.readLine();
+			if (line == null) {
+				return null;
+			}
+			int lineLen = fGC.textExtent(line).x;
+			if (lineLen < fMaxWidth) {
+				return line;
+			}
+			fLine = line;
+			fIndex = 0;
+		}
+		int breakIdx = findNextBreakIndex(fIndex);
+		String res = fLine.substring(fIndex, breakIdx);
+		if (breakIdx < fLine.length()) {
+			fIndex = findWordBegin(breakIdx);
+		} else {
+			fLine = null;
+		}
+		return res;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextSelectionChangedEvent.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextSelectionChangedEvent.java
new file mode 100644
index 0000000..bb8dc2d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextSelectionChangedEvent.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+/**
+ * This event is used by the SourceEditorTreeViewer to tell the
+ * ViewerSelectionManager that the selection really came from a user click on
+ * the content outliner, instead of being set programatically.
+ */
+public class StructuredTextSelectionChangedEvent extends org.eclipse.jface.viewers.SelectionChangedEvent {
+
+	/**
+	 * Comment for <code>serialVersionUID</code>
+	 */
+	private static final long serialVersionUID = 1L;
+
+	public StructuredTextSelectionChangedEvent(ISelectionProvider source, ISelection selection) {
+		super(source, selection);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java
new file mode 100644
index 0000000..d9ba006
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java
@@ -0,0 +1,951 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DocumentRewriteSession;
+import org.eclipse.jface.text.DocumentRewriteSessionType;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentAdapter;
+import org.eclipse.jface.text.IDocumentExtension4;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextPresentationListener;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.ITextViewerExtension2;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.formatter.FormattingContext;
+import org.eclipse.jface.text.formatter.FormattingContextProperties;
+import org.eclipse.jface.text.formatter.IContentFormatterExtension;
+import org.eclipse.jface.text.formatter.IFormattingContext;
+import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
+import org.eclipse.jface.text.information.IInformationPresenter;
+import org.eclipse.jface.text.projection.ProjectionDocument;
+import org.eclipse.jface.text.quickassist.IQuickAssistAssistant;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IOverviewRuler;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.wst.sse.core.internal.cleanup.StructuredContentCleanupHandler;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.undo.IDocumentSelectionMediator;
+import org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager;
+import org.eclipse.wst.sse.core.internal.undo.UndoDocumentEvent;
+import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
+import org.eclipse.wst.sse.ui.internal.provisional.style.AbstractLineStyleProvider;
+import org.eclipse.wst.sse.ui.internal.provisional.style.CompatibleHighlighter;
+import org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter;
+import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
+import org.eclipse.wst.sse.ui.internal.provisional.style.ReconcilerHighlighter;
+import org.eclipse.wst.sse.ui.internal.reconcile.StructuredRegionProcessor;
+import org.eclipse.wst.sse.ui.internal.util.PlatformStatusLineUtil;
+
+/**
+ * <p>
+ * Like {@link org.eclipse.wst.sse.ui.StructuredTextEditor}, this class is not
+ * meant to be subclassed.<br />
+ */
+public class StructuredTextViewer extends ProjectionViewer implements IDocumentSelectionMediator {
+	/** Text operation codes */
+	private static final int BASE = ProjectionViewer.COLLAPSE_ALL; // see
+	// ProjectionViewer.COLLAPSE_ALL
+	private static final int CLEANUP_DOCUMENT = BASE + 4;
+	public static final int FORMAT_ACTIVE_ELEMENTS = BASE + 3;
+
+	private static final String FORMAT_ACTIVE_ELEMENTS_TEXT = SSEUIMessages.Format_Active_Elements_UI_; //$NON-NLS-1$
+	public static final int FORMAT_DOCUMENT = BASE + 2;
+	private static final String FORMAT_DOCUMENT_TEXT = SSEUIMessages.Format_Document_UI_; //$NON-NLS-1$
+	private static final String TEXT_CUT = SSEUIMessages.Text_Cut_UI_; //$NON-NLS-1$
+	private static final String TEXT_PASTE = SSEUIMessages.Text_Paste_UI_; //$NON-NLS-1$
+	private static final String TEXT_SHIFT_LEFT = SSEUIMessages.Text_Shift_Left_UI_; //$NON-NLS-1$ = "Text Shift Left"
+	private static final String TEXT_SHIFT_RIGHT = SSEUIMessages.Text_Shift_Right_UI_; //$NON-NLS-1$ = "Text Shift Right"
+	private static final boolean TRACE_EXCEPTIONS = true;
+
+	/*
+	 * Max length of chars to format before it is considered a "big format"
+	 * This is used to indication a small unrestricted rewrite session.
+	 */
+	private final int MAX_SMALL_FORMAT_LENGTH = 1000;
+	private boolean fBackgroundupdateInProgress;
+	private StructuredContentCleanupHandler fContentCleanupHandler = null;
+	//private IDocumentAdapter fDocAdapter;
+
+	private Highlighter fHighlighter;
+	
+	private ReconcilerHighlighter fRecHighlighter = null;
+
+	// private ViewerSelectionManager fViewerSelectionManager;
+	private SourceViewerConfiguration fConfiguration;
+	/*
+	 * True if formatter has been set
+	 */
+	private boolean fFormatterSet = false;
+
+	/**
+	 * @see org.eclipse.jface.text.source.SourceViewer#SourceViewer(Composite,
+	 *      IVerticalRuler, IOverviewRuler, boolean, int)
+	 */
+	public StructuredTextViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles) {
+		super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);
+	}
+
+	/**
+	 * 
+	 */
+	private void beep() {
+		getTextWidget().getDisplay().beep();
+	}
+
+	public void beginBackgroundUpdate() {
+		fBackgroundupdateInProgress = true;
+		setRedraw(false);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.ITextOperationTarget#canDoOperation(int)
+	 */
+	public boolean canDoOperation(int operation) {
+		if (fBackgroundupdateInProgress) {
+			return false;
+		}
+		switch (operation) {
+			case CONTENTASSIST_PROPOSALS : {
+				// (pa) if position isn't READ_ONLY (containsReadOnly()
+				// returns false),
+				// Otherwise, you DO want content assist (return true)
+				IDocument doc = getDocument();
+				if (doc != null && doc instanceof IStructuredDocument) {
+					return isEditable() && (!((IStructuredDocument) doc).containsReadOnly(getSelectedRange().x, 0));
+				}
+				break;
+			}
+			case CLEANUP_DOCUMENT : {
+				return (fContentCleanupHandler != null && isEditable());
+			}
+			case FORMAT_DOCUMENT :
+			case FORMAT_ACTIVE_ELEMENTS : {
+				// if formatter not set yet, contentformatter can be null
+				return ((fContentFormatter != null || !fFormatterSet) && isEditable());
+			}
+		}
+		return super.canDoOperation(operation);
+	}
+
+	/**
+	 * Should be identical to superclass version. Plus, we get our own special
+	 * Highlighter. Plus we uninstall before installing.
+	 */
+	public void configure(SourceViewerConfiguration configuration) {
+
+		if (getTextWidget() == null)
+			return;
+
+		setDocumentPartitioning(configuration.getConfiguredDocumentPartitioning(this));
+
+		// always uninstall highlighter and null it out on new configuration
+		if (fHighlighter != null) {
+			fHighlighter.uninstall();
+			fHighlighter = null;
+		}
+
+		if(fRecHighlighter != null) {
+			fRecHighlighter.uninstall();
+			fRecHighlighter = null;
+		}
+		
+		// Bug 230297 - Uninstall presentation reconciler in preparation of a new one
+		if(fPresentationReconciler != null) {
+			fPresentationReconciler.uninstall();
+			fPresentationReconciler = null;
+		}
+
+		IReconciler newReconciler = configuration.getReconciler(this);
+
+		if (newReconciler != fReconciler || newReconciler == null || fReconciler == null) {
+
+			if (fReconciler != null) {
+				fReconciler.uninstall();
+			}
+
+			fReconciler = newReconciler;
+
+			if (fReconciler != null) {
+				fReconciler.install(this);
+				// https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3858
+				// still need set document on the reconciler (strategies)
+				if (fReconciler instanceof StructuredRegionProcessor)
+					((StructuredRegionProcessor) fReconciler).setDocument(getDocument());
+			}
+		}
+
+		IContentAssistant newAssistant = configuration.getContentAssistant(this);
+		if (newAssistant != fContentAssistant || newAssistant == null || fContentAssistant == null) {
+			if (fContentAssistant != null)
+				fContentAssistant.uninstall();
+
+			fContentAssistant = newAssistant;
+
+			if (fContentAssistant != null) {
+				fContentAssistant.install(this);
+				fContentAssistantInstalled = true;
+			}
+			else {
+				// 248036
+				// disable the content assist operation if no content
+				// assistant
+				enableOperation(CONTENTASSIST_PROPOSALS, false);
+			}
+		}
+
+		IQuickAssistAssistant quickAssistant = configuration.getQuickAssistAssistant(this);
+		if (quickAssistant != fQuickAssistAssistant || quickAssistant == null || fQuickAssistAssistant == null) {
+			if (fQuickAssistAssistant != null)
+				fQuickAssistAssistant.uninstall();
+
+			fQuickAssistAssistant = quickAssistant;
+
+			if (fQuickAssistAssistant != null) {
+				fQuickAssistAssistant.install(this);
+				fQuickAssistAssistantInstalled = true;
+			}
+			else {
+				// 248036
+				// disable the content assist operation if no content
+				// assistant
+				enableOperation(QUICK_ASSIST, false);
+			}
+		}
+
+		fContentFormatter = configuration.getContentFormatter(this);
+
+		// do not uninstall old information presenter if it's the same
+		IInformationPresenter newInformationPresenter = configuration.getInformationPresenter(this);
+		if (newInformationPresenter == null || fInformationPresenter == null || !(newInformationPresenter.equals(fInformationPresenter))) {
+			if (fInformationPresenter != null)
+				fInformationPresenter.uninstall();
+			fInformationPresenter = newInformationPresenter;
+			if (fInformationPresenter != null)
+				fInformationPresenter.install(this);
+		}
+
+		// disconnect from the old undo manager before setting the new one
+		if (fUndoManager != null) {
+			fUndoManager.disconnect();
+		}
+		setUndoManager(configuration.getUndoManager(this));
+
+		// release old annotation hover before setting new one
+		if (fAnnotationHover instanceof StructuredTextAnnotationHover) {
+			((StructuredTextAnnotationHover) fAnnotationHover).release();
+		}
+		setAnnotationHover(configuration.getAnnotationHover(this));
+
+		// release old annotation hover before setting new one
+		if (fOverviewRulerAnnotationHover instanceof StructuredTextAnnotationHover) {
+			((StructuredTextAnnotationHover) fOverviewRulerAnnotationHover).release();
+		}
+		setOverviewRulerAnnotationHover(configuration.getOverviewRulerAnnotationHover(this));
+
+		getTextWidget().setTabs(configuration.getTabWidth(this));
+		setHoverControlCreator(configuration.getInformationControlCreator(this));
+
+		// if hyperlink manager has already been created, uninstall it
+		if (fHyperlinkManager != null) {
+			setHyperlinkDetectors(null, SWT.NONE);
+		}
+		setHyperlinkPresenter(configuration.getHyperlinkPresenter(this));
+		IHyperlinkDetector[] hyperlinkDetectors = configuration.getHyperlinkDetectors(this);
+		int eventStateMask = configuration.getHyperlinkStateMask(this);
+		setHyperlinkDetectors(hyperlinkDetectors, eventStateMask);
+
+		String[] types = configuration.getConfiguredContentTypes(this);
+
+		// clear autoindent/autoedit strategies
+		fAutoIndentStrategies = null;
+		
+		for (int i = 0; i < types.length; i++) {
+			String t = types[i];
+			setAutoEditStrategies(configuration.getAutoEditStrategies(this, t), t);
+			setTextDoubleClickStrategy(configuration.getDoubleClickStrategy(this, t), t);
+
+			int[] stateMasks = configuration.getConfiguredTextHoverStateMasks(this, t);
+			if (stateMasks != null) {
+				for (int j = 0; j < stateMasks.length; j++) {
+					int stateMask = stateMasks[j];
+					setTextHover(configuration.getTextHover(this, t, stateMask), t, stateMask);
+				}
+			}
+			else {
+				setTextHover(configuration.getTextHover(this, t), t, ITextViewerExtension2.DEFAULT_HOVER_STATE_MASK);
+			}
+
+			String[] prefixes = configuration.getIndentPrefixes(this, t);
+			if (prefixes != null && prefixes.length > 0)
+				setIndentPrefixes(prefixes, t);
+
+			prefixes = configuration.getDefaultPrefixes(this, t);
+			if (prefixes != null && prefixes.length > 0)
+				setDefaultPrefixes(prefixes, t);
+
+			// Bug 230297 - Add LineStyleProviders from the new configuration if
+			// the document is set
+			if(getDocument() != null) {
+				// add highlighter/linestyleprovider
+				LineStyleProvider[] providers = ((StructuredTextViewerConfiguration) configuration).getLineStyleProviders(this, t);
+				if (providers != null) {
+					for (int j = 0; j < providers.length; ++j) {
+						
+						if(fRecHighlighter == null) {
+							fRecHighlighter = new ReconcilerHighlighter();
+							((StructuredTextViewerConfiguration) configuration).setHighlighter(fRecHighlighter);
+						}
+						if (providers[j] instanceof AbstractLineStyleProvider) {
+							((AbstractLineStyleProvider) providers[j]).init((IStructuredDocument) getDocument(), fRecHighlighter);
+							fRecHighlighter.addProvider(t, providers[j]);
+						}
+						else {
+							// init with compatibility instance
+							if (fHighlighter == null) {
+								fHighlighter = new CompatibleHighlighter();
+							}
+							Logger.log(Logger.INFO_DEBUG, "CompatibleHighlighter installing compatibility for " + providers[j].getClass()); //$NON-NLS-1$
+							providers[j].init((IStructuredDocument) getDocument(), fHighlighter);
+							fHighlighter.addProvider(t, providers[j]);
+						}
+					}
+				}
+			}
+		}
+
+		// initialize highlighter after linestyleproviders were added
+		if (fHighlighter != null) {
+			fHighlighter.setDocumentPartitioning(configuration.getConfiguredDocumentPartitioning(this));
+			fHighlighter.setDocument((IStructuredDocument) getDocument());
+			fHighlighter.install(this);
+		}
+		
+		if (fRecHighlighter != null)
+			fRecHighlighter.install(this);
+
+		activatePlugins();
+
+		fConfiguration = configuration;
+		
+		// Update the viewer's presentation reconciler
+		fPresentationReconciler = configuration.getPresentationReconciler(this);
+		
+		if(fPresentationReconciler != null)
+			fPresentationReconciler.install(this);
+	}
+
+	/**
+	 * @param document
+	 * @param startOffset
+	 * @param endOffset
+	 * @return
+	 */
+	private boolean containsReadOnly(IDocument document, int startOffset, int endOffset) {
+
+		int start = startOffset;
+		int end = endOffset;
+		IStructuredDocument structuredDocument = null;
+		if (document instanceof IStructuredDocument) {
+			structuredDocument = (IStructuredDocument) document;
+		}
+		else {
+			if (document instanceof ProjectionDocument) {
+				IDocument doc = ((ProjectionDocument) document).getMasterDocument();
+				if (doc instanceof IStructuredDocument) {
+					structuredDocument = (IStructuredDocument) doc;
+					int adjust = ((ProjectionDocument) document).getProjectionMapping().getCoverage().getOffset();
+					start = adjust + start;
+					end = adjust + end;
+				}
+			}
+		}
+		if (structuredDocument == null) {
+			return false;
+		}
+		else {
+			int length = end - start;
+			return structuredDocument.containsReadOnly(start, length);
+		}
+	}
+
+	/**
+	 * @deprecated - present for compatibility only
+	 */
+	protected IDocumentAdapter createDocumentAdapter() {
+		return super.createDocumentAdapter();
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.ITextOperationTarget#doOperation(int)
+	 */
+	public void doOperation(int operation) {
+
+		Point selection = getTextWidget().getSelection();
+		int cursorPosition = selection.x;
+		int selectionLength = selection.y - selection.x;
+		switch (operation) {
+			case CUT :
+				beginRecording(TEXT_CUT, TEXT_CUT, cursorPosition, selectionLength);
+				super.doOperation(operation);
+				selection = getTextWidget().getSelection();
+				cursorPosition = selection.x;
+				selectionLength = selection.y - selection.x;
+				endRecording(cursorPosition, selectionLength);
+				break;
+			case PASTE :
+				beginRecording(TEXT_PASTE, TEXT_PASTE, cursorPosition, selectionLength);
+				super.doOperation(operation);
+				selection = getTextWidget().getSelection();
+				cursorPosition = selection.x;
+				selectionLength = selection.y - selection.x;
+				endRecording(cursorPosition, selectionLength);
+				break;
+			case CONTENTASSIST_PROPOSALS :
+				// maybe not configured?
+				if (fContentAssistant != null && isEditable()) {
+					// CMVC 263269
+					// need an explicit check here because the
+					// contentAssistAction is no longer being updated on
+					// cursor
+					// position
+					if (canDoOperation(CONTENTASSIST_PROPOSALS)) {
+						String err = fContentAssistant.showPossibleCompletions();
+						if (err != null) {
+							// don't wanna beep if there is no error
+							PlatformStatusLineUtil.displayTemporaryErrorMessage(this, err);
+						}
+					}
+					else
+						beep();
+				}
+				break;
+			case CONTENTASSIST_CONTEXT_INFORMATION :
+				if (fContentAssistant != null) {
+					String err = fContentAssistant.showContextInformation();
+					if (err != null) {
+						// don't wanna beep if there is no error
+						PlatformStatusLineUtil.displayTemporaryErrorMessage(this, err);
+					}
+				}
+				break;
+			case SHIFT_RIGHT :
+				beginRecording(TEXT_SHIFT_RIGHT, TEXT_SHIFT_RIGHT, cursorPosition, selectionLength);
+				updateIndentationPrefixes();
+				super.doOperation(SHIFT_RIGHT);
+				selection = getTextWidget().getSelection();
+				cursorPosition = selection.x;
+				selectionLength = selection.y - selection.x;
+				endRecording(cursorPosition, selectionLength);
+				break;
+			case SHIFT_LEFT :
+				beginRecording(TEXT_SHIFT_LEFT, TEXT_SHIFT_LEFT, cursorPosition, selectionLength);
+				updateIndentationPrefixes();
+				super.doOperation(SHIFT_LEFT);
+				selection = getTextWidget().getSelection();
+				cursorPosition = selection.x;
+				selectionLength = selection.y - selection.x;
+				endRecording(cursorPosition, selectionLength);
+				break;
+			case FORMAT_DOCUMENT :
+				DocumentRewriteSession rewriteSession = null;
+				IDocument document = getDocument();
+				try {
+					/*
+					 * This command will actually format selection if text is
+					 * selected, otherwise format entire document
+					 */
+					// begin recording
+					beginRecording(FORMAT_DOCUMENT_TEXT, FORMAT_DOCUMENT_TEXT, cursorPosition, selectionLength);
+					boolean formatDocument = false;
+					IRegion region = null;
+					Point s = getSelectedRange();
+					if (s.y > 0) {
+						// only format currently selected text
+						region = new Region(s.x, s.y);
+					}
+					else {
+						// no selection, so format entire document
+						region = getModelCoverage();
+						formatDocument = true;
+					}
+
+					if (document instanceof IDocumentExtension4) {
+						IDocumentExtension4 extension = (IDocumentExtension4) document;
+						DocumentRewriteSessionType type = (selection.y == 0 || selection.y > MAX_SMALL_FORMAT_LENGTH) ? DocumentRewriteSessionType.UNRESTRICTED : DocumentRewriteSessionType.UNRESTRICTED_SMALL;
+						rewriteSession = (extension.getActiveRewriteSession() != null) ? null : extension.startRewriteSession(type);
+					}
+					else {
+						setRedraw(false);
+					}
+
+					if (fContentFormatter instanceof IContentFormatterExtension) {
+						IContentFormatterExtension extension = (IContentFormatterExtension) fContentFormatter;
+						IFormattingContext context = new FormattingContext();
+						context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.valueOf(formatDocument));
+						context.setProperty(FormattingContextProperties.CONTEXT_REGION, region);
+						extension.format(document, context);
+					}
+					else {
+						fContentFormatter.format(document, region);
+					}
+				}
+				finally {
+					try {
+						if (rewriteSession != null) {
+							IDocumentExtension4 extension = (IDocumentExtension4) document;
+							extension.stopRewriteSession(rewriteSession);
+						}
+						else {
+							setRedraw(true);
+						}
+					}
+					finally {
+						// end recording
+						selection = getTextWidget().getSelection();
+						cursorPosition = selection.x;
+						selectionLength = selection.y - selection.x;
+						endRecording(cursorPosition, selectionLength);
+					}
+				}
+				break;
+			case FORMAT_ACTIVE_ELEMENTS :
+				rewriteSession = null;
+				document = getDocument();
+				try {
+					/*
+					 * This command will format the node at cursor position
+					 * (and all its children)
+					 */
+					// begin recording
+					beginRecording(FORMAT_ACTIVE_ELEMENTS_TEXT, FORMAT_ACTIVE_ELEMENTS_TEXT, cursorPosition, selectionLength);
+					IRegion region = null;
+					Point s = getSelectedRange();
+					if (s.y > -1) {
+						// only format node at cursor position
+						region = new Region(s.x, s.y);
+					}
+
+					if (document instanceof IDocumentExtension4) {
+						IDocumentExtension4 extension = (IDocumentExtension4) document;
+						DocumentRewriteSessionType type = (selection.y == 0 || selection.y > MAX_SMALL_FORMAT_LENGTH) ? DocumentRewriteSessionType.UNRESTRICTED : DocumentRewriteSessionType.UNRESTRICTED_SMALL;
+						rewriteSession = (extension.getActiveRewriteSession() != null) ? null : extension.startRewriteSession(type);
+					}
+					else {
+						setRedraw(false);
+					}
+
+					if (fContentFormatter instanceof IContentFormatterExtension) {
+						IContentFormatterExtension extension = (IContentFormatterExtension) fContentFormatter;
+						IFormattingContext context = new FormattingContext();
+						context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.FALSE);
+						context.setProperty(FormattingContextProperties.CONTEXT_REGION, region);
+						extension.format(getDocument(), context);
+					}
+					else {
+						fContentFormatter.format(getDocument(), region);
+					}
+				}
+				finally {
+					try {
+						if (rewriteSession != null) {
+							IDocumentExtension4 extension = (IDocumentExtension4) document;
+							extension.stopRewriteSession(rewriteSession);
+						}
+						else {
+							setRedraw(true);
+						}
+					}
+					finally {
+						// end recording
+						selection = getTextWidget().getSelection();
+						cursorPosition = selection.x;
+						selectionLength = selection.y - selection.x;
+						endRecording(cursorPosition, selectionLength);
+					}
+				}
+				break;
+			default :
+				super.doOperation(operation);
+		}
+	}
+
+	private void endRecording(int cursorPosition, int selectionLength) {
+		IDocument doc = getDocument();
+		if (doc instanceof IStructuredDocument) {
+			IStructuredDocument structuredDocument = (IStructuredDocument) doc;
+			IStructuredTextUndoManager undoManager = structuredDocument.getUndoManager();
+
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=198617
+			// undo after paste in document with folds - wrong behavior
+			IRegion widgetSelection = new Region(cursorPosition, selectionLength);
+			IRegion documentSelection = widgetRange2ModelRange(widgetSelection);
+			if (documentSelection == null)
+				documentSelection = widgetSelection;
+			undoManager.endRecording(this, documentSelection.getOffset(), documentSelection.getLength());
+		}
+		else {
+			// TODO: how to handle other document types?
+		}
+	}
+
+	private void beginRecording(String label, String description, int cursorPosition, int selectionLength) {
+		IDocument doc = getDocument();
+		if (doc instanceof IStructuredDocument) {
+			IStructuredDocument structuredDocument = (IStructuredDocument) doc;
+			IStructuredTextUndoManager undoManager = structuredDocument.getUndoManager();
+
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=198617
+			// undo after paste in document with folds - wrong behavior
+			IRegion widgetSelection = new Region(cursorPosition, selectionLength);
+			IRegion documentSelection = widgetRange2ModelRange(widgetSelection);
+			if (documentSelection == null)
+				documentSelection = widgetSelection;
+			undoManager.beginRecording(this, label, description, documentSelection.getOffset(), documentSelection.getLength());
+		}
+		else {
+			// TODO: how to handle other document types?
+		}
+	}
+
+	public void endBackgroundUpdate() {
+		fBackgroundupdateInProgress = false;
+		setRedraw(true);
+	}
+
+	protected void handleDispose() {
+		Logger.trace("Source Editor", "StructuredTextViewer::handleDispose entry"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		// before we dispose, we set a special "empty" selection, to prevent
+		// the "leak one document" that
+		// otherwise occurs when editor closed (since last selection stays in
+		// SelectedResourceManager.
+		// the occurance of the "leak" isn't so bad, but makes debugging other
+		// leaks very hard.
+		setSelection(TextSelection.emptySelection());
+
+		if (fHighlighter != null) {
+			fHighlighter.uninstall();
+			fHighlighter = null;
+		}
+		
+		if (fRecHighlighter != null) {
+			fRecHighlighter.uninstall();
+			fRecHighlighter = null;
+		}
+		super.handleDispose();
+
+		Logger.trace("Source Editor", "StructuredTextViewer::handleDispose exit"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/*
+	 * Overridden for special support of background update and read-only
+	 * regions
+	 */
+	protected void handleVerifyEvent(VerifyEvent e) {
+		IRegion modelRange = event2ModelRange(e);
+		if (exposeModelRange(modelRange)) {
+			e.doit = false;
+			return;
+		}
+
+		if (fEventConsumer != null) {
+			fEventConsumer.processEvent(e);
+			if (!e.doit)
+				return;
+		}
+		if (fBackgroundupdateInProgress) {
+			e.doit = false;
+			beep();
+			return;
+		}
+		
+		// for read-only support
+		if (containsReadOnly(getVisibleDocument(), e.start, e.end)) {
+			e.doit = false;
+			beep();
+			return;
+		}
+
+		try {
+			super.handleVerifyEvent(e);
+		}
+		catch (Exception x) {
+			/*
+			 * Note, we catch and log any exception, since an otherwise can
+			 * actually prevent typing! see
+			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=111318
+			 */
+
+			if (TRACE_EXCEPTIONS)
+				Logger.logException("StructuredTextViewer.exception.verifyText", x); //$NON-NLS-1$
+		}
+	}
+
+	public int modelLine2WidgetLine(int modelLine) {
+		/**
+		 * need to override this method as a workaround for Bug 85709
+		 */
+		if (fInformationMapping == null) {
+			IDocument document = getDocument();
+			if (document != null) {
+				try {
+					IRegion modelLineRegion = getDocument().getLineInformation(modelLine);
+					IRegion region = getModelCoverage();
+					if (modelLineRegion != null && region != null) {
+						int modelEnd = modelLineRegion.getOffset() + modelLineRegion.getLength();
+						int regionEnd = region.getOffset() + region.getLength();
+						// returns -1 if modelLine is invalid
+						if ((modelLineRegion.getOffset() < region.getOffset()) || (modelEnd > regionEnd))
+							return -1;
+					}
+				}
+				catch (BadLocationException e) {
+					// returns -1 if modelLine is invalid
+					return -1;
+				}
+			}
+		}
+		return super.modelLine2WidgetLine(modelLine);
+	}
+
+	public int modelOffset2WidgetOffset(int modelOffset) {
+		/**
+		 * need to override this method as a workaround for Bug 85709
+		 */
+		if (fInformationMapping == null) {
+			IRegion region = getModelCoverage();
+			if (region != null) {
+				// returns -1 if modelOffset is invalid
+				if (modelOffset < region.getOffset() || modelOffset > (region.getOffset() + region.getLength()))
+					return -1;
+			}
+		}
+		return super.modelOffset2WidgetOffset(modelOffset);
+	}
+
+	public IRegion modelRange2WidgetRange(IRegion modelRange) {
+		// need to override this method as workaround for Bug85709
+		if (fInformationMapping == null) {
+			IRegion region = getModelCoverage();
+			if (region != null && modelRange != null) {
+				int modelEnd = modelRange.getOffset() + modelRange.getLength();
+				int regionEnd = region.getOffset() + region.getLength();
+				// returns null if modelRange is invalid
+				if ((modelRange.getOffset() < region.getOffset()) || (modelEnd > regionEnd))
+					return null;
+			}
+		}
+		return super.modelRange2WidgetRange(modelRange);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.source.ISourceViewer#setDocument(org.eclipse.jface.text.IDocument,
+	 *      org.eclipse.jface.text.source.IAnnotationModel, int, int)
+	 */
+	public void setDocument(IDocument document, IAnnotationModel annotationModel, int modelRangeOffset, int modelRangeLength) {
+		// partial fix for:
+		// https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=1970
+		// when our document is set, especially to null during close,
+		// immediately uninstall the reconciler.
+		// this is to avoid an unnecessary final "reconcile"
+		// that blocks display thread
+		if (document == null) {
+			if (fReconciler != null) {
+				fReconciler.uninstall();
+			}
+		}
+
+		super.setDocument(document, annotationModel, modelRangeOffset, modelRangeLength);
+
+		if (document instanceof IStructuredDocument) {
+			IStructuredDocument structuredDocument = (IStructuredDocument) document;
+
+			// notify highlighter
+			updateHighlighter(structuredDocument);
+
+			// set the formatter again now that document has been set
+			if (!fFormatterSet && fConfiguration != null) {
+				fContentFormatter = fConfiguration.getContentFormatter(this);
+				fFormatterSet = true;
+			}
+
+			// set document in the viewer-based undo manager
+			if (fUndoManager != null) {
+				fUndoManager.disconnect();
+				fUndoManager.connect(this);
+			}
+			// CaretEvent is not sent to ViewerSelectionManager after Save As.
+			// Need to notify ViewerSelectionManager here.
+			// notifyViewerSelectionManager(getSelectedRange().x,
+			// getSelectedRange().y);
+		}
+	}
+
+	/**
+	 * Uninstalls anything that was installed by configure
+	 */
+	public void unconfigure() {
+		Logger.trace("Source Editor", "StructuredTextViewer::unconfigure entry"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (fHighlighter != null) {
+			fHighlighter.uninstall();
+			fHighlighter = null;
+		}
+		
+		if (fRecHighlighter != null) {
+			fRecHighlighter.uninstall();
+			fRecHighlighter = null;
+		}
+
+		if (fAnnotationHover instanceof StructuredTextAnnotationHover) {
+			((StructuredTextAnnotationHover) fAnnotationHover).release();
+		}
+
+		if (fOverviewRulerAnnotationHover instanceof StructuredTextAnnotationHover) {
+			((StructuredTextAnnotationHover) fOverviewRulerAnnotationHover).release();
+		}
+
+		super.unconfigure();
+		fConfiguration = null;
+		Logger.trace("Source Editor", "StructuredTextViewer::unconfigure exit"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.core.undo.IDocumentSelectionMediator#undoOperationSelectionChanged(org.eclipse.wst.sse.core.undo.UndoDocumentEvent)
+	 */
+	public void undoOperationSelectionChanged(UndoDocumentEvent event) {
+		if (event.getRequester() != null && event.getRequester().equals(this) && event.getDocument().equals(getDocument())) {
+			// BUG107687: Undo/redo do not scroll editor
+			ITextSelection selection = new TextSelection(event.getOffset(), event.getLength());
+			setSelection(selection, true);
+		}
+	}
+
+	private void updateHighlighter(IStructuredDocument document) {
+		boolean documentSet = false;
+		
+		// if highlighter has not been created yet, initialize and install it
+		if (fRecHighlighter == null && fConfiguration instanceof StructuredTextViewerConfiguration) {
+			String[] types = fConfiguration.getConfiguredContentTypes(this);
+			for (int i = 0; i < types.length; i++) {
+				String t = types[i];
+
+				// add highlighter/linestyleprovider
+				LineStyleProvider[] providers = ((StructuredTextViewerConfiguration) fConfiguration).getLineStyleProviders(this, t);
+				if (providers != null) {
+					for (int j = 0; j < providers.length; ++j) {
+						
+						if(fRecHighlighter == null) {
+							fRecHighlighter = new ReconcilerHighlighter();
+							((StructuredTextViewerConfiguration) fConfiguration).setHighlighter(fRecHighlighter);
+						}
+						if (providers[j] instanceof AbstractLineStyleProvider) {
+							((AbstractLineStyleProvider) providers[j]).init(document, fRecHighlighter);
+							fRecHighlighter.addProvider(t, providers[j]);
+						}
+						else {
+							// init with compatibility instance
+							if (fHighlighter == null) {
+								fHighlighter = new CompatibleHighlighter();
+							}
+							Logger.log(Logger.INFO_DEBUG, "CompatibleHighlighter installing compatibility for " + providers[j].getClass()); //$NON-NLS-1$
+							providers[j].init(document, fHighlighter);
+							fHighlighter.addProvider(t, providers[j]);
+						}
+					}
+				}
+			}
+			
+			if(fRecHighlighter != null)
+				fRecHighlighter.install(this);
+			if(fHighlighter != null) {
+				fHighlighter.setDocumentPartitioning(fConfiguration.getConfiguredDocumentPartitioning(this));
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=203347
+				// make sure to set document before install
+				fHighlighter.setDocument(document);
+				fHighlighter.install(this);
+				documentSet = true;
+			}
+		}
+		if (fHighlighter != null && !documentSet)
+			fHighlighter.setDocument(document);
+		
+		// install content type independent plugins
+		if (fPresentationReconciler != null)
+			fPresentationReconciler.uninstall();
+		// 228847 - XSL Content Assist tests fail with Null Pointer on Highlighter
+		if(fConfiguration != null)
+			fPresentationReconciler = fConfiguration.getPresentationReconciler(this);
+		
+		if (fPresentationReconciler != null)
+			fPresentationReconciler.install(this);
+
+	}
+
+	/**
+	 * Make sure indentation is correct before using.
+	 */
+	private void updateIndentationPrefixes() {
+		SourceViewerConfiguration configuration = fConfiguration;
+		if (fConfiguration != null) {
+			String[] types = configuration.getConfiguredContentTypes(this);
+			for (int i = 0; i < types.length; i++) {
+				String[] prefixes = configuration.getIndentPrefixes(this, types[i]);
+				if (prefixes != null && prefixes.length > 0)
+					setIndentPrefixes(prefixes, types[i]);
+			}
+		}
+	}
+	
+	/**
+	 * Prepends the text presentation listener at the beginning of the viewer's
+	 * list of text presentation listeners.  If the listener is already registered
+	 * with the viewer this call moves the listener to the beginning of
+	 * the list.
+	 *
+	 * @param listener the text presentation listener
+	 * @since 3.1
+	 */
+	public void prependTextPresentationListener(ITextPresentationListener listener) {
+
+		Assert.isNotNull(listener);
+
+		if (fTextPresentationListeners == null)
+			fTextPresentationListeners= new ArrayList();
+
+		fTextPresentationListeners.remove(listener);
+		fTextPresentationListeners.add(0, listener);
+	}
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/NodeAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/TextDropAction.java
similarity index 65%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/NodeAction.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/TextDropAction.java
index 0974e8f..82bc336 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/NodeAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/TextDropAction.java
@@ -10,17 +10,18 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
 
 
-package org.eclipse.wst.xml.ui.internal.actions;
 
-import org.eclipse.jface.action.Action;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.ui.IEditorPart;
 
-public abstract class NodeAction extends Action {
-
-	public String getSortKey() {
-		return null;
+/**
+ * TextDropAction
+ */
+public class TextDropAction extends AbstractDropAction {
+	public boolean run(DropTargetEvent event, IEditorPart targetEditor) {
+		return insert((String) event.data, targetEditor);
 	}
-
-	public abstract String getUndoDescription();
 }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/TransferBuilder.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/TransferBuilder.java
new file mode 100644
index 0000000..1d7d64a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/TransferBuilder.java
@@ -0,0 +1,667 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal;
+
+
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.wst.sse.ui.internal.extension.DropActionProxy;
+import org.eclipse.wst.sse.ui.internal.extension.RegistryReader;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * Builds drop target transfers, drag source transfers, and drop actions
+ */
+public class TransferBuilder extends RegistryReader {
+
+	public static final String ATT_CLASS = "class"; //$NON-NLS-1$
+	public static final String ATT_ID = "id"; //$NON-NLS-1$
+	public static final String ATT_METHOD = "method"; //$NON-NLS-1$
+	public static final String ATT_PRIORITY = "priority"; //$NON-NLS-1$
+	public static final String ATT_SINGLETON = "singleton"; //$NON-NLS-1$
+	public static final String ATT_TARGET_ID = "targetID"; //$NON-NLS-1$
+	public static final String ATT_TRANSFER_ID = "transferID"; //$NON-NLS-1$
+
+	private final static boolean debugTime = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/transferbuilder/time")); //$NON-NLS-1$  //$NON-NLS-2$
+
+	public static final String PL_DRAG_SOURCE_TRANSFERS = "dragSourceTransfers"; //$NON-NLS-1$
+	public static final String PL_DROP_TARGET_TRANSFERS = "dropTargetTransfers"; //$NON-NLS-1$
+
+	public static final String PLUGIN_ID = "org.eclipse.wst.sse.ui"; //$NON-NLS-1$
+
+	public static final String[] PRIORITIES = {"highest", "high", "mid", "low", "lowest"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+
+	public static final String TAG_DRAG_SOURCE_CONTRIBUTION = "dragSourceContribution"; //$NON-NLS-1$
+	public static final String TAG_DROP_ACTION = "dropAction"; //$NON-NLS-1$
+	public static final String TAG_DROP_TARGET_CONTRIBUTION = "dropTargetContribution"; //$NON-NLS-1$
+
+	public static final String TAG_TRANSFER = "transfer"; //$NON-NLS-1$
+
+	public static final String TRUE = "true"; //$NON-NLS-1$
+
+	private boolean useProxy;
+
+	class TransferProxyForDelayLoading extends Transfer {
+	    private IConfigurationElement element;
+	    private String classAttribute;
+	    private Transfer proxy;
+        private Method getTypeIdsMethod, getTypeNamesMethod, javaToNativeMethod, nativeToJavaMethod;
+
+	    TransferProxyForDelayLoading() {
+	        super();
+	    }
+
+	    TransferProxyForDelayLoading(IConfigurationElement elm, String clsAttr) {
+	        super();
+	        this.element = elm;
+	        this.classAttribute = clsAttr;
+	    }
+	    
+	    private Transfer newInstance() {
+	        if ((element != null) && (classAttribute != null)) {
+		        Object o = createExtension(element, classAttribute);
+		        if (o instanceof Transfer) {
+		            element = null;
+		            classAttribute = null;
+		            return (Transfer)o;
+		        }
+	        }
+	        return null;
+	    }
+
+	    public TransferData[] getSupportedTypes() {
+	        if (proxy == null) {
+	            proxy = newInstance();
+	        }
+	        if (proxy != null) {
+	            return proxy.getSupportedTypes();
+	        }
+	        return new TransferData[0];
+        }
+        protected int[] getTypeIds() {
+	        if (proxy == null) {
+	            proxy = newInstance();
+	        }
+	        if (proxy != null) {
+                if (getTypeIdsMethod == null) {
+    	            Class runtimeClass = proxy.getClass();
+                    NoSuchMethodException e = null;
+                    while (runtimeClass != null) {
+        	            try {
+        	                getTypeIdsMethod = runtimeClass.getDeclaredMethod("getTypeIds", new Class[0]);//$NON-NLS-1$
+                            getTypeIdsMethod.setAccessible(true);
+                            break;
+        	            } catch (NoSuchMethodException e1) {
+                            e = e1;
+                            runtimeClass = runtimeClass.getSuperclass();
+        	            } catch (SecurityException e2) {
+                            runtimeClass = runtimeClass.getSuperclass();
+        	            }
+                    }
+                    if ((getTypeIdsMethod == null) && (e != null)) {
+                        Logger.logException(e);
+                    }
+                }
+                if (getTypeIdsMethod != null) {
+                    try {
+                         // changed Integer[] return type to int[]
+                        int[] r = (int[])getTypeIdsMethod.invoke(proxy, new Object[0]);
+                        if ((r != null) && (r.length > 0)) {
+                            int[] ret = new int[r.length];
+                            for(int i = 0; i < r.length; i++) {
+                                ret[i] = r[i];
+                            }
+                            return ret;
+                        }
+                    } catch (IllegalAccessException e2) {
+                        Logger.logException(e2);
+                    } catch (InvocationTargetException e3) {
+                        Logger.logException(e3);
+                    }
+                }
+	        }
+            return new int[0];
+        }
+        protected String[] getTypeNames() {
+	        if (proxy == null) {
+	            proxy = newInstance();
+	        }
+	        if (proxy != null) {
+                if (getTypeNamesMethod == null) {
+    	            Class runtimeClass = proxy.getClass();
+                    NoSuchMethodException e = null;
+                    while (runtimeClass != null) {
+        	            try {
+        	                getTypeNamesMethod = runtimeClass.getDeclaredMethod("getTypeNames", new Class[0]);//$NON-NLS-1$
+                            getTypeNamesMethod.setAccessible(true);
+                            break;
+        	            } catch (NoSuchMethodException e1) {
+                            e = e1;
+                            runtimeClass = runtimeClass.getSuperclass();
+        	            } catch (SecurityException e2) {
+                            runtimeClass = runtimeClass.getSuperclass();
+        	            }
+                    }
+                    if ((getTypeNamesMethod == null) && (e != null)) {
+                        Logger.logException(e);
+                    }
+                }
+                if (getTypeNamesMethod != null) {
+                    try {
+                        return (String[])getTypeNamesMethod.invoke(proxy, new Object[0]);
+                    } catch (IllegalAccessException e2) {
+                        Logger.logException(e2);
+                    } catch (InvocationTargetException e3) {
+                        Logger.logException(e3);
+                    }
+                }
+	        }
+            return new String[0];
+        }
+        public boolean isSupportedType(TransferData transferData) {
+	        if (proxy == null) {
+	            proxy = newInstance();
+	        }
+	        if (proxy != null) {
+	            return proxy.isSupportedType(transferData);
+	        }
+            return false;
+        }
+        protected void javaToNative(Object object, TransferData transferData) {
+	        if (proxy == null) {
+	            proxy = newInstance();
+	        }
+	        if (proxy != null) {
+                if (javaToNativeMethod == null) {
+                    Class runtimeClass = proxy.getClass();
+                    NoSuchMethodException e = null;
+                    while (runtimeClass != null) {
+        	            try {
+        	                javaToNativeMethod = runtimeClass.getDeclaredMethod("javaToNative", new Class[]{object.getClass(), transferData.getClass()});//$NON-NLS-1$
+        	                javaToNativeMethod.setAccessible(true);
+                            break;
+        	            } catch (NoSuchMethodException e1) {
+                            e = e1;
+                            runtimeClass = runtimeClass.getSuperclass();
+        	            } catch (SecurityException e2) {
+                            runtimeClass = runtimeClass.getSuperclass();
+        	            }
+                    }
+                    if ((javaToNativeMethod == null) && (e != null)) {
+                        Logger.logException(e);
+                    }
+                }
+                if (javaToNativeMethod != null) {
+                    try {
+                        javaToNativeMethod.invoke(proxy, new Object[]{object, transferData});
+                    } catch (IllegalAccessException e2) {
+                        Logger.logException(e2);
+                    } catch (InvocationTargetException e3) {
+                        Logger.logException(e3);
+                    }
+                }
+	        }
+        }
+        protected Object nativeToJava(TransferData transferData) {
+	        if (proxy == null) {
+	            proxy = newInstance();
+	        }
+	        if (proxy != null) {
+                if (nativeToJavaMethod == null) {
+                    Class runtimeClass = proxy.getClass();
+                    NoSuchMethodException e = null;
+                    while (runtimeClass != null) {
+                        try {
+                            nativeToJavaMethod = runtimeClass.getDeclaredMethod("nativeToJava", new Class[]{transferData.getClass()});//$NON-NLS-1$
+                            nativeToJavaMethod.setAccessible(true);
+                            break;
+                        } catch (NoSuchMethodException e1) {
+                            e = e1;
+                            runtimeClass = runtimeClass.getSuperclass();
+        	            } catch (SecurityException e2) {
+                            runtimeClass = runtimeClass.getSuperclass();
+        	            }
+                    }
+                    if ((nativeToJavaMethod == null) && (e != null)) {
+                        Logger.logException(e);
+                    }
+                }
+                if (nativeToJavaMethod != null) {
+                    try {
+    	                return nativeToJavaMethod.invoke(proxy, new Object[]{transferData});
+    	            } catch (IllegalAccessException e2) {
+                   		Logger.logException(e2);
+    	            } catch (InvocationTargetException e3) {
+                   		Logger.logException(e3);
+    	            }
+                }
+	        }
+            return new Object();
+        }
+        Transfer getTransferClass() {
+	        if (proxy == null) {
+	            proxy = newInstance();
+	        }
+	        return proxy;
+        }
+        
+        public String toString() {
+        	String clazz = element.getAttribute(classAttribute);
+        	return clazz != null ? clazz : super.toString();
+        }
+	}
+	/**
+	 * @param element
+	 * @param classAttribute
+	 * @return Object
+	 * @throws CoreException
+	 */
+	static Object createExecutableExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
+
+		Object obj = null;
+
+		String singleton = element.getAttribute(ATT_SINGLETON);
+		String method = element.getAttribute(ATT_METHOD);
+		if (TRUE.equalsIgnoreCase(singleton) && method != null) {
+			try {
+				String name = element.getAttribute(ATT_CLASS);
+				String pluginId = element.getDeclaringExtension().getNamespace();
+				Class cls = Platform.getBundle(pluginId).loadClass(name);
+				Method mtd = cls.getMethod(method, new Class[]{});
+
+				obj = mtd.invoke(null, null);
+			} catch (ClassNotFoundException e) {
+				obj = null;
+			} catch (NoSuchMethodException e) {
+				obj = null;
+			} catch (IllegalAccessException e) {
+				obj = null;
+			} catch (InvocationTargetException e) {
+				obj = null;
+			}
+		} else {
+			obj = element.createExecutableExtension(classAttribute);
+		}
+
+		return obj;
+	}
+
+	/**
+	 * Creates an extension. If the extension plugin has not been loaded a
+	 * busy cursor will be activated during the duration of the load.
+	 * 
+	 * @param element
+	 * @param classAttribute
+	 * @return Object
+	 * @throws CoreException
+	 */
+	public static Object createExtension(final IConfigurationElement element, final String classAttribute) {
+		// If plugin has been loaded create extension.
+		// Otherwise, show busy cursor then create extension.
+		final Object[] result = new Object[1];
+		String pluginId = element.getDeclaringExtension().getNamespace();
+		Bundle bundle = Platform.getBundle(pluginId);
+		if (bundle.getState() == Bundle.ACTIVE) {
+			try {
+				return createExecutableExtension(element, classAttribute);
+			} catch (CoreException e) {
+				handleCreateExecutableException(result, e);
+			}
+		} else {
+			BusyIndicator.showWhile(null, new Runnable() {
+				public void run() {
+					try {
+						result[0] = createExecutableExtension(element, classAttribute);
+					} catch (Exception e) {
+						handleCreateExecutableException(result, e);
+					}
+				}
+			});
+		}
+		return result[0];
+	}
+
+	/**
+	 * @param result
+	 * @param e
+	 */
+	protected static void handleCreateExecutableException(Object[] result, Throwable e) {
+		Logger.logException(e);
+		result[0] = null;
+
+	}
+
+	protected List cache;
+	protected String targetContributionTag;
+
+	protected List targetIDs;
+
+	/**
+	 * @param element
+	 * @return IDropAction
+	 */
+	protected IDropAction createDropAction(IConfigurationElement element) {
+		Object obj = null;
+		obj = createExtension(element, ATT_CLASS);
+		if (obj == null)
+			return null;
+		return (obj instanceof IDropAction) ? (IDropAction) DropActionProxy.newInstance(obj) : null;
+	}
+
+	/**
+	 * @param transferId
+	 * @return IDropAction[]
+	 */
+	protected IDropAction[] createDropActions(String transferId) {
+		if (cache == null)
+			return new IDropAction[0];
+
+		final int num = cache.size();
+		if (num == 0)
+			return new IDropAction[0];
+
+		IDropAction[] as = new IDropAction[num];
+		int j = 0;
+		for (int p = 0; p < PRIORITIES.length; p++) {
+			for (int i = 0; i < num; i++) {
+				Object obj = cache.get(i);
+				if (!(obj instanceof IConfigurationElement))
+					continue;
+
+				IConfigurationElement element = (IConfigurationElement) obj;
+				if (!(TAG_DROP_ACTION.equals(element.getName())) || !(transferId.equals(element.getAttribute(ATT_TRANSFER_ID))))
+					continue;
+
+				if (PRIORITIES[p].equals(element.getAttribute(ATT_PRIORITY)) || (p == 2 && element.getAttribute(ATT_PRIORITY) == null)) {
+					IDropAction a = createDropAction(element);
+					if (a != null) {
+						as[j] = a;
+						j++;
+					}
+				}
+			}
+		}
+
+		if (num == j)
+			return as;
+
+		IDropAction[] as2 = new IDropAction[j];
+		for (int i = 0; i < j; i++) {
+			as2[i] = as[i];
+		}
+
+		return as2;
+	}
+
+	/**
+	 * @param element
+	 * @return Transfer
+	 */
+	protected Transfer createTransfer(IConfigurationElement element) {
+	    Object obj = null;
+	    if (useProxy) {
+	        obj = new TransferProxyForDelayLoading(element, ATT_CLASS);
+	    } else {
+	        obj = createExtension(element, ATT_CLASS);
+	    }
+		if (obj == null)
+			return null;
+		return (obj instanceof Transfer) ? (Transfer) obj : null;
+	}
+
+	/**
+	 * @return Transfer[]
+	 */
+	protected Transfer[] createTransfers() {
+		if (cache == null)
+			return new Transfer[0];
+
+		final int num = cache.size();
+		if (num == 0)
+			return new Transfer[0];
+
+		Transfer[] ts = new Transfer[num];
+		int j = 0;
+		for (int p = 0; p < PRIORITIES.length; p++) {
+			for (int i = 0; i < num; i++) {
+				Object obj = cache.get(i);
+				if (!(obj instanceof IConfigurationElement))
+					continue;
+
+				IConfigurationElement element = (IConfigurationElement) obj;
+				if (!TAG_TRANSFER.equals(element.getName()))
+					continue;
+
+				if (PRIORITIES[p].equals(element.getAttribute(ATT_PRIORITY)) || (p == 2 && element.getAttribute(ATT_PRIORITY) == null)) {
+					Transfer t = createTransfer(element);
+					if (t != null) {
+						ts[j] = t;
+						j++;
+					}
+				}
+			}
+		}
+
+		if (num == j)
+			return ts;
+
+		Transfer[] ts2 = new Transfer[j];
+		for (int i = 0; i < j; i++) {
+			ts2[i] = ts[i];
+		}
+
+		return ts2;
+	}
+
+	/**
+	 * @param editorId
+	 * @return Transfer[]
+	 */
+	public Transfer[] getDragSourceTransfers(String editorId) {
+		return getDragSourceTransfers(new String[]{editorId});
+	}
+
+	/**
+	 * @param editorIds
+	 * @return Transfer[]
+	 */
+	public Transfer[] getDragSourceTransfers(String[] editorIds) {
+		long time0 = System.currentTimeMillis();
+		readContributions(editorIds, TAG_DRAG_SOURCE_CONTRIBUTION, PL_DRAG_SOURCE_TRANSFERS);
+		Transfer[] transfers = createTransfers();
+		if (debugTime)
+			System.out.println(getClass().getName() + "#getDragSourceTransfers(" + editorIds + "): " + transfers.length + " transfers created in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		return transfers;
+	}
+
+	/**
+	 * @deprecated use getDropActions(String editorId, Transfer transfer) for the performance
+	 * @param editorId
+	 * @param className
+	 * @return IDropAction[]
+	 */
+	public IDropAction[] getDropActions(String editorId, String transferClassName) {
+		return getDropActions(new String[]{editorId}, transferClassName);
+	}
+	
+	/**
+	 * @param editorId
+	 * @param class
+	 * @return IDropAction[]
+	 */
+	public IDropAction[] getDropActions(String editorId, Transfer transfer) {
+		return getDropActions(new String[]{editorId}, transfer);
+	}
+	/**
+	 * @deprecated use getDropActions(String[] editorIds, Transfer transfer) for the performance
+	 * @param editorId
+	 * @param className
+	 * @return IDropAction[]
+	 */
+	public IDropAction[] getDropActions(String[] editorIds, String transferClassName) {
+		long time0 = System.currentTimeMillis();
+		readContributions(editorIds, TAG_DROP_TARGET_CONTRIBUTION, PL_DROP_TARGET_TRANSFERS);
+		String transferId = getTransferIdOfClassName(transferClassName);
+		IDropAction[] actions = createDropActions(transferId);
+		if (debugTime)
+			System.out.println(getClass().getName() + "#getDropActions(" + editorIds + "): " + actions.length + " drop actions created in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		return actions;
+	}
+
+	/**
+	 * @param editorId
+	 * @param class
+	 * @return IDropAction[]
+	 */
+	public IDropAction[] getDropActions(String[] editorIds, Transfer transfer) {
+	    String transferClassName;
+	    if (transfer instanceof TransferProxyForDelayLoading) {
+	        transferClassName = ((TransferProxyForDelayLoading)transfer).getTransferClass().getClass().getName();
+	    } else {
+	        transferClassName = transfer.getClass().getName();
+	    }
+	    return getDropActions(editorIds, transferClassName);
+	}
+	/**
+	 * @param editorId
+	 * @return Transfer[]
+	 */
+	public Transfer[] getDropTargetTransfers(String editorId) {
+		return getDropTargetTransfers(new String[]{editorId});
+	}
+
+	/**
+	 * @param editorIds
+	 * @return Transfer[]
+	 */
+	public Transfer[] getDropTargetTransfers(String[] editorIds) {
+		long time0 = System.currentTimeMillis();
+		readContributions(editorIds, TAG_DROP_TARGET_CONTRIBUTION, PL_DROP_TARGET_TRANSFERS);
+		Transfer[] transfers = createTransfers();
+		if (debugTime) {
+			String idlist = ""; //$NON-NLS-1$
+			if (editorIds.length > 0) {
+				for (int i = 0; i < editorIds.length; i++) {
+					idlist += editorIds[i];
+					if (i < editorIds.length - 1)
+						idlist += ","; //$NON-NLS-1$
+				}
+			}
+			System.out.println(getClass().getName() + "#getDropTargetTransfers(" + idlist + "): " + transfers.length + " transfers created in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		}
+		return transfers;
+	}
+
+	/**
+	 * Returns the name of the part ID attribute that is expected in the
+	 * target extension.
+	 * 
+	 * @param element
+	 * @return String
+	 */
+	protected String getTargetID(IConfigurationElement element) {
+		String value = element.getAttribute(ATT_TARGET_ID);
+		return value != null ? value : "???"; //$NON-NLS-1$
+	}
+
+	/**
+	 * @param className
+	 * @return String
+	 */
+	private String getTransferIdOfClassName(String className) {
+		String id = ""; //$NON-NLS-1$
+		final int num = cache.size();
+		if (className == null || cache == null || num == 0)
+			return id;
+
+		for (int i = 0; i < num; i++) {
+			Object obj = cache.get(i);
+			if (obj instanceof IConfigurationElement) {
+				IConfigurationElement element = (IConfigurationElement) obj;
+				if (className.equals(element.getAttribute(ATT_CLASS))) {
+					id = element.getAttribute(ATT_ID);
+					break;
+				}
+			}
+		}
+
+		return (id.length() != 0 ? id : className);
+	}
+
+	/**
+	 * Reads the contributions from the registry for the provided workbench
+	 * part and the provided extension point ID.
+	 * 
+	 * @param id
+	 * @param tag
+	 * @param extensionPoint
+	 */
+	protected void readContributions(String[] ids, String tag, String extensionPoint) {
+		cache = null;
+		targetIDs = Arrays.asList(ids);
+		targetContributionTag = tag;
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		readRegistry(registry, PLUGIN_ID, extensionPoint);
+	}
+
+	protected boolean readElement(IConfigurationElement element) {
+		String tag = element.getName();
+		if (tag.equals(targetContributionTag)) {
+			String id = getTargetID(element);
+			if (id == null || !targetIDs.contains(id)) {
+				// This is not of interest to us - don't go deeper
+				return true;
+			}
+		} else if (tag.equals(TAG_TRANSFER)) {
+			if (cache == null)
+				cache = new ArrayList();
+			cache.add(element);
+			return true; // just cache the element - don't go into it
+		} else if (tag.equals(TAG_DROP_ACTION)) {
+			if (cache == null)
+				cache = new ArrayList();
+			//cache.add(createActionDescriptor(element));
+			cache.add(element);
+			return true; // just cache the action - don't go into
+		} else {
+			return false;
+		}
+
+		readElementChildren(element);
+		return true;
+	}
+	/**
+	 * @deprecated - use TransferBuilder(boolean useProxy) for the performance
+	 */
+	public TransferBuilder() {
+        this(false);
+    }
+
+    public TransferBuilder(boolean useProxy) {
+        super();
+        this.useProxy = useProxy;
+    }
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/UnknownContentTypeDialog.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/UnknownContentTypeDialog.java
new file mode 100644
index 0000000..9bd2f89
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/UnknownContentTypeDialog.java
@@ -0,0 +1,67 @@
+package org.eclipse.wst.sse.ui.internal;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+/**
+ * Message dialog informing user that an editor was open on unsupported
+ * content type
+ */
+public class UnknownContentTypeDialog extends MessageDialogWithToggle {
+
+	public UnknownContentTypeDialog(Shell parent, IPreferenceStore store, String key) {
+		// set message to null in super so that message does not appear twice
+		super(parent, SSEUIMessages.UnknownContentTypeDialog_0, null, null, INFORMATION, new String[]{IDialogConstants.OK_LABEL}, 0, SSEUIMessages.UnknownContentTypeDialog_1, false);
+		setPrefStore(store);
+		setPrefKey(key);
+	}
+
+	protected void buttonPressed(int buttonId) {
+		super.buttonPressed(buttonId);
+
+		// overwritten so that value stored is boolean, not string
+		if (buttonId != IDialogConstants.CANCEL_ID && getToggleState() && getPrefStore() != null && getPrefKey() != null) {
+			switch (buttonId) {
+				case IDialogConstants.YES_ID :
+				case IDialogConstants.YES_TO_ALL_ID :
+				case IDialogConstants.PROCEED_ID :
+				case IDialogConstants.OK_ID :
+					getPrefStore().setValue(getPrefKey(), false);
+					break;
+				case IDialogConstants.NO_ID :
+				case IDialogConstants.NO_TO_ALL_ID :
+					getPrefStore().setValue(getPrefKey(), true);
+					break;
+			}
+		}
+
+	}
+
+	protected Control createMessageArea(Composite composite) {
+		super.createMessageArea(composite);
+		Link messageLink = new Link(composite, SWT.NONE);
+		messageLink.setText(SSEUIMessages.UnknownContentTypeDialog_2);
+		messageLink.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				linkClicked();
+			}
+		});
+		return composite;
+	}
+
+	private void linkClicked() {
+		String pageId = "org.eclipse.ui.preferencePages.ContentTypes"; //$NON-NLS-1$
+		PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), pageId, new String[]{pageId}, null);
+		dialog.open();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActionContributor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActionContributor.java
new file mode 100644
index 0000000..5002931
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActionContributor.java
@@ -0,0 +1,400 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     David Carver/STAR - [212330] can't contribute to the XML or any SSE based menu
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.actions;
+
+//import java.util.ResourceBundle;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.GroupMarker;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.search.ui.IContextMenuConstants;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.editors.text.TextEditorActionContributor;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+import org.eclipse.ui.texteditor.ITextEditorExtension;
+import org.eclipse.ui.texteditor.RetargetTextEditorAction;
+import org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder;
+import org.eclipse.wst.sse.ui.internal.GotoAnnotationAction;
+import org.eclipse.wst.sse.ui.internal.IExtendedContributor;
+import org.eclipse.wst.sse.ui.internal.ISourceViewerActionBarContributor;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.ui.OffsetStatusLineContributionItem;
+
+/**
+ * This class should not be used inside multi page editor's
+ * ActionBarContributor, since cascaded init() call from the
+ * ActionBarContributor will causes exception and it leads to lose whole
+ * toolbars.
+ * 
+ * Instead, use SourcePageActionContributor for source page contributor of
+ * multi page editor.
+ * 
+ * Note that this class is still valid for single page editor
+ */
+public class ActionContributor extends TextEditorActionContributor implements ISourceViewerActionBarContributor, IExtendedContributor {
+
+	public static final boolean _showDebugStatus = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/actioncontributor/debugstatusfields")) || Platform.inDebugMode() || Platform.inDevelopmentMode(); //$NON-NLS-1$ //$NON-NLS-2$
+
+	private static final String[] EDITOR_IDS = {"org.eclipse.wst.sse.ui.StructuredTextEditor"}; //$NON-NLS-1$
+
+	protected IExtendedContributor extendedContributor;
+	protected RetargetTextEditorAction fAddBlockComment = null;
+
+	protected Separator fCommandsSeparator = null;
+
+	private OffsetStatusLineContributionItem fDebugStatusOffset = null;
+	protected MenuManager fExpandSelectionToMenu = null;
+	protected GroupMarker fMenuAdditionsGroupMarker = null;
+	protected GotoAnnotationAction fNextAnnotation = null;
+
+	protected GotoAnnotationAction fPreviousAnnotation = null;
+	protected RetargetTextEditorAction fRemoveBlockComment = null;
+	protected RetargetTextEditorAction fShiftLeft = null;
+	protected RetargetTextEditorAction fShiftRight = null;
+	protected RetargetTextEditorAction fStructureSelectEnclosingAction = null;
+	protected RetargetTextEditorAction fStructureSelectHistoryAction = null;
+	protected RetargetTextEditorAction fStructureSelectNextAction = null;
+	protected RetargetTextEditorAction fStructureSelectPreviousAction = null;
+
+	protected RetargetTextEditorAction fToggleComment = null;
+	protected RetargetTextEditorAction fToggleInsertModeAction;
+	protected GroupMarker fToolbarAdditionsGroupMarker = null;
+	protected Separator fToolbarSeparator = null;
+	
+	protected RetargetTextEditorAction fGotoMatchingBracketAction = null;
+
+	public ActionContributor() {
+		super();
+
+		ResourceBundle resourceBundle = SSEUIMessages.getResourceBundle();
+
+		fCommandsSeparator = new Separator();
+
+		// edit commands
+		fStructureSelectEnclosingAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_ENCLOSING + StructuredTextEditorActionConstants.UNDERSCORE);
+		fStructureSelectEnclosingAction.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_ENCLOSING);
+
+		fStructureSelectNextAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_NEXT + StructuredTextEditorActionConstants.UNDERSCORE);
+		fStructureSelectNextAction.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_NEXT);
+
+		fStructureSelectPreviousAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_PREVIOUS + StructuredTextEditorActionConstants.UNDERSCORE);
+		fStructureSelectPreviousAction.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_PREVIOUS);
+
+		fStructureSelectHistoryAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_HISTORY + StructuredTextEditorActionConstants.UNDERSCORE);
+		fStructureSelectHistoryAction.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_HISTORY);
+
+		fExpandSelectionToMenu = new MenuManager(SSEUIMessages.ExpandSelectionToMenu_label); //$NON-NLS-1$
+		fExpandSelectionToMenu.add(fStructureSelectEnclosingAction);
+		fExpandSelectionToMenu.add(fStructureSelectNextAction);
+		fExpandSelectionToMenu.add(fStructureSelectPreviousAction);
+		fExpandSelectionToMenu.add(fStructureSelectHistoryAction);
+
+		// source commands
+		fShiftRight = new RetargetTextEditorAction(resourceBundle, ITextEditorActionConstants.SHIFT_RIGHT + StructuredTextEditorActionConstants.UNDERSCORE);
+		fShiftRight.setActionDefinitionId(ITextEditorActionDefinitionIds.SHIFT_RIGHT);
+
+		fShiftLeft = new RetargetTextEditorAction(resourceBundle, ITextEditorActionConstants.SHIFT_LEFT + StructuredTextEditorActionConstants.UNDERSCORE);
+		fShiftLeft.setActionDefinitionId(ITextEditorActionDefinitionIds.SHIFT_LEFT);
+
+		fToggleComment = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_TOGGLE_COMMENT + StructuredTextEditorActionConstants.UNDERSCORE);
+		fToggleComment.setActionDefinitionId(ActionDefinitionIds.TOGGLE_COMMENT);
+
+		fAddBlockComment = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT + StructuredTextEditorActionConstants.UNDERSCORE);
+		fAddBlockComment.setActionDefinitionId(ActionDefinitionIds.ADD_BLOCK_COMMENT);
+
+		fRemoveBlockComment = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT + StructuredTextEditorActionConstants.UNDERSCORE);
+		fRemoveBlockComment.setActionDefinitionId(ActionDefinitionIds.REMOVE_BLOCK_COMMENT);
+
+		// goto prev/next error
+		// CMVC 249017 for JavaEditor consistancy
+		fPreviousAnnotation = new GotoAnnotationAction("Previous_annotation", false); //$NON-NLS-1$
+		fPreviousAnnotation.setActionDefinitionId("org.eclipse.ui.navigate.previous"); //$NON-NLS-1$
+
+		fNextAnnotation = new GotoAnnotationAction("Next_annotation", true); //$NON-NLS-1$
+		fNextAnnotation.setActionDefinitionId("org.eclipse.ui.navigate.next"); //$NON-NLS-1$
+
+		fGotoMatchingBracketAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_GOTO_MATCHING_BRACKET + StructuredTextEditorActionConstants.UNDERSCORE);
+		fGotoMatchingBracketAction.setActionDefinitionId(ActionDefinitionIds.GOTO_MATCHING_BRACKET);
+
+		// Read action extensions.
+		ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder();
+		extendedContributor = builder.readActionExtensions(getExtensionIDs());
+
+		fMenuAdditionsGroupMarker = new GroupMarker(StructuredTextEditorActionConstants.GROUP_NAME_MENU_ADDITIONS);
+		fToolbarSeparator = new Separator();
+		fToolbarAdditionsGroupMarker = new GroupMarker(StructuredTextEditorActionConstants.GROUP_NAME_TOOLBAR_ADDITIONS);
+
+		fToggleInsertModeAction = new RetargetTextEditorAction(resourceBundle, "Editor.ToggleInsertMode.", IAction.AS_CHECK_BOX); //$NON-NLS-1$
+		fToggleInsertModeAction.setActionDefinitionId(ITextEditorActionDefinitionIds.TOGGLE_INSERT_MODE);
+
+		if (_showDebugStatus) {
+			fDebugStatusOffset = new OffsetStatusLineContributionItem(StructuredTextEditorActionConstants.STATUS_CATEGORY_OFFSET, true, 20);
+		}
+	}
+
+	protected void addToMenu(IMenuManager menu) {
+		// edit commands
+/*		IMenuManager editMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
+		if (editMenu != null) {
+			editMenu.add(fCommandsSeparator);
+			editMenu.add(fToggleInsertModeAction);
+			editMenu.add(fCommandsSeparator);
+			editMenu.add(fExpandSelectionToMenu);
+			editMenu.add(fCommandsSeparator);
+			editMenu.add(fMenuAdditionsGroupMarker);
+		}
+
+		// source commands
+		String sourceMenuLabel = SSEUIMessages.SourceMenu_label; //$NON-NLS-1$
+		String sourceMenuId = "sourceMenuId"; // This is just a menu id. No //$NON-NLS-1$
+		// need to translate.
+		// //$NON-NLS-1$
+		IMenuManager sourceMenu = new MenuManager(sourceMenuLabel, sourceMenuId);
+		menu.insertAfter(IWorkbenchActionConstants.M_EDIT, sourceMenu);
+		if (sourceMenu != null) {
+			sourceMenu.add(fCommandsSeparator);
+			sourceMenu.add(fToggleComment);
+			sourceMenu.add(fAddBlockComment);
+			sourceMenu.add(fRemoveBlockComment);
+			sourceMenu.add(fShiftRight);
+			sourceMenu.add(fShiftLeft);
+		}
+		
+		IMenuManager gotoMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.GO_TO);
+		if (gotoMenu != null) {
+			gotoMenu.add(fGotoMatchingBracketAction);
+		}
+*/
+	}
+
+	protected void addToPopupMenu(IMenuManager menu) {
+		// add nothing
+	}
+
+	protected void addToStatusLine(IStatusLineManager manager) {
+		if (_showDebugStatus) {
+			manager.add(fDebugStatusOffset);
+		}
+	}
+
+	protected void addToToolBar(IToolBarManager toolBarManager) {
+/*		toolBarManager.add(fToolbarSeparator);
+		toolBarManager.add(fToolbarAdditionsGroupMarker);
+*/	}
+
+	/**
+	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToMenu(IMenuManager)
+	 */
+	public void contributeToMenu(IMenuManager menu) {
+		super.contributeToMenu(menu);
+
+		IMenuManager editMenu= menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
+		if (editMenu != null) {
+			editMenu.appendToGroup(IContextMenuConstants.GROUP_ADDITIONS, fToggleInsertModeAction);
+		}
+/*
+		addToMenu(menu);
+*/
+		if (extendedContributor != null) {
+			extendedContributor.contributeToMenu(menu);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.extension.IPopupMenuContributor#contributeToPopupMenu(org.eclipse.jface.action.IMenuManager)
+	 */
+	public void contributeToPopupMenu(IMenuManager menu) {
+/*
+		addToPopupMenu(menu);
+*/
+		if (extendedContributor != null) {
+			extendedContributor.contributeToPopupMenu(menu);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToStatusLine(org.eclipse.jface.action.IStatusLineManager)
+	 */
+	public void contributeToStatusLine(IStatusLineManager manager) {
+		super.contributeToStatusLine(manager);
+
+		addToStatusLine(manager);
+
+		if (extendedContributor != null) {
+			extendedContributor.contributeToStatusLine(manager);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToToolBar(IToolBarManager)
+	 */
+	public void contributeToToolBar(IToolBarManager toolBarManager) {
+		super.contributeToToolBar(toolBarManager);
+
+/*		addToToolBar(toolBarManager);
+*/
+		if (extendedContributor != null) {
+			extendedContributor.contributeToToolBar(toolBarManager);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.ui.part.EditorActionBarContributor#dispose()
+	 */
+	public void dispose() {
+		// need to call setActiveEditor before super.dispose because in both
+		// setActiveEditor & super.setActiveEditor if getEditorPart ==
+		// activeEditor,
+		// the method is just returned. so to get both methods to run,
+		// setActiveEditor
+		// needs to be called so that it correctly calls super.setActiveEditor
+		setActiveEditor(null);
+
+		super.dispose();
+
+		if (extendedContributor != null)
+			extendedContributor.dispose();
+	}
+
+	protected String[] getExtensionIDs() {
+		return EDITOR_IDS;
+	}
+
+	/**
+	 * @param editor
+	 * @return
+	 */
+	protected ITextEditor getTextEditor(IEditorPart editor) {
+		ITextEditor textEditor = null;
+		if (editor instanceof ITextEditor)
+			textEditor = (ITextEditor) editor;
+		if (textEditor == null && editor != null)
+			textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
+		return textEditor;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IEditorActionBarContributor#init(org.eclipse.ui.IActionBars,
+	 *      org.eclipse.ui.IWorkbenchPage)
+	 */
+	public void init(IActionBars bars, IWorkbenchPage page) {
+		super.init(bars, page);
+	}
+
+	/**
+	 * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(IEditorPart)
+	 */
+	public void setActiveEditor(IEditorPart activeEditor) {
+		if (getActiveEditorPart() == activeEditor)
+			return;
+		super.setActiveEditor(activeEditor);
+
+		ITextEditor textEditor = getTextEditor(activeEditor);
+
+/*		IActionBars actionBars = getActionBars();
+		if (actionBars != null) {
+			actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, fNextAnnotation);
+			actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, fPreviousAnnotation);
+			actionBars.setGlobalActionHandler(ActionFactory.PREVIOUS.getId(), fPreviousAnnotation);
+			actionBars.setGlobalActionHandler(ActionFactory.NEXT.getId(), fNextAnnotation);
+
+			if (textEditor != null) {
+				actionBars.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(), getAction(textEditor, IDEActionFactory.ADD_TASK.getId()));
+				actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(textEditor, IDEActionFactory.BOOKMARK.getId()));
+			}
+		}
+
+		fStructureSelectEnclosingAction.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_ENCLOSING));
+		fStructureSelectNextAction.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_NEXT));
+		fStructureSelectPreviousAction.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_PREVIOUS));
+		fStructureSelectHistoryAction.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_HISTORY));
+
+		fShiftRight.setAction(getAction(textEditor, ITextEditorActionConstants.SHIFT_RIGHT));
+		fShiftLeft.setAction(getAction(textEditor, ITextEditorActionConstants.SHIFT_LEFT));
+
+		fToggleComment.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_TOGGLE_COMMENT));
+		fAddBlockComment.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT));
+		fRemoveBlockComment.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT));
+
+		// go to prev/next error
+		// CMVC 249017 for JavaEditor consistancy
+		fPreviousAnnotation.setEditor(textEditor);
+		fNextAnnotation.setEditor(textEditor);
+		fGotoMatchingBracketAction.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_GOTO_MATCHING_BRACKET));
+*/
+		fToggleInsertModeAction.setAction(getAction(textEditor, ITextEditorActionConstants.TOGGLE_INSERT_MODE));
+
+		if (extendedContributor != null) {
+			extendedContributor.setActiveEditor(activeEditor);
+		}
+
+		if (_showDebugStatus && textEditor instanceof ITextEditorExtension) {
+			((ITextEditorExtension) textEditor).setStatusField(fDebugStatusOffset, StructuredTextEditorActionConstants.STATUS_CATEGORY_OFFSET);
+			fDebugStatusOffset.setActiveEditor(textEditor);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.ISourceViewerActionBarContributor#setViewerSpecificContributionsEnabled(boolean)
+	 */
+	public void setViewerSpecificContributionsEnabled(boolean enabled) {
+		fToggleInsertModeAction.setEnabled(enabled);
+/*		fShiftRight.setEnabled(enabled);
+		fShiftLeft.setEnabled(enabled);
+		fNextAnnotation.setEnabled(enabled);
+		fPreviousAnnotation.setEnabled(enabled);
+*/
+		/*
+		 * fComment.setEnabled(enabled); fUncomment.setEnabled(enabled);
+		 */
+/*		
+		fToggleComment.setEnabled(enabled);
+		fAddBlockComment.setEnabled(enabled);
+		fRemoveBlockComment.setEnabled(enabled);
+*/		
+		// convert line delimiters are not source viewer-specific
+		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.extension.IExtendedContributor#updateToolbarActions()
+	 */
+	public void updateToolbarActions() {
+		if (extendedContributor != null) {
+			extendedContributor.updateToolbarActions();
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActionDefinitionIds.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActionDefinitionIds.java
new file mode 100644
index 0000000..ae26969
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActionDefinitionIds.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.actions;
+
+
+
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+
+/**
+ * Defines the definitions ids for editor actions.
+ */
+public interface ActionDefinitionIds {
+	// TODO: Can these be better defined with a "plugin prefix" to be more
+	// portable?
+	public final static String ADD_BLOCK_COMMENT = "org.eclipse.wst.sse.ui.add.block.comment";//$NON-NLS-1$
+
+	public final static String CLEANUP_DOCUMENT = "org.eclipse.wst.sse.ui.cleanup.document";//$NON-NLS-1$
+	public final static String COMMENT = "org.eclipse.wst.sse.ui.comment";//$NON-NLS-1$
+	public final static String EDIT_BREAKPOINTS = "org.eclipse.wst.sse.ui.breakpoints.edit";//$NON-NLS-1$
+	public final static String FIND_OCCURRENCES = "org.eclipse.wst.sse.ui.search.find.occurrences";//$NON-NLS-1$
+	public final static String FORMAT_ACTIVE_ELEMENTS = "org.eclipse.wst.sse.ui.format.active.elements";//$NON-NLS-1$
+	public final static String FORMAT_DOCUMENT = "org.eclipse.wst.sse.ui.format.document";//$NON-NLS-1$
+	public final static String MANAGE_BREAKPOINTS = "org.eclipse.wst.sse.ui.breakpoints.manage";//$NON-NLS-1$
+	public final static String OPEN_FILE = "org.eclipse.wst.sse.ui.open.file.from.source";//$NON-NLS-1$
+	public final static String REMOVE_BLOCK_COMMENT = "org.eclipse.wst.sse.ui.remove.block.comment";//$NON-NLS-1$
+	public final static String STRUCTURE_SELECT_ENCLOSING = "org.eclipse.wst.sse.ui.structure.select.enclosing";//$NON-NLS-1$
+	public final static String STRUCTURE_SELECT_HISTORY = "org.eclipse.wst.sse.ui.structure.select.last";//$NON-NLS-1$
+	public final static String STRUCTURE_SELECT_NEXT = "org.eclipse.wst.sse.ui.structure.select.next";//$NON-NLS-1$
+	public final static String STRUCTURE_SELECT_PREVIOUS = "org.eclipse.wst.sse.ui.structure.select.previous";//$NON-NLS-1$
+	public final static String TOGGLE_COMMENT = "org.eclipse.wst.sse.ui.toggle.comment";//$NON-NLS-1$
+	public final static String TOGGLE_BREAKPOINTS = "org.eclipse.wst.sse.ui.breakpoints.toggle";//$NON-NLS-1$
+	public final static String UNCOMMENT = "org.eclipse.wst.sse.ui.uncomment";//$NON-NLS-1$
+	public final static String SHOW_OUTLINE = "org.eclipse.wst.sse.ui.quick_outline";//$NON-NLS-1$
+
+	// registered command IDs, so we pick up the declared key bindings
+	public static final String GOTO_MATCHING_BRACKET= "org.eclipse.wst.sse.ui.goto.matching.bracket"; //$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActiveEditorActionHandler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActiveEditorActionHandler.java
new file mode 100644
index 0000000..54586eb
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActiveEditorActionHandler.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.swt.events.HelpListener;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchSite;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * @deprecated actions are not properly activated with this handler so do not
+ *             use
+ */
+public class ActiveEditorActionHandler implements IAction {
+
+	private String fActionId;
+	private IWorkbenchSite fSite;
+	private IAction fTargetAction;
+
+	public ActiveEditorActionHandler(IWorkbenchSite site, String id) {
+		super();
+		fActionId = id;
+		fSite = site;
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
+	 */
+	public void addPropertyChangeListener(IPropertyChangeListener listener) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getAccelerator()
+	 */
+	public int getAccelerator() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.getAccelerator() : 0);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getActionDefinitionId()
+	 */
+	public String getActionDefinitionId() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.getActionDefinitionId() : null);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getDescription()
+	 */
+	public String getDescription() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.getDescription() : null);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getDisabledImageDescriptor()
+	 */
+	public ImageDescriptor getDisabledImageDescriptor() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.getDisabledImageDescriptor() : null);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getHelpListener()
+	 */
+	public HelpListener getHelpListener() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.getHelpListener() : null);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getHoverImageDescriptor()
+	 */
+	public ImageDescriptor getHoverImageDescriptor() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.getHoverImageDescriptor() : null);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getId()
+	 */
+	public String getId() {
+		return getClass().getName() + hashCode();
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getImageDescriptor()
+	 */
+	public ImageDescriptor getImageDescriptor() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.getImageDescriptor() : null);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getMenuCreator()
+	 */
+	public IMenuCreator getMenuCreator() {
+		return null;
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getStyle()
+	 */
+	public int getStyle() {
+		return IAction.AS_PUSH_BUTTON;
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getText()
+	 */
+	public String getText() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.getText() : null);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#getToolTipText()
+	 */
+	public String getToolTipText() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.getToolTipText() : null);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#isChecked()
+	 */
+	public boolean isChecked() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.isChecked() : true);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#isEnabled()
+	 */
+	public boolean isEnabled() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.isEnabled() : false);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.IAction#isHandled()
+	 */
+	public boolean isHandled() {
+		updateTargetAction();
+		return (fTargetAction != null ? fTargetAction.isHandled() : false);
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
+	 */
+	public void removePropertyChangeListener(IPropertyChangeListener listener) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#run()
+	 */
+	public void run() {
+		updateTargetAction();
+		if (fTargetAction != null)
+			fTargetAction.run();
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#runWithEvent(org.eclipse.swt.widgets.Event)
+	 */
+	public void runWithEvent(Event event) {
+		updateTargetAction();
+		if (fTargetAction != null)
+			fTargetAction.runWithEvent(event);
+	}
+
+	/**
+	 * NOT SUPPORTED
+	 * 
+	 * @see org.eclipse.jface.action.IAction#setAccelerator(int)
+	 */
+	public void setAccelerator(int keycode) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setActionDefinitionId(java.lang.String)
+	 */
+	public void setActionDefinitionId(String id) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setChecked(boolean)
+	 */
+	public void setChecked(boolean checked) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setDescription(java.lang.String)
+	 */
+	public void setDescription(String text) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setDisabledImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)
+	 */
+	public void setDisabledImageDescriptor(ImageDescriptor newImage) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setEnabled(boolean)
+	 */
+	public void setEnabled(boolean enabled) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setHelpListener(org.eclipse.swt.events.HelpListener)
+	 */
+	public void setHelpListener(HelpListener listener) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setHoverImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)
+	 */
+	public void setHoverImageDescriptor(ImageDescriptor newImage) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setId(java.lang.String)
+	 */
+	public void setId(String id) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)
+	 */
+	public void setImageDescriptor(ImageDescriptor newImage) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setMenuCreator(org.eclipse.jface.action.IMenuCreator)
+	 */
+	public void setMenuCreator(IMenuCreator creator) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setText(java.lang.String)
+	 */
+	public void setText(String text) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#setToolTipText(java.lang.String)
+	 */
+	public void setToolTipText(String text) {
+	}
+
+	private void updateTargetAction() {
+		if (fSite != null && fSite.getWorkbenchWindow() != null && fSite.getWorkbenchWindow().getActivePage() != null) {
+			IEditorPart part = fSite.getWorkbenchWindow().getActivePage().getActiveEditor();
+			ITextEditor editor = null;
+			if (part instanceof ITextEditor)
+				editor = (ITextEditor) part;
+			else
+				editor = (ITextEditor) (part != null ? part.getAdapter(ITextEditor.class) : null);
+			if (editor != null) {
+				fTargetAction = editor.getAction(fActionId);
+			} else {
+				fTargetAction = null;
+			}
+		} else
+			fTargetAction = null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/CleanupAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/CleanupAction.java
new file mode 100644
index 0000000..804df2c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/CleanupAction.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.actions;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.TextEditorAction;
+import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupProcessor;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+
+public abstract class CleanupAction extends TextEditorAction {
+	protected Dialog fCleanupDialog;
+
+	public CleanupAction(ResourceBundle bundle, String prefix, ITextEditor editor) {
+		super(bundle, prefix, editor);
+	}
+
+	protected abstract Dialog getCleanupDialog(Shell shell);
+
+	protected abstract IStructuredCleanupProcessor getCleanupProcessor();
+
+	public void run() {
+		if (getTextEditor() instanceof StructuredTextEditor) {
+			final StructuredTextEditor editor = (StructuredTextEditor) getTextEditor();
+			Dialog cleanupDialog = getCleanupDialog(editor.getSite().getShell());
+			if (cleanupDialog != null) {
+				if (cleanupDialog.open() == Window.OK) {
+					// setup runnable
+					Runnable runnable = new Runnable() {
+						public void run() {
+							IStructuredCleanupProcessor cleanupProcessor = getCleanupProcessor();
+							if (cleanupProcessor != null)
+								cleanupProcessor.cleanupModel(editor.getModel());
+						}
+					};
+
+					// TODO: make independent of 'model'.
+					IStructuredModel model = editor.getModel();
+					if (model != null) {
+						try {
+							// begin recording
+							ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
+							model.beginRecording(this, SSEUIMessages.Cleanup_Document_UI_, SSEUIMessages.Cleanup_Document_UI_, selection.getOffset(), selection.getLength()); //$NON-NLS-1$ //$NON-NLS-2$
+
+							// tell the model that we are about to make a big
+							// model change
+							model.aboutToChangeModel();
+
+							// run
+							BusyIndicator.showWhile(editor.getTextViewer().getControl().getDisplay(), runnable);
+						} finally {
+							// tell the model that we are done with the big
+							// model
+							// change
+							model.changedModel();
+
+							// end recording
+							ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
+							model.endRecording(this, selection.getOffset(), selection.getLength());
+						}
+					}
+				}
+
+			}
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/FormatActionDelegate.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/FormatActionDelegate.java
new file mode 100644
index 0000000..ed11b90
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/FormatActionDelegate.java
@@ -0,0 +1,248 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.actions;
+
+import java.io.IOException;
+
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.filebuffers.ITextFileBuffer;
+import org.eclipse.core.filebuffers.ITextFileBufferManager;
+import org.eclipse.core.filebuffers.LocationKind;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.sse.core.internal.exceptions.MalformedInputExceptionWithDetail;
+import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
+import org.eclipse.wst.sse.ui.internal.FormatProcessorsExtensionReader;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+public class FormatActionDelegate extends ResourceActionDelegate {
+
+	class FormatJob extends Job {
+
+		public FormatJob(String name) {
+			super(name);
+		}
+
+		protected IStatus run(IProgressMonitor monitor) {
+			IStatus status = Status.OK_STATUS;
+
+			Object[] elements = fSelection.toArray();
+			monitor.beginTask("", elements.length); //$NON-NLS-1$
+			for (int i = 0; i < elements.length; i++) {
+				if (elements[i] instanceof IResource) {
+					process(new SubProgressMonitor(monitor, 1), (IResource) elements[i]);
+				}
+				else {
+					monitor.worked(1);
+				}
+			}
+			monitor.done();
+
+			if (fErrorStatus.getChildren().length > 0) {
+				status = fErrorStatus;
+				fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIMessages.FormatActionDelegate_errorStatusMessage, null); //$NON-NLS-1$
+			}
+
+			return status;
+		}
+
+	}
+
+	private MultiStatus fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIMessages.FormatActionDelegate_errorStatusMessage, null); //$NON-NLS-1$
+
+	protected void format(IProgressMonitor monitor, IFile file) {
+		if(monitor == null || monitor.isCanceled())
+			return;
+		
+		try {
+			monitor.beginTask("", 100);
+			IContentDescription contentDescription = file.getContentDescription();
+			monitor.worked(5);
+			if (contentDescription != null) {
+				IContentType contentType = contentDescription.getContentType();
+				IStructuredFormatProcessor formatProcessor = getFormatProcessor(contentType.getId());
+				if (formatProcessor != null && (monitor == null || !monitor.isCanceled())) {
+					String message = NLS.bind(SSEUIMessages.FormatActionDelegate_3, new String[]{file.getFullPath().toString().substring(1)});					monitor.subTask(message);
+					formatProcessor.setProgressMonitor(monitor);
+					formatProcessor.formatFile(file);
+				}
+			}
+			monitor.worked(95);
+			monitor.done();
+		} catch (MalformedInputExceptionWithDetail e) {
+			String message = NLS.bind(SSEUIMessages.FormatActionDelegate_5, new String[]{file.getFullPath().toString()});
+			fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+		} catch (IOException e) {
+			String message = NLS.bind(SSEUIMessages.FormatActionDelegate_4, new String[]{file.getFullPath().toString()});
+			fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+		} catch (CoreException e) {
+			String message = NLS.bind(SSEUIMessages.FormatActionDelegate_4, new String[]{file.getFullPath().toString()});
+			fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+		}
+	}
+	
+	private Display getDisplay() {
+
+		// Note: the workbench should always have a display
+		// (unless running headless), whereas Display.getCurrent()
+		// only returns the display if the currently executing thread
+		// has one.
+		if (PlatformUI.isWorkbenchRunning())
+			return PlatformUI.getWorkbench().getDisplay();
+		else
+			return null;
+	}
+
+	protected void format(final IProgressMonitor monitor, IResource resource) {
+		if (resource instanceof IFile) {
+			final IFile file = (IFile) resource;
+			
+			// BUG 178598 - If the resource is shared, and it's possible to
+			// get the workbench Display, the UI thread is asked to execute the
+			// format of the file when it can
+			try {
+				ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager();
+				ITextFileBuffer buffer = null;
+				
+				try {
+					if(manager != null) {
+						manager.connect(file.getFullPath(), LocationKind.IFILE, monitor);
+						buffer = manager.getTextFileBuffer(resource.getFullPath(), LocationKind.IFILE);
+					}
+					
+					if(buffer != null && buffer.isShared()) {
+						Display display = getDisplay();
+						display.syncExec(new Runnable() {
+							public void run() {
+								format(monitor, file);
+							}
+						});
+					}
+					else
+						format(monitor, file);
+				}
+				finally {
+					if(manager != null)
+						manager.disconnect(file.getFullPath(), LocationKind.IFILE, new SubProgressMonitor(monitor, 1));
+				}
+			}
+			catch(CoreException e) {
+				String message = NLS.bind(SSEUIMessages.FormatActionDelegate_4, new String[]{file.getFullPath().toString()});
+				fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+			}
+			finally {
+				if(monitor != null)
+					monitor.done();
+			}
+			
+		} else if (resource instanceof IContainer) {
+			IContainer container = (IContainer) resource;
+			
+			try {
+				IResource[] members = container.members();
+				monitor.beginTask("", members.length);
+				for (int i = 0; i < members.length; i++) {
+					if (monitor != null && !monitor.isCanceled())
+						format(new SubProgressMonitor(monitor, 1), members[i]);
+				}
+				monitor.done();
+			} catch (CoreException e) {
+				String message = NLS.bind(SSEUIMessages.FormatActionDelegate_4, new String[]{resource.getFullPath().toString()});
+				fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+			}
+		}
+	}
+
+	protected IStructuredFormatProcessor getFormatProcessor(String contentTypeId) {
+		return FormatProcessorsExtensionReader.getInstance().getFormatProcessor(contentTypeId);
+	}
+
+	protected Job getJob() {
+		return new FormatJob(SSEUIMessages.FormatActionDelegate_jobName); //$NON-NLS-1$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.edit.util.ResourceActionDelegate#process(org.eclipse.core.runtime.IProgressMonitor,
+	 *      org.eclipse.core.resources.IResource)
+	 */
+	protected void process(IProgressMonitor monitor, IResource resource) {
+		monitor.beginTask("", 100);
+		format(new SubProgressMonitor(monitor, 98), resource);
+
+		try {
+			resource.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, 2));
+		} catch (CoreException e) {
+			String message = NLS.bind(SSEUIMessages.FormatActionDelegate_4, new String[]{resource.getFullPath().toString()});
+			fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+		}
+		monitor.done();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.sse.ui.internal.actions.ResourceActionDelegate#processorAvailable(org.eclipse.core.resources.IResource)
+	 */
+	protected boolean processorAvailable(IResource resource) {
+		boolean result = false;
+		if (resource.isAccessible()) {
+			try {
+				if (resource instanceof IFile) {
+					IFile file = (IFile) resource;
+
+					IStructuredFormatProcessor formatProcessor = null;
+					IContentDescription contentDescription = file.getContentDescription();
+					if (contentDescription != null) {
+						IContentType contentType = contentDescription.getContentType();
+						formatProcessor = getFormatProcessor(contentType.getId());
+					}
+					if (formatProcessor != null)
+						result = true;
+				}
+				else if (resource instanceof IContainer) {
+					IContainer container = (IContainer) resource;
+					IResource[] members;
+					members = container.members();
+					for (int i = 0; i < members.length; i++) {
+						boolean available = processorAvailable(members[i]);
+
+						if (available) {
+							result = true;
+							break;
+						}
+					}
+				}
+			}
+			catch (CoreException e) {
+				Logger.logException(e);
+			}
+		}
+
+		return result;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ResourceActionDelegate.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ResourceActionDelegate.java
new file mode 100644
index 0000000..2907928
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ResourceActionDelegate.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.actions;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IActionDelegate;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
+
+public class ResourceActionDelegate implements IActionDelegate {
+	protected IStructuredSelection fSelection;
+
+	private IWorkbenchSiteProgressService getActiveProgressService() {
+		IWorkbenchSiteProgressService service = null;
+		if (PlatformUI.isWorkbenchRunning()) {
+			IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+			if (activeWorkbenchWindow != null) {
+				IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
+				if (activePage != null) {
+					IWorkbenchPart activePart = activePage.getActivePart();
+					if (activePart != null) {
+						service = (IWorkbenchSiteProgressService) activePart.getSite().getAdapter(IWorkbenchSiteProgressService.class);
+					}
+				}
+			}
+		}
+		return service;
+	}
+
+	protected Job getJob() {
+		// ResourceActionDelegate does not create background job
+		// subclass creates the background job for the action
+		return null;
+	}
+
+	protected boolean processorAvailable(IResource resource) {
+		// ResourceActionDelegate returns false by default
+		// subclass returns true if processor is available; false otherwise
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+	 */
+	public void run(IAction action) {
+		if (fSelection != null && !fSelection.isEmpty()) {
+			Job job = getJob();
+			if (job != null) {
+				IWorkbenchSiteProgressService progressService = getActiveProgressService();
+				if (progressService != null) {
+					progressService.schedule(job);
+				}
+				else {
+					job.schedule();
+				}
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+	 *      org.eclipse.jface.viewers.ISelection)
+	 */
+	public void selectionChanged(IAction action, ISelection selection) {
+		if (selection instanceof IStructuredSelection) {
+			fSelection = (IStructuredSelection) selection;
+			boolean available = false;
+
+			Object[] elements = fSelection.toArray();
+			for (int i = 0; i < elements.length; i++) {
+				if (elements[i] instanceof IResource) {
+					available = processorAvailable((IResource) elements[i]);
+
+					if (available)
+						break;
+				}
+			}
+
+			action.setEnabled(available);
+		}
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/StructuredTextEditorActionConstants.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/StructuredTextEditorActionConstants.java
new file mode 100644
index 0000000..286d8cc
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/StructuredTextEditorActionConstants.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.actions;
+
+
+
+public interface StructuredTextEditorActionConstants {
+	public final static String ACTION_NAME_ADD_BLOCK_COMMENT = "AddBlockComment";//$NON-NLS-1$
+	public final static String ACTION_NAME_CLEANUP_DOCUMENT = "CleanupDocument";//$NON-NLS-1$
+	public final static String ACTION_NAME_COMMENT = "Comment";//$NON-NLS-1$
+	public final static String ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION = "ContentAssistContextInformation";//$NON-NLS-1$
+	public final static String ACTION_NAME_CONTENTASSIST_PROPOSALS = "ContentAssistProposals";//$NON-NLS-1$
+	public final static String ACTION_NAME_FIND_OCCURRENCES = "FindOccurrences"; //$NON-NLS-1$
+	public final static String ACTION_NAME_FORMAT_ACTIVE_ELEMENTS = "FormatActiveElements";//$NON-NLS-1$
+	public final static String ACTION_NAME_FORMAT_DOCUMENT = "FormatDocument";//$NON-NLS-1$
+	public final static String ACTION_NAME_MANAGE_BREAKPOINTS = "ManageBreakpoints";//$NON-NLS-1$
+	public final static String ACTION_NAME_OPEN_FILE = "OpenFileFromSource";//$NON-NLS-1$
+	public final static String ACTION_NAME_REMOVE_BLOCK_COMMENT = "RemoveBlockComment";//$NON-NLS-1$
+	public final static String ACTION_NAME_STRUCTURE_SELECT_ENCLOSING = "StructureSelectEnclosing";//$NON-NLS-1$
+	public final static String ACTION_NAME_STRUCTURE_SELECT_HISTORY = "StructureSelectHistory";//$NON-NLS-1$
+	public final static String ACTION_NAME_STRUCTURE_SELECT_NEXT = "StructureSelectNext";//$NON-NLS-1$
+	public final static String ACTION_NAME_STRUCTURE_SELECT_PREVIOUS = "StructureSelectPrevious";//$NON-NLS-1$
+	public final static String ACTION_NAME_TOGGLE_COMMENT = "ToggleComment";//$NON-NLS-1$
+	public final static String ACTION_NAME_UNCOMMENT = "Uncomment";//$NON-NLS-1$
+	public final static String ACTION_NAME_GOTO_MATCHING_BRACKET = "GotoMatchingBracket";//$NON-NLS-1$
+	public final static String ACTION_NAME_SHOW_OUTLINE = "ShowQuickOutline"; //$NON-NLS-1$
+
+	/**
+	 * @deprecated use UNDERSCORE instead
+	 */
+	public final static String DOT = ".";//$NON-NLS-1$
+	public final static String UNDERSCORE = "_"; //$NON-NLS-1$
+
+	public final static String GROUP_NAME_MENU_ADDITIONS = "MenuAdditions";//$NON-NLS-1$
+	public final static String GROUP_NAME_TOOLBAR_ADDITIONS = "ToolbarAdditions";//$NON-NLS-1$
+
+	public final static String STATUS_CATEGORY_OFFSET = "Offset";//$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalCategory.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalCategory.java
new file mode 100644
index 0000000..83abfa3
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalCategory.java
@@ -0,0 +1,374 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.action.LegacyActionTools;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.wst.sse.core.internal.util.Assert;
+import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext;
+import org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationReader;
+import org.osgi.framework.Bundle;
+
+/**
+ * Describes a category extension to the
+ * <code>org.eclipse.wst.sse.ui.completionProposal</code> extension point.
+ */
+public final class CompletionProposalCategory {
+	/** The extension schema name of the icon attribute. */
+	private static final String ICON= "icon"; //$NON-NLS-1$
+	
+	/** The extension schema name of the ID attribute. */
+	private static final String ID= "id"; //$NON-NLS-1$
+	
+	/** The extension schema name of the name attribute. */
+	private static final String NAME= "name"; //$NON-NLS-1$
+
+	/** ID of this completion category */
+	private final String fId;
+	
+	/** Name of this completion category */
+	private final String fName;
+	
+	/** The image descriptor for this category, or <code>null</code> if none specified. */
+	private final ImageDescriptor fImage;
+	
+	/** The last error reported by this category */
+	private String fLastError = null;
+
+	/**
+	 * <p>Construct the category by parsing the given element.</p>
+	 * 
+	 * @param element {@link IConfigurationElement} containing the configuration of this category
+	 * @throws CoreException if the given {@link IConfigurationElement} does not contain the correct
+	 * elements and attributes.
+	 */
+	CompletionProposalCategory(IConfigurationElement element) throws CoreException {
+		Assert.isLegal(element != null);
+		
+		//get & verify ID
+		fId = element.getAttribute(ID);
+		ContentAssistUtils.checkExtensionAttributeNotNull(fId, ID, element);
+		
+		//get & verify optional name
+		String name= element.getAttribute(NAME);
+		if (name == null) {
+			fName = fId;
+		} else {
+			fName= name;
+		}
+
+		//get & verify optional icon
+		String icon= element.getAttribute(ICON);
+		ImageDescriptor img= null;
+		if (icon != null) {
+			Bundle bundle= ContentAssistUtils.getBundle(element);
+			if (bundle != null) {
+				Path path= new Path(icon);
+				URL url= FileLocator.find(bundle, path, null);
+				img= ImageDescriptor.createFromURL(url);
+			}
+		}
+		fImage= img;
+	}
+
+	/**
+	 * <p>Creates a category with the given name and ID</p>
+	 * 
+	 * @param id the unique ID of the new category
+	 * @param name the name of the new category
+	 */
+	CompletionProposalCategory(String id, String name) {
+		fId= id;
+		fName= name;
+		fImage= null;
+	}
+
+	/**
+	 * <p>Returns the unique identifier of the category</p>
+	 *
+	 * @return Returns the id
+	 */
+	public String getId() {
+		return fId;
+	}
+
+	/**
+	 * <p>Returns the human readable name of the category.
+	 * It may contain mnemonics.</p>
+	 *
+	 * @return Returns the name
+	 */
+	public String getName() {
+		return fName;
+	}
+
+	/**
+	 * <p>Returns the human readable name of the category
+	 * without mnemonic hint in order to be displayed
+	 * in a message.</p>
+	 *
+	 * @return Returns the name
+	 */
+	public String getDisplayName() {
+		return LegacyActionTools.removeMnemonics(fName);
+	}
+
+	/**
+	 * <p>Returns the image descriptor of the category.</p>
+	 *
+	 * @return the image descriptor of the category
+	 */
+	public ImageDescriptor getImageDescriptor() {
+		return fImage;
+	}
+
+	/**
+	 * @return <code>true</code> if this category should be displayed on
+	 * its own content assist page, <code>false</code> otherwise
+	 */
+	public boolean isDisplayedOnOwnPage(String contentTypeID) {
+		boolean displayOnOwnPage = ICompletionProposalCategoriesConfigurationReader.DEFAULT_DISPLAY_ON_OWN_PAGE;
+		
+		ICompletionProposalCategoriesConfigurationReader properties =
+			CompletionProposoalCatigoriesConfigurationRegistry.getDefault().getReadableConfiguration(contentTypeID);
+		if(properties != null) {
+			displayOnOwnPage = properties.shouldDisplayOnOwnPage(this.fId);
+		}
+		
+		return displayOnOwnPage;
+	}
+
+	/**
+	 * @return <code>true</code> if this category should be displayed in
+	 * the default content assist page, <code>false</code> otherwise
+	 */
+	public boolean isIncludedOnDefaultPage(String contentTypeID) {
+		boolean includeOnDefaultPage = ICompletionProposalCategoriesConfigurationReader.DEFAULT_INCLUDE_ON_DEFAULTS_PAGE;
+		
+		ICompletionProposalCategoriesConfigurationReader properties =
+			CompletionProposoalCatigoriesConfigurationRegistry.getDefault().getReadableConfiguration(contentTypeID);
+		if(properties != null) {
+			includeOnDefaultPage = properties.shouldDisplayOnDefaultPage(this.fId);
+		}
+		
+		return includeOnDefaultPage;
+	}
+	
+	/**
+	 * <p>Given a content type ID determines the rank of this
+	 * category for sorting the content assist pages</p>
+	 * 
+	 * @return the sort rank of this category
+	 */
+	public int getPageSortRank(String contentTypeID) {
+		int sortOrder = ICompletionProposalCategoriesConfigurationReader.DEFAULT_SORT_ORDER;
+		
+		ICompletionProposalCategoriesConfigurationReader properties =
+			CompletionProposoalCatigoriesConfigurationRegistry.getDefault().getReadableConfiguration(contentTypeID);
+		if(properties != null) {
+			sortOrder = properties.getPageSortOrder(this.fId);
+		}
+		
+		return sortOrder;
+	}
+	
+	/**
+	 * <p>Given a content type ID determines the rank of this
+	 * category for sorting on the default content assist page
+	 * with other categories</p>
+	 * 
+	 * @return the sort rank of this category
+	 */
+	public int getDefaultPageSortRank(String contentTypeID) {
+		int sortOrder = ICompletionProposalCategoriesConfigurationReader.DEFAULT_SORT_ORDER;
+		
+		ICompletionProposalCategoriesConfigurationReader properties =
+			CompletionProposoalCatigoriesConfigurationRegistry.getDefault().getReadableConfiguration(contentTypeID);
+		if(properties != null) {
+			sortOrder = properties.getDefaultPageSortOrder(this.fId);
+		}
+		
+		return sortOrder;
+	}
+	
+	/**
+	 * <p><b>NOTE: </b> enablement is not the same as weather a category
+	 * should be displayed on its own page or the default page, it describes
+	 * if the category should be used at all.  Currently categories are always
+	 * enabled.  There maybe cases in the future where a category should be
+	 * disabled entirely though.</p>
+	 * 
+	 * @return <code>true</code> if this category is enabled,
+	 * <code>false</code> otherwise
+	 */
+	public boolean isEnabled() {
+		return true;
+	}
+
+	/**
+	 * @return <code>true</code> if the category contains any computers, <code>false</code>
+	 *         otherwise
+	 */
+	public boolean hasComputers() {
+		List descriptors=  CompletionProposalComputerRegistry.getDefault().getProposalComputerDescriptors();
+		for (Iterator it= descriptors.iterator(); it.hasNext();) {
+			CompletionProposalComputerDescriptor desc= (CompletionProposalComputerDescriptor) it.next();
+			if (desc.getCategory() == this) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * @param contentTypeID the content type ID
+	 * @param partitionTypeID the partition
+	 * @return <code>true</code> if the category contains any computers, in the given partition type
+	 * in the given content type, <code>false</code> otherwise
+	 */
+	public boolean hasComputers(String contentTypeID, String partitionTypeID) {
+		List descriptors = CompletionProposalComputerRegistry.getDefault().getProposalComputerDescriptors(contentTypeID, partitionTypeID);
+		for (Iterator it = descriptors.iterator(); it.hasNext();) {
+			CompletionProposalComputerDescriptor desc= (CompletionProposalComputerDescriptor) it.next();
+			if (desc.getCategory() == this) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * @param contentTypeID the content type ID
+	 * @return <code>true</code> if the category contains any computers, in the given partition type
+	 * in the given content type, <code>false</code> otherwise
+	 */
+	public boolean hasComputers(String contentTypeID) {
+		List descriptors = CompletionProposalComputerRegistry.getDefault().getProposalComputerDescriptors(contentTypeID);
+		for (Iterator it = descriptors.iterator(); it.hasNext();) {
+			CompletionProposalComputerDescriptor desc= (CompletionProposalComputerDescriptor) it.next();
+			if (desc.getCategory() == this) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * <p>Safely computes completion proposals of all computers of this category through their
+	 * extension.</p>
+	 *
+	 * @param context the invocation context passed on to the extension
+	 * @param contentTypeID the content type ID where the invocation occurred
+	 * @param partitionTypeID the partition type where the invocation occurred
+	 * @param monitor the progress monitor passed on to the extension
+	 * @return the list of computed completion proposals (element type:
+	 *         {@link org.eclipse.jface.text.contentassist.ICompletionProposal})
+	 */
+	public List computeCompletionProposals(CompletionProposalInvocationContext context,
+			String contentTypeID, String partitionTypeID, SubProgressMonitor monitor) {
+		
+		fLastError = null;
+		List result = new ArrayList();
+		List descriptors = new ArrayList(CompletionProposalComputerRegistry.getDefault().getProposalComputerDescriptors(contentTypeID, partitionTypeID));
+		for (Iterator it = descriptors.iterator(); it.hasNext();) {
+			CompletionProposalComputerDescriptor desc = (CompletionProposalComputerDescriptor) it.next();
+			if (desc.getCategory() == this) {
+				result.addAll(desc.computeCompletionProposals(context, monitor));
+			}
+			
+			if (fLastError == null && desc.getErrorMessage() != null) {
+				fLastError = desc.getErrorMessage();
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * <p>Safely computes context information objects of all computers of this category through their
+	 * extension.</p>
+	 *
+	 * @param context the invocation context passed on to the extension
+	 * @param contentTypeID the content type ID where the invocation occurred
+	 * @param partitionTypeID the partition type where the invocation occurred
+	 * @param monitor the progress monitor passed on to the extension
+	 * @return the list of computed context information objects (element type:
+	 *         {@link org.eclipse.jface.text.contentassist.IContextInformation})
+	 */
+	public List computeContextInformation(CompletionProposalInvocationContext context,
+			String contentTypeID, String partitionTypeID, SubProgressMonitor monitor) {
+		
+		fLastError= null;
+		List result= new ArrayList();
+		List descriptors= new ArrayList(CompletionProposalComputerRegistry.getDefault().getProposalComputerDescriptors(contentTypeID, partitionTypeID));
+		for (Iterator it= descriptors.iterator(); it.hasNext();) {
+			CompletionProposalComputerDescriptor desc= (CompletionProposalComputerDescriptor) it.next();
+			if (desc.getCategory() == this && (isIncludedOnDefaultPage(contentTypeID) || isDisplayedOnOwnPage(contentTypeID))) {
+				result.addAll(desc.computeContextInformation(context, monitor));
+			}
+			if (fLastError == null) {
+				fLastError= desc.getErrorMessage();
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * @return the last error message reported by a computer in this category
+	 */
+	public String getErrorMessage() {
+		return fLastError;
+	}
+
+	/**
+	 * <p>Notifies the computers in this category of a proposal computation session start.</p>
+	 */
+	public void sessionStarted() {
+		List descriptors= new ArrayList(CompletionProposalComputerRegistry.getDefault().getProposalComputerDescriptors());
+		for (Iterator it= descriptors.iterator(); it.hasNext();) {
+			CompletionProposalComputerDescriptor desc= (CompletionProposalComputerDescriptor) it.next();
+			if (desc.getCategory() == this)
+				desc.sessionStarted();
+			if (fLastError == null)
+				fLastError= desc.getErrorMessage();
+		}
+	}
+
+	/**
+	 * <p>Notifies the computers in this category of a proposal computation session end.</p>
+	 */
+	public void sessionEnded() {
+		List descriptors= new ArrayList(CompletionProposalComputerRegistry.getDefault().getProposalComputerDescriptors());
+		for (Iterator it= descriptors.iterator(); it.hasNext();) {
+			CompletionProposalComputerDescriptor desc= (CompletionProposalComputerDescriptor) it.next();
+			if (desc.getCategory() == this)
+				desc.sessionEnded();
+			if (fLastError == null)
+				fLastError= desc.getErrorMessage();
+		}
+	}
+	
+	/**
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		return fId + ": " + fName; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalComputerDescriptor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalComputerDescriptor.java
new file mode 100644
index 0000000..3825dc5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalComputerDescriptor.java
@@ -0,0 +1,647 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.InvalidRegistryObjectException;
+import org.eclipse.core.runtime.PerformanceStats;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext;
+import org.eclipse.wst.sse.ui.contentassist.ICompletionProposalComputer;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.osgi.framework.Bundle;
+
+/**
+ * Wraps an {@link ICompletionProposalComputer} provided by an extension to the
+ * <code>org.eclipse.wst.sse.ui.completionProposal</code> extension point.
+ * Instances are immutable. Instances can be obtained from a
+ * {@link CompletionProposalComputerRegistry}.
+ *
+ * @see CompletionProposalComputerRegistry
+ */
+final class CompletionProposalComputerDescriptor {
+	/** The default category id. */
+	private static final String DEFAULT_CATEGORY_ID= "org.eclipse.wst.sse.ui.defaultProposalCategory"; //$NON-NLS-1$
+	
+	/** The extension schema name of the category id attribute. */
+	private static final String ATTR_CATEGORY_ID= "categoryId"; //$NON-NLS-1$
+	
+	/** The extension schema name for element ID attributes */
+	private static final String ATTR_ID= "id"; //$NON-NLS-1$
+	
+	/** The extension schema name for element name attributes */
+	private static final String ATTR_NAME= "name"; //$NON-NLS-1$
+	
+	/** The extension schema name of the class attribute. */
+	private static final String ATTR_CLASS= "class"; //$NON-NLS-1$
+	
+	/** The extension schema name of the activate attribute. */
+	private static final String ATTRACTIVATE= "activate"; //$NON-NLS-1$
+	
+	/** The extension schema name of the content type child elements. */
+	private static final String ELEM_CONTENT_TYPE = "contentType"; //$NON-NLS-1$
+	
+	/** The extension schema name of the partition type child elements. */
+	private static final String ELEM_PARTITION_TYPE= "partitionType"; //$NON-NLS-1$
+	
+	/** The name of the performance event used to trace extensions. */
+	private static final String PERFORMANCE_EVENT= SSEUIPlugin.ID + "/perf/content_assist/extensions"; //$NON-NLS-1$
+	
+	/**
+	 * If <code>true</code>, execution time of extensions is measured and the data forwarded to
+	 * core's {@link PerformanceStats} service.
+	 */
+	private static final boolean MEASURE_PERFORMANCE= PerformanceStats.isEnabled(PERFORMANCE_EVENT);
+	
+	/**
+	 * Independently of the {@link PerformanceStats} service, any operation that takes longer than
+	 * {@value} milliseconds will be flagged as an violation. This timeout does not apply to the
+	 * first invocation, as it may take longer due to plug-in initialization etc. See also
+	 * {@link #fIsReportingDelay}.
+	 */
+	private static final long MAX_DELAY= 500000;
+
+	/* log constants */
+	private static final String COMPUTE_COMPLETION_PROPOSALS= "computeCompletionProposals()"; //$NON-NLS-1$
+	private static final String COMPUTE_CONTEXT_INFORMATION= "computeContextInformation()"; //$NON-NLS-1$
+	private static final String SESSION_STARTED= "sessionStarted()"; //$NON-NLS-1$
+	private static final String SESSION_ENDED= "sessionEnded()"; //$NON-NLS-1$
+
+	/** The identifier of the extension. */
+	private final String fId;
+	
+	/** The name of the extension. */
+	private final String fName;
+	
+	/** The class name of the provided <code>ISSECompletionProposalComputer</code>. */
+	private final String fClass;
+	
+	/** The activate attribute value. */
+	private final boolean fActivate;
+	
+	/** The configuration element of this extension. */
+	private final IConfigurationElement fElement;
+	
+	/** The computer, if instantiated, <code>null</code> otherwise. */
+	private ICompletionProposalComputer fComputer;
+	
+	/** The UI category. */
+	private final CompletionProposalCategory fCategory;
+	
+	/** The first error message in the most recent operation, or <code>null</code>. */
+	private String fLastError;
+	
+	/**
+	 * Tells whether to inform the user when <code>MAX_DELAY</code> has been exceeded.
+	 * We start timing execution after the first session because the first may take
+	 * longer due to plug-in activation and initialization.
+	 */
+	private boolean fIsReportingDelay = false;
+	
+	/** The start of the last operation. */
+	private long fStart;
+	
+	/**
+	 * Tells whether we tried to load the computer.
+	 * @since 3.4
+	 */
+	boolean fTriedLoadingComputer = false;
+
+	/**
+	 * <p>Creates a new descriptor.</p>
+	 * <p><b>NOTE: </b> This will not add this new descriptor to the given
+	 * {@link CompletionProposalComputerRegistry}. That can not be done
+	 * until this descriptor is done being constructed.  Therefore be sure
+	 * to call {@link #addToRegistry()} after creating a new descriptor.</p>
+	 *
+	 * @param element the configuration element to read
+	 * @param categories the categories
+	 * 
+	 * @throws InvalidRegistryObjectException if this extension is no longer valid
+	 * @throws CoreException if the extension contains invalid values
+	 */
+	CompletionProposalComputerDescriptor(IConfigurationElement element, List categories) throws InvalidRegistryObjectException, CoreException {
+		Assert.isLegal(element != null);
+		fElement = element;
+		
+		//get & verify ID
+		fId = fElement.getAttribute(ATTR_ID);
+		ContentAssistUtils.checkExtensionAttributeNotNull(fId, ATTR_ID, fElement);
+
+		//get & verify optional name
+		String name= fElement.getAttribute(ATTR_NAME);
+		if (name == null) {
+			fName= fId;
+		} else {
+			fName= name;
+		}
+
+		//get & verify activate plugin attribute
+		String activateAttribute= fElement.getAttribute(ATTRACTIVATE);
+		fActivate = Boolean.valueOf(activateAttribute).booleanValue();
+
+		//get & verify class
+		fClass= fElement.getAttribute(ATTR_CLASS);
+		ContentAssistUtils.checkExtensionAttributeNotNull(fClass, ATTR_CLASS, fElement);
+
+		//get & verify optional category id
+		String categoryId= fElement.getAttribute(ATTR_CATEGORY_ID);
+		if (categoryId == null) {
+			categoryId= DEFAULT_CATEGORY_ID;
+		}
+		
+		//find the category with the determined category id
+		CompletionProposalCategory category= null;
+		for (Iterator it= categories.iterator(); it.hasNext();) {
+			CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
+			if (cat.getId().equals(categoryId)) {
+				category= cat;
+				break;
+			}
+		}
+		
+		/* create a category if it does not exist
+		 * else just set the category
+		 */
+		if (category == null) {
+			fCategory = new CompletionProposalCategory(categoryId, fName);
+			
+			/* will add the new category to the registers list of categories,
+			 *  by the magic of object references
+			 */
+			categories.add(fCategory);
+		} else {
+			fCategory = category;
+		}
+	}
+	
+	/**
+	 * <p>Adds this descriptor to the {@link CompletionProposalComputerRegistry}.</p>
+	 * <p><b>NOTE: </b>Must be done after descriptor creation or the descriptor will
+	 * not be added to the registry. Can not be done in constructor because
+	 * descriptor must be constructed before it can be added to the registry</p>
+	 * 
+	 * 
+	 * @throws InvalidRegistryObjectException
+	 * @throws CoreException
+	 */
+	void addToRegistry() throws InvalidRegistryObjectException, CoreException {
+		parseActivationAndAddToRegistry(this.fElement, this);
+	}
+	
+	/**
+	 * @return the category that the wrapped {@link ICompletionProposalComputer} is
+	 * associated with.
+	 */
+	CompletionProposalCategory getCategory() {
+		return fCategory;
+	}
+	
+	/**
+	 * @return the contributor of the described {@link ICompletionProposalComputer}
+	 */
+    IContributor getContributor()  {
+        try {
+	        return fElement.getContributor();
+        } catch (InvalidRegistryObjectException e) {
+        	return null;
+        }
+    }
+
+	/**
+	 * @return Returns the id of the described {@link ICompletionProposalComputer}
+	 */
+	public String getId() {
+		return fId;
+	}
+
+	/**
+	 * @return the name of the described {@link ICompletionProposalComputer}
+	 */
+	public String getName() {
+		return fName;
+	}
+
+	/**
+	 * Returns a new instance of the computer as described in the
+	 * extension's xml. Note that the safest way to access the computer
+	 * is by using the
+	 * {@linkplain #computeCompletionProposals(ContentAssistInvocationContext, IProgressMonitor) computeCompletionProposals}
+	 * and
+	 * {@linkplain #computeContextInformation(ContentAssistInvocationContext, IProgressMonitor) computeContextInformation}
+	 * methods. These delegate the functionality to the contributed
+	 * computer, but handle instance creation and any exceptions thrown.
+	 *
+	 * @return a new instance of the completion proposal computer as
+	 *         described by this descriptor
+	 *         
+	 * @throws CoreException if the creation fails
+	 * @throws InvalidRegistryObjectException if the extension is not
+	 *         valid any longer (e.g. due to plug-in unloading)
+	 */
+	public ICompletionProposalComputer createComputer() throws CoreException, InvalidRegistryObjectException {
+		return (ICompletionProposalComputer) fElement.createExecutableExtension(ATTR_CLASS);
+	}
+
+	/**
+	 * <p>Safely computes completion proposals through the described extension.</p>
+	 *
+	 * @param context the invocation context passed on to the extension
+	 * @param monitor the progress monitor passed on to the extension
+	 * @return the list of computed completion proposals (element type:
+	 *         {@link org.eclipse.jface.text.contentassist.ICompletionProposal})
+	 */
+	public List computeCompletionProposals(CompletionProposalInvocationContext context, IProgressMonitor monitor) {
+		List completionProposals = Collections.EMPTY_LIST;
+		if (isEnabled()) {
+			IStatus status = null;
+			try {
+				// plugin must be active to get computer
+				ICompletionProposalComputer computer = getComputer(true);
+				if (computer != null) {
+					try {
+						PerformanceStats stats= startMeter(context, computer);
+						//ask the computer for the proposals
+						List proposals = computer.computeCompletionProposals(context, monitor);
+						stopMeter(stats, COMPUTE_COMPLETION_PROPOSALS);
+		
+						if (proposals != null) {
+							fLastError = computer.getErrorMessage();
+							completionProposals = proposals;
+						} else {
+							status = createAPIViolationStatus(COMPUTE_COMPLETION_PROPOSALS);
+						}
+					} finally {
+						fIsReportingDelay = true;
+					}
+				}
+			} catch (InvalidRegistryObjectException x) {
+				status= createExceptionStatus(x);
+			} catch (CoreException x) {
+				status= createExceptionStatus(x);
+			} catch (RuntimeException x) {
+				status= createExceptionStatus(x);
+			} finally {
+				monitor.done();
+			}
+	
+			if(status != null) {
+				Logger.log(status);
+			}
+		}
+
+		return completionProposals;
+	}
+
+	/**
+	 * <p>Safely computes context information objects through the described extension.</p>
+	 *
+	 * @param context the invocation context passed on to the extension
+	 * @param monitor the progress monitor passed on to the extension
+	 * @return the list of computed context information objects (element type:
+	 *         {@link org.eclipse.jface.text.contentassist.IContextInformation})
+	 */
+	public List computeContextInformation(CompletionProposalInvocationContext context, IProgressMonitor monitor) {
+		List contextInformation = Collections.EMPTY_LIST;
+		if (isEnabled()) {
+			IStatus status = null;
+			try {
+				// plugin must be active to get computer
+				ICompletionProposalComputer computer = getComputer(true);
+				if (computer != null) {
+					PerformanceStats stats= startMeter(context, computer);
+					List proposals= computer.computeContextInformation(context, monitor);
+					stopMeter(stats, COMPUTE_CONTEXT_INFORMATION);
+		
+					if (proposals != null) {
+						fLastError= computer.getErrorMessage();
+						contextInformation = proposals;
+					} else {
+						status = createAPIViolationStatus(COMPUTE_CONTEXT_INFORMATION);
+					}
+				}
+			} catch (InvalidRegistryObjectException x) {
+				status= createExceptionStatus(x);
+			} catch (CoreException x) {
+				status= createExceptionStatus(x);
+			} catch (RuntimeException x) {
+				status= createExceptionStatus(x);
+			} finally {
+				monitor.done();
+			}
+	
+			if(status != null) {
+				Logger.log(status);
+			}
+		}
+		
+		return contextInformation;
+	}
+
+	/**
+	 * <p>Notifies the described extension of a proposal computation session start.</p>
+	 * 
+	 * <p><b>Note: </b>This method is called every time code assist is invoked and
+	 * is <strong>not</strong> filtered by content type or partition type.</p>
+	 */
+	public void sessionStarted() {
+		if (isEnabled()) {
+			IStatus status = null;
+			try {
+				// plugin must be active to get computer
+				ICompletionProposalComputer computer = getComputer(true);
+				if (computer != null) {
+					PerformanceStats stats = startMeter(SESSION_STARTED, computer);
+					computer.sessionStarted();
+					stopMeter(stats, SESSION_ENDED);
+				}
+			} catch (InvalidRegistryObjectException x) {
+				status= createExceptionStatus(x);
+			} catch (CoreException x) {
+				status= createExceptionStatus(x);
+			} catch (RuntimeException x) {
+				status= createExceptionStatus(x);
+			}
+	
+			if(status != null) {
+				Logger.log(status);
+			}
+		}
+	}
+
+	/**
+	 * <p>Notifies the described extension of a proposal computation session end.</p>
+	 * 
+	 * <p><b>Note: </b>This method is called every time code assist is invoked and
+	 * is <strong>not</strong> filtered by content type or partition type.</p>
+	 */
+	public void sessionEnded() {
+		if (isEnabled()) {
+			IStatus status = null;
+			try {
+				// plugin must be active to get computer
+				ICompletionProposalComputer computer = getComputer(true);
+				if (computer != null) {
+					PerformanceStats stats= startMeter(SESSION_ENDED, computer);
+					computer.sessionEnded();
+					stopMeter(stats, SESSION_ENDED);
+				}
+			} catch (InvalidRegistryObjectException x) {
+				status= createExceptionStatus(x);
+			} catch (CoreException x) {
+				status= createExceptionStatus(x);
+			} catch (RuntimeException x) {
+				status= createExceptionStatus(x);
+			}
+	
+			if(status != null) {
+				Logger.log(status);
+			}
+		}
+	}
+	
+	/**
+	 * @return the error message from the described {@link ICompletionProposalComputer}
+	 */
+	public String getErrorMessage() {
+		return fLastError;
+	}
+	
+	/**
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		return fId + ": " + fName; //$NON-NLS-1$
+	}
+	
+	/**
+	 * <p>Parses the given configuration element for its activation context,
+	 * that is to say the content types and partiton types and updates the registry
+	 * to associated the given computer descriptor with the parsed activation contexts.</P>
+	 * 
+	 * <p>This is useful for parsing both <tt>proposalComputer</tt> elements and
+	 * <tt>proposalComputerExtendedActivation</tt> elements.</p>
+	 * 
+	 * @param element {@link IConfigurationElement} containing the activation context
+	 * @param desc {@link CompletionProposalComputerDescriptor} to associate with the parsed activation context
+	 * 
+	 * @throws InvalidRegistryObjectException
+	 * @throws CoreException
+	 */
+	protected static void parseActivationAndAddToRegistry(IConfigurationElement element,
+			CompletionProposalComputerDescriptor desc) throws InvalidRegistryObjectException, CoreException {
+		
+		/* if this descriptor is specific to a content type/s add it to the registry as such
+		 * else add to registry for all content types
+		 */
+		IConfigurationElement[] contentTypes = element.getChildren(ELEM_CONTENT_TYPE);
+		if(contentTypes.length > 0) {
+			for(int contentTypeIndex = 0; contentTypeIndex < contentTypes.length; ++contentTypeIndex) {
+				String contentTypeID = contentTypes[contentTypeIndex].getAttribute(ATTR_ID);
+				ContentAssistUtils.checkExtensionAttributeNotNull(contentTypeID, ATTR_ID, contentTypes[contentTypeIndex]);
+				
+				/* if this descriptor is for specific partition types in the content type
+				 * add it to the registry as such
+				 * else add to the registry for all partition types in the content type
+				 */
+				IConfigurationElement[] partitionTypes = contentTypes[contentTypeIndex].getChildren(ELEM_PARTITION_TYPE);
+				if(partitionTypes.length > 0) {
+					for (int partitionTypeIndex = 0; partitionTypeIndex < partitionTypes.length; ++partitionTypeIndex) {
+						String partitionTypeID = partitionTypes[partitionTypeIndex].getAttribute(ATTR_ID);
+						ContentAssistUtils.checkExtensionAttributeNotNull(partitionTypeID, ATTR_ID, partitionTypes[partitionTypeIndex]);
+						
+						CompletionProposalComputerRegistry.getDefault().putDescription(contentTypeID, partitionTypeID, desc);
+					}
+				} else {
+					CompletionProposalComputerRegistry.getDefault().putDescription(contentTypeID, null, desc);
+				}
+			}
+		} else {
+			Logger.log(Logger.WARNING, "The configuration element: " + element + " does not contain any content types."); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+
+	/**
+	 * @return <code>true</code> if the plugin that contains the {@link IConfigurationElement}
+	 * associated with this descriptor is loaded, <code>false</code> otherwise.
+	 */
+	private boolean isPluginLoaded() {
+		Bundle bundle= getBundle();
+		return bundle != null && bundle.getState() == Bundle.ACTIVE;
+	}
+
+	/**
+	 * @return the {@link Bundle} that contains the {@link IConfigurationElement} associated
+	 * with this descriptor
+	 */
+	private Bundle getBundle() {
+		String namespace= fElement.getDeclaringExtension().getContributor().getName();
+		Bundle bundle= Platform.getBundle(namespace);
+		return bundle;
+	}
+	
+	/**
+	 * <p>Returns a cached instance of the computer as described in the
+	 * extension's xml. If the computer is not yet created and
+	 * <code>canCreate</code> is <code>true</code> then {@link #createComputer()}
+	 * is called and the result cached.</p>
+	 *
+	 * @param canCreate <code>true</code> if the proposal computer can be created
+	 * @return a new instance of the completion proposal computer as
+	 *         described by this descriptor
+	 *         
+	 * @throws CoreException if the creation fails
+	 * @throws InvalidRegistryObjectException if the extension is not
+	 *         valid any longer (e.g. due to plug-in unloading)
+	 */
+	private synchronized ICompletionProposalComputer getComputer(boolean canCreate) throws CoreException, InvalidRegistryObjectException {
+		if (fComputer == null && canCreate && !fTriedLoadingComputer && (fActivate || isPluginLoaded())) {
+			fTriedLoadingComputer= true;
+			fComputer= createComputer();
+		}
+		return fComputer;
+	}
+	
+	/**
+	 * @return the enablement state of the category this describer is associated with
+	 */
+	private boolean isEnabled() {
+		return fCategory.isEnabled();
+	}
+	
+	/**
+	 * <p>Starts the meter for measuring the computers performance</p>
+	 * 
+	 * @param context
+	 * @param computer
+	 * @return
+	 */
+	private PerformanceStats startMeter(Object context, ICompletionProposalComputer computer) {
+		final PerformanceStats stats;
+		if (MEASURE_PERFORMANCE) {
+			stats= PerformanceStats.getStats(PERFORMANCE_EVENT, computer);
+			stats.startRun(context.toString());
+		} else {
+			stats= null;
+		}
+
+		if (fIsReportingDelay) {
+			fStart= System.currentTimeMillis();
+		}
+
+		return stats;
+	}
+
+	/**
+	 * <p>Stops the meter for measuring the computers performance</p>
+	 * 
+	 * @param context
+	 * @param computer
+	 * @return
+	 */
+	private void stopMeter(final PerformanceStats stats, String operation) {
+		if (MEASURE_PERFORMANCE) {
+			stats.endRun();
+			if (stats.isFailure()) {
+				IStatus status= createPerformanceStatus(operation);
+				Logger.log(status);
+				return;
+			}
+		}
+
+		if (fIsReportingDelay) {
+			long current= System.currentTimeMillis();
+			if (current - fStart > MAX_DELAY) {
+				IStatus status= createPerformanceStatus(operation);
+				Logger.log(status);
+			}
+		}
+	}
+	
+	/**
+	 * @return A message explaining that the described {@link ICompletionProposalComputer} failed in some way
+	 */
+	private String createBlameMessage() {
+		return "The ''" + getName() + "'' proposal computer from the ''" + //$NON-NLS-1$ //$NON-NLS-2$
+			fElement.getDeclaringExtension().getContributor().getName() + "'' plug-in did not complete normally."; //$NON-NLS-1$
+	}
+	
+	/**
+	 * <p>Create a status message describing that the extension has become invalid</p>
+	 * 
+	 * @param x the associated {@link InvalidRegistryObjectException}
+	 * @return the created {@link IStatus}
+	 */
+	private IStatus createExceptionStatus(InvalidRegistryObjectException x) {
+		String blame= createBlameMessage();
+		String reason= "The extension has become invalid."; //$NON-NLS-1$
+		return new Status(IStatus.INFO, SSEUIPlugin.ID, IStatus.OK, blame + " " + reason, x); //$NON-NLS-1$
+	}
+
+	/**
+	 * <p>create a status message explaining that the extension could not be instantiated</p>
+	 * 
+	 * @param x the associated {@link CoreException}
+	 * @return the created {@link IStatus}
+	 */
+	private IStatus createExceptionStatus(CoreException x) {
+		String blame = createBlameMessage();
+		String reason = "Unable to instantiate the extension."; //$NON-NLS-1$
+		return new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.OK, blame + " " + reason, x); //$NON-NLS-1$
+	}
+
+	/**
+	 * <p>Create a status message explaining the extension has thrown a runtime exception</p>
+	 * 
+	 * @param x the associated {@link RuntimeException}
+	 * @return the created {@link IStatus}
+	 */
+	private IStatus createExceptionStatus(RuntimeException x) {
+		String blame= createBlameMessage();
+		String reason= "The extension has thrown a runtime exception."; //$NON-NLS-1$
+		return new Status(IStatus.WARNING, SSEUIPlugin.ID, IStatus.OK, blame + " " + reason, x); //$NON-NLS-1$
+	}
+
+	/**
+	 * <p>Create a status message explaining the extension has violated the API of the extension point</p>
+	 * 
+	 * @param operation the operation that created the API violation
+	 * @return the created {@link IStatus}
+	 */
+	private IStatus createAPIViolationStatus(String operation) {
+		String blame = createBlameMessage();
+		String reason = "The extension violated the API contract of the ''" + operation + "'' operation."; //$NON-NLS-1$ //$NON-NLS-2$
+		return new Status(IStatus.WARNING, SSEUIPlugin.ID, IStatus.OK, blame + " " + reason, null); //$NON-NLS-1$
+	}
+
+	/**
+	 * <p>Create a status message explaining that the extension took to long during an operation</p>
+	 * 
+	 * @param operation the operation that took to long
+	 * @return the created {@link IStatus}
+	 */
+	private IStatus createPerformanceStatus(String operation) {
+		String blame= createBlameMessage();
+		String reason = "The extension took too long to return from the ''" + operation + "'' operation."; //$NON-NLS-1$ //$NON-NLS-2$
+		return new Status(IStatus.WARNING, SSEUIPlugin.ID, IStatus.OK, blame + " " + reason, null); //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalComputerRegistry.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalComputerRegistry.java
new file mode 100644
index 0000000..21b5b83
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalComputerRegistry.java
@@ -0,0 +1,508 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.InvalidRegistryObjectException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+
+/**
+ * <p>A registry for all extensions to the
+ * <code>org.eclipse.wst.sse.ui.completionProposal</code>
+ * extension point.</p>
+ */
+public final class CompletionProposalComputerRegistry {
+
+	/** The extension schema name of the extension point */
+	private static final String EXTENSION_POINT = "completionProposal"; //$NON-NLS-1$
+	
+	/** The extension schema name of proposal category child elements. */
+	private static final String ELEM_PROPOSAL_CATEGORY = "proposalCategory"; //$NON-NLS-1$
+	
+	/** The extension schema name of proposal computer child elements. */
+	private static final String ELEM_PROPOSAL_COMPUTER = "proposalComputer"; //$NON-NLS-1$
+	
+	/** The extension schema name of proposal computer activation child elements. */
+	private static final String ELEM_PROPOSAL_COMPUTER_EXTENDED_ACTIVATION = "proposalComputerExtendedActivation"; //$NON-NLS-1$
+	
+	/** The extension schema name for element ID attributes */
+	private static final String ATTR_ID= "id"; //$NON-NLS-1$
+	
+	/** preference key to keep track of the last known number of content assist computers */
+	private static final String NUM_COMPUTERS_PREF_KEY = "content_assist_number_of_computers"; //$NON-NLS-1$
+	
+	/**
+	 * A fake partition type ID stating used to say a {@link CompletionProposalComputerDescriptor} should
+	 * be associated with all partition types in a given content type.
+	 */
+	private static final String ALL_PARTITION_TYPES_ID = "all_partition_types_fake_ID"; //$NON-NLS-1$
+	
+	/** State where in the registry has not yet been loaded */
+	private static final byte NONE = 0;
+
+	/** State where the registry is being initialized */
+	private static final byte INITIALIZING = 1;
+	
+	/** State where in the registry is currently being loaded */
+	private static final byte LOADING = 2;
+	
+	/** State where in the registry has been loaded */
+	private static final byte LOADED = 3;
+
+	/** The singleton instance. */
+	private static CompletionProposalComputerRegistry fgSingleton= null;
+
+	/**
+	 * @return the singleton instance of the registry
+	 */
+	public static synchronized CompletionProposalComputerRegistry getDefault() {
+		if (fgSingleton == null) {
+			fgSingleton= new CompletionProposalComputerRegistry();
+		}
+
+		return fgSingleton;
+	}
+
+	/**
+	 * <code>{@link Map}&lt{@link String}, {@link CompletionProposalContentTypeContext}&gt</code>
+	 * <ul>
+	 * <li><b>key:</b> content type ID</li>
+	 * <li><b>value:</b> the context for the associated content type ID</li>
+	 * <ul>
+	 */
+	private final Map fActivationContexts;
+	
+	/**
+	 * <code>{@link Map}&lt{@link String}, {@link CompletionProposalComputerDescriptor}&gt</code>
+	 * <ul>
+	 * <li><b>key:</b> descriptor ID</li>
+	 * <li><b>value:</b> descriptor</li>
+	 * <ul>
+	 */
+	private final Map fDescriptors = new HashMap();
+
+	/** The {@link CompletionProposalCategory}s tracked by this registry */
+	private final List fCategories = new ArrayList();
+	
+	/** Unmodifiable public list of the {@link CompletionProposalCategory}s tracked by this registry */
+	private final List fPublicCategories = Collections.unmodifiableList(fCategories);
+	
+	/**
+	 * <p>The current state of the registry</p>
+	 * 
+	 * @see #NONE
+	 * @see #LOADING
+	 * @see #LOADED
+	 */
+	private byte fState;
+	
+	/**
+	 * Lock that is held while loading, operations waiting for
+	 * load to finish can lock on this as well
+	 */
+	private final Object fLoadingLock;
+
+	/** <code>true</code> if computers have been uninstalled since last load */
+	private boolean fHasUninstalledComputers= false;
+
+	/**
+	 * Creates a new instance.
+	 */
+	private CompletionProposalComputerRegistry() {
+		this.fActivationContexts = new HashMap();
+		this.fState = CompletionProposalComputerRegistry.NONE;
+		this.fLoadingLock = new Object();
+	}
+	
+	/**
+	 * <p>Calling this when the registry has not yet been loaded will start a
+	 * {@link Thread} to start loading the registry.  All other operations on
+	 * the registry will be blocked until the loading has completed.  If
+	 * the registry has already been loaded or is loading then this
+	 * method does nothing.</p>
+	 */
+	public synchronized void initialize() {
+		if(fState == CompletionProposalComputerRegistry.NONE) {
+			fState = CompletionProposalComputerRegistry.INITIALIZING;
+			new Thread() {
+				public void run() {
+					CompletionProposalComputerRegistry.this.load();
+				}
+			}.start();
+		}
+	}
+	
+	/**
+	 * <p><b>NOTE: </b>The returned list is read-only and is sorted in the order that the
+	 * extensions were read in. There are no duplicate elements in the returned list.
+	 * The returned list may change if plug-ins are loaded or unloaded while the
+	 * application is running.</p>
+	 *
+	 * @return the list of proposal categories contributed to the
+	 * <code>org.eclipse.wst.sse.ui.completionProposal</code> extension point (element type:
+	 *         {@link CompletionProposalCategory})
+	 */
+	public List getProposalCategories() {
+		internalEnsureLoaded();
+		return fPublicCategories;
+	}
+	
+	/**
+	 * <p><b>NOTE: </b>The returned list is read-only and is sorted in the order that the
+	 * extensions were read in. There are no duplicate elements in the returned list.
+	 * The returned list may change if plug-ins are loaded or unloaded while the
+	 * application is running.</p>
+	 * 
+	 * @param contentTypeID get the {@link CompletionProposalCategory}s associated with this ID
+	 * @return the {@link CompletionProposalCategory}s associated with the given content type ID
+	 */
+	public List getProposalCategories(String contentTypeID) {
+		internalEnsureLoaded();
+		List result = new ArrayList();
+		for(int i = 0; i < fCategories.size(); ++i) {
+			CompletionProposalCategory category = ((CompletionProposalCategory)fCategories.get(i));
+			if(category.hasComputers(contentTypeID)) {
+				result.add(category);
+			}
+		}
+		
+		return Collections.unmodifiableList(result);
+	}
+	
+	/**
+	 * @return <code>true</code> if the registry detected that computers got uninstalled since the last run
+	 * 			<code>false</code> otherwise or if {@link #resetUnistalledComputers()} has been called
+	 */
+	public boolean hasUninstalledComputers() {
+		return fHasUninstalledComputers;
+	}
+	
+	/**
+	 * <p>Clears the setting that uninstalled computers have been detected.
+	 * This setting is used to decide weather a helpful message should be
+	 * displayed to the user</p>
+	 */
+	public void resetUnistalledComputers() {
+		fHasUninstalledComputers = false;
+	}
+	
+	/**
+	 * <p>Adds the given {@link CompletionProposalComputerDescriptor} to the registry.</p>
+	 * 
+	 * @param contentTypeID the ID of the content type to associated the descriptor with
+	 * @param partitionTypeID the ID of the partition type in the content type to associate
+	 * the descriptor with, or <code>null</code> to associate with all partition types in
+	 * the content type.
+	 * @param descriptor the {@link CompletionProposalComputerDescriptor} to associate with
+	 * the given content type and partition type
+	 */
+	void putDescription(String contentTypeID, String partitionTypeID,
+			CompletionProposalComputerDescriptor descriptor) {
+		
+		if(partitionTypeID == null) {
+			partitionTypeID = ALL_PARTITION_TYPES_ID;
+		}
+		
+		CompletionProposalContentTypeContext context = getContext(contentTypeID);
+		context.putDescriptor(partitionTypeID, descriptor);
+	}
+
+	/**
+	 * @param contentTypeID get only descriptors associated with this content type
+	 * @param partitionTypeID get only descriptors associated with this partition type as well
+	 * as describers associated with any partition type in the given content type
+	 * @return all of the {@link CompletionProposalComputerDescriptor}s associated with the
+	 * given content type and partition type (including any describers associated with all
+	 * partition types in the given content type)
+	 */
+	List getProposalComputerDescriptors(String contentTypeID, String partitionTypeID) {
+		internalEnsureLoaded();
+		
+		Set descriptorsSet = new HashSet();
+		List contexts = this.getContexts(contentTypeID);
+		for(int i = 0; i < contexts.size(); ++i) {
+			CompletionProposalContentTypeContext contentSpecificContext =
+				(CompletionProposalContentTypeContext)contexts.get(i);
+			
+			//add all descriptors specific to the given content type and the given partition type
+			descriptorsSet.addAll(contentSpecificContext.getDescriptors(partitionTypeID));
+			
+			//add all descriptors specific to the given content type but not specific to a partition type
+			descriptorsSet.addAll(contentSpecificContext.getDescriptors(ALL_PARTITION_TYPES_ID));
+		}
+		
+		List descriptors = new ArrayList(descriptorsSet);
+		return descriptors != null ? Collections.unmodifiableList(descriptors) : Collections.EMPTY_LIST;
+	}
+	
+	/**
+	 * @param contentTypeID get only descriptors associated with this content type
+	 * @return all of the {@link CompletionProposalComputerDescriptor}s associated with the
+	 * given content type
+	 */
+	List getProposalComputerDescriptors(String contentTypeID) {
+		internalEnsureLoaded();
+		
+		Set descriptorsSet = new HashSet();
+		
+		List contexts = this.getContexts(contentTypeID);
+		for(int i = 0; i < contexts.size(); ++i) {
+			CompletionProposalContentTypeContext contentSpecificContext =
+				(CompletionProposalContentTypeContext)contexts.get(i);
+			
+			//add all descriptors specific to the given content type
+			descriptorsSet.addAll(contentSpecificContext.getDescriptors());
+		}
+		
+		List descriptors = new ArrayList(descriptorsSet);
+		return descriptors != null ? Collections.unmodifiableList(descriptors) : Collections.EMPTY_LIST;
+	}
+
+	/**
+	 * @return Unmodifiable list of all of the {@link CompletionProposalComputerDescriptor}s associated with
+	 * this registry
+	 */
+	List getProposalComputerDescriptors() {
+		internalEnsureLoaded();
+		return Collections.unmodifiableList( new ArrayList(fDescriptors.values()));
+	}
+
+	/**
+	 * <p>This method performs differently depending on the state of the registry</p>
+	 * <ul>
+	 * <li>{@link #NONE} - forces the registry to load now on the current thread</li>
+	 * <li>{@link #LOADING} - blocks until the registry has finished loading on
+	 * whichever thread it is being loaded on</li>
+	 * <li>{@link #LOADED} - immediately returns</li>
+	 * </ul>
+	 */
+	private void internalEnsureLoaded() {
+		switch (fState) {
+			case CompletionProposalComputerRegistry.NONE:
+			case CompletionProposalComputerRegistry.INITIALIZING: {
+				load();
+				break;
+			}
+			case CompletionProposalComputerRegistry.LOADING: {
+				//as soon as this lock is released the loading process is done
+				synchronized (fLoadingLock) {
+					//sanity check
+					Assert.isTrue(fState == CompletionProposalComputerRegistry.LOADED,
+							"The state of the registry should be guaranteed to be LOADED " + //$NON-NLS-1$
+							" once the loading lock has been released."); //$NON-NLS-1$
+				}
+				break;
+			}
+		}
+	}
+	
+	/**
+	 * <p>Loads the completion proposal extension points if they
+	 * have not been loaded already</p>
+	 */
+	private void load() {
+		/* hold this lock while loading, others waiting for load to
+		 * finish can synchronize on this lock to be guaranteed the load
+		 * will be done when the lock is released
+		 */
+		synchronized (fLoadingLock) {
+			if(fState == CompletionProposalComputerRegistry.NONE || fState == CompletionProposalComputerRegistry.INITIALIZING) {
+				//update the state
+				fState = CompletionProposalComputerRegistry.LOADING;
+				
+				IExtensionRegistry registry= Platform.getExtensionRegistry();
+				List extensionElements= new ArrayList(Arrays.asList(registry.getConfigurationElementsFor(SSEUIPlugin.ID, EXTENSION_POINT)));
+		
+				Map loadedDescriptors = new HashMap();
+				List extendedComputerActivations = new ArrayList();
+		
+				//get the categories and remove them from the extension elements
+				List categories= getCategories(extensionElements);
+				
+				//deal with the proposal computers and set aside the proposal computer activation extensions
+				for (Iterator iter= extensionElements.iterator(); iter.hasNext();) {
+					IConfigurationElement element= (IConfigurationElement) iter.next();
+					try {
+						if (element.getName().equals(ELEM_PROPOSAL_COMPUTER)) {
+							//create the descriptor and add it to the registry
+							CompletionProposalComputerDescriptor desc = new CompletionProposalComputerDescriptor(element, categories);
+							desc.addToRegistry();
+							loadedDescriptors.put(desc.getId(), desc);
+						} else if(element.getName().equals(ELEM_PROPOSAL_COMPUTER_EXTENDED_ACTIVATION)) {
+							extendedComputerActivations.add(element);
+						}
+		
+					} catch (InvalidRegistryObjectException x) {
+						/*
+						 * Element is not valid any longer as the contributing plug-in was unloaded or for
+						 * some other reason. Do not include the extension in the list and log it
+						 */
+						String message = "The extension ''" + element.toString() + "'' is invalid."; //$NON-NLS-1$ //$NON-NLS-2$
+						IStatus status= new Status(IStatus.WARNING, SSEUIPlugin.ID, IStatus.OK, message, x);
+						Logger.log(status);
+					} catch (CoreException x) {
+						Logger.log(x.getStatus());
+					}
+				}
+				
+				//deal with extended computer activations
+				for(int i = 0; i < extendedComputerActivations.size(); ++i) {
+					IConfigurationElement element = (IConfigurationElement)extendedComputerActivations.get(i);
+					String proposalComputerID = element.getAttribute(ATTR_ID);
+					CompletionProposalComputerDescriptor descriptor =
+						(CompletionProposalComputerDescriptor)loadedDescriptors.get(proposalComputerID);
+					if(descriptor != null) {
+						try {
+							//add the extra activation contexts to the registry
+							CompletionProposalComputerDescriptor.parseActivationAndAddToRegistry(element, descriptor);
+						} catch (InvalidRegistryObjectException x) {
+							/*
+							 * Element is not valid any longer as the contributing plug-in was unloaded or for
+							 * some other reason. Do not include the extension in the list and log it
+							 */
+							String message = "The extension ''" + element.toString() + "'' is invalid."; //$NON-NLS-1$ //$NON-NLS-2$
+							IStatus status= new Status(IStatus.WARNING, SSEUIPlugin.ID, IStatus.OK, message, x);
+							Logger.log(status);
+						} catch (CoreException x) {
+							Logger.log(x.getStatus());
+						}
+						
+					} else {
+						//activation extension has invalid computer ID
+						Logger.log(Logger.WARNING, "Configuration element " + element + //$NON-NLS-1$
+								" intented to extend an existing completion proposal computer" + //$NON-NLS-1$
+								" specified an invalid completion proposal computer ID " + //$NON-NLS-1$
+								proposalComputerID);
+					}
+				}
+		
+				fCategories.clear();
+				fCategories.addAll(categories);
+		
+				fDescriptors.clear();
+				fDescriptors.putAll(loadedDescriptors);
+				
+				updateUninstalledComputerCount();
+				
+				//update the state
+				fState = CompletionProposalComputerRegistry.LOADED;
+			}
+		}
+	}
+
+	/**
+	 * <p>Updates the uninstalled computer count</p>
+	 */
+	private void updateUninstalledComputerCount() {
+		IPreferenceStore preferenceStore = SSEUIPlugin.getDefault().getPreferenceStore();
+		int lastNumberOfComputers= preferenceStore.getInt(NUM_COMPUTERS_PREF_KEY);
+		int currNumber= fDescriptors.size();
+		fHasUninstalledComputers= lastNumberOfComputers > currNumber;
+		preferenceStore.putValue(NUM_COMPUTERS_PREF_KEY, Integer.toString(currNumber));
+	}
+
+	/**
+	 * <p>Configures the categories found in the given {@link IConfigurationElement}s
+	 * and removes them from the given list.</p>
+	 * 
+	 * @param extensionElements {@link IConfigurationElement}s that include proposal
+	 * category extensions
+	 * @return {@link CompletionProposalCategory}s created from the given
+	 * {@link IConfigurationElement}s that defined new proposal categories.
+	 */
+	private List getCategories(List extensionElements) {
+		List categories= new ArrayList();
+		for (Iterator iter= extensionElements.iterator(); iter.hasNext();) {
+			IConfigurationElement element= (IConfigurationElement) iter.next();
+			try {
+				if (element.getName().equals(ELEM_PROPOSAL_CATEGORY)) {
+					iter.remove(); // remove from list to leave only computers
+
+					CompletionProposalCategory category= new CompletionProposalCategory(element);
+					categories.add(category);
+				}
+			} catch (InvalidRegistryObjectException x) {
+				/* Element is not valid any longer as the contributing plug-in was unloaded or for
+				 * some other reason. Do not include the extension in the list and log it
+				 */
+				String message = "The extension ''" + element.toString() + "'' has become invalid."; //$NON-NLS-1$ //$NON-NLS-2$
+				IStatus status= new Status(IStatus.WARNING, SSEUIPlugin.ID, IStatus.OK, message, x);
+				Logger.log(status);
+			} catch (CoreException x) {
+				Logger.log(x.getStatus());
+			}
+		}
+		
+		return categories;
+	}
+	
+	/**
+	 * <p>Gets the {@link CompletionProposalContentTypeContext} associated with the given content type,
+	 * if one does not already exist then one is created</p>
+	 * 
+	 * @param contentTypeID get the {@link CompletionProposalContentTypeContext} associated with this content type
+	 * @return the existing or new {@link CompletionProposalContentTypeContext} associated with the given content type
+	 */
+	private CompletionProposalContentTypeContext getContext(String contentTypeID) {
+		CompletionProposalContentTypeContext context = (CompletionProposalContentTypeContext)this.fActivationContexts.get(contentTypeID);
+		if(context == null) {
+			context = new CompletionProposalContentTypeContext(contentTypeID);
+			this.fActivationContexts.put(contentTypeID, context);
+		}
+		
+		return context;
+	}
+	
+	/**
+	 * <p>Gets all of the {@link CompletionProposalContentTypeContext}s associated with
+	 * the given content type ID.  A context is considered associated if its associated content type ID
+	 * is either the given content type ID or is a base content type ID of the given content type ID.</p>
+	 * 
+	 * @param contentTypeID get the contexts for this content type ID
+	 * @return {@link List} of {@link CompletionProposalContentTypeContext}s associated with the given
+	 * content type ID
+	 */
+	private List getContexts(String contentTypeID) {
+		List contexts = new ArrayList();
+		IContentType contentType = Platform.getContentTypeManager().getContentType(contentTypeID);
+		
+		while(contentType != null) {
+			Object context = this.fActivationContexts.get(contentType.getId());
+			if(context != null) {
+				contexts.add(context);
+			}
+			
+			contentType = contentType.getBaseType();
+		}
+		
+		return contexts;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalContentTypeContext.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalContentTypeContext.java
new file mode 100644
index 0000000..75ffdf0
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalContentTypeContext.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * <p>There should be one context for each content type. It keeps track
+ * of the describers associated with different partition types for its unique
+ * content type.</p>
+ */
+public class CompletionProposalContentTypeContext {
+
+	/** the content type this context is associated with */
+	private final String fContentTypeID;
+	
+	/**
+	 * 
+	 * <code>{@link Map}&lt{@link String}, {@link Set}&lt{@link CompletionProposalComputerDescriptor}&gt&gt</code>
+	 * <ul>
+	 * <li><b>key:</b> partition type ID</li>
+	 * <li><b>value:</b> {@link Set} of associated computer descriptors</li>
+	 * </ul>
+	 */
+	private Map fPartitionTypesToDescriptors;
+	
+	/**
+	 * <p>Create a new context for the given content type ID.</p>
+	 * <p>There should only ever be one context for any unique content type</p>
+	 * @param contentTypeID the content type this context is for
+	 */
+	public CompletionProposalContentTypeContext(String contentTypeID) {
+		this.fContentTypeID = contentTypeID;
+		this.fPartitionTypesToDescriptors = new HashMap();
+	}
+	
+	/**
+	 * <p>Adds a describer to this context for a given partition type.  There
+	 * can be more then one describer for one partition type.</p>
+	 * 
+	 * @param partitionTypeID the partition type to associate the given descriptor with
+	 * @param descriptor {@link CompletionProposalComputerDescriptor} to associate with the given
+	 * partition type in this context
+	 */
+	public void putDescriptor(String partitionTypeID, CompletionProposalComputerDescriptor descriptor) {
+		Set descriptors = (Set)this.fPartitionTypesToDescriptors.get(partitionTypeID);
+		if(descriptors != null) {
+			descriptors.add(descriptor);
+		} else {
+			descriptors = new HashSet();
+			descriptors.add(descriptor);
+			this.fPartitionTypesToDescriptors.put(partitionTypeID, descriptors);
+		}
+	}
+	
+	/**
+	 * @return All of the {@link CompletionProposalComputerDescriptor}s associated with
+	 * any partition type in this context
+	 */
+	public Set getDescriptors() {
+		Set allDescriptors = new HashSet();
+		Collection descriptorSets = this.fPartitionTypesToDescriptors.values();
+		Iterator iter = descriptorSets.iterator();
+		while(iter.hasNext()) {
+			Set descriptorSet = (Set)iter.next();
+			allDescriptors.addAll(descriptorSet);
+		}
+		
+		return Collections.unmodifiableSet(allDescriptors);
+	}
+	
+	/**
+	 * @param partitionTypeID get {@link CompletionProposalComputerDescriptor}s for only this partition type
+	 * for this context
+	 * @return {@link CompletionProposalComputerDescriptor}s assoicated with the given partition type
+	 * in this context
+	 */
+	public Set getDescriptors(String partitionTypeID) {
+		Set descriptors = (Set)this.fPartitionTypesToDescriptors.get(partitionTypeID);
+		return descriptors != null ? Collections.unmodifiableSet(descriptors) : Collections.EMPTY_SET;
+	}
+	
+	/**
+	 * @return the content type this context is for
+	 */
+	public String getContentTypeID() {
+		return fContentTypeID;
+	}
+	
+	/**
+	 * @return the hash code of the content type ID
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return fContentTypeID.hashCode();
+	}
+	
+	/**
+	 * <p>Two {@link CompletionProposalContentTypeContext} are equal if they have the
+	 * same content type ID.</p>
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		boolean equal = false;
+		if(obj instanceof CompletionProposalContentTypeContext) {
+			equal = this.fContentTypeID.equals(((CompletionProposalContentTypeContext)obj).fContentTypeID);
+		}
+		
+		return equal;
+	}
+	
+	/**
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buff = new StringBuffer(this.fContentTypeID);
+		Set partitions = this.fPartitionTypesToDescriptors.keySet();
+		Iterator partitionsIter = partitions.iterator();
+		while(partitionsIter.hasNext()) {
+			String partitionType = (String)partitionsIter.next();
+			buff.append("\n\t" + partitionType); //$NON-NLS-1$
+			List descriptors = (List)this.fPartitionTypesToDescriptors.get(partitionType);
+			for(int i = 0; i < descriptors.size(); ++i) {
+				buff.append("\n\t\t" + descriptors.get(i).toString()); //$NON-NLS-1$
+			}
+		}
+		
+		return buff.toString();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposoalCatigoriesConfigurationRegistry.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposoalCatigoriesConfigurationRegistry.java
new file mode 100644
index 0000000..a84944a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposoalCatigoriesConfigurationRegistry.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.InvalidRegistryObjectException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationReader;
+import org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter;
+
+/**
+ * <p>A registry for all extensions to the
+ * <code>org.eclipse.wst.sse.ui.completionProposalCategoriesConfiguration</code>
+ * extension point.</p>
+ */
+public final class CompletionProposoalCatigoriesConfigurationRegistry {
+	/** The extension schema name of the extension point */
+	private static final String EXTENSION_POINT = "completionProposalCategoriesConfiguration"; //$NON-NLS-1$
+
+	/** The extension schema name of categories properties child elements */
+	private static final String ELEM_CATEGORIES_PROPERTIES = "categoriesConfiguration"; //$NON-NLS-1$
+	
+	/** The extension schema name of the content type id attribute */
+	private static final String ATTR_CONTENT_TYPE_ID = "contentTypeID"; //$NON-NLS-1$
+	
+	/** The extension schema name of the class attribute */
+	private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
+	
+	/** The singleton instance. */
+	private static CompletionProposoalCatigoriesConfigurationRegistry fgSingleton = null;
+	
+	/** <code>true</code> if this registry has been loaded. */
+	private boolean fLoaded;
+	
+	/**
+	 * <code>{@link Map}<{@link String}, {@link ICompletionProposalCategoriesConfigurationReader}></code>
+	 * <ul>
+	 * <li><b>key:</b> Content Type ID</li>
+	 * <li><b>value:</b> Categories Properties</li>
+	 */
+	private Map fPropertiesByContentTypeID;
+	
+	/**
+	 * @return the singleton instance of this registry
+	 */
+	public static synchronized CompletionProposoalCatigoriesConfigurationRegistry getDefault() {
+		if (fgSingleton == null) {
+			fgSingleton = new CompletionProposoalCatigoriesConfigurationRegistry();
+		}
+
+		return fgSingleton;
+	}
+	
+	/**
+	 * Private constructor to create singleton instance
+	 */
+	private CompletionProposoalCatigoriesConfigurationRegistry() {
+		this.fLoaded = false;
+		this.fPropertiesByContentTypeID = new HashMap();
+	}
+	
+	/**
+	 * @param contentTypeID get the {@link ICompletionProposalCategoriesConfigurationReader} associated
+	 * with the given content type
+	 * @return the {@link ICompletionProposalCategoriesConfigurationReader} associated
+	 * with the given content type, or <code>null</code> if one does not exist.
+	 */
+	public ICompletionProposalCategoriesConfigurationReader getReadableConfiguration(String contentTypeID) {
+		this.ensureLoaded();
+		return (ICompletionProposalCategoriesConfigurationReader)this.fPropertiesByContentTypeID.get(contentTypeID);
+	}
+	
+	/**
+	 * @param contentTypeID get the {@link ICompletionProposalCategoriesConfigurationWriter} associated
+	 * with the given content type
+	 * @return the {@link ICompletionProposalCategoriesConfigurationWriter} associated
+	 * with the given content type, or <code>null</code> if one does not exist.
+	 */
+	public ICompletionProposalCategoriesConfigurationWriter getWritableConfiguration(String contentTypeID) {
+		this.ensureLoaded();
+		
+		ICompletionProposalCategoriesConfigurationReader reader = getReadableConfiguration(contentTypeID);
+		ICompletionProposalCategoriesConfigurationWriter writer = null;
+		if(reader instanceof ICompletionProposalCategoriesConfigurationWriter) {
+			writer = (ICompletionProposalCategoriesConfigurationWriter)reader;
+		}
+		
+		return writer;
+	}
+	
+	/**
+	 * Ensures the <code>org.eclipse.wst.sse.ui.completionProposalCategoriesConfiguration</code>
+	 * extensions have been loaded
+	 */
+	private void ensureLoaded() {
+		if(!this.fLoaded) {
+			this.load();
+			this.fLoaded = true;
+		}
+	}
+	
+	/**
+	 * Loads the <code>org.eclipse.wst.sse.ui.completionProposalCategoriesConfiguration</code> extensions
+	 */
+	private void load() {
+		//get the extensions
+		IExtensionRegistry registry= Platform.getExtensionRegistry();
+		List extensionElements= new ArrayList(Arrays.asList(registry.getConfigurationElementsFor(SSEUIPlugin.ID, EXTENSION_POINT)));
+		
+		//for each element get its attributes and add it to the map of properties
+		Iterator elementsIter = extensionElements.iterator();
+		while(elementsIter.hasNext()) {
+			IConfigurationElement element = (IConfigurationElement)elementsIter.next();
+			
+			try {
+				if(element.getName().equals(ELEM_CATEGORIES_PROPERTIES)) {				
+					String contentTypeID = element.getAttribute(ATTR_CONTENT_TYPE_ID);
+					ContentAssistUtils.checkExtensionAttributeNotNull(contentTypeID, ATTR_CONTENT_TYPE_ID, element);
+					
+					String pageClass = element.getAttribute(ATTR_CLASS);
+					ContentAssistUtils.checkExtensionAttributeNotNull(pageClass, ATTR_CLASS, element);
+					
+					ICompletionProposalCategoriesConfigurationReader props =
+						(ICompletionProposalCategoriesConfigurationReader)element.createExecutableExtension(ATTR_CLASS);
+				
+					if(!this.fPropertiesByContentTypeID.containsKey(contentTypeID)){
+						this.fPropertiesByContentTypeID.put(contentTypeID, props);
+					} else {
+						Logger.log(Logger.ERROR, "Extension " + element.getDeclaringExtension() + //$NON-NLS-1$
+								" is attempting to to define itself as the proposal cateigories" + //$NON-NLS-1$
+								" configuration for content type " + contentTypeID + " when another" + //$NON-NLS-1$ //$NON-NLS-2$
+								" extensions has already done so."); //$NON-NLS-1$
+					}
+				} else {
+					//extension specified element that is not valid for this extension
+					Logger.log(Logger.WARNING, "The element " + element + " is not valid for the" + //$NON-NLS-1$ //$NON-NLS-2$
+							"org.eclipse.wst.sse.ui.completionProposalCategoriesConfiguration" + //$NON-NLS-1$
+							" extension point.  Only " + ELEM_CATEGORIES_PROPERTIES + //$NON-NLS-1$
+							" elements are valid."); //$NON-NLS-1$
+				}
+			} catch (InvalidRegistryObjectException x) {
+				/*
+				 * Element is not valid any longer as the contributing plug-in was unloaded
+				 * or for some other reason. 
+				 */
+				String message = "The extension ''" + element.toString() + "'' has become invalid."; //$NON-NLS-1$ //$NON-NLS-2$
+				IStatus status= new Status(IStatus.WARNING, SSEUIPlugin.ID, IStatus.OK, message, x);
+				Logger.log(status);
+			} catch (CoreException x) {
+				Logger.log(x.getStatus());
+			}
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompoundContentAssistProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompoundContentAssistProcessor.java
new file mode 100644
index 0000000..49c0ae7
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompoundContentAssistProcessor.java
@@ -0,0 +1,561 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.contentassist.IContentAssistSubjectControl;
+import org.eclipse.jface.contentassist.ISubjectControlContentAssistProcessor;
+import org.eclipse.jface.contentassist.ISubjectControlContextInformationPresenter;
+import org.eclipse.jface.contentassist.ISubjectControlContextInformationValidator;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationExtension;
+import org.eclipse.jface.text.contentassist.IContextInformationPresenter;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.sse.ui.internal.IReleasable;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+/**
+ * <p>A processor that aggregates the proposals of multiple other processors.
+ * When proposals are requested, the contained processors are queried in the
+ * order they were added to the compound object. Copied from
+ * org.eclipse.jdt.internal.ui.text.CompoundContentAssistProcessor.
+ * Modification was made to add a dispose() method.</p>
+ */
+public class CompoundContentAssistProcessor implements IContentAssistProcessor, ISubjectControlContentAssistProcessor, IReleasable {
+
+	/** the compound processors */
+	private final Set fProcessors = new LinkedHashSet();
+	
+	/** Aggregated error message from the compound processors */
+	private String fErrorMessage;
+
+	/**
+	 * Creates a new instance.
+	 */
+	public CompoundContentAssistProcessor() {
+	}
+
+	/**
+	 * Creates a new instance with one child processor.
+	 * 
+	 * @param processor
+	 *            the processor to add
+	 */
+	public CompoundContentAssistProcessor(IContentAssistProcessor processor) {
+		add(processor);
+	}
+
+	/**
+	 * Adds a processor to this compound processor.
+	 * 
+	 * @param processor
+	 *            the processor to add
+	 */
+	public void add(IContentAssistProcessor processor) {
+		Assert.isNotNull(processor);
+		fProcessors.add(processor);
+	}
+	
+	/**
+	 * @param processor check to see if this {@link IContentAssistProcessor} is one
+	 * in this compound processor.
+	 * 
+	 * @return <code>true</code> if this compound processor contains the given processor,
+	 * <code>false</code> otherwise
+	 */
+	public boolean containsProcessor(IContentAssistProcessor processor) {
+		return fProcessors.contains(processor);
+	}
+
+	/**
+	 * Removes a processor from this compound processor.
+	 * 
+	 * @param processor
+	 *            the processor to remove
+	 */
+	public void remove(IContentAssistProcessor processor) {
+		fProcessors.remove(processor);
+	}
+
+	/**
+	 * Creates a new instance and adds all specified processors.
+	 * 
+	 * @param processors
+	 */
+	public CompoundContentAssistProcessor(IContentAssistProcessor[] processors) {
+		for (int i = 0; i < processors.length; i++) {
+			add(processors[i]);
+		}
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer,
+	 *      int)
+	 */
+	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
+		fErrorMessage = null;
+		List ret = new LinkedList();
+		for (Iterator it = fProcessors.iterator(); it.hasNext();) {
+			IContentAssistProcessor p = (IContentAssistProcessor) it.next();
+			try {
+				// isolate calls to each processor
+				ICompletionProposal[] proposals = p.computeCompletionProposals(viewer, documentOffset);
+				if (proposals != null && proposals.length > 0) {
+					ret.addAll(Arrays.asList(proposals));
+					fErrorMessage = null; // Hide previous errors
+				}
+				else {
+					if (fErrorMessage == null && ret.isEmpty()) {
+						String errorMessage = p.getErrorMessage();
+						if (errorMessage != null) {
+							fErrorMessage = errorMessage;
+						}
+					}
+				}
+			}
+			catch (Exception e) {
+				Logger.logException(e);
+			}
+		}
+		return (ICompletionProposal[]) ret.toArray(new ICompletionProposal[ret.size()]);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * The returned objects are wrapper objects around the real information
+	 * containers.
+	 * </p>
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer,
+	 *      int)
+	 */
+	public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
+		fErrorMessage = null;
+		List ret = new LinkedList();
+		for (Iterator it = fProcessors.iterator(); it.hasNext();) {
+			IContentAssistProcessor p = (IContentAssistProcessor) it.next();
+			IContextInformation[] informations = p.computeContextInformation(viewer, documentOffset);
+			if (informations != null && informations.length > 0) {
+				for (int i = 0; i < informations.length; i++)
+					ret.add(new WrappedContextInformation(informations[i], p));
+				fErrorMessage = null; // Hide previous errors
+			} else {
+				if (fErrorMessage == null && ret.isEmpty()) {
+					String errorMessage = p.getErrorMessage();
+					if (errorMessage != null) {
+						fErrorMessage = errorMessage;
+					}
+				}
+			}
+		}
+		return (IContextInformation[]) ret.toArray(new IContextInformation[ret.size()]);
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+	 */
+	public char[] getCompletionProposalAutoActivationCharacters() {
+		Set ret = new LinkedHashSet();
+		for (Iterator it = fProcessors.iterator(); it.hasNext();) {
+			IContentAssistProcessor p = (IContentAssistProcessor) it.next();
+			char[] chars = p.getCompletionProposalAutoActivationCharacters();
+			if (chars != null)
+				for (int i = 0; i < chars.length; i++)
+					ret.add(new Character(chars[i]));
+		}
+
+		char[] chars = new char[ret.size()];
+		int i = 0;
+		for (Iterator it = ret.iterator(); it.hasNext(); i++) {
+			Character ch = (Character) it.next();
+			chars[i] = ch.charValue();
+		}
+		return chars;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
+	 */
+	public char[] getContextInformationAutoActivationCharacters() {
+		Set ret = new LinkedHashSet();
+		for (Iterator it = fProcessors.iterator(); it.hasNext();) {
+			IContentAssistProcessor p = (IContentAssistProcessor) it.next();
+			char[] chars = p.getContextInformationAutoActivationCharacters();
+			if (chars != null)
+				for (int i = 0; i < chars.length; i++)
+					ret.add(new Character(chars[i]));
+		}
+
+		char[] chars = new char[ret.size()];
+		int i = 0;
+		for (Iterator it = ret.iterator(); it.hasNext(); i++) {
+			Character ch = (Character) it.next();
+			chars[i] = ch.charValue();
+		}
+		return chars;
+	}
+
+	/**
+	 * Returns the error message of one of
+	 * contained processor if any, or <code>null</code> if no processor has an
+	 * error message.
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
+	 * @return {@inheritDoc}
+	 */
+	public String getErrorMessage() {
+		return fErrorMessage;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * The returned validator is a wrapper around the validators provided by
+	 * the child processors.
+	 * </p>
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
+	 */
+	public IContextInformationValidator getContextInformationValidator() {
+		boolean hasValidator = false;
+		boolean hasPresenter = false;
+		boolean hasExtension = false;
+
+		Iterator itp = fProcessors.iterator();
+		while (itp.hasNext() && (!hasPresenter || !hasExtension)) {
+			IContentAssistProcessor p = (IContentAssistProcessor) itp.next();
+			IContextInformationValidator v = p.getContextInformationValidator();
+			if (v != null) {
+				hasValidator = true;
+				if (v instanceof IContextInformationPresenter) {
+					hasPresenter = true;
+				}
+				if (v instanceof ISubjectControlContextInformationPresenter || v instanceof ISubjectControlContextInformationValidator) {
+					hasExtension = true;
+				}
+			}
+		}
+
+		CompoundContentAssistValidator validator = null;
+		if (hasPresenter && hasExtension)
+			validator = new CompoundContentAssistValidatorPresenterEx();
+		else if (hasPresenter)
+			validator = new CompoundContentAssistValidatorPresenter();
+		else if (hasExtension)
+			validator = new CompoundContentAssistValidatorEx();
+		else if (hasValidator)
+			validator = new CompoundContentAssistValidator();
+
+		if (validator != null)
+			for (Iterator it = fProcessors.iterator(); it.hasNext();) {
+				IContentAssistProcessor p = (IContentAssistProcessor) it.next();
+				IContextInformationValidator v = p.getContextInformationValidator();
+				if (v != null)
+					validator.add(v);
+			}
+
+		return validator;
+	}
+
+	/*
+	 * @see ISubjectControlContentAssistProcessor#computeCompletionProposals(IContentAssistSubjectControl,
+	 *      int)
+	 */
+	public ICompletionProposal[] computeCompletionProposals(IContentAssistSubjectControl contentAssistSubjectControl, int documentOffset) {
+		fErrorMessage = null;
+		List ret = new LinkedList();
+		for (Iterator it = fProcessors.iterator(); it.hasNext();) {
+			Object o = it.next();
+			if (o instanceof ISubjectControlContentAssistProcessor) {
+				ISubjectControlContentAssistProcessor p = (ISubjectControlContentAssistProcessor) o;
+				ICompletionProposal[] proposals = p.computeCompletionProposals(contentAssistSubjectControl, documentOffset);
+				if (proposals != null && proposals.length > 0) {
+					ret.addAll(Arrays.asList(proposals));
+					fErrorMessage = null; // Hide previous errors
+				} else {
+					if (fErrorMessage == null && ret.isEmpty()) {
+						String errorMessage = p.getErrorMessage();
+						if (errorMessage != null) {
+							fErrorMessage = errorMessage;
+						}
+					}
+				}
+			}
+		}
+
+		return (ICompletionProposal[]) ret.toArray(new ICompletionProposal[ret.size()]);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * The returned objects are wrapper objects around the real information
+	 * containers.
+	 * </p>
+	 * 
+	 * @see org.eclipse.jface.contentassist.ISubjectControlContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.contentassist.IContentAssistSubject,
+	 *      int)
+	 */
+	public IContextInformation[] computeContextInformation(IContentAssistSubjectControl contentAssistSubjectControl, int documentOffset) {
+		fErrorMessage = null;
+		List ret = new LinkedList();
+		for (Iterator it = fProcessors.iterator(); it.hasNext();) {
+			Object o = it.next();
+			if (o instanceof ISubjectControlContentAssistProcessor) {
+				ISubjectControlContentAssistProcessor p = (ISubjectControlContentAssistProcessor) o;
+				IContextInformation[] informations = p.computeContextInformation(contentAssistSubjectControl, documentOffset);
+				if (informations != null && informations.length > 0) {
+					for (int i = 0; i < informations.length; i++)
+						ret.add(new WrappedContextInformation(informations[i], p));
+					fErrorMessage = null; // Hide previous errors
+				} else {
+					if (fErrorMessage == null && ret.isEmpty()) {
+						String errorMessage = p.getErrorMessage();
+						if (errorMessage != null) {
+							fErrorMessage = errorMessage;
+						}
+					}
+				}
+			}
+		}
+		return (IContextInformation[]) ret.toArray(new IContextInformation[ret.size()]);
+	}
+
+	/**
+	 * Dispose of any content assist processors that need disposing
+	 * @deprecated use {@link #release()}
+	 */
+	public void dispose() {
+		this.release();
+	}
+	
+	/**
+	 * @see org.eclipse.wst.sse.ui.internal.IReleasable#release()
+	 */
+	public void release() {
+		// go through list of content assist processors and dispose
+		for (Iterator it = fProcessors.iterator(); it.hasNext();) {
+			IContentAssistProcessor p = (IContentAssistProcessor) it.next();
+			if (p instanceof IReleasable) {
+				((IReleasable) p).release();
+			}
+		}
+		fProcessors.clear();
+	}
+	
+	private static class WrappedContextInformation implements IContextInformation, IContextInformationExtension {
+		private IContextInformation fInfo;
+		private IContentAssistProcessor fProcessor;
+
+		WrappedContextInformation(IContextInformation info, IContentAssistProcessor processor) {
+			fInfo = info;
+			fProcessor = processor;
+		}
+
+		/*
+		 * @see java.lang.Object#equals(java.lang.Object)
+		 */
+		public boolean equals(Object obj) {
+			return fInfo.equals(obj);
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.contentassist.IContextInformation#getContextDisplayString()
+		 */
+		public String getContextDisplayString() {
+			return fInfo.getContextDisplayString();
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.contentassist.IContextInformation#getImage()
+		 */
+		public Image getImage() {
+			return fInfo.getImage();
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.contentassist.IContextInformation#getInformationDisplayString()
+		 */
+		public String getInformationDisplayString() {
+			return fInfo.getInformationDisplayString();
+		}
+
+		/*
+		 * @see java.lang.Object#hashCode()
+		 */
+		public int hashCode() {
+			return fInfo.hashCode();
+		}
+
+		/*
+		 * @see java.lang.Object#toString()
+		 */
+		public String toString() {
+			return fInfo.toString();
+		}
+
+		IContentAssistProcessor getProcessor() {
+			return fProcessor;
+		}
+
+		IContextInformation getContextInformation() {
+			return fInfo;
+		}
+
+		public int getContextInformationPosition() {
+			int position = -1;
+			if (fInfo instanceof IContextInformationExtension)
+				position = ((IContextInformationExtension)fInfo).getContextInformationPosition();
+			return position;
+		}
+	}
+	
+	private static class CompoundContentAssistValidator implements IContextInformationValidator {
+		List fValidators = new ArrayList();
+		IContextInformationValidator fValidator;
+
+		void add(IContextInformationValidator validator) {
+			fValidators.add(validator);
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.contentassist.IContextInformationValidator#install(org.eclipse.jface.text.contentassist.IContextInformation,
+		 *      org.eclipse.jface.text.ITextViewer, int)
+		 */
+		public void install(IContextInformation info, ITextViewer viewer, int documentPosition) {
+			// install either the validator in the info, or all validators
+			fValidator = getValidator(info);
+			IContextInformation realInfo = getContextInformation(info);
+			if (fValidator != null)
+				fValidator.install(realInfo, viewer, documentPosition);
+			else {
+				for (Iterator it = fValidators.iterator(); it.hasNext();) {
+					IContextInformationValidator v = (IContextInformationValidator) it.next();
+					v.install(realInfo, viewer, documentPosition);
+				}
+			}
+		}
+
+		IContextInformationValidator getValidator(IContextInformation info) {
+			if (info instanceof WrappedContextInformation) {
+				WrappedContextInformation wrap = (WrappedContextInformation) info;
+				return wrap.getProcessor().getContextInformationValidator();
+			}
+
+			return null;
+		}
+
+		IContextInformation getContextInformation(IContextInformation info) {
+			IContextInformation realInfo = info;
+			if (info instanceof WrappedContextInformation) {
+				WrappedContextInformation wrap = (WrappedContextInformation) info;
+				realInfo = wrap.getContextInformation();
+			}
+
+			return realInfo;
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.contentassist.IContextInformationValidator#isContextInformationValid(int)
+		 */
+		public boolean isContextInformationValid(int documentPosition) {
+			// use either the validator in the info, or all validators
+			boolean isValid = false;
+			if (fValidator != null)
+				isValid = fValidator.isContextInformationValid(documentPosition);
+			else {
+				for (Iterator it = fValidators.iterator(); it.hasNext();) {
+					IContextInformationValidator v = (IContextInformationValidator) it.next();
+					isValid |= v.isContextInformationValid(documentPosition);
+				}
+			}
+			return isValid;
+		}
+
+	}
+
+	private static class CompoundContentAssistValidatorPresenter extends CompoundContentAssistValidator implements IContextInformationPresenter {
+		public boolean updatePresentation(int offset, TextPresentation presentation) {
+			// use either the validator in the info, or all validators
+			boolean presentationUpdated = false;
+			if (fValidator instanceof IContextInformationPresenter)
+				presentationUpdated = ((IContextInformationPresenter) fValidator).updatePresentation(offset, presentation);
+			else {
+				for (Iterator it = fValidators.iterator(); it.hasNext();) {
+					IContextInformationValidator v = (IContextInformationValidator) it.next();
+					if (v instanceof IContextInformationPresenter)
+						presentationUpdated |= ((IContextInformationPresenter) v).updatePresentation(offset, presentation);
+				}
+			}
+			return presentationUpdated;
+		}
+	}
+
+	private static class CompoundContentAssistValidatorEx extends CompoundContentAssistValidator implements ISubjectControlContextInformationValidator {
+		/*
+		 * @see ISubjectControlContextInformationValidator#install(IContextInformation,
+		 *      IContentAssistSubjectControl, int)
+		 */
+		public void install(IContextInformation info, IContentAssistSubjectControl contentAssistSubjectControl, int documentPosition) {
+			// install either the validator in the info, or all validators
+			fValidator = getValidator(info);
+			IContextInformation realInfo = getContextInformation(info);
+			if (fValidator instanceof ISubjectControlContextInformationValidator)
+				((ISubjectControlContextInformationValidator) fValidator).install(realInfo, contentAssistSubjectControl, documentPosition);
+			else {
+				for (Iterator it = fValidators.iterator(); it.hasNext();) {
+					if (it.next() instanceof ISubjectControlContextInformationValidator)
+						((ISubjectControlContextInformationValidator) it.next()).install(realInfo, contentAssistSubjectControl, documentPosition);
+				}
+			}
+		}
+
+	}
+
+	private static class CompoundContentAssistValidatorPresenterEx extends CompoundContentAssistValidatorPresenter implements ISubjectControlContextInformationPresenter, ISubjectControlContextInformationValidator {
+		/*
+		 * @see ISubjectControlContextInformationPresenter#install(IContextInformation,
+		 *      IContentAssistSubjectControl, int)
+		 */
+		public void install(IContextInformation info, IContentAssistSubjectControl contentAssistSubjectControl, int documentPosition) {
+			// install either the validator in the info, or all validators
+			fValidator = getValidator(info);
+			IContextInformation realInfo = getContextInformation(info);
+
+			if (fValidator instanceof ISubjectControlContextInformationValidator)
+				((ISubjectControlContextInformationValidator) fValidator).install(realInfo, contentAssistSubjectControl, documentPosition);
+			else {
+				for (Iterator it = fValidators.iterator(); it.hasNext();) {
+					if (it.next() instanceof ISubjectControlContextInformationValidator)
+						((ISubjectControlContextInformationValidator) it.next()).install(realInfo, contentAssistSubjectControl, documentPosition);
+				}
+			}
+		}
+
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/ContentAssistUtils.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/ContentAssistUtils.java
new file mode 100644
index 0000000..9b1fa92
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/ContentAssistUtils.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.InvalidRegistryObjectException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+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.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * @author pavery
+ *  
+ */
+public class ContentAssistUtils {
+
+	/**
+	 * Returns the closest IndexedRegion for the offset and viewer allowing
+	 * for differences between viewer offsets and model positions. note: this
+	 * method returns an IndexedRegion for read only
+	 * 
+	 * @param viewer
+	 *            the viewer whose document is used to compute the proposals
+	 * @param documentOffset
+	 *            an offset within the document for which completions should
+	 *            be computed
+	 * @return an IndexedRegion
+	 */
+	public static IndexedRegion getNodeAt(ITextViewer viewer, int documentOffset) {
+
+		if (viewer == null)
+			return null;
+
+		IndexedRegion node = null;
+		IModelManager mm = StructuredModelManager.getModelManager();
+		IStructuredModel model = null;
+		if (mm != null)
+			model = mm.getExistingModelForRead(viewer.getDocument());
+		try {
+			if (model != null) {
+				int lastOffset = documentOffset;
+				node = model.getIndexedRegion(documentOffset);
+				while (node == null && lastOffset >= 0) {
+					lastOffset--;
+					node = model.getIndexedRegion(lastOffset);
+				}
+			}
+		} finally {
+			if (model != null)
+				model.releaseFromRead();
+		}
+		return node;
+	}
+
+	/**
+	 * Returns the closest IStructuredDocumentRegion for the offest and
+	 * viewer.
+	 * 
+	 * @param viewer
+	 * @param documentOffset
+	 * @return the closest IStructuredDocumentRegion for the offest and
+	 *         viewer.
+	 */
+	public static IStructuredDocumentRegion getStructuredDocumentRegion(ITextViewer viewer, int documentOffset) {
+		IStructuredDocumentRegion sdRegion = null;
+		if (viewer == null || viewer.getDocument() == null)
+			return null;
+
+		int lastOffset = documentOffset;
+		IStructuredDocument doc = (IStructuredDocument) viewer.getDocument();
+		sdRegion = doc.getRegionAtCharacterOffset(documentOffset);
+		while (sdRegion == null && lastOffset >= 0) {
+			lastOffset--;
+			sdRegion = doc.getRegionAtCharacterOffset(lastOffset);
+		}
+		return sdRegion;
+	}
+	
+	/**
+	 * @return the bundle that defined the {@link IConfigurationElement} that defines
+	 * this category.
+	 */
+	public static Bundle getBundle(IConfigurationElement element) {
+		String namespace= element.getDeclaringExtension().getContributor().getName();
+		Bundle bundle= Platform.getBundle(namespace);
+		return bundle;
+	}
+	
+	/**
+	 * <p>Checks that the given attribute value is not <code>null</code>.</p>
+	 *
+	 * @param value the object to check if not null
+	 * @param attribute the attribute
+	 * 
+	 * @throws InvalidRegistryObjectException if the registry element is no longer valid
+	 * @throws CoreException if <code>value</code> is <code>null</code>
+	 */
+	public static void checkExtensionAttributeNotNull(Object value, String attribute,
+			IConfigurationElement element) throws InvalidRegistryObjectException, CoreException {
+		
+		if (value == null) {
+			String message = "The extension \"" + element.getDeclaringExtension().getUniqueIdentifier() + //$NON-NLS-1$
+				"\" from plug-in \"" + element.getContributor().getName() + //$NON-NLS-1$
+				"\" did not specify a value for the required \"" + attribute + //$NON-NLS-1$
+				"\" attribute for the element \"" + element.getName() + "\". Disabling the extension."; //$NON-NLS-1$ //$NON-NLS-2$
+			IStatus status= new Status(IStatus.WARNING, SSEUIPlugin.ID, IStatus.OK, message, null);
+			throw new CoreException(status);
+		}
+	}
+	
+	/**
+	 * @param textViewer check to see if this viewer is empty
+	 * @return <code>true</code> if there is no text or it's all white space,
+	 * <code>false</code> otherwise
+	 */
+	public static boolean isViewerEmpty(ITextViewer textViewer) {
+		boolean isEmpty = false;
+		String text = textViewer.getTextWidget().getText();
+		if ((text == null) || ((text != null) && text.trim().equals(""))) { //$NON-NLS-1$
+			isEmpty = true;
+		}
+		return isEmpty;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/ContextInformationValidator.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/ContextInformationValidator.java
new file mode 100644
index 0000000..cbaf65f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/ContextInformationValidator.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+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.text.IStructuredDocument;
+
+/**
+ * <p>A {@link IContextInformationValidator} for structured documents</p>
+ */
+public class ContextInformationValidator implements IContextInformationValidator {
+
+	/** the installed document position */
+	private int fDocumentPosition;
+
+	/** the installed document */
+	private IStructuredDocument fDocument;
+	
+	/** the installed region start*/
+	private IndexedRegion fRegion;
+	
+	/**
+	 * <p>Default constructor</p>
+	 */
+	public ContextInformationValidator() {
+		fDocumentPosition = -1;
+		fDocument = null;
+	}
+	
+	/**
+	 * @see org.eclipse.jface.text.contentassist.IContextInformationValidator#install(org.eclipse.jface.text.contentassist.IContextInformation,
+	 *      org.eclipse.jface.text.ITextViewer, int)
+	 */
+	public void install(IContextInformation info, ITextViewer viewer, int documentPosition) {
+		fDocumentPosition = documentPosition;
+		fDocument = (IStructuredDocument)viewer.getDocument();
+	}
+	
+	/**
+	 * @see org.eclipse.jface.text.contentassist.IContextInformationValidator#isContextInformationValid(int)
+	 */
+	public boolean isContextInformationValid(int documentPosition) {
+		/*
+		 * determine whether or not this context info should still be
+		 * showing... if cursor still within the same region then it's valid
+		 */
+		boolean result = false;
+
+		calculateInstalledIndexedRegion();
+		
+		if (fRegion != null) {
+			int start = fRegion.getStartOffset();
+			int end = fRegion.getEndOffset();
+			result = (documentPosition < end) && (documentPosition > start + 1);
+		}
+		return result;
+	}
+	
+	/**
+	 * @return {@link IndexedRegion} that this validator was installed on
+	 */
+	private void calculateInstalledIndexedRegion() {
+		if (fRegion == null) {
+			IStructuredModel model = null;
+			try {
+				model = StructuredModelManager.getModelManager().getModelForRead(fDocument);
+				if (model != null) {
+					fRegion = model.getIndexedRegion(fDocumentPosition);
+				}
+			}
+			finally {
+				if (model != null)
+					model.releaseFromRead();
+			}
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CustomCompletionProposal.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CustomCompletionProposal.java
new file mode 100644
index 0000000..61d9b5f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CustomCompletionProposal.java
@@ -0,0 +1,336 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension5;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposalExtension;
+import org.eclipse.jface.text.contentassist.ICompletionProposalExtension2;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.wst.sse.core.internal.util.Debug;
+
+/**
+ * An implementation of ICompletionProposal whose values can be read after
+ * creation.
+ */
+public class CustomCompletionProposal implements ICompletionProposal, ICompletionProposalExtension, ICompletionProposalExtension2, IRelevanceCompletionProposal {
+
+	private String fAdditionalProposalInfo;
+
+	private IContextInformation fContextInformation;
+
+	private int fCursorPosition = 0;
+
+	private String fDisplayString;
+
+	private Image fImage;
+
+	private int fOriginalReplacementLength;
+
+	private int fRelevance = IRelevanceConstants.R_NONE;
+
+	private int fReplacementLength = 0;
+
+	private int fReplacementOffset = 0;
+
+	private String fReplacementString = null;
+
+	private boolean fUpdateLengthOnValidate;
+
+	private char[] fTriggers;
+
+	/**
+	 * Constructor with relevance and replacement length update flag.
+	 * 
+	 * If the <code>updateReplacementLengthOnValidate</code> flag is true,
+	 * then when the user types, the replacement length will be incremented by
+	 * the number of new characters inserted from the original position.
+	 * Otherwise the replacement length will not change on validate.
+	 * 
+	 * ex.
+	 * 
+	 * <tag |name="attr"> - the replacement length is 4 <tag i|name="attr"> -
+	 * the replacement length is now 5 <tag id|name="attr"> - the replacement
+	 * length is now 6 <tag |name="attr"> - the replacementlength is now 4
+	 * again <tag |name="attr"> - the replacment length remains 4
+	 * 
+	 */
+	public CustomCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo, int relevance, boolean updateReplacementLengthOnValidate) {
+		fReplacementString = replacementString;
+		fReplacementOffset = replacementOffset;
+		fReplacementLength = replacementLength;
+		fCursorPosition = cursorPosition;
+		fImage = image;
+		fDisplayString = displayString;
+		fContextInformation = contextInformation;
+		fAdditionalProposalInfo = additionalProposalInfo;
+		fRelevance = relevance;
+		fUpdateLengthOnValidate = updateReplacementLengthOnValidate;
+		fOriginalReplacementLength = fReplacementLength;
+	}
+
+	public CustomCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo, int relevance) {
+		this(replacementString, replacementOffset, replacementLength, cursorPosition, image, displayString, contextInformation, additionalProposalInfo, relevance, true);
+	}
+
+	public void apply(IDocument document) {
+		CompletionProposal proposal = new CompletionProposal(getReplacementString(), getReplacementOffset(), getReplacementLength(), getCursorPosition(), getImage(), getDisplayString(), getContextInformation(), getAdditionalProposalInfo());
+		proposal.apply(document);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension#apply(org.eclipse.jface.text.IDocument,
+	 *      char, int)
+	 */
+	public void apply(IDocument document, char trigger, int offset) {
+		CompletionProposal proposal = new CompletionProposal(getReplacementString(), getReplacementOffset(), getReplacementLength(), getCursorPosition(), getImage(), getDisplayString(), getContextInformation(), getAdditionalProposalInfo());
+		// we currently don't do anything special for which character
+		// selected the proposal, and where the cursor offset is
+		// but we might in the future...
+		proposal.apply(document);
+		// we want to ContextInformationPresenter.updatePresentation() here
+	}
+
+	public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
+		IDocument document = viewer.getDocument();
+		// CMVC 252634 to compensate for "invisible" initial region
+		int caretOffset = viewer.getTextWidget().getCaretOffset();
+		if (viewer instanceof ITextViewerExtension5) {
+			ITextViewerExtension5 extension = (ITextViewerExtension5) viewer;
+			caretOffset = extension.widgetOffset2ModelOffset(caretOffset);
+		}
+		else {
+			caretOffset = viewer.getTextWidget().getCaretOffset() + viewer.getVisibleRegion().getOffset();
+		}
+
+		if (caretOffset == getReplacementOffset()) {
+			apply(document);
+		}
+		else {
+			// replace the text without affecting the caret Position as this
+			// causes the cursor to move on its own
+			try {
+				int endOffsetOfChanges = getReplacementString().length() + getReplacementOffset();
+				// Insert the portion of the new text that comes after the
+				// current caret position
+				if (endOffsetOfChanges >= caretOffset) {
+					int postCaretReplacementLength = getReplacementOffset() + getReplacementLength() - caretOffset;
+					int preCaretReplacementLength = getReplacementString().length() - (endOffsetOfChanges - caretOffset);
+					if (postCaretReplacementLength < 0) {
+						if (Debug.displayWarnings) {
+							System.out.println("** postCaretReplacementLength was negative: " + postCaretReplacementLength); //$NON-NLS-1$
+						}
+						// This is just a quick fix while I figure out what
+						// replacement length is supposed to be
+						// in each case, otherwise we'll get negative
+						// replacment length sometimes
+						postCaretReplacementLength = 0;
+					}
+					document.replace(caretOffset, postCaretReplacementLength, getReplacementString().substring(preCaretReplacementLength));
+				}
+				// Insert the portion of the new text that comes before the
+				// current caret position
+				// Done second since offsets would change for the post text
+				// otherwise
+				// Outright insertions are handled here
+				if (caretOffset > getReplacementOffset()) {
+					int preCaretTextLength = caretOffset - getReplacementOffset();
+					document.replace(getReplacementOffset(), preCaretTextLength, getReplacementString().substring(0, preCaretTextLength));
+				}
+			}
+			catch (BadLocationException x) {
+				apply(document);
+			}
+			catch (StringIndexOutOfBoundsException e) {
+				apply(document);
+			}
+		}
+	}
+
+	public String getAdditionalProposalInfo() {
+		// return fProposal.getAdditionalProposalInfo();
+		return fAdditionalProposalInfo;
+	}
+
+	public IContextInformation getContextInformation() {
+		// return fProposal.getContextInformation();
+		return fContextInformation;
+	}
+
+	public void setContextInformation(IContextInformation contextInfo) {
+		fContextInformation = contextInfo;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension#getContextInformationPosition()
+	 */
+	public int getContextInformationPosition() {
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=110355
+		// return getCursorPosition();
+		if (getContextInformation() == null)
+			return getReplacementOffset() - 1;
+		return getReplacementOffset() + getCursorPosition();
+	}
+
+	public int getCursorPosition() {
+		return fCursorPosition;
+	}
+
+	public void setCursorPosition(int pos) {
+		fCursorPosition = pos;
+	}
+
+	public void setDisplayString(String newDisplayString) {
+		fDisplayString = newDisplayString;
+	}
+
+	public String getDisplayString() {
+		// return fProposal.getDisplayString();
+		return fDisplayString;
+	}
+
+	public Image getImage() {
+		// return fProposal.getImage();
+		return fImage;
+	}
+
+	public int getRelevance() {
+		return fRelevance;
+	}
+
+	public void setReplacementLength(int newReplacementLength) {
+		fReplacementLength = newReplacementLength;
+	}
+
+	public int getReplacementLength() {
+		return fReplacementLength;
+	}
+
+	public int getReplacementOffset() {
+		return fReplacementOffset;
+	}
+
+	public String getReplacementString() {
+		return fReplacementString;
+	}
+
+	public Point getSelection(IDocument document) {
+		// return fProposal.getSelection(document);
+		CompletionProposal proposal = new CompletionProposal(getReplacementString(), getReplacementOffset(), getReplacementLength(), getCursorPosition(), getImage(), getDisplayString(), getContextInformation(), getAdditionalProposalInfo());
+		return proposal.getSelection(document);
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension#getTriggerCharacters()
+	 */
+
+	public char[] getTriggerCharacters() {
+		return fTriggers;
+	}
+
+	public void setTriggerCharacters(char[] triggers) {
+		fTriggers = triggers;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension#isValidFor(org.eclipse.jface.text.IDocument,
+	 *      int)
+	 */
+	public boolean isValidFor(IDocument document, int offset) {
+		return validate(document, offset, null);
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#selected(org.eclipse.jface.text.ITextViewer,
+	 *      boolean)
+	 */
+	public void selected(ITextViewer viewer, boolean smartToggle) {
+	}
+
+	// code is borrowed from JavaCompletionProposal
+	protected boolean startsWith(IDocument document, int offset, String word) {
+
+		int wordLength = word == null ? 0 : word.length();
+		if (offset > fReplacementOffset + wordLength)
+			return false;
+
+		try {
+			int length = offset - fReplacementOffset;
+			String start = document.get(fReplacementOffset, length);
+
+			if(word != null) {
+				return word.substring(0, length).equalsIgnoreCase(start);
+			}
+		}
+		catch (BadLocationException x) {
+		}
+
+		return false;
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#unselected(org.eclipse.jface.text.ITextViewer)
+	 */
+	public void unselected(ITextViewer viewer) {
+	}
+
+	/**
+	 * borrowed from JavaCompletionProposal
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#validate(org.eclipse.jface.text.IDocument,
+	 *      int, org.eclipse.jface.text.DocumentEvent)
+	 */
+	public boolean validate(IDocument document, int offset, DocumentEvent event) {
+		if (offset < fReplacementOffset)
+			return false;
+		boolean validated = startsWith(document, offset, fDisplayString);
+
+		if (fUpdateLengthOnValidate) {
+			// it would be better to use "originalCursorPosition" instead of
+			// getReplacementOffset(), but we don't have that info.
+			int newLength = offset - getReplacementOffset();
+			int delta = newLength - fOriginalReplacementLength;
+			fReplacementLength = delta + fOriginalReplacementLength;
+		}
+		return validated;
+	}
+
+	/**
+	 * @param replacementOffset
+	 *            The fReplacementOffset to set.
+	 */
+	public void setReplacementOffset(int replacementOffset) {
+		fReplacementOffset = replacementOffset;
+	}
+
+	/**
+	 * @param replacementString
+	 *            The fReplacementString to set.
+	 */
+	public void setReplacementString(String replacementString) {
+		fReplacementString = replacementString;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/IRelevanceCompletionProposal.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/IRelevanceCompletionProposal.java
new file mode 100644
index 0000000..7e3f7a6
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/IRelevanceCompletionProposal.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+
+/**
+ * CompletionProposal with a relevance value. The relevance value is used to
+ * sort the completion proposals. Proposals with higher relevance should be
+ * listed before proposals with lower relevance.
+ * 
+ * @author pavery
+ */
+public interface IRelevanceCompletionProposal {
+	/**
+	 * Returns the relevance of the proposal.
+	 */
+	int getRelevance();
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/IRelevanceConstants.java
similarity index 73%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/IRelevanceConstants.java
index 607270a..ba5a16e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/IRelevanceConstants.java
@@ -1,20 +1,17 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- *
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
 
-
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-public interface UpdateListener {
-
-	public void updateOccured(Object object, Object arg);
+public interface IRelevanceConstants {
+	int R_NONE = 0;
 }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/OptionalMessageDialog.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/OptionalMessageDialog.java
new file mode 100644
index 0000000..04cde16
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/OptionalMessageDialog.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+/**
+ * <p>This is a <code>MessageDialog</code> which allows the user
+ * to choose that the dialog isn't shown again the next time.</p>
+ * 
+ * @base org.eclipse.jdt.internal.ui.dialogs.OptionalMessageDialog
+ */
+public class OptionalMessageDialog extends MessageDialog {
+
+	// String constants for widgets
+	private static final String CHECKBOX_TEXT = SSEUIMessages.OptionalMessageDialog_dontShowAgain;
+
+	// Dialog store id constants
+	private static final String STORE_ID = "ContentAssist_OptionalMessageDialog.hide."; //$NON-NLS-1$
+
+	public static final int NOT_SHOWN = IDialogConstants.CLIENT_ID + 1;
+
+	private final String fId;
+	private final String fCheckBoxText;
+
+	private Button fHideDialogCheckBox;
+
+
+	/**
+	 * Opens the dialog but only if the user hasn't chosen to hide it.
+	 *
+	 * @return the index of the pressed button or {@link SWT#DEFAULT} if the dialog got dismissed
+	 *         without pressing a button (e.g. via Esc) or {{@link #NOT_SHOWN} if the dialog was not
+	 *         shown
+	 */
+	public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex) {
+		return open(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex, CHECKBOX_TEXT);
+	}
+
+	/**
+	 * Opens the dialog but only if the user hasn't chosen to hide it.
+	 *
+	 * @return the index of the pressed button or {@link SWT#DEFAULT} if the dialog got dismissed
+	 *         without pressing a button (e.g. via Esc) or {{@link #NOT_SHOWN} if the dialog was not
+	 *         shown
+	 */
+	public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex, String checkboxText) {
+		if (!isDialogEnabled(id))
+			return OptionalMessageDialog.NOT_SHOWN;
+
+		MessageDialog dialog= new OptionalMessageDialog(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex, checkboxText);
+		return dialog.open();
+	}
+
+	protected OptionalMessageDialog(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex) {
+		this(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex, CHECKBOX_TEXT);
+	}
+
+	protected OptionalMessageDialog(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex, String checkBoxText) {
+		super(parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex);
+		fId= id;
+		fCheckBoxText= checkBoxText;
+	}
+
+	protected Control createCustomArea(Composite parent) {
+		Composite composite= new Composite(parent, SWT.NONE);
+		GridLayout layout= new GridLayout();
+		layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+		layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		fHideDialogCheckBox= new Button(composite, SWT.CHECK | SWT.LEFT);
+		fHideDialogCheckBox.setText(fCheckBoxText);
+		fHideDialogCheckBox.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setDialogEnabled(fId, !((Button)e.widget).getSelection());
+			}
+		});
+		applyDialogFont(fHideDialogCheckBox);
+		return fHideDialogCheckBox;
+	}
+
+	//--------------- Configuration handling --------------
+
+	/**
+	 * Returns this dialog
+	 *
+	 * @return the settings to be used
+	 */
+	private static IDialogSettings getDialogSettings() {
+		IDialogSettings settings= SSEUIPlugin.getDefault().getDialogSettings();
+		settings= settings.getSection(STORE_ID);
+		if (settings == null)
+			settings= SSEUIPlugin.getDefault().getDialogSettings().addNewSection(STORE_ID);
+		return settings;
+	}
+
+	/**
+	 * Answers whether the optional dialog is enabled and should be shown.
+	 */
+	public static boolean isDialogEnabled(String key) {
+		IDialogSettings settings= getDialogSettings();
+		return !settings.getBoolean(key);
+	}
+
+	/**
+	 * Sets whether the optional dialog is enabled and should be shown.
+	 */
+	public static void setDialogEnabled(String key, boolean isEnabled) {
+		IDialogSettings settings= getDialogSettings();
+		settings.put(key, !isEnabled);
+	}
+
+	/**
+	 * Clears all remembered information about hidden dialogs
+	 */
+	public static void clearAllRememberedStates() {
+		IDialogSettings settings= SSEUIPlugin.getDefault().getDialogSettings();
+		settings.addNewSection(STORE_ID);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/StructuredContentAssistant.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/StructuredContentAssistant.java
new file mode 100644
index 0000000..b10942c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/StructuredContentAssistant.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentassist;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.wst.sse.ui.internal.IReleasable;
+
+/**
+ * <p>Content assistant that uses {@link CompoundContentAssistProcessor}s so that multiple
+ * processors can be registered for each partition type</p>
+ */
+public class StructuredContentAssistant extends ContentAssistant {
+	/** need to retain copy of all releasable processors so they can be released on uninstall */
+	private List fReleasableProcessors;
+	
+	/** 
+	 * <code>true</code> if a content assist processor has been added to this assistant,
+	 * <code>false</code> otherwise
+	 */
+	private boolean fIsInitalized;
+	
+	/**
+	 * <p>Construct the assistant</p>
+	 */
+	public StructuredContentAssistant() {
+		this.fIsInitalized = false;
+		this.fReleasableProcessors = new ArrayList();
+	}
+	
+	/**
+	 * <p>Each set content assist processor is placed inside a
+	 * CompoundContentAssistProcessor which allows multiple processors per
+	 * partition type</p>
+	 * 
+	 * @param processor
+	 *            the content assist processor to register, or
+	 *            <code>null</code> to remove an existing one
+	 * @param contentType
+	 *            the content type under which to register
+	 *            
+	 * @see org.eclipse.jface.text.contentassist.ContentAssistant#setContentAssistProcessor(org.eclipse.jface.text.contentassist.IContentAssistProcessor, java.lang.String)
+	 */
+	public void setContentAssistProcessor(IContentAssistProcessor processor, String partitionType) {
+		this.fIsInitalized = true;
+		
+		CompoundContentAssistProcessor compoundProcessor = getExistingContentAssistProcessor(partitionType);
+		if(compoundProcessor == null) {
+			compoundProcessor = new CompoundContentAssistProcessor();
+			this.fReleasableProcessors.add(compoundProcessor);
+		}
+		
+		compoundProcessor.add(processor);
+		super.setContentAssistProcessor(compoundProcessor, partitionType);
+	}
+	
+	/**
+	 * Returns true if content assist has been initialized with some content
+	 * assist processors. False otherwise.
+	 * 
+	 * @return true if content assistant has been initialized
+	 */
+	public boolean isInitialized() {
+		return this.fIsInitalized;
+	}
+	
+	/**
+	 * 
+	 * @param partitionType
+	 * @return
+	 */
+	private CompoundContentAssistProcessor getExistingContentAssistProcessor(String partitionType) {
+		CompoundContentAssistProcessor compoundContentAssistProcessor = null;
+		IContentAssistProcessor processor = super.getContentAssistProcessor(partitionType);
+		if (processor != null) {
+			if (processor instanceof CompoundContentAssistProcessor) {
+				compoundContentAssistProcessor = (CompoundContentAssistProcessor) processor;
+			}
+		}
+		return compoundContentAssistProcessor;
+	}
+	
+	/**
+	 * @see org.eclipse.jface.text.contentassist.ContentAssistant#uninstall()
+	 */
+	public void uninstall() {
+		// dispose of all content assist processors
+		if (this.fReleasableProcessors != null && !this.fReleasableProcessors.isEmpty()) {
+			for(int i = 0; i < this.fReleasableProcessors.size(); ++i) {
+				((IReleasable)this.fReleasableProcessors.get(i)).release();
+			}
+			
+			this.fReleasableProcessors.clear();
+		}
+		this.fReleasableProcessors = null;
+		
+		super.uninstall();
+	}
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/ConfigurableContentOutlinePage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/ConfigurableContentOutlinePage.java
new file mode 100644
index 0000000..ca87d75
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/ConfigurableContentOutlinePage.java
@@ -0,0 +1,757 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentoutline;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.action.GroupMarker;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.util.DelegatingDragAdapter;
+import org.eclipse.jface.util.DelegatingDropAdapter;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.util.TransferDragSourceListener;
+import org.eclipse.jface.util.TransferDropTargetListener;
+import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSource;
+import org.eclipse.swt.dnd.DropTarget;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.part.IPageSite;
+import org.eclipse.ui.part.IShowInSource;
+import org.eclipse.ui.part.IShowInTarget;
+import org.eclipse.ui.part.IShowInTargetList;
+import org.eclipse.ui.part.ShowInContext;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration;
+
+
+public class ConfigurableContentOutlinePage extends ContentOutlinePage implements IAdaptable {
+	/*
+	 * Menu listener to create the additions group and add any menu items
+	 * contributed by the configuration; required since the context menu is
+	 * cleared every time it is shown
+	 */
+	class AdditionGroupAdder implements IMenuListener {
+		public void menuAboutToShow(IMenuManager manager) {
+			IContributionItem[] items = manager.getItems();
+			if (items.length > 0 && items[items.length - 1].getId() != null) {
+				manager.insertAfter(items[items.length - 1].getId(), new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
+			}
+			else {
+				manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
+			}
+
+			// add configuration's menu items
+			IMenuListener listener = getConfiguration().getMenuListener(getTreeViewer());
+			if (listener != null) {
+				listener.menuAboutToShow(manager);
+			}
+		}
+	}
+
+	/**
+	 * Provides double-click registration so it can be done before the Control
+	 * is created.
+	 */
+	class DoubleClickProvider implements IDoubleClickListener {
+		private IDoubleClickListener[] listeners = null;
+
+		void addDoubleClickListener(IDoubleClickListener newListener) {
+			if (listeners == null) {
+				listeners = new IDoubleClickListener[]{newListener};
+			}
+			else {
+				IDoubleClickListener[] newListeners = new IDoubleClickListener[listeners.length + 1];
+				System.arraycopy(listeners, 0, newListeners, 0, listeners.length);
+				newListeners[listeners.length] = newListener;
+				listeners = newListeners;
+			}
+		}
+
+		public void doubleClick(DoubleClickEvent event) {
+			fireDoubleClickEvent(event);
+		}
+
+		private void fireDoubleClickEvent(final DoubleClickEvent event) {
+			IDoubleClickListener[] firingListeners = listeners;
+			for (int i = 0; i < firingListeners.length; ++i) {
+				final IDoubleClickListener l = firingListeners[i];
+				SafeRunner.run(new SafeRunnable() {
+					public void run() {
+						l.doubleClick(event);
+					}
+				});
+			}
+		}
+
+		void removeDoubleClickListener(IDoubleClickListener oldListener) {
+			if (listeners != null) {
+				if (listeners.length == 1 && listeners[0].equals(oldListener)) {
+					listeners = null;
+				}
+				else {
+					List newListeners = new ArrayList(Arrays.asList(listeners));
+					newListeners.remove(oldListener);
+					listeners = (IDoubleClickListener[]) newListeners.toArray(new IDoubleClickListener[listeners.length - 1]);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Listens to post selection from the selection service, applying it to
+	 * the tree viewer.
+	 */
+	class PostSelectionServiceListener implements ISelectionListener {
+		public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+			// from selection service
+			if (_DEBUG) {
+				_DEBUG_TIME = System.currentTimeMillis();
+			} /*
+			 * Bug 136310, unless this page is that part's
+			 * IContentOutlinePage, ignore the selection change
+			 */
+			if (part == null || part.getAdapter(IContentOutlinePage.class) == ConfigurableContentOutlinePage.this) {
+				ISelection validContentSelection = getConfiguration().getSelection(getTreeViewer(), selection);
+
+				boolean isLinked = getConfiguration().isLinkedWithEditor(getTreeViewer());
+				if (isLinked) {
+					if (!getTreeViewer().getSelection().equals(validContentSelection)) {
+						try {
+							fIsReceivingSelection = true;
+							getTreeViewer().setSelection(validContentSelection, true);
+						}
+						finally {
+							fIsReceivingSelection = false;
+						}
+					}
+				}
+			}
+			if (_DEBUG) {
+				System.out.println("(O:" + (System.currentTimeMillis() - _DEBUG_TIME) + "ms) " + part + " : " + selection); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
+		}
+	}
+
+	/**
+	 * Forwards post-selection from the tree viewer to the listeners while
+	 * acting as this page's selection provider.
+	 */
+	private class SelectionProvider implements IPostSelectionProvider {
+		private class PostSelectionChangedListener implements ISelectionChangedListener {
+			public void selectionChanged(SelectionChangedEvent event) {
+				if (!isFiringSelection() && !fIsReceivingSelection) {
+					fireSelectionChanged(event, postListeners);
+					updateStatusLine(getSite().getActionBars().getStatusLineManager(), event.getSelection());
+				}
+			}
+		}
+
+		private class SelectionChangedListener implements ISelectionChangedListener {
+			public void selectionChanged(SelectionChangedEvent event) {
+				if (!isFiringSelection() && !fIsReceivingSelection) {
+					fireSelectionChanged(event, listeners);
+				}
+			}
+		}
+
+		private boolean isFiringSelection = false;
+		private ListenerList listeners = new ListenerList();
+		private ListenerList postListeners = new ListenerList();
+		private ISelectionChangedListener postSelectionChangedListener = new PostSelectionChangedListener();
+		private ISelectionChangedListener selectionChangedListener = new SelectionChangedListener();
+
+		public void addPostSelectionChangedListener(ISelectionChangedListener listener) {
+			postListeners.add(listener);
+		}
+
+		public void addSelectionChangedListener(ISelectionChangedListener listener) {
+			listeners.add(listener);
+		}
+
+		public void fireSelectionChanged(final SelectionChangedEvent event, ListenerList listenerList) {
+			isFiringSelection = true;
+			Object[] listeners = listenerList.getListeners();
+			for (int i = 0; i < listeners.length; ++i) {
+				final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
+				SafeRunner.run(new SafeRunnable() {
+					public void run() {
+						l.selectionChanged(event);
+					}
+				});
+			}
+			isFiringSelection = false;
+		}
+
+		public ISelectionChangedListener getPostSelectionChangedListener() {
+			return postSelectionChangedListener;
+		}
+
+		public ISelection getSelection() {
+			if (getTreeViewer() != null) {
+				return getTreeViewer().getSelection();
+			}
+			return StructuredSelection.EMPTY;
+		}
+
+		public ISelectionChangedListener getSelectionChangedListener() {
+			return selectionChangedListener;
+		}
+
+		public boolean isFiringSelection() {
+			return isFiringSelection;
+		}
+
+		public void removePostSelectionChangedListener(ISelectionChangedListener listener) {
+			postListeners.remove(listener);
+		}
+
+		public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+			listeners.remove(listener);
+		}
+
+		public void setSelection(ISelection selection) {
+			if (!isFiringSelection) {
+				getTreeViewer().setSelection(selection);
+			}
+		}
+	}
+
+	private class ShowInTarget implements IShowInTarget {
+		/*
+		 * @see org.eclipse.ui.part.IShowInTarget#show(org.eclipse.ui.part.ShowInContext)
+		 */
+		public boolean show(ShowInContext context) {
+			setSelection(context.getSelection());
+			return getTreeViewer().getSelection().equals(context.getSelection());
+		}
+	}
+
+	protected static final ContentOutlineConfiguration NULL_CONFIGURATION = new ContentOutlineConfiguration() {
+		public IContentProvider getContentProvider(TreeViewer viewer) {
+			return new ITreeContentProvider() {
+				public void dispose() {
+				}
+
+				public Object[] getChildren(Object parentElement) {
+					return null;
+				}
+
+				public Object[] getElements(Object inputElement) {
+					return null;
+				}
+
+				public Object getParent(Object element) {
+					return null;
+				}
+
+				public boolean hasChildren(Object element) {
+					return false;
+				}
+
+				public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+				}
+			};
+		}
+	};
+
+	private static final String OUTLINE_CONTEXT_MENU_ID = "org.eclipse.wst.sse.ui.StructuredTextEditor.OutlineContext"; //$NON-NLS-1$
+
+	private static final String OUTLINE_CONTEXT_MENU_SUFFIX = ".source.OutlineContext"; //$NON-NLS-1$
+	private static final boolean _DEBUG = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/contentOutline")); //$NON-NLS-1$  //$NON-NLS-2$;
+
+	private long _DEBUG_TIME = 0;
+
+	private TransferDragSourceListener[] fActiveDragListeners;
+	private TransferDropTargetListener[] fActiveDropListeners;
+	private ContentOutlineConfiguration fConfiguration;
+
+	private Menu fContextMenu;
+	private String fContextMenuId;
+
+	private MenuManager fContextMenuManager;
+	private DoubleClickProvider fDoubleClickProvider = null;
+
+	private DelegatingDragAdapter fDragAdapter;
+	private DragSource fDragSource;
+	private DelegatingDropAdapter fDropAdapter;
+	private DropTarget fDropTarget;
+	private IEditorPart fEditor;
+	private IMenuListener fGroupAdder = null;
+	private Object fInput = null;
+
+	private String fInputContentTypeIdentifier = null;
+	private ISelectionListener fSelectionListener = null;
+
+	SelectionProvider fSelectionProvider = null;
+
+	boolean fIsReceivingSelection;
+
+	/**
+	 * A ContentOutlinePage that abstract as much behavior as possible away
+	 * from the Controls and varies it by content type.
+	 */
+	public ConfigurableContentOutlinePage() {
+		super();
+		fGroupAdder = new AdditionGroupAdder();
+		fSelectionProvider = new SelectionProvider();
+	}
+
+	/**
+	 * Adds a listener to a list of those notified when someone double-clicks
+	 * in the page.
+	 * 
+	 * @param newListener - the listener to add
+	 */
+	public void addDoubleClickListener(IDoubleClickListener newListener) {
+		if (fDoubleClickProvider == null) {
+			fDoubleClickProvider = new DoubleClickProvider();
+		}
+		fDoubleClickProvider.addDoubleClickListener(newListener);
+	}
+
+	private String computeContextMenuID() {
+		String id = null;
+		if (fInputContentTypeIdentifier != null) {
+			id = fInputContentTypeIdentifier + OUTLINE_CONTEXT_MENU_SUFFIX;
+		}
+		return id;
+	}
+
+	/**
+	 * @see ContentOutlinePage#createControl
+	 */
+	public void createControl(Composite parent) {
+		super.createControl(parent);
+		ColumnViewerToolTipSupport.enableFor(getTreeViewer());
+
+		IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();
+		if (page != null) {
+			fEditor = page.getActiveEditor();
+		}
+
+		fDragAdapter = new DelegatingDragAdapter();
+		fDragSource = new DragSource(getControl(), DND.DROP_COPY | DND.DROP_MOVE);
+		fDropAdapter = new DelegatingDropAdapter();
+		fDropTarget = new DropTarget(getControl(), DND.DROP_COPY | DND.DROP_MOVE);
+
+		setConfiguration(getConfiguration());
+
+		/*
+		 * ContentOutlinePage only implements ISelectionProvider while the
+		 * tree viewer implements both ISelectionProvider and
+		 * IPostSelectionProvider. Use an ISelectionProvider that listens to
+		 * post selection from the tree viewer and forward only post selection
+		 * to the selection service.
+		 */
+		getTreeViewer().addPostSelectionChangedListener(fSelectionProvider.getPostSelectionChangedListener());
+		getTreeViewer().addSelectionChangedListener(fSelectionProvider.getSelectionChangedListener());
+		if (fDoubleClickProvider == null) {
+			fDoubleClickProvider = new DoubleClickProvider();
+		}
+		getTreeViewer().addDoubleClickListener(fDoubleClickProvider);
+		getSite().setSelectionProvider(fSelectionProvider);
+	}
+
+	public void dispose() {
+		getSite().getWorkbenchWindow().getSelectionService().removePostSelectionListener(getSelectionServiceListener());
+		if (fDoubleClickProvider != null) {
+			getTreeViewer().removeDoubleClickListener(fDoubleClickProvider);
+		}
+
+		// dispose menu controls
+		if (fContextMenu != null) {
+			fContextMenu.dispose();
+		}
+		if (fContextMenuManager != null) {
+			fContextMenuManager.removeMenuListener(fGroupAdder);
+			fContextMenuManager.removeAll();
+			fContextMenuManager.dispose();
+		}
+
+		fDropTarget.dispose();
+		fDragSource.dispose();
+
+		IStatusLineManager statusLineManager = getSite().getActionBars().getStatusLineManager();
+		if (statusLineManager != null) {
+			statusLineManager.setMessage(null);
+		}
+		setConfiguration(NULL_CONFIGURATION);
+		super.dispose();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class key) {
+		Object adapter = null;
+		if (key.equals(IShowInTarget.class)) {
+			adapter = new ShowInTarget();
+		}
+		final IEditorPart editor = fEditor;
+
+		if (key.equals(IShowInSource.class) && editor != null) {
+			adapter = new IShowInSource() {
+				public ShowInContext getShowInContext() {
+					return new ShowInContext(editor.getEditorInput(), editor.getEditorSite().getSelectionProvider().getSelection());
+				}
+			};
+		}
+		else if (key.equals(IShowInTargetList.class) && editor != null) {
+			adapter = editor.getAdapter(key);
+		}
+		return adapter;
+	}
+
+	/**
+	 * @return the currently used ContentOutlineConfiguration
+	 */
+	public ContentOutlineConfiguration getConfiguration() {
+		if (fConfiguration == null) {
+			fConfiguration = NULL_CONFIGURATION;
+		}
+		return fConfiguration;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
+	 */
+	public ISelection getSelection() {
+		return fSelectionProvider.getSelection();
+	}
+
+	ISelectionListener getSelectionServiceListener() {
+		if (fSelectionListener == null) {
+			fSelectionListener = new PostSelectionServiceListener();
+		}
+		return fSelectionListener;
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.part.IPageBookViewPage#init(org.eclipse.ui.part.IPageSite
+	 * )
+	 */
+	public void init(IPageSite pageSite) {
+		super.init(pageSite);
+		pageSite.getWorkbenchWindow().getSelectionService().addPostSelectionListener(getSelectionServiceListener());
+	}
+
+	/**
+	 * Removes a listener to a list of those notified when someone
+	 * double-clicks in the page.
+	 * 
+	 * @param oldListener - the listener to remove
+	 */
+	public void removeDoubleClickListener(IDoubleClickListener oldListener) {
+		if (fDoubleClickProvider != null) {
+			fDoubleClickProvider.removeDoubleClickListener(oldListener);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.views.contentoutline.ContentOutlinePage#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+	 */
+	public void selectionChanged(SelectionChangedEvent event) {
+		if (!fIsReceivingSelection)
+			super.selectionChanged(event);
+	}
+
+	/**
+	 * Configures (or reconfigures) the page according to the given
+	 * configuration.
+	 * 
+	 * @param configuration
+	 */
+	public void setConfiguration(ContentOutlineConfiguration configuration) {
+		// intentionally do not check to see if the new configuration != old
+		// configuration
+		if (getTreeViewer() != null) {
+			// remove the key listeners
+			if (getControl() != null && !getControl().isDisposed()) {
+				KeyListener[] listeners = getConfiguration().getKeyListeners(getTreeViewer());
+				if (listeners != null) {
+					for (int i = 0; i < listeners.length; i++) {
+						getControl().removeKeyListener(listeners[i]);
+					}
+				}
+			}
+
+			IContributionManager toolbar = getSite().getActionBars().getToolBarManager();
+			if (toolbar != null) {
+				IContributionItem[] toolbarItems = getConfiguration().getToolbarContributions(getTreeViewer());
+				if (toolbarItems != null && toolbarItems.length > 0) {
+					for (int i = 0; i < toolbarItems.length; i++) {
+						toolbar.remove(toolbarItems[i]);
+					}
+					toolbar.update(false);
+				}
+			}
+
+			IContributionManager menubar = getSite().getActionBars().getMenuManager();
+			if (menubar != null) {
+				IContributionItem[] menuItems = getConfiguration().getMenuContributions(getTreeViewer());
+				if (menuItems != null && menuItems.length > 0) {
+					for (int i = 0; i < menuItems.length; i++) {
+						menubar.remove(menuItems[i]);
+					}
+					menubar.remove(IWorkbenchActionConstants.MB_ADDITIONS);
+					menubar.update(false);
+				}
+			}
+			// clear the DnD listeners and transfer types
+			if (fDragAdapter != null && !fDragAdapter.isEmpty() && fDragSource != null && !fDragSource.isDisposed() && fDragSource.getTransfer().length > 0) {
+				if (fActiveDragListeners != null) {
+					for (int i = 0; i < fActiveDragListeners.length; i++) {
+						fDragAdapter.removeDragSourceListener(fActiveDragListeners[i]);
+					}
+				}
+				fActiveDragListeners = null;
+				fDragSource.removeDragListener(fDragAdapter);
+				fDragSource.setTransfer(new Transfer[0]);
+			}
+			if (fDropAdapter != null && !fDropAdapter.isEmpty() && fDropTarget != null && !fDropTarget.isDisposed() && fDropTarget.getTransfer().length > 0) {
+				if (fActiveDropListeners != null) {
+					for (int i = 0; i < fActiveDropListeners.length; i++) {
+						fDropAdapter.removeDropTargetListener(fActiveDropListeners[i]);
+					}
+				}
+				fActiveDropListeners = null;
+				fDropTarget.removeDropListener(fDropAdapter);
+				fDropTarget.setTransfer(new Transfer[0]);
+			}
+			getConfiguration().getContentProvider(getTreeViewer()).inputChanged(getTreeViewer(), fInput, null);
+			// release any ties to this tree viewer
+			getConfiguration().unconfigure(getTreeViewer());
+		}
+
+		fConfiguration = configuration;
+
+		if (getTreeViewer() != null && getControl() != null && !getControl().isDisposed()) {
+			// (re)set the providers
+			getTreeViewer().setLabelProvider(getConfiguration().getLabelProvider(getTreeViewer()));
+			getTreeViewer().setContentProvider(getConfiguration().getContentProvider(getTreeViewer()));
+
+			// view toolbar
+			IContributionManager toolbar = getSite().getActionBars().getToolBarManager();
+			if (toolbar != null) {
+				IContributionItem[] toolbarItems = getConfiguration().getToolbarContributions(getTreeViewer());
+				if (toolbarItems != null) {
+					for (int i = 0; i < toolbarItems.length; i++) {
+						toolbar.add(toolbarItems[i]);
+					}
+					toolbar.update(true);
+				}
+			}
+			// view menu
+			IContributionManager menu = getSite().getActionBars().getMenuManager();
+			if (menu != null) {
+				IContributionItem[] menuItems = getConfiguration().getMenuContributions(getTreeViewer());
+				if (menuItems != null) {
+					for (int i = 0; i < menuItems.length; i++) {
+						menuItems[i].setVisible(true);
+						menu.add(menuItems[i]);
+						menuItems[i].update();
+					}
+					menu.update(true);
+				}
+			}
+			// add the allowed DnD listeners and types
+			TransferDragSourceListener[] dragListeners = getConfiguration().getTransferDragSourceListeners(getTreeViewer());
+			if (fDragAdapter != null && dragListeners.length > 0) {
+				for (int i = 0; i < dragListeners.length; i++) {
+					fDragAdapter.addDragSourceListener(dragListeners[i]);
+				}
+				fActiveDragListeners = dragListeners;
+				fDragSource.addDragListener(fDragAdapter);
+				fDragSource.setTransfer(fDragAdapter.getTransfers());
+			}
+			TransferDropTargetListener[] dropListeners = getConfiguration().getTransferDropTargetListeners(getTreeViewer());
+			if (fDropAdapter != null && dropListeners.length > 0) {
+				for (int i = 0; i < dropListeners.length; i++) {
+					fDropAdapter.addDropTargetListener(dropListeners[i]);
+				}
+				fActiveDropListeners = dropListeners;
+				fDropTarget.addDropListener(fDropAdapter);
+				fDropTarget.setTransfer(fDropAdapter.getTransfers());
+			}
+			// add the key listeners
+			KeyListener[] listeners = getConfiguration().getKeyListeners(getTreeViewer());
+			if (listeners != null) {
+				for (int i = 0; i < listeners.length; i++) {
+					getControl().addKeyListener(listeners[i]);
+				}
+			}
+		}
+
+		if (fInput != null) {
+			setInput(fInput);
+		}
+	}
+
+	/**
+	 * @param editor
+	 *            The IEditorPart that "owns" this page. Used to support the
+	 *            "Show In..." menu.
+	 */
+	public void setEditorPart(IEditorPart editor) {
+		fEditor = editor;
+	}
+
+	/**
+	 * @param newInput
+	 *            The input for the page's viewer. Should only be set after a
+	 *            configuration has been applied.
+	 */
+	public void setInput(Object newInput) {
+		fInput = newInput;
+		/*
+		 * Intentionally not optimized for checking new input vs. old input so
+		 * that any existing content providers can be updated
+		 */
+		if (getControl() != null && !getControl().isDisposed()) {
+			getTreeViewer().setInput(fInput);
+			updateContextMenuId();
+		}
+	}
+
+	/**
+	 * @param id - the content type identifier to use for further extension
+	 */
+	public void setInputContentTypeIdentifier(String id) {
+		fInputContentTypeIdentifier = id;
+	}
+
+	/**
+	 * Updates the outline page's context menu for the current input
+	 */
+	private void updateContextMenuId() {
+		String computedContextMenuId = null;
+		// update outline view's context menu control and ID
+
+		if (fEditor == null) {
+			IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();
+			if (page != null) {
+				fEditor = page.getActiveEditor();
+			}
+		}
+
+		computedContextMenuId = computeContextMenuID();
+
+		if (computedContextMenuId == null) {
+			computedContextMenuId = OUTLINE_CONTEXT_MENU_ID;
+		}
+
+		/*
+		 * Update outline context menu id if updating to a new id or if
+		 * context menu is not already set up
+		 */
+		if (!computedContextMenuId.equals(fContextMenuId) || (fContextMenu == null)) {
+			fContextMenuId = computedContextMenuId;
+
+			if (getControl() != null && !getControl().isDisposed()) {
+				// dispose of previous context menu
+				if (fContextMenu != null) {
+					fContextMenu.dispose();
+				}
+				if (fContextMenuManager != null) {
+					fContextMenuManager.removeMenuListener(fGroupAdder);
+					fContextMenuManager.removeAll();
+					fContextMenuManager.dispose();
+				}
+
+				fContextMenuManager = new MenuManager(fContextMenuId, fContextMenuId);
+				fContextMenuManager.setRemoveAllWhenShown(true);
+
+				fContextMenuManager.addMenuListener(fGroupAdder);
+
+				fContextMenu = fContextMenuManager.createContextMenu(getControl());
+				getControl().setMenu(fContextMenu);
+
+				getSite().registerContextMenu(fContextMenuId, fContextMenuManager, this);
+
+				/*
+				 * also register this menu for source page part and structured
+				 * text outline view ids
+				 */
+				if (fEditor != null) {
+					String partId = fEditor.getSite().getId();
+					if (partId != null) {
+						getSite().registerContextMenu(partId + OUTLINE_CONTEXT_MENU_SUFFIX, fContextMenuManager, this);
+					}
+				}
+				getSite().registerContextMenu(OUTLINE_CONTEXT_MENU_ID, fContextMenuManager, this);
+			}
+		}
+	}
+
+	void updateStatusLine(IStatusLineManager mgr, ISelection selection) {
+		String text = null;
+		Image image = null;
+		ILabelProvider statusLineLabelProvider = getConfiguration().getStatusLineLabelProvider(getTreeViewer());
+		if (statusLineLabelProvider != null && selection instanceof IStructuredSelection && !selection.isEmpty()) {
+			Object firstElement = ((IStructuredSelection) selection).getFirstElement();
+			text = statusLineLabelProvider.getText(firstElement);
+			image = statusLineLabelProvider.getImage(firstElement);
+		}
+		if (image == null) {
+			mgr.setMessage(text);
+		}
+		else {
+			mgr.setMessage(image, text);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapter.java
new file mode 100644
index 0000000..4789341
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapter.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentoutline;
+
+
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
+
+
+/**
+ * Adapter interface to provide JFace-style children and property information.
+ * The factory returning this adapter is expected to implement
+ * IJFaceNodeAdapterFactory
+ * 
+ */
+public interface IJFaceNodeAdapter extends INodeAdapter {
+
+    /**
+     * Returns the child elements of the given parent element.
+     * The result is not modified by the viewer.
+     *
+     * @param node the parent object
+     * @return an array of child elements
+     */
+	public Object[] getChildren(Object node);
+
+	/**
+	 * Returns an enumeration with the elements belonging to the passed
+	 * element. These are the top level items in a list, tree, table, etc...
+	 */
+	public Object[] getElements(Object node);
+
+	/**
+	 * Fetches the label image specific to this object instance.
+	 */
+	public Image getLabelImage(Object node);
+
+	/**
+	 * Fetches the label text specific to this object instance.
+	 */
+	public String getLabelText(Object node);
+
+	public Object getParent(Object node);
+
+	public boolean hasChildren(Object node);
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapterFactory.java
similarity index 64%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapterFactory.java
index 607270a..cf7a53e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapterFactory.java
@@ -10,11 +10,17 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentoutline;
 
+import java.util.Collection;
 
-package org.eclipse.wst.xml.ui.internal.dialogs;
+public interface IJFaceNodeAdapterFactory {
+	public void addListener(Object listener);
 
-public interface UpdateListener {
+	/**
+	 * returns "copy" so no one can modify our list. Its is a shallow copy.
+	 */
+	public Collection getListeners();
 
-	public void updateOccured(Object object, Object arg);
+	public void removeListener(Object listener);
 }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/PropertyChangeUpdateAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/PropertyChangeUpdateAction.java
new file mode 100644
index 0000000..fef880b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/PropertyChangeUpdateAction.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentoutline;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.ui.texteditor.IUpdate;
+
+/**
+ * An IAction.AS_CHECK_BOX action that sets and gets its checked state along
+ * with a value from a preference store. Should be used with
+ * PropertyChangeUpdateActionContributionItem to listen to changes in the
+ * store and update the checked state from PropertyChangeEvents.
+ */
+public class PropertyChangeUpdateAction extends Action implements IUpdate {
+	private String fPreferenceKey;
+	private IPreferenceStore fStore;
+	private boolean fUpdateFromPropertyChange = true;
+
+	public PropertyChangeUpdateAction(String text, IPreferenceStore store, String preferenceKey, boolean defaultValue) {
+		super(text, IAction.AS_CHECK_BOX);
+		fPreferenceKey = preferenceKey;
+		fStore = store;
+		fStore.setDefault(getPreferenceKey(), defaultValue);
+		setId(getPreferenceKey());
+		setChecked(getPreferenceStore().getBoolean(getPreferenceKey()));
+	}
+
+	/**
+	 * @return Returns the orderPreferenceKey.
+	 */
+	public String getPreferenceKey() {
+		return fPreferenceKey;
+	}
+
+	/**
+	 * @return Returns the store.
+	 */
+	public IPreferenceStore getPreferenceStore() {
+		return fStore;
+	}
+
+	/**
+	 * @return Returns the updateFromPropertyChange.
+	 */
+	public boolean isUpdateFromPropertyChange() {
+		return fUpdateFromPropertyChange;
+	}
+
+	public final void run() {
+		super.run();
+		fStore.setValue(getPreferenceKey(), isChecked());
+		if (!isUpdateFromPropertyChange())
+			update();
+	}
+
+	/**
+	 * @param updateFromPropertyChange
+	 *            The updateFromPropertyChange to set.
+	 */
+	public void setUpdateFromPropertyChange(boolean updateFromPropertyChange) {
+		fUpdateFromPropertyChange = updateFromPropertyChange;
+	}
+
+	public void update() {
+		setChecked(fStore.getBoolean(getPreferenceKey()));
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/PropertyChangeUpdateActionContributionItem.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/PropertyChangeUpdateActionContributionItem.java
new file mode 100644
index 0000000..67d0aec
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/PropertyChangeUpdateActionContributionItem.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentoutline;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.ui.texteditor.IUpdate;
+
+/**
+ * A listener on the given action's PreferenceStore. It calls .update() on the
+ * action when the given key changes value.
+ */
+public class PropertyChangeUpdateActionContributionItem extends ActionContributionItem {
+
+	private class PreferenceUpdateListener implements IPropertyChangeListener {
+		public void propertyChange(PropertyChangeEvent event) {
+			if (event.getProperty().equals(fProperty)) {
+				if (debug) {
+					System.out.println(fProperty + " preference changed, updating " + getAction()); //$NON-NLS-1$
+				}
+				((IUpdate) getAction()).update();
+			}
+		}
+	}
+
+	static final boolean debug = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/propertyChangeUpdateActionContributionItem")); //$NON-NLS-1$  //$NON-NLS-2$;
+
+	private IPropertyChangeListener fListener = null;
+
+	protected String fProperty = null;
+	private IPreferenceStore fStore;
+
+	public PropertyChangeUpdateActionContributionItem(PropertyChangeUpdateAction action) {
+		super(action);
+		fProperty = action.getPreferenceKey();
+		fStore = action.getPreferenceStore();
+		fListener = new PreferenceUpdateListener();
+		connect();
+	}
+
+	public void connect() {
+		if (debug) {
+			System.out.println("PropertyChangeUpdateActionContributionItem started listening for " + fProperty); //$NON-NLS-1$
+		}
+		if (fStore != null) {
+			fStore.addPropertyChangeListener(fListener);
+		}
+	}
+
+	public void disconnect() {
+		if (debug) {
+			System.out.println("PropertyChangeUpdateActionContributionItem stopped listening for " + fProperty); //$NON-NLS-1$
+		}
+		if (fStore != null) {
+			fStore.removePropertyChangeListener(fListener);
+		}
+	}
+
+	public void dispose() {
+		super.dispose();
+		disconnect();
+		fProperty = null;
+		fStore = null;
+	}
+
+	public String toString() {
+		if (getAction().getId() != null)
+			return super.toString();
+		else
+			return getClass().getName() + "(text=" + getAction().getText() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ComboList.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ComboList.java
new file mode 100644
index 0000000..8b8eb59
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ComboList.java
@@ -0,0 +1,287 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentproperties.ui;
+
+
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+
+/**
+ * @deprecated People should manage their own combo/list
+ */
+public class ComboList {
+	private Combo combo;
+
+
+	private List list;
+
+	public ComboList(Composite parent, int style) {
+		combo = new Combo(parent, style);
+		list = new ArrayList();
+	}
+
+
+	/*
+	 * following methods is original method of Combo class.
+	 */
+	public void add(String key) {
+		checkError();
+		combo.add(key);
+		list.add(key);
+	}
+
+	public void add(String key, int index) {
+		checkError();
+		combo.add(key, index);
+		list.add(index, key);
+	}
+
+	public void add(String key, String value) {
+		checkError();
+		combo.add(key);
+		list.add(value);
+	}
+
+	public void add(String key, String value, int index) {
+		checkError();
+		combo.add(key, index);
+		list.add(index, value);
+	}
+
+	public void addFocusListener(FocusListener listener) {
+		combo.addFocusListener(listener);
+	}
+
+	public void addModifyListener(org.eclipse.swt.events.ModifyListener listener) {
+		combo.addModifyListener(listener);
+	}
+
+	public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener) {
+		combo.addSelectionListener(listener);
+
+	}
+
+	private void checkError() {
+		if (!isConsistency()) {
+			Logger.log(Logger.WARNING, "Difference between the number of keys[" + combo.getItemCount() + "] and the number of values[" + list.size() + "] in ComboList"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+	}
+
+	public org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint) {
+		return combo.computeSize(wHint, hHint);
+	}
+
+	public Map createHashtable() {
+		checkError();
+		Map m = new Hashtable();
+		for (int i = 0; i < list.size(); i++)
+			m.put(combo.getItem(i), list.get(i));
+		return m;
+	}
+
+	public void deselect(int i) {
+		combo.deselect(i);
+	}
+
+	public void deselectAll() {
+		combo.deselectAll();
+	}
+
+	public boolean equals(Object obj) {
+		return combo.equals(obj);
+	}
+
+	private void exchangePosition(int i, int j) {
+		String tmpKey = getItem(i);
+		Object tmpValue = list.remove(i);
+
+		combo.setItem(i, getItem(j));
+		list.add(i, list.remove(j - 1));
+
+		combo.setItem(j, tmpKey);
+		list.add(j, tmpValue);
+	}
+
+	public boolean existsAsKey(String str) {
+		if (combo.indexOf(str) >= 0)
+			return true;
+		else
+			return false;
+	}
+
+	public boolean existsAsValue(String str) {
+		if (list.indexOf(str) >= 0)
+			return true;
+		else
+			return false;
+	}
+
+	public boolean getEnabled() {
+		return combo.getEnabled();
+	}
+
+	public String getItem(int index) {
+		return combo.getItem(index);
+	}
+
+	public int getItemCount() {
+		return combo.getItemCount();
+	}
+
+	public String getKey(String value) {
+		if (value == null)
+			return null;
+		int index = -1;
+		checkError();
+		for (int i = 0; i < list.size(); i++) {
+			if (!list.get(i).equals(value))
+				continue;
+			index = i;
+			break;
+		}
+		if (index != -1)
+			return combo.getItem(index);
+		else
+			return null;
+	}
+
+	public Object getLayoutData() {
+		return combo.getLayoutData();
+	}
+
+	public String getSelectedValue() {
+		checkError();
+		int index = getSelectionIndex();
+		if (index < 0)
+			return null;
+		return getValue(getItem(index));
+	}
+
+	public int getSelectionIndex() {
+		return combo.getSelectionIndex();
+	}
+
+	public String getText() {
+		return combo.getText();
+	}
+
+	public String getValue(String key) {
+		if (key == null)
+			return null;
+		int index = -1;
+		checkError();
+		for (int i = 0; i < combo.getItemCount(); i++) {
+			if (!combo.getItem(i).equals(key))
+				continue;
+			index = i;
+			break;
+		}
+		if (index != -1)
+			return (String) list.get(index);
+		else
+			return null;
+	}
+
+	public int indexOf(String str) {
+		return combo.indexOf(str);
+	}
+
+
+	public boolean isConsistency() {
+
+		if (list.size() == combo.getItemCount())
+			return true;
+		else
+			return false;
+	}
+
+
+	public void remove(int index) {
+		checkError();
+		combo.remove(index);
+		list.remove(index);
+	}
+
+	public void remove(String str) {
+		checkError();
+		combo.remove(str);
+		list.remove(str);
+	}
+
+	public void select(int index) {
+		combo.select(index);
+	}
+
+	public void setEnabled(boolean enabled) {
+		combo.setEnabled(enabled);
+	}
+
+	public boolean setFocus() {
+		return combo.setFocus();
+	}
+
+	public void setItem(int index, String str) {
+		checkError();
+		combo.setItem(index, str);
+		list.remove(index);
+		list.add(index, str);
+	}
+
+	public void setItem(String[] strArray) {
+		checkError();
+		combo.setItems(strArray);
+		for (int i = 0; i < strArray.length; i++)
+			list.add(strArray[i]);
+	}
+
+	public void setLayout(org.eclipse.swt.widgets.Layout lo) {
+		combo.setLayout(lo);
+	}
+
+	public void setLayoutData(Object layoutData) {
+		combo.setLayoutData(layoutData);
+	}
+
+	public void setSelection(Point point) {
+		combo.setSelection(point);
+	}
+
+	public void setText(String str) {
+		combo.setText(str);
+	}
+
+	public void sortByKey(int offset) {
+		if (offset < 0 || offset > this.combo.getItemCount() - 1)
+			return;
+		checkError();
+		//
+		for (int i = offset; i < combo.getItemCount() - 1; i++) {
+			for (int j = i + 1; j < combo.getItemCount(); j++) {
+				if (getItem(i).compareTo(getItem(j)) > 0) {
+					exchangePosition(i, j);
+				}
+			}
+		}
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ComboListOnPropertyPage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ComboListOnPropertyPage.java
new file mode 100644
index 0000000..f46c517
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ComboListOnPropertyPage.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentproperties.ui;
+
+
+
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @deprecated People should manage their own combo/list
+ */
+public final class ComboListOnPropertyPage extends ComboList {
+
+
+	private String currentApplyValue;
+
+	public ComboListOnPropertyPage(Composite parent, int style) {
+		super(parent, style);
+	}
+
+	public final String getApplyValue() {
+		return currentApplyValue;
+	}
+
+	public final void setApplyValue(String currentApplyValue) {
+		this.currentApplyValue = currentApplyValue;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ContentSettingsPropertyPage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ContentSettingsPropertyPage.java
new file mode 100644
index 0000000..f937860
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ContentSettingsPropertyPage.java
@@ -0,0 +1,297 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.contentproperties.ui;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+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.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.internal.contentproperties.ContentSettings;
+import org.eclipse.wst.sse.internal.contentproperties.ContentSettingsCreator;
+import org.eclipse.wst.sse.internal.contentproperties.IContentSettings;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+/**
+ * @deprecated Please use
+ *             org.eclipse.wst.html.ui.internal.contentproperties.ui.WebContentSettingsPropertyPage
+ *             or
+ *             eclipse.wst.css.ui.internal.contentproperties.ui.CSSWebContentSettingsPropertyPage
+ *             instead
+ */
+public abstract class ContentSettingsPropertyPage extends PropertyPage {
+	private static final IStatus STATUS_ERROR = new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.INFO, "ERROR", null); //$NON-NLS-1$
+
+	// for validateEdit()
+	private static final IStatus STATUS_OK = new Status(IStatus.OK, SSEUIPlugin.ID, IStatus.OK, "OK", null); //$NON-NLS-1$
+
+	/**
+	 * Method validateEdit.
+	 * 
+	 * @param file
+	 *            org.eclipse.core.resources.IFile
+	 * @param context
+	 *            org.eclipse.swt.widgets.Shell
+	 * @return IStatus
+	 */
+	private static IStatus validateEdit(IFile file, Shell context) {
+		if (file == null || !file.exists())
+			return STATUS_ERROR;
+		if (!(file.isReadOnly()))
+			return STATUS_OK;
+
+		IPath location = file.getLocation();
+
+		final long beforeModifiedFromJavaIO = (location != null) ? location.toFile().lastModified() : IResource.NULL_STAMP;
+		final long beforeModifiedFromIFile = file.getModificationStamp();
+
+		IStatus status = ResourcesPlugin.getWorkspace().validateEdit(new IFile[]{file}, context);
+		if (!status.isOK())
+			return status;
+
+		final long afterModifiedFromJavaIO = (location != null) ? location.toFile().lastModified() : IResource.NULL_STAMP;
+		final long afterModifiedFromIFile = file.getModificationStamp();
+
+		if (beforeModifiedFromJavaIO != afterModifiedFromJavaIO || beforeModifiedFromIFile != afterModifiedFromIFile) {
+			IModelManager manager = StructuredModelManager.getModelManager();
+			IStructuredModel model = manager.getExistingModelForRead(file);
+			if (model != null) {
+				if (!model.isDirty()) {
+					try {
+						file.refreshLocal(IResource.DEPTH_ONE, null);
+					}
+					catch (CoreException e) {
+						return STATUS_ERROR;
+					}
+					finally {
+						model.releaseFromRead();
+					}
+				}
+				else {
+					model.releaseFromRead();
+				}
+			}
+		}
+
+		if ((beforeModifiedFromJavaIO != afterModifiedFromJavaIO) || (beforeModifiedFromIFile != afterModifiedFromIFile)) {
+			// the file is replaced. Modification cannot be
+			// applied.
+			return STATUS_ERROR;
+		}
+		return STATUS_OK;
+	}
+
+	protected ComboListOnPropertyPage[] combo;
+	protected Composite composite;
+
+	protected IContentSettings contentSettings;
+	protected final String CSS_LABEL = SSEUIMessages.UI_CSS_profile___2; //$NON-NLS-1$
+	protected final String DEVICE_LABEL = SSEUIMessages.UI_Target_Device___3; //$NON-NLS-1$
+
+	protected final String DOCUMENT_LABEL = SSEUIMessages.UI_Default_HTML_DOCTYPE_ID___1; //$NON-NLS-1$
+	protected int numberOfCombo;
+	protected int numCols = 1;
+	protected int numRows = 1;
+	protected Composite propertyPage;
+
+	public ContentSettingsPropertyPage() {
+		super();
+	}
+
+	private void cleanUp() {
+		// Are There any way to guarantee to call cleanUp() to re-load
+		// downloaded .contentsettings file
+		// after ContentSettings.releaseCache() in ContentSettingSelfHandler
+		// class, which is called by resourceChangeEvent
+	}
+
+
+	protected ComboListOnPropertyPage createComboBoxOf(String title) {
+
+		Label label = new Label(propertyPage, SWT.LEFT);
+		label.setText(title);
+		if (title != null && title.startsWith(SSEUIMessages.UI_Default_HTML_DOCTYPE_ID___1)) { //$NON-NLS-1$
+			GridData data = new GridData();
+			data.horizontalIndent = 10;
+			label.setLayoutData(data);
+		}
+		ComboListOnPropertyPage combo = new ComboListOnPropertyPage(propertyPage, SWT.READ_ONLY);
+		GridData data = new GridData();
+		data.verticalAlignment = GridData.FILL;
+		// data.horizontalAlignment= GridData.FILL;
+		data.grabExcessHorizontalSpace = true;
+		combo.setLayoutData(data);
+		return combo;
+	}
+
+
+
+	protected Composite createComposite(Composite parent, int numColumns, int numRows) {
+		Composite composite = new Composite(parent, SWT.NONE);
+
+		// GridLayout
+		GridLayout layout = new GridLayout();
+		layout.numColumns = numColumns;
+		composite.setLayout(layout);
+
+		// GridData
+		GridData data = new GridData();
+		data.verticalAlignment = GridData.FILL;
+		data.horizontalAlignment = GridData.FILL;
+		data.grabExcessHorizontalSpace = true;
+		// data.horizontalSpan=numColumns;
+		// data.verticalSpan=numRows;
+
+		composite.setLayoutData(data);
+		return composite;
+	}
+
+
+	protected Control createContents(Composite parent) {
+
+		contentSettings = ContentSettingsCreator.create();
+
+		propertyPage = createComposite(parent, numCols, numRows);
+
+		createSettingsPageGUI();
+
+		return propertyPage;
+
+
+	}
+
+	protected abstract void createSettingsPageGUI();
+
+	// protected abstract void applySelectedPropertyValue(String str,int
+	// index);
+	protected abstract void deleteNoneProperty(int index);
+
+
+
+	protected boolean isInitValueChanged(String before, String after) {
+		if (before == null && after == null)
+			return false;
+		if (before != null && before.equals(after))
+			return false;
+		return true;
+	}
+
+
+
+	protected void performDefaults() {
+		super.performDefaults();
+		// selected(applied) item is restored.
+		for (int i = 0; i < numberOfCombo; i++) {
+			// String appliedValue = combo[i].getApplyValue();
+			// setSelectionItem(combo[i],appliedValue);
+			combo[i].select(0); // select none.
+
+		}
+
+	}
+
+	public boolean performOk() {
+		Map properties = new Hashtable();
+		if (validateState() == false) {
+			cleanUp();
+			return true;
+		}
+		for (int i = 0; i < numberOfCombo; i++) {
+			// get selected item in Combo box.
+			String str = combo[i].getSelectedValue();
+			if (str == null)
+				continue;
+			// if no change, skip setProperty
+			if (!isInitValueChanged(combo[i].getApplyValue(), str))
+				continue;
+			// if NONE is selected, delete attr instance (and write
+			// .contentsettings.)
+			if (str != null && str.length() == 0)
+				deleteNoneProperty(i);
+			else
+				putSelectedPropertyInto(properties, str, i);
+			// applySelectedPropertyValue(str,i);
+
+			// set apply value in ComboListOnPropertyPage.
+			combo[i].setApplyValue(str);
+		}
+		if (properties != null && !properties.isEmpty())
+			contentSettings.setProperties((IResource) super.getElement(), properties);
+		if (properties != null)
+			properties.clear();
+		properties = null;
+		if (!contentSettings.existsProperties((IResource) super.getElement()))
+			contentSettings.deleteAllProperties((IResource) super.getElement());
+		return true;
+	}
+
+	protected abstract void putSelectedPropertyInto(Map properties, String str, int i);
+
+
+	protected void setSelectionItem(ComboListOnPropertyPage combo, String value) {
+		if (combo.getItemCount() <= 0)
+			return;
+		combo.setApplyValue(value);
+		String item = combo.getKey(value);
+		if (item != null)
+			combo.select(combo.indexOf(item));
+		else
+			combo.select(0);
+
+	}
+
+	/*
+	 * Validate Edit. Similar function will be in HTMLCommand.java
+	 * ContentSettingsPropertyPage.java CSSActionManager.java
+	 * DesignRedoAction.java DesignUndoAction.java
+	 * HTMLConversionProcessor.java
+	 */
+	private boolean validateState() {
+
+		// get IFile of .contentsettings
+		final String name = ContentSettings.getContentSettingsName();
+		final IResource resource = (IResource) super.getElement();
+		final IProject project = resource.getProject();
+		IFile file = project.getFile(name);
+
+		if (file != null && !file.exists())
+			return true; // Is this really OK?
+		// If false should be returned,
+		// This statemant can be removed,
+		// since ModelManagerUtil.validateEdit()
+		// returns error to this case.
+
+		Shell shell = getControl().getShell();
+		IStatus status = validateEdit(file, shell);
+		return status.isOK() ? true : false;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/AnnotationQuery.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/AnnotationQuery.java
new file mode 100644
index 0000000..b8d1936
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/AnnotationQuery.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import java.util.Map;
+
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
+
+/*
+ * Copied from org.eclipse.ui.internal.ide.registry.MarkerQuery
+ */
+class AnnotationQuery {
+	/**
+	 * The annotation type targetted by this query. May be <code>null</code>.
+	 */
+	private String type;
+
+	/**
+	 * A sorted list of the attributes targetted by this query. The list is
+	 * sorted from least to greatest according to <code>Sting.compare</code>
+	 */
+	private String[] attributes;
+
+	/**
+	 * Cached hash code value
+	 */
+	private int hashCode;
+
+	/**
+	 * Creates a new annotation query with the given type and attributes.
+	 * <p>
+	 * The type may be <code>null</code>. The attributes may be empty, but
+	 * not <code>null</code>.
+	 * </p>
+	 * 
+	 * @param problemType
+	 *            the targeted annotation type
+	 * @param markerAttributes
+	 *            the targeted annotation attributes
+	 */
+	public AnnotationQuery(String annotationType, String[] annotationAttributes) {
+		if (annotationAttributes == null) {
+			throw new IllegalArgumentException();
+		}
+
+		type = annotationType;
+		attributes = annotationAttributes;
+		computeHashCode();
+	}
+
+	/**
+	 * Performs a query against the given annotation.
+	 * <p>
+	 * Returns a <code>AnnotationQueryResult</code> if the marker is
+	 * appropriate for this query (correct type and has all of the query
+	 * attributes), otherwise <code>null</code> is returned.
+	 * 
+	 * @param annotation
+	 *            the annotation to perform the query against
+	 * @return a annotation query result or <code>null</code>
+	 */
+	public AnnotationQueryResult performQuery(Annotation anno) {
+		if (!(anno instanceof TemporaryAnnotation))
+			return null;
+
+		Map annoAttributes = ((TemporaryAnnotation) anno).getAttributes();
+		/*
+		 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=243660
+		 * 
+		 * May be null if the original validation IMessage contained no
+		 * attributes or this annotation was not based on a validation
+		 * IMessage
+		 */
+		if (annoAttributes == null) {
+			return null;
+		}
+		
+		// Check type
+		if (type != null) {
+			String problemType = (String) annoAttributes.get("problemType"); //$NON-NLS-1$;
+			if (!type.equals(problemType))
+				return null;
+		}
+
+		String[] values = new String[attributes.length];
+		for (int i = 0; i < attributes.length; i++) {
+			Object value = annoAttributes.get(attributes[i]);
+			if (value == null) {
+				return null;
+			}
+			values[i] = value.toString();
+		}
+		// Create and return the result
+		return new AnnotationQueryResult(values);
+	}
+
+	/*
+	 * (non-Javadoc) Method declared on Object.
+	 */
+	public boolean equals(Object o) {
+		if (!(o instanceof AnnotationQuery)) {
+			return false;
+		}
+
+		if (o == this) {
+			return true;
+		}
+
+		AnnotationQuery mq = (AnnotationQuery) o;
+		if (!(type == null ? mq.type == null : type.equals(mq.type))) {
+			return false;
+		}
+
+		if (attributes.length != mq.attributes.length) {
+			return false;
+		}
+
+		for (int i = 0; i < attributes.length; i++) {
+			if (!(attributes[i].equals(mq.attributes[i]))) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc) Method declared on Object.
+	 */
+	public int hashCode() {
+		return hashCode;
+	}
+
+	/**
+	 * Computes the hash code for this instance.
+	 */
+	public void computeHashCode() {
+		hashCode = 19;
+
+		if (type != null) {
+			hashCode = hashCode * 37 + type.hashCode();
+		}
+
+		for (int i = 0; i < attributes.length; i++) {
+			hashCode = hashCode * 37 + attributes[i].hashCode();
+		}
+	}
+
+	/**
+	 * Returns the targetted marker type. May be <code>null</code>
+	 * 
+	 * @return the targetted marker type
+	 */
+	public String getType() {
+		return type;
+	}
+
+	/**
+	 * Returns the targetted attributes. The array may be empty.
+	 * 
+	 * @return the targetted attributes
+	 */
+	public String[] getAttributes() {
+		return attributes;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/AnnotationQueryResult.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/AnnotationQueryResult.java
new file mode 100644
index 0000000..51d1675
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/AnnotationQueryResult.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+/*
+ * Copied from rg.eclipse.ui.internal.ide.registr.MarkerQueryResult
+ */
+class AnnotationQueryResult {
+	/**
+	 * An ordered collection of annotation attribute values.
+	 */
+	private String[] values;
+
+	/**
+	 * Cached hash code value
+	 */
+	private int hashCode;
+
+	/**
+	 * Creates a new annotation query result with the given values.
+	 * <p>
+	 * The values may not be empty.
+	 * </p>
+	 * 
+	 * @param annotationAttributeValues
+	 *            the target annotation's attribute values
+	 */
+	public AnnotationQueryResult(String[] annotationAttributeValues) {
+		if (annotationAttributeValues == null) {
+			throw new IllegalArgumentException();
+		}
+		values = annotationAttributeValues;
+		computeHashCode();
+	}
+
+	/*
+	 * (non-Javadoc) Method declared on Object.
+	 */
+	public boolean equals(Object o) {
+		if (!(o instanceof AnnotationQueryResult)) {
+			return false;
+		}
+
+		if (o == this) {
+			return true;
+		}
+
+		AnnotationQueryResult mqr = (AnnotationQueryResult) o;
+		if (values.length != mqr.values.length) {
+			return false;
+		}
+
+		for (int i = 0; i < values.length; i++) {
+			if (!(values[i].equals(mqr.values[i]))) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc) Method declared on Object.
+	 */
+	public int hashCode() {
+		return hashCode;
+	}
+
+	/**
+	 * Computes the hash code for this instance.
+	 */
+	public void computeHashCode() {
+		hashCode = 19;
+
+		for (int i = 0; i < values.length; i++) {
+			hashCode = hashCode * 37 + values[i].hashCode();
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/CompoundQuickAssistProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/CompoundQuickAssistProcessor.java
new file mode 100644
index 0000000..7e410d4
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/CompoundQuickAssistProcessor.java
@@ -0,0 +1,211 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
+import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+/**
+ * A quick assist processor that will allow for more than one quick assist
+ * processor. It includes quick assist processors contributed via the
+ * quickAssistProcessor extended configuration extension point. It also
+ * includes quick assist processors contributed via validators.
+ */
+public class CompoundQuickAssistProcessor implements IQuickAssistProcessor {
+	private final String QUICK_ASSIST_PROCESSOR_EXTENDED_ID = IQuickAssistProcessor.class.getName();
+	private Map fProcessors;
+	private IQuickAssistProcessor fQuickFixProcessor;
+	/**
+	 * list of partition types where extended processors have been installed
+	 */
+	private List fInstalledExtendedContentTypes;
+
+	private Set getQuickAssistProcessors(String partitionType) {
+		if (fInstalledExtendedContentTypes == null || !fInstalledExtendedContentTypes.contains(partitionType)) {
+			// get extended quick assist processors that have not already
+			// been set
+			List processors = ExtendedConfigurationBuilder.getInstance().getConfigurations(QUICK_ASSIST_PROCESSOR_EXTENDED_ID, partitionType);
+			if (processors != null && !processors.isEmpty()) {
+				Iterator iter = processors.iterator();
+				while (iter.hasNext()) {
+					IQuickAssistProcessor processor = (IQuickAssistProcessor) iter.next();
+					setQuickAssistProcessor(partitionType, processor);
+				}
+			}
+			// add partition type to list of extended partition types
+			// installed (regardless of whether or not any extended content
+			// assist processors were installed because dont want to look it
+			// up every time)
+			if (fInstalledExtendedContentTypes == null)
+				fInstalledExtendedContentTypes = new ArrayList();
+			fInstalledExtendedContentTypes.add(partitionType);
+		}
+
+		Set processors = null;
+		if (fProcessors != null)
+			processors = (Set) fProcessors.get(partitionType);
+
+		return processors;
+	}
+
+	/**
+	 * Gets all the quick assist processors relevant to the partion which is
+	 * calcuated from the given document and offset.
+	 * 
+	 * @param invocationContext
+	 * @return Set of quick assist processors or null if none exist
+	 */
+	private Set getQuickAssistProcessors(IQuickAssistInvocationContext invocationContext) {
+		Set processsors = null;
+
+		ISourceViewer sourceViewer = invocationContext.getSourceViewer();
+		if (sourceViewer != null) {
+			IDocument document = sourceViewer.getDocument();
+			try {
+				String partitionType;
+				if (document != null)
+					partitionType = TextUtilities.getContentType(document, IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, invocationContext.getOffset(), true);
+				else
+					partitionType = IDocument.DEFAULT_CONTENT_TYPE;
+
+				processsors = getQuickAssistProcessors(partitionType);
+			}
+			catch (BadLocationException x) {
+				Logger.log(Logger.WARNING_DEBUG, x.getMessage(), x);
+			}
+		}
+
+		return processsors;
+	}
+
+	/**
+	 * Gets the quick assist processor for validator contributed quick fixes
+	 * 
+	 * @return IQuickAssistProcessor
+	 */
+	private IQuickAssistProcessor getQuickFixProcessor() {
+		if (fQuickFixProcessor == null)
+			fQuickFixProcessor = new SourceValidationQuickAssistProcessor();
+
+		return fQuickFixProcessor;
+	}
+
+	/**
+	 * Associates a quick assist processor to a partition type and adds it to
+	 * the list of processors in this compound processor.
+	 * 
+	 * @param partitionType
+	 * @param processor
+	 */
+	private void setQuickAssistProcessor(String partitionType, IQuickAssistProcessor processor) {
+		if (fProcessors == null)
+			fProcessors = new HashMap();
+
+		Set processors = (Set) fProcessors.get(partitionType);
+
+		if (processor == null && processors != null) {
+			// removing quick assist processor for this partition type
+			processors.clear();
+			// check if it's the only
+			fProcessors.remove(partitionType);
+		}
+		else {
+			if (processors == null) {
+				processors = new LinkedHashSet();
+			}
+			processors.add(processor);
+			fProcessors.put(partitionType, processors);
+		}
+	}
+
+	public boolean canAssist(IQuickAssistInvocationContext invocationContext) {
+		Set processors = getQuickAssistProcessors(invocationContext);
+		if (processors != null) {
+			// iterate through list of processors until one processor says
+			// canAssist
+			for (Iterator it = processors.iterator(); it.hasNext();) {
+				IQuickAssistProcessor p = (IQuickAssistProcessor) it.next();
+				if (p.canAssist(invocationContext))
+					return true;
+			}
+		}
+		return false;
+	}
+
+	public boolean canFix(Annotation annotation) {
+		// only quick fix processor contributes fixes so just check it
+		IQuickAssistProcessor processor = getQuickFixProcessor();
+		return processor.canFix(annotation);
+	}
+
+	public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
+		List proposalsList = new ArrayList();
+
+		// first get list of fixes
+		IQuickAssistProcessor processor = getQuickFixProcessor();
+		ICompletionProposal[] proposals = processor.computeQuickAssistProposals(invocationContext);
+		if (proposals != null && proposals.length > 0) {
+			proposalsList.addAll(Arrays.asList(proposals));
+		}
+
+		// no fixes, so try adding assists
+		if (proposalsList.isEmpty()) {
+			Set processors = getQuickAssistProcessors(invocationContext);
+			if (processors != null) {
+				// iterate through list of processors until one processor says
+				// canAssist
+				for (Iterator it = processors.iterator(); it.hasNext();) {
+					IQuickAssistProcessor assistProcessor = (IQuickAssistProcessor) it.next();
+					ICompletionProposal[] assistProposals = assistProcessor.computeQuickAssistProposals(invocationContext);
+					if (assistProposals != null && assistProposals.length > 0) {
+						proposalsList.addAll(Arrays.asList(assistProposals));
+					}
+				}
+			}
+		}
+
+		/*
+		 * Java editor currently returns a no modification completion proposal
+		 * but it seems better to just return null so user does not get
+		 * annoying proposal popup
+		 */
+		if (proposalsList.isEmpty()) {
+			// proposalsList.add(new NoModificationCompletionProposal());
+			return null;
+		}
+
+		return (ICompletionProposal[]) proposalsList.toArray(new ICompletionProposal[proposalsList.size()]);
+	}
+
+	public String getErrorMessage() {
+		// never have error messages
+		return null;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/ContributedProcessorDescriptor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/ContributedProcessorDescriptor.java
new file mode 100644
index 0000000..d64572a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/ContributedProcessorDescriptor.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+
+/**
+ * @deprecated since 2.0 RC0 Use
+ *             org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+ */
+public class ContributedProcessorDescriptor {
+	private static final String CLASS = "class"; //$NON-NLS-1$
+
+	private IConfigurationElement fConfigurationElement;
+	private Object fProcessorInstance;
+
+	public ContributedProcessorDescriptor(IConfigurationElement element) {
+		fConfigurationElement = element;
+		fProcessorInstance = null;
+	}
+
+	public Object getProcessor() throws CoreException {
+		if (fProcessorInstance == null && fConfigurationElement != null) {
+			fProcessorInstance = fConfigurationElement.createExecutableExtension(CLASS);
+		}
+		return fProcessorInstance;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/CorrectionAssistantProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/CorrectionAssistantProvider.java
new file mode 100644
index 0000000..e044939
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/CorrectionAssistantProvider.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.source.ISourceViewer;
+
+/**
+ * Provides the appropriate correction assistant for a given source viewer.
+ * This class should only be a placeholder until the base implements a common
+ * way for quickfix/quick assist.
+ * 
+ * @deprecated since 2.0 RC0 Use
+ *             org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+ */
+abstract public class CorrectionAssistantProvider {
+	/**
+	 * Returns the correction assistant for the given sourceviewer.
+	 * 
+	 * @param sourceViewer
+	 * @return
+	 */
+	abstract public IContentAssistant getCorrectionAssistant(ISourceViewer sourceViewer);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/IQuickAssistProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/IQuickAssistProcessor.java
new file mode 100644
index 0000000..6720223
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/IQuickAssistProcessor.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+
+/**
+ * @deprecated since 2.0 RC0 Use
+ *             org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+ */
+public interface IQuickAssistProcessor {
+	/**
+	 * Returns true if the processor can assist at the given offset. This test
+	 * should be an optimistic guess and be extremly cheap.
+	 */
+	boolean canAssist(StructuredTextViewer viewer, int offset);
+
+	/**
+	 * Collects proposals for assistant at the given offset.
+	 */
+	ICompletionProposal[] getProposals(StructuredTextViewer viewer, int offset) throws CoreException;
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/IQuickFixProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/IQuickFixProcessor.java
new file mode 100644
index 0000000..c93d21e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/IQuickFixProcessor.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.source.Annotation;
+
+/**
+ * @deprecated since 2.0 RC0 Use
+ *             org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+ */
+public interface IQuickFixProcessor {
+	/**
+	 * Returns true if the processor can fix the given problem. This test
+	 * should be an optimistic guess and be extremly cheap.
+	 */
+	boolean canFix(Annotation annnotation);
+
+	/**
+	 * Collects proposals for fixing the given problem.
+	 */
+	ICompletionProposal[] getProposals(Annotation annnotation) throws CoreException;
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/NoModificationCompletionProposal.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/NoModificationCompletionProposal.java
new file mode 100644
index 0000000..babb1a8
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/NoModificationCompletionProposal.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+
+public class NoModificationCompletionProposal implements ICompletionProposal {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)
+	 */
+	public void apply(IDocument document) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
+	 */
+	public String getAdditionalProposalInfo() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation()
+	 */
+	public IContextInformation getContextInformation() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
+	 */
+	public String getDisplayString() {
+		return SSEUIMessages.NoModificationCompletionProposal_0; //$NON-NLS-1$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
+	 */
+	public Image getImage() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
+	 */
+	public Point getSelection(IDocument document) {
+		return null;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/QuickFixRegistry.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/QuickFixRegistry.java
new file mode 100644
index 0000000..2be196f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/QuickFixRegistry.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.wst.sse.core.internal.Logger;
+
+public class QuickFixRegistry {
+	private static QuickFixRegistry instance;
+
+	public synchronized static QuickFixRegistry getInstance() {
+		if (instance == null) {
+			instance = new QuickFixRegistry();
+			new QuickFixRegistryReader().addHelp(instance);
+		}
+		return instance;
+	}
+
+	/**
+	 * Table of queries for marker resolutions
+	 */
+	private Map resolutionQueries = new HashMap();
+	/**
+	 * Resolution class attribute name in configuration element
+	 */
+	private static final String ATT_CLASS = "class"; //$NON-NLS-1$
+
+	/**
+	 * Adds a resolution query to the registry.
+	 * 
+	 * @param query
+	 *            a marker query
+	 * @param result
+	 *            a result for the given query
+	 * @param element
+	 *            the configuration element defining the result
+	 */
+	void addResolutionQuery(AnnotationQuery query, AnnotationQueryResult result, IConfigurationElement element) {
+		addQuery(resolutionQueries, query, result, element);
+	}
+
+	/**
+	 * Adds a query to the given table.
+	 * 
+	 * @param table
+	 *            the table to which the query is added
+	 * @param query
+	 *            a marker query
+	 * @param result
+	 *            a result for the given query
+	 * @param element
+	 *            the configuration element defining the result
+	 */
+	private void addQuery(Map table, AnnotationQuery query, AnnotationQueryResult result, IConfigurationElement element) {
+
+		// See if the query is already in the table
+		Map results = (Map) table.get(query);
+		if (results == null) {
+			// Create a new results table
+			results = new HashMap();
+
+			// Add the query to the table
+			table.put(query, results);
+		}
+
+		if (results.containsKey(result)) {
+			Collection currentElements = (Collection) results.get(result);
+			currentElements.add(element);
+		}
+		else {
+			Collection elements = new HashSet();
+			elements.add(element);
+
+			// Add the new result
+			results.put(result, elements);
+		}
+	}
+
+	public IQuickAssistProcessor[] getQuickFixProcessors(Annotation anno) {
+		// Collect all matches
+		List processors = new ArrayList();
+		for (Iterator iter = resolutionQueries.keySet().iterator(); iter.hasNext();) {
+			AnnotationQuery query = (AnnotationQuery) iter.next();
+			AnnotationQueryResult result = null;
+			try {
+				/* AnnotationQuery objects are contributed by extension point */
+				result = query.performQuery(anno);
+			}
+			catch (Exception e) {
+				Logger.logException(e);
+			}
+			if (result != null) {
+				// See if a matching result is registered
+				Map resultsTable = (Map) resolutionQueries.get(query);
+
+				if (resultsTable.containsKey(result)) {
+
+					Iterator elements = ((Collection) resultsTable.get(result)).iterator();
+					while (elements.hasNext()) {
+						IConfigurationElement element = (IConfigurationElement) elements.next();
+
+						IQuickAssistProcessor processor = null;
+						try {
+							processor = (IQuickAssistProcessor) element.createExecutableExtension(ATT_CLASS);
+						}
+						catch (CoreException e) {
+						}
+						if (processor != null) {
+							processors.add(processor);
+						}
+
+					}
+				}
+			}
+		}
+		return (IQuickAssistProcessor[]) processors.toArray(new IQuickAssistProcessor[processors.size()]);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/QuickFixRegistryReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/QuickFixRegistryReader.java
new file mode 100644
index 0000000..4341bde
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/QuickFixRegistryReader.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.extension.RegistryReader;
+
+public class QuickFixRegistryReader extends RegistryReader {
+	private static final String QUICKFIXPROCESSOR = "quickFixProcessor"; //$NON-NLS-1$
+	private static final String ATT_PROBLEMTYPE = "problemType"; //$NON-NLS-1$
+
+	private static final String ATTRIBUTE = "attribute"; //$NON-NLS-1$
+	private static final String ATT_NAME = "name"; //$NON-NLS-1$
+	private static final String ATT_VALUE = "value"; //$NON-NLS-1$
+
+	private ArrayList currentAttributeNames;
+
+	private ArrayList currentAttributeValues;
+
+	private QuickFixRegistry quickFixProcessorRegistry;
+
+	protected boolean readElement(IConfigurationElement element) {
+		if (element.getName().equals(QUICKFIXPROCESSOR)) {
+			readQuickFixProcessorElement(element);
+			return true;
+		}
+		if (element.getName().equals(ATTRIBUTE)) {
+			readAttributeElement(element);
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Processes a resolution configuration element.
+	 */
+	private void readQuickFixProcessorElement(IConfigurationElement element) {
+		// read type
+		String type = element.getAttribute(ATT_PROBLEMTYPE);
+
+		// read attributes and values
+		currentAttributeNames = new ArrayList();
+		currentAttributeValues = new ArrayList();
+		readElementChildren(element);
+		String[] attributeNames = (String[]) currentAttributeNames.toArray(new String[currentAttributeNames.size()]);
+		String[] attributeValues = (String[]) currentAttributeValues.toArray(new String[currentAttributeValues.size()]);
+
+		// add query to the registry
+		AnnotationQuery query = new AnnotationQuery(type, attributeNames);
+		AnnotationQueryResult result = new AnnotationQueryResult(attributeValues);
+		quickFixProcessorRegistry.addResolutionQuery(query, result, element);
+	}
+
+	/**
+	 * Get the marker help that is defined in the plugin registry and add it
+	 * to the given marker help registry.
+	 * <p>
+	 * Warning: The marker help registry must be passed in because this method
+	 * is called during the process of setting up the marker help registry and
+	 * at this time it has not been safely setup with the plugin.
+	 * </p>
+	 */
+	public void addHelp(QuickFixRegistry registry) {
+		IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
+		quickFixProcessorRegistry = registry;
+		readRegistry(extensionRegistry, SSEUIPlugin.ID, QUICKFIXPROCESSOR);
+	}
+
+	/**
+	 * Processes an attribute sub element.
+	 */
+	private void readAttributeElement(IConfigurationElement element) {
+		String name = element.getAttribute(ATT_NAME);
+		String value = element.getAttribute(ATT_VALUE);
+		if (name != null && value != null) {
+			currentAttributeNames.add(name);
+			currentAttributeValues.add(value);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/SourceValidationQuickAssistProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/SourceValidationQuickAssistProcessor.java
new file mode 100644
index 0000000..9033fd5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/SourceValidationQuickAssistProcessor.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
+import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+import org.eclipse.jface.text.quickassist.IQuickFixableAnnotation;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModelExtension2;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.wst.sse.ui.StructuredTextInvocationContext;
+import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
+
+/**
+ * This quick assist processor will provide quick fixes for source validation
+ * errors (Temporary Annotation)
+ */
+public class SourceValidationQuickAssistProcessor implements IQuickAssistProcessor {
+	public boolean canAssist(IQuickAssistInvocationContext invocationContext) {
+		return false;
+	}
+
+	public boolean canFix(Annotation annotation) {
+		if (annotation instanceof IQuickFixableAnnotation) {
+			if (((IQuickFixableAnnotation) annotation).isQuickFixableStateSet()) {
+				return ((IQuickFixableAnnotation) annotation).isQuickFixable();
+			}
+		}
+		return false;
+	}
+
+	public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext quickAssistContext) {
+		ISourceViewer viewer = quickAssistContext.getSourceViewer();
+		int documentOffset = quickAssistContext.getOffset();
+		int length = viewer != null ? viewer.getSelectedRange().y : 0;
+
+		IAnnotationModel model = viewer.getAnnotationModel();
+		if (model == null)
+			return null;
+
+		List allProposals = new ArrayList();
+		if (model instanceof IAnnotationModelExtension2) {
+			Iterator iter = ((IAnnotationModelExtension2) model).getAnnotationIterator(documentOffset, length, true, true);
+			while (iter.hasNext()) {
+				List processors = new ArrayList();
+				Annotation anno = (Annotation) iter.next();
+				if (canFix(anno)) {
+					// first check to see if annotation already has a quick
+					// fix processor attached to it
+					if (anno instanceof TemporaryAnnotation) {
+						Object o = ((TemporaryAnnotation) anno).getAdditionalFixInfo();
+						if (o instanceof IQuickAssistProcessor) {
+							processors.add(o);
+						}
+					}
+
+					// get all relevant quick fixes for this annotation
+					QuickFixRegistry registry = QuickFixRegistry.getInstance();
+					processors.addAll(Arrays.asList(registry.getQuickFixProcessors(anno)));
+
+					// set up context
+					Map attributes = null;
+					if (anno instanceof TemporaryAnnotation) {
+						attributes = ((TemporaryAnnotation) anno).getAttributes();
+					}
+					Position pos = model.getPosition(anno);
+					StructuredTextInvocationContext sseContext = new StructuredTextInvocationContext(viewer, pos.getOffset(), pos.getLength(), attributes);
+
+					// call each processor
+					for (int i = 0; i < processors.size(); ++i) {
+						List proposals = new ArrayList();
+						collectProposals((IQuickAssistProcessor) processors.get(i), anno, sseContext, proposals);
+
+						if (proposals.size() > 0) {
+							allProposals.addAll(proposals);
+						}
+					}
+
+				}
+			}
+		}
+
+		if (allProposals.isEmpty())
+			return null;
+
+		return (ICompletionProposal[]) allProposals.toArray(new ICompletionProposal[allProposals.size()]);
+	}
+
+	private void collectProposals(IQuickAssistProcessor processor, Annotation annotation, IQuickAssistInvocationContext invocationContext, List proposalsList) {
+		ICompletionProposal[] proposals = processor.computeQuickAssistProposals(invocationContext);
+		if (proposals != null && proposals.length > 0) {
+			proposalsList.addAll(Arrays.asList(proposals));
+		}
+	}
+
+
+	public String getErrorMessage() {
+		return null;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/StructuredCorrectionProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/StructuredCorrectionProcessor.java
new file mode 100644
index 0000000..d19427c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/StructuredCorrectionProcessor.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.correction;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+
+/**
+ * @deprecated since 2.0 RC0 Use
+ *             org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+ */
+public class StructuredCorrectionProcessor implements IContentAssistProcessor {
+	protected IAnnotationModel fAnnotationModel;
+	protected IQuickAssistProcessor fQuickAssistProcessor;
+	protected IQuickFixProcessor fQuickFixProcessor;
+
+	public StructuredCorrectionProcessor(ISourceViewer sourceViewer) {
+		fAnnotationModel = sourceViewer.getAnnotationModel();
+	}
+
+	protected void addQuickAssistProposals(StructuredTextViewer viewer, ArrayList proposals, int documentOffset) {
+		try {
+			IQuickAssistProcessor processor = getQuickAssistProcessor();
+			if (processor != null && processor.canAssist(viewer, documentOffset)) {
+				ICompletionProposal[] res = processor.getProposals(viewer, documentOffset);
+				if (res != null) {
+					for (int k = 0; k < res.length; k++) {
+						proposals.add(res[k]);
+					}
+				}
+			}
+		} catch (CoreException e) {
+			// log for now, unless we find reason not to
+			Logger.log(Logger.INFO, e.getMessage());
+		}
+	}
+
+	protected void addQuickFixProposals(StructuredTextViewer viewer, ArrayList proposals, int documentOffset) {
+		Iterator iter = fAnnotationModel.getAnnotationIterator();
+		while (iter.hasNext()) {
+			Annotation annotation = (Annotation) iter.next();
+			Position pos = fAnnotationModel.getPosition(annotation);
+			if (pos != null && documentOffset >= pos.offset && documentOffset <= pos.offset + pos.length) {
+				IQuickFixProcessor processor = getQuickFixProcessor();
+				if (processor != null && processor.canFix(annotation)) {
+					try {
+						ICompletionProposal[] res = processor.getProposals(annotation);
+						if (res != null) {
+							for (int k = 0; k < res.length; k++) {
+								proposals.add(res[k]);
+							}
+						}
+					} catch (CoreException e) {
+						// log for now, unless we find reason not to
+						Logger.log(Logger.INFO, e.getMessage());
+					}
+				}
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer,
+	 *      int)
+	 */
+	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
+		ArrayList proposals = new ArrayList();
+
+		if (viewer instanceof StructuredTextViewer) {
+			addQuickFixProposals((StructuredTextViewer) viewer, proposals, documentOffset);
+
+			if (proposals.isEmpty()) {
+				addQuickAssistProposals((StructuredTextViewer) viewer, proposals, documentOffset);
+			}
+		}
+
+		if (proposals.isEmpty())
+			proposals.add(new NoModificationCompletionProposal());
+
+		return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer,
+	 *      int)
+	 */
+	public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+	 */
+	public char[] getCompletionProposalAutoActivationCharacters() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
+	 */
+	public char[] getContextInformationAutoActivationCharacters() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
+	 */
+	public IContextInformationValidator getContextInformationValidator() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
+	 */
+	public String getErrorMessage() {
+		return null;
+	}
+
+	protected IQuickAssistProcessor getQuickAssistProcessor() {
+		return null;
+	}
+
+	protected IQuickFixProcessor getQuickFixProcessor() {
+		return null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/BreakpointRulerAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/BreakpointRulerAction.java
new file mode 100644
index 0000000..dc8646e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/BreakpointRulerAction.java
@@ -0,0 +1,318 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     Pete Carapetyan/Genuitec - 244835 - Enable/Disable breakpoint action does not refresh its label
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.debug;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointManager;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IVerticalRulerInfo;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IPartService;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ITextEditorExtension;
+import org.eclipse.ui.texteditor.IUpdate;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.extension.BreakpointProviderBuilder;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IBreakpointProvider;
+
+
+public abstract class BreakpointRulerAction extends Action implements IUpdate {
+
+	protected class MouseUpdater implements MouseListener {
+		public void mouseDoubleClick(MouseEvent e) {
+			// do nothing (here)
+		}
+
+		public void mouseDown(MouseEvent e) {
+			update();
+		}
+
+		public void mouseUp(MouseEvent e) {
+			// do nothing
+		}
+	}
+
+	public static final String getFileExtension(IEditorInput input) {
+		IPath path = null;
+		if (input instanceof IStorageEditorInput) {
+			try {
+				path = ((IStorageEditorInput) input).getStorage().getFullPath();
+			} catch (CoreException e) {
+				Logger.logException(e);
+			}
+		}
+		if (path != null) {
+			return path.getFileExtension();
+		}
+		String name = input.getName();
+		int index = name.lastIndexOf('.');
+		if (index == -1)
+			return null;
+		if (index == (name.length() - 1))
+			return ""; //$NON-NLS-1$
+		return name.substring(index + 1);
+	}
+
+	public static final IResource getResource(IEditorInput input) {
+		IResource resource = null;
+
+		if (input instanceof IFileEditorInput)
+			resource = ((IFileEditorInput) input).getFile();
+		if (resource == null)
+			resource = (IResource) input.getAdapter(IFile.class);
+		if (resource == null)
+			resource = (IResource) input.getAdapter(IResource.class);
+
+		IEditorPart editorPart = null;
+		if (resource == null) {
+			IWorkbench workbench = SSEUIPlugin.getDefault().getWorkbench();
+			if (workbench != null) {
+				IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+				if (window != null) {
+					IPartService service = window.getPartService();
+					if (service != null) {
+						Object part = service.getActivePart();
+						if (part != null && part instanceof IEditorPart) {
+							editorPart = (IEditorPart) part;
+							if (editorPart != null) {
+								IStructuredModel model = null;
+								ITextEditor textEditor = null;
+								try {
+									if (editorPart instanceof ITextEditor) {
+										textEditor = (ITextEditor) editorPart;
+									}
+									if (textEditor == null) {
+										textEditor = (ITextEditor) editorPart.getAdapter(ITextEditor.class);
+									}
+									if (textEditor != null) {
+										IDocument textDocument = textEditor.getDocumentProvider().getDocument(input);
+										model = StructuredModelManager.getModelManager().getExistingModelForRead(textDocument);
+										if (model != null) {
+											resource = BreakpointProviderBuilder.getInstance().getResource(input, model.getContentTypeIdentifier(), getFileExtension(input));
+										}
+									}
+									if (resource == null) {
+										IBreakpointProvider[] providers = BreakpointProviderBuilder.getInstance().getBreakpointProviders(editorPart, null, getFileExtension(input));
+										for (int i = 0; i < providers.length && resource == null; i++) {
+											resource = providers[i].getResource(input);
+										}
+									}
+								} catch (Exception e) {
+									Logger.logException(e);
+								} finally {
+									if (model != null) {
+										model.releaseFromRead();
+									}
+								}
+							}
+
+						}
+					}
+				}
+
+			}
+		}
+		return resource;
+	}
+
+	protected MouseListener fMouseListener = null;
+
+	protected IVerticalRulerInfo fRulerInfo = null;
+	protected ITextEditor fTextEditor = null;
+
+	private IMenuListener menuListener;
+
+	public BreakpointRulerAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
+		super();
+		fTextEditor = editor;
+		if (rulerInfo != null) {
+			fRulerInfo = rulerInfo;
+			fMouseListener = new MouseUpdater();
+			rulerInfo.getControl().addMouseListener(fMouseListener);
+		}
+		if (editor instanceof ITextEditorExtension) {
+			ITextEditorExtension extension = (ITextEditorExtension) editor;
+			menuListener = new IMenuListener() {
+				public void menuAboutToShow(IMenuManager manager) {
+					update();
+				}
+			};
+			extension.addRulerContextMenuListener(menuListener);
+		}
+	}
+
+	/**
+	 * Returns the <code>AbstractMarkerAnnotationModel</code> of the
+	 * editor's input.
+	 * 
+	 * @return the marker annotation model
+	 */
+	protected AbstractMarkerAnnotationModel getAnnotationModel() {
+		IDocumentProvider provider = fTextEditor.getDocumentProvider();
+		IAnnotationModel model = provider.getAnnotationModel(fTextEditor.getEditorInput());
+		if (model instanceof AbstractMarkerAnnotationModel)
+			return (AbstractMarkerAnnotationModel) model;
+		return null;
+	}
+
+	protected IBreakpoint[] getBreakpoints(IMarker[] markers) {
+		IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
+		List breakpoints = new ArrayList(markers.length);
+		for (int i = 0; i < markers.length; i++) {
+			IBreakpoint breakpoint = manager.getBreakpoint(markers[i]);
+			if (breakpoint != null) {
+				breakpoints.add(breakpoint);
+			}
+		}
+		return (IBreakpoint[]) breakpoints.toArray(new IBreakpoint[0]);
+	}
+
+	/**
+	 * Returns the <code>IDocument</code> of the editor's input.
+	 * 
+	 * @return the document of the editor's input
+	 */
+	protected IDocument getDocument() {
+		IDocumentProvider provider = fTextEditor.getDocumentProvider();
+		return provider.getDocument(fTextEditor.getEditorInput());
+	}
+
+	/**
+	 * Returns all markers which include the ruler's line of activity.
+	 * 
+	 * @return an array of markers which include the ruler's line of activity
+	 */
+	protected IMarker[] getMarkers() {
+		List markers = new ArrayList();
+
+		IResource resource = getResource();
+		IDocument document = getDocument();
+		AbstractMarkerAnnotationModel annotationModel = getAnnotationModel();
+
+		if (resource != null && annotationModel != null && resource.exists()) {
+			try {
+				IMarker[] allMarkers = resource.findMarkers(IBreakpoint.BREAKPOINT_MARKER, true, IResource.DEPTH_ZERO);
+				if (allMarkers != null) {
+					for (int i = 0; i < allMarkers.length; i++) {
+						if (includesRulerLine(annotationModel.getMarkerPosition(allMarkers[i]), document)) {
+							markers.add(allMarkers[i]);
+						}
+					}
+				}
+			} catch (CoreException x) {
+				//
+			}
+		}
+
+		return (IMarker[]) markers.toArray(new IMarker[0]);
+	}
+
+	protected IResource getResource() {
+		IEditorInput input = getTextEditor().getEditorInput();
+		IResource resource = getResource(input);
+		return resource;
+	}
+
+	/**
+	 * @return Returns the rulerInfo.
+	 */
+	public IVerticalRulerInfo getRulerInfo() {
+		return fRulerInfo;
+	}
+
+	/**
+	 * @return Returns the textEditor.
+	 */
+	public ITextEditor getTextEditor() {
+		return fTextEditor;
+	}
+
+	protected boolean hasMarkers() {
+		IResource resource = getResource();
+		IDocument document = getDocument();
+		AbstractMarkerAnnotationModel model = getAnnotationModel();
+
+		if (resource != null && model != null && resource.exists()) {
+			try {
+				IMarker[] allMarkers = resource.findMarkers(IBreakpoint.LINE_BREAKPOINT_MARKER, true, IResource.DEPTH_ZERO);
+				if (allMarkers != null) {
+					for (int i = 0; i < allMarkers.length; i++) {
+						if (includesRulerLine(model.getMarkerPosition(allMarkers[i]), document)) {
+							return true;
+						}
+					}
+				}
+			} catch (CoreException x) {
+				//
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Checks whether a position includes the ruler's line of activity.
+	 * 
+	 * @param position
+	 *            the position to be checked
+	 * @param document
+	 *            the document the position refers to
+	 * @return <code>true</code> if the line is included by the given
+	 *         position
+	 */
+	protected boolean includesRulerLine(Position position, IDocument document) {
+		if (position != null && fRulerInfo != null) {
+			try {
+				int markerLine = document.getLineOfOffset(position.getOffset());
+				int line = getRulerInfo().getLineOfLastMouseButtonActivity();
+				if (line == markerLine)
+					return true;
+				// commented because of "1GEUOZ9: ITPJUI:ALL - Confusing UI
+				// for
+				// multiline Bookmarks and Tasks"
+				// return (markerLine <= line && line <=
+				// document.getLineOfOffset(position.getOffset() +
+				// position.getLength()));
+			} catch (BadLocationException x) {
+				//
+			}
+		}
+		return false;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/DebugTextEditor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/DebugTextEditor.java
new file mode 100644
index 0000000..c733782
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/DebugTextEditor.java
@@ -0,0 +1,438 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.debug;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+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.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.IEditorActionBarContributor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPathEditorInput;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.editors.text.FileDocumentProvider;
+import org.eclipse.ui.editors.text.ILocationProvider;
+import org.eclipse.ui.editors.text.StorageDocumentProvider;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.part.IShowInTargetList;
+import org.eclipse.ui.texteditor.AbstractDocumentProvider;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.IElementStateListener;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+import org.eclipse.ui.texteditor.MarkerRulerAction;
+import org.eclipse.wst.sse.core.utils.StringUtils;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+import org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder;
+import org.eclipse.wst.sse.ui.internal.IExtendedContributor;
+import org.eclipse.wst.sse.ui.internal.IPopupMenuContributor;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModel;
+import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;
+import org.eclipse.wst.sse.ui.internal.extension.BreakpointProviderBuilder;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ConfigurationPointCalculator;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IExtendedStorageEditorInput;
+
+
+/**
+ * @author nitin
+ * 
+ * A text editor capable of using the IBreakpointProvider framework.
+ * 
+ * This class is intended to be used by clients who wish to use the
+ * IBreakpointProvider framework but not the StructuredTextEditor, e.g. VBS
+ * source editors. It is provided AS-IS and marked internal as it is
+ * unsupported and subject to change at any time.
+ */
+public class DebugTextEditor extends TextEditor {
+
+	private class ShowInTargetLister implements IShowInTargetList {
+		public String[] getShowInTargetIds() {
+			return fShowInTargetIds;
+		}
+	}
+
+	/**
+	 * DocumentProvider for IStorageEditorInputs - supports
+	 * IExtendedStorageEditorInput notifications and assigning breakpoint
+	 * markers.
+	 */
+	class StorageInputDocumentProvider extends StorageDocumentProvider implements IElementStateListener {
+		protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
+			IAnnotationModel model = null;
+			IStorageEditorInput storageInput = (IStorageEditorInput) element;
+			String ext = BreakpointRulerAction.getFileExtension(storageInput);
+			IContentType[] types = getEditorInputContentTypes(storageInput);
+			IResource res = null;
+			for (int i = 0; res == null && i < types.length; i++) {
+				res = BreakpointProviderBuilder.getInstance().getResource(storageInput, types[i].getId(), ext);
+			}
+			String id = storageInput.getName();
+			if (storageInput.getStorage() != null) {
+				IPath fullPath = storageInput.getStorage().getFullPath();
+				if (fullPath != null)
+					id = fullPath.toString();
+				else
+					id = storageInput.getName();
+			}
+			if (res != null)
+				model = new StructuredResourceMarkerAnnotationModel(res, id);
+			else
+				model = new StructuredResourceMarkerAnnotationModel(ResourcesPlugin.getWorkspace().getRoot(), id);
+
+			return model;
+		}
+
+		protected AbstractDocumentProvider.ElementInfo createElementInfo(Object element) throws CoreException {
+			if (element instanceof IExtendedStorageEditorInput) {
+				((IExtendedStorageEditorInput) element).addElementStateListener(this);
+			}
+			return super.createElementInfo(element);
+		}
+
+		protected void disposeElementInfo(Object element, ElementInfo info) {
+			if (element instanceof IExtendedStorageEditorInput) {
+				((IExtendedStorageEditorInput) element).removeElementStateListener(this);
+			}
+			super.disposeElementInfo(element, info);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.ui.editors.text.StorageDocumentProvider#doSaveDocument(org.eclipse.core.runtime.IProgressMonitor,
+		 *      java.lang.Object, org.eclipse.jface.text.IDocument, boolean)
+		 */
+		protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
+			// untested
+			new FileDocumentProvider().saveDocument(monitor, element, document, overwrite);
+		}
+
+		public void elementContentAboutToBeReplaced(Object element) {
+			fireElementContentAboutToBeReplaced(element);
+		}
+
+		public void elementContentReplaced(Object element) {
+			fireElementContentReplaced(element);
+		}
+
+		public void elementDeleted(Object element) {
+			fireElementDeleted(element);
+		}
+
+		public void elementDirtyStateChanged(Object element, boolean isDirty) {
+			fireElementDirtyStateChanged(element, isDirty);
+		}
+
+		public void elementMoved(Object originalElement, Object movedElement) {
+			fireElementMoved(originalElement, movedElement);
+		}
+	}
+
+	String[] fShowInTargetIds = new String[]{IPageLayout.ID_RES_NAV};
+	private IShowInTargetList fShowInTargetListAdapter = new ShowInTargetLister();
+
+	IDocumentProvider fStorageInputDocumentProvider = null;
+
+	public DebugTextEditor() {
+		super();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.editors.text.TextEditor#createActions()
+	 */
+	protected void createActions() {
+		super.createActions();
+
+		// StructuredTextEditor Action - toggle breakpoints
+		IAction action = new ToggleBreakpointAction(this, getVerticalRuler()) {
+			protected String getContentType(IDocument document) {
+				ILocationProvider provider = (ILocationProvider) getEditorInput().getAdapter(ILocationProvider.class);
+				if (provider != null) {
+					IPath location = provider.getPath(getEditorInput());
+					return detectContentType(location).getId();
+				}
+				else if (getEditorInput() instanceof IPathEditorInput) {
+					IPath location = ((IPathEditorInput) getEditorInput()).getPath();
+					return detectContentType(location).getId();
+				}
+				return IContentTypeManager.CT_TEXT;
+			}
+		};
+		setAction(ActionDefinitionIds.TOGGLE_BREAKPOINTS, action);
+		// StructuredTextEditor Action - manage breakpoints
+		action = new ManageBreakpointAction(this, getVerticalRuler());
+		setAction(ActionDefinitionIds.MANAGE_BREAKPOINTS, action);
+		// StructuredTextEditor Action - edit breakpoints
+		action = new EditBreakpointAction(this, getVerticalRuler());
+		setAction(ActionDefinitionIds.EDIT_BREAKPOINTS, action);
+	}
+
+	/**
+	 * Loads the Show In Target IDs from the Extended Configuration extension
+	 * point.
+	 * 
+	 * @return
+	 */
+	protected String[] createShowInTargetIds() {
+		List allIds = new ArrayList(0);
+		ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+		String[] configurationIds = getConfigurationPoints();
+		for (int i = 0; i < configurationIds.length; i++) {
+			String[] definitions = builder.getDefinitions("showintarget", configurationIds[i]); //$NON-NLS-1$
+			for (int j = 0; j < definitions.length; j++) {
+				String someIds = definitions[j];
+				if (someIds != null && someIds.length() > 0) {
+					String[] ids = StringUtils.unpack(someIds);
+					for (int k = 0; k < ids.length; k++) {
+						// trim, just to keep things clean
+						String id = ids[k].trim();
+						if (!allIds.contains(id)) {
+							allIds.add(id);
+						}
+					}
+				}
+			}
+		}
+
+		if (!allIds.contains(IPageLayout.ID_RES_NAV)) {
+			allIds.add(IPageLayout.ID_RES_NAV);
+		}
+		return (String[]) allIds.toArray(new String[0]);
+	}
+
+	IContentType detectContentType(IPath location) {
+		IContentType type = null;
+
+		IResource resource = FileBuffers.getWorkspaceFileAtLocation(location);
+		if (resource != null) {
+			if (resource.getType() == IResource.FILE && resource.isAccessible()) {
+				IContentDescription d = null;
+				try {
+					// Optimized description lookup, might not succeed
+					d = ((IFile) resource).getContentDescription();
+					if (d != null) {
+						type = d.getContentType();
+					}
+				}
+				catch (CoreException e) {
+					// Should not be possible given the accessible and file
+					// type check above
+				}
+				if (type == null) {
+					type = Platform.getContentTypeManager().findContentTypeFor(resource.getName());
+				}
+			}
+		}
+		else {
+			File file = FileBuffers.getSystemFileAtLocation(location);
+			if (file != null) {
+				InputStream input = null;
+				try {
+					input = new FileInputStream(file);
+					type = Platform.getContentTypeManager().findContentTypeFor(input, location.toOSString());
+				}
+				catch (FileNotFoundException e) {
+				}
+				catch (IOException e) {
+				}
+				finally {
+					if (input != null) {
+						try {
+							input.close();
+						}
+						catch (IOException e1) {
+						}
+					}
+				}
+				if (type == null) {
+					type = Platform.getContentTypeManager().findContentTypeFor(file.getName());
+				}
+			}
+		}
+		if (type == null) {
+			type = Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT);
+		}
+		return type;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#editorContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager)
+	 */
+	protected void editorContextMenuAboutToShow(IMenuManager menu) {
+		super.editorContextMenuAboutToShow(menu);
+
+		IEditorActionBarContributor c = getEditorSite().getActionBarContributor();
+		if (c instanceof IPopupMenuContributor) {
+			((IPopupMenuContributor) c).contributeToPopupMenu(menu);
+		}
+		else {
+			ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder();
+			IExtendedContributor pmc = builder.readActionExtensions(getConfigurationPoints());
+			if (pmc != null) {
+				pmc.setActiveEditor(this);
+				pmc.contributeToPopupMenu(menu);
+			}
+		}
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class required) {
+		// Navigate action set menu
+		if (IShowInTargetList.class.equals(required))
+			return fShowInTargetListAdapter;
+		return super.getAdapter(required);
+	}
+
+
+	protected String[] getConfigurationPoints() {
+		return ConfigurationPointCalculator.getConfigurationPoints(this, getInputContentType(getEditorInput()), ConfigurationPointCalculator.SOURCE, DebugTextEditor.class);
+	}
+
+	IContentType[] getEditorInputContentTypes(IEditorInput input) {
+		IContentType[] types = null;
+		IResource resource = null;
+
+		if (input.getAdapter(IFile.class) != null) {
+			resource = (IFile) input.getAdapter(IFile.class);
+		}
+		else if (input.getAdapter(IFile.class) != null) {
+			resource = (IResource) input.getAdapter(IResource.class);
+		}
+		if (resource.getType() == IResource.FILE && resource.isAccessible()) {
+			IContentDescription d = null;
+			try {
+				// optimized description lookup, might not succeed
+				d = ((IFile) resource).getContentDescription();
+				if (d != null) {
+					types = new IContentType[]{d.getContentType()};
+				}
+			}
+			catch (CoreException e) {
+				// should not be possible given the accessible and file type
+				// check above
+			}
+		}
+		if (types == null) {
+			types = Platform.getContentTypeManager().findContentTypesFor(input.getName());
+		}
+		return types;
+	}
+
+	/**
+	 * @param editorInput
+	 * @return
+	 */
+	private String getInputContentType(IEditorInput editorInput) {
+		IContentType[] types = getEditorInputContentTypes(editorInput);
+		if (types != null) {
+			return types[0].getId();
+		}
+		return null;
+	}
+
+	/**
+	 * 
+	 * @return
+	 */
+	private boolean isDebuggingAvailable() {
+		boolean debuggingAvailable = false;
+		IContentType[] types = getEditorInputContentTypes(getEditorInput());
+		for (int i = 0; !debuggingAvailable && i < types.length; i++) {
+			debuggingAvailable = debuggingAvailable || BreakpointProviderBuilder.getInstance().isAvailable(types[i].getId(), BreakpointRulerAction.getFileExtension(getEditorInput()));
+		}
+		return debuggingAvailable;
+	}
+
+	protected void rulerContextMenuAboutToShow(IMenuManager menu) {
+		if (isDebuggingAvailable()) {
+			menu.add(getAction(ActionDefinitionIds.TOGGLE_BREAKPOINTS));
+			menu.add(getAction(ActionDefinitionIds.MANAGE_BREAKPOINTS));
+			menu.add(getAction(ActionDefinitionIds.EDIT_BREAKPOINTS));
+			menu.add(new Separator());
+		}
+		else {
+			Logger.log(Logger.INFO, getClass().getName() + " could not enable debugging actions"); //$NON-NLS-1$
+		}
+		super.rulerContextMenuAboutToShow(menu);
+	}
+
+	/**
+	 * Ensure that the correct IDocumentProvider is used. For IFile and Files,
+	 * the default provider with a specified AnnotationModelFactory is used.
+	 * For StorageEditorInputs, use a custom provider that creates a usable
+	 * ResourceAnnotationModel
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#setDocumentProvider(org.eclipse.ui.IEditorInput)
+	 */
+	protected void setDocumentProvider(IEditorInput input) {
+		if (input instanceof IStorageEditorInput && !(input instanceof IFileEditorInput)) {
+			if (fStorageInputDocumentProvider == null) {
+				fStorageInputDocumentProvider = new StorageInputDocumentProvider();
+			}
+			setDocumentProvider(fStorageInputDocumentProvider);
+		}
+		else {
+			super.setDocumentProvider(input);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#updateContentDependentActions()
+	 */
+	protected void updateContentDependentActions() {
+		super.updateContentDependentActions();
+		if (isDebuggingAvailable()) {
+			setAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK, getAction(ActionDefinitionIds.TOGGLE_BREAKPOINTS));
+		}
+		else {
+			// The Default Text Editor uses editorContribution to perform this
+			// mapping, but since it relies on the IEditorSite ID, it can't be
+			// relied on for MultiPageEditorParts. Instead, force the action
+			// registration manually.
+			setAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK, new MarkerRulerAction(SSEUIMessages.getResourceBundle(), "Editor.ManageBookmarks.", this, getVerticalRuler(), IMarker.BOOKMARK, true)); //$NON-NLS-1$
+		}
+		fShowInTargetIds = createShowInTargetIds();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/EditBreakpointAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/EditBreakpointAction.java
new file mode 100644
index 0000000..15b988d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/EditBreakpointAction.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.debug;
+
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.dialogs.PropertyDialogAction;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+
+public class EditBreakpointAction extends BreakpointRulerAction {
+	protected IBreakpoint[] breakpoints = null;
+
+	/**
+	 * @param editor
+	 * @param rulerInfo
+	 */
+	public EditBreakpointAction(ITextEditor editor, IVerticalRuler rulerInfo) {
+		super(editor, rulerInfo);
+		setText(SSEUIMessages.EditBreakpointAction_0); //$NON-NLS-1$
+	}
+
+	public void run() {
+		PropertyDialogAction action = new PropertyDialogAction(getTextEditor().getEditorSite(), new ISelectionProvider() {
+			public void addSelectionChangedListener(ISelectionChangedListener listener) {
+				// do nothing
+			}
+
+			public ISelection getSelection() {
+				return new StructuredSelection(breakpoints);
+			}
+
+			public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+				// do nothing
+			}
+
+			public void setSelection(ISelection selection) {
+				// do nothing
+			}
+		});
+		action.run();
+	}
+
+	public void update() {
+		boolean enableThisAction = hasMarkers();
+		setEnabled(enableThisAction);
+		breakpoints = getBreakpoints(getMarkers());
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ManageBreakpointAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ManageBreakpointAction.java
new file mode 100644
index 0000000..8d7ff2d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ManageBreakpointAction.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.debug;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+
+/**
+ * ManageBreakpointAction - Enables and Disables
+ */
+public class ManageBreakpointAction extends BreakpointRulerAction {
+
+	protected IBreakpoint[] breakpoints = null;
+	private boolean doEnable = true;
+
+	/**
+	 * @param editor
+	 * @param rulerInfo
+	 */
+	public ManageBreakpointAction(ITextEditor editor, IVerticalRuler rulerInfo) {
+		super(editor, rulerInfo);
+		setEnabled(true);
+	}
+
+	/**
+	 *  
+	 */
+	protected void disableBreakpoints(IBreakpoint[] breakpoints) {
+		for (int i = 0; i < breakpoints.length; i++) {
+			try {
+				breakpoints[i].setEnabled(false);
+			} catch (CoreException e) {
+				Logger.logException(e);
+			}
+		}
+	}
+
+	protected void enableBreakpoints(IBreakpoint[] breakpoints) {
+		for (int i = 0; i < breakpoints.length; i++) {
+			try {
+				breakpoints[i].setEnabled(true);
+			} catch (CoreException e) {
+				Logger.logException(e);
+			}
+		}
+	}
+
+	public void run() {
+		if (doEnable)
+			enableBreakpoints(breakpoints);
+		else
+			disableBreakpoints(breakpoints);
+	}
+
+	public void update() {
+		// doEnable means "enable" instead of "disable"
+		doEnable = true;
+		breakpoints = getBreakpoints(getMarkers());
+		for (int i = 0; doEnable && i < breakpoints.length; i++) {
+			IBreakpoint breakpoint = breakpoints[i];
+			try {
+				if (breakpoint.isEnabled()) {
+					doEnable = false;
+				}
+			} catch (CoreException e) {
+				Logger.logException("breakpoint not responding to isEnabled: " + breakpoint, e); //$NON-NLS-1$
+			}
+		}
+		setEnabled(breakpoints != null && breakpoints.length > 0);
+		if (doEnable)
+			setText(SSEUIMessages.ManageBreakpointAction_0); //$NON-NLS-1$
+		else
+			setText(SSEUIMessages.ManageBreakpointAction_1); //$NON-NLS-1$
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java
new file mode 100644
index 0000000..e211930
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java
@@ -0,0 +1,228 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.debug;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointManager;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.IVerticalRulerInfo;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.IDocumentProviderExtension4;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.util.Debug;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.extension.BreakpointProviderBuilder;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IBreakpointProvider;
+
+/**
+ * ToggleBreakpointAction
+ */
+public class ToggleBreakpointAction extends BreakpointRulerAction {
+	IAction fFallbackAction;
+
+	/**
+	 * @param editor
+	 * @param rulerInfo
+	 */
+	public ToggleBreakpointAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
+		super(editor, rulerInfo);
+		setText(SSEUIMessages.ToggleBreakpointAction_0); //$NON-NLS-1$
+	}
+
+	public ToggleBreakpointAction(ITextEditor editor, IVerticalRulerInfo rulerInfo, IAction fallbackAction) {
+		this(editor, rulerInfo);
+		fFallbackAction = fallbackAction;
+	}
+
+	protected boolean createBreakpoints(int lineNumber) {
+		/*
+		 * Note: we'll always allow processing to continue, even for a "read
+		 * only" IStorageEditorInput, for the ActiveScript debugger. But this
+		 * means sometimes the ActiveScript provider might get an input from
+		 * CVS or something that is not related to debugging.
+		 */
+
+		ITextEditor editor = getTextEditor();
+		IEditorInput input = editor.getEditorInput();
+		IDocument document = editor.getDocumentProvider().getDocument(input);
+		if (document == null)
+			return false;
+
+		String contentType = getContentType(document);
+		IBreakpointProvider[] providers = BreakpointProviderBuilder.getInstance().getBreakpointProviders(editor, contentType, getFileExtension(input));
+
+		int pos = -1;
+		ISourceEditingTextTools tools = (ISourceEditingTextTools) editor.getAdapter(ISourceEditingTextTools.class);
+		if (tools != null) {
+			pos = tools.getCaretOffset();
+		}
+
+		final int n = providers.length;
+		List errors = new ArrayList(0);
+		for (int i = 0; i < n; i++) {
+			try {
+				if (Debug.debugBreakpoints)
+					System.out.println(providers[i].getClass().getName() + " adding breakpoint to line " + lineNumber); //$NON-NLS-1$
+				IStatus status = providers[i].addBreakpoint(document, input, lineNumber, pos);
+				if (status != null && !status.isOK()) {
+					errors.add(status);
+				}
+			}
+			catch (CoreException e) {
+				errors.add(e.getStatus());
+			}
+			catch (Exception t) {
+				Logger.logException("exception while adding breakpoint", t); //$NON-NLS-1$
+			}
+		}
+
+		IStatus status = null;
+		if (errors.size() > 0) {
+			Shell shell = editor.getSite().getShell();
+			if (errors.size() > 1) {
+				status = new MultiStatus(SSEUIPlugin.ID, IStatus.OK, (IStatus[]) errors.toArray(new IStatus[0]), SSEUIMessages.ManageBreakpoints_error_adding_message1, null); //$NON-NLS-1$
+			}
+			else {
+				status = (IStatus) errors.get(0);
+			}
+			if ((status.getSeverity() > IStatus.INFO) || (Platform.inDebugMode() && !status.isOK())) {
+				Platform.getLog(SSEUIPlugin.getDefault().getBundle()).log(status);
+			}
+			/*
+			 * Show for conditions more severe than INFO or when no
+			 * breakpoints were created
+			 */
+			if (status.getSeverity() > IStatus.INFO && getBreakpoints(getMarkers()).length < 1) {
+				ErrorDialog.openError(shell, SSEUIMessages.ManageBreakpoints_error_adding_title1, status.getMessage(), status); //$NON-NLS-1$ //$NON-NLS-2$
+				return false;
+			}
+		}
+		/*
+		 * Although no errors were reported, no breakpoints exist on this line
+		 * after having run the existing providers. Run the fallback action.
+		 */
+		if ((status == null || status.getSeverity() < IStatus.WARNING) && fFallbackAction != null && !hasMarkers()) {
+			if (fFallbackAction instanceof ISelectionListener) {
+				((ISelectionListener) fFallbackAction).selectionChanged(null, null);
+			}
+			fFallbackAction.run();
+		}
+		return true;
+	}
+
+	protected String getContentType(IDocument document) {
+		IModelManager mgr = StructuredModelManager.getModelManager();
+		String contentType = null;
+
+		IDocumentProvider provider = fTextEditor.getDocumentProvider();
+		if (provider instanceof IDocumentProviderExtension4) {
+			try {
+				IContentType type = ((IDocumentProviderExtension4) provider).getContentType(fTextEditor.getEditorInput());
+				if (type != null)
+					contentType = type.getId();
+			}
+			catch (CoreException e) {
+				/*
+				 * A failure accessing the underlying store really isn't
+				 * interesting, although it can be a problem for
+				 * IStorageEditorInputs.
+				 */
+			}
+		}
+
+		if (contentType == null) {
+			IStructuredModel model = null;
+			try {
+				model = mgr.getExistingModelForRead(document);
+				if (model != null) {
+					contentType = model.getContentTypeIdentifier();
+				}
+			}
+			finally {
+				if (model != null) {
+					model.releaseFromRead();
+				}
+			}
+		}
+		return contentType;
+	}
+
+	protected void removeBreakpoints(int lineNumber) {
+		IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
+		IBreakpoint[] breakpoints = getBreakpoints(getMarkers());
+		for (int i = 0; i < breakpoints.length; i++) {
+			try {
+				breakpoints[i].getMarker().delete();
+				breakpointManager.removeBreakpoint(breakpoints[i], true);
+			}
+			catch (CoreException e) {
+				Logger.logException(e);
+			}
+		}
+	}
+
+	public void run() {
+		int lineNumber = fRulerInfo.getLineOfLastMouseButtonActivity() + 1;
+		boolean doAdd = !hasMarkers();
+		if (doAdd)
+			createBreakpoints(lineNumber);
+		else
+			removeBreakpoints(lineNumber);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IUpdate#update()
+	 */
+	public void update() {
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#getImageDescriptor()
+	 * overriding for lazy loading
+	 */
+	public ImageDescriptor getImageDescriptor() {
+		
+		ImageDescriptor image = super.getImageDescriptor();
+		if (image == null){
+			image = DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_OBJS_BREAKPOINT);
+			setImageDescriptor(image);
+		}
+		return image;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointsTarget.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointsTarget.java
new file mode 100644
index 0000000..57c8c5e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointsTarget.java
@@ -0,0 +1,189 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.debug;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointManager;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * @author nsd
+ */
+public class ToggleBreakpointsTarget implements IToggleBreakpointsTarget {
+	static final IToggleBreakpointsTarget instance = new ToggleBreakpointsTarget();
+
+	public static IToggleBreakpointsTarget getInstance() {
+		return instance;
+	}
+
+	/**
+	 * 
+	 */
+	private ToggleBreakpointsTarget() {
+		super();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart,
+	 *      org.eclipse.jface.viewers.ISelection)
+	 */
+	public boolean canToggleLineBreakpoints(IWorkbenchPart part, ISelection selection) {
+		ITextEditor editor = (ITextEditor) part.getAdapter(ITextEditor.class);
+		if (selection instanceof ITextSelection) {
+			ITextSelection textSelection = (ITextSelection) selection;
+			IDocument document = editor.getDocumentProvider().getDocument(editor.getEditorInput());
+			if (document != null && textSelection.getOffset() > -1) {
+				int lineNumber = -1;
+				try {
+					lineNumber = document.getLineOfOffset(textSelection.getOffset());
+				}
+				catch (BadLocationException e) {
+				}
+				if (lineNumber >= 0) {
+					ToggleBreakpointAction toggler = new ToggleBreakpointAction(editor, null);
+					toggler.update();
+					return toggler.isEnabled();
+				}
+			}
+		}
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart,
+	 *      org.eclipse.jface.viewers.ISelection)
+	 */
+	public boolean canToggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) {
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleWatchpoints(org.eclipse.ui.IWorkbenchPart,
+	 *      org.eclipse.jface.viewers.ISelection)
+	 */
+	public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) {
+		return false;
+	}
+
+	private IBreakpoint[] getBreakpoints(IResource resource, IDocument document, AbstractMarkerAnnotationModel model, int lineNumber) {
+		List markers = new ArrayList();
+		if (resource != null && model != null && resource.exists()) {
+			try {
+				IMarker[] allMarkers = resource.findMarkers(IBreakpoint.LINE_BREAKPOINT_MARKER, true, IResource.DEPTH_ZERO);
+				if (allMarkers != null) {
+					for (int i = 0; i < allMarkers.length; i++) {
+						Position p = model.getMarkerPosition(allMarkers[i]);
+						int markerLine = -1;
+						try {
+							markerLine = document.getLineOfOffset(p.getOffset());
+						}
+						catch (BadLocationException e1) {
+						}
+						if (markerLine == lineNumber) {
+							markers.add(allMarkers[i]);
+						}
+					}
+				}
+			}
+			catch (CoreException x) {
+			}
+		}
+		IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
+		List breakpoints = new ArrayList(markers.size());
+		for (int i = 0; i < markers.size(); i++) {
+			IBreakpoint breakpoint = manager.getBreakpoint((IMarker) markers.get(i));
+			if (breakpoint != null) {
+				breakpoints.add(breakpoint);
+			}
+		}
+		return (IBreakpoint[]) breakpoints.toArray(new IBreakpoint[0]);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart,
+	 *      org.eclipse.jface.viewers.ISelection)
+	 */
+	public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
+		ITextEditor editor = (ITextEditor) part.getAdapter(ITextEditor.class);
+		if (selection instanceof ITextSelection) {
+			ITextSelection textSelection = (ITextSelection) selection;
+			IDocument document = editor.getDocumentProvider().getDocument(editor.getEditorInput());
+			int lineNumber = -1;
+			try {
+				lineNumber = document.getLineOfOffset(textSelection.getOffset());
+			}
+			catch (BadLocationException e) {
+			}
+			if (lineNumber >= 0) {
+				ToggleBreakpointAction toggler = new ToggleBreakpointAction(editor, null);
+				toggler.update();
+				if (toggler.isEnabled()) {
+					IResource resource = toggler.getResource();
+					AbstractMarkerAnnotationModel model = toggler.getAnnotationModel();
+					IBreakpoint[] breakpoints = getBreakpoints(resource, document, model, lineNumber);
+					if (breakpoints.length > 0) {
+						IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
+						for (int i = 0; i < breakpoints.length; i++) {
+							breakpoints[i].getMarker().delete();
+							breakpointManager.removeBreakpoint(breakpoints[i], true);
+						}
+					}
+					else {
+						toggler.createBreakpoints(lineNumber + 1);
+					}
+				}
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart,
+	 *      org.eclipse.jface.viewers.ISelection)
+	 */
+	public void toggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleWatchpoints(org.eclipse.ui.IWorkbenchPart,
+	 *      org.eclipse.jface.viewers.ISelection)
+	 */
+	public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTML2TextReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTML2TextReader.java
new file mode 100644
index 0000000..27ac8cb
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTML2TextReader.java
@@ -0,0 +1,304 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.derived;
+
+import java.io.IOException;
+import java.io.PushbackReader;
+import java.io.Reader;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+
+/*
+ * Copied from org.eclipse.jdt.internal.ui.text.HTML2TextReader Modifications
+ * were made to add br/ tag and fix warnings
+ */
+/**
+ * Reads the text contents from a reader of HTML contents and translates the
+ * tags or cut them out.
+ */
+public class HTML2TextReader extends SubstitutionTextReader {
+
+	private static final String EMPTY_STRING= ""; //$NON-NLS-1$
+	private static final Map fgEntityLookup;
+	private static final Set fgTags;
+
+	static {
+
+		fgTags= new HashSet();
+		fgTags.add("b"); //$NON-NLS-1$
+		fgTags.add("br"); //$NON-NLS-1$
+		fgTags.add("br/");//$NON-NLS-1$
+		fgTags.add("h5"); //$NON-NLS-1$
+		fgTags.add("p"); //$NON-NLS-1$
+		fgTags.add("dl"); //$NON-NLS-1$
+		fgTags.add("dt"); //$NON-NLS-1$
+		fgTags.add("dd"); //$NON-NLS-1$
+		fgTags.add("li"); //$NON-NLS-1$
+		fgTags.add("ul"); //$NON-NLS-1$
+		fgTags.add("pre"); //$NON-NLS-1$
+
+		fgEntityLookup= new HashMap(7);
+		fgEntityLookup.put("lt", "<"); //$NON-NLS-1$ //$NON-NLS-2$
+		fgEntityLookup.put("gt", ">"); //$NON-NLS-1$ //$NON-NLS-2$
+		fgEntityLookup.put("nbsp", " "); //$NON-NLS-1$ //$NON-NLS-2$
+		fgEntityLookup.put("amp", "&"); //$NON-NLS-1$ //$NON-NLS-2$
+		fgEntityLookup.put("circ", "^"); //$NON-NLS-1$ //$NON-NLS-2$
+		fgEntityLookup.put("tilde", "~"); //$NON-NLS-2$ //$NON-NLS-1$
+		fgEntityLookup.put("quot", "\"");		 //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	private int fCounter= 0;
+	private TextPresentation fTextPresentation;
+	private int fBold= 0;
+	private int fStartOffset= -1;
+	private boolean fInParagraph= false;
+	private boolean fIsPreformattedText= false;
+
+	/**
+	 * Transforms the html text from the reader to formatted text.
+	 * @param presentation If not <code>null</code>, formattings will be applied to
+	 * the presentation.
+	*/
+	public HTML2TextReader(Reader reader, TextPresentation presentation) {
+		super(new PushbackReader(reader));
+		fTextPresentation= presentation;
+	}
+
+	public int read() throws IOException {
+		int c= super.read();
+		if (c != -1)
+			++ fCounter;
+		return c;
+	}
+
+	protected void startBold() {
+		if (fBold == 0)
+			fStartOffset= fCounter;
+		++ fBold;
+	}
+
+	protected void startPreformattedText() {
+		fIsPreformattedText= true;
+		setSkipWhitespace(false);
+	}
+
+	protected void stopPreformattedText() {
+		fIsPreformattedText= false;
+		setSkipWhitespace(true);
+	}
+
+	protected void stopBold() {
+		-- fBold;
+		if (fBold == 0) {
+			if (fTextPresentation != null) {
+				fTextPresentation.addStyleRange(new StyleRange(fStartOffset, fCounter - fStartOffset, null, null, SWT.BOLD));
+			}
+			fStartOffset= -1;
+		}
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.ui.text.SubstitutionTextReader#computeSubstitution(int)
+	 */
+	protected String computeSubstitution(int c) throws IOException {
+
+		if (c == '<')
+			return  processHTMLTag();
+		else if (c == '&')
+			return processEntity();
+		else if (fIsPreformattedText)
+			return processPreformattedText(c);
+
+		return null;
+	}
+
+	private String html2Text(String html) {
+
+		if (html == null || html.length() == 0)
+			return EMPTY_STRING;
+
+		String tag= html;
+		if ('/' == tag.charAt(0))
+			tag= tag.substring(1);
+
+		if (!fgTags.contains(tag))
+			return EMPTY_STRING;
+
+
+		if ("pre".equals(html)) { //$NON-NLS-1$
+			startPreformattedText();
+			return EMPTY_STRING;
+		}
+
+		if ("/pre".equals(html)) { //$NON-NLS-1$
+			stopPreformattedText();
+			return EMPTY_STRING;
+		}
+
+		if (fIsPreformattedText)
+			return EMPTY_STRING;
+
+		if ("b".equals(html)) { //$NON-NLS-1$
+			startBold();
+			return EMPTY_STRING;
+		}
+
+		if ("h5".equals(html) || "dt".equals(html)) { //$NON-NLS-1$ //$NON-NLS-2$
+			startBold();
+			return EMPTY_STRING;
+		}
+
+		if ("dl".equals(html)) //$NON-NLS-1$
+			return LINE_DELIM;
+
+		if ("dd".equals(html)) //$NON-NLS-1$
+			return "\t"; //$NON-NLS-1$
+
+		if ("li".equals(html)) //$NON-NLS-1$
+			return LINE_DELIM + "\t" + "- "; //$NON-NLS-1$ //$NON-NLS-2$
+
+		if ("/b".equals(html)) { //$NON-NLS-1$
+			stopBold();
+			return EMPTY_STRING;
+		}
+
+		if ("p".equals(html))  { //$NON-NLS-1$
+			fInParagraph= true;
+			return LINE_DELIM;
+		}
+
+		if ("br".equals(html) || "br/".equals(html)) //$NON-NLS-1$ //$NON-NLS-2$
+			return LINE_DELIM;
+
+		if ("/p".equals(html))  { //$NON-NLS-1$
+			boolean inParagraph= fInParagraph;
+			fInParagraph= false;
+			return inParagraph ? EMPTY_STRING : LINE_DELIM;
+		}
+
+		if ("/h5".equals(html) || "/dt".equals(html)) { //$NON-NLS-1$ //$NON-NLS-2$
+			stopBold();
+			return LINE_DELIM;
+		}
+
+		if ("/dd".equals(html)) //$NON-NLS-1$
+			return LINE_DELIM;
+
+		return EMPTY_STRING;
+	}
+
+	/*
+	 * A '<' has been read. Process a html tag
+	 */
+	private String processHTMLTag() throws IOException {
+
+		StringBuffer buf= new StringBuffer();
+		int ch;
+		do {
+
+			ch= nextChar();
+
+			while (ch != -1 && ch != '>') {
+				buf.append(Character.toLowerCase((char) ch));
+				ch= nextChar();
+				if (ch == '"'){
+					buf.append(Character.toLowerCase((char) ch));
+					ch= nextChar();
+					while (ch != -1 && ch != '"'){
+						buf.append(Character.toLowerCase((char) ch));
+						ch= nextChar();
+					}
+				}
+				if (ch == '<'){
+					unread(ch);
+					return '<' + buf.toString();
+				}
+			}
+
+			if (ch == -1)
+				return null;
+
+			int tagLen= buf.length();
+			// needs special treatment for comments
+			if ((tagLen >= 3 && "!--".equals(buf.substring(0, 3))) //$NON-NLS-1$
+				&& !(tagLen >= 5 && "--".equals(buf.substring(tagLen - 2)))) { //$NON-NLS-1$
+				// unfinished comment
+				buf.append(ch);
+			} else {
+				break;
+			}
+		} while (true);
+
+		return html2Text(buf.toString());
+	}
+
+	private String processPreformattedText(int c) {
+		if  (c == '\r' || c == '\n')
+			fCounter++;
+		return null;
+	}
+
+
+	private void unread(int ch) throws IOException {
+		((PushbackReader) getReader()).unread(ch);
+	}
+
+	protected String entity2Text(String symbol) {
+		if (symbol.length() > 1 && symbol.charAt(0) == '#') {
+			int ch;
+			try {
+				if (symbol.charAt(1) == 'x') {
+					ch= Integer.parseInt(symbol.substring(2), 16);
+				} else {
+					ch= Integer.parseInt(symbol.substring(1), 10);
+				}
+				return EMPTY_STRING + (char)ch;
+			} catch (NumberFormatException e) {
+				// log problem?
+			}
+		} else {
+			String str= (String) fgEntityLookup.get(symbol);
+			if (str != null) {
+				return str;
+			}
+		}
+		return "&" + symbol; // not found //$NON-NLS-1$
+	}
+
+	/*
+	 * A '&' has been read. Process a entity
+	 */
+	private String processEntity() throws IOException {
+		StringBuffer buf= new StringBuffer();
+		int ch= nextChar();
+		while (Character.isLetterOrDigit((char)ch) || ch == '#') {
+			buf.append((char) ch);
+			ch= nextChar();
+		}
+
+		if (ch == ';')
+			return entity2Text(buf.toString());
+
+		buf.insert(0, '&');
+		if (ch != -1)
+			buf.append((char) ch);
+		return buf.toString();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTMLTextPresenter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTMLTextPresenter.java
new file mode 100644
index 0000000..86fa284
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTMLTextPresenter.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.derived;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Iterator;
+
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+/*
+ * Copied from org.eclipse.jdt.internal.ui.text.HTMLTextPresenter
+ * Modifications were made to use own Logger to log exception, and the
+ * ellipses constant
+ */
+public class HTMLTextPresenter implements DefaultInformationControl.IInformationPresenter {
+	private static final String ELLIPSES = "..."; //$NON-NLS-1$
+	private static final String LINE_DELIM = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+	private int fCounter;
+	private boolean fEnforceUpperLineLimit;
+
+	public HTMLTextPresenter(boolean enforceUpperLineLimit) {
+		super();
+		fEnforceUpperLineLimit = enforceUpperLineLimit;
+	}
+
+	public HTMLTextPresenter() {
+		this(true);
+	}
+
+	protected Reader createReader(String hoverInfo, TextPresentation presentation) {
+		return new HTML2TextReader(new StringReader(hoverInfo), presentation);
+	}
+
+	protected void adaptTextPresentation(TextPresentation presentation, int offset, int insertLength) {
+
+		int yoursStart = offset;
+		int yoursEnd = offset + insertLength - 1;
+		yoursEnd = Math.max(yoursStart, yoursEnd);
+
+		Iterator e = presentation.getAllStyleRangeIterator();
+		while (e.hasNext()) {
+
+			StyleRange range = (StyleRange) e.next();
+
+			int myStart = range.start;
+			int myEnd = range.start + range.length - 1;
+			myEnd = Math.max(myStart, myEnd);
+
+			if (myEnd < yoursStart)
+				continue;
+
+			if (myStart < yoursStart)
+				range.length += insertLength;
+			else
+				range.start += insertLength;
+		}
+	}
+
+	private void append(StringBuffer buffer, String string, TextPresentation presentation) {
+
+		int length = string.length();
+		buffer.append(string);
+
+		if (presentation != null)
+			adaptTextPresentation(presentation, fCounter, length);
+
+		fCounter += length;
+	}
+
+	private String getIndent(String line) {
+		int length = line.length();
+
+		int i = 0;
+		while (i < length && Character.isWhitespace(line.charAt(i)))
+			++i;
+
+		return (i == length ? line : line.substring(0, i)) + " "; //$NON-NLS-1$
+	}
+
+	/*
+	 * @see IHoverInformationPresenter#updatePresentation(Display display,
+	 *      String, TextPresentation, int, int)
+	 */
+	public String updatePresentation(Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) {
+
+		if (hoverInfo == null)
+			return null;
+
+		GC gc = new GC(display);
+		try {
+
+			StringBuffer buffer = new StringBuffer();
+			int maxNumberOfLines = Math.round(maxHeight / gc.getFontMetrics().getHeight());
+
+			fCounter = 0;
+			LineBreakingReader reader = new LineBreakingReader(createReader(hoverInfo, presentation), gc, maxWidth);
+
+			boolean lastLineFormatted = false;
+			String lastLineIndent = null;
+
+			String line = reader.readLine();
+			boolean lineFormatted = reader.isFormattedLine();
+			boolean firstLineProcessed = false;
+
+			while (line != null) {
+
+				if (fEnforceUpperLineLimit && maxNumberOfLines <= 0)
+					break;
+
+				if (firstLineProcessed) {
+					if (!lastLineFormatted)
+						append(buffer, LINE_DELIM, null);
+					else {
+						append(buffer, LINE_DELIM, presentation);
+						if (lastLineIndent != null)
+							append(buffer, lastLineIndent, presentation);
+					}
+				}
+
+				append(buffer, line, null);
+				firstLineProcessed = true;
+
+				lastLineFormatted = lineFormatted;
+				if (!lineFormatted)
+					lastLineIndent = null;
+				else if (lastLineIndent == null)
+					lastLineIndent = getIndent(line);
+
+				line = reader.readLine();
+				lineFormatted = reader.isFormattedLine();
+
+				maxNumberOfLines--;
+			}
+
+			if (line != null && buffer.length() > 0) {
+				append(buffer, LINE_DELIM, lineFormatted ? presentation : null);
+				append(buffer, ELLIPSES, presentation);
+			}
+
+			return trim(buffer, presentation);
+
+		} catch (IOException e) {
+			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
+			return null;
+
+		} finally {
+			gc.dispose();
+		}
+	}
+
+	private String trim(StringBuffer buffer, TextPresentation presentation) {
+
+		int length = buffer.length();
+
+		int end = length - 1;
+		while (end >= 0 && Character.isWhitespace(buffer.charAt(end)))
+			--end;
+
+		if (end == -1)
+			return ""; //$NON-NLS-1$
+
+		if (end < length - 1)
+			buffer.delete(end + 1, length);
+		else
+			end = length;
+
+		int start = 0;
+		while (start < end && Character.isWhitespace(buffer.charAt(start)))
+			++start;
+
+		buffer.delete(0, start);
+		presentation.setResultWindow(new Region(start, buffer.length()));
+		return buffer.toString();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/LineBreakingReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/LineBreakingReader.java
new file mode 100644
index 0000000..cea5449
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/LineBreakingReader.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.derived;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Reader;
+import com.ibm.icu.text.BreakIterator;
+
+import org.eclipse.swt.graphics.GC;
+
+/**
+ * Copied from org.eclipse.jdt.internal.ui.text.LineBreakingReader.
+ * Modifications were made to fix warnings.
+ */
+/*
+ * Not a real reader. Could change if requested
+ */
+public class LineBreakingReader {
+	private GC fGC;
+
+	private String fLine;
+
+	private BreakIterator fLineBreakIterator;
+	private int fMaxWidth;
+	private int fOffset;
+
+
+	private BufferedReader fReader;
+
+	/**
+	 * Creates a reader that breaks an input text to fit in a given width.
+	 * 
+	 * @param reader
+	 *            Reader of the input text
+	 * @param gc
+	 *            The graphic context that defines the currently used font
+	 *            sizes
+	 * @param maxLineWidth
+	 *            The max width (pixes) where the text has to fit in
+	 */
+	public LineBreakingReader(Reader reader, GC gc, int maxLineWidth) {
+		fReader = new BufferedReader(reader);
+		fGC = gc;
+		fMaxWidth = maxLineWidth;
+		fOffset = 0;
+		fLine = null;
+		fLineBreakIterator = BreakIterator.getLineInstance();
+	}
+
+	private int findNextBreakOffset(int currOffset) {
+		int currWidth = 0;
+		int nextOffset = fLineBreakIterator.following(currOffset);
+		while (nextOffset != BreakIterator.DONE) {
+			String word = fLine.substring(currOffset, nextOffset);
+			int wordWidth = fGC.textExtent(word).x;
+			int nextWidth = wordWidth + currWidth;
+			if (nextWidth > fMaxWidth) {
+				if (currWidth > 0) {
+					return currOffset;
+				}
+				return nextOffset;
+			}
+			currWidth = nextWidth;
+			currOffset = nextOffset;
+			nextOffset = fLineBreakIterator.next();
+		}
+		return nextOffset;
+	}
+
+	private int findWordBegin(int idx) {
+		while (idx < fLine.length() && Character.isWhitespace(fLine.charAt(idx))) {
+			idx++;
+		}
+		return idx;
+	}
+
+	public boolean isFormattedLine() {
+		return fLine != null;
+	}
+
+	/**
+	 * Reads the next line. The lengths of the line will not exceed the gived
+	 * maximum width.
+	 */
+	public String readLine() throws IOException {
+		if (fLine == null) {
+			String line = fReader.readLine();
+			if (line == null)
+				return null;
+
+			int lineLen = fGC.textExtent(line).x;
+			if (lineLen < fMaxWidth) {
+				return line;
+			}
+			fLine = line;
+			fLineBreakIterator.setText(line);
+			fOffset = 0;
+		}
+		int breakOffset = findNextBreakOffset(fOffset);
+		String res;
+		if (breakOffset != BreakIterator.DONE) {
+			res = fLine.substring(fOffset, breakOffset);
+			fOffset = findWordBegin(breakOffset);
+			if (fOffset == fLine.length()) {
+				fLine = null;
+			}
+		} else {
+			res = fLine.substring(fOffset);
+			fLine = null;
+		}
+		return res;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/SingleCharReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/SingleCharReader.java
new file mode 100644
index 0000000..56945ff
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/SingleCharReader.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.derived;
+
+import java.io.IOException;
+import java.io.Reader;
+
+/*
+ * Copied from org.eclipse.jdt.internal.corext.javadoc.SingleCharReader.
+ * Modification was made to fix statement unnecessarily nested within else
+ * clause warning in read(..).
+ */
+public abstract class SingleCharReader extends Reader {
+
+	/**
+	 * @see Reader#read()
+	 */
+	public abstract int read() throws IOException;
+
+	/**
+	 * @see Reader#read(char[],int,int)
+	 */
+	public int read(char cbuf[], int off, int len) throws IOException {
+		int end = off + len;
+		for (int i = off; i < end; i++) {
+			int ch = read();
+			if (ch == -1) {
+				if (i == off) {
+					return -1;
+				}
+				return i - off;
+			}
+			cbuf[i] = (char) ch;
+		}
+		return len;
+	}
+
+	/**
+	 * @see Reader#ready()
+	 */
+	public boolean ready() throws IOException {
+		return true;
+	}
+
+	/**
+	 * Gets the content as a String
+	 */
+	public String getString() throws IOException {
+		StringBuffer buf = new StringBuffer();
+		int ch;
+		while ((ch = read()) != -1) {
+			buf.append((char) ch);
+		}
+		return buf.toString();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/SubstitutionTextReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/SubstitutionTextReader.java
new file mode 100644
index 0000000..4d2a78f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/SubstitutionTextReader.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.derived;
+
+import java.io.IOException;
+import java.io.Reader;
+
+/*
+ * Copied from org.eclipse.jdt.internal.ui.text.SubstitutionTextReader.
+ * Modifications were made to read() to allow whitespaces and fixed statement
+ * unnecessarily nested within else clause warning in nextChar()
+ */
+/**
+ * Reads the text contents from a reader and computes for each character a
+ * potential substitution. The substitution may eat more characters than only
+ * the one passed into the computation routine.
+ */
+public abstract class SubstitutionTextReader extends SingleCharReader {
+
+	protected static final String LINE_DELIM = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+	private Reader fReader;
+	protected boolean fWasWhiteSpace;
+	private int fCharAfterWhiteSpace;
+
+	/**
+	 * Tells whether white space characters are skipped.
+	 */
+	private boolean fSkipWhiteSpace = true;
+
+	private boolean fReadFromBuffer;
+	private StringBuffer fBuffer;
+	private int fIndex;
+
+
+	protected SubstitutionTextReader(Reader reader) {
+		fReader = reader;
+		fBuffer = new StringBuffer();
+		fIndex = 0;
+		fReadFromBuffer = false;
+		fCharAfterWhiteSpace = -1;
+		fWasWhiteSpace = true;
+	}
+
+	/**
+	 * Implement to compute the substitution for the given character and if
+	 * necessary subsequent characters. Use <code>nextChar</code> to read
+	 * subsequent characters.
+	 */
+	protected abstract String computeSubstitution(int c) throws IOException;
+
+	/**
+	 * Returns the internal reader.
+	 */
+	protected Reader getReader() {
+		return fReader;
+	}
+
+	/**
+	 * Returns the next character.
+	 */
+	protected int nextChar() throws IOException {
+		fReadFromBuffer = (fBuffer.length() > 0);
+		if (fReadFromBuffer) {
+			char ch = fBuffer.charAt(fIndex++);
+			if (fIndex >= fBuffer.length()) {
+				fBuffer.setLength(0);
+				fIndex = 0;
+			}
+			return ch;
+		}
+		int ch = fCharAfterWhiteSpace;
+		if (ch == -1) {
+			ch = fReader.read();
+		}
+		if (fSkipWhiteSpace && Character.isWhitespace((char) ch)) {
+			do {
+				ch = fReader.read();
+			} while (Character.isWhitespace((char) ch));
+			if (ch != -1) {
+				fCharAfterWhiteSpace = ch;
+				return ' ';
+			}
+		} else {
+			fCharAfterWhiteSpace = -1;
+		}
+		return ch;
+	}
+
+	/**
+	 * @see Reader#read()
+	 */
+	public int read() throws IOException {
+		int c;
+		do {
+
+			c = nextChar();
+			while (!fReadFromBuffer) {
+				String s = computeSubstitution(c);
+				if (s == null)
+					break;
+				if (s.length() > 0)
+					fBuffer.insert(0, s);
+				c = nextChar();
+			}
+
+		} while (fSkipWhiteSpace && fWasWhiteSpace && ((c == ' ') && !fReadFromBuffer));
+		/*
+		 * SSE: For above and below check, if whitespace is read from buffer,
+		 * do not skip
+		 */
+		fWasWhiteSpace = ((c == ' ' && !fReadFromBuffer) || c == '\r' || c == '\n');
+		return c;
+	}
+
+	/**
+	 * @see Reader#ready()
+	 */
+	public boolean ready() throws IOException {
+		return fReader.ready();
+	}
+
+	/**
+	 * @see Reader#close()
+	 */
+	public void close() throws IOException {
+		fReader.close();
+	}
+
+	/**
+	 * @see Reader#reset()
+	 */
+	public void reset() throws IOException {
+		fReader.reset();
+		fWasWhiteSpace = true;
+		fCharAfterWhiteSpace = -1;
+		fBuffer.setLength(0);
+		fIndex = 0;
+	}
+
+	protected final void setSkipWhitespace(boolean state) {
+		fSkipWhiteSpace = state;
+	}
+
+	protected final boolean isSkippingWhitespace() {
+		return fSkipWhiteSpace;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/edit/util/SharedEditorPluginImageHelper.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/edit/util/SharedEditorPluginImageHelper.java
new file mode 100644
index 0000000..3a9b0c9
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/edit/util/SharedEditorPluginImageHelper.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.edit.util;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
+
+
+public class SharedEditorPluginImageHelper {
+	public static final String IMG_DLCL_COLLAPSEALL = EditorPluginImages.IMG_DLCL_COLLAPSEALL;
+	public static final String IMG_DLCL_DELETE = EditorPluginImages.IMG_DLCL_DELETE;
+	public static final String IMG_DLCL_SYNCED = EditorPluginImages.IMG_DLCL_SYNCED;
+	public static final String IMG_ELCL_COLLAPSEALL = EditorPluginImages.IMG_ELCL_COLLAPSEALL;
+	public static final String IMG_ELCL_DELETE = EditorPluginImages.IMG_ELCL_DELETE;
+	public static final String IMG_ELCL_SYNCED = EditorPluginImages.IMG_ELCL_SYNCED;
+
+	/**
+	 * Retrieves the specified image from the source editor plugin's image
+	 * registry. Note: The returned <code>Image</code> is managed by the
+	 * workbench; clients must <b>not </b> dispose of the returned image.
+	 * 
+	 * @param symbolicName
+	 *            the symbolic name of the image; there are constants declared
+	 *            in this class for build-in images that come with the source
+	 *            editor
+	 * @return the image, or <code>null</code> if not found
+	 */
+	public static Image getImage(String symbolicName) {
+		return EditorPluginImageHelper.getInstance().getImage(symbolicName);
+	}
+
+	/**
+	 * Retrieves the image descriptor for specified image from the source
+	 * editor plugin's image registry. Unlike <code>Image</code>s, image
+	 * descriptors themselves do not need to be disposed.
+	 * 
+	 * @param symbolicName
+	 *            the symbolic name of the image; there are constants declared
+	 *            in this interface for build-in images that come with the
+	 *            source editor
+	 * @return the image descriptor, or <code>null</code> if not found
+	 */
+	public static ImageDescriptor getImageDescriptor(String symbolicName) {
+		return EditorPluginImageHelper.getInstance().getImageDescriptor(symbolicName);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorModelUtil.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorModelUtil.java
new file mode 100644
index 0000000..be61761
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorModelUtil.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.editor;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.wst.sse.core.internal.model.FactoryRegistry;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryProvider;
+import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistry;
+import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistryExtension;
+import org.eclipse.wst.sse.ui.internal.util.Assert;
+
+
+/**
+ * INTERNAL USAGE ONLY
+ * 
+ * @author nsd
+ */
+public class EditorModelUtil {
+
+	public static void addFactoriesTo(final IStructuredModel structuredModel) {
+		if (structuredModel == null)
+			return;
+		
+		AdapterFactoryRegistry adapterRegistry = SSEUIPlugin.getDefault().getAdapterFactoryRegistry();
+		String contentTypeId = structuredModel.getContentTypeIdentifier();
+
+		Iterator adapterFactoryProviders = null;
+		if (adapterRegistry instanceof AdapterFactoryRegistryExtension) {
+			adapterFactoryProviders = ((AdapterFactoryRegistryExtension) adapterRegistry).getAdapterFactories(contentTypeId);
+		}
+		else {
+			adapterFactoryProviders = adapterRegistry.getAdapterFactories();
+		}
+
+		FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
+		Assert.isNotNull(factoryRegistry, SSEUIMessages.EditorModelUtil_0); //$NON-NLS-1$
+		// Add all those appropriate for this particular type of content
+		while (adapterFactoryProviders.hasNext()) {
+			try {
+				final AdapterFactoryProvider provider = (AdapterFactoryProvider) adapterFactoryProviders.next();
+				/*
+				 * ContentType might have already been checked above, this
+				 * check is here for backwards compatability for those that
+				 * don't specify a content type
+				 */
+				if (provider.isFor(structuredModel.getModelHandler())) {
+					SafeRunner.run(new SafeRunnable(SSEUIMessages.EditorModelUtil_1) { //$NON-NLS-1$
+									public void run() {
+										provider.addAdapterFactories(structuredModel);
+									}
+								});
+				}
+			}
+			catch (Exception e) {
+				Logger.logException(e);
+			}
+		}
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/XMLEditorPluginImageHelper.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorPluginImageHelper.java
similarity index 86%
rename from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/XMLEditorPluginImageHelper.java
rename to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorPluginImageHelper.java
index 429b6b7..f78633f 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/XMLEditorPluginImageHelper.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorPluginImageHelper.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- *
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.editor;
+package org.eclipse.wst.sse.ui.internal.editor;
 
 import java.util.HashMap;
 
@@ -19,7 +19,7 @@
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
 
 
 /**
@@ -30,24 +30,23 @@
  * 
  * @author amywu
  */
-public class XMLEditorPluginImageHelper {
-	private static XMLEditorPluginImageHelper instance = null;
+public class EditorPluginImageHelper {
+	private static EditorPluginImageHelper instance = null;
 
 	/**
 	 * Gets the instance.
 	 * 
-	 * @return Returns a XMLEditorPluginImageHelper
+	 * @return Returns a EditorPluginImageHelper
 	 */
-	public synchronized static XMLEditorPluginImageHelper getInstance() {
-		if (instance == null) {
-			instance = new XMLEditorPluginImageHelper();
-		}
+	public synchronized static EditorPluginImageHelper getInstance() {
+		if (instance == null)
+			instance = new EditorPluginImageHelper();
 		return instance;
 	}
 
-	// save a descriptor for each image
+	//	 save a descriptor for each image
 	private HashMap fImageDescRegistry = null;
-	private final String PLUGINID = XMLUIPlugin.ID;
+	private final String PLUGINID = SSEUIPlugin.ID;
 
 	/**
 	 * Creates an image from the given resource and adds the image to the
@@ -64,9 +63,8 @@
 			image = desc.createImage();
 			// dont add the missing image descriptor image to the image
 			// registry
-			if (!desc.equals(ImageDescriptor.getMissingImageDescriptor())) {
+			if (!desc.equals(ImageDescriptor.getMissingImageDescriptor()))
 				getImageRegistry().put(resource, image);
-			}
 		}
 		return image;
 	}
@@ -85,8 +83,7 @@
 		ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGINID, imageFilePath);
 		if (imageDescriptor != null) {
 			getImageDescriptorRegistry().put(imageFilePath, imageDescriptor);
-		}
-		else {
+		} else {
 			imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
 		}
 
@@ -128,10 +125,9 @@
 		ImageDescriptor imageDescriptor = null;
 		Object o = getImageDescriptorRegistry().get(resource);
 		if (o == null) {
-			// create a descriptor
+			//create a descriptor
 			imageDescriptor = createImageDescriptor(resource);
-		}
-		else {
+		} else {
 			imageDescriptor = (ImageDescriptor) o;
 		}
 		return imageDescriptor;
@@ -143,9 +139,8 @@
 	 * @return HashMap - image descriptor registry for this plugin
 	 */
 	private HashMap getImageDescriptorRegistry() {
-		if (fImageDescRegistry == null) {
+		if (fImageDescRegistry == null)
 			fImageDescRegistry = new HashMap();
-		}
 		return fImageDescRegistry;
 	}
 
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorPluginImages.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorPluginImages.java
new file mode 100644
index 0000000..7b38844
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorPluginImages.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.editor;
+
+/**
+ * Bundle of most images used by the Source Editor plug-in.
+ */
+public class EditorPluginImages {
+
+	public static final String IMG_CTOOL16_SPELLCHECK = "icons/full/ctool16/spellcheck.gif"; //$NON-NLS-1$
+	public static final String IMG_DLCL_COLLAPSEALL = "icons/full/dlcl16/collapseall.gif"; //$NON-NLS-1$
+	public static final String IMG_DLCL_DELETE = "icons/full/dlcl16/delete.gif"; //$NON-NLS-1$
+	public static final String IMG_DLCL_SYNCED = "icons/full/dlcl16/synced.gif"; //$NON-NLS-1$
+	public static final String IMG_DTOOL16_SPELLCHECK = "icons/full/dtool16/spellcheck.gif"; //$NON-NLS-1$
+	public static final String IMG_ELCL_COLLAPSEALL = "icons/full/elcl16/collapseall.gif"; //$NON-NLS-1$
+	public static final String IMG_ELCL_DELETE = "icons/full/elcl16/delete.gif"; //$NON-NLS-1$
+	public static final String IMG_ELCL_SYNCED = "icons/full/elcl16/synced.gif"; //$NON-NLS-1$
+	public static final String IMG_ETOOL16_SPELLCHECK = "icons/full/etool16/spellcheck.gif"; //$NON-NLS-1$
+	public static final String IMG_OBJ_OCC_MATCH = "icons/full/obj16/occ_match.gif"; //$NON-NLS-1$
+
+	public static final String IMG_OBJ_PREFERENCES = "icons/full/obj16/preferences.gif"; //$NON-NLS-1$
+	public static final String IMG_OBJ_PROP_PS = "icons/full/obj16/prop_ps.gif"; //$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/IHelpContextIds.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/IHelpContextIds.java
new file mode 100644
index 0000000..3ce5460
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/IHelpContextIds.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.editor;
+
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+/**
+ * Help context ids for the Source Editor.
+ * <p>
+ * This interface contains constants only; it is not intended to be
+ * implemented.
+ * </p>
+ *  
+ */
+public interface IHelpContextIds {
+
+	// org.eclipse.wst.sse.ui.
+	public static final String PREFIX = SSEUIPlugin.ID + "."; //$NON-NLS-1$
+	// Abstract Source Editor Context Menu
+	// Content Assist
+	public static final String CONTMNU_CONTENTASSIST_HELPID = PREFIX + "xmlm1010"; //$NON-NLS-1$
+	// Format Document
+	public static final String CONTMNU_FORMAT_DOC_HELPID = PREFIX + "xmlm1030"; //$NON-NLS-1$
+	// Format Active Elements
+	public static final String CONTMNU_FORMAT_ELEMENTS_HELPID = PREFIX + "xmlm1040"; //$NON-NLS-1$
+	// Cleanup Document
+	// public static final String CONTMNU_CLEANUP_DOC_HELPID = PREFIX +
+	// "xmlm1050"; //$NON-NLS-1$
+
+	// Properties
+	public static final String CONTMNU_PROPERTIES_HELPID = PREFIX + "xmlm1070"; //$NON-NLS-1$
+
+	// Structured Text Editor Preference Page
+	// Appearance
+	public static final String PREFSTE_APPEARANCE_HELPID = PREFIX + "sted0001"; //$NON-NLS-1$
+	// Hovers
+	public static final String PREFSTE_HOVERS_HELPID = PREFIX + "sted0003"; //$NON-NLS-1$
+
+//	// Read-Only Text Style
+//	public static final String PREFWEBX_READONLY_HELPID = PREFIX + "webx0001"; //$NON-NLS-1$
+
+	// Web and XML Preference Page
+	// Task Tags
+	public static final String PREFWEBX_TASKTAGS_HELPID = PREFIX + "webx0000"; //$NON-NLS-1$
+
+	// Source Editor View
+	public static final String XML_SOURCE_VIEW_HELPID = PREFIX + "xmlm2000"; //$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/SelectionConvertor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/SelectionConvertor.java
new file mode 100644
index 0000000..b6f5601
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/SelectionConvertor.java
@@ -0,0 +1,62 @@
+/*******************************************************************************

+ * Copyright (c) 2008 IBM Corporation and others.

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ * 

+ * Contributors:

+ *     IBM Corporation - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.wst.sse.ui.internal.editor;

+

+import java.util.ArrayList;

+import java.util.List;

+

+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;

+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;

+

+/**

+ * This class/interface is part of an experimental API that is still under

+ * development and expected to change significantly before reaching stability.

+ * It is being made available at this early stage to solicit feedback from

+ * pioneering adopters on the understanding that any code that uses this API

+ * will almost certainly be broken (repeatedly) as the API evolves.

+ */

+public class SelectionConvertor {

+	/**

+	 * @param model

+	 * @param start

+	 * @param end

+	 * @return the most specific mapping of this text selection to

+	 *         implementors of IndexedRegion

+	 */

+	public Object[] getElements(IStructuredModel model, int start, int end) {

+		Object[] localSelectedStructures = null;

+		if (model != null) {

+			IndexedRegion region = model.getIndexedRegion(start);

+			if (region != null) {

+				if (end <= region.getEndOffset()) {

+					// single selection

+					localSelectedStructures = new Object[1];

+					localSelectedStructures[0] = region;

+				}

+				else {

+					// multiple selection

+					int maxLength = model.getStructuredDocument().getLength();

+					List structures = new ArrayList(2);

+					while (region != null && region.getEndOffset() <= end && region.getEndOffset() < maxLength) {

+						structures.add(region);

+						region = model.getIndexedRegion(region.getEndOffset() + 1);

+					}

+					localSelectedStructures = structures.toArray();

+				}

+			}

+		}

+		if (localSelectedStructures == null) {

+			localSelectedStructures = new Object[0];

+		}

+		return localSelectedStructures;

+	}

+}

diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/StructuredModelDocumentProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/StructuredModelDocumentProvider.java
new file mode 100644
index 0000000..91069ec
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/StructuredModelDocumentProvider.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.editor;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.IDocumentProviderExtension;
+import org.eclipse.ui.texteditor.IDocumentProviderExtension4;
+import org.eclipse.ui.texteditor.IElementStateListener;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+
+
+/**
+ * @author nitin
+ */
+public class StructuredModelDocumentProvider implements IDocumentProvider, IDocumentProviderExtension, IDocumentProviderExtension4 {
+	private static StructuredModelDocumentProvider _instance = null;
+
+	/**
+	 * @return Returns the instance.
+	 */
+	public static StructuredModelDocumentProvider getInstance() {
+		return _instance;
+	}
+
+	{
+		_instance = new StructuredModelDocumentProvider();
+	}
+
+	private StructuredModelDocumentProvider() {
+		super();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#aboutToChange(java.lang.Object)
+	 */
+	public void aboutToChange(Object element) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#addElementStateListener(org.eclipse.ui.texteditor.IElementStateListener)
+	 */
+	public void addElementStateListener(IElementStateListener listener) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#canSaveDocument(java.lang.Object)
+	 */
+	public boolean canSaveDocument(Object element) {
+		return ((IStructuredModel) element).isDirty();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#changed(java.lang.Object)
+	 */
+	public void changed(Object element) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#connect(java.lang.Object)
+	 */
+	public void connect(Object element) throws CoreException {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#disconnect(java.lang.Object)
+	 */
+	public void disconnect(Object element) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#getAnnotationModel(java.lang.Object)
+	 */
+	public IAnnotationModel getAnnotationModel(Object element) {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#getDocument(java.lang.Object)
+	 */
+	public IDocument getDocument(Object element) {
+		return ((IStructuredModel) element).getStructuredDocument();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#getModificationStamp(java.lang.Object)
+	 */
+	public long getModificationStamp(Object element) {
+		return ((IStructuredModel) element).getSynchronizationStamp();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#getStatus(java.lang.Object)
+	 */
+	public IStatus getStatus(Object element) {
+		return Status.OK_STATUS;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#getSynchronizationStamp(java.lang.Object)
+	 */
+	public long getSynchronizationStamp(Object element) {
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#isDeleted(java.lang.Object)
+	 */
+	public boolean isDeleted(Object element) {
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#isModifiable(java.lang.Object)
+	 */
+	public boolean isModifiable(Object element) {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#isReadOnly(java.lang.Object)
+	 */
+	public boolean isReadOnly(Object element) {
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#isStateValidated(java.lang.Object)
+	 */
+	public boolean isStateValidated(Object element) {
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#mustSaveDocument(java.lang.Object)
+	 */
+	public boolean mustSaveDocument(Object element) {
+		return ((IStructuredModel) element).isDirty();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#removeElementStateListener(org.eclipse.ui.texteditor.IElementStateListener)
+	 */
+	public void removeElementStateListener(IElementStateListener listener) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#resetDocument(java.lang.Object)
+	 */
+	public void resetDocument(Object element) throws CoreException {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProvider#saveDocument(org.eclipse.core.runtime.IProgressMonitor,
+	 *      java.lang.Object, org.eclipse.jface.text.IDocument, boolean)
+	 */
+	public void saveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
+		try {
+			((IStructuredModel) element).save();
+		}
+		catch (UnsupportedEncodingException e) {
+		}
+		catch (IOException e) {
+		}
+		catch (CoreException e) {
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#setCanSaveDocument(java.lang.Object)
+	 */
+	public void setCanSaveDocument(Object element) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#synchronize(java.lang.Object)
+	 */
+	public void synchronize(Object element) throws CoreException {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#updateStateCache(java.lang.Object)
+	 */
+	public void updateStateCache(Object element) throws CoreException {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#validateState(java.lang.Object,
+	 *      java.lang.Object)
+	 */
+	public void validateState(Object element, Object computationContext) throws CoreException {
+	}
+
+	public IContentType getContentType(Object element) throws CoreException {
+		return Platform.getContentTypeManager().getContentType(((IStructuredModel) element).getContentTypeIdentifier());
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ActionDescriptor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ActionDescriptor.java
new file mode 100644
index 0000000..50108ff
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ActionDescriptor.java
@@ -0,0 +1,378 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.extension;
+
+
+
+import com.ibm.icu.util.StringTokenizer;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.sse.ui.internal.IActionValidator;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * When 'action' tag is found in the registry, an object of this class is
+ * created. It creates the appropriate action object and captures information
+ * that is later used to add this action object into menu/tool bar. This class
+ * is reused for global (workbench) menu/tool bar, popup menu actions, as well
+ * as view's pulldown and local tool bar.
+ */
+public class ActionDescriptor {
+	public static final String ATT_ACCELERATOR = "accelerator"; //$NON-NLS-1$
+	public static final String ATT_CLASS = "class"; //$NON-NLS-1$
+	public static final String ATT_DEFINITION_ID = "definitionId"; //$NON-NLS-1$
+	public static final String ATT_DESCRIPTION = "description"; //$NON-NLS-1$
+	public static final String ATT_DISABLEDICON = "disabledIcon"; //$NON-NLS-1$
+	public static final String ATT_HELP_CONTEXT_ID = "helpContextId"; //$NON-NLS-1$
+	public static final String ATT_HOVERICON = "hoverIcon"; //$NON-NLS-1$
+	public static final String ATT_ICON = "icon"; //$NON-NLS-1$
+
+	public static final String ATT_ID = "id"; //$NON-NLS-1$
+	public static final String ATT_LABEL = "label"; //$NON-NLS-1$
+	public static final String ATT_MENUBAR_PATH = "menubarPath"; //$NON-NLS-1$
+	public static final String ATT_POPUPMENU_PATH = "popupmenuPath"; //$NON-NLS-1$
+	public static final String ATT_STATE = "state"; //$NON-NLS-1$
+	public static final String ATT_TOOLBAR_PATH = "toolbarPath"; //$NON-NLS-1$
+	public static final String ATT_TOOLTIP = "tooltip"; //$NON-NLS-1$
+
+	/**
+	 * Creates an extension. If the extension plugin has not been loaded a
+	 * busy cursor will be activated during the duration of the load.
+	 * 
+	 * @param element
+	 *            the config element defining the extension
+	 * @param classAttribute
+	 *            the name of the attribute carrying the class
+	 * @returns the extension object if successful. If an error occurs when
+	 *          createing executable extension, the exception is logged, and
+	 *          null returned.
+	 */
+	public static Object createExtension(final IConfigurationElement element, final String classAttribute) {
+		final Object[] result = new Object[1];
+		// If plugin has been loaded create extension.
+		// Otherwise, show busy cursor then create extension.
+		String pluginId = element.getDeclaringExtension().getNamespace();
+		Bundle bundle = Platform.getBundle(pluginId);
+		if (bundle.getState() == Bundle.ACTIVE) {
+			try {
+				result[0] = element.createExecutableExtension(classAttribute);
+			} catch (Exception e) {
+				// catch and log ANY exception from extension point
+				handleCreateExecutableException(result, e);
+			}
+		} else {
+			BusyIndicator.showWhile(null, new Runnable() {
+				public void run() {
+					try {
+						result[0] = element.createExecutableExtension(classAttribute);
+					} catch (Exception e) {
+						// catch and log ANY exception from extension point
+						handleCreateExecutableException(result, e);
+					}
+				}
+			});
+		}
+		return result[0];
+	}
+
+	private static void handleCreateExecutableException(final Object[] result, Throwable e) {
+		Logger.logException(e);
+		result[0] = null;
+	}
+
+	private String id;
+
+	private ActionContributionItem item;
+	private String menuGroup;
+	private String menuPath;
+	private String popupmenuGroup;
+	private String popupmenuPath;
+	private String toolbarGroup;
+	private String toolbarPath;
+
+	/**
+	 * Creates a new descriptor with the targetType
+	 */
+	public ActionDescriptor(IConfigurationElement actionElement) throws CoreException {
+
+		// Calculate menu and toolbar paths.
+		String mpath = actionElement.getAttribute(ATT_MENUBAR_PATH);
+		String mgroup = null;
+		if (mpath != null) {
+			int loc = mpath.lastIndexOf('/');
+			if (loc != -1) {
+				mgroup = mpath.substring(loc + 1);
+				mpath = mpath.substring(0, loc);
+			} else {
+				mgroup = mpath;
+				mpath = null;
+			}
+		}
+		menuPath = mpath;
+		menuGroup = mgroup;
+
+		String ppath = actionElement.getAttribute(ATT_POPUPMENU_PATH);
+		String pgroup = null;
+		if (ppath != null) {
+			int loc = ppath.lastIndexOf('/');
+			if (loc != -1) {
+				pgroup = ppath.substring(loc + 1);
+				ppath = ppath.substring(0, loc);
+			} else {
+				pgroup = ppath;
+				ppath = null;
+			}
+		}
+		popupmenuPath = ppath;
+		popupmenuGroup = pgroup;
+
+		String tpath = actionElement.getAttribute(ATT_TOOLBAR_PATH);
+		String tgroup = null;
+		if (tpath != null) {
+			int loc = tpath.lastIndexOf('/');
+			if (loc != -1) {
+				tgroup = tpath.substring(loc + 1);
+				tpath = tpath.substring(0, loc);
+			} else {
+				tgroup = tpath;
+				tpath = null;
+			}
+		}
+		toolbarPath = tpath;
+		toolbarGroup = tgroup;
+
+		// Create action.
+		IAction action = createAction(actionElement);
+		if (action == null)
+			return;
+
+		String label = actionElement.getAttribute(ATT_LABEL);
+		if (label != null)
+			action.setText(label);
+
+		id = actionElement.getAttribute(ATT_ID);
+		if (id == null) {
+			id = actionElement.getAttribute(ATT_CLASS);
+		}
+		if (id != null)
+			action.setId(id);
+
+		String defId = actionElement.getAttribute(ATT_DEFINITION_ID);
+		if (defId != null && defId.length() != 0) {
+			action.setActionDefinitionId(defId);
+		}
+
+		String tooltip = actionElement.getAttribute(ATT_TOOLTIP);
+		if (tooltip != null)
+			action.setToolTipText(tooltip);
+
+		String helpContextId = actionElement.getAttribute(ATT_HELP_CONTEXT_ID);
+		if (helpContextId != null) {
+			String fullID = helpContextId;
+			if (helpContextId.indexOf(".") == -1) //$NON-NLS-1$
+				// For backward compatibility we auto qualify the id if it is
+				// not qualified)
+				fullID = actionElement.getDeclaringExtension().getNamespace() + "." + helpContextId; //$NON-NLS-1$
+			PlatformUI.getWorkbench().getHelpSystem().setHelp(action, fullID);
+		}
+
+		String description = actionElement.getAttribute(ATT_DESCRIPTION);
+		if (description != null)
+			action.setDescription(description);
+
+		String state = actionElement.getAttribute(ATT_STATE);
+		if (state != null) {
+			action.setChecked(state.equals("true")); //$NON-NLS-1$
+		}
+
+		String icon = actionElement.getAttribute(ATT_ICON);
+		if (icon != null) {
+			action.setImageDescriptor(ImageUtil.getImageDescriptorFromExtension(actionElement.getDeclaringExtension(), icon));
+		}
+
+		String hoverIcon = actionElement.getAttribute(ATT_HOVERICON);
+		if (hoverIcon != null) {
+			action.setHoverImageDescriptor(ImageUtil.getImageDescriptorFromExtension(actionElement.getDeclaringExtension(), hoverIcon));
+		}
+
+		String disabledIcon = actionElement.getAttribute(ATT_DISABLEDICON);
+		if (disabledIcon != null) {
+			action.setDisabledImageDescriptor(ImageUtil.getImageDescriptorFromExtension(actionElement.getDeclaringExtension(), disabledIcon));
+		}
+
+		String accelerator = actionElement.getAttribute(ATT_ACCELERATOR);
+		if (accelerator != null)
+			processAccelerator(action, accelerator);
+
+		item = new ActionContributionItem(action);
+	}
+
+	/**
+	 * Parses the given accelerator text, and converts it to an accelerator
+	 * key code.
+	 * 
+	 * @param acceleratorText
+	 *            the accelerator text
+	 * @result the SWT key code, or 0 if there is no accelerator
+	 */
+	private int convertAccelerator(String acceleratorText) {
+		int accelerator = 0;
+		StringTokenizer stok = new StringTokenizer(acceleratorText, "+"); //$NON-NLS-1$
+
+		int keyCode = -1;
+
+		boolean hasMoreTokens = stok.hasMoreTokens();
+		while (hasMoreTokens) {
+			String token = stok.nextToken();
+			hasMoreTokens = stok.hasMoreTokens();
+			// Every token except the last must be one of the modifiers
+			// Ctrl, Shift, or Alt.
+			if (hasMoreTokens) {
+				int modifier = Action.findModifier(token);
+				if (modifier != 0) {
+					accelerator |= modifier;
+				} else { //Leave if there are none
+					return 0;
+				}
+			} else {
+				keyCode = Action.findKeyCode(token);
+			}
+		}
+		if (keyCode != -1) {
+			accelerator |= keyCode;
+		}
+		return accelerator;
+	}
+
+	/**
+	 */
+	private IAction createAction(IConfigurationElement actionElement) {
+		Object action = new ExtendedEditorActionProxyForDelayLoading(actionElement, ATT_CLASS);
+		if (action == null)
+			return null;
+		if (action instanceof IActionValidator) {
+			if (!((IActionValidator) action).isValidAction())
+				return null;
+		}
+		return (action instanceof IAction ? (IAction) ExtendedEditorActionProxy.newInstance(action) : null);
+	}
+
+	/**
+	 * Returns the action object held in this descriptor.
+	 */
+	public IAction getAction() {
+		return (item != null ? item.getAction() : null);
+	}
+
+	/**
+	 * Returns the IContributionItem object held in this descriptor.
+	 */
+	public IContributionItem getContributionItem() {
+		return item;
+	}
+
+	/**
+	 * Returns action's id as defined in the registry.
+	 */
+	public String getId() {
+		return id;
+	}
+
+	/**
+	 * Returns named slot (group) in the menu where this action should be
+	 * added.
+	 */
+	public String getMenuGroup() {
+		return menuGroup;
+	}
+
+	/**
+	 * Returns menu path where this action should be added. If null, the
+	 * action will not be added into the menu.
+	 */
+
+	public String getMenuPath() {
+		return menuPath;
+	}
+
+	/**
+	 * Returns named slot (group) in the popup menu where this action should
+	 * be added.
+	 */
+	public String getPopupMenuGroup() {
+		return popupmenuGroup;
+	}
+
+	/**
+	 * Returns popup menu path where this action should be added. If null, the
+	 * action will not be added into the popup menu.
+	 */
+
+	public String getPopupMenuPath() {
+		return popupmenuPath;
+	}
+
+	/**
+	 * Returns the named slot (group) in the tool bar where this action should
+	 * be added.
+	 */
+
+	public String getToolbarGroup() {
+		return toolbarGroup;
+	}
+
+	/**
+	 * Returns path in the tool bar where this action should be added. If
+	 * null, action will not be added to the tool bar.
+	 */
+	public String getToolbarPath() {
+		return toolbarPath;
+	}
+
+	/**
+	 * Process the accelerator definition. If it is a number then process the
+	 * code directly - if not then parse it and create the code
+	 */
+	private void processAccelerator(IAction action, String acceleratorText) {
+
+		if (acceleratorText.length() == 0)
+			return;
+
+		//Is it a numeric definition?
+		if (Character.isDigit(acceleratorText.charAt(0))) {
+			try {
+				action.setAccelerator(Integer.valueOf(acceleratorText).intValue());
+			} catch (NumberFormatException exception) {
+				Logger.log(Logger.ERROR, "Invalid accelerator declaration: " + id); //$NON-NLS-1$
+			}
+		} else
+			action.setAccelerator(convertAccelerator(acceleratorText));
+	}
+
+	/**
+	 * For debugging only.
+	 */
+	public String toString() {
+		return "ActionDescriptor(" + id + ")"; //$NON-NLS-2$//$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/BreakpointProviderBuilder.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/BreakpointProviderBuilder.java
new file mode 100644
index 0000000..2a6f9b2
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/BreakpointProviderBuilder.java
@@ -0,0 +1,405 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.extension;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import com.ibm.icu.util.StringTokenizer;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IBreakpointProvider;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * Reads breakpoint extension registory and returns breakpoint provider
+ * instances
+ */
+public class BreakpointProviderBuilder extends RegistryReader {
+
+	private static final String ATT_CLASS = "class"; //$NON-NLS-1$
+	// private static final String ATT_ID = "id"; //$NON-NLS-1$
+	private static final String ATT_CONTENT_TYPES = "contentTypes"; //$NON-NLS-1$
+	private static final String ATT_EXTENSIONS = "extensions"; //$NON-NLS-1$
+	private static BreakpointProviderBuilder instance;
+	private static final String PL_BREAKPOINT = "breakpoint"; //$NON-NLS-1$
+
+	private static final String PLUGIN_ID = "org.eclipse.wst.sse.ui"; //$NON-NLS-1$
+
+	private static final String TAG_BREAKPOINT_CONTRIBUTION = "breakpointContribution"; //$NON-NLS-1$
+	private static final String TAG_PROVIDER = "provider"; //$NON-NLS-1$
+
+	/*
+	 * Creates an executable extension. @param element the config element
+	 * defining the extension @param classAttribute the name of the attribute
+	 * carrying the class @return the extension object @throws CoreException
+	 */
+	static Object createExecutableExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
+		return element.createExecutableExtension(classAttribute);
+	}
+
+	/**
+	 * Creates an extension. If the extension plugin has not been loaded a
+	 * busy cursor will be activated during the duration of the load.
+	 * 
+	 * @param element
+	 *            the config element defining the extension
+	 * @param classAttribute
+	 *            the name of the attribute carrying the class
+	 * @return the extension object
+	 * @throws CoreException
+	 */
+	public static Object createExtension(final IConfigurationElement element, final String classAttribute) {
+		// If plugin has been loaded create extension.
+		// Otherwise, show busy cursor then create extension.
+		final Object[] result = new Object[1];
+		String pluginId = element.getDeclaringExtension().getNamespace();
+		Bundle bundle = Platform.getBundle(pluginId);
+		if (bundle.getState() == Bundle.ACTIVE) {
+			try {
+				result[0] = createExecutableExtension(element, classAttribute);
+			}
+			catch (Exception e) {
+				handleCreateExecutableException(result, e);
+			}
+		}
+		else {
+			BusyIndicator.showWhile(null, new Runnable() {
+				public void run() {
+					try {
+						result[0] = createExecutableExtension(element, classAttribute);
+					}
+					catch (CoreException e) {
+						handleCreateExecutableException(result, e);
+					}
+				}
+			});
+
+		}
+		return result[0];
+	}
+
+	/**
+	 * returns singleton instance of BreakpointProviderBuilder
+	 * 
+	 * @return BreakpointProviderBuilder
+	 */
+	public synchronized static BreakpointProviderBuilder getInstance() {
+		if (instance == null) {
+			instance = new BreakpointProviderBuilder();
+		}
+		return instance;
+	}
+
+	/**
+	 * @param result
+	 * @param e
+	 */
+	private static void handleCreateExecutableException(Object[] result, Throwable e) {
+		Logger.logException(e);
+		result[0] = null;
+
+	}
+
+	protected List cache;
+	private Map map = new HashMap();
+
+	protected String targetContributionTag;
+
+	/*
+	 * Constructor
+	 */
+	private BreakpointProviderBuilder() {
+		super();
+	}
+
+	/*
+	 * Creates a breakpoint provider object to given element @param element
+	 * configuration element object @return IBreakpointProvider
+	 */
+	protected IBreakpointProvider createBreakpointProvider(IConfigurationElement element) {
+		Object obj = createExtension(element, ATT_CLASS);
+		if (obj == null)
+			return null;
+		return (obj instanceof IBreakpointProvider) ? (IBreakpointProvider) obj : null;
+	}
+
+	/*
+	 * Creates an array of breakpoint providers matching the given key to the
+	 * value of the IConfigurationElement attribute "attrName" @return
+	 * IBreakpointProvider[]
+	 */
+	protected IBreakpointProvider[] createBreakpointProviders(String attrName, String key) {
+		if (cache == null)
+			return new IBreakpointProvider[0];
+
+		final int num = cache.size();
+		if (num == 0)
+			return new IBreakpointProvider[0];
+
+		IBreakpointProvider[] bp = new IBreakpointProvider[num];
+		int j = 0;
+		for (int i = 0; i < num; i++) {
+			Object obj = cache.get(i);
+			if (!(obj instanceof IConfigurationElement))
+				continue;
+
+			IConfigurationElement element = (IConfigurationElement) obj;
+			if (!TAG_PROVIDER.equals(element.getName()))
+				continue;
+
+			boolean doCreate = false;
+
+			String attrValues = element.getAttribute(attrName);
+
+			if (attrValues != null) {
+				StringTokenizer tokenizer = new StringTokenizer(attrValues, ","); //$NON-NLS-1$
+				while (tokenizer.hasMoreTokens()) {
+					String type = tokenizer.nextToken();
+					if (type.trim().equalsIgnoreCase(key.trim())) {
+						doCreate = true;
+						break;
+					}
+				}
+			}
+
+			if (doCreate) {
+				IBreakpointProvider b = createBreakpointProvider(element);
+				if (b != null) {
+					bp[j] = b;
+					j++;
+				}
+			}
+		}
+
+		IBreakpointProvider[] bp2 = new IBreakpointProvider[j];
+		for (int i = 0; i < j; i++) {
+			bp2[i] = bp[i];
+		}
+
+		return bp2;
+	}
+
+	/*
+	 * Returns a matching array of extension points matching this key. Doesn't
+	 * cause instantiation of providers. @return IBreakpointProvider[]
+	 */
+	protected IConfigurationElement[] findElements(String key) {
+		initCache();
+
+		if (cache == null || cache.size() == 0)
+			return new IConfigurationElement[0];
+
+		int num = cache.size();
+		List elements = new ArrayList(1);
+		for (int i = 0; i < num; i++) {
+			Object obj = cache.get(i);
+			if (!(obj instanceof IConfigurationElement))
+				continue;
+
+			IConfigurationElement element = (IConfigurationElement) obj;
+			if (!TAG_PROVIDER.equals(element.getName()))
+				continue;
+
+			boolean add = false;
+			String types = element.getAttribute(ATT_CONTENT_TYPES);
+			String exts = element.getAttribute(ATT_EXTENSIONS);
+
+			if (types == null && exts == null) {
+				add = true;
+			}
+
+			if (!add && types != null && types.length() > 0) {
+				IContentType testType = Platform.getContentTypeManager().getContentType(key);
+				StringTokenizer tokenizer = new StringTokenizer(types, ","); //$NON-NLS-1$
+				while (tokenizer.hasMoreTokens()) {
+					String type = tokenizer.nextToken();
+					IContentType contentType = Platform.getContentTypeManager().getContentType(type);
+					if (contentType != null && testType != null && testType.isKindOf(contentType)) {
+						add = true;
+						break;
+					}
+				}
+			}
+
+			if (!add && exts != null) {
+				StringTokenizer tokenizer = new StringTokenizer(exts, ","); //$NON-NLS-1$
+				while (tokenizer.hasMoreTokens()) {
+					String ext = tokenizer.nextToken();
+					if (ext.trim().equals(key.trim())) {
+						add = true;
+						break;
+					}
+				}
+			}
+
+			if (add) {
+				elements.add(element);
+			}
+		}
+		return (IConfigurationElement[]) elements.toArray(new IConfigurationElement[0]);
+	}
+
+	/**
+	 * Returns an array of breakpoint providers for a specified content type
+	 * handler
+	 * 
+	 * @param handler
+	 *            a content type handler
+	 * @param ext
+	 *            file extension
+	 * @return IBreakpointProvider[]
+	 */
+	public IBreakpointProvider[] getBreakpointProviders(IEditorPart editorpart, String contentTypeID, String ext) {
+		initCache();
+
+		// Get breakpoint providers for this content type handler
+		IBreakpointProvider[] providers1 = new IBreakpointProvider[0];
+		IContentType contentType = Platform.getContentTypeManager().getContentType(contentTypeID);
+		List holdProviders = new ArrayList(2);
+		while (contentType != null) {
+			IBreakpointProvider[] providers = (IBreakpointProvider[]) map.get(contentType.getId());
+			if (providers == null) {
+				providers = createBreakpointProviders(ATT_CONTENT_TYPES, contentType.getId());
+				if (providers != null) {
+					map.put(contentType.getId(), providers);
+				}
+			}
+			// providers were retrieved from cache or newly created
+			if(providers != null) {
+				holdProviders.addAll(Arrays.asList(providers));
+			}
+			contentType = contentType.getBaseType();
+		}
+		providers1 = (IBreakpointProvider[]) holdProviders.toArray(new IBreakpointProvider[holdProviders.size()]);
+
+		// Get breakpoint providers for this extension
+		IBreakpointProvider[] providers2 = new IBreakpointProvider[0];
+		if (ext != null) {
+			providers2 = (IBreakpointProvider[]) map.get(ext);
+			if (providers2 == null) {
+				providers2 = createBreakpointProviders(ATT_EXTENSIONS, ext);
+				if (providers2 != null) {
+					map.put(ext, providers2);
+				}
+			}
+		}
+
+		// create single hash set to remove duplication
+		Set s = new HashSet();
+		s.addAll(Arrays.asList(providers1));
+		s.addAll(Arrays.asList(providers2));
+
+		// create IBreakpointProvider[] to return
+		IBreakpointProvider[] providers = new IBreakpointProvider[s.size()];
+		Iterator itr = s.iterator();
+		int i = 0;
+		ISourceEditingTextTools tools = null;
+		if (editorpart != null && itr.hasNext())
+			tools = (ISourceEditingTextTools) editorpart.getAdapter(ISourceEditingTextTools.class);
+		while (itr.hasNext()) {
+			providers[i] = (IBreakpointProvider) itr.next();
+			providers[i].setSourceEditingTextTools(tools);
+			i++;
+		}
+		return providers;
+	}
+
+	/**
+	 * Returns corresponding resource from given parameters
+	 * 
+	 * @param input
+	 * @param handler
+	 * @param ext
+	 * @return IResource
+	 */
+	public IResource getResource(IEditorInput input, String contentType, String ext) {
+		IBreakpointProvider[] providers = getBreakpointProviders(null, contentType, ext);
+		IResource res = null;
+		for (int i = 0; i < providers.length; i++) {
+			res = providers[i].getResource(input);
+			if (res != null) {
+				break;
+			}
+		}
+		return res;
+	}
+
+	private void initCache() {
+		if (cache == null) {
+			cache = new ArrayList();
+			readContributions(TAG_BREAKPOINT_CONTRIBUTION, PL_BREAKPOINT);
+		}
+	}
+
+	/**
+	 * Returns an array of breakpoint providers for a specified content type
+	 * handler
+	 * 
+	 * @param contentType
+	 *            a content type ID or null
+	 * @param ext
+	 *            a filename extension or null
+	 * @return boolean
+	 */
+	public boolean isAvailable(String contentType, String ext) {
+		boolean available = false;
+		if (ext != null)
+			available = findElements(ext).length > 0;
+		if (!available && contentType != null)
+			available = findElements(contentType).length > 0;
+		return available;
+	}
+
+	/**
+	 * Reads the contributions from the registry for the provided workbench
+	 * part and the provided extension point ID.
+	 * 
+	 * @param tag
+	 * @param extensionPoint
+	 */
+	protected void readContributions(String tag, String extensionPoint) {
+		targetContributionTag = tag;
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		readRegistry(registry, PLUGIN_ID, extensionPoint);
+	}
+
+	protected boolean readElement(IConfigurationElement element) {
+		String tag = element.getName();
+		if (tag.equals(targetContributionTag)) {
+			readElementChildren(element);
+			return true;
+		}
+		else if (tag.equals(TAG_PROVIDER)) {
+			cache.add(element);
+			return true; // just cache the element - don't go into it
+		}
+		return false;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/DropActionProxy.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/DropActionProxy.java
new file mode 100644
index 0000000..104f49a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/DropActionProxy.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.extension;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ITextEditorExtension2;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager;
+import org.eclipse.wst.sse.ui.internal.IExtendedSimpleEditor;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISelfValidateEditAction;
+
+
+/**
+ */
+public class DropActionProxy implements InvocationHandler {
+	public static Object newInstance(Object obj) {
+		Object instance = null;
+		try {
+			Set set = new HashSet();
+			Class clazz = obj.getClass();
+			while (clazz != null) {
+				Class[] interfaces = clazz.getInterfaces();
+				for (int i = 0; i < interfaces.length; i++) {
+					set.add(interfaces[i]);
+				}
+				clazz = clazz.getSuperclass();
+			}
+			Class[] classes = new Class[set.size()];
+			Iterator itr = set.iterator();
+			int i = 0;
+			while (itr.hasNext()) {
+				classes[i] = (Class) itr.next();
+				i++;
+			}
+			instance = Proxy.newProxyInstance(obj.getClass().getClassLoader(), classes, new DropActionProxy(obj));
+		} catch (Error e) {
+			Logger.logException("Exception while proxying a drop action", e); //$NON-NLS-1$
+			instance = obj;
+		}
+		return instance;
+	}
+
+	private IExtendedSimpleEditor editor = null;
+	private IStructuredModel fRecorder;
+	private Object obj;
+
+	private DropActionProxy(Object obj) {
+		this.obj = obj;
+	}
+
+	private void beginRecording() {
+		IDocument document = null;
+		if (editor != null) {
+			document = editor.getDocument();
+			if (document != null)
+				fRecorder = StructuredModelManager.getModelManager().getExistingModelForEdit(document);
+			// Prepare for Undo
+			if (fRecorder != null) {
+				IStructuredTextUndoManager um = fRecorder.getUndoManager();
+				if (um != null) {
+					if (this.obj instanceof IAction)
+						um.beginRecording(this, ((IAction) this.obj).getText(), ((IAction) this.obj).getDescription());
+					else
+						um.beginRecording(this);
+				}
+			}
+		}
+	}
+
+	private void endRecording() {
+		if (fRecorder != null) {
+			IStructuredTextUndoManager um = fRecorder.getUndoManager();
+			if (um != null)
+				um.endRecording(this);
+			fRecorder.releaseFromEdit();
+			fRecorder = null;
+		}
+	}
+
+	/**
+	 * @see java.lang.reflect.InvocationHandler#invoke(Object, Method,
+	 *      Object[])
+	 */
+	public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
+		Object result;
+		String name = m.getName();
+		try {
+			if (name.equals("equals")) { //$NON-NLS-1$
+				// Workaround for JDK's bug 4652876
+				// "equals" always returns false even if both
+				// InvocationHandler
+				// class
+				// hold the same objects
+				// See
+				// http://developer.java.sun.com/developer/bugParade/bugs/4652876.html
+				// This problem is in the IBM SDK 1.3.1
+				// but I don't see the bug in Sun's JDK 1.4.1 (beta)
+				Object arg = args[0];
+				return (proxy.getClass() == arg.getClass() && equals(Proxy.getInvocationHandler(arg))) ? Boolean.TRUE : Boolean.FALSE;
+			} else if (name.equals("run")) { //$NON-NLS-1$
+				if (args[1] instanceof IExtendedSimpleEditor) {
+					editor = (IExtendedSimpleEditor) args[1];
+				}
+				beginRecording();
+				if ((args[1] instanceof ITextEditor) && !(obj instanceof ISelfValidateEditAction) && !isEditable((ITextEditor) args[1])) {
+					return Boolean.FALSE;
+				}
+			}
+			result = m.invoke(obj, args);
+		} catch (InvocationTargetException e) {
+			throw e.getTargetException();
+		} catch (Exception e) {
+			throw new RuntimeException(e.getMessage());
+		} finally {
+			if (name.equals("run")) { //$NON-NLS-1$
+				endRecording();
+			}
+		}
+		return result;
+	}
+
+	private boolean isEditable(ITextEditor editor) {
+		if (editor instanceof ITextEditorExtension2)
+			return ((ITextEditorExtension2) editor).validateEditorInputState();
+		return editor.isEditable();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ExtendedEditorActionProxy.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ExtendedEditorActionProxy.java
new file mode 100644
index 0000000..b11c7b9
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ExtendedEditorActionProxy.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.extension;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager;
+import org.eclipse.wst.sse.ui.internal.IExtendedSimpleEditor;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISelfValidateEditAction;
+
+
+/**
+ * Begins and ends UndoManager recording around run() and runWithEvent(...)
+ */
+public class ExtendedEditorActionProxy implements InvocationHandler {
+	public static Object newInstance(Object obj) {
+		Set set = new HashSet();
+		Class clazz = obj.getClass();
+		while (clazz != null) {
+			Class[] interfaces = clazz.getInterfaces();
+			for (int i = 0; i < interfaces.length; i++) {
+				set.add(interfaces[i]);
+			}
+			clazz = clazz.getSuperclass();
+		}
+		Class[] classes = new Class[set.size()];
+		Iterator itr = set.iterator();
+		int i = 0;
+		while (itr.hasNext()) {
+			classes[i] = (Class) itr.next();
+			i++;
+		}
+		return Proxy.newProxyInstance(obj.getClass().getClassLoader(), classes, new ExtendedEditorActionProxy(obj));
+	}
+
+	private IExtendedSimpleEditor editor = null;
+	private IStructuredModel fRecorder;
+	private Object obj;
+
+	private ExtendedEditorActionProxy(Object obj) {
+		this.obj = obj;
+	}
+
+	private void beginRecording() {
+		IDocument document = null;
+		if (editor != null) {
+			document = editor.getDocument();
+			if (document != null)
+				fRecorder = StructuredModelManager.getModelManager().getExistingModelForEdit(document);
+			// Prepare for Undo
+			if (fRecorder != null) {
+				IStructuredTextUndoManager um = fRecorder.getUndoManager();
+				if (um != null) {
+					um.beginRecording(this, ((IAction) this.obj).getText(), ((IAction) this.obj).getDescription());
+				}
+			}
+		}
+	}
+
+	private void endRecording() {
+		if (fRecorder != null) {
+			IStructuredTextUndoManager um = fRecorder.getUndoManager();
+			if (um != null) {
+				um.endRecording(this);
+			}
+			fRecorder.releaseFromEdit();
+			fRecorder = null;
+		}
+	}
+
+	/**
+	 * @see java.lang.reflect.InvocationHandler#invoke(Object, Method,
+	 *      Object[])
+	 */
+	public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
+		Object result = null;
+		String name = m.getName();
+		try {
+			if (name.equals("equals")) { //$NON-NLS-1$
+				// Workaround for JDK's bug 4652876
+				// "equals" always returns false even if both
+				// InvocationHandler
+				// class
+				// hold the same objects
+				// See
+				// http://developer.java.sun.com/developer/bugParade/bugs/4652876.html
+				// This problem is in the IBM SDK 1.3.1
+				// but I don't see the bug in Sun's JDK 1.4.1 (beta)
+				Object arg = args[0];
+				return (proxy.getClass() == arg.getClass() && equals(Proxy.getInvocationHandler(arg))) ? Boolean.TRUE : Boolean.FALSE;
+			} else if (name.equals("runWithEvent") || name.equals("run")) { //$NON-NLS-1$  //$NON-NLS-2$
+				beginRecording();
+				if ((editor != null) && !(this.obj instanceof ISelfValidateEditAction)) {
+					
+					// TODO: cleanup validateEdit
+					// just leaving this check and following code here for transition. 
+					// I assume we'll remove all need for 'validateEdit'
+					// or move to platform editor's validateState 
+
+//					IStatus status = editor.validateEdit(getDisplay().getActiveShell());
+//					if (!status.isOK()) {
+//						return null;
+//					}
+				}
+			} else if (name.equals("setActiveExtendedEditor")) { //$NON-NLS-1$
+				if (args[0] instanceof IExtendedSimpleEditor) {
+					editor = (IExtendedSimpleEditor) args[0];
+				}
+			}
+			result = m.invoke(this.obj, args);
+		} catch (InvocationTargetException e) {
+			Logger.logException(e.getTargetException());
+			//throw e.getTargetException();
+		} catch (Exception e) {
+			Logger.logException(e);
+			if (name.equals("runWithEvent") || name.equals("run")) { //$NON-NLS-1$  //$NON-NLS-2$
+				// only expose user-driven exceptions from "running" to the
+				// user
+				throw new RuntimeException(e.getMessage());
+			}
+		} finally {
+			if (name.equals("runWithEvent") || name.equals("run")) { //$NON-NLS-1$  //$NON-NLS-2$
+				endRecording();
+			}
+		}
+		return result;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ExtendedEditorActionProxyForDelayLoading.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ExtendedEditorActionProxyForDelayLoading.java
new file mode 100644
index 0000000..fc73c0d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ExtendedEditorActionProxyForDelayLoading.java
@@ -0,0 +1,768 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.extension;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.ListenerList;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.events.HelpListener;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.texteditor.IUpdate;
+import org.eclipse.wst.sse.ui.internal.IExtendedEditorAction;
+import org.eclipse.wst.sse.ui.internal.IExtendedSimpleEditor;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.osgi.framework.Bundle;
+
+public class ExtendedEditorActionProxyForDelayLoading implements IExtendedEditorAction, IExtendedEditorActionProxyForDelayLoading, IAction {
+    private IAction proxy;
+    private IAction dummy = new Action() { // this is for mainly its property change notify...
+    };
+    // proxy'ed properties
+    private String p_id;
+    private boolean set_p_id;
+    private String p_text;
+    private String p_description;
+    private boolean set_p_text;
+    private boolean set_p_description;
+    private String p_toolTipText;
+    private boolean set_p_toolTipText;
+    private String p_actionDefinitionId;
+    private boolean set_p_actionDefinitionId;
+    private ImageDescriptor p_image;
+    private boolean set_p_image;
+    private ImageDescriptor p_hoverImage;
+    private boolean set_p_hoverImage;
+    private ImageDescriptor p_disabledImage;
+    private boolean set_p_disabledImage;
+    private int p_accelerator;
+    private boolean set_p_accelerator;
+    private int p_style = AS_PUSH_BUTTON;
+    //private boolean set_p_style;
+    private HelpListener p_helpListener;
+    private boolean set_p_helpListener;
+    private boolean p_enabled = true; // should be same as what is done in
+    private boolean set_p_enabled;
+    private ListenerList p_listeners = new ListenerList(3);
+    private boolean set_p_listeners;
+    private boolean p_checked;
+    private boolean set_p_checked;
+    private IExtendedSimpleEditor p_targetEditor;
+    private boolean set_p_targetEditor;
+	private boolean p_isvisible = true; // should be true
+	
+	private IConfigurationElement element;
+	private String classAttribute;
+
+	 /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
+     */
+    public void addPropertyChangeListener(IPropertyChangeListener listener) {
+        p_listeners.add(listener);
+        set_p_listeners = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.addPropertyChangeListener(listener);
+        } else {
+        	dummy.addPropertyChangeListener(listener);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getAccelerator()
+     */
+    public int getAccelerator() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.getAccelerator();
+        }
+        return p_accelerator;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getActionDefinitionId()
+     */
+    public String getActionDefinitionId() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.getActionDefinitionId();
+        }
+        return p_actionDefinitionId;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getDescription()
+     */
+    public String getDescription() {
+        //        System.out.println(p_id + ": getDescription");
+        //        System.out.flush();
+        if (proxy != null) {
+            return proxy.getDescription();
+        }
+        return p_description;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getDisabledImageDescriptor()
+     */
+    public ImageDescriptor getDisabledImageDescriptor() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.getDisabledImageDescriptor();
+        }
+        return p_disabledImage;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getHelpListener()
+     */
+    public HelpListener getHelpListener() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.getHelpListener();
+        }
+        return p_helpListener;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getHoverImageDescriptor()
+     */
+    public ImageDescriptor getHoverImageDescriptor() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.getHoverImageDescriptor();
+        }
+        return p_hoverImage;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getId()
+     */
+    public String getId() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.getId();
+        }
+        return p_id;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getImageDescriptor()
+     */
+    public ImageDescriptor getImageDescriptor() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.getImageDescriptor();
+        }
+        return p_image;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getMenuCreator()
+     */
+    public IMenuCreator getMenuCreator() {
+        //        System.out.println(p_id + ": getMenuCreator");
+        //        System.out.flush();
+        realize();
+        if (proxy != null) {
+            return proxy.getMenuCreator();
+        }
+        return null;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getStyle()
+     */
+    public int getStyle() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.getStyle();
+        }
+        return p_style;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getText()
+     */
+    public String getText() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.getText();
+        }
+        return p_text;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#getToolTipText()
+     */
+    public String getToolTipText() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.getToolTipText();
+        }
+        return p_toolTipText;
+    }
+    
+	/**
+	 * Check if the contributing bundle is active
+	 */
+	public boolean isBundleActive() {
+		Bundle bundle = Platform.getBundle(element.getDeclaringExtension().getNamespace());
+		if (bundle != null && bundle.getState() != Bundle.ACTIVE) {
+			return false;
+		}
+		return true;
+	}
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#isChecked()
+     */
+    public boolean isChecked() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.isChecked();
+        }
+        return p_checked;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#isEnabled()
+     */
+    public boolean isEnabled() {
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            return proxy.isEnabled();
+        }
+        return p_enabled;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
+     */
+    public void removePropertyChangeListener(IPropertyChangeListener listener) {
+        p_listeners.remove(listener);
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.removePropertyChangeListener(listener);
+        }
+        dummy.removePropertyChangeListener(listener);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#run()
+     */
+    public void run() {
+        realize();
+        if (proxy != null) {
+            // if this has a key accelerator, first update this action and to
+            // see if this action is enabled or not.
+            if ((proxy.getAccelerator() > 0) || (proxy.getActionDefinitionId() != null)) {
+                update();
+                if (isEnabled() == true) {
+                    proxy.run();
+                }
+            } else {
+                proxy.run();
+            }
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#runWithEvent(org.eclipse.swt.widgets.Event)
+     */
+    public void runWithEvent(Event event) {
+        realize();
+        if (proxy != null) {
+            // same as run()
+            if ((proxy.getAccelerator() > 0) || (proxy.getActionDefinitionId() != null)) {
+                update();
+                if (isEnabled() == true) {
+                    proxy.runWithEvent(event);
+                }
+            } else {
+                proxy.runWithEvent(event);
+            }
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setActionDefinitionId(java.lang.String)
+     */
+    public void setActionDefinitionId(String id) {
+        p_actionDefinitionId = id;
+        set_p_actionDefinitionId = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setActionDefinitionId(id);
+        } else {
+        	dummy.setActionDefinitionId(id);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setChecked(boolean)
+     */
+    public void setChecked(boolean checked) {
+        p_checked = checked;
+        set_p_checked = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setChecked(checked);
+        } else {
+        	dummy.setChecked(checked);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setDescription(java.lang.String)
+     */
+    public void setDescription(String description) {
+        p_description = description;
+        set_p_description = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setDescription(description);
+        } else {
+        	dummy.setDescription(description);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setDisabledImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)
+     */
+    public void setDisabledImageDescriptor(ImageDescriptor newImage) {
+        p_disabledImage = newImage;
+        set_p_disabledImage = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setDisabledImageDescriptor(newImage);
+        } else {
+        	dummy.setDisabledImageDescriptor(newImage);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setEnabled(boolean)
+     */
+    public void setEnabled(boolean enabled) {
+        p_enabled = enabled;
+        set_p_enabled = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setEnabled(enabled);
+        } else {
+        	dummy.setEnabled(enabled);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setHelpListener(org.eclipse.swt.events.HelpListener)
+     */
+    public void setHelpListener(HelpListener listener) {
+        p_helpListener = listener;
+        set_p_helpListener = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setHelpListener(listener);
+        } else {
+        	dummy.setHelpListener(listener);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setHoverImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)
+     */
+    public void setHoverImageDescriptor(ImageDescriptor newImage) {
+        p_hoverImage = newImage;
+        set_p_hoverImage = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setHoverImageDescriptor(newImage);
+        } else {
+        	dummy.setHoverImageDescriptor(newImage);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setId(java.lang.String)
+     */
+    public void setId(String id) {
+        p_id = id;
+        set_p_id = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setId(id);
+        } else {
+        	dummy.setId(id);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)
+     */
+    public void setImageDescriptor(ImageDescriptor newImage) {
+        p_image = newImage;
+        set_p_image = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setImageDescriptor(newImage);
+        } else {
+        	dummy.setImageDescriptor(newImage);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setMenuCreator(org.eclipse.jface.action.IMenuCreator)
+     */
+    public void setMenuCreator(IMenuCreator creator) {
+        //        System.out.println(p_id + ": setMenuCreator");
+        //        System.out.flush();
+        realize();
+        if (proxy != null) {
+            proxy.setMenuCreator(creator);
+        } else {
+        	dummy.setMenuCreator(creator);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setText(java.lang.String)
+     */
+    public void setText(String text) {
+        p_text = text;
+        set_p_text = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setText(text);
+        } else {
+        	dummy.setText(text);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setToolTipText(java.lang.String)
+     */
+    public void setToolTipText(String text) {
+        p_toolTipText = text;
+        set_p_toolTipText = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setToolTipText(text);
+        } else {
+        	dummy.setToolTipText(text);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#setAccelerator(int)
+     */
+    public void setAccelerator(int keycode) {
+        p_accelerator = keycode;
+        set_p_accelerator = true;
+        // don't realize class.
+        // realize();
+        if (proxy != null) {
+            proxy.setAccelerator(keycode);
+        } else {
+        	dummy.setAccelerator(keycode);
+        }
+    }
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.sse.ui.internal.IExtendedEditorAction#setActiveExtendedEditor(com.ibm.sse.editor.extension.IExtendedSimpleEditor)
+	 */
+	public void setActiveExtendedEditor(IExtendedSimpleEditor targetEditor) {
+		p_targetEditor = targetEditor;
+		set_p_targetEditor = true;
+        // don't realize class.
+        // realize();
+        if ((proxy != null) && (proxy instanceof IExtendedEditorAction)) {
+            ((IExtendedEditorAction)proxy).setActiveExtendedEditor(targetEditor);
+        }
+	}
+
+	/* (non-Javadoc)
+	 * @see com.ibm.sse.editor.extension.IExtendedEditorAction#isVisible()
+	 */
+	public boolean isVisible() {
+        // don't realize class.
+        // realize();
+        if ((proxy != null) && (proxy instanceof IExtendedEditorAction)) {
+            return ((IExtendedEditorAction)proxy).isVisible();
+        }
+        return p_isvisible;
+	}
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.IAction#isHandled
+     */
+	public boolean isHandled() {
+		return false;
+	}
+
+	// see ActionDescriptor#createExtension
+	private static IAction newInstance(final IConfigurationElement elm, final String cla) {
+		final Object[] result = new Object[1];
+		// If plugin has been loaded create extension.
+		// Otherwise, show busy cursor then create extension.
+		Bundle bundle= Platform.getBundle(elm.getDeclaringExtension().getNamespace());
+		if (bundle != null && bundle.getState() == Bundle.ACTIVE) {
+			try {
+				result[0] = elm.createExecutableExtension(cla);
+			}
+			catch (Exception e) {
+				// catch and log ANY exception from extension point
+				handleCreateExecutableException(result, e, elm.getAttribute(cla));
+			}
+		}
+		else {
+			BusyIndicator.showWhile(null, new Runnable() {
+				public void run() {
+					try {
+						result[0] = elm.createExecutableExtension(cla);
+					}
+					catch (Exception e) {
+						// catch and log ANY exception from extension point
+						handleCreateExecutableException(result, e, elm.getAttribute(cla));
+					}
+				}
+			});
+		}
+		if ((result[0] != null) && (result[0] instanceof IAction)) {
+			return (IAction)result[0];
+		}
+		return null;
+    }
+	
+	private static void handleCreateExecutableException(final Object[] result, Throwable e, String classname) {
+		Logger.logException("Unable to create proxy action for " + classname, e);
+		result[0] = null;
+	}
+
+	/**
+     * Instantiate a real class here
+     */
+    public void realize() {
+        if ((proxy == null) && (element != null) && (classAttribute != null)) {
+            proxy = newInstance(element, classAttribute);
+	        if (proxy != null) {
+	            // propagate proxy'ed properties
+	            if (set_p_listeners == true) {
+	                if (p_listeners.size() > 0) {
+	                    Object[] l = p_listeners.getListeners();
+	                    int ls = l.length;
+	                    for (int i = 0; i < ls; i++) {
+	                        IPropertyChangeListener pl = (IPropertyChangeListener) l[i];
+	                        proxy.addPropertyChangeListener(pl);
+	                        dummy.removePropertyChangeListener(pl); // remove listener from dymmy so that we don't send notifications twice anymore
+	                    }
+	                }
+	            }
+	            if (set_p_accelerator == true) {
+	                proxy.setAccelerator(p_accelerator);
+	            }
+	            if (set_p_actionDefinitionId == true) {
+	                if (p_actionDefinitionId != null) {
+	                    proxy.setActionDefinitionId(p_actionDefinitionId);
+	                }
+	            }
+	            if (set_p_checked == true) {
+	                proxy.setChecked(p_checked);
+	            }
+	            if (set_p_disabledImage == true) {
+	                if (p_disabledImage != null) {
+	                    proxy.setDisabledImageDescriptor(p_disabledImage);
+	                }
+	            }
+	            if (set_p_enabled == true) {
+	                proxy.setEnabled(p_enabled);
+	            }
+	            if (set_p_helpListener == true) {
+	                if (p_helpListener != null) {
+	                    proxy.setHelpListener(p_helpListener);
+	                }
+	            }
+	            if (set_p_hoverImage == true) {
+	                if (p_hoverImage != null) {
+	                    proxy.setHoverImageDescriptor(p_hoverImage);
+	                }
+	            }
+	            if (set_p_id == true) {
+	                if (p_id != null) {
+	                    proxy.setId(p_id);
+	                }
+	            }
+	            if (set_p_image == true) {
+	                if (p_image != null) {
+	                    proxy.setImageDescriptor(p_image);
+	                }
+	            }
+	            if (set_p_text == true) {
+	                if (p_text != null) {
+	                    proxy.setText(p_text);
+	                }
+	            }
+	            if (set_p_description == true) {
+	                if (p_description != null) {
+	                    proxy.setDescription(p_description);
+	                }
+	            }
+	            if (set_p_toolTipText == true) {
+	                if (p_toolTipText != null) {
+	                    proxy.setToolTipText(p_toolTipText);
+	                }
+	            }
+	            if (set_p_targetEditor == true) {
+	                if (p_targetEditor != null) {
+				        if (proxy instanceof IExtendedEditorAction) {
+				            ((IExtendedEditorAction)proxy).setActiveExtendedEditor(p_targetEditor);
+				        }
+	                }
+	            }
+	        }
+        }
+    }
+
+    public boolean isRealized() {
+        return (proxy != null);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.texteditor.IUpdate#update()
+     */
+    public void update() {
+        // don't realize class.
+        // realize();
+        if ((proxy != null) && (proxy instanceof IUpdate)) {
+            ((IUpdate) proxy).update();
+        }
+    }
+
+    /**
+     * get a real action class
+     */
+    public IAction getAction() {
+        realize();
+        return proxy;
+    }
+
+
+    /**
+     * These are Actions's constructors
+     */
+    ExtendedEditorActionProxyForDelayLoading() {
+        super();
+     }
+    public ExtendedEditorActionProxyForDelayLoading(final IConfigurationElement element, final String classAttribute) {
+        super();
+        this.element = element;
+        this.classAttribute = classAttribute;
+    }
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/IExtendedEditorActionProxyForDelayLoading.java
similarity index 60%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/IExtendedEditorActionProxyForDelayLoading.java
index 607270a..773858b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/IExtendedEditorActionProxyForDelayLoading.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,16 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.extension;
 
+import org.eclipse.jface.action.IAction;
 
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-public interface UpdateListener {
-
-	public void updateOccured(Object object, Object arg);
+/**
+ * @deprecated
+ */
+public interface IExtendedEditorActionProxyForDelayLoading {
+    public IAction getAction();
+    public boolean isRealized();
+    public void realize();
+    boolean isBundleActive();
 }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ImageUtil.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ImageUtil.java
new file mode 100644
index 0000000..aefc562
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ImageUtil.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.extension;
+
+
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.Bundle;
+
+public class ImageUtil {
+
+
+	/**
+	 * Convenience Method. Returns an ImageDescriptor whose path, relative to
+	 * the plugin containing the <code>extension</code> is
+	 * <code>subdirectoryAndFilename</code>. If there isn't any value
+	 * associated with the name then <code>null
+	 * </code> is returned.
+	 * 
+	 * This method is convenience and only intended for use by the workbench
+	 * because it explicitly uses the workbench's registry for
+	 * caching/retrieving images from other extensions -- other plugins must
+	 * user their own registry. This convenience method is subject to removal.
+	 * 
+	 * Note: subdirectoryAndFilename must not have any leading "." or path
+	 * separators / or \ ISV's should use icons/mysample.gif and not
+	 * ./icons/mysample.gif
+	 * 
+	 * Note: This consults the plugin for extension and obtains its
+	 * installation location. all requested images are assumed to be in a
+	 * directory below and relative to that plugins installation directory.
+	 */
+	public static ImageDescriptor getImageDescriptorFromExtension(IExtension extension, String subdirectoryAndFilename) {
+		String pluginId = extension.getNamespace();
+		Bundle bundle = Platform.getBundle(pluginId);
+		return getImageDescriptorFromBundle(bundle, subdirectoryAndFilename);
+	}
+
+	/**
+	 * Convenience Method. Return an ImageDescriptor whose path relative to
+	 * the plugin described by <code>bundle</code> is
+	 * <code>subdirectoryAndFilename</code>. Returns <code>null</code> if
+	 * no image could be found.
+	 * 
+	 * This method is convenience and only intended for use by the workbench
+	 * because it explicitly uses the workbench's registry for
+	 * caching/retrieving images from other extensions -- other plugins must
+	 * user their own registry. This convenience method is subject to removal.
+	 * 
+	 * Note: subdirectoryAndFilename must not have any leading "." or path
+	 * separators / or \ ISV's should use icons/mysample.gif and not
+	 * ./icons/mysample.gif
+	 * 
+	 * Note: This consults the plugin for extension and obtains its
+	 * installation location. all requested images are assumed to be in a
+	 * directory below and relative to that plugins installation directory.
+	 */
+	public static ImageDescriptor getImageDescriptorFromBundle(Bundle bundle, String subdirectoryAndFilename) {
+
+		URL path = bundle.getEntry("/"); //$NON-NLS-1$
+		URL fullPathString = null;
+		try {
+			fullPathString = new URL(path, subdirectoryAndFilename);
+			return ImageDescriptor.createFromURL(fullPathString);
+		} catch (MalformedURLException e) {
+		}
+		return null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/RegistryReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/RegistryReader.java
new file mode 100644
index 0000000..a36e8ba
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/RegistryReader.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.extension;
+
+
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IPluginRegistry;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.util.Sorter;
+
+
+/**
+ * Template implementation of a registry reader that creates objects
+ * representing registry contents. Typically, an extension contains one
+ * element, but this reader handles multiple elements per extension.
+ * 
+ * To start reading the extensions from the registry for an extension point,
+ * call the method <code>readRegistry</code>.
+ * 
+ * To read children of an IConfigurationElement, call the method
+ * <code>readElementChildren</code> from your implementation of the method
+ * <code>readElement</code>, as it will not be done by default.
+ */
+public abstract class RegistryReader {
+
+
+	protected static final String TAG_DESCRIPTION = "description"; //$NON-NLS-1$
+
+	/**
+	 * The constructor.
+	 */
+	protected RegistryReader() {
+	}
+
+	/**
+	 * This method extracts description as a subelement of the given element.
+	 * 
+	 * @return description string if defined, or empty string if not.
+	 */
+	protected String getDescription(IConfigurationElement config) {
+		IConfigurationElement[] children = config.getChildren(TAG_DESCRIPTION);
+		if (children.length >= 1) {
+			return children[0].getValue();
+		}
+		return ""; //$NON-NLS-1$
+	}
+
+	/**
+	 * Logs the error in the workbench log using the provided text and the
+	 * information in the configuration element.
+	 */
+	protected void logError(IConfigurationElement element, String text) {
+		IExtension extension = element.getDeclaringExtension();
+		StringBuffer buf = new StringBuffer();
+		buf.append("Plugin " + extension.getNamespace() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-2$//$NON-NLS-1$
+		buf.append("\n" + text); //$NON-NLS-1$
+		Logger.log(Logger.ERROR, buf.toString());
+	}
+
+	/**
+	 * Logs a very common registry error when a required attribute is missing.
+	 */
+	protected void logMissingAttribute(IConfigurationElement element, String attributeName) {
+		logError(element, "Required attribute '" + attributeName + "' not defined"); //$NON-NLS-2$//$NON-NLS-1$
+	}
+
+	/**
+	 * Logs a registry error when the configuration element is unknown.
+	 */
+	protected void logUnknownElement(IConfigurationElement element) {
+		logError(element, "Unknown extension tag found: " + element.getName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Apply a reproducable order to the list of extensions provided, such
+	 * that the order will not change as extensions are added or removed.
+	 */
+	protected IExtension[] orderExtensions(IExtension[] extensions) {
+		// By default, the order is based on plugin id sorted
+		// in ascending order. The order for a plugin providing
+		// more than one extension for an extension point is
+		// dependent in the order listed in the XML file.
+		Sorter sorter = new Sorter() {
+			public boolean compare(Object extension1, Object extension2) {
+				String s1 = ((IExtension) extension1).getNamespace().toUpperCase();
+				String s2 = ((IExtension) extension2).getNamespace().toUpperCase();
+				//Return true if elementTwo is 'greater than' elementOne
+				return s2.compareTo(s1) > 0;
+			}
+		};
+
+		Object[] sorted = sorter.sort(extensions);
+		IExtension[] sortedExtension = new IExtension[sorted.length];
+		System.arraycopy(sorted, 0, sortedExtension, 0, sorted.length);
+		return sortedExtension;
+	}
+
+	/**
+	 * Implement this method to read element's attributes. If children should
+	 * also be read, then implementor is responsible for calling
+	 * <code>readElementChildren</code>. Implementor is also responsible
+	 * for logging missing attributes.
+	 * 
+	 * @return true if element was recognized, false if not.
+	 */
+	protected abstract boolean readElement(IConfigurationElement element);
+
+	/**
+	 * Read the element's children. This is called by the subclass'
+	 * readElement method when it wants to read the children of the element.
+	 */
+	protected void readElementChildren(IConfigurationElement element) {
+		readElements(element.getChildren());
+	}
+
+	/**
+	 * Read each element one at a time by calling the subclass implementation
+	 * of <code>readElement</code>.
+	 * 
+	 * Logs an error if the element was not recognized.
+	 */
+	protected void readElements(IConfigurationElement[] elements) {
+		for (int i = 0; i < elements.length; i++) {
+			if (!readElement(elements[i]))
+				logUnknownElement(elements[i]);
+		}
+	}
+
+	/**
+	 * Read one extension by looping through its configuration elements.
+	 */
+	protected void readExtension(IExtension extension) {
+		readElements(extension.getConfigurationElements());
+	}
+
+	/**
+	 * @deprecated use readRegistry(IExtensionRegistry registry, String pluginId, String extensionPoint)
+	 */
+	protected void readRegistry(IPluginRegistry registry, String pluginId, String extensionPoint) {
+		IExtensionPoint point = registry.getExtensionPoint(pluginId, extensionPoint);
+		if (point != null) {
+			IExtension[] extensions = point.getExtensions();
+			extensions = orderExtensions(extensions);
+			for (int i = 0; i < extensions.length; i++)
+				readExtension(extensions[i]);
+		}
+	}
+	
+	/**
+	 * Start the registry reading process using the supplied plugin ID and
+	 * extension point.
+	 */
+	protected void readRegistry(IExtensionRegistry registry, String pluginId, String extensionPoint) {
+		IExtensionPoint point = registry.getExtensionPoint(pluginId, extensionPoint);
+		if (point != null) {
+			IExtension[] extensions = point.getExtensions();
+			extensions = orderExtensions(extensions);
+			for (int i = 0; i < extensions.length; i++)
+				readExtension(extensions[i]);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLFormattingStrategy.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/format/StructuredFormattingStrategy.java
similarity index 61%
rename from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLFormattingStrategy.java
rename to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/format/StructuredFormattingStrategy.java
index 39432ef..40e5d7d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLFormattingStrategy.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/format/StructuredFormattingStrategy.java
@@ -1,46 +1,47 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
  *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal;
+package org.eclipse.wst.sse.ui.internal.format;
 
+import java.io.IOException;
 import java.util.LinkedList;
 
-import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.TypedPosition;
 import org.eclipse.jface.text.formatter.ContextBasedFormattingStrategy;
 import org.eclipse.jface.text.formatter.FormattingContextProperties;
 import org.eclipse.jface.text.formatter.IFormattingContext;
-import org.eclipse.jface.text.formatter.IFormattingStrategyExtension;
-import org.eclipse.text.edits.TextEdit;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
 import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter;
 
-public class XMLFormattingStrategy extends ContextBasedFormattingStrategy implements IFormattingStrategyExtension {
+
+public class StructuredFormattingStrategy extends ContextBasedFormattingStrategy {
 
 	/** Documents to be formatted by this strategy */
 	private final LinkedList fDocuments = new LinkedList();
+	private IStructuredFormatProcessor fFormatProcessor;
 	/** Partitions to be formatted by this strategy */
 	private final LinkedList fPartitions = new LinkedList();
 	private IRegion fRegion;
-	private DefaultXMLPartitionFormatter formatter = new DefaultXMLPartitionFormatter();
 
 	/**
 	 * @param formatProcessor
 	 */
-	public XMLFormattingStrategy() {
+	public StructuredFormattingStrategy(IStructuredFormatProcessor formatProcessor) {
 		super();
+
+		fFormatProcessor = formatProcessor;
 	}
 
 	/*
@@ -52,30 +53,15 @@
 		final IDocument document = (IDocument) fDocuments.removeFirst();
 		final TypedPosition partition = (TypedPosition) fPartitions.removeFirst();
 
-		if (document != null && partition != null && fRegion != null) {
+		if (document != null && partition != null && fRegion != null && fFormatProcessor != null) {
 			try {
-				if (document instanceof IStructuredDocument) {
-					IStructuredModel model = StructuredModelManager.getModelManager().getModelForEdit((IStructuredDocument) document);
-					if (model != null) {
-						try {
-							TextEdit edit = formatter.format(model, fRegion.getOffset(), fRegion.getLength());
-							if (edit != null) {
-								try {
-									model.aboutToChangeModel();
-									edit.apply(document);
-								}
-								finally {
-									model.changedModel();
-								}
-							}
-						}
-						finally {
-							model.releaseFromEdit();
-						}
-					}
-				}
+				fFormatProcessor.formatDocument(document, fRegion.getOffset(), fRegion.getLength());
 			}
-			catch (BadLocationException e) {
+			catch (IOException e) {
+				// log for now, unless we find reason not to
+				Logger.log(Logger.INFO, e.getMessage());
+			}
+			catch (CoreException e) {
 				// log for now, unless we find reason not to
 				Logger.log(Logger.INFO, e.getMessage());
 			}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/AbstractStructuredSelectHandler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/AbstractStructuredSelectHandler.java
new file mode 100644
index 0000000..4579700
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/AbstractStructuredSelectHandler.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory;
+
+abstract public class AbstractStructuredSelectHandler extends AbstractHandler {
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IEditorPart editor = HandlerUtil.getActiveEditor(event);
+		ITextEditor textEditor = null;
+		if (editor instanceof ITextEditor)
+			textEditor = (ITextEditor) editor;
+		else {
+			Object o = editor.getAdapter(ITextEditor.class);
+			if (o != null)
+				textEditor = (ITextEditor) o;
+		}
+		if (textEditor != null) {
+			ISelection selection = textEditor.getSelectionProvider().getSelection();
+			IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
+			// determine current text selection
+			if (selection instanceof ITextSelection && document != null) {
+				ITextSelection textSelection = (ITextSelection) selection;
+
+				if (textSelection.getLength() < document.getLength()) {
+					// get current indexed region
+					IndexedRegion cursorIndexedRegion = getCursorIndexedRegion(document, textSelection);
+
+					// determine new selection based on current indexed region
+					Region newSelectionRegion = getNewSelectionRegion(cursorIndexedRegion, textSelection);
+
+					// select new selection
+					if (newSelectionRegion != null) {
+						SelectionHistory history = (SelectionHistory) editor.getAdapter(SelectionHistory.class);
+						if (history != null) {
+							history.remember(new Region(textSelection.getOffset(), textSelection.getLength()));
+							try {
+								history.ignoreSelectionChanges();
+								textEditor.selectAndReveal(newSelectionRegion.getOffset(), newSelectionRegion.getLength());
+							}
+							finally {
+								history.listenToSelectionChanges();
+							}
+						}
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * This method will probably be removed and replaced by using new
+	 * selection provider
+	 * 
+	 * @param document
+	 * @param offset
+	 * @return
+	 */
+	protected IndexedRegion getIndexedRegion(IDocument document, int offset) {
+		IndexedRegion indexedRegion = null;
+
+		int lastOffset = offset;
+		IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
+		if (model != null) {
+			try {
+				indexedRegion = model.getIndexedRegion(lastOffset);
+				while (indexedRegion == null && lastOffset >= 0) {
+					lastOffset--;
+					indexedRegion = model.getIndexedRegion(lastOffset);
+				}
+			}
+			finally {
+				model.releaseFromRead();
+			}
+		}
+
+		return indexedRegion;
+	}
+
+	abstract protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection);
+
+	abstract protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection);
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/XMLFindOccurencesHandler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FindOccurrencesHandler.java
similarity index 67%
rename from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/XMLFindOccurencesHandler.java
rename to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FindOccurrencesHandler.java
index 56c28bd..e8a5add 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/XMLFindOccurencesHandler.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FindOccurrencesHandler.java
@@ -1,25 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
+ * Copyright (c) 2008, 2010 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:
- *     David Carver - initial API and implementation - bug 212330 -
- *                    Based off CleanupActionXMLDelegate
+ *     IBM Corporation - initial API and implementation
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.handlers;
 
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
@@ -30,30 +26,25 @@
 import org.eclipse.ui.IFileEditorInput;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
 import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
 import org.eclipse.wst.sse.ui.internal.search.FindOccurrencesProcessor;
 import org.eclipse.wst.sse.ui.internal.util.PlatformStatusLineUtil;
-import org.eclipse.wst.xml.ui.internal.search.XMLFindOccurrencesProcessor;
 
-public class XMLFindOccurencesHandler extends AbstractHandler implements IHandler {
-	private List fProcessors;
-
-	public void dispose() {
-	}
-
+public abstract class FindOccurrencesHandler extends AbstractHandler {
+	
 	public Object execute(ExecutionEvent event) throws ExecutionException {
-		IEditorPart editor = HandlerUtil.getActiveEditor(event);
+		IEditorPart editorPart = HandlerUtil.getActiveEditor(event);
 		ITextEditor textEditor = null;
-		boolean okay = false;
-
-		if (editor instanceof ITextEditor)
-			textEditor = (ITextEditor) editor;
+		if (editorPart instanceof ITextEditor)
+			textEditor = (ITextEditor) editorPart;
 		else {
-			Object o = editor.getAdapter(ITextEditor.class);
+			Object o = editorPart.getAdapter(ITextEditor.class);
 			if (o != null)
 				textEditor = (ITextEditor) o;
 		}
-
+		boolean okay = false;
 		if (textEditor != null) {
 			IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
 			if (document != null) {
@@ -73,20 +64,25 @@
 		}
 		else {
 			String errorMessage = SSEUIMessages.FindOccurrencesActionProvider_0; //$NON-NLS-1$
-			PlatformStatusLineUtil.displayErrorMessage(errorMessage);
-			PlatformStatusLineUtil.addOneTimeClearListener();
-		}
+			if (textEditor instanceof StructuredTextEditor) {
+				PlatformStatusLineUtil.displayTemporaryErrorMessage(((StructuredTextEditor) textEditor).getTextViewer(), errorMessage);
 
+			}
+			else {
+				PlatformStatusLineUtil.displayErrorMessage(errorMessage);
+				PlatformStatusLineUtil.addOneTimeClearListener();
+			}
+		}
 		return null;
 	}
-
+	
 	/**
 	 * Get the appropriate find occurrences processor
 	 * 
 	 * @param document -
 	 *            assumes not null
 	 * @param textSelection
-	 * @return FindOccurrencesProcessor
+	 * @return
 	 */
 	private FindOccurrencesProcessor getProcessorForCurrentSelection(IDocument document, ITextSelection textSelection) {
 		// check if we have an action that's enabled on the current partition
@@ -94,12 +90,26 @@
 		String partition = tr != null ? tr.getType() : ""; //$NON-NLS-1$
 
 		Iterator it = getProcessors().iterator();
-		FindOccurrencesProcessor action = null;
+		FindOccurrencesProcessor processor = null;
 		while (it.hasNext()) {
-			action = (FindOccurrencesProcessor) it.next();
+			processor = (FindOccurrencesProcessor) it.next();
 			// we just choose the first action that can handle the partition
-			if (action.enabledForParitition(partition))
-				return action;
+			if (processor.enabledForParitition(partition))
+				return processor;
+		}
+
+		List extendedFindOccurrencesProcessors = ExtendedConfigurationBuilder.getInstance().getConfigurations(FindOccurrencesProcessor.class.getName(), partition);
+		for (int i = 0; i < extendedFindOccurrencesProcessors.size(); i++) {
+			Object o = extendedFindOccurrencesProcessors.get(i);
+			if (o instanceof FindOccurrencesProcessor) {
+				/*
+				 * We just choose the first registered processor that
+				 * explicitly says it can handle the partition
+				 */
+				processor = (FindOccurrencesProcessor) o;
+				if (processor.enabledForParitition(partition))
+					return processor;
+			}
 		}
 		return null;
 	}
@@ -125,13 +135,6 @@
 		}
 		return textSelection;
 	}
-
-	protected List getProcessors() {
-		if (fProcessors == null) {
-			fProcessors = new ArrayList();
-			XMLFindOccurrencesProcessor htmlProcessor = new XMLFindOccurrencesProcessor();
-			fProcessors.add(htmlProcessor);
-		}
-		return fProcessors;
-	}
+	
+	abstract protected List getProcessors();
 }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FormatHandler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FormatHandler.java
new file mode 100644
index 0000000..6b1b815
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FormatHandler.java
@@ -0,0 +1,326 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
+ *     David Carver - initial API and implementation - bug 212330 -
+ *                    Based off FormatActionDelegate.java
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.handlers;
+
+import java.io.IOException;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.filebuffers.ITextFileBuffer;
+import org.eclipse.core.filebuffers.ITextFileBufferManager;
+import org.eclipse.core.filebuffers.LocationKind;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
+import org.eclipse.wst.sse.core.internal.exceptions.MalformedInputExceptionWithDetail;
+import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
+import org.eclipse.wst.sse.ui.internal.FormatProcessorsExtensionReader;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+public class FormatHandler extends AbstractHandler implements IHandler {
+
+	protected IStructuredSelection fSelection;
+	
+	public void dispose() {
+		// nulling out just in case
+	}
+	
+	private IWorkbenchSiteProgressService getActiveProgressService() {
+		IWorkbenchSiteProgressService service = null;
+		if (PlatformUI.isWorkbenchRunning()) {
+			IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+			if (activeWorkbenchWindow != null) {
+				IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
+				if (activePage != null) {
+					IWorkbenchPart activePart = activePage.getActivePart();
+					if (activePart != null) {
+						service = (IWorkbenchSiteProgressService) activePart.getSite().getAdapter(IWorkbenchSiteProgressService.class);
+					}
+				}
+			}
+		}
+		return service;
+	}
+	
+	
+	
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+	    ISelection selection = HandlerUtil.getActiveWorkbenchWindow(event).getSelectionService().getSelection();
+		
+		if (selection instanceof IStructuredSelection) {
+			fSelection = (IStructuredSelection) selection;
+			boolean available = false;
+
+			Object[] elements = fSelection.toArray();
+			for (int i = 0; i < elements.length; i++) {
+				if (elements[i] instanceof IResource) {
+					available = processorAvailable((IResource) elements[i]);
+
+					if (available)
+						break;
+				}
+			}
+		}
+		
+		if (fSelection != null && !fSelection.isEmpty()) {
+			Job job = getJob();
+			if (job != null) {
+				IWorkbenchSiteProgressService progressService = getActiveProgressService();
+				if (progressService != null) {
+					progressService.schedule(job);
+				}
+				else {
+					job.schedule();
+				}
+			}
+		}
+	
+		return null;
+	}
+	
+	
+	class FormatJob extends Job {
+
+		public FormatJob(String name) {
+			super(name);
+		}
+
+		protected IStatus run(IProgressMonitor monitor) {
+			IStatus status = Status.OK_STATUS;
+
+			Object[] elements = fSelection.toArray();
+			monitor.beginTask("", elements.length); //$NON-NLS-1$
+			for (int i = 0; i < elements.length; i++) {
+				if (elements[i] instanceof IResource) {
+					process(new SubProgressMonitor(monitor, 1), (IResource) elements[i]);
+				}
+				else {
+					monitor.worked(1);
+				}
+			}
+			monitor.done();
+
+			if (fErrorStatus.getChildren().length > 0) {
+				status = fErrorStatus;
+				fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIMessages.FormatActionDelegate_errorStatusMessage, null); //$NON-NLS-1$
+			}
+
+			return status;
+		}
+
+	}
+
+	private MultiStatus fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIMessages.FormatActionDelegate_errorStatusMessage, null); //$NON-NLS-1$
+
+	protected void format(IProgressMonitor monitor, IFile file) {
+		if(monitor == null || monitor.isCanceled())
+			return;
+		
+		try {
+			monitor.beginTask("", 100);
+			IContentDescription contentDescription = file.getContentDescription();
+			monitor.worked(5);
+			if (contentDescription != null) {
+				IContentType contentType = contentDescription.getContentType();
+				IStructuredFormatProcessor formatProcessor = getFormatProcessor(contentType.getId());
+				if (formatProcessor != null && (monitor == null || !monitor.isCanceled())) {
+					String message = NLS.bind(SSEUIMessages.FormatActionDelegate_3, new String[]{file.getFullPath().toString().substring(1)});					monitor.subTask(message);
+					formatProcessor.setProgressMonitor(new SubProgressMonitor(monitor, 95));
+					formatProcessor.formatFile(file);
+				}
+			}
+			monitor.done();
+		} catch (MalformedInputExceptionWithDetail e) {
+			String message = NLS.bind(SSEUIMessages.FormatActionDelegate_5, new String[]{file.getFullPath().toString()});
+			fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+		} catch (IOException e) {
+			String message = NLS.bind(SSEUIMessages.FormatActionDelegate_4, new String[]{file.getFullPath().toString()});
+			fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+		} catch (CoreException e) {
+			String message = NLS.bind(SSEUIMessages.FormatActionDelegate_4, new String[]{file.getFullPath().toString()});
+			fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+		}
+	}
+
+	protected void format(final IProgressMonitor monitor, IResource resource) {
+		if (resource instanceof IFile) {
+			final IFile file = (IFile) resource;
+
+			// BUG 178598 - If the resource is shared, and it's possible to
+			// get the workbench Display, the UI thread is asked to execute the
+			// format of the file when it can
+			monitor.beginTask("", 20); //$NON-NLS-1$
+			try {
+				ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager();
+				ITextFileBuffer buffer = null;
+				
+				try {
+					if(manager != null) {
+						manager.connect(file.getFullPath(), LocationKind.IFILE, new SubProgressMonitor(monitor, 1));
+						buffer = manager.getTextFileBuffer(resource.getFullPath(), LocationKind.IFILE);
+					}
+					
+					if(buffer != null && buffer.isShared()) {
+						Display display = getDisplay();
+						if (display != null) {
+							display.syncExec(new Runnable() {
+								public void run() {
+									format(new SubProgressMonitor(monitor, 18), file);
+								}
+							});
+						}
+					}
+					else
+						format(new SubProgressMonitor(monitor, 18), file);
+				}
+				finally {
+					if(manager != null)
+						manager.disconnect(file.getFullPath(), LocationKind.IFILE, new SubProgressMonitor(monitor, 1));
+				}
+				monitor.done();
+			}
+			catch(CoreException e) {
+				String message = NLS.bind(SSEUIMessages.FormatActionDelegate_4, new String[]{file.getFullPath().toString()});
+				fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+			}
+			finally {
+				if(monitor != null)
+					monitor.done();
+			}
+			
+			
+		} else if (resource instanceof IContainer) {
+			IContainer container = (IContainer) resource;
+
+			try {
+				IResource[] members = container.members();
+				monitor.beginTask("", members.length); //$NON-NLS-1$
+				for (int i = 0; i < members.length; i++) {
+					if (monitor != null && !monitor.isCanceled())
+						format(new SubProgressMonitor(monitor, 1), members[i]);
+				}
+				monitor.done();
+			} catch (CoreException e) {
+				String message = NLS.bind(SSEUIMessages.FormatActionDelegate_4, new String[]{resource.getFullPath().toString()});
+				fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+			}
+		}
+	}
+	
+	private Display getDisplay() {
+
+		// Note: the workbench should always have a display
+		// (unless running headless), whereas Display.getCurrent()
+		// only returns the display if the currently executing thread
+		// has one.
+		if (PlatformUI.isWorkbenchRunning())
+			return PlatformUI.getWorkbench().getDisplay();
+		else
+			return null;
+	}
+
+	protected IStructuredFormatProcessor getFormatProcessor(String contentTypeId) {
+		return FormatProcessorsExtensionReader.getInstance().getFormatProcessor(contentTypeId);
+	}
+
+	protected Job getJob() {
+		return new FormatJob(SSEUIMessages.FormatActionDelegate_jobName); //$NON-NLS-1$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.edit.util.ResourceActionDelegate#process(org.eclipse.core.runtime.IProgressMonitor,
+	 *      org.eclipse.core.resources.IResource)
+	 */
+	protected void process(IProgressMonitor monitor, IResource resource) {
+		monitor.beginTask("", 100);
+		format(new SubProgressMonitor(monitor, 98), resource);
+
+		try {
+			resource.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, 2));
+		} catch (CoreException e) {
+			String message = NLS.bind(SSEUIMessages.FormatActionDelegate_4, new String[]{resource.getFullPath().toString()});
+			fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
+		}
+		monitor.done();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.sse.ui.internal.actions.ResourceActionDelegate#processorAvailable(org.eclipse.core.resources.IResource)
+	 */
+	protected boolean processorAvailable(IResource resource) {
+		boolean result = false;
+		if (resource.isAccessible()) {
+			try {
+				if (resource instanceof IFile) {
+					IFile file = (IFile) resource;
+
+					IStructuredFormatProcessor formatProcessor = null;
+					IContentDescription contentDescription = file.getContentDescription();
+					if (contentDescription != null) {
+						IContentType contentType = contentDescription.getContentType();
+						formatProcessor = getFormatProcessor(contentType.getId());
+					}
+					if (formatProcessor != null)
+						result = true;
+				}
+				else if (resource instanceof IContainer) {
+					IContainer container = (IContainer) resource;
+					IResource[] members;
+					members = container.members();
+					for (int i = 0; i < members.length; i++) {
+						boolean available = processorAvailable(members[i]);
+
+						if (available) {
+							result = true;
+							break;
+						}
+					}
+				}
+			}
+			catch (CoreException e) {
+				Logger.logException(e);
+			}
+		}
+
+		return result;
+	}
+	
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/StructuredSelectHistoryHandler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/StructuredSelectHistoryHandler.java
new file mode 100644
index 0000000..13c5528
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/StructuredSelectHistoryHandler.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory;
+
+public class StructuredSelectHistoryHandler extends AbstractHandler {
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IEditorPart editor = HandlerUtil.getActiveEditor(event);
+		SelectionHistory history = (SelectionHistory) editor.getAdapter(SelectionHistory.class);
+		if (history != null) {
+			IRegion old = history.getLast();
+			if (old != null) {
+				try {
+					history.ignoreSelectionChanges();
+
+					ITextEditor textEditor = null;
+					if (editor instanceof ITextEditor)
+						textEditor = (ITextEditor) editor;
+					else {
+						Object o = editor.getAdapter(ITextEditor.class);
+						if (o != null)
+							textEditor = (ITextEditor) o;
+					}
+					if (textEditor != null)
+						textEditor.selectAndReveal(old.getOffset(), old.getLength());
+				}
+				finally {
+					history.listenToSelectionChanges();
+				}
+			}
+		}
+		return null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/hyperlink/HighlighterHyperlinkPresenter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/hyperlink/HighlighterHyperlinkPresenter.java
new file mode 100644
index 0000000..5085fa4
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/hyperlink/HighlighterHyperlinkPresenter.java
@@ -0,0 +1,468 @@
+package org.eclipse.wst.sse.ui.internal.hyperlink;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.Assert;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextInputListener;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension2;
+import org.eclipse.jface.text.ITextViewerExtension5;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.hyperlink.IHyperlinkPresenter;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * The is almost an exact copy of DefaultHyperlinkPresenter. However this
+ * hyperlink presenter works with the StructuredTextEditor's Highlighter
+ * instead of TextPresentation.
+ * 
+ * The main difference is <code>text.redrawRange(offset, length, true);</code>
+ * is called instead of passing false for clearBackground. Also all mention of
+ * TextPresentation was removed since it does not really apply.
+ * 
+ * @see org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter
+ */
+public class HighlighterHyperlinkPresenter implements IHyperlinkPresenter, PaintListener, ITextInputListener, IDocumentListener, IPropertyChangeListener {
+
+	/**
+	 * A named preference that holds the color used for hyperlinks.
+	 * <p>
+	 * Value is of type <code>String</code>. A RGB color value encoded as a
+	 * string using class <code>PreferenceConverter</code>
+	 * </p>
+	 * 
+	 * @see org.eclipse.jface.resource.StringConverter
+	 * @see org.eclipse.jface.preference.PreferenceConverter
+	 */
+	public final static String HYPERLINK_COLOR = "hyperlinkColor"; //$NON-NLS-1$
+
+
+	/** The text viewer. */
+	private ITextViewer fTextViewer;
+	/** The hand cursor. */
+	private Cursor fCursor;
+	/** The link color. */
+	private Color fColor;
+	/** Tells whether to dispose the color on uninstall. */
+	private boolean fDisposeColor;
+	/** The currently active region. */
+	private IRegion fActiveRegion;
+	/** The currently active style range as position. */
+	private Position fRememberedPosition;
+	/** The optional preference store */
+	private IPreferenceStore fPreferenceStore;
+
+
+	/**
+	 * Creates a new default hyperlink presenter which uses
+	 * {@link #HYPERLINK_COLOR}to read the color from the given preference
+	 * store.
+	 * 
+	 * @param store
+	 *            the preference store
+	 */
+	public HighlighterHyperlinkPresenter(IPreferenceStore store) {
+		fPreferenceStore = store;
+		fDisposeColor = true;
+	}
+
+	/**
+	 * Creates a new default hyperlink presenter.
+	 * 
+	 * @param color
+	 *            the hyperlink color, to be disposed by the caller
+	 */
+	public HighlighterHyperlinkPresenter(Color color) {
+		fDisposeColor = false;
+		fColor = color;
+	}
+
+	public boolean canShowMultipleHyperlinks() {
+		return false;
+	}
+
+	public void showHyperlinks(IHyperlink[] hyperlinks) {
+		Assert.isLegal(hyperlinks != null && hyperlinks.length == 1);
+		highlightRegion(hyperlinks[0].getHyperlinkRegion());
+		activateCursor();
+	}
+
+	public void hideHyperlinks() {
+		repairRepresentation();
+		fRememberedPosition = null;
+	}
+
+	public void install(ITextViewer textViewer) {
+		Assert.isNotNull(textViewer);
+		fTextViewer = textViewer;
+		fTextViewer.addTextInputListener(this);
+
+		StyledText text = fTextViewer.getTextWidget();
+		if (text != null && !text.isDisposed()) {
+			text.addPaintListener(this);
+			if (fPreferenceStore != null)
+				fColor = createColor(fPreferenceStore, HYPERLINK_COLOR, text.getDisplay());
+		}
+
+		if (fPreferenceStore != null)
+			fPreferenceStore.addPropertyChangeListener(this);
+	}
+
+	public void uninstall() {
+		fTextViewer.removeTextInputListener(this);
+
+		if (fColor != null) {
+			if (fDisposeColor)
+				fColor.dispose();
+			fColor = null;
+		}
+
+		if (fCursor != null) {
+			fCursor.dispose();
+			fCursor = null;
+		}
+
+		StyledText text = fTextViewer.getTextWidget();
+		if (text != null && !text.isDisposed())
+			text.removePaintListener(this);
+
+		fTextViewer = null;
+
+		if (fPreferenceStore != null)
+			fPreferenceStore.removePropertyChangeListener(this);
+	}
+
+	public void setColor(Color color) {
+		Assert.isNotNull(fTextViewer);
+		fColor = color;
+	}
+
+	private void highlightRegion(IRegion region) {
+
+		if (region.equals(fActiveRegion))
+			return;
+
+		repairRepresentation();
+
+		StyledText text = fTextViewer.getTextWidget();
+		if (text == null || text.isDisposed())
+			return;
+
+
+		// Underline
+		int offset = 0;
+		int length = 0;
+		if (fTextViewer instanceof ITextViewerExtension5) {
+			ITextViewerExtension5 extension = (ITextViewerExtension5) fTextViewer;
+			IRegion widgetRange = extension.modelRange2WidgetRange(region);
+			if (widgetRange == null)
+				return;
+
+			offset = widgetRange.getOffset();
+			length = widgetRange.getLength();
+
+		}
+		else {
+			offset = region.getOffset() - fTextViewer.getVisibleRegion().getOffset();
+			length = region.getLength();
+		}
+
+		// needs to clean background due to StructuredTextEditor's highlighter
+		text.redrawRange(offset, length, true);
+
+		// Invalidate region ==> apply text presentation
+		fActiveRegion = region;
+
+		if (fTextViewer instanceof ITextViewerExtension2)
+			((ITextViewerExtension2) fTextViewer).invalidateTextPresentation(region.getOffset(), region.getLength());
+		else
+			fTextViewer.invalidateTextPresentation();
+	}
+
+	private void activateCursor() {
+		StyledText text = fTextViewer.getTextWidget();
+		if (text == null || text.isDisposed())
+			return;
+		Display display = text.getDisplay();
+		if (fCursor == null)
+			fCursor = new Cursor(display, SWT.CURSOR_HAND);
+		text.setCursor(fCursor);
+	}
+
+	private void resetCursor() {
+		StyledText text = fTextViewer.getTextWidget();
+		if (text != null && !text.isDisposed())
+			text.setCursor(null);
+
+		if (fCursor != null) {
+			fCursor.dispose();
+			fCursor = null;
+		}
+	}
+
+	private void repairRepresentation() {
+
+		if (fActiveRegion == null)
+			return;
+
+		int offset = fActiveRegion.getOffset();
+		int length = fActiveRegion.getLength();
+		fActiveRegion = null;
+
+		resetCursor();
+
+		// Invalidate ==> remove applied text presentation
+		if (fTextViewer instanceof ITextViewerExtension2)
+			((ITextViewerExtension2) fTextViewer).invalidateTextPresentation(offset, length);
+		else
+			fTextViewer.invalidateTextPresentation();
+
+		// Remove underline
+		if (fTextViewer instanceof ITextViewerExtension5) {
+			ITextViewerExtension5 extension = (ITextViewerExtension5) fTextViewer;
+			offset = extension.modelOffset2WidgetOffset(offset);
+		}
+		else {
+			offset -= fTextViewer.getVisibleRegion().getOffset();
+		}
+		try {
+			StyledText text = fTextViewer.getTextWidget();
+
+			// needs to clean background due to StructuredTextEditor's
+			// highlighter
+			text.redrawRange(offset, length, true);
+
+		}
+		catch (IllegalArgumentException x) {
+			// ignore - do not log
+		}
+	}
+
+	/*
+	 * @see PaintListener#paintControl(PaintEvent)
+	 */
+	public void paintControl(PaintEvent event) {
+		if (fActiveRegion == null)
+			return;
+
+		StyledText text = fTextViewer.getTextWidget();
+		if (text == null || text.isDisposed())
+			return;
+
+		int offset = 0;
+		int length = 0;
+
+		if (fTextViewer instanceof ITextViewerExtension5) {
+
+			ITextViewerExtension5 extension = (ITextViewerExtension5) fTextViewer;
+			IRegion widgetRange = extension.modelRange2WidgetRange(fActiveRegion);
+			if (widgetRange == null)
+				return;
+
+			offset = widgetRange.getOffset();
+			length = widgetRange.getLength();
+
+		}
+		else {
+
+			IRegion region = fTextViewer.getVisibleRegion();
+			if (!includes(region, fActiveRegion))
+				return;
+
+			offset = fActiveRegion.getOffset() - region.getOffset();
+			length = fActiveRegion.getLength();
+		}
+
+		// support for BIDI
+		Point minLocation = getMinimumLocation(text, offset, length);
+		Point maxLocation = getMaximumLocation(text, offset, length);
+
+		int x1 = minLocation.x;
+		int x2 = maxLocation.x - 1;
+		int y = minLocation.y + text.getLineHeight() - 1;
+
+		GC gc = event.gc;
+		if (fColor != null && !fColor.isDisposed())
+			gc.setForeground(fColor);
+		else if (fColor == null && !(offset < 0 && offset >= text.getCharCount())) {
+			StyleRange style = text.getStyleRangeAtOffset(offset);
+			if (style != null)
+				gc.setForeground(style.foreground);
+		}
+		gc.drawLine(x1, y, x2, y);
+	}
+
+	private Point getMinimumLocation(StyledText text, int offset, int length) {
+		int max = text.getCharCount();
+		Rectangle bounds = text.getBounds();
+		Point minLocation = new Point(bounds.width, bounds.height);
+		for (int i = 0; i <= length; i++) {
+			int k = offset + i;
+			if (k < 0 || k > max)
+				break;
+
+			Point location = text.getLocationAtOffset(k);
+			if (location.x < minLocation.x)
+				minLocation.x = location.x;
+			if (location.y < minLocation.y)
+				minLocation.y = location.y;
+		}
+
+		return minLocation;
+	}
+
+	private Point getMaximumLocation(StyledText text, int offset, int length) {
+		Point maxLocation = new Point(0, 0);
+
+		for (int i = 0; i <= length; i++) {
+			int k = offset + i;
+			if (k < 0 || k > text.getCharCount())
+				break;
+
+			Point location = text.getLocationAtOffset(k);
+			if (location.x > maxLocation.x)
+				maxLocation.x = location.x;
+			if (location.y > maxLocation.y)
+				maxLocation.y = location.y;
+		}
+
+		return maxLocation;
+	}
+
+	private boolean includes(IRegion region, IRegion position) {
+		return position.getOffset() >= region.getOffset() && position.getOffset() + position.getLength() <= region.getOffset() + region.getLength();
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
+	 */
+	public void documentAboutToBeChanged(DocumentEvent event) {
+		if (fActiveRegion != null) {
+			fRememberedPosition = new Position(fActiveRegion.getOffset(), fActiveRegion.getLength());
+			try {
+				event.getDocument().addPosition(fRememberedPosition);
+			}
+			catch (BadLocationException x) {
+				fRememberedPosition = null;
+			}
+		}
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
+	 */
+	public void documentChanged(DocumentEvent event) {
+		if (fRememberedPosition != null) {
+			if (!fRememberedPosition.isDeleted()) {
+
+				event.getDocument().removePosition(fRememberedPosition);
+				fActiveRegion = new Region(fRememberedPosition.getOffset(), fRememberedPosition.getLength());
+				fRememberedPosition = null;
+
+				StyledText widget = fTextViewer.getTextWidget();
+				if (widget != null && !widget.isDisposed()) {
+					widget.getDisplay().asyncExec(new Runnable() {
+						public void run() {
+							hideHyperlinks();
+						}
+					});
+				}
+
+			}
+			else {
+				fActiveRegion = null;
+				fRememberedPosition = null;
+				hideHyperlinks();
+			}
+		}
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.ITextInputListener#inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument,
+	 *      org.eclipse.jface.text.IDocument)
+	 */
+	public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
+		if (oldInput == null)
+			return;
+		hideHyperlinks();
+		oldInput.removeDocumentListener(this);
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.ITextInputListener#inputDocumentChanged(org.eclipse.jface.text.IDocument,
+	 *      org.eclipse.jface.text.IDocument)
+	 */
+	public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
+		if (newInput == null)
+			return;
+		newInput.addDocumentListener(this);
+	}
+
+	/**
+	 * Creates a color from the information stored in the given preference
+	 * store.
+	 * 
+	 * @param store
+	 *            the preference store
+	 * @param key
+	 *            the key
+	 * @param display
+	 *            the display
+	 * @return the color or <code>null</code> if there is no such
+	 *         information available
+	 */
+	private Color createColor(IPreferenceStore store, String key, Display display) {
+
+		RGB rgb = null;
+
+		if (store.contains(key)) {
+
+			if (store.isDefault(key))
+				rgb = PreferenceConverter.getDefaultColor(store, key);
+			else
+				rgb = PreferenceConverter.getColor(store, key);
+
+			if (rgb != null)
+				return new Color(display, rgb);
+		}
+
+		return null;
+	}
+
+	/*
+	 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+	 */
+	public void propertyChange(PropertyChangeEvent event) {
+		if (!HYPERLINK_COLOR.equals(event.getProperty()))
+			return;
+
+		if (fDisposeColor && fColor != null && !fColor.isDisposed())
+			fColor.dispose();
+		fColor = null;
+
+		StyledText textWidget = fTextViewer.getTextWidget();
+		if (textWidget != null && !textWidget.isDisposed())
+			fColor = createColor(fPreferenceStore, HYPERLINK_COLOR, textWidget.getDisplay());
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/hyperlink/OpenHyperlinkAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/hyperlink/OpenHyperlinkAction.java
new file mode 100644
index 0000000..35a6e55
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/hyperlink/OpenHyperlinkAction.java
@@ -0,0 +1,81 @@
+package org.eclipse.wst.sse.ui.internal.hyperlink;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.TextEditorAction;
+
+/**
+ * Open hyperlink action
+ */
+public class OpenHyperlinkAction extends TextEditorAction {
+	private IHyperlinkDetector[] fHyperlinkDetectors;
+	private ITextViewer fTextViewer;
+
+	public OpenHyperlinkAction(ResourceBundle bundle, String prefix, ITextEditor editor, ITextViewer viewer) {
+		super(bundle, prefix, editor);
+		fTextViewer = viewer;
+	}
+
+	public void setHyperlinkDetectors(IHyperlinkDetector[] detectors) {
+		fHyperlinkDetectors = detectors;
+	}
+
+	public void run() {
+		if (fHyperlinkDetectors == null)
+			return;
+		ISelection selection = getTextEditor().getSelectionProvider().getSelection();
+		if (selection == null || !(selection instanceof ITextSelection)) {
+			return;
+		}
+
+		ITextSelection textSelection = (ITextSelection) selection;
+		final IRegion region = new Region(textSelection.getOffset(), textSelection.getLength());
+		IHyperlink hyperlink = null;
+
+		synchronized (fHyperlinkDetectors) {
+			for (int i = 0, length = fHyperlinkDetectors.length; i < length && hyperlink == null; i++) {
+				final IHyperlinkDetector detector = fHyperlinkDetectors[i];
+				if (detector == null)
+					continue;
+
+				/* The array is final, but its contents aren't */
+				final IHyperlink[][] hyperlinks = new IHyperlink[1][];
+
+				/*
+				 * Detect from within a SafeRunnable since the list of
+				 * detectors is extensible
+				 */
+				SafeRunnable detectorRunnable = new SafeRunnable() {
+					public void run() throws Exception {
+						hyperlinks[0] = detector.detectHyperlinks(fTextViewer, region, false);
+					}
+				};
+				SafeRunner.run(detectorRunnable);
+
+				if (hyperlinks[0] == null)
+					continue;
+
+				if (hyperlinks.length > 0)
+					hyperlink = hyperlinks[0][0];
+			}
+		}
+		if (hyperlink != null) {
+			/**
+			 * Force the highlight range to change when the hyperlink is
+			 * opened by altering the highlighted range beforehand.
+			 */
+			getTextEditor().setHighlightRange(Math.max(0, region.getOffset() - 1), 0, false);
+			hyperlink.open();
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/AbstractOpenOn.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/AbstractOpenOn.java
new file mode 100644
index 0000000..72fb2a6
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/AbstractOpenOn.java
@@ -0,0 +1,271 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.openon;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.swt.program.Program;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.util.URIResolver;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.util.PlatformStatusLineUtil;
+
+
+/**
+ * This action class retrieves the link/file selected by the cursor and
+ * attempts to open the link/file in the default editor or web browser
+ * 
+ * @deprecated Use base support for hyperlink navigation
+ */
+abstract public class AbstractOpenOn implements IOpenOn {
+	protected final String CANNOT_OPEN = SSEUIMessages.AbstractOpenOn_0; //$NON-NLS-1$
+	// document currently associated with open
+	private IDocument fDocument;
+	protected final String FILE_PROTOCOL = "file:/";//$NON-NLS-1$
+	private final String HTTP_PROTOCOL = "http://";//$NON-NLS-1$
+
+	abstract protected IRegion doGetOpenOnRegion(int offset);
+
+	abstract protected void doOpenOn(IRegion region);
+
+	/**
+	 * Returns the current document associated with open on
+	 * 
+	 * @return IDocument
+	 */
+	public IDocument getDocument() {
+		return fDocument;
+	}
+
+	/**
+	 * Determines the editor associated with the given file name
+	 * 
+	 * @param filename
+	 * @return editor id of the editor associated with the given file name
+	 */
+	private String getEditorId(String filename) {
+		IWorkbench workbench = PlatformUI.getWorkbench();
+		IEditorRegistry editorRegistry = workbench.getEditorRegistry();
+		IEditorDescriptor descriptor = editorRegistry.getDefaultEditor(filename);
+		if (descriptor != null)
+			return descriptor.getId();
+		return EditorsUI.DEFAULT_TEXT_EDITOR_ID;
+	}
+
+	/**
+	 * Returns an IFile from the given uri if possible, null if cannot find
+	 * file from uri.
+	 * 
+	 * @param fileString
+	 *            file system path
+	 * @return returns IFile if fileString exists in the workspace
+	 */
+	protected IFile getFile(String fileString) {
+		IStructuredModel model = null;
+		IFile file = null;
+		try {
+			model = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
+			if (model != null) {
+				// use the base location to obtain the in-workspace IFile
+				IFile modelFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(model.getBaseLocation()));
+				if (modelFile != null) {
+					// find the referenced file's location on disk
+					URIResolver resolver = model.getResolver();
+					if (resolver != null) {
+						String filesystemLocation = resolver.getLocationByURI(fileString);
+						if (filesystemLocation != null) {
+							IFile[] workspaceFiles = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(filesystemLocation));
+							// favor a workspace file in the same project
+							for (int i = 0; i < workspaceFiles.length && file == null; i++) {
+								if (workspaceFiles[i].getProject().equals(modelFile.getProject())) {
+									file = workspaceFiles[i];
+								}
+							}
+							// if none were in the same project, just pick one
+							if (file == null && workspaceFiles.length > 0) {
+								file = workspaceFiles[0];
+							}
+						}
+					}
+				}
+			}
+		}
+		catch (Exception e) {
+			Logger.log(Logger.WARNING, e.getMessage());
+		}
+		finally {
+			if (model != null) {
+				model.releaseFromRead();
+			}
+		}
+		if (file == null && fileString.startsWith("/")) { //$NON-NLS-1$
+			file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileString));
+		}
+		return file;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.IOpenOn#getOpenOnRegion(org.eclipse.jface.text.IDocument,
+	 *      int)
+	 */
+	public IRegion getOpenOnRegion(IDocument doc, int offset) {
+		IRegion region;
+		// set the document for this action
+		setDocument(doc);
+		region = doGetOpenOnRegion(offset);
+		// reset the document back to null for this action
+		setDocument(null);
+		return region;
+	}
+
+	/**
+	 * Try to open the external file, fileString in its default editor
+	 * 
+	 * @param fileString
+	 * @return IEditorPart editor opened or null if editor could not be opened
+	 */
+	protected IEditorPart openExternalFile(String fileString) {
+		// file does not exist in workspace so try to open using system editor
+		File file = new File(fileString);
+		// try to open existing external file if it exists
+		if (file.exists()) {
+			IEditorInput input = new ExternalFileEditorInput(file);
+			String editorId = getEditorId(fileString);
+
+			try {
+				IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+				return page.openEditor(input, editorId, true);
+			}
+			catch (PartInitException pie) {
+				Logger.log(Logger.WARNING_DEBUG, pie.getMessage(), pie);
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Notifies user that open on selection action could not successfully open
+	 * the selection (writes message on status bar and beeps)
+	 */
+	protected void openFileFailed() {
+		PlatformStatusLineUtil.displayErrorMessage(CANNOT_OPEN);
+		PlatformStatusLineUtil.addOneTimeClearListener();
+	}
+
+	/**
+	 * Opens the IFile, input in its default editor, if possible, and returns
+	 * the editor opened. Possible reasons for failure: input cannot be found,
+	 * input does not exist in workbench, editor cannot be opened.
+	 * 
+	 * @return IEditorPart editor opened or null if input == null or does not
+	 *         exist, external editor was opened, editor could not be opened
+	 */
+	protected IEditorPart openFileInEditor(IFile input) {
+		if (input != null && input.exists()) {
+			try {
+				IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+				return IDE.openEditor(page, input, true);
+			}
+			catch (PartInitException pie) {
+				Logger.log(Logger.WARNING_DEBUG, pie.getMessage(), pie);
+			}
+		}
+		return null;
+	}
+
+	// on
+
+	/**
+	 * Opens the appropriate editor for fileString
+	 * 
+	 * @param fileString
+	 */
+	protected void openFileInEditor(String fileString) {
+		IEditorPart editor = null;
+		if (fileString != null) {
+			// open web browser if this is a web address
+			String temp = fileString.toLowerCase();
+			if (temp.startsWith(HTTP_PROTOCOL)) {
+				Program.launch(fileString); // launches web browser/executable
+				// associated with uri
+				return;
+			}
+			// chop off the file protocol
+			if (temp.startsWith(FILE_PROTOCOL)) {
+				fileString = fileString.substring(FILE_PROTOCOL.length());
+			}
+
+			// try to locate the file in the workspace and return an IFile if
+			// found
+			IFile file = getFile(fileString);
+			if (file != null) {
+				// file exists in workspace
+				editor = openFileInEditor(file);
+			}
+			else {
+				// file does not exist in workspace
+				editor = openExternalFile(fileString);
+			}
+		}
+		// no editor was opened
+		if (editor == null) {
+			openFileFailed();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.IOpenOn#openOn(org.eclipse.jface.text.IDocument,
+	 *      org.eclipse.jface.text.IRegion)
+	 */
+	public void openOn(IDocument doc, IRegion region) {
+		// set the document for this action
+		setDocument(doc);
+		// if no region was given this action fails
+		if (region == null)
+			openFileFailed();
+		else
+			doOpenOn(region);
+		// reset the document back to null for this action
+		setDocument(null);
+	}
+
+	/**
+	 * Sets current document associated with open on
+	 * 
+	 * @param document
+	 */
+	public void setDocument(IDocument document) {
+		fDocument = document;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/ExternalFileEditorInput.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/ExternalFileEditorInput.java
new file mode 100644
index 0000000..51d0a83
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/ExternalFileEditorInput.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.openon;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.editors.text.ILocationProvider;
+
+/**
+ * EditorInput for external files. Copied from
+ * org.eclipse.ui.internal.editors.text.JavaFileEditorInput
+ * 
+ * @deprecated Use org.eclipse.ui.ide.FileStoreEditorInput and EFS.getLocalFileSystem().fromLocalFile()
+ */
+public class ExternalFileEditorInput implements IEditorInput, ILocationProvider {
+
+	private File fFile;
+
+	public ExternalFileEditorInput(File file) {
+		super();
+		fFile = file;
+	}
+
+	/*
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object o) {
+		if (o == this)
+			return true;
+
+		if (o instanceof ExternalFileEditorInput) {
+			ExternalFileEditorInput input = (ExternalFileEditorInput) o;
+			return fFile.equals(input.fFile);
+		}
+
+		return false;
+	}
+
+	/*
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	public boolean exists() {
+		return fFile.exists();
+	}
+
+	/*
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (ILocationProvider.class.equals(adapter))
+			return this;
+		return Platform.getAdapterManager().getAdapter(this, adapter);
+	}
+
+	/*
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	public ImageDescriptor getImageDescriptor() {
+		return null;
+	}
+
+	/*
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	public String getName() {
+		return fFile.getName();
+	}
+
+	/*
+	 * @see org.eclipse.ui.editors.text.ILocationProvider#getPath(java.lang.Object)
+	 */
+	public IPath getPath(Object element) {
+		if (element instanceof ExternalFileEditorInput) {
+			ExternalFileEditorInput input = (ExternalFileEditorInput) element;
+			return new Path(input.fFile.getAbsolutePath());
+		}
+		return null;
+	}
+
+	/*
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/*
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	public String getToolTipText() {
+		return fFile.getAbsolutePath();
+	}
+
+	/*
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return fFile.hashCode();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/IOpenOn.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/IOpenOn.java
new file mode 100644
index 0000000..fb67c38
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/IOpenOn.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.openon;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+
+/**
+ * Interface for Open On... navigation
+ * 
+ * @author amywu
+ */
+public interface IOpenOn {
+	/**
+	 * Returns the entire region relevant to the current offset where an
+	 * openable source region is found. null if offset does not contain an
+	 * openable source.
+	 * 
+	 * @param document
+	 *            IDocument
+	 * @param offset
+	 *            int
+	 * @return IRegion entire region of openable source
+	 */
+	public IRegion getOpenOnRegion(IDocument document, int offset);
+
+	/**
+	 * Opens the file/source relevant to region if possible.
+	 * 
+	 * @param viewer
+	 *            ITextViewer
+	 * @param region
+	 *            Region to examine
+	 */
+	public void openOn(IDocument document, IRegion region);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenFileHyperlinkTracker.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenFileHyperlinkTracker.java
new file mode 100644
index 0000000..372a620
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenFileHyperlinkTracker.java
@@ -0,0 +1,660 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.openon;
+
+import com.ibm.icu.util.StringTokenizer;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextInputListener;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension5;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
+
+
+/**
+ * @deprecated Use org.eclipse.jface.text.hyperlink.HyperlinkManager
+ */
+public class OpenFileHyperlinkTracker implements KeyListener, MouseListener, MouseMoveListener, FocusListener, PaintListener, IPropertyChangeListener, IDocumentListener, ITextInputListener {
+
+	/** The session is active. */
+	private boolean fActive;
+
+	/** The currently active style range. */
+	private IRegion fActiveRegion;
+	/** Preference key for browser-like links to be enabled */
+	private String fBrowserLikeLinksKeyModifierKey;
+
+	/** The link color. */
+	private Color fColor;
+	/** The hand cursor. */
+	private Cursor fCursor;
+	/** The key modifier mask. */
+	private int fKeyModifierMask;
+	/** Preference key for hyperlink underline color */
+	private String fLinkColorKey;
+	/** The preference store */
+	private IPreferenceStore fPreferenceStore;
+	/** The currently active style range as position. */
+	private Position fRememberedPosition;
+
+	/** The text viewer this hyperlink tracker is associated with */
+	private ITextViewer fTextViewer;
+
+	/**
+	 *  
+	 */
+	public OpenFileHyperlinkTracker(ITextViewer textViewer) {
+		fTextViewer = textViewer;
+	}
+
+	private void activateCursor(ITextViewer viewer) {
+		StyledText text = viewer.getTextWidget();
+		if (text == null || text.isDisposed())
+			return;
+		Display display = text.getDisplay();
+		if (fCursor == null)
+			fCursor = new Cursor(display, SWT.CURSOR_HAND);
+		text.setCursor(fCursor);
+	}
+
+	private int computeStateMask(String modifiers) {
+		if (modifiers == null)
+			return -1;
+
+		if (modifiers.length() == 0)
+			return SWT.NONE;
+
+		int stateMask = 0;
+		StringTokenizer modifierTokenizer = new StringTokenizer(modifiers, ",;.:+-* "); //$NON-NLS-1$
+		while (modifierTokenizer.hasMoreTokens()) {
+			int modifier = EditorUtility.findLocalizedModifier(modifierTokenizer.nextToken());
+			if (modifier == 0 || (stateMask & modifier) == modifier)
+				return -1;
+			stateMask = stateMask | modifier;
+		}
+		return stateMask;
+	}
+
+	/**
+	 * Creates a color from the information stored in the given preference
+	 * store. Returns <code>null</code> if there is no such information
+	 * available.
+	 */
+	private Color createColor(IPreferenceStore store, String key, Display display) {
+
+		RGB rgb = null;
+
+		if (store.contains(key)) {
+
+			if (store.isDefault(key))
+				rgb = PreferenceConverter.getDefaultColor(store, key);
+			else
+				rgb = PreferenceConverter.getColor(store, key);
+		}
+
+		return EditorUtility.getColor(rgb);
+	}
+
+	public void deactivate() {
+		deactivate(false);
+	}
+
+	public void deactivate(boolean redrawAll) {
+		if (!fActive)
+			return;
+
+		repairRepresentation(redrawAll);
+		fActive = false;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
+	 */
+	public void documentAboutToBeChanged(DocumentEvent event) {
+		if (fActive && fActiveRegion != null) {
+			fRememberedPosition = new Position(fActiveRegion.getOffset(), fActiveRegion.getLength());
+			try {
+				event.getDocument().addPosition(fRememberedPosition);
+			} catch (BadLocationException x) {
+				fRememberedPosition = null;
+			}
+		}
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
+	 */
+	public void documentChanged(DocumentEvent event) {
+		if (fRememberedPosition != null) {
+			if (!fRememberedPosition.isDeleted()) {
+
+				event.getDocument().removePosition(fRememberedPosition);
+				fActiveRegion = new Region(fRememberedPosition.getOffset(), fRememberedPosition.getLength());
+				fRememberedPosition = null;
+
+				ITextViewer viewer = getTextViewer();
+				if (viewer != null) {
+					StyledText widget = viewer.getTextWidget();
+					if (widget != null && !widget.isDisposed()) {
+						widget.getDisplay().asyncExec(new Runnable() {
+							public void run() {
+								deactivate();
+							}
+						});
+					}
+				}
+
+			} else {
+				fActiveRegion = null;
+				fRememberedPosition = null;
+				deactivate();
+			}
+		}
+	}
+
+	/*
+	 * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
+	 */
+	public void focusGained(FocusEvent e) {
+	}
+
+	/*
+	 * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
+	 */
+	public void focusLost(FocusEvent event) {
+		deactivate();
+	}
+
+	private int getCurrentTextOffset() {
+		try {
+			StyledText text = getTextViewer().getTextWidget();
+			if (text == null || text.isDisposed())
+				return -1;
+
+			Display display = text.getDisplay();
+			Point absolutePosition = display.getCursorLocation();
+			Point relativePosition = text.toControl(absolutePosition);
+
+			int widgetOffset = text.getOffsetAtLocation(relativePosition);
+			if (getTextViewer() instanceof ITextViewerExtension5) {
+				ITextViewerExtension5 extension = (ITextViewerExtension5) getTextViewer();
+				return extension.widgetOffset2ModelOffset(widgetOffset);
+			} else {
+				return widgetOffset + getTextViewer().getVisibleRegion().getOffset();
+			}
+
+		} catch (IllegalArgumentException e) {
+			return -1;
+		}
+	}
+
+	private Point getMaximumLocation(StyledText text, int offset, int length) {
+		Point maxLocation = new Point(Integer.MIN_VALUE, Integer.MIN_VALUE);
+
+		for (int i = 0; i <= length; i++) {
+			Point location = text.getLocationAtOffset(offset + i);
+
+			if (location.x > maxLocation.x)
+				maxLocation.x = location.x;
+			if (location.y > maxLocation.y)
+				maxLocation.y = location.y;
+		}
+
+		return maxLocation;
+	}
+
+	private Point getMinimumLocation(StyledText text, int offset, int length) {
+		Point minLocation = new Point(Integer.MAX_VALUE, Integer.MAX_VALUE);
+
+		for (int i = 0; i <= length; i++) {
+			Point location = text.getLocationAtOffset(offset + i);
+
+			if (location.x < minLocation.x)
+				minLocation.x = location.x;
+			if (location.y < minLocation.y)
+				minLocation.y = location.y;
+		}
+
+		return minLocation;
+	}
+
+	private IPreferenceStore getNewPreferenceStore() {
+		return fPreferenceStore;
+	}
+
+	private ITextViewer getTextViewer() {
+		return fTextViewer;
+	}
+
+	private void highlightRegion(ITextViewer viewer, IRegion region) {
+
+		if (region.equals(fActiveRegion))
+			return;
+
+		repairRepresentation();
+
+		StyledText text = viewer.getTextWidget();
+		if (text == null || text.isDisposed())
+			return;
+
+
+		// Underline
+		int offset = 0;
+		int length = 0;
+		if (viewer instanceof ITextViewerExtension5) {
+			ITextViewerExtension5 extension = (ITextViewerExtension5) viewer;
+			IRegion widgetRange = extension.modelRange2WidgetRange(new Region(region.getOffset(), region.getLength()));
+			if (widgetRange == null)
+				return;
+
+			offset = widgetRange.getOffset();
+			length = widgetRange.getLength();
+
+		} else {
+			offset = region.getOffset() - viewer.getVisibleRegion().getOffset();
+			length = region.getLength();
+		}
+		// need clearBackground to be true for paint event to be fired
+		text.redrawRange(offset, length, true);
+
+		fActiveRegion = region;
+	}
+
+	private boolean includes(IRegion region, IRegion position) {
+		return position.getOffset() >= region.getOffset() && position.getOffset() + position.getLength() <= region.getOffset() + region.getLength();
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.ITextInputListener#inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument,
+	 *      org.eclipse.jface.text.IDocument)
+	 */
+	public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
+		if (oldInput == null)
+			return;
+		deactivate();
+		oldInput.removeDocumentListener(this);
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.ITextInputListener#inputDocumentChanged(org.eclipse.jface.text.IDocument,
+	 *      org.eclipse.jface.text.IDocument)
+	 */
+	public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
+		if (newInput == null)
+			return;
+		newInput.addDocumentListener(this);
+	}
+
+	public void install(IPreferenceStore store) {
+		fPreferenceStore = store;
+		ITextViewer textViewer = getTextViewer();
+		if (textViewer == null)
+			return;
+
+		StyledText text = textViewer.getTextWidget();
+		if (text == null || text.isDisposed())
+			return;
+
+		updateColor(textViewer);
+
+		textViewer.addTextInputListener(this);
+
+		IDocument document = textViewer.getDocument();
+		if (document != null)
+			document.addDocumentListener(this);
+
+		text.addKeyListener(this);
+		text.addMouseListener(this);
+		text.addMouseMoveListener(this);
+		text.addFocusListener(this);
+		text.addPaintListener(this);
+
+		updateKeyModifierMask();
+
+		fPreferenceStore.addPropertyChangeListener(this);
+	}
+
+	/*
+	 * @see org.eclipse.swt.events.KeyListener#keyPressed(org.eclipse.swt.events.KeyEvent)
+	 */
+	public void keyPressed(KeyEvent event) {
+
+		if (fActive) {
+			deactivate();
+			return;
+		}
+
+		if (event.keyCode != fKeyModifierMask) {
+			deactivate();
+			return;
+		}
+
+		fActive = true;
+
+		//			removed for #25871
+		//
+		//			ISourceViewer viewer= getSourceViewer();
+		//			if (viewer == null)
+		//				return;
+		//			
+		//			IRegion region= getCurrentTextRegion(viewer);
+		//			if (region == null)
+		//				return;
+		//			
+		//			highlightRegion(viewer, region);
+		//			activateCursor(viewer);
+	}
+
+	/*
+	 * @see org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent)
+	 */
+	public void keyReleased(KeyEvent event) {
+
+		if (!fActive)
+			return;
+
+		deactivate();
+	}
+
+	/*
+	 * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)
+	 */
+	public void mouseDoubleClick(MouseEvent e) {
+	}
+
+	/*
+	 * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
+	 */
+	public void mouseDown(MouseEvent event) {
+
+		if (!fActive)
+			return;
+
+		if (event.stateMask != fKeyModifierMask) {
+			deactivate();
+			return;
+		}
+
+		if (event.button != 1) {
+			deactivate();
+			return;
+		}
+	}
+
+	/*
+	 * @see org.eclipse.swt.events.MouseMoveListener#mouseMove(org.eclipse.swt.events.MouseEvent)
+	 */
+	public void mouseMove(MouseEvent event) {
+
+		if (event.widget instanceof Control && !((Control) event.widget).isFocusControl()) {
+			deactivate();
+			return;
+		}
+
+		if (!fActive) {
+			if (event.stateMask != fKeyModifierMask)
+				return;
+			// modifier was already pressed
+			fActive = true;
+		}
+
+		ITextViewer viewer = getTextViewer();
+		if (viewer == null) {
+			deactivate();
+			return;
+		}
+
+		StyledText text = viewer.getTextWidget();
+		if (text == null || text.isDisposed()) {
+			deactivate();
+			return;
+		}
+
+		if ((event.stateMask & SWT.BUTTON1) != 0 && text.getSelectionCount() != 0) {
+			deactivate();
+			return;
+		}
+
+		IRegion region = null;
+		int offset = getCurrentTextOffset();
+		IOpenOn openOn = OpenOnProvider.getInstance().getOpenOn(getTextViewer().getDocument(), offset);
+		if (openOn != null) {
+			region = openOn.getOpenOnRegion(getTextViewer().getDocument(), offset);
+		}
+		if (region == null || region.getLength() == 0) {
+			repairRepresentation();
+			return;
+		}
+
+		highlightRegion(viewer, region);
+		activateCursor(viewer);
+	}
+
+	/*
+	 * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
+	 */
+	public void mouseUp(MouseEvent e) {
+
+		if (!fActive)
+			return;
+
+		if (e.button != 1) {
+			deactivate();
+			return;
+		}
+
+		boolean wasActive = fCursor != null;
+		IRegion previousRegion = fActiveRegion;
+
+		deactivate();
+
+		if (wasActive) {
+			IOpenOn openOn = OpenOnProvider.getInstance().getOpenOn(getTextViewer().getDocument(), previousRegion.getOffset());
+			if (openOn != null) {
+				openOn.openOn(getTextViewer().getDocument(), previousRegion);
+			}
+		}
+	}
+
+	/*
+	 * @see PaintListener#paintControl(PaintEvent)
+	 */
+	public void paintControl(PaintEvent event) {
+		if (fActiveRegion == null)
+			return;
+
+		ITextViewer viewer = getTextViewer();
+		if (viewer == null)
+			return;
+
+		StyledText text = viewer.getTextWidget();
+		if (text == null || text.isDisposed())
+			return;
+
+
+		int offset = 0;
+		int length = 0;
+
+		if (viewer instanceof ITextViewerExtension5) {
+
+			ITextViewerExtension5 extension = (ITextViewerExtension5) viewer;
+			IRegion widgetRange = extension.modelRange2WidgetRange(fActiveRegion);
+			if (widgetRange == null)
+				return;
+
+			offset = widgetRange.getOffset();
+			length = widgetRange.getLength();
+
+		} else {
+
+			IRegion region = viewer.getVisibleRegion();
+			if (!includes(region, fActiveRegion))
+				return;
+
+			offset = fActiveRegion.getOffset() - region.getOffset();
+			length = fActiveRegion.getLength();
+		}
+
+		// support for bidi
+		Point minLocation = getMinimumLocation(text, offset, length);
+		Point maxLocation = getMaximumLocation(text, offset, length);
+
+		int x1 = minLocation.x;
+		int x2 = minLocation.x + maxLocation.x - minLocation.x - 1;
+		int y = minLocation.y + text.getLineHeight() - 1;
+
+		GC gc = event.gc;
+		if (fColor != null && !fColor.isDisposed())
+			gc.setForeground(fColor);
+		gc.drawLine(x1, y, x2, y);
+	}
+
+	/*
+	 * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
+	 */
+	public void propertyChange(PropertyChangeEvent event) {
+		if (event.getProperty().equals(fLinkColorKey)) {
+			ITextViewer viewer = getTextViewer();
+			if (viewer != null)
+				updateColor(viewer);
+		} else if (event.getProperty().equals(fBrowserLikeLinksKeyModifierKey)) {
+			updateKeyModifierMask();
+		}
+	}
+
+	private void repairRepresentation() {
+		repairRepresentation(false);
+	}
+
+	private void repairRepresentation(boolean redrawAll) {
+
+		if (fActiveRegion == null)
+			return;
+
+		int offset = fActiveRegion.getOffset();
+		int length = fActiveRegion.getLength();
+		fActiveRegion = null;
+
+		ITextViewer viewer = getTextViewer();
+		if (viewer != null) {
+
+			resetCursor(viewer);
+
+			// Remove underline
+			if (viewer instanceof ITextViewerExtension5) {
+				ITextViewerExtension5 extension = (ITextViewerExtension5) viewer;
+				offset = extension.modelOffset2WidgetOffset(offset);
+			} else {
+				offset -= viewer.getVisibleRegion().getOffset();
+			}
+			try {
+				StyledText text = viewer.getTextWidget();
+
+				// need clearBackground to be true for paint event to be fired
+				text.redrawRange(offset, length, true);
+			} catch (IllegalArgumentException x) {
+				Logger.logException(x);
+			}
+		}
+	}
+
+	private void resetCursor(ITextViewer viewer) {
+		StyledText text = viewer.getTextWidget();
+		if (text != null && !text.isDisposed())
+			text.setCursor(null);
+
+		if (fCursor != null) {
+			fCursor.dispose();
+			fCursor = null;
+		}
+	}
+
+	public void setHyperlinkPreferenceKeys(String linkColorKey, String browserLikeLinksKeyModifierKey) {
+		fLinkColorKey = linkColorKey;
+		fBrowserLikeLinksKeyModifierKey = browserLikeLinksKeyModifierKey;
+	}
+
+	public void uninstall() {
+		if (fCursor != null) {
+			fCursor.dispose();
+			fCursor = null;
+		}
+
+		ITextViewer textViewer = getTextViewer();
+		if (textViewer == null)
+			return;
+
+		textViewer.removeTextInputListener(this);
+
+		IDocument document = textViewer.getDocument();
+		if (document != null)
+			document.removeDocumentListener(this);
+
+		IPreferenceStore preferenceStore = getNewPreferenceStore();
+		if (preferenceStore != null)
+			preferenceStore.removePropertyChangeListener(this);
+
+		StyledText text = textViewer.getTextWidget();
+		if (text == null || text.isDisposed())
+			return;
+
+		text.removeKeyListener(this);
+		text.removeMouseListener(this);
+		text.removeMouseMoveListener(this);
+		text.removeFocusListener(this);
+		text.removePaintListener(this);
+	}
+
+	private void updateColor(ITextViewer viewer) {
+		StyledText text = viewer.getTextWidget();
+		if (text == null || text.isDisposed())
+			return;
+
+		Display display = text.getDisplay();
+		fColor = createColor(getNewPreferenceStore(), fLinkColorKey, display);
+	}
+
+	private void updateKeyModifierMask() {
+		String modifiers = getNewPreferenceStore().getString(fBrowserLikeLinksKeyModifierKey);
+		fKeyModifierMask = computeStateMask(modifiers);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnAction.java
new file mode 100644
index 0000000..fe7702c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnAction.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.openon;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.TextEditorAction;
+import org.eclipse.wst.sse.ui.internal.IExtendedSimpleEditor;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
+
+
+/**
+ * Determines the appropriate IOpenFileAction to call based on current
+ * partition.
+ * 
+ * @deprecated Use base support for hyperlink navigation
+ */
+public class OpenOnAction extends TextEditorAction {
+	public OpenOnAction(ResourceBundle bundle, String prefix, ITextEditor editor) {
+		super(bundle, prefix, editor);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.IAction#run()
+	 */
+	public void run() {
+		BusyIndicator.showWhile(getTextEditor().getEditorSite().getShell().getDisplay(), new Runnable() {
+			public void run() {
+				ITextEditor editor = getTextEditor();
+
+				// figure out current offset
+				int offset = -1;
+				ISourceEditingTextTools textTools = (ISourceEditingTextTools) getTextEditor().getAdapter(ISourceEditingTextTools.class);
+				if (textTools != null) {
+					offset = textTools.getCaretOffset();
+				}
+				else if (editor instanceof IExtendedSimpleEditor) {
+					offset = ((IExtendedSimpleEditor) editor).getCaretPosition();
+				}
+				else {
+					if (editor.getSelectionProvider() != null) {
+						ISelection sel = editor.getSelectionProvider().getSelection();
+						if (sel instanceof ITextSelection) {
+							offset = ((ITextSelection) sel).getOffset();
+						}
+					}
+				}
+				IDocument document = editor.getDocumentProvider().getDocument(editor.getEditorInput());
+				IOpenOn openOn = OpenOnProvider.getInstance().getOpenOn(document, offset);
+				if (openOn != null) {
+					openOn.openOn(document, new Region(offset, 0));
+				}
+			}
+		});
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnBuilder.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnBuilder.java
new file mode 100644
index 0000000..3e02958
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnBuilder.java
@@ -0,0 +1,267 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.openon;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.sse.ui.internal.extension.RegistryReader;
+
+
+/**
+ * Reads extensions for open on extension point,
+ * org.eclipse.wst.sse.ui.extensions.openon
+ * 
+ * @deprecated Use base support for hyperlink navigation
+ */
+public class OpenOnBuilder extends RegistryReader {
+	public static final String ATT_CLASS = "class"; //$NON-NLS-1$
+
+	public static final String ATT_ID = "id"; //$NON-NLS-1$
+
+	private static OpenOnBuilder fInstance;
+	// extension point ID
+	public static final String PL_OPENON = "openon"; //$NON-NLS-1$
+
+	public static final String PLUGIN_ID = "org.eclipse.wst.sse.ui"; //$NON-NLS-1$
+	public static final String TAG_CONTENT_TYPE_IDENTIFIER = "contenttypeidentifier"; //$NON-NLS-1$
+
+	public static final String TAG_OPENON = "openon"; //$NON-NLS-1$
+	public static final String TAG_PARTITION_TYPE = "partitiontype"; //$NON-NLS-1$
+
+	/**
+	 * returns singleton instance of OpenOnBuilder
+	 * 
+	 * @return OpenOnBuilder
+	 */
+	public synchronized static OpenOnBuilder getInstance() {
+		if (fInstance == null) {
+			fInstance = new OpenOnBuilder();
+		}
+		return fInstance;
+	}
+
+	private String fCurrentContentType;
+	private OpenOnDefinition fCurrentOpenOnDefinition = null;
+
+	private List fOpenOnDefs = null;
+
+	protected String targetContributionTag;
+
+	/**
+	 * Returns the name of the part ID attribute that is expected in the
+	 * target extension.
+	 * 
+	 * @param element
+	 * @return String
+	 */
+	protected String getId(IConfigurationElement element) {
+		String value = element.getAttribute(ATT_ID);
+		return value;
+	}
+
+	protected String getOpenOnClass(IConfigurationElement element) {
+		String value = element.getAttribute(ATT_CLASS);
+		return value;
+	}
+
+	/**
+	 * Returns all the open on definition objects
+	 * 
+	 * @return
+	 */
+	public OpenOnDefinition[] getOpenOnDefinitions() {
+		initCache();
+		return (OpenOnDefinition[]) fOpenOnDefs.toArray(new OpenOnDefinition[fOpenOnDefs.size()]);
+	}
+
+	/**
+	 * Returns all the open on definition objects valid for
+	 * contentType/partitionType
+	 * 
+	 * @param contentType
+	 * @param partitionType
+	 * @return if either contentType or partitionType is null, null is
+	 *         returned
+	 */
+	public OpenOnDefinition[] getOpenOnDefinitions(String contentType, String partitionType) {
+		if (contentType == null || partitionType == null) {
+			// should not be able to define an openon without a content type
+			// but if it were possible then would need to search all openon
+			// definitions for
+			// definitions with empty contentType list
+			return null;
+		}
+
+		// entire list of openon definition objects
+		OpenOnDefinition[] allDefs = getOpenOnDefinitions();
+		// current list of open on definitions valid for
+		// contentType/partitionType
+		List defs = new ArrayList();
+		// default definitions that should be added to end of list of open on
+		// definitions
+		List lastDefs = new ArrayList();
+
+		for (int i = 0; i < allDefs.length; ++i) {
+			// for each one check if it contains contentType
+			List partitions = (List) allDefs[i].getContentTypes().get(contentType);
+			if (partitions != null) {
+				// this openon definition is valid for all partition types for
+				// this content type
+				if (partitions.isEmpty()) {
+					// this will be added to end of list because this is
+					// considered a default openon
+					lastDefs.add(allDefs[i]);
+				} else {
+					// examine the partition types of this openon
+					int j = 0; // current index in list of partitions
+					boolean added = false; // openon has been added to list
+					while (j < partitions.size() && !added) {
+						// this openon definition applies to partitionType so
+						// add to list of valid openons
+						if (partitionType.equals(partitions.get(j))) {
+							defs.add(allDefs[i]);
+							added = true;
+						} else {
+							// continue checking to see if this openon
+							// definition is valid for current partitionType
+							++j;
+						}
+					}
+				}
+			}
+		}
+		// append the default openon definitions
+		defs.addAll(lastDefs);
+
+		// return the list
+		return (OpenOnDefinition[]) defs.toArray(new OpenOnDefinition[defs.size()]);
+	}
+
+	private void initCache() {
+		if (fOpenOnDefs == null) {
+			fOpenOnDefs = new ArrayList(0);
+			readContributions(TAG_OPENON, PL_OPENON);
+		}
+	}
+
+	/**
+	 * Processes element which should be a configuration element specifying a
+	 * content type for the current open on tag. Assumes that there is a valid
+	 * current open on definition object.
+	 * 
+	 * @param element
+	 *            contenttypeidentifier configuration element
+	 */
+	private void processContentTypeTag(IConfigurationElement element) {
+		// add to current openOnDefinition
+		String theId = getId(element);
+
+		if (theId != null) {
+			fCurrentContentType = theId;
+			fCurrentOpenOnDefinition.addContentTypeId(fCurrentContentType);
+		} else {
+			fCurrentContentType = null;
+		}
+	}
+
+	/**
+	 * Processes element which should be a configuration element specifying an
+	 * open on object. Creates a new open on definition object and adds it to
+	 * the list of open on definition objects
+	 * 
+	 * @param element
+	 *            openon configuration element
+	 */
+	private void processOpenOnTag(IConfigurationElement element) {
+		String theId = getId(element);
+		String theClass = getOpenOnClass(element);
+
+		if (theId != null && theClass != null) {
+			// start building new OpenOnDefinition
+			fCurrentOpenOnDefinition = new OpenOnDefinition(theId, theClass, element);
+			fOpenOnDefs.add(fCurrentOpenOnDefinition);
+		} else {
+			fCurrentOpenOnDefinition = null;
+		}
+	}
+
+	/**
+	 * Processes element which should be a configuration element specifying a
+	 * partition type for the current open on/content type tag. Assumes that
+	 * there is a valid current open on/content type tag.
+	 * 
+	 * @param element
+	 *            partitiontype configuration element
+	 */
+	private void processPartitionTypeTag(IConfigurationElement element) {
+		// add to current openOnDefinition/contentType
+		String theId = getId(element);
+
+		if (theId != null) {
+			fCurrentOpenOnDefinition.addPartitionType(fCurrentContentType, theId);
+		}
+	}
+
+	/**
+	 * Reads the contributions from the registry for the provided workbench
+	 * part and the provided extension point ID.
+	 * 
+	 * @param tag
+	 * @param extensionPoint
+	 */
+	protected void readContributions(String tag, String extensionPoint) {
+		targetContributionTag = tag;
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		readRegistry(registry, PLUGIN_ID, extensionPoint);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.extension.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
+	 */
+	protected boolean readElement(IConfigurationElement element) {
+		String tag = element.getName();
+
+		if (tag.equals(targetContributionTag)) {
+			processOpenOnTag(element);
+
+			// make sure processing of current open on tag resulted in a
+			// current open on definition
+			// before continue reading the children
+			if (fCurrentOpenOnDefinition != null) {
+				readElementChildren(element);
+			}
+			return true;
+		} else if (tag.equals(TAG_CONTENT_TYPE_IDENTIFIER)) {
+			processContentTypeTag(element);
+
+			// make sure processing of current content type resulted in a
+			// valid content type
+			// before reading the children
+			if (fCurrentContentType != null) {
+				readElementChildren(element);
+			}
+			return true;
+		} else if (tag.equals(TAG_PARTITION_TYPE)) {
+			processPartitionTypeTag(element);
+			return true;
+		}
+
+		return false;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnDefinition.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnDefinition.java
new file mode 100644
index 0000000..5a60d60
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnDefinition.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.openon;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * Open on definition object
+ * 
+ * @deprecated Use base support for hyperlink navigation
+ */
+public class OpenOnDefinition {
+	private String fClassName = null;
+
+	private IConfigurationElement fConfigurationElement = null;
+
+	// a hash map of content type Ids (String) that points to lists of
+	// parition types (List of Strings)
+	// contentTypeId -> List(paritionType, paritionType, partitionType, ...)
+	// contentTypeId2 -> List(partitionType, partitionType, ...)
+	// ...
+	private HashMap fContentTypes = null;
+	private String fId = null;
+
+	/**
+	 * @param id
+	 * @param class1
+	 * @param configurationElement
+	 */
+	public OpenOnDefinition(String id, String class1, IConfigurationElement configurationElement) {
+		super();
+		fId = id;
+		fClassName = class1;
+		fConfigurationElement = configurationElement;
+		fContentTypes = new HashMap();
+	}
+
+	public void addContentTypeId(String contentTypeId) {
+		if (!fContentTypes.containsKey(contentTypeId))
+			fContentTypes.put(contentTypeId, new ArrayList());
+	}
+
+	public void addPartitionType(String contentTypeId, String partitionType) {
+		if (!fContentTypes.containsKey(contentTypeId))
+			fContentTypes.put(contentTypeId, new ArrayList());
+
+		List partitionList = (List) fContentTypes.get(contentTypeId);
+		partitionList.add(partitionType);
+	}
+
+	/**
+	 * Creates an extension. If the extension plugin has not been loaded a
+	 * busy cursor will be activated during the duration of the load.
+	 * 
+	 * @param propertyName
+	 * @return Object
+	 */
+	private Object createExtension(String propertyName) {
+		// If plugin has been loaded create extension.
+		// Otherwise, show busy cursor then create extension.
+		final IConfigurationElement element = getConfigurationElement();
+		final String name = propertyName;
+
+		final Object[] result = new Object[1];
+		String pluginId = element.getDeclaringExtension().getNamespace();
+		Bundle bundle = Platform.getBundle(pluginId);
+		if (bundle.getState() == Bundle.ACTIVE) {
+			try {
+				return element.createExecutableExtension(name);
+			} catch (CoreException e) {
+				handleCreateExecutableException(result, e);
+			}
+		} else {
+			BusyIndicator.showWhile(null, new Runnable() {
+				public void run() {
+					try {
+						result[0] = element.createExecutableExtension(name);
+					} catch (Exception e) {
+						handleCreateExecutableException(result, e);
+					}
+				}
+			});
+		}
+		return result[0];
+	}
+
+	/**
+	 * @return IOpenOn for this definition
+	 */
+	public IOpenOn createOpenOn() {
+		IOpenOn openOn = null;
+
+		if (getClassName() != null) {
+			openOn = (IOpenOn) createExtension(OpenOnBuilder.ATT_CLASS);
+		}
+
+		return openOn;
+	}
+
+	/**
+	 * @return Returns the fClass.
+	 */
+	public String getClassName() {
+		return fClassName;
+	}
+
+	/**
+	 * @return Returns the fConfigurationElement.
+	 */
+	public IConfigurationElement getConfigurationElement() {
+		return fConfigurationElement;
+	}
+
+	/**
+	 * @return Returns the fContentTypes.
+	 */
+	public HashMap getContentTypes() {
+		return fContentTypes;
+	}
+
+	/**
+	 * @return Returns the fId.
+	 */
+	public String getId() {
+		return fId;
+	}
+
+	/**
+	 * @param result
+	 * @param e
+	 */
+	private void handleCreateExecutableException(Object[] result, Throwable e) {
+		Logger.logException("Unable to create open on: " + getId(), e); //$NON-NLS-1$
+		e.printStackTrace();
+		result[0] = null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnProvider.java
new file mode 100644
index 0000000..4609ff9
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnProvider.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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.openon;
+
+
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning;
+
+
+/**
+ * Determines the appropriate IOpenOn to call based on current partition.
+ * 
+ * @deprecated Use base support for hyperlink navigation
+ */
+public class OpenOnProvider {
+	private static OpenOnProvider fInstance;
+
+	/**
+	 * returns singleton instance of OpenOnProvider
+	 * 
+	 * @return OpenOnProvider
+	 */
+	public synchronized static OpenOnProvider getInstance() {
+		if (fInstance == null) {
+			fInstance = new OpenOnProvider();
+		}
+		return fInstance;
+	}
+
+
+	/**
+	 * Returns the content type of document
+	 * 
+	 * @param document -
+	 *            assumes document is not null
+	 * @return String content type of given document
+	 */
+	protected String getContentType(IDocument document) {
+		String type = null;
+
+		IModelManager mgr = StructuredModelManager.getModelManager();
+		IStructuredModel model = null;
+		try {
+			model = mgr.getExistingModelForRead(document);
+			if (model != null) {
+				type = model.getContentTypeIdentifier();
+			}
+		}
+		finally {
+			if (model != null) {
+				model.releaseFromRead();
+			}
+		}
+		return type;
+	}
+
+	/**
+	 * Returns the appropriate IOpenOn for the current partition
+	 * 
+	 * @return
+	 */
+	public IOpenOn getOpenOn(IDocument document, int offset) {
+		IOpenOn openOn = null;
+
+		// determine the current partition
+		if (document != null) {
+			String contentTypeID = getContentType(document);
+			String partitionType = getPartitionType(document, offset);
+
+			IContentType contentType = Platform.getContentTypeManager().getContentType(contentTypeID);
+
+			while (openOn == null && contentType != null) {
+				// Query OpenOnBuilder and get the list of OpenOns for the
+				// current partition
+				OpenOnDefinition[] defs = OpenOnBuilder.getInstance().getOpenOnDefinitions(contentType.getId(), partitionType);
+				contentType = contentType.getBaseType();
+
+				// If more than 1 openon is returned, need to further check
+				// which OpenOn is the appropriate one to return
+				// for now just returning the first one
+				if (defs != null && defs.length > 0) {
+					openOn = defs[0].createOpenOn();
+				}
+			}
+		}
+
+		return openOn;
+	}
+
+	/**
+	 * Returns the partition type located at offset in the document
+	 * 
+	 * @param document -
+	 *            assumes document is not null
+	 * @param offset
+	 * @return String partition type
+	 */
+	protected String getPartitionType(IDocument document, int offset) {
+		String type = null;
+		try {
+			// TODO: provide partitioning information so we're not using a default like this
+			if (document instanceof IStructuredDocument) {
+				type = TextUtilities.getContentType(document, IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, offset, false);
+			}
+		}
+		catch (BadLocationException e1) {
+		}
+		finally {
+			if (type == null) {
+				try {
+					ITypedRegion region = document.getPartition(offset);
+					if (region != null) {
+						type = region.getType();
+					}
+				}
+				catch (BadLocationException e) {
+					type = null;
+				}
+			}
+		}
+		return type;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/EditorPreferenceNames.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/EditorPreferenceNames.java
new file mode 100644
index 0000000..5ce3447
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/EditorPreferenceNames.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences;
+
+
+/**
+ * Preference keys for SSE UI
+ */
+public class EditorPreferenceNames {
+	/**
+	 * A named preference that controls on-the-fly validation
+	 * <p>
+	 * Value is of type <code>Boolean</code>.
+	 * </p>
+	 */
+	public static final String EVALUATE_TEMPORARY_PROBLEMS = getEvaluateTemporaryProblemsKey();
+
+	private static String getEvaluateTemporaryProblemsKey() {
+		return "evaluateTemporaryProblems"; //$NON-NLS-1$
+	}
+
+	/**
+	 * A named preference that controls whether bracket matching highlighting
+	 * is turned on or off.
+	 * <p>
+	 * Value is of type <code>Boolean</code>.
+	 * </p>
+	 */
+	public final static String MATCHING_BRACKETS = getMatchingBracketsKey();
+
+	private static String getMatchingBracketsKey() {
+		return "matchingBrackets"; //$NON-NLS-1$
+	}
+
+	/**
+	 * A named preference that holds the color used to highlight matching
+	 * brackets.
+	 * <p>
+	 * Value is of type <code>String</code>. A RGB color value encoded as a
+	 * string using class <code>PreferenceConverter</code>
+	 * </p>
+	 */
+	public final static String MATCHING_BRACKETS_COLOR = getMatchingBracketsColorKey();
+
+	private static String getMatchingBracketsColorKey() {
+		return "matchingBracketsColor"; //$NON-NLS-1$
+	}
+
+	/**
+	 * A named preference that defines the key for the hover modifiers.
+	 * <p>
+	 * Value is of type <code>String</code>.
+	 * </p>
+	 */
+	public static final String EDITOR_TEXT_HOVER_MODIFIERS = getTextHoverModifiersKey();
+
+	private static String getTextHoverModifiersKey() {
+		return "hoverModifiers"; //$NON-NLS-1$
+	}
+
+	/**
+	 * A named preference that defines read only contrast scale.
+	 * <p>
+	 * Value is of type <code>Integer</code>.
+	 * </p>
+	 */
+	public static final String READ_ONLY_FOREGROUND_SCALE = getReadOnlyForegroundScaleKey();
+
+	private static String getReadOnlyForegroundScaleKey() {
+		return "readOnlyForegroundScale"; //$NON-NLS-1$
+	}
+
+	/**
+	 * A named preference that defines whether or not to show a message dialog
+	 * informing user of unknown content type in editor.
+	 */
+	public static final String SHOW_UNKNOWN_CONTENT_TYPE_MSG = "showUnknownContentTypeMsg"; //$NON-NLS-1$
+
+	/**
+	 * A name preference that holds the auto activation delay time in
+	 * milliseconds.
+	 * <p>
+	 * Value is of type <code>Integer</code>.
+	 * </p>
+	 */
+	public final static String CODEASSIST_AUTOACTIVATION_DELAY = "content_assist_autoactivation_delay"; //$NON-NLS-1$
+
+	/**
+	 * A named preference that holds the background color used in the code
+	 * assist selection dialog.
+	 * <p>
+	 * Value is of type <code>String</code>. A RGB color value encoded as a
+	 * string using class <code>PreferenceConverter</code>
+	 * </p>
+	 * 
+	 * @see org.eclipse.jface.resource.StringConverter
+	 * @see org.eclipse.jface.preference.PreferenceConverter
+	 */
+	public final static String CODEASSIST_PROPOSALS_BACKGROUND = "content_assist_proposals_background"; //$NON-NLS-1$
+
+	/**
+	 * A named preference that holds the foreground color used in the code
+	 * assist selection dialog.
+	 * <p>
+	 * Value is of type <code>String</code>. A RGB color value encoded as a
+	 * string using class <code>PreferenceConverter</code>
+	 * </p>
+	 * 
+	 * @see org.eclipse.jface.resource.StringConverter
+	 * @see org.eclipse.jface.preference.PreferenceConverter
+	 */
+	public final static String CODEASSIST_PROPOSALS_FOREGROUND = "content_assist_proposals_foreground"; //$NON-NLS-1$
+
+	/**
+	 * A named preference that holds the background color used for parameter
+	 * hints.
+	 * <p>
+	 * Value is of type <code>String</code>. A RGB color value encoded as a
+	 * string using class <code>PreferenceConverter</code>
+	 * </p>
+	 * 
+	 * @see org.eclipse.jface.resource.StringConverter
+	 * @see org.eclipse.jface.preference.PreferenceConverter
+	 */
+	public final static String CODEASSIST_PARAMETERS_BACKGROUND = "content_assist_parameters_background"; //$NON-NLS-1$
+
+	/**
+	 * A named preference that holds the foreground color used in the code
+	 * assist selection dialog.
+	 * <p>
+	 * Value is of type <code>String</code>. A RGB color value encoded as a
+	 * string using class <code>PreferenceConverter</code>
+	 * </p>
+	 * 
+	 * @see org.eclipse.jface.resource.StringConverter
+	 * @see org.eclipse.jface.preference.PreferenceConverter
+	 */
+	public final static String CODEASSIST_PARAMETERS_FOREGROUND = "content_assist_parameters_foreground"; //$NON-NLS-1$
+	
+	/**
+	 * A named preference that controls whether semantic highlighting is turned on or off
+	 * <p>
+	 * Value is of type <code>Boolean</code>.
+	 * </p>
+	 */
+	public final static String SEMANTIC_HIGHLIGHTING = "semanticHighlighting"; //$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/OverlayPreferenceStore.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/OverlayPreferenceStore.java
new file mode 100644
index 0000000..16eb14c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/OverlayPreferenceStore.java
@@ -0,0 +1,486 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceStore;
+import org.eclipse.jface.text.Assert;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+
+/**
+ * An overlaying preference store. copied from JDT
+ */
+public class OverlayPreferenceStore implements IPreferenceStore {
+
+	public static class OverlayKey {
+
+		TypeDescriptor fDescriptor;
+		String fKey;
+
+		public OverlayKey(TypeDescriptor descriptor, String key) {
+			fDescriptor = descriptor;
+			fKey = key;
+		}
+	}
+
+	private class PropertyListener implements IPropertyChangeListener {
+
+		/*
+		 * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
+		 */
+		public void propertyChange(PropertyChangeEvent event) {
+			OverlayKey key = findOverlayKey(event.getProperty());
+			if (key != null)
+				propagateProperty(fParent, key, fStore);
+		}
+	}
+
+
+	public static final class TypeDescriptor {
+		private TypeDescriptor() {
+		}
+	}
+
+	public static final TypeDescriptor BOOLEAN = new TypeDescriptor();
+	public static final TypeDescriptor DOUBLE = new TypeDescriptor();
+	public static final TypeDescriptor FLOAT = new TypeDescriptor();
+	public static final TypeDescriptor INT = new TypeDescriptor();
+	public static final TypeDescriptor LONG = new TypeDescriptor();
+	public static final TypeDescriptor STRING = new TypeDescriptor();
+	private boolean fLoaded;
+	private OverlayKey[] fOverlayKeys;
+
+
+	IPreferenceStore fParent;
+
+	private PropertyListener fPropertyListener;
+	IPreferenceStore fStore;
+
+
+	public OverlayPreferenceStore(IPreferenceStore parent, OverlayKey[] overlayKeys) {
+		fParent = parent;
+		fOverlayKeys = overlayKeys;
+		fStore = new PreferenceStore();
+	}
+
+	/**
+	 * The keys to add to the list of overlay keys.
+	 * <p>
+	 * Note: This method must be called before {@link #load()}is called.
+	 * </p>
+	 * 
+	 * @param keys
+	 * @plannedfor 3.0
+	 */
+	public void addKeys(OverlayKey[] keys) {
+		Assert.isTrue(!fLoaded);
+		Assert.isNotNull(keys);
+
+		int overlayKeysLength = fOverlayKeys.length;
+		OverlayKey[] result = new OverlayKey[keys.length + overlayKeysLength];
+
+		for (int i = 0, length = overlayKeysLength; i < length; i++)
+			result[i] = fOverlayKeys[i];
+
+		for (int i = 0, length = keys.length; i < length; i++)
+			result[overlayKeysLength + i] = keys[i];
+
+		fOverlayKeys = result;
+
+		if (fLoaded)
+			load();
+	}
+
+	/*
+	 * @see IPreferenceStore#addPropertyChangeListener(IPropertyChangeListener)
+	 */
+	public void addPropertyChangeListener(IPropertyChangeListener listener) {
+		fStore.addPropertyChangeListener(listener);
+	}
+
+	/*
+	 * @see IPreferenceStore#contains(String)
+	 */
+	public boolean contains(String name) {
+		return fStore.contains(name);
+	}
+
+	private boolean covers(String key) {
+		return (findOverlayKey(key) != null);
+	}
+
+	OverlayKey findOverlayKey(String key) {
+		for (int i = 0; i < fOverlayKeys.length; i++) {
+			if (fOverlayKeys[i].fKey.equals(key))
+				return fOverlayKeys[i];
+		}
+		return null;
+	}
+
+	/*
+	 * @see IPreferenceStore#firePropertyChangeEvent(String, Object, Object)
+	 */
+	public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
+		fStore.firePropertyChangeEvent(name, oldValue, newValue);
+	}
+
+	/*
+	 * @see IPreferenceStore#getBoolean(String)
+	 */
+	public boolean getBoolean(String name) {
+		return fStore.getBoolean(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getDefaultBoolean(String)
+	 */
+	public boolean getDefaultBoolean(String name) {
+		return fStore.getDefaultBoolean(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getDefaultDouble(String)
+	 */
+	public double getDefaultDouble(String name) {
+		return fStore.getDefaultDouble(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getDefaultFloat(String)
+	 */
+	public float getDefaultFloat(String name) {
+		return fStore.getDefaultFloat(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getDefaultInt(String)
+	 */
+	public int getDefaultInt(String name) {
+		return fStore.getDefaultInt(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getDefaultLong(String)
+	 */
+	public long getDefaultLong(String name) {
+		return fStore.getDefaultLong(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getDefaultString(String)
+	 */
+	public String getDefaultString(String name) {
+		return fStore.getDefaultString(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getDouble(String)
+	 */
+	public double getDouble(String name) {
+		return fStore.getDouble(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getFloat(String)
+	 */
+	public float getFloat(String name) {
+		return fStore.getFloat(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getInt(String)
+	 */
+	public int getInt(String name) {
+		return fStore.getInt(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getLong(String)
+	 */
+	public long getLong(String name) {
+		return fStore.getLong(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#getString(String)
+	 */
+	public String getString(String name) {
+		return fStore.getString(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#isDefault(String)
+	 */
+	public boolean isDefault(String name) {
+		return fStore.isDefault(name);
+	}
+
+	public void load() {
+		for (int i = 0; i < fOverlayKeys.length; i++)
+			loadProperty(fParent, fOverlayKeys[i], fStore, true);
+
+		fLoaded = true;
+
+	}
+
+	public void loadDefaults() {
+		for (int i = 0; i < fOverlayKeys.length; i++)
+			setToDefault(fOverlayKeys[i].fKey);
+	}
+
+	private void loadProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target, boolean forceInitialization) {
+		TypeDescriptor d = key.fDescriptor;
+		if (BOOLEAN == d) {
+
+			if (forceInitialization)
+				target.setValue(key.fKey, true);
+			target.setValue(key.fKey, orgin.getBoolean(key.fKey));
+			target.setDefault(key.fKey, orgin.getDefaultBoolean(key.fKey));
+
+		} else if (DOUBLE == d) {
+
+			if (forceInitialization)
+				target.setValue(key.fKey, 1.0D);
+			target.setValue(key.fKey, orgin.getDouble(key.fKey));
+			target.setDefault(key.fKey, orgin.getDefaultDouble(key.fKey));
+
+		} else if (FLOAT == d) {
+
+			if (forceInitialization)
+				target.setValue(key.fKey, 1.0F);
+			target.setValue(key.fKey, orgin.getFloat(key.fKey));
+			target.setDefault(key.fKey, orgin.getDefaultFloat(key.fKey));
+
+		} else if (INT == d) {
+
+			if (forceInitialization)
+				target.setValue(key.fKey, 1);
+			target.setValue(key.fKey, orgin.getInt(key.fKey));
+			target.setDefault(key.fKey, orgin.getDefaultInt(key.fKey));
+
+		} else if (LONG == d) {
+
+			if (forceInitialization)
+				target.setValue(key.fKey, 1L);
+			target.setValue(key.fKey, orgin.getLong(key.fKey));
+			target.setDefault(key.fKey, orgin.getDefaultLong(key.fKey));
+
+		} else if (STRING == d) {
+
+			if (forceInitialization)
+				target.setValue(key.fKey, "1"); //$NON-NLS-1$
+			target.setValue(key.fKey, orgin.getString(key.fKey));
+			target.setDefault(key.fKey, orgin.getDefaultString(key.fKey));
+
+		}
+	}
+
+	/*
+	 * @see IPreferenceStore#needsSaving()
+	 */
+	public boolean needsSaving() {
+		return fStore.needsSaving();
+	}
+
+	public void propagate() {
+		for (int i = 0; i < fOverlayKeys.length; i++)
+			propagateProperty(fStore, fOverlayKeys[i], fParent);
+	}
+
+	void propagateProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target) {
+
+		if (orgin.isDefault(key.fKey)) {
+			if (!target.isDefault(key.fKey))
+				target.setToDefault(key.fKey);
+			return;
+		}
+
+		TypeDescriptor d = key.fDescriptor;
+		if (BOOLEAN == d) {
+
+			boolean originValue = orgin.getBoolean(key.fKey);
+			boolean targetValue = target.getBoolean(key.fKey);
+			if (targetValue != originValue)
+				target.setValue(key.fKey, originValue);
+
+		} else if (DOUBLE == d) {
+
+			double originValue = orgin.getDouble(key.fKey);
+			double targetValue = target.getDouble(key.fKey);
+			if (targetValue != originValue)
+				target.setValue(key.fKey, originValue);
+
+		} else if (FLOAT == d) {
+
+			float originValue = orgin.getFloat(key.fKey);
+			float targetValue = target.getFloat(key.fKey);
+			if (targetValue != originValue)
+				target.setValue(key.fKey, originValue);
+
+		} else if (INT == d) {
+
+			int originValue = orgin.getInt(key.fKey);
+			int targetValue = target.getInt(key.fKey);
+			if (targetValue != originValue)
+				target.setValue(key.fKey, originValue);
+
+		} else if (LONG == d) {
+
+			long originValue = orgin.getLong(key.fKey);
+			long targetValue = target.getLong(key.fKey);
+			if (targetValue != originValue)
+				target.setValue(key.fKey, originValue);
+
+		} else if (STRING == d) {
+
+			String originValue = orgin.getString(key.fKey);
+			String targetValue = target.getString(key.fKey);
+			if (targetValue != null && originValue != null && !targetValue.equals(originValue))
+				target.setValue(key.fKey, originValue);
+
+		}
+	}
+
+	/*
+	 * @see IPreferenceStore#putValue(String, String)
+	 */
+	public void putValue(String name, String value) {
+		if (covers(name))
+			fStore.putValue(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#removePropertyChangeListener(IPropertyChangeListener)
+	 */
+	public void removePropertyChangeListener(IPropertyChangeListener listener) {
+		fStore.removePropertyChangeListener(listener);
+	}
+
+	/*
+	 * @see IPreferenceStore#setDefault(String, boolean)
+	 */
+	public void setDefault(String name, boolean value) {
+		if (covers(name))
+			fStore.setDefault(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setDefault(String, double)
+	 */
+	public void setDefault(String name, double value) {
+		if (covers(name))
+			fStore.setDefault(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setDefault(String, float)
+	 */
+	public void setDefault(String name, float value) {
+		if (covers(name))
+			fStore.setDefault(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setDefault(String, int)
+	 */
+	public void setDefault(String name, int value) {
+		if (covers(name))
+			fStore.setDefault(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setDefault(String, long)
+	 */
+	public void setDefault(String name, long value) {
+		if (covers(name))
+			fStore.setDefault(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setDefault(String, String)
+	 */
+	public void setDefault(String name, String value) {
+		if (covers(name))
+			fStore.setDefault(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setToDefault(String)
+	 */
+	public void setToDefault(String name) {
+		fStore.setToDefault(name);
+	}
+
+	/*
+	 * @see IPreferenceStore#setValue(String, boolean)
+	 */
+	public void setValue(String name, boolean value) {
+		if (covers(name))
+			fStore.setValue(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setValue(String, double)
+	 */
+	public void setValue(String name, double value) {
+		if (covers(name))
+			fStore.setValue(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setValue(String, float)
+	 */
+	public void setValue(String name, float value) {
+		if (covers(name))
+			fStore.setValue(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setValue(String, int)
+	 */
+	public void setValue(String name, int value) {
+		if (covers(name))
+			fStore.setValue(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setValue(String, long)
+	 */
+	public void setValue(String name, long value) {
+		if (covers(name))
+			fStore.setValue(name, value);
+	}
+
+	/*
+	 * @see IPreferenceStore#setValue(String, String)
+	 */
+	public void setValue(String name, String value) {
+		if (covers(name))
+			fStore.setValue(name, value);
+	}
+
+	public void start() {
+		if (fPropertyListener == null) {
+			fPropertyListener = new PropertyListener();
+			fParent.addPropertyChangeListener(fPropertyListener);
+		}
+	}
+
+	public void stop() {
+		if (fPropertyListener != null) {
+			fParent.removePropertyChangeListener(fPropertyListener);
+			fPropertyListener = null;
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/TabFolderLayout.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/TabFolderLayout.java
new file mode 100644
index 0000000..b1b8903
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/TabFolderLayout.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Layout;
+
+/**
+ * Copied from JDT
+ * 
+ * @author pavery
+ */
+public class TabFolderLayout extends Layout {
+
+	protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
+		if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
+			return new Point(wHint, hHint);
+
+		Control[] children = composite.getChildren();
+		int count = children.length;
+		int maxWidth = 0, maxHeight = 0;
+		for (int i = 0; i < count; i++) {
+			Control child = children[i];
+			Point pt = child.computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache);
+			maxWidth = Math.max(maxWidth, pt.x);
+			maxHeight = Math.max(maxHeight, pt.y);
+		}
+
+		if (wHint != SWT.DEFAULT)
+			maxWidth = wHint;
+		if (hHint != SWT.DEFAULT)
+			maxHeight = hHint;
+
+		return new Point(maxWidth, maxHeight);
+
+	}
+
+	protected void layout(Composite composite, boolean flushCache) {
+		Rectangle rect = composite.getClientArea();
+
+		Control[] children = composite.getChildren();
+		for (int i = 0; i < children.length; i++) {
+			children[i].setBounds(rect);
+		}
+	}
+}
+
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractColorPage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractColorPage.java
new file mode 100644
index 0000000..14e3b06
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractColorPage.java
@@ -0,0 +1,282 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
+
+/**
+ * @deprecated
+ */
+public abstract class AbstractColorPage extends org.eclipse.jface.preference.PreferencePage implements org.eclipse.ui.IWorkbenchPreferencePage {
+	protected OverlayPreferenceStore fOverlayStore;
+	protected StyledTextColorPicker fPicker = null;
+
+	/**
+	 * Creates the coloring group used in createContents This method can be
+	 * overwritten to set the text of the group or provide an infopop
+	 */
+	protected Composite createColoringComposite(Composite parent) {
+		Composite coloringComposite = createComposite(parent, 1);
+		return coloringComposite;
+	}
+
+	/**
+	 * Creates composite control and sets the default layout data.
+	 */
+	protected Composite createComposite(Composite parent, int numColumns) {
+		Composite composite = new Composite(parent, SWT.NULL);
+
+		//GridLayout
+		GridLayout layout = new GridLayout();
+		layout.numColumns = numColumns;
+		layout.marginHeight = 0;
+		layout.marginWidth = 0;
+		composite.setLayout(layout);
+
+		//GridData
+		GridData data = new GridData(GridData.FILL);
+		data.verticalAlignment = GridData.FILL;
+		data.horizontalAlignment = GridData.FILL;
+		composite.setLayoutData(data);
+		return composite;
+	}
+
+	protected Control createContents(Composite parent) {
+		// create scrollbars for this preference page when needed
+		final ScrolledComposite sc1 = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
+		sc1.setLayoutData(new GridData(GridData.FILL_BOTH));
+		Composite pageComponent = createComposite(sc1, 1);
+		sc1.setContent(pageComponent);
+		setSize(pageComponent);
+
+		Label descLabel = createDescriptionLabel(pageComponent, SSEUIMessages.AbstractColorPageDescription); //$NON-NLS-1$
+		Composite coloringComposite = createColoringComposite(pageComponent);
+		createContentsForPicker(coloringComposite);
+
+		GridData gd = (GridData) descLabel.getLayoutData();
+		gd.widthHint = (coloringComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT)).x;
+		setSize(pageComponent);
+		return pageComponent;
+	}
+
+	/**
+	 * Creates the StyledTextColorPicker used in createContents This method
+	 * can be overwritten to set up StyledTextColorPicker differently
+	 */
+	protected void createContentsForPicker(Composite parent) {
+		// create the color picker
+		fPicker = new StyledTextColorPicker(parent, SWT.NULL);
+		GridData data = new GridData(GridData.FILL_BOTH);
+		fPicker.setLayoutData(data);
+
+		fPicker.setPreferenceStore(fOverlayStore);
+		setupPicker(fPicker);
+
+		fPicker.setText(getSampleText());
+	}
+
+	/**
+	 * Create description label displayed at top of preference page. This
+	 * method/label is used instead of PreferencePage's description label
+	 * because the ScrolledComposite contained in this page will not fully
+	 * work (horizontal scrolling) with PreferencePage's description label.
+	 */
+	protected Label createDescriptionLabel(Composite parent, String description) {
+		Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
+		label.setText(description);
+
+		GridData data = new GridData(GridData.FILL_HORIZONTAL);
+		data.grabExcessHorizontalSpace = true;
+		label.setLayoutData(data);
+
+		return label;
+	}
+
+	/**
+	 * Creates composite control and sets the default layout data.
+	 */
+
+	protected Group createGroup(Composite parent, int numColumns) {
+		Group group = new Group(parent, SWT.NULL);
+
+		//GridLayout
+		GridLayout layout = new GridLayout();
+		layout.numColumns = numColumns;
+		group.setLayout(layout);
+
+		//GridData
+		GridData data = new GridData(GridData.FILL);
+		data.verticalAlignment = GridData.FILL;
+		data.horizontalAlignment = GridData.FILL;
+		data.grabExcessHorizontalSpace = true;
+		group.setLayoutData(data);
+
+		return group;
+	}
+
+	/**
+	 * Utility method that creates a label instance and sets the default
+	 * layout data.
+	 */
+	protected Label createLabel(Composite parent, String text) {
+		Label label = new Label(parent, SWT.LEFT);
+		label.setText(text);
+		GridData data = new GridData(GridData.FILL);
+		data.horizontalAlignment = GridData.FILL;
+		label.setLayoutData(data);
+		return label;
+	}
+
+	protected OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys() {
+		return null;
+	}
+
+	protected Button createPushButton(Composite parent, String label) {
+		Button button = new Button(parent, SWT.PUSH);
+		button.setText(label);
+		GridData data = new GridData(GridData.FILL);
+		data.horizontalAlignment = GridData.FILL;
+		button.setLayoutData(data);
+		return button;
+	}
+
+	/**
+	 * Utility method that creates a text instance and sets the default layout
+	 * data.
+	 */
+	protected Text createTextField(Composite parent, String text) {
+		Text textfield = new Text(parent, SWT.LEFT);
+		textfield.setText(text);
+		GridData data = new GridData(GridData.FILL);
+		data.horizontalAlignment = GridData.FILL;
+		textfield.setLayoutData(data);
+		return textfield;
+	}
+
+	public void dispose() {
+		super.dispose();
+		if (fPicker != null && !fPicker.isDisposed())
+			fPicker.releasePickerResources();
+		if (fOverlayStore != null) {
+			fOverlayStore.stop();
+		}
+	}
+
+	public StyledTextColorPicker getPicker() {
+		return fPicker;
+	}
+
+	public abstract String getSampleText();
+
+	/**
+	 * Initializes this preference page for the given workbench.
+	 * <p>
+	 * This method is called automatically as the preference page is being
+	 * created and initialized. Clients must not call this method.
+	 * </p>
+	 * 
+	 * @param workbench
+	 *            the workbench
+	 */
+	public void init(IWorkbench workbench) {
+		fOverlayStore = new OverlayPreferenceStore(getPreferenceStore(), createOverlayStoreKeys());
+		fOverlayStore.load();
+		fOverlayStore.start();
+	}
+
+	/**
+	 * Initializes states of the controls using default values in the
+	 * preference store.
+	 */
+	protected void performDefaults() {
+		fOverlayStore.loadDefaults();
+		fPicker.refresh();
+	}
+
+	public boolean performOk() {
+		fOverlayStore.propagate();
+		 savePreferences();
+		return true;
+	}
+	
+	protected void savePreferences() {
+		// save plugin preferences here
+	}
+
+	/**
+	 * Sets the size of composite to the default value
+	 */
+	protected void setSize(Composite composite) {
+		if (composite != null) {
+			// Note: The font is set here in anticipation that the class inheriting
+			//       this base class may add widgets to the dialog.   setSize
+			//       is assumed to be called just before we go live.
+			applyDialogFont(composite);
+			Point minSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+			composite.setSize(minSize);
+			// set scrollbar composite's min size so page is expandable but
+			// has scrollbars when needed
+			if (composite.getParent() instanceof ScrolledComposite) {
+				ScrolledComposite sc1 = (ScrolledComposite) composite.getParent();
+				sc1.setMinSize(minSize);
+				sc1.setExpandHorizontal(true);
+				sc1.setExpandVertical(true);
+			}
+		}
+	}
+
+	protected abstract void setupPicker(StyledTextColorPicker picker);
+
+	public void setVisible(boolean visible) {
+		boolean doShrink = false;
+		// limiter, for the really huge fonts
+		if (visible) {
+			getPicker().refresh();
+			int x = Math.min(getControl().getShell().getSize().x, getControl().getDisplay().getClientArea().width * 9 / 10);
+			int y = Math.min(getControl().getShell().getSize().y, getControl().getDisplay().getClientArea().height * 9 / 10);
+			boolean shrinkWidth = (x != getControl().getShell().getSize().x);
+			boolean shrinkHeight = (y != getControl().getShell().getSize().y);
+			doShrink = shrinkWidth || shrinkHeight;
+			if (doShrink) {
+				// modify just the height
+				if (shrinkHeight && !shrinkWidth)
+					getShell().setBounds(getShell().getLocation().x, 0, getShell().getSize().x, getControl().getDisplay().getClientArea().height);
+				// modify just the width
+				else if (!shrinkHeight && shrinkWidth)
+					getShell().setBounds(0, getShell().getLocation().y, getControl().getDisplay().getClientArea().width, getShell().getSize().y);
+				// change the entire shell size to only fill the display, and
+				// move it to the origin
+				else
+					getShell().setBounds(0, 0, getControl().getDisplay().getClientArea().width, getControl().getDisplay().getClientArea().height);
+			}
+		}
+		super.setVisible(visible);
+		if (doShrink) {
+			getControl().getShell().redraw();
+			getControl().getShell().update();
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractPreferencePage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractPreferencePage.java
new file mode 100644
index 0000000..0e69c18
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractPreferencePage.java
@@ -0,0 +1,296 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+/**
+ * (pa) why is this class abstract if there are no abstract methods?
+ */
+public abstract class AbstractPreferencePage extends PreferencePage implements ModifyListener, SelectionListener, IWorkbenchPreferencePage {
+
+	protected final static int WIDTH_VALIDATION_LOWER_LIMIT = 0; //$NON-NLS-1$
+	protected final static int WIDTH_VALIDATION_UPPER_LIMIT = 999; //$NON-NLS-1$
+
+	protected Button createCheckBox(Composite group, String label) {
+		Button button = new Button(group, SWT.CHECK | SWT.LEFT);
+		button.setText(label);
+
+		//GridData
+		GridData data = new GridData(GridData.FILL);
+		data.verticalAlignment = GridData.CENTER;
+		data.horizontalAlignment = GridData.FILL;
+		button.setLayoutData(data);
+
+		return button;
+	}
+	
+	protected void initCheckbox(Button box, String key) {
+		if(box != null && key != null) {
+			box.setSelection(getPreferenceStore().getBoolean(key));
+		}
+	}
+
+	protected void defaultCheckbox(Button box, String key) {
+		if(box != null && key != null) {
+			box.setSelection(getPreferenceStore().getDefaultBoolean(key));
+		}
+	}
+
+	protected Composite createComposite(Composite parent, int numColumns) {
+		Composite composite = new Composite(parent, SWT.NULL);
+
+		//GridLayout
+		GridLayout layout = new GridLayout();
+		layout.numColumns = numColumns;
+		composite.setLayout(layout);
+
+		//GridData
+		GridData data = new GridData(GridData.FILL);
+		data.horizontalIndent = 0;
+		data.verticalAlignment = GridData.FILL;
+		data.horizontalAlignment = GridData.FILL;
+		composite.setLayoutData(data);
+
+		return composite;
+	}
+
+	protected Control createContents(Composite parent) {
+		return createScrolledComposite(parent);
+	}
+
+	protected Combo createDropDownBox(Composite parent) {
+		Combo comboBox = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
+
+		//GridData
+		GridData data = new GridData();
+		data.verticalAlignment = GridData.CENTER;
+		data.horizontalAlignment = GridData.FILL;
+		data.grabExcessHorizontalSpace = true;
+		comboBox.setLayoutData(data);
+
+		return comboBox;
+	}
+
+	protected Group createGroup(Composite parent, int numColumns) {
+		Group group = new Group(parent, SWT.NULL);
+
+		//GridLayout
+		GridLayout layout = new GridLayout();
+		layout.numColumns = numColumns;
+		group.setLayout(layout);
+
+		//GridData
+		GridData data = new GridData(GridData.FILL);
+		data.horizontalIndent = 0;
+		data.verticalAlignment = GridData.FILL;
+		data.horizontalAlignment = GridData.FILL;
+		data.grabExcessHorizontalSpace = true;
+		group.setLayoutData(data);
+
+		return group;
+	}
+
+	protected Label createLabel(Composite parent, String text) {
+		Label label = new Label(parent, SWT.LEFT);
+		label.setText(text);
+
+
+		//GridData
+		GridData data = new GridData(GridData.FILL);
+		data.verticalAlignment = GridData.CENTER;
+		data.horizontalAlignment = GridData.FILL;
+		label.setLayoutData(data);
+
+		return label;
+	}
+
+	protected Button createRadioButton(Composite group, String label) {
+		Button button = new Button(group, SWT.RADIO);
+		button.setText(label);
+
+		//GridData
+		GridData data = new GridData(GridData.FILL);
+		data.verticalAlignment = GridData.CENTER;
+		data.horizontalAlignment = GridData.FILL;
+		button.setLayoutData(data);
+
+		return button;
+	}
+
+	protected Composite createScrolledComposite(Composite parent) {
+		// create scrollbars for this parent when needed
+		final ScrolledComposite sc1 = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
+		sc1.setLayoutData(new GridData(GridData.FILL_BOTH));
+		Composite composite = createComposite(sc1, 1);
+		sc1.setContent(composite);
+
+		// not calling setSize for composite will result in a blank composite,
+		// so calling it here initially
+		// setSize actually needs to be called after all controls are created,
+		// so scrolledComposite
+		// has correct minSize
+		setSize(composite);
+		return composite;
+	}
+
+	protected Label createSeparator(Composite parent, int columnSpan) {
+		// Create a spacer line
+		Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
+
+		//GridData
+		GridData data = new GridData(GridData.FILL);
+		data.verticalAlignment = GridData.CENTER;
+		data.horizontalAlignment = GridData.FILL;
+		data.horizontalSpan = columnSpan;
+
+		separator.setLayoutData(data);
+		return separator;
+	}
+
+	protected Text createTextField(Composite parent) {
+		Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
+
+		//GridData
+		GridData data = new GridData();
+		data.verticalAlignment = GridData.CENTER;
+		data.horizontalAlignment = GridData.FILL;
+		data.grabExcessHorizontalSpace = true;
+		text.setLayoutData(data);
+
+		return text;
+	}
+
+	protected void enableValues() {
+	}
+
+	protected Preferences getModelPreferences() {
+		return SSECorePlugin.getDefault().getPluginPreferences();
+	}
+
+	public void init(IWorkbench workbench) {
+	}
+
+	protected void initializeValues() {
+	}
+
+	protected boolean loadPreferences() {
+		BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
+			public void run() {
+				initializeValues();
+				validateValues();
+				enableValues();
+			}
+		});
+		return true;
+	}
+
+	public void modifyText(ModifyEvent e) {
+		// If we are called too early, i.e. before the controls are created
+		// then return
+		// to avoid null pointer exceptions
+		if (e.widget != null && e.widget.isDisposed())
+			return;
+
+		validateValues();
+		enableValues();
+	}
+
+	protected void performDefaults() {
+		super.performDefaults();
+	}
+
+	public boolean performOk() {
+		savePreferences();
+		return true;
+	}
+
+	protected boolean savePreferences() {
+		BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
+			public void run() {
+				storeValues();
+			}
+		});
+		return true;
+	}
+
+	protected void setInvalidInputMessage(String widthText) {
+		String msg = NLS.bind(SSEUIMessages._4concat, (new Object[]{widthText}));
+		setErrorMessage(msg);
+	}
+
+	protected void setSize(Composite composite) {
+		if (composite != null) {
+			// Note: The font is set here in anticipation that the class inheriting
+			//       this base class may add widgets to the dialog.   setSize
+			//       is assumed to be called just before we go live.
+			applyDialogFont(composite);
+			Point minSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+			composite.setSize(minSize);
+			// set scrollbar composite's min size so page is expandable but
+			// has scrollbars when needed
+			if (composite.getParent() instanceof ScrolledComposite) {
+				ScrolledComposite sc1 = (ScrolledComposite) composite.getParent();
+				sc1.setMinSize(minSize);
+				sc1.setExpandHorizontal(true);
+				sc1.setExpandVertical(true);
+			}
+		}
+	}
+
+	protected void storeValues() {
+		SSEUIPlugin.getDefault().savePluginPreferences();
+	}
+
+	protected void validateValues() {
+	}
+
+	public void widgetDefaultSelected(SelectionEvent e) {
+		widgetSelected(e);
+	}
+
+	public void widgetSelected(SelectionEvent e) {
+		// If we are called too early, i.e. before the controls are created
+		// then return
+		// to avoid null pointer exceptions
+		if (e.widget != null && e.widget.isDisposed())
+			return;
+
+		validateValues();
+		enableValues();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractPreferenceTab.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractPreferenceTab.java
new file mode 100644
index 0000000..4af18ad
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractPreferenceTab.java
@@ -0,0 +1,266 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
+
+/**
+ * Generic preference tab page that contains helpful methods
+ * 
+ * @author amywu
+ */
+abstract public class AbstractPreferenceTab implements IPreferenceTab {
+
+	Map fCheckBoxes = new HashMap();
+	private SelectionListener fCheckBoxListener = new SelectionListener() {
+		public void widgetDefaultSelected(SelectionEvent e) {
+		}
+
+		public void widgetSelected(SelectionEvent e) {
+			Button button = (Button) e.widget;
+			fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection());
+		}
+	};
+	private PreferencePage fMainPreferencePage;
+	private ModifyListener fNumberFieldListener = new ModifyListener() {
+		public void modifyText(ModifyEvent e) {
+			numberFieldChanged((Text) e.widget);
+		}
+	};
+	private ArrayList fNumberFields = new ArrayList();
+	OverlayPreferenceStore fOverlayStore;
+	private ModifyListener fTextFieldListener = new ModifyListener() {
+		public void modifyText(ModifyEvent e) {
+			Text text = (Text) e.widget;
+			fOverlayStore.setValue((String) fTextFields.get(text), text.getText());
+		}
+	};
+	Map fTextFields = new HashMap();
+
+	protected Button addCheckBox(Composite parent, String label, String key, int indentation) {
+		Button checkBox = new Button(parent, SWT.CHECK);
+		checkBox.setText(label);
+
+		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+		gd.horizontalIndent = indentation;
+		gd.horizontalSpan = 2;
+		checkBox.setLayoutData(gd);
+		checkBox.addSelectionListener(fCheckBoxListener);
+
+		fCheckBoxes.put(checkBox, key);
+
+		return checkBox;
+	}
+
+	/**
+	 * Returns an array of size 2: - first element is of type
+	 * <code>Label</code>- second element is of type <code>Text</code>
+	 * Use <code>getLabelControl</code> and <code>getTextControl</code> to
+	 * get the 2 controls.
+	 */
+	private Control[] addLabelledTextField(Composite composite, String label, String key, int textLimit, int indentation, boolean isNumber) {
+		Label labelControl = new Label(composite, SWT.NONE);
+		labelControl.setText(label);
+		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+		gd.horizontalIndent = indentation;
+		labelControl.setLayoutData(gd);
+
+		Text textControl = new Text(composite, SWT.BORDER | SWT.SINGLE);
+		gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+		gd.widthHint = convertWidthInCharsToPixels(textControl, textLimit + 1);
+		textControl.setLayoutData(gd);
+		textControl.setTextLimit(textLimit);
+		fTextFields.put(textControl, key);
+		if (isNumber) {
+			fNumberFields.add(textControl);
+			textControl.addModifyListener(fNumberFieldListener);
+		} else {
+			textControl.addModifyListener(fTextFieldListener);
+		}
+
+		return new Control[]{labelControl, textControl};
+	}
+
+	protected Text addTextField(Composite composite, String label, String key, int textLimit, int indentation, boolean isNumber) {
+		return getTextControl(addLabelledTextField(composite, label, key, textLimit, indentation, isNumber));
+	}
+
+	/**
+	 * Applies the status to the status line of a dialog page.
+	 */
+	private void applyToStatusLine(IStatus status) {
+		String message = status.getMessage();
+		switch (status.getSeverity()) {
+			case IStatus.OK :
+				fMainPreferencePage.setMessage(message, IMessageProvider.NONE);
+				fMainPreferencePage.setErrorMessage(null);
+				break;
+			case IStatus.WARNING :
+				fMainPreferencePage.setMessage(message, IMessageProvider.WARNING);
+				fMainPreferencePage.setErrorMessage(null);
+				break;
+			case IStatus.INFO :
+				fMainPreferencePage.setMessage(message, IMessageProvider.INFORMATION);
+				fMainPreferencePage.setErrorMessage(null);
+				break;
+			default :
+				if (message.length() == 0) {
+					message = null;
+				}
+				fMainPreferencePage.setMessage(null);
+				fMainPreferencePage.setErrorMessage(message);
+				break;
+		}
+	}
+
+	/**
+	 * Returns the number of pixels corresponding to the width of the given
+	 * number of characters. This method was copied from
+	 * org.eclipse.jface.dialogs.DialogPage
+	 * <p>
+	 * 
+	 * @param a
+	 *            control in the page
+	 * @param chars
+	 *            the number of characters
+	 * @return the number of pixels
+	 */
+	private int convertWidthInCharsToPixels(Control testControl, int chars) {
+		// Compute and store a font metric
+		GC gc = new GC(testControl);
+		gc.setFont(JFaceResources.getDialogFont());
+		FontMetrics fontMetrics = gc.getFontMetrics();
+		gc.dispose();
+
+		// test for failure to initialize for backward compatibility
+		if (fontMetrics == null)
+			return 0;
+		return Dialog.convertWidthInCharsToPixels(fontMetrics, chars);
+	}
+
+	/**
+	 * @return Returns the fMainPreferencePage.
+	 */
+	protected PreferencePage getMainPreferencePage() {
+		return fMainPreferencePage;
+	}
+
+	/**
+	 * @return Returns the fOverlayStore.
+	 */
+	protected OverlayPreferenceStore getOverlayStore() {
+		return fOverlayStore;
+	}
+
+	private Text getTextControl(Control[] labelledTextField) {
+		return (Text) labelledTextField[1];
+	}
+
+	protected void initializeFields() {
+		Iterator e = fCheckBoxes.keySet().iterator();
+		while (e.hasNext()) {
+			Button b = (Button) e.next();
+			String key = (String) fCheckBoxes.get(b);
+			b.setSelection(fOverlayStore.getBoolean(key));
+		}
+
+		e = fTextFields.keySet().iterator();
+		while (e.hasNext()) {
+			Text t = (Text) e.next();
+			String key = (String) fTextFields.get(t);
+			t.setText(fOverlayStore.getString(key));
+		}
+	}
+
+	void numberFieldChanged(Text textControl) {
+		String number = textControl.getText();
+		IStatus status = validatePositiveNumber(number);
+		if (!status.matches(IStatus.ERROR))
+			fOverlayStore.setValue((String) fTextFields.get(textControl), number);
+		updateStatus(status);
+	}
+
+	/**
+	 * @param mainPreferencePage
+	 *            The fMainPreferencePage to set.
+	 */
+	protected void setMainPreferencePage(PreferencePage mainPreferencePage) {
+		fMainPreferencePage = mainPreferencePage;
+	}
+
+	/**
+	 * @param overlayStore
+	 *            The fOverlayStore to set.
+	 */
+	protected void setOverlayStore(OverlayPreferenceStore overlayStore) {
+		fOverlayStore = overlayStore;
+	}
+
+	/**
+	 * Update status of main preference page
+	 * 
+	 * @param status
+	 */
+	protected void updateStatus(IStatus status) {
+		if (!status.matches(IStatus.ERROR)) {
+			for (int i = 0; i < fNumberFields.size(); i++) {
+				Text text = (Text) fNumberFields.get(i);
+				IStatus s = validatePositiveNumber(text.getText());
+				status = s.getSeverity() > status.getSeverity() ? s : status;
+			}
+		}
+
+		fMainPreferencePage.setValid(!status.matches(IStatus.ERROR));
+		applyToStatusLine(status);
+	}
+
+	private IStatus validatePositiveNumber(String number) {
+		StatusInfo status = new StatusInfo();
+		if (number.length() == 0) {
+			status.setError(SSEUIMessages.StructuredTextEditorPreferencePage_37);
+		} else {
+			try {
+				int value = Integer.parseInt(number);
+				if (value < 0)
+					status.setError(number + SSEUIMessages.StructuredTextEditorPreferencePage_38);
+			} catch (NumberFormatException e) {
+				status.setError(number + SSEUIMessages.StructuredTextEditorPreferencePage_38);
+			}
+		}
+		return status;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorEditor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorEditor.java
new file mode 100644
index 0000000..fc1d168
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorEditor.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleControlAdapter;
+import org.eclipse.swt.accessibility.AccessibleControlEvent;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.ColorDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * A "button" of a certain color determined by the color picker.
+ */
+public class ColorEditor {
+	Button fButton;
+	Color fColor;
+	RGB fColorValue;
+
+	private Point fExtent;
+	Image fImage;
+
+	public ColorEditor(Composite parent) {
+
+		fButton = new Button(parent, SWT.PUSH);
+		fExtent = computeImageSize(parent);
+		fImage = new Image(parent.getDisplay(), fExtent.x, fExtent.y);
+
+		GC gc = new GC(fImage);
+		gc.setBackground(fButton.getBackground());
+		gc.fillRectangle(0, 0, fExtent.x, fExtent.y);
+		gc.dispose();
+
+		fButton.setImage(fImage);
+
+		// bug2541 - associate color value to button's value field
+		fButton.getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
+			/**
+			 * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getValue(AccessibleControlEvent)
+			 */
+			public void getValue(AccessibleControlEvent e) {
+				if (e.childID == ACC.CHILDID_SELF) {
+					if (getColorValue() != null)
+						e.result = getColorValue().toString();
+					else
+						e.result = null;
+				}
+			}
+		});
+
+		fButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent event) {
+				ColorDialog colorDialog = new ColorDialog(fButton.getShell());
+				colorDialog.setRGB(fColorValue);
+				RGB newColor = colorDialog.open();
+				if (newColor != null) {
+					fColorValue = newColor;
+					updateColorImage();
+				}
+			}
+		});
+
+		fButton.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent event) {
+				if (fImage != null) {
+					fImage.dispose();
+					fImage = null;
+				}
+				if (fColor != null) {
+					fColor.dispose();
+					fColor = null;
+				}
+			}
+		});
+	}
+
+	protected Point computeImageSize(Control window) {
+		GC gc = new GC(window);
+		Font f = JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT);
+		gc.setFont(f);
+		int height = gc.getFontMetrics().getHeight();
+		gc.dispose();
+		Point p = new Point(height * 3 - 6, height);
+		return p;
+	}
+
+	public Button getButton() {
+		return fButton;
+	}
+
+	public RGB getColorValue() {
+		return fColorValue;
+	}
+
+	public void setColorValue(RGB rgb) {
+		fColorValue = rgb;
+		updateColorImage();
+	}
+
+	protected void updateColorImage() {
+
+		Display display = fButton.getDisplay();
+
+		GC gc = new GC(fImage);
+		gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
+		gc.drawRectangle(0, 2, fExtent.x - 1, fExtent.y - 4);
+
+		if (fColor != null)
+			fColor.dispose();
+
+		fColor = new Color(display, fColorValue);
+		gc.setBackground(fColor);
+		gc.fillRectangle(1, 3, fExtent.x - 2, fExtent.y - 5);
+		gc.dispose();
+
+		fButton.setImage(fImage);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorHelper.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorHelper.java
new file mode 100644
index 0000000..684da7b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorHelper.java
@@ -0,0 +1,230 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+
+
+import org.eclipse.jface.resource.ColorRegistry;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+import com.ibm.icu.util.StringTokenizer;
+
+
+public class ColorHelper {
+	public final static String BACKGROUND = "background";//$NON-NLS-1$
+	public final static String BOLD = "bold";//$NON-NLS-1$
+	public final static String FOREGROUND = "foreground";//$NON-NLS-1$
+	public final static String NAME = "name";//$NON-NLS-1$
+	private final static String STYLE_SEPARATOR = "|"; //$NON-NLS-1$ 
+	private final static String NULL = "null"; //$NON-NLS-1$
+
+	/**
+	 * Return an RGB String given the int r, g, b values
+	 */
+	public static String getColorString(int r, int g, int b) {
+		return "#" + getHexString(r, 2) + getHexString(g, 2) + getHexString(b, 2);//$NON-NLS-1$
+	}
+
+	private static String getHexString(int value, int minWidth) {
+		String hexString = Integer.toHexString(value);
+		for (int i = hexString.length(); i < minWidth; i++) {
+			hexString = "0" + hexString;//$NON-NLS-1$
+		}
+		return hexString;
+	}
+
+	/**
+	 * Generates a preference string to be placed in preferences from the
+	 * given String array.
+	 * 
+	 * @param stylePrefs
+	 *            assumes not null and should be in the form of String[0] =
+	 *            Foreground RGB String, String[1] = Background RGB String,
+	 *            String[2] = Bold true/false
+	 * 
+	 * @return String in the form of Foreground RGB String | Background RGB
+	 *         String | Bold true/false
+	 */
+	public static String packStylePreferences(String[] stylePrefs) {
+		StringBuffer styleString = new StringBuffer();
+
+		for (int i = 0; i < stylePrefs.length; ++i) {
+			String s = stylePrefs[i];
+			if (i < 2) {
+				if (s != null) {
+					styleString.append(s);
+				}
+				else {
+					styleString.append(NULL);
+				}
+			}
+			else {
+				styleString.append(Boolean.valueOf(s));
+			}
+
+			// add in the separator (except on last iteration)
+			if (i < stylePrefs.length - 1) {
+				styleString.append(" " + STYLE_SEPARATOR + " "); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+
+		return styleString.toString();
+	}
+
+	/**
+	 * @return org.eclipse.swt.graphics.RGB
+	 * @param anRGBString
+	 *            java.lang.String
+	 */
+	public static RGB toRGB(String anRGBString) {
+		RGB result = null;
+		if (anRGBString.length() > 6 && anRGBString.charAt(0) == '#') {
+			int r = 0;
+			int g = 0;
+			int b = 0;
+			try {
+				r = Integer.valueOf(anRGBString.substring(1, 3), 16).intValue();
+				g = Integer.valueOf(anRGBString.substring(3, 5), 16).intValue();
+				b = Integer.valueOf(anRGBString.substring(5, 7), 16).intValue();
+				result = new RGB(r, g, b);
+			} catch (NumberFormatException nfExc) {
+				Logger.logException("Could not load highlighting preference for color " + anRGBString, nfExc);//$NON-NLS-1$
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * @return java.lang.String
+	 * @param anRGB
+	 *            org.eclipse.swt.graphics.RGB
+	 */
+	public static String toRGBString(RGB anRGB) {
+		if (anRGB == null)
+			return "#000000";//$NON-NLS-1$
+		String red = Integer.toHexString(anRGB.red);
+		while (red.length() < 2)
+			red = "0" + red;//$NON-NLS-1$
+		String green = Integer.toHexString(anRGB.green);
+		while (green.length() < 2)
+			green = "0" + green;//$NON-NLS-1$
+		String blue = Integer.toHexString(anRGB.blue);
+		while (blue.length() < 2)
+			blue = "0" + blue;//$NON-NLS-1$
+		return "#" + red + green + blue;//$NON-NLS-1$
+	}
+
+	/**
+	 * Extracts the foreground (RGB String), background (RGB String), bold
+	 * (boolean String) from the given preference string.
+	 * 
+	 * @param preference
+	 *            should be in the form of Foreground RGB String | Background
+	 *            RGB String | Bold true/false | Italic true/false | Strikethrough true/false | Underline true/false
+	 * @return String[] where String[0] = Foreground RGB String, String[1] =
+	 *         Background RGB String, String[2] = Bold true/false, 3 = Italic
+	 *         true/false, 4 = Strikethrough true/false, 5 = Underline
+	 *         true/false; indexes 2-4 may be null if we ran into problems
+	 *         extracting
+	 */
+	public static String[] unpackStylePreferences(String preference) {
+		String[] stylePrefs = new String[6];
+		if (preference != null) {
+			StringTokenizer st = new StringTokenizer(preference, STYLE_SEPARATOR);
+			if (st.hasMoreTokens()) {
+				String foreground = st.nextToken().trim();
+				stylePrefs[0] = foreground;
+			}
+			else {
+				stylePrefs[0] = NULL;
+			}
+			if (st.hasMoreTokens()) {
+				String background = st.nextToken().trim();
+				stylePrefs[1] = background;
+			}
+			else {
+				stylePrefs[1] = NULL;
+			}
+
+			if (st.hasMoreTokens()) {
+				String bold = st.nextToken().trim();
+				stylePrefs[2] = Boolean.valueOf(bold).toString();
+			}
+			else {
+				stylePrefs[2] = Boolean.FALSE.toString();
+			}
+			if (st.hasMoreTokens()) {
+				String italic = st.nextToken().trim();
+				stylePrefs[3] = Boolean.valueOf(italic).toString();
+			}
+			else {
+				stylePrefs[3] = Boolean.FALSE.toString();
+			}
+			if (st.hasMoreTokens()) {
+				String strikethrough = st.nextToken().trim();
+				stylePrefs[4] = Boolean.valueOf(strikethrough).toString();
+			}
+			else {
+				stylePrefs[4] = Boolean.FALSE.toString();
+			}
+			if (st.hasMoreTokens()) {
+				String underline = st.nextToken().trim();
+				stylePrefs[5] = Boolean.valueOf(underline).toString();
+			}
+			else {
+				stylePrefs[5] = Boolean.FALSE.toString();
+			}
+		}
+
+		return stylePrefs;
+	}
+	
+	/**
+	 * Attempts to lookup the RGB value for <code>key</code> from the color
+	 * registry. If one is not found, the <code>defaultRGB</code> is used.
+	 * @param registry The ColorRegistry to search for the RGB value
+	 * @param key The key that the RGB value is stored under in the registry
+	 * @param defaultRGB The default RGB value to return in the absence of one
+	 * from the color registry
+	 * 
+	 * @return The RGB value from the color registry for a given key, if it exists.
+	 * Otherwise, return the default RGB value.
+	 */
+	public static RGB findRGB(ColorRegistry registry, String key, RGB defaultRGB) {
+		if(registry.hasValueFor(key))
+			return registry.getRGB(key);
+		return defaultRGB;
+	}
+	
+	/**
+	 * Attempts to find the RGB string for <code>key</code> from the color registry.
+	 * If one is not found, an RGB string is generated from the parameters <code>r,g,b</code>.
+	 * 
+	 * @param registry The ColorRegistry to search for the RGB value
+	 * @param key The key that the RGB value is stored under in the registry
+	 * @param r The default red value
+	 * @param g The default green value
+	 * @param b The default blue value
+	 * 
+	 * @return The String RGB value from the color registry for a given key, if it exists.
+	 * Otherwise, return the string RGB value created from the default r,g,b parameters.
+	 * 
+	 */
+	public static String findRGBString(ColorRegistry registry, String key, int r, int g, int b) {
+		if(registry.hasValueFor(key))
+			return toRGBString(registry.getRGB(key));
+		return getColorString(r, g, b);
+	}
+	
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorNames.java
similarity index 61%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorNames.java
index 607270a..2d0c993 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorNames.java
@@ -10,11 +10,18 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
 
 
-package org.eclipse.wst.xml.ui.internal.dialogs;
 
-public interface UpdateListener {
+public interface ColorNames {
+	String BACKGROUND = "background"; //$NON-NLS-1$
+	String BOLD = "bold"; //$NON-NLS-1$
+	String COLOR = "color"; //$NON-NLS-1$
 
-	public void updateOccured(Object object, Object arg);
+	String COLORS = "colors"; //$NON-NLS-1$
+	String FOREGROUND = "foreground"; //$NON-NLS-1$
+	String ITALIC = "italic"; //$NON-NLS-1$
+
+	String NAME = "name"; //$NON-NLS-1$
 }
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/EmptyFilePreferencePage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/EmptyFilePreferencePage.java
similarity index 92%
rename from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/EmptyFilePreferencePage.java
rename to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/EmptyFilePreferencePage.java
index 9870632..6536e9a 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/EmptyFilePreferencePage.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/EmptyFilePreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,9 +8,9 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *
+ *     
  *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
 
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.swt.SWT;
@@ -23,13 +23,13 @@
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
 
 public class EmptyFilePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
 
 	private Composite createComposite(Composite parent, int numColumns) {
 		noDefaultAndApplyButton();
-
+		
 		Composite composite = new Composite(parent, SWT.NULL);
 
 		// GridLayout
@@ -50,7 +50,7 @@
 	protected Control createContents(Composite parent) {
 		Composite composite = createScrolledComposite(parent);
 
-		String description = XMLUIMessages.EmptyFilePreferencePage_0; 
+		String description = SSEUIMessages.EmptyFilePreferencePage_0; //$NON-NLS-1$
 		Text text = new Text(composite, SWT.READ_ONLY);
 		// some themes on GTK have different background colors for Text and Labels
 		text.setBackground(composite.getBackground());
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/FilePreferencePage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/FilePreferencePage.java
new file mode 100644
index 0000000..6c86535
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/FilePreferencePage.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.preferences.TabFolderLayout;
+
+public class FilePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+	private IPreferenceTab[] fTabs = null;
+
+	protected Composite createComposite(Composite parent, int numColumns) {
+		Composite composite = new Composite(parent, SWT.NULL);
+
+		//GridLayout
+		GridLayout layout = new GridLayout();
+		layout.numColumns = numColumns;
+		composite.setLayout(layout);
+
+		//GridData
+		GridData data = new GridData(GridData.FILL);
+		data.horizontalIndent = 0;
+		data.verticalAlignment = GridData.FILL_VERTICAL;
+		data.horizontalAlignment = GridData.FILL_HORIZONTAL;
+		composite.setLayoutData(data);
+
+		return composite;
+	}
+
+	protected Control createContents(Composite parent) {
+		Composite composite = createComposite(parent, 1);
+
+		String description = SSEUIMessages.FilePreferencePage_0; //$NON-NLS-1$
+		createLabel(composite, description);
+		createLabel(composite, ""); //$NON-NLS-1$
+
+		TabFolder folder = new TabFolder(composite, SWT.NONE);
+		folder.setLayout(new TabFolderLayout());
+		folder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+//		TabItem taskItem = new TabItem(folder, SWT.NONE);
+//		IPreferenceTab tasksTab = new TaskTagPreferenceTab();
+//		taskItem.setText(tasksTab.getTitle());
+//		Control taskTags = tasksTab.createContents(folder);
+//		taskItem.setControl(taskTags);
+
+		TabItem translucenceItem = new TabItem(folder, SWT.NONE);
+		IPreferenceTab translucenceTab = new TranslucencyPreferenceTab(this);
+		translucenceItem.setText(translucenceTab.getTitle());
+		Control translucenceControl = translucenceTab.createContents(folder);
+		translucenceItem.setControl(translucenceControl);
+
+		fTabs = new IPreferenceTab[]{/*tasksTab,*/ translucenceTab};
+
+		return composite;
+	}
+
+	protected Label createLabel(Composite parent, String text) {
+		Label label = new Label(parent, SWT.LEFT);
+		label.setText(text);
+
+		//GridData
+		GridData data = new GridData(GridData.FILL);
+		data.horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
+		label.setLayoutData(data);
+
+		return label;
+	}
+
+	public void init(IWorkbench desktop) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.preference.PreferencePage#performApply()
+	 */
+	protected void performApply() {
+		super.performApply();
+		for (int i = 0; i < fTabs.length; i++) {
+			fTabs[i].performApply();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
+	 */
+	protected void performDefaults() {
+		super.performDefaults();
+		for (int i = 0; i < fTabs.length; i++) {
+			fTabs[i].performDefaults();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.preference.IPreferencePage#performOk()
+	 */
+	public boolean performOk() {
+		boolean ok = super.performOk();
+		for (int i = 0; i < fTabs.length; i++) {
+			fTabs[i].performOk();
+		}
+		SSECorePlugin.getDefault().savePluginPreferences();
+		return ok;
+	}
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/IPreferenceTab.java
similarity index 66%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/IPreferenceTab.java
index 607270a..2ccb563 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/IPreferenceTab.java
@@ -10,11 +10,20 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
 
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
 
-package org.eclipse.wst.xml.ui.internal.dialogs;
+public interface IPreferenceTab {
 
-public interface UpdateListener {
+	Control createContents(Composite tabFolder);
 
-	public void updateOccured(Object object, Object arg);
+	String getTitle();
+
+	void performApply();
+
+	void performDefaults();
+
+	void performOk();
 }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ScrolledPageContent.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ScrolledPageContent.java
new file mode 100644
index 0000000..e1f9c43
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ScrolledPageContent.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.SharedScrolledComposite;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+public class ScrolledPageContent extends SharedScrolledComposite {
+
+	private FormToolkit fToolkit;
+	
+	public ScrolledPageContent(Composite parent) {
+		this(parent, SWT.V_SCROLL | SWT.H_SCROLL);
+	}
+	
+	public ScrolledPageContent(Composite parent, int style) {
+		super(parent, style);
+		
+		setExpandHorizontal(true);
+		setExpandVertical(true);
+		
+		fToolkit = SSEUIPlugin.getInstance().getDialogsFormToolkit();
+		
+		Composite body= new Composite(this, SWT.NONE);
+		body.setFont(parent.getFont());
+		setContent(body);
+	}
+	
+	public void adaptChild(Control childControl) {
+		fToolkit.adapt(childControl, true, true);
+	}
+	
+	public Composite getBody() {
+		return (Composite) getContent();
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StatusInfo.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StatusInfo.java
new file mode 100644
index 0000000..c783131
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StatusInfo.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.util.Assert;
+import org.eclipse.ui.editors.text.EditorsUI;
+
+/**
+ * A settable IStatus. Can be an error, warning, info or ok. For error, info
+ * and warning states, a message describes the problem.
+ * 
+ * This class was copied from other StatusInfo classes that are located in
+ * internal packages
+ */
+class StatusInfo implements IStatus {
+	/** The severity of this status. */
+	private int fSeverity;
+
+	/** The message of this status. */
+	private String fStatusMessage;
+
+	/**
+	 * Creates a status set to OK (no message).
+	 */
+	public StatusInfo() {
+		this(OK, null);
+	}
+
+	/**
+	 * Creates a status with the given severity and message.
+	 * 
+	 * @param severity
+	 *            the severity of this status: ERROR, WARNING, INFO and OK.
+	 * @param message
+	 *            the message of this status. Applies only for ERROR, WARNING
+	 *            and INFO.
+	 */
+	public StatusInfo(int severity, String message) {
+		fStatusMessage = message;
+		fSeverity = severity;
+	}
+
+	/**
+	 * Returns always <code>null</code>.
+	 * 
+	 * @see IStatus#getChildren()
+	 */
+	public IStatus[] getChildren() {
+		return new IStatus[0];
+	}
+
+	/**
+	 * Returns always the error severity.
+	 * 
+	 * @see IStatus#getCode()
+	 */
+	public int getCode() {
+		return fSeverity;
+	}
+
+	/**
+	 * Returns always <code>null</code>.
+	 * 
+	 * @see IStatus#getException()
+	 */
+	public Throwable getException() {
+		return null;
+	}
+
+	/*
+	 * @see IStatus#getMessage()
+	 */
+	public String getMessage() {
+		return fStatusMessage;
+	}
+
+	/*
+	 * @see IStatus#getPlugin()
+	 */
+	public String getPlugin() {
+		return EditorsUI.PLUGIN_ID;
+	}
+
+	/*
+	 * @see IStatus#getSeverity()
+	 */
+	public int getSeverity() {
+		return fSeverity;
+	}
+
+	/**
+	 * Returns whether this status indicates an error.
+	 * 
+	 * @return <code>true</code> if this status has severity
+	 *         {@link IStatus#ERROR}and <code>false</code> otherwise
+	 */
+	public boolean isError() {
+		return fSeverity == IStatus.ERROR;
+	}
+
+	/**
+	 * Returns whether this status indicates an info.
+	 * 
+	 * @return <code>true</code> if this status has severity
+	 *         {@link IStatus#INFO}and <code>false</code> otherwise
+	 */
+	public boolean isInfo() {
+		return fSeverity == IStatus.INFO;
+	}
+
+	/**
+	 * Returns always <code>false</code>.
+	 * 
+	 * @see IStatus#isMultiStatus()
+	 */
+	public boolean isMultiStatus() {
+		return false;
+	}
+
+	/*
+	 * @see org.eclipse.core.runtime.IStatus#isOK()
+	 */
+	public boolean isOK() {
+		return fSeverity == IStatus.OK;
+	}
+
+	/**
+	 * Returns whether this status indicates a warning.
+	 * 
+	 * @return <code>true</code> if this status has severity
+	 *         {@link IStatus#WARNING}and <code>false</code> otherwise
+	 */
+	public boolean isWarning() {
+		return fSeverity == IStatus.WARNING;
+	}
+
+	/*
+	 * @see IStatus#matches(int)
+	 */
+	public boolean matches(int severityMask) {
+		return (fSeverity & severityMask) != 0;
+	}
+
+	/**
+	 * Sets the status to ERROR.
+	 * 
+	 * @param errorMessage
+	 *            the error message which can be an empty string, but not
+	 *            <code>null</code>
+	 */
+	public void setError(String errorMessage) {
+		Assert.isNotNull(errorMessage);
+		fStatusMessage = errorMessage;
+		fSeverity = IStatus.ERROR;
+	}
+
+	/**
+	 * Sets the status to INFO.
+	 * 
+	 * @param infoMessage
+	 *            the info message which can be an empty string, but not
+	 *            <code>null</code>
+	 */
+	public void setInfo(String infoMessage) {
+		Assert.isNotNull(infoMessage);
+		fStatusMessage = infoMessage;
+		fSeverity = IStatus.INFO;
+	}
+
+	/**
+	 * Sets the status to OK.
+	 */
+	public void setOK() {
+		fStatusMessage = null;
+		fSeverity = IStatus.OK;
+	}
+
+	/**
+	 * Sets the status to WARNING.
+	 * 
+	 * @param warningMessage
+	 *            the warning message which can be an empty string, but not
+	 *            <code>null</code>
+	 */
+	public void setWarning(String warningMessage) {
+		Assert.isNotNull(warningMessage);
+		fStatusMessage = warningMessage;
+		fSeverity = IStatus.WARNING;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StructuredTextEditorPreferencePage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StructuredTextEditorPreferencePage.java
new file mode 100644
index 0000000..dd9ee29
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StructuredTextEditorPreferencePage.java
@@ -0,0 +1,461 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.DialogPage;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferenceLinkArea;
+import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
+import org.eclipse.wst.sse.ui.internal.preferences.TabFolderLayout;
+import org.eclipse.wst.sse.ui.internal.projection.AbstractStructuredFoldingStrategy;
+import org.eclipse.wst.sse.ui.internal.provisional.preferences.CommonEditorPreferenceNames;
+
+/**
+ * Gutted version of JavaEditorPreferencePage
+ * 
+ * @author pavery
+ */
+public class StructuredTextEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+	private ColorEditor fAppearanceColorEditor;
+	private List fAppearanceColorList;
+
+	private final String[][] fAppearanceColorListModel = new String[][]{{SSEUIMessages.StructuredTextEditorPreferencePage_2, EditorPreferenceNames.MATCHING_BRACKETS_COLOR}, {SSEUIMessages.StructuredTextEditorPreferencePage_41, EditorPreferenceNames.CODEASSIST_PROPOSALS_BACKGROUND}, {SSEUIMessages.StructuredTextEditorPreferencePage_42, EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND}, {SSEUIMessages.StructuredTextEditorPreferencePage_43, EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND}, {SSEUIMessages.StructuredTextEditorPreferencePage_44, EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND}}; //$NON-NLS-1$
+	private Map fCheckBoxes = new HashMap();
+	private SelectionListener fCheckBoxListener = new SelectionListener() {
+		public void widgetDefaultSelected(SelectionEvent e) {
+		}
+
+		public void widgetSelected(SelectionEvent e) {
+			Button button = (Button) e.widget;
+			fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection());
+		}
+	};
+
+	private Map fColorButtons = new HashMap();
+
+	private ArrayList fNumberFields = new ArrayList();
+	private OverlayPreferenceStore fOverlayStore;
+	/** Button controlling default setting of the selected reference provider. */
+	// TODO: private field never read locally
+	Button fSetDefaultButton;
+	private IPreferenceTab[] fTabs = null;
+	private Map fTextFields = new HashMap();
+
+	public StructuredTextEditorPreferencePage() {
+		setDescription(SSEUIMessages.StructuredTextEditorPreferencePage_6); //$NON-NLS-1$
+		setPreferenceStore(SSEUIPlugin.getDefault().getPreferenceStore());
+
+		fOverlayStore = new OverlayPreferenceStore(getPreferenceStore(), createOverlayStoreKeys());
+	}
+
+	private Button addCheckBox(Composite parent, String label, String key, int indentation) {
+		Button checkBox = new Button(parent, SWT.CHECK);
+		checkBox.setText(label);
+
+		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+		gd.horizontalIndent = indentation;
+		gd.horizontalSpan = 2;
+		checkBox.setLayoutData(gd);
+		checkBox.addSelectionListener(fCheckBoxListener);
+
+		fCheckBoxes.put(checkBox, key);
+
+		return checkBox;
+	}
+
+	/**
+	 * Applies the status to the status line of a dialog page.
+	 */
+	public void applyToStatusLine(DialogPage page, IStatus status) {
+		String message = status.getMessage();
+		switch (status.getSeverity()) {
+			case IStatus.OK :
+				page.setMessage(message, IMessageProvider.NONE);
+				page.setErrorMessage(null);
+				break;
+			case IStatus.WARNING :
+				page.setMessage(message, IMessageProvider.WARNING);
+				page.setErrorMessage(null);
+				break;
+			case IStatus.INFO :
+				page.setMessage(message, IMessageProvider.INFORMATION);
+				page.setErrorMessage(null);
+				break;
+			default :
+				if (message.length() == 0) {
+					message = null;
+				}
+				page.setMessage(null);
+				page.setErrorMessage(message);
+				break;
+		}
+	}
+
+	private Control createAppearancePage(Composite parent) {
+		Composite appearanceComposite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 2;
+		appearanceComposite.setLayout(layout);
+
+		String label = SSEUIMessages.StructuredTextEditorPreferencePage_20; //$NON-NLS-1$
+		addCheckBox(appearanceComposite, label, EditorPreferenceNames.MATCHING_BRACKETS, 0);
+
+		label = SSEUIMessages.StructuredTextEditorPreferencePage_30; //$NON-NLS-1$
+		addCheckBox(appearanceComposite, label, CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS, 0);
+
+		PreferenceLinkArea contentTypeArea = new PreferenceLinkArea(appearanceComposite, SWT.NONE, "ValidationPreferencePage", SSEUIMessages.StructuredTextEditorPreferencePage_40, (IWorkbenchPreferenceContainer) getContainer(), null); //$NON-NLS-1$
+
+		GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
+		data.horizontalIndent = 20;
+		contentTypeArea.getControl().setLayoutData(data);
+
+		label = SSEUIMessages.StructuredTextEditorPreferencePage_39;
+		addCheckBox(appearanceComposite, label, EditorPreferenceNames.SHOW_UNKNOWN_CONTENT_TYPE_MSG, 0);
+
+		label = SSEUIMessages.StructuredTextEditorPreferencePage_3;
+		addCheckBox(appearanceComposite, label, AbstractStructuredFoldingStrategy.FOLDING_ENABLED, 0);
+		
+		label = SSEUIMessages.StructuredTextEditorPreferencePage_1;
+		addCheckBox(appearanceComposite, label, EditorPreferenceNames.SEMANTIC_HIGHLIGHTING, 0);
+
+		Label l = new Label(appearanceComposite, SWT.LEFT);
+		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+		gd.horizontalSpan = 2;
+		gd.heightHint = convertHeightInCharsToPixels(1) / 2;
+		l.setLayoutData(gd);
+
+		l = new Label(appearanceComposite, SWT.LEFT);
+		l.setText(SSEUIMessages.StructuredTextEditorPreferencePage_23); //$NON-NLS-1$
+		gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+		gd.horizontalSpan = 2;
+		l.setLayoutData(gd);
+
+		Composite editorComposite = new Composite(appearanceComposite, SWT.NONE);
+		layout = new GridLayout();
+		layout.numColumns = 2;
+		layout.marginHeight = 0;
+		layout.marginWidth = 0;
+		editorComposite.setLayout(layout);
+		gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
+		gd.horizontalSpan = 2;
+		editorComposite.setLayoutData(gd);
+
+		fAppearanceColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
+		gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+		gd.heightHint = convertHeightInCharsToPixels(7);
+		fAppearanceColorList.setLayoutData(gd);
+
+		Composite stylesComposite = new Composite(editorComposite, SWT.NONE);
+		layout = new GridLayout();
+		layout.marginHeight = 0;
+		layout.marginWidth = 0;
+		layout.numColumns = 2;
+		stylesComposite.setLayout(layout);
+		stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		l = new Label(stylesComposite, SWT.LEFT);
+		// needs to be made final so label can be set in
+		// foregroundcolorbutton's acc listener
+		final String buttonLabel = SSEUIMessages.StructuredTextEditorPreferencePage_24; //$NON-NLS-1$ 
+		l.setText(buttonLabel);
+		gd = new GridData();
+		gd.horizontalAlignment = GridData.BEGINNING;
+		l.setLayoutData(gd);
+
+		fAppearanceColorEditor = new ColorEditor(stylesComposite);
+		Button foregroundColorButton = fAppearanceColorEditor.getButton();
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalAlignment = GridData.BEGINNING;
+		foregroundColorButton.setLayoutData(gd);
+
+		fAppearanceColorList.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				// do nothing
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				handleAppearanceColorListSelection();
+			}
+		});
+		foregroundColorButton.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				// do nothing
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				int i = fAppearanceColorList.getSelectionIndex();
+				String key = fAppearanceColorListModel[i][1];
+
+				PreferenceConverter.setValue(fOverlayStore, key, fAppearanceColorEditor.getColorValue());
+			}
+		});
+
+		// bug2541 - associate color label to button's label field
+		foregroundColorButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			public void getName(AccessibleEvent e) {
+				if (e.childID == ACC.CHILDID_SELF)
+					e.result = buttonLabel;
+			}
+		});
+
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(appearanceComposite, IHelpContextIds.PREFSTE_APPEARANCE_HELPID);
+		return appearanceComposite;
+	}
+
+	/*
+	 * @see PreferencePage#createContents(Composite)
+	 */
+	protected Control createContents(Composite parent) {
+		// need to create tabs before loading/starting overlaystore in case
+		// tabs also add values
+		IPreferenceTab hoversTab = new TextHoverPreferenceTab(this, fOverlayStore);
+
+		fOverlayStore.load();
+		fOverlayStore.start();
+
+		TabFolder folder = new TabFolder(parent, SWT.NONE);
+		folder.setLayout(new TabFolderLayout());
+		folder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		TabItem item = new TabItem(folder, SWT.NONE);
+		item.setText(SSEUIMessages.StructuredTextEditorPreferencePage_0); //$NON-NLS-1$
+		item.setControl(createAppearancePage(folder));
+
+		item = new TabItem(folder, SWT.NONE);
+		item.setText(hoversTab.getTitle());
+		item.setControl(hoversTab.createContents(folder));
+
+		fTabs = new IPreferenceTab[]{hoversTab};
+
+		initialize();
+
+		Dialog.applyDialogFont(folder);
+		return folder;
+	}
+
+	/*
+	 * @see PreferencePage#createControl(Composite)
+	 */
+	public void createControl(Composite parent) {
+		super.createControl(parent);
+		// WorkbenchHelp.setHelp(getControl(),
+		// IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
+	}
+
+	private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys() {
+		ArrayList overlayKeys = new ArrayList();
+
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, EditorPreferenceNames.MATCHING_BRACKETS_COLOR));
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, EditorPreferenceNames.MATCHING_BRACKETS));
+
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS));
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, EditorPreferenceNames.SHOW_UNKNOWN_CONTENT_TYPE_MSG));
+
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractStructuredFoldingStrategy.FOLDING_ENABLED));
+		
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, EditorPreferenceNames.SEMANTIC_HIGHLIGHTING));
+
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, EditorPreferenceNames.CODEASSIST_PROPOSALS_BACKGROUND));
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND));
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND));
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND));
+
+		OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
+		overlayKeys.toArray(keys);
+		return keys;
+	}
+
+	/*
+	 * @see DialogPage#dispose()
+	 */
+	public void dispose() {
+		if (fOverlayStore != null) {
+			fOverlayStore.stop();
+			fOverlayStore = null;
+		}
+
+		super.dispose();
+	}
+
+	private void handleAppearanceColorListSelection() {
+		int i = fAppearanceColorList.getSelectionIndex();
+		String key = fAppearanceColorListModel[i][1];
+		RGB rgb = PreferenceConverter.getColor(fOverlayStore, key);
+		fAppearanceColorEditor.setColorValue(rgb);
+	}
+
+	/*
+	 * @see IWorkbenchPreferencePage#init()
+	 */
+	public void init(IWorkbench workbench) {
+		// nothing to do
+	}
+
+	private void initialize() {
+		initializeFields();
+
+		for (int i = 0; i < fAppearanceColorListModel.length; i++)
+			fAppearanceColorList.add(fAppearanceColorListModel[i][0]);
+		fAppearanceColorList.getDisplay().asyncExec(new Runnable() {
+			public void run() {
+				if (fAppearanceColorList != null && !fAppearanceColorList.isDisposed()) {
+					fAppearanceColorList.select(0);
+					handleAppearanceColorListSelection();
+				}
+			}
+		});
+	}
+
+	private void initializeFields() {
+		Iterator e = fColorButtons.keySet().iterator();
+		while (e.hasNext()) {
+			ColorEditor c = (ColorEditor) e.next();
+			String key = (String) fColorButtons.get(c);
+			RGB rgb = PreferenceConverter.getColor(fOverlayStore, key);
+			c.setColorValue(rgb);
+		}
+
+		e = fCheckBoxes.keySet().iterator();
+		while (e.hasNext()) {
+			Button b = (Button) e.next();
+			String key = (String) fCheckBoxes.get(b);
+			b.setSelection(fOverlayStore.getBoolean(key));
+		}
+
+		e = fTextFields.keySet().iterator();
+		while (e.hasNext()) {
+			Text t = (Text) e.next();
+			String key = (String) fTextFields.get(t);
+			t.setText(fOverlayStore.getString(key));
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.preference.PreferencePage#performApply()
+	 */
+	protected void performApply() {
+		for (int i = 0; i < fTabs.length; i++) {
+			fTabs[i].performApply();
+		}
+		super.performApply();
+	}
+
+	/*
+	 * @see PreferencePage#performDefaults()
+	 */
+	protected void performDefaults() {
+		fOverlayStore.loadDefaults();
+
+		initializeFields();
+
+		handleAppearanceColorListSelection();
+
+		for (int i = 0; i < fTabs.length; i++) {
+			fTabs[i].performDefaults();
+		}
+
+		super.performDefaults();
+
+		// there is currently no need for a viewer
+		// fPreviewViewer.invalidateTextPresentation();
+	}
+
+	/*
+	 * @see PreferencePage#performOk()
+	 */
+	public boolean performOk() {
+		for (int i = 0; i < fTabs.length; i++) {
+			fTabs[i].performOk();
+		}
+
+		fOverlayStore.propagate();
+		SSEUIPlugin.getDefault().savePluginPreferences();
+
+		// tab width is also a model-side preference so need to set it
+		// TODO need to handle tab width for formatter somehow
+		// int tabWidth =
+		// getPreferenceStore().getInt(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH);
+		// ModelPlugin.getDefault().getPluginPreferences().setValue(CommonModelPreferenceNames.TAB_WIDTH,
+		// tabWidth);
+		// ModelPlugin.getDefault().savePluginPreferences();
+
+		return true;
+	}
+
+	void updateStatus(IStatus status) {
+		if (!status.matches(IStatus.ERROR)) {
+			for (int i = 0; i < fNumberFields.size(); i++) {
+				Text text = (Text) fNumberFields.get(i);
+				IStatus s = validatePositiveNumber(text.getText());
+				status = s.getSeverity() > status.getSeverity() ? s : status;
+			}
+		}
+
+		setValid(!status.matches(IStatus.ERROR));
+		applyToStatusLine(this, status);
+	}
+
+	private IStatus validatePositiveNumber(String number) {
+		StatusInfo status = new StatusInfo();
+		if (number.length() == 0) {
+			status.setError(SSEUIMessages.StructuredTextEditorPreferencePage_37);
+		}
+		else {
+			try {
+				int value = Integer.parseInt(number);
+				if (value < 0)
+					status.setError(number + SSEUIMessages.StructuredTextEditorPreferencePage_38);
+			}
+			catch (NumberFormatException e) {
+				status.setError(number + SSEUIMessages.StructuredTextEditorPreferencePage_38);
+			}
+		}
+		return status;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StyledTextColorPicker.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StyledTextColorPicker.java
new file mode 100644
index 0000000..e69bf0d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StyledTextColorPicker.java
@@ -0,0 +1,905 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import java.io.CharArrayReader;
+import java.util.Dictionary;
+import java.util.List;
+
+import org.eclipse.jface.preference.ColorSelector;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleControlAdapter;
+import org.eclipse.swt.accessibility.AccessibleControlEvent;
+import org.eclipse.swt.accessibility.AccessibleControlListener;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.sse.core.internal.util.Debug;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
+import org.w3c.dom.Node;
+
+import com.ibm.icu.text.Collator;
+
+/**
+ * This class is configurable by setting 3 properties: 1) an array of Strings
+ * as the styleNames; one unique entry for every style type meant to be
+ * configurable by the user 2) a Dictionary of descriptions, mapping the
+ * styleNames to unique descriptions - meant for use within the selection
+ * ComboBox TODO (pa) this should probably be working off document partitions
+ * now (2.1+) 3) a Dictionary mapping parsed ITextRegion contexts (strings) to
+ * the locally defined styleNames
+ *  
+ */
+public class StyledTextColorPicker extends Composite {
+	protected class DescriptionSorter extends org.eclipse.wst.sse.ui.internal.util.Sorter {
+		Collator collator = Collator.getInstance();
+
+		public boolean compare(Object elementOne, Object elementTwo) {
+			/**
+			 * Returns true if elementTwo is 'greater than' elementOne This is
+			 * the 'ordering' method of the sort operation. Each subclass
+			 * overides this method with the particular implementation of the
+			 * 'greater than' concept for the objects being sorted.
+			 */
+			return (collator.compare(elementOne.toString(), elementTwo.toString())) < 0;
+		}
+	}
+
+	public static final String BACKGROUND = "background"; //$NON-NLS-1$
+	public static final String BOLD = "bold"; //$NON-NLS-1$
+	public static final String COLOR = "color"; //$NON-NLS-1$
+
+	// names for preference elements ... non-NLS
+	public static final String FOREGROUND = "foreground"; //$NON-NLS-1$
+	public static final String ITALIC = "italic"; //$NON-NLS-1$
+	public static final String NAME = "name"; //$NON-NLS-1$
+
+	protected static final boolean showItalic = false;
+	protected AccessibleControlListener backgroundAccListener = new AccessibleControlAdapter() {
+		/**
+		 * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getValue(AccessibleControlEvent)
+		 */
+		public void getValue(AccessibleControlEvent e) {
+			if (e.childID == ACC.CHILDID_SELF) {
+				e.result = fBackground.getColorValue().toString();
+			}
+		}
+	};
+	protected SelectionListener buttonListener = new SelectionListener() {
+
+		public void widgetDefaultSelected(SelectionEvent e) {
+			widgetSelected(e);
+		}
+
+		public void widgetSelected(SelectionEvent e) {
+			String namedStyle = getStyleName(fStyleCombo.getItem(fStyleCombo.getSelectionIndex()));
+			if (namedStyle == null)
+				return;
+			if (e.widget == fBold) {
+				// get current (newly old) style
+				String prefString = getPreferenceStore().getString(namedStyle);
+				String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
+				if (stylePrefs != null) {
+					String oldValue = stylePrefs[2];
+					String newValue = String.valueOf(fBold.getSelection());
+					if (!newValue.equals(oldValue)) {
+						stylePrefs[2] = newValue;
+						String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
+						getPreferenceStore().setValue(namedStyle, newPrefString);
+						refresh();
+					}
+				}
+			} else if (showItalic && e.widget == fItalic) {
+				// get current (newly old) style
+				String prefString = getPreferenceStore().getString(namedStyle);
+				String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
+				if (stylePrefs != null) {
+					String oldValue = stylePrefs[3];
+					String newValue = String.valueOf(fItalic.getSelection());
+					if (!newValue.equals(oldValue)) {
+						stylePrefs[3] = newValue;
+						String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
+						getPreferenceStore().setValue(namedStyle, newPrefString);
+						refresh();
+					}
+				}
+			} else if (e.widget == fClearStyle) {
+				getPreferenceStore().setToDefault(namedStyle);
+				refresh();
+			}
+		}
+	};
+
+	protected SelectionListener comboListener = new SelectionListener() {
+
+		public void widgetDefaultSelected(SelectionEvent e) {
+			widgetSelected(e);
+		}
+
+		public void widgetSelected(SelectionEvent e) {
+			int selectedIndex = fStyleCombo.getSelectionIndex();
+			String description = selectedIndex >= 0 ? fStyleCombo.getItem(selectedIndex) : null;
+			activate(getStyleName(description));
+		}
+	};
+	protected ColorSelector fBackground;
+	protected Label fBackgroundLabel;
+	protected Button fBold;
+	protected Button fClearStyle;
+	// Dictionary mapping the ITextRegion types above to color names, which
+	// are, in turn, attributes
+	protected Dictionary fContextStyleMap = null;
+	protected Color fDefaultBackground = getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
+
+	protected Color fDefaultForeground = getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
+	// Dictionary mapping the ITextRegion types above to display strings, for
+	// use in the combo box
+	protected Dictionary fDescriptions = null;
+	protected ColorSelector fForeground;
+	protected Label fForegroundLabel;
+//	private String fGeneratorKey;
+	protected String fInput = ""; //$NON-NLS-1$
+	protected Button fItalic;
+
+	private IStructuredDocumentRegion fNodes = null;
+	// defect 200764 - ACC:display values for color buttons
+	protected AccessibleControlListener foregroundAccListener = new AccessibleControlAdapter() {
+		/**
+		 * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getValue(AccessibleControlEvent)
+		 */
+		public void getValue(AccessibleControlEvent e) {
+			if (e.childID == ACC.CHILDID_SELF) {
+				e.result = fForeground.getColorValue().toString();
+			}
+		}
+	};
+	// A RegionParser, which will turn the input into
+	// IStructuredDocumentRegion(s) and Regions
+	protected RegionParser fParser = null;
+
+	private IPreferenceStore fPreferenceStore;
+	protected Combo fStyleCombo = null;
+	// The list of supported ITextRegion types [Strings]
+	protected List fStyleList = null;
+
+	// controls in picker
+	protected StyledText fText = null;
+
+	/**
+	 * XMLTextColorPicker constructor comment.
+	 * 
+	 * @param parent
+	 *            org.eclipse.swt.widgets.Composite
+	 * @param style
+	 *            int
+	 */
+	public StyledTextColorPicker(Composite parent, int style) {
+		super(parent, style);
+		//GridLayout
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 1;
+		setLayout(layout);
+		createControls(this);
+	}
+
+	// activate controls based on the given local color type
+	protected void activate(String namedStyle) {
+		if (namedStyle == null) {
+			fForeground.setEnabled(false);
+			fBackground.setEnabled(false);
+			fClearStyle.setEnabled(false);
+			fBold.setEnabled(false);
+			if (showItalic)
+				fItalic.setEnabled(false);
+			fForegroundLabel.setEnabled(false);
+			fBackgroundLabel.setEnabled(false);
+		} 
+		else {		
+			fForeground.setEnabled(true);
+			fBackground.setEnabled(true);
+			fClearStyle.setEnabled(true);
+			fBold.setEnabled(true);
+			if (showItalic)
+				fItalic.setEnabled(true);
+			fForegroundLabel.setEnabled(true);
+			fBackgroundLabel.setEnabled(true);
+			
+		}
+		TextAttribute attribute = getAttribute(namedStyle);
+		Color color = attribute.getForeground();
+		if (color == null) {
+			color = fDefaultForeground;
+		}
+		fForeground.setColorValue(color.getRGB());
+
+		color = attribute.getBackground();
+		if (color == null) {
+			color = fDefaultBackground;
+		}
+		fBackground.setColorValue(color.getRGB());
+
+		fBold.setSelection((attribute.getStyle() & SWT.BOLD) != 0);
+		if (showItalic)
+			fItalic.setSelection((attribute.getStyle() & SWT.ITALIC) != 0);
+	}
+
+	protected void applyStyles() {
+		if (fText == null || fText.isDisposed() || fInput == null || fInput.length() == 0)
+			return;
+		//		List regions = fParser.getRegions();
+		IStructuredDocumentRegion node = fNodes;
+		while (node != null) {
+			ITextRegionList regions = node.getRegions();
+			for (int i = 0; i < regions.size(); i++) {
+				ITextRegion currentRegion = regions.get(i);
+				// lookup the local coloring type and apply it
+				String namedStyle = (String) getContextStyleMap().get(currentRegion.getType());
+				if (namedStyle == null)
+					continue;
+				TextAttribute attribute = getAttribute(namedStyle);
+				if (attribute == null)
+					continue;
+				StyleRange style = new StyleRange(node.getStartOffset(currentRegion), currentRegion.getLength(), attribute.getForeground(), attribute.getBackground(), attribute.getStyle());
+				fText.setStyleRange(style);
+			}
+			node = node.getNext();
+		}
+	}
+
+	protected void close() {
+	}
+
+	/**
+	 * Creates an new checkbox instance and sets the default layout data.
+	 * 
+	 * @param group
+	 *            the composite in which to create the checkbox
+	 * @param label
+	 *            the string to set into the checkbox
+	 * @return the new checkbox
+	 */
+	private Button createCheckBox(Composite group, String label) {
+		Button button = new Button(group, SWT.CHECK | SWT.CENTER);
+		if (label != null)
+			button.setText(label);
+		GridData data = new GridData(GridData.FILL_BOTH);
+		data.horizontalAlignment = GridData.HORIZONTAL_ALIGN_END;
+		//	data.verticalAlignment = GridData.VERTICAL_ALIGN_FILL;
+		button.setLayoutData(data);
+		return button;
+	}
+
+	private Combo createCombo(Composite parent, String[] labels, int selectedItem) {
+		Combo combo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
+		combo.setItems(labels);
+		if (selectedItem >= 0)
+			combo.select(selectedItem);
+		GridData data = new GridData(GridData.FILL_HORIZONTAL);
+		data.horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
+		combo.setLayoutData(data);
+		return combo;
+	}
+
+	/**
+	 * Creates composite control and sets the default layout data.
+	 */
+	private Composite createComposite(Composite parent, int numColumns) {
+		Composite composite = new Composite(parent, SWT.NULL);
+		//GridLayout
+		GridLayout layout = new GridLayout();
+		layout.numColumns = numColumns;
+		layout.horizontalSpacing = 5;
+		layout.makeColumnsEqualWidth = false;
+		composite.setLayout(layout);
+		//GridData
+		GridData data = new GridData(GridData.FILL_VERTICAL);
+		data.grabExcessVerticalSpace = false;
+		data.verticalAlignment = GridData.VERTICAL_ALIGN_CENTER;
+		composite.setLayoutData(data);
+		return composite;
+	}
+
+	protected void createControls(Composite parent) {
+		Composite styleRow = createComposite(parent, 3);
+		// row 1 - content type label, combo box, restore defaults
+		createLabel(styleRow, SSEUIMessages.Content_type__UI_); //$NON-NLS-1$ = "Content type:"
+		// Contexts combo box
+		fStyleCombo = createCombo(styleRow, new String[0], -1);
+		fClearStyle = createPushButton(styleRow, SSEUIMessages.Restore_Default_UI_); //$NON-NLS-1$ = "Restore Default"
+		Composite styleRow2;
+		if (showItalic)
+			styleRow2 = createComposite(parent, 7);
+		else
+			styleRow2 = createComposite(parent, 6);
+		// row 2 - foreground label, button, background label, button, bold,
+		// italics?
+		fForegroundLabel = createLabel(styleRow2, SSEUIMessages.Foreground_UI_); //$NON-NLS-1$ = "Foreground"
+		fForeground = new ColorSelector(styleRow2);
+		fForeground.getButton().setLayoutData(new GridData());
+		setAccessible(fForeground.getButton(), fForegroundLabel.getText());
+		fForeground.getButton().getAccessible().addAccessibleControlListener(foregroundAccListener); // defect
+		// 200764
+		// -
+		// ACC:display
+		// values
+		// for
+		// color
+		// buttons
+		((GridData) fForeground.getButton().getLayoutData()).minimumWidth = 20;
+		fBackgroundLabel = createLabel(styleRow2, SSEUIMessages.Background_UI_); //$NON-NLS-1$ = "Background"
+		fBackground = new ColorSelector(styleRow2);
+		fBackground.getButton().setLayoutData(new GridData());
+		setAccessible(fBackground.getButton(), fBackgroundLabel.getText());
+		fBackground.getButton().getAccessible().addAccessibleControlListener(backgroundAccListener); // defect
+		// 200764
+		// -
+		// ACC:display
+		// values
+		// for
+		// color
+		// buttons
+		((GridData) fBackground.getButton().getLayoutData()).minimumWidth = 20;
+		createLabel(styleRow2, ""); //$NON-NLS-1$
+		fBold = createCheckBox(styleRow2, SSEUIMessages.Bold_UI_);
+		if (showItalic)
+			fItalic = createCheckBox(styleRow2, SSEUIMessages.Italics_UI);
+		//		// Defaults checkbox
+		fForeground.setEnabled(false);
+		fBackground.setEnabled(false);
+		fClearStyle.setEnabled(false);
+		fBold.setEnabled(false);
+		if (showItalic)
+			fItalic.setEnabled(false);
+		fForegroundLabel.setEnabled(false);
+		fBackgroundLabel.setEnabled(false);
+		Composite sample = createComposite(parent, 1);
+		createLabel(sample, SSEUIMessages.Sample_text__UI_); //$NON-NLS-1$ = "&Sample text:"
+		// BUG141089 - make sure text is left-aligned
+		fText = new StyledText(sample, SWT.LEFT_TO_RIGHT | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.READ_ONLY);
+		GridData data = new GridData(GridData.FILL_BOTH);
+		fText.setLayoutData(data);
+		fText.setEditable(false);
+		fText.setBackground(fDefaultBackground);
+		fText.setFont(JFaceResources.getTextFont());
+		fText.addKeyListener(getTextKeyListener());
+		fText.addSelectionListener(getTextSelectionListener());
+		fText.addMouseListener(getTextMouseListener());
+		fText.addTraverseListener(getTraverseListener()); // defect 220377 -
+		// Provide tab
+		// traversal for
+		// fText widget
+		setAccessible(fText, SSEUIMessages.Sample_text__UI_); //$NON-NLS-1$ = "&Sample text:"
+		fForeground.addListener(new IPropertyChangeListener() {
+			public void propertyChange(PropertyChangeEvent event) {
+				if (event.getProperty().equals(ColorSelector.PROP_COLORCHANGE)) {
+					// get current (newly old) style
+					String namedStyle = getStyleName(fStyleCombo.getItem(fStyleCombo.getSelectionIndex()));
+					String prefString = getPreferenceStore().getString(namedStyle);
+					String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
+					if (stylePrefs != null) {
+						String oldValue = stylePrefs[0];
+						String newValue = "null";   //$NON-NLS-1$
+						Object newValueObject = event.getNewValue();
+						if (newValueObject instanceof RGB) {
+							newValue = ColorHelper.toRGBString((RGB)newValueObject);
+						}
+	
+						if (!newValue.equals(oldValue)) {
+							stylePrefs[0] = newValue;
+							String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
+							getPreferenceStore().setValue(namedStyle, newPrefString);
+							refresh();
+						}
+					}
+				}
+			}
+		});
+		fBackground.addListener(new IPropertyChangeListener() {
+			public void propertyChange(PropertyChangeEvent event) {
+				if (event.getProperty().equals(ColorSelector.PROP_COLORCHANGE)) {
+					// get current (newly old) style
+					String namedStyle = getStyleName(fStyleCombo.getItem(fStyleCombo.getSelectionIndex()));
+					String prefString = getPreferenceStore().getString(namedStyle);
+					String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
+					if (stylePrefs != null) {
+						String oldValue = stylePrefs[1];
+
+						String newValue = "null";   //$NON-NLS-1$
+						Object newValueObject = event.getNewValue();
+						if (newValueObject instanceof RGB) {
+							newValue = ColorHelper.toRGBString((RGB)newValueObject);
+						}
+						
+						if (!newValue.equals(oldValue)) {
+							stylePrefs[1] = newValue;
+							String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
+							getPreferenceStore().setValue(namedStyle, newPrefString);
+							refresh();
+						}
+					}
+				}
+			}
+		});
+
+		fClearStyle.addSelectionListener(buttonListener);
+		fBold.addSelectionListener(buttonListener);
+		if (showItalic)
+			fItalic.addSelectionListener(buttonListener);
+		fStyleCombo.addSelectionListener(comboListener);
+	}
+
+	/**
+	 * Utility method that creates a label instance and sets the default
+	 * layout data.
+	 */
+	private Label createLabel(Composite parent, String text) {
+		Label label = new Label(parent, SWT.LEFT);
+		label.setText(text);
+		GridData data = new GridData();
+		data.horizontalAlignment = GridData.FILL;
+		label.setLayoutData(data);
+		return label;
+	}
+
+	private Button createPushButton(Composite parent, String label) {
+		Button button = new Button(parent, SWT.PUSH);
+		button.setText(label);
+		GridData data = new GridData(GridData.FILL_BOTH);
+		//	data.horizontalAlignment = GridData.FILL;
+		button.setLayoutData(data);
+		return button;
+	}
+
+	protected TextAttribute getAttribute(String namedStyle) {
+		TextAttribute ta = new TextAttribute(getDefaultForeground(), getDefaultBackground(), SWT.NORMAL);
+
+		if (namedStyle != null && getPreferenceStore() != null) {
+			String prefString = getPreferenceStore().getString(namedStyle);
+			String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
+			if (stylePrefs != null) {
+				RGB foreground = ColorHelper.toRGB(stylePrefs[0]);
+				RGB background = ColorHelper.toRGB(stylePrefs[1]);
+
+				int fontModifier = SWT.NORMAL;
+				boolean bold = Boolean.valueOf(stylePrefs[2]).booleanValue();
+				if (bold)
+					fontModifier = fontModifier | SWT.BOLD;
+
+				if (showItalic) {
+					boolean italic = Boolean.valueOf(stylePrefs[3]).booleanValue();
+					if (italic)
+						fontModifier = fontModifier | SWT.ITALIC;
+				}
+
+				ta = new TextAttribute((foreground != null) ? EditorUtility.getColor(foreground) : null, (background != null) ? EditorUtility.getColor(background) : null, fontModifier);
+			}
+		}
+		return ta;
+	}
+
+	// defect 200764 - ACC:display values for color buttons
+	/**
+	 * @return String - color Button b's current RBG value
+	 */
+//	private String getColorButtonValue(Button b) {
+//		if ((b == null) || (b.getImage() == null) || (b.getImage().getImageData() == null) || (b.getImage().getImageData().getRGBs() == null) || (b.getImage().getImageData().getRGBs()[0] == null))
+//			return null;
+//		String val = b.getImage().getImageData().getRGBs()[0].toString();
+//		return val;
+//	}
+
+	/**
+	 * @deprecated use getPreferenceStore instead left for legacy clients,
+	 *             delete by WTP M4
+	 */
+	public Node getColorsNode() {
+		//return fColorsNode;
+		return null;
+	}
+
+	/**
+	 * @return java.util.Dictionary
+	 */
+	public Dictionary getContextStyleMap() {
+		return fContextStyleMap;
+	}
+
+	/**
+	 * @return org.eclipse.swt.graphics.Color
+	 */
+	public Color getDefaultBackground() {
+		return fDefaultBackground;
+	}
+
+	/**
+	 * @return org.eclipse.swt.graphics.Color
+	 */
+	public Color getDefaultForeground() {
+		return fDefaultForeground;
+	}
+
+	/**
+	 * @return java.util.Dictionary
+	 */
+	public Dictionary getDescriptions() {
+		return fDescriptions;
+	}
+
+	public Font getFont() {
+		return fText.getFont();
+	}
+
+	protected String getNamedStyleAtOffset(int offset) {
+		// ensure the offset is clean
+		if (offset >= fInput.length())
+			return getNamedStyleAtOffset(fInput.length() - 1);
+		else if (offset < 0)
+			return getNamedStyleAtOffset(0);
+		// find the ITextRegion at this offset
+		if (fNodes == null)
+			return null;
+		IStructuredDocumentRegion aNode = fNodes;
+		while (aNode != null && !aNode.containsOffset(offset))
+			aNode = aNode.getNext();
+		if (aNode != null) {
+			// find the ITextRegion's Context at this offset
+			ITextRegion interest = aNode.getRegionAtCharacterOffset(offset);
+			if (interest == null)
+				return null;
+			if (offset > aNode.getTextEndOffset(interest))
+				return null;
+			String regionContext = interest.getType();
+			if (regionContext == null)
+				return null;
+			// find the named style (internal/selectable name) for that
+			// context
+			String namedStyle = (String) getContextStyleMap().get(regionContext);
+			if (namedStyle != null) {
+				return namedStyle;
+			}
+		}
+		return null;
+	}
+
+
+	public RegionParser getParser() {
+		return fParser;
+	}
+
+	private IPreferenceStore getPreferenceStore() {
+		return fPreferenceStore;
+	}
+
+	/**
+	 * @return String[]
+	 */
+	public List getStyleList() {
+		return fStyleList;
+	}
+
+	private String getStyleName(String description) {
+		if (description == null)
+			return null;
+		String styleName = null;
+		java.util.Enumeration keys = getDescriptions().keys();
+		while (keys.hasMoreElements()) {
+			String test = keys.nextElement().toString();
+			if (getDescriptions().get(test).equals(description)) {
+				styleName = test;
+				break;
+			}
+		}
+		return styleName;
+	}
+
+	public String getText() {
+		return fInput;
+	}
+
+	private KeyListener getTextKeyListener() {
+		return new KeyListener() {
+			public void keyPressed(KeyEvent e) {
+				if (e.widget instanceof StyledText) {
+					int x = ((StyledText) e.widget).getCaretOffset();
+					selectColorAtOffset(x);
+				}
+			}
+
+			public void keyReleased(KeyEvent e) {
+				if (e.widget instanceof StyledText) {
+					int x = ((StyledText) e.widget).getCaretOffset();
+					selectColorAtOffset(x);
+				}
+			}
+		};
+	}
+
+	private MouseListener getTextMouseListener() {
+		return new MouseListener() {
+			public void mouseDoubleClick(MouseEvent e) {
+			}
+
+			public void mouseDown(MouseEvent e) {
+			}
+
+			public void mouseUp(MouseEvent e) {
+				if (e.widget instanceof StyledText) {
+					int x = ((StyledText) e.widget).getCaretOffset();
+					selectColorAtOffset(x);
+				}
+			}
+		};
+	}
+
+	private SelectionListener getTextSelectionListener() {
+		return new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				selectColorAtOffset(e.x);
+				if (e.widget instanceof StyledText) {
+					((StyledText) e.widget).setSelection(e.x);
+				}
+			}
+
+// Commented out when moving to RC2 to remove "unused" error/warning			
+//			public void widgetDoubleSelected(SelectionEvent e) {
+//				selectColorAtOffset(e.x);
+//				if (e.widget instanceof StyledText) {
+//					((StyledText) e.widget).setSelection(e.x);
+//				}
+//			}
+
+			public void widgetSelected(SelectionEvent e) {
+				selectColorAtOffset(e.x);
+				if (e.widget instanceof StyledText) {
+					((StyledText) e.widget).setSelection(e.x);
+				}
+			}
+		};
+	}
+
+	// defect 220377 - Provide tab traversal for fText widget
+	private TraverseListener getTraverseListener() {
+		return new TraverseListener() {
+			/**
+			 * @see org.eclipse.swt.events.TraverseListener#keyTraversed(TraverseEvent)
+			 */
+			public void keyTraversed(TraverseEvent e) {
+				if (e.widget instanceof StyledText) {
+					if ((e.detail == SWT.TRAVERSE_TAB_NEXT) || (e.detail == SWT.TRAVERSE_TAB_PREVIOUS))
+						e.doit = true;
+				}
+			}
+		};
+	}
+
+	// refresh the GUI after a color change
+	public void refresh() {
+		fText.setRedraw(false);
+		int selectedIndex = fStyleCombo.getSelectionIndex();
+		String description = selectedIndex >= 0 ? fStyleCombo.getItem(selectedIndex) : null;
+		activate(getStyleName(description));
+		// update Font
+		fText.setFont(JFaceResources.getTextFont());
+		// reapplyStyles
+		applyStyles();
+		fText.setRedraw(true);
+	}
+
+	public void releasePickerResources() {
+//		if (fForeground != null && !fForeground.isDisposed() && fForeground.getImage() != null)
+//			fForeground.getImage().dispose();
+//		if (fBackground != null && !fBackground.isDisposed() && fBackground.getImage() != null)
+//			fBackground.getImage().dispose();
+	}
+
+	private void selectColorAtOffset(int offset) {
+		String namedStyle = getNamedStyleAtOffset(offset);
+		if (namedStyle == null) {
+			fStyleCombo.deselectAll();
+			activate(null);
+			return;
+		}
+		String description = (String) getDescriptions().get(namedStyle);
+		if (description == null)
+			return;
+		int itemCount = fStyleCombo.getItemCount();
+		for (int i = 0; i < itemCount; i++) {
+			if (fStyleCombo.getItem(i).equals(description)) {
+				fStyleCombo.select(i);
+				break;
+			}
+		}
+		activate(namedStyle);
+	}
+
+	/**
+	 * Specifically set the reporting name of a control for accessibility
+	 */
+	private void setAccessible(Control control, String name) {
+		if (control == null)
+			return;
+		final String n = name;
+		control.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			public void getName(AccessibleEvent e) {
+				if (e.childID == ACC.CHILDID_SELF)
+					e.result = n;
+			}
+		});
+	}
+
+	/**
+	 * @deprecated use setPreferenceStore instead left for legacy clients,
+	 *             delete by WTP M4
+	 */
+	public void setColorsNode(Node newColorsNode) {
+		//fColorsNode = newColorsNode;
+	}
+
+	/**
+	 * @param newContextStyleMap
+	 *            java.util.Dictionary
+	 */
+	public void setContextStyleMap(Dictionary newContextStyleMap) {
+		fContextStyleMap = newContextStyleMap;
+	}
+
+	/**
+	 * @param newDefaultBackground
+	 *            org.eclipse.swt.graphics.Color
+	 */
+	public void setDefaultBackground(Color newDefaultBackground) {
+		fDefaultBackground = newDefaultBackground;
+	}
+
+	/**
+	 * @deprecated use setPreferenceStore instead left for legacy clients,
+	 *             delete by WTP M4
+	 */
+	public void setDefaultColorsNode(Node newDefaultColorsNode) {
+		//fDefaultColorsNode = newDefaultColorsNode;
+	}
+
+	/**
+	 * @param newDefaultForeground
+	 *            org.eclipse.swt.graphics.Color
+	 */
+	public void setDefaultForeground(Color newDefaultForeground) {
+		fDefaultForeground = newDefaultForeground;
+	}
+
+	/**
+	 * @param newDescriptions
+	 *            java.util.Dictionary
+	 */
+	public void setDescriptions(Dictionary newDescriptions) {
+		fDescriptions = newDescriptions;
+		updateStyleList();
+	}
+
+	public void setFont(Font font) {
+		fText.setFont(font);
+		fText.redraw();
+	}
+
+	/**
+	 * @deprecated generator key should no longer be needed
+	 */
+	public void setGeneratorKey(String key) {
+//		fGeneratorKey = key;
+	}
+
+	/**
+	 * @param newParser
+	 */
+	public void setParser(RegionParser newParser) {
+		fParser = newParser;
+	}
+
+	public void setPreferenceStore(IPreferenceStore store) {
+		fPreferenceStore = store;
+	}
+
+	/**
+	 * @param newStyleList
+	 *            String[]
+	 */
+	public void setStyleList(List newStyleList) {
+		fStyleList = newStyleList;
+		updateStyleList();
+	}
+
+	public void setText(String s) {
+		fInput = s;
+		getParser().reset(new CharArrayReader(fInput.toCharArray()));
+		fNodes = getParser().getDocumentRegions();
+		if (Debug.displayInfo)
+			System.out.println("Length of input: " //$NON-NLS-1$
+						//$NON-NLS-1$
+						+ s.length() + ", " //$NON-NLS-1$
+						+ getParser().getRegions().size() + " regions."); //$NON-NLS-1$
+		if (fText != null)
+			fText.setText(s);
+		applyStyles();
+	}
+
+
+
+	/**
+	 * @return org.eclipse.swt.graphics.RGB
+	 * @param anRGBString
+	 *            java.lang.String
+	 * @param defaultRGB
+	 *            org.eclipse.swt.graphics.RGB
+	 */
+	// TODO: never used
+	 RGB toRGB(String anRGBString, RGB defaultRGB) {
+		RGB result = ColorHelper.toRGB(anRGBString);
+		if (result == null)
+			return defaultRGB;
+		return result;
+	}
+
+	private void updateStyleList() {
+		if (fStyleList == null || fDescriptions == null)
+			return;
+		String[] descriptions = new String[fStyleList.size()];
+		for (int i = 0; i < fStyleList.size(); i++) {
+			if (fStyleList.get(i) != null)
+				descriptions[i] = (String) getDescriptions().get(fStyleList.get(i));
+			else
+				descriptions[i] = (String) fStyleList.get(i);
+		}
+		Object[] sortedObjects = new DescriptionSorter().sort(descriptions);
+		String[] sortedDescriptions = new String[descriptions.length];
+		for (int i = 0; i < descriptions.length; i++) {
+			sortedDescriptions[i] = sortedObjects[i].toString();
+		}
+		fStyleCombo.setItems(sortedDescriptions);
+		fStyleCombo.select(0); //defect 219855 - initially select first item
+		// in comboBox
+		//		fStyleCombo.deselectAll();
+	}
+
+
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/TextHoverPreferenceTab.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/TextHoverPreferenceTab.java
new file mode 100644
index 0000000..100904a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/TextHoverPreferenceTab.java
@@ -0,0 +1,453 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.text.Assert;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
+import org.eclipse.wst.sse.ui.internal.taginfo.TextHoverManager;
+import org.eclipse.wst.sse.ui.internal.taginfo.TextHoverManager.TextHoverDescriptor;
+import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
+
+/**
+ * Preference tab for Structured text editor hover help preferences
+ * 
+ * @author amywu
+ */
+public class TextHoverPreferenceTab extends AbstractPreferenceTab {
+
+	private class InternalTableLabelProvider extends LabelProvider implements ITableLabelProvider {
+		public InternalTableLabelProvider() {
+			super();
+		}
+
+		public Image getColumnImage(Object element, int columnIndex) {
+			return null;
+		}
+
+		public String getColumnText(Object element, int columnIndex) {
+			switch (columnIndex) {
+				case 0 : // text hover label
+					return ((TextHoverManager.TextHoverDescriptor) element).getLabel();
+
+				case 1 : // text hover state mask
+					return ((TextHoverManager.TextHoverDescriptor) element).getModifierString();
+
+				default :
+					break;
+			}
+
+			return null;
+		}
+	}
+
+	private static final String DELIMITER = SSEUIMessages.TextHoverPreferenceTab_delimiter; //$NON-NLS-1$
+	private Text fDescription;
+	private Table fHoverTable;
+	private TableViewer fHoverTableViewer;
+	private TableColumn fModifierColumn;
+	// for this preference page
+	private Text fModifierEditor;
+	private TableColumn fNameColumn;
+
+	private TextHoverDescriptor[] fTextHovers; // current list of text hovers
+
+	public TextHoverPreferenceTab(PreferencePage mainPreferencePage, OverlayPreferenceStore store) {
+		Assert.isNotNull(mainPreferencePage);
+		Assert.isNotNull(store);
+		setMainPreferencePage(mainPreferencePage);
+		setOverlayStore(store);
+		getOverlayStore().addKeys(createOverlayStoreKeys());
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#createContents(org.eclipse.swt.widgets.Composite)
+	 */
+	public Control createContents(Composite tabFolder) {
+		Composite hoverComposite = new Composite(tabFolder, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 2;
+		hoverComposite.setLayout(layout);
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		hoverComposite.setLayoutData(gd);
+
+		// commented out until these preferences are actually handled in some
+		// way
+		//		String rollOverLabel=
+		// ResourceHandler.getString("TextHoverPreferenceTab.annotationRollover");
+		// //$NON-NLS-1$
+		//		addCheckBox(hoverComposite, rollOverLabel,
+		// CommonEditorPreferenceNames.EDITOR_ANNOTATION_ROLL_OVER, 0);
+		//
+		//		// Affordance checkbox
+		//		String showAffordanceLabel =
+		// ResourceHandler.getString("TextHoverPreferenceTab.showAffordance");
+		// //$NON-NLS-1$
+		//		addCheckBox(hoverComposite, showAffordanceLabel,
+		// CommonEditorPreferenceNames.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE, 0);
+
+		Label label = new Label(hoverComposite, SWT.NONE);
+		label.setText(SSEUIMessages.TextHoverPreferenceTab_hoverPreferences); //$NON-NLS-1$
+		gd = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
+		gd.horizontalAlignment = GridData.BEGINNING;
+		label.setLayoutData(gd);
+
+		fHoverTableViewer = CheckboxTableViewer.newCheckList(hoverComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
+		// Hover table
+		fHoverTable = fHoverTableViewer.getTable();
+		fHoverTable.setHeaderVisible(true);
+		fHoverTable.setLinesVisible(true);
+
+		gd = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=104507
+	    GC gc = new GC(fHoverTable);
+	    gc.setFont(fHoverTable.getFont());
+	    FontMetrics fontMetrics = gc.getFontMetrics();
+	    gc.dispose();
+		int heightHint = Dialog.convertHeightInCharsToPixels(fontMetrics, 7);
+		gd.heightHint = heightHint;
+		
+		fHoverTable.setLayoutData(gd);
+
+		TableLayout tableLayout = new TableLayout();
+		tableLayout.addColumnData(new ColumnWeightData(1, 140, true));
+		tableLayout.addColumnData(new ColumnWeightData(1, 140, true));
+		fHoverTable.setLayout(tableLayout);
+
+		fHoverTable.addSelectionListener(new SelectionListener() {
+
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				handleHoverListSelection();
+			}
+		});
+
+		fNameColumn = new TableColumn(fHoverTable, SWT.NONE);
+		fNameColumn.setText(SSEUIMessages.TextHoverPreferenceTab_nameColumnTitle); //$NON-NLS-1$
+		fNameColumn.setResizable(true);
+
+		fModifierColumn = new TableColumn(fHoverTable, SWT.NONE);
+		fModifierColumn.setText(SSEUIMessages.TextHoverPreferenceTab_modifierColumnTitle); //$NON-NLS-1$
+		fModifierColumn.setResizable(true);
+
+		fHoverTableViewer.setUseHashlookup(true);
+		fHoverTableViewer.setContentProvider(new ArrayContentProvider());
+		fHoverTableViewer.setLabelProvider(new InternalTableLabelProvider());
+		((CheckboxTableViewer) fHoverTableViewer).addCheckStateListener(new ICheckStateListener() {
+			/*
+			 * @see org.eclipse.jface.viewers.ICheckStateListener#checkStateChanged(org.eclipse.jface.viewers.CheckStateChangedEvent)
+			 */
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				String id = ((TextHoverDescriptor) event.getElement()).getId();
+				if (id == null)
+					return;
+
+				TextHoverManager.TextHoverDescriptor[] descriptors = getTextHoverManager().getTextHovers();
+				TextHoverManager.TextHoverDescriptor hoverConfig = null;
+				int i = 0, length = fTextHovers.length;
+				while (i < length) {
+					if (id.equals(descriptors[i].getId())) {
+						hoverConfig = fTextHovers[i];
+						hoverConfig.setEnabled(event.getChecked());
+						fModifierEditor.setEnabled(event.getChecked());
+						fHoverTableViewer.setSelection(new StructuredSelection(descriptors[i]));
+					}
+					i++;
+				}
+
+				handleHoverListSelection();
+				updateStatus(hoverConfig);
+			}
+		});
+
+		// Text field for modifier string
+		label = new Label(hoverComposite, SWT.LEFT);
+		label.setText(SSEUIMessages.TextHoverPreferenceTab_keyModifier); //$NON-NLS-1$
+		fModifierEditor = new Text(hoverComposite, SWT.BORDER);
+		gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+		fModifierEditor.setLayoutData(gd);
+
+		fModifierEditor.addKeyListener(new KeyListener() {
+			private boolean isModifierCandidate;
+
+			public void keyPressed(KeyEvent e) {
+				isModifierCandidate = e.keyCode > 0 && e.character == 0 && e.stateMask == 0;
+			}
+
+			public void keyReleased(KeyEvent e) {
+				if (isModifierCandidate && e.stateMask > 0 && e.stateMask == e.stateMask && e.character == 0) {// &&
+					// e.time
+					// -time
+					// <
+					// 1000)
+					// {
+					String text = fModifierEditor.getText();
+					Point selection = fModifierEditor.getSelection();
+					int i = selection.x - 1;
+					while (i > -1 && Character.isWhitespace(text.charAt(i))) {
+						i--;
+					}
+					boolean needsPrefixDelimiter = i > -1 && !String.valueOf(text.charAt(i)).equals(DELIMITER);
+
+					i = selection.y;
+					while (i < text.length() && Character.isWhitespace(text.charAt(i))) {
+						i++;
+					}
+					boolean needsPostfixDelimiter = i < text.length() && !String.valueOf(text.charAt(i)).equals(DELIMITER);
+
+					String insertString;
+
+					if (needsPrefixDelimiter && needsPostfixDelimiter)
+						insertString = NLS.bind(SSEUIMessages.TextHoverPreferenceTab_insertDelimiterAndModifierAndDelimiter, new String[]{Action.findModifierString(e.stateMask)});
+					else if (needsPrefixDelimiter)
+						insertString = NLS.bind(SSEUIMessages.TextHoverPreferenceTab_insertDelimiterAndModifier, new String[]{Action.findModifierString(e.stateMask)});
+					else if (needsPostfixDelimiter)
+						insertString = NLS.bind(SSEUIMessages.TextHoverPreferenceTab_insertModifierAndDelimiter, new String[]{Action.findModifierString(e.stateMask)});
+					else
+						insertString = Action.findModifierString(e.stateMask);
+
+					if (insertString != null)
+						fModifierEditor.insert(insertString);
+				}
+			}
+		});
+
+		fModifierEditor.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				handleModifierModified();
+			}
+		});
+
+		// Description
+		Label descriptionLabel = new Label(hoverComposite, SWT.LEFT);
+		descriptionLabel.setText(SSEUIMessages.TextHoverPreferenceTab_description); //$NON-NLS-1$
+		gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
+		gd.horizontalSpan = 2;
+		descriptionLabel.setLayoutData(gd);
+		fDescription = new Text(hoverComposite, SWT.LEFT | SWT.WRAP | SWT.MULTI | SWT.READ_ONLY | SWT.BORDER);
+		gd = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
+		gd.horizontalSpan = 2;
+		fDescription.setLayoutData(gd);
+
+		initialize();
+
+		Dialog.applyDialogFont(hoverComposite);
+
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(hoverComposite, IHelpContextIds.PREFSTE_HOVERS_HELPID);
+		return hoverComposite;
+	}
+
+	private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys() {
+		ArrayList overlayKeys = new ArrayList();
+
+		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, EditorPreferenceNames.EDITOR_TEXT_HOVER_MODIFIERS));
+
+		OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
+		overlayKeys.toArray(keys);
+		return keys;
+	}
+
+	private String generateTextHoverString() {
+		StringBuffer buf = new StringBuffer();
+
+		for (int i = 0; i < fTextHovers.length; i++) {
+			buf.append(fTextHovers[i].getId());
+			buf.append(TextHoverManager.HOVER_ATTRIBUTE_SEPARATOR);
+			buf.append(Boolean.toString(fTextHovers[i].isEnabled()));
+			buf.append(TextHoverManager.HOVER_ATTRIBUTE_SEPARATOR);
+			String modifier = fTextHovers[i].getModifierString();
+			if (modifier == null || modifier.length() == 0)
+				modifier = TextHoverManager.NO_MODIFIER;
+			buf.append(modifier);
+			buf.append(TextHoverManager.HOVER_SEPARATOR);
+		}
+		return buf.toString();
+	}
+
+	private TextHoverManager getTextHoverManager() {
+		return SSEUIPlugin.getDefault().getTextHoverManager();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#getTitle()
+	 */
+	public String getTitle() {
+		return SSEUIMessages.TextHoverPreferenceTab_title; //$NON-NLS-1$
+	}
+
+	void handleHoverListSelection() {
+		int i = fHoverTable.getSelectionIndex();
+
+		if (i == -1) {
+			if (fHoverTable.getSelectionCount() == 0)
+				fModifierEditor.setEnabled(false);
+			return;
+		}
+
+		boolean enabled = fTextHovers[i].isEnabled();
+		fModifierEditor.setEnabled(enabled);
+		fModifierEditor.setText(fTextHovers[i].getModifierString());
+		String description = fTextHovers[i].getDescription();
+		if (description == null)
+			description = ""; //$NON-NLS-1$
+		fDescription.setText(description);
+	}
+
+	private void handleModifierModified() {
+		int i = fHoverTable.getSelectionIndex();
+		if (i == -1)
+			return;
+
+		String modifiers = fModifierEditor.getText();
+		fTextHovers[i].setModifierString(modifiers);
+
+		// update table
+		fHoverTableViewer.refresh(fTextHovers[i]);
+
+		updateStatus(fTextHovers[i]);
+	}
+
+	private void initialize() {
+		restoreFromOverlay();
+		fHoverTableViewer.setInput(fTextHovers);
+
+		initializeFields();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.AbstractPreferenceTab#initializeFields()
+	 */
+	protected void initializeFields() {
+		super.initializeFields();
+
+		fModifierEditor.setEnabled(false);
+		// initialize checkboxes in hover table
+		for (int i = 0; i < fTextHovers.length; i++)
+			fHoverTable.getItem(i).setChecked(fTextHovers[i].isEnabled());
+		fHoverTableViewer.refresh();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#performApply()
+	 */
+	public void performApply() {
+		performOk();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#performDefaults()
+	 */
+	public void performDefaults() {
+		initialize();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#performOk()
+	 */
+	public void performOk() {
+		String textHoverString = generateTextHoverString();
+		getOverlayStore().setValue(EditorPreferenceNames.EDITOR_TEXT_HOVER_MODIFIERS, textHoverString);
+		getTextHoverManager().resetTextHovers(); // notify text hover manager
+		// it should reset to get
+		// latest preferences
+	}
+
+	/**
+	 * Populates fTextHovers with text hover description from the overlay
+	 * store (which is the preferences)
+	 */
+	private void restoreFromOverlay() {
+		String descriptorsString = getOverlayStore().getString(EditorPreferenceNames.EDITOR_TEXT_HOVER_MODIFIERS);
+		fTextHovers = getTextHoverManager().generateTextHoverDescriptors(descriptorsString);
+	}
+
+	void updateStatus(TextHoverManager.TextHoverDescriptor hoverConfig) {
+		IStatus status = new StatusInfo();
+
+		if (hoverConfig != null && hoverConfig.isEnabled() && EditorUtility.computeStateMask(hoverConfig.getModifierString()) == -1)
+			status = new StatusInfo(IStatus.ERROR, NLS.bind(SSEUIMessages.TextHoverPreferenceTab_modifierIsNotValid, new String[]{hoverConfig.getModifierString()}));
+
+		int i = 0;
+		HashMap stateMasks = new HashMap(fTextHovers.length);
+		while (status.isOK() && i < fTextHovers.length) {
+			if (fTextHovers[i].isEnabled()) {
+				String label = fTextHovers[i].getLabel();
+				Integer stateMask = new Integer(EditorUtility.computeStateMask(fTextHovers[i].getModifierString()));
+				if (stateMask.intValue() == -1)
+					status = new StatusInfo(IStatus.ERROR, NLS.bind(SSEUIMessages.TextHoverPreferenceTab_modifierIsNotValidForHover, new String[]{fTextHovers[i].getModifierString(), label}));
+				else if (stateMasks.containsKey(stateMask))
+					status = new StatusInfo(IStatus.ERROR, NLS.bind(SSEUIMessages.TextHoverPreferenceTab_duplicateModifier, new String[]{label, (String) stateMasks.get(stateMask)}));
+				else
+					stateMasks.put(stateMask, label);
+			}
+			i++;
+		}
+
+		updateStatus(status);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/TranslucencyPreferenceTab.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/TranslucencyPreferenceTab.java
new file mode 100644
index 0000000..808a99b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/TranslucencyPreferenceTab.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.preferences.ui;
+
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.text.Assert;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+
+public class TranslucencyPreferenceTab implements IPreferenceTab {
+
+	private PreferencePage fMainPreferencePage;
+	private IntegerFieldEditor fTranslucencyScale = null;
+	private final int MAX_PERCENTAGE = 100;
+
+	private IPropertyChangeListener validityChangeListener = new IPropertyChangeListener() {
+		public void propertyChange(PropertyChangeEvent event) {
+			if (event.getProperty().equals(FieldEditor.IS_VALID))
+				updateValidState();
+		}
+	};
+
+	/**
+	 *  
+	 */
+	public TranslucencyPreferenceTab() {
+		super();
+	}
+
+	public TranslucencyPreferenceTab(PreferencePage mainPreferencePage) {
+		Assert.isNotNull(mainPreferencePage);
+		setMainPreferencePage(mainPreferencePage);
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#createContents(org.eclipse.swt.widgets.Composite)
+	 */
+	public Control createContents(Composite tabFolder) {
+		Composite composite = new Composite(tabFolder, SWT.NULL);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 2;
+		composite.setLayout(layout);
+
+		String text = SSEUIMessages.TranslucencyPreferenceTab_1; //$NON-NLS-1$
+		fTranslucencyScale = new IntegerFieldEditor(EditorPreferenceNames.READ_ONLY_FOREGROUND_SCALE, text, composite);
+
+		fTranslucencyScale.setErrorMessage(JFaceResources.getString("StringFieldEditor.errorMessage"));//$NON-NLS-1$
+		fTranslucencyScale.setPreferenceStore(getPreferenceStore());
+		fTranslucencyScale.setPreferencePage(getMainPreferencePage());
+		fTranslucencyScale.setTextLimit(Integer.toString(MAX_PERCENTAGE).length());
+		fTranslucencyScale.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);
+		fTranslucencyScale.setValidRange(0, MAX_PERCENTAGE);
+		fTranslucencyScale.load();
+		fTranslucencyScale.setPropertyChangeListener(validityChangeListener);
+
+//		PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.PREFWEBX_READONLY_HELPID);
+		return composite;
+	}
+
+	/**
+	 * @return Returns the fMainPreferencePage.
+	 */
+	private PreferencePage getMainPreferencePage() {
+		return fMainPreferencePage;
+	}
+
+	/**
+	 * @return Returns the preference store used in this tab
+	 */
+	private IPreferenceStore getPreferenceStore() {
+		return SSEUIPlugin.getDefault().getPreferenceStore();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#getTitle()
+	 */
+	public String getTitle() {
+		return SSEUIMessages.TranslucencyPreferenceTab_0; //$NON-NLS-1$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#performApply()
+	 */
+	public void performApply() {
+		fTranslucencyScale.store();
+		SSEUIPlugin.getDefault().savePluginPreferences();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#performDefaults()
+	 */
+	public void performDefaults() {
+		fTranslucencyScale.loadDefault();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#performOk()
+	 */
+	public void performOk() {
+		performApply();
+	}
+
+	/**
+	 * @param mainPreferencePage
+	 *            The fMainPreferencePage to set.
+	 */
+	private void setMainPreferencePage(PreferencePage mainPreferencePage) {
+		fMainPreferencePage = mainPreferencePage;
+	}
+
+	private void updateValidState() {
+		if (getMainPreferencePage() != null) {
+			getMainPreferencePage().setValid(fTranslucencyScale.isValid());
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredCommentFoldingPosition.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredCommentFoldingPosition.java
new file mode 100644
index 0000000..f346653
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredCommentFoldingPosition.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.projection;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.source.projection.IProjectionPosition;
+
+/**
+ * Represents a folding position for an XML comment
+ */
+public abstract class AbstractStructuredCommentFoldingPosition extends Position implements IProjectionPosition {
+
+	/**
+	 * Default constructor
+	 * 
+	 * @param offset the offset of the folding position
+	 * @param length the length of the folidng position
+	 */
+	public AbstractStructuredCommentFoldingPosition(int offset, int length) {
+		super(offset, length);
+	}
+	
+	/**
+	 * @see org.eclipse.jface.text.source.projection.IProjectionPosition#computeCaptionOffset(org.eclipse.jface.text.IDocument)
+	 */
+	public int computeCaptionOffset(IDocument document) throws BadLocationException {
+		return findFirstContent(document.get(offset, length));
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.source.projection.IProjectionPosition#computeProjectionRegions(org.eclipse.jface.text.IDocument)
+	 */
+	public IRegion[] computeProjectionRegions(IDocument document) throws BadLocationException {
+		//get the content of the comment
+		String content = document.get(offset, length);
+		int contentStart = findFirstContent(content);
+		
+		//find the start line of the comment
+		//find the end line of the comment
+		//find the first line of text in the comment
+		int startLineNum = document.getLineOfOffset(getStartOffset());
+		IRegion startLine = document.getLineInformation(startLineNum);
+		int endLineNum = document.getLineOfOffset(getEndOffset()) +1;
+		IRegion endLine = document.getLineInformation(endLineNum);
+		int captionLineNum = document.getLineOfOffset(getStartOffset() + contentStart);
+		
+		int foldOffset;			
+		int foldEndOffset;
+		
+		synchronized (this) {
+			foldOffset = startLine.getOffset();
+			if(foldOffset < offset) {
+				offset = foldOffset;
+			}
+		
+			foldEndOffset = endLine.getOffset();
+		
+			if((foldEndOffset-offset) > length) {
+				length = foldEndOffset-offset;
+			}
+		}
+		
+		//fold before the first line of text in the comment
+		IRegion preRegion = null;
+		IRegion postRegion = null;
+		if(startLineNum < captionLineNum) {
+			IRegion captionLine = document.getLineInformation(captionLineNum);
+			preRegion = new Region(foldOffset, captionLine.getOffset()-foldOffset);
+		}
+		
+		//fold after the first line of text in the comment
+		if(captionLineNum < endLineNum) {
+			int postRegionOffset = document.getLineOffset(captionLineNum+1);
+			postRegion = new Region(postRegionOffset, foldEndOffset-postRegionOffset);
+		}
+		
+		IRegion[] regions = null;
+		if(preRegion != null && postRegion != null) {
+			regions = new IRegion[] {preRegion, postRegion};
+		} else if(preRegion != null) {
+			regions = new IRegion[] {preRegion};
+		} else if(postRegion != null) {
+			regions = new IRegion[] {postRegion};
+		}
+		
+		return regions;
+	}
+	
+	/**
+	 * Finds the offset of the first identifier part within <code>content</code>.
+	 * Returns 0 if none is found.
+	 *
+	 * @param content the content to search
+	 * @param prefixEnd the end of the prefix
+	 * @return the first index of a unicode identifier part, or zero if none can
+	 *         be found
+	 */
+	private int findFirstContent(final CharSequence content) {
+		int lenght= content.length();
+		for (int i= 0; i < lenght; i++) {
+			if (Character.isUnicodeIdentifierPart(content.charAt(i)))
+				return i;
+		}
+		return 0;
+	}
+	
+	/**
+	 * @return the start offset of the folding position
+	 */
+	protected abstract int getStartOffset();
+	
+	/**
+	 * @return the end offset of the folding position
+	 */
+	protected abstract int getEndOffset();
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingPosition.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingPosition.java
new file mode 100644
index 0000000..3ddb47a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingPosition.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.projection;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.source.projection.IProjectionPosition;
+
+/**
+ * Represents a single folding position in an <code>IStructuredDocument</code>
+ */
+public abstract class AbstractStructuredFoldingPosition extends Position implements IProjectionPosition {
+	
+	/**
+	 * Default constructor
+	 * 
+	 * @param offset the offset of the folding position
+	 * @param length the length of the folidng position
+	 */
+	public AbstractStructuredFoldingPosition(int offset, int length) {
+		super(offset, length);
+	}
+	
+	/**
+	 * @see org.eclipse.jface.text.source.projection.IProjectionPosition#computeCaptionOffset(org.eclipse.jface.text.IDocument)
+	 */
+	public int computeCaptionOffset(IDocument document) throws BadLocationException {
+		
+		return 0;
+	}
+	
+	/**
+	 * @see org.eclipse.jface.text.source.projection.IProjectionPosition#computeProjectionRegions(org.eclipse.jface.text.IDocument)
+	 */
+	public IRegion[] computeProjectionRegions(IDocument document) throws BadLocationException {
+		
+		int startLineNum = document.getLineOfOffset(getStartOffset()) + 1;
+		IRegion startLine = document.getLineInformation(startLineNum);
+		int endLineNum = document.getLineOfOffset(getEndOffset()) + 1;
+		IRegion endLine = document.getLineInformation(endLineNum);
+		
+		int foldOffset;			
+		int foldEndOffset;
+		
+		synchronized (this) {
+			foldOffset = startLine.getOffset();
+			if(foldOffset < offset) {
+				offset = foldOffset;
+			}
+		
+			foldEndOffset = endLine.getOffset();
+		
+			if((foldEndOffset-offset) > length) {
+				length = foldEndOffset-offset;
+			}
+		}
+		
+		return new IRegion[] {new Region(foldOffset, foldEndOffset-foldOffset)};
+	}
+	
+	/**
+	 * @return the start offset of the folding position
+	 */
+	protected abstract int getStartOffset();
+	
+	/**
+	 * @return the end offset of the folding position
+	 */
+	protected abstract int getEndOffset();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingStrategy.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingStrategy.java
new file mode 100644
index 0000000..c686845
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingStrategy.java
@@ -0,0 +1,510 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.projection;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcileStep;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.projection.IProjectionListener;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+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.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.sse.ui.internal.reconcile.AbstractStructuredTextReconcilingStrategy;
+import org.eclipse.wst.sse.ui.internal.reconcile.StructuredReconcileStep;
+
+/**
+ * <p>This class has the default implementation for a structured editor folding strategy.
+ * Each content type that the structured editor supports should create an extension point
+ * specifying a child class of this class as its folding strategy, if that content type
+ * should have folding.</p>
+ * 
+ * <p>EX:<br />
+ * <code>&lt;extension point="org.eclipse.wst.sse.ui.editorConfiguration"&gt;<br />
+ *  &lt;provisionalConfiguration<br />
+ *			type="foldingstrategy"<br />
+ *			class="org.eclipse.wst.xml.ui.internal.projection.XMLFoldingStrategy"<br />
+ *			target="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource" /&gt;<br />
+ *	&lt;/extension&gt;</code></p>
+ * 
+ * <p>Different content types can use the same folding strategy if it makes sense to do so,
+ * such as with HTML/XML/JSP.</p>
+ * 
+ * <p>This strategy is based on the Reconciler paradigm and thus runs in the background,
+ * this means that even for very large documents requiring the calculation of 1000s of
+ * folding annotations the user will not be effected except for the annotations may take
+ * some time to first appear.</p>
+ */
+public abstract class AbstractStructuredFoldingStrategy
+	extends AbstractStructuredTextReconcilingStrategy implements IProjectionListener {
+	
+	/**
+	 * The org.eclipse.wst.sse.ui.editorConfiguration provisionalConfiguration type
+	 */
+	public static final String ID = "foldingstrategy"; //$NON-NLS-1$ 
+	
+	/**
+	 * A named preference that controls whether folding is enabled in the
+	 * Structured Text editor.
+	 */
+	public final static String FOLDING_ENABLED = "foldingEnabled"; //$NON-NLS-1$ 
+	
+	/**
+	 * The annotation model associated with this folding strategy
+	 */
+	protected ProjectionAnnotationModel fProjectionAnnotationModel;
+	
+	/**
+	 * The structured text viewer this folding strategy is associated with
+	 */
+	private ProjectionViewer fViewer;
+	
+	/**
+	 * these are not used but needed to implement abstract methods
+	 */
+	private IReconcileStep fFoldingStep;
+	
+	/**
+	 * Default constructor for the folding strategy, can not take any parameters
+	 * because subclasses instances of this class are created using reflection
+	 * based on plugin settings
+	 */
+	public AbstractStructuredFoldingStrategy() {
+		super();
+	}
+	
+	/**
+	 * The folding strategy must be associated with a viewer for it to function
+	 * 
+	 * @param viewer the viewer to associate this folding strategy with
+	 */
+	public void setViewer(ProjectionViewer viewer) {
+		super.setViewer(viewer);
+		
+		if(fViewer != null) {
+			fViewer.removeProjectionListener(this);
+		}
+		fViewer = viewer;
+		fViewer.addProjectionListener(this);
+		fProjectionAnnotationModel = fViewer.getProjectionAnnotationModel();
+	}
+	
+	public void uninstall() {
+		setDocument(null);
+		
+		if(fViewer != null) {
+			fViewer.removeProjectionListener(this);
+			fViewer = null;
+		}
+		
+		fFoldingStep = null;
+		
+		projectionDisabled();
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.wst.sse.ui.internal.reconcile.AbstractStructuredTextReconcilingStrategy#setDocument(org.eclipse.jface.text.IDocument)
+	 */
+	public void setDocument(IDocument document) {
+		super.setDocument(document);
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.text.source.projection.IProjectionListener#projectionDisabled()
+	 */
+	public void projectionDisabled() {
+		fProjectionAnnotationModel = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.text.source.projection.IProjectionListener#projectionEnabled()
+	 */
+	public void projectionEnabled() {
+		if(fViewer != null) {
+			fProjectionAnnotationModel = fViewer.getProjectionAnnotationModel();
+		}
+	}
+	
+	/**
+	 * <p><b>NOTE 1:</b> This implementation of reconcile ignores the given {@link IRegion} and instead gets all of the
+	 * structured document regions effected by the range of the given {@link DirtyRegion}.</p>
+	 * 
+	 * <p><b>NOTE 2:</b> In cases where multiple {@link IRegion} maybe dirty it is more efficient to pass one
+	 * {@link DirtyRegion} contain all of the {@link IRegion}s then one {@link DirtyRegion} for each IRegion.
+	 * Case in point, when processing the entire document it is <b>recommended</b> that this function be
+	 * called only <b>once</b> with one {@link DirtyRegion} that spans the entire document.</p>
+	 * 
+	 * @param dirtyRegion the region that needs its folding annotations processed
+	 * @param subRegion ignored
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.reconcile.AbstractStructuredTextReconcilingStrategy#reconcile(org.eclipse.jface.text.reconciler.DirtyRegion, org.eclipse.jface.text.IRegion)
+	 */
+	public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+		IStructuredModel model = null;
+		if(fProjectionAnnotationModel != null) {
+			try {
+				model = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
+				if(model != null) {
+					//use the structured doc to get all of the regions effected by the given dirty region
+					IStructuredDocument structDoc = model.getStructuredDocument();
+					IStructuredDocumentRegion[] structRegions = structDoc.getStructuredDocumentRegions(dirtyRegion.getOffset(), dirtyRegion.getLength());
+					Set indexedRegions = getIndexedRegions(model, structRegions);
+
+					//these are what are passed off to the annotation model to
+					//actually create and maintain the annotations
+					List modifications = new ArrayList();
+					List deletions = new ArrayList();
+					Map additions = new HashMap();
+					boolean isInsert = dirtyRegion.getType().equals(DirtyRegion.INSERT);
+					boolean isRemove = dirtyRegion.getType().equals(DirtyRegion.REMOVE);
+
+					//find and mark all folding annotations with length 0 for deletion 
+					markInvalidAnnotationsForDeletion(dirtyRegion, deletions);
+					
+					//reconcile each effected indexed region
+					Iterator indexedRegionsIter = indexedRegions.iterator();
+					while(indexedRegionsIter.hasNext() && fProjectionAnnotationModel != null) {
+						IndexedRegion indexedRegion = (IndexedRegion)indexedRegionsIter.next();
+					
+						//only try to create an annotation if the index region is a valid type
+						if(indexedRegionValidType(indexedRegion)) {
+							FoldingAnnotation annotation = new FoldingAnnotation(indexedRegion, false);
+							
+							// if INSERT calculate new addition position or modification
+							// else if REMOVE add annotation to the deletion list
+							if(isInsert) {
+								Annotation existingAnno = getExistingAnnotation(indexedRegion);
+								//if projection has been disabled the iter could be null
+								//if annotation does not already exist for this region create a new one
+								//else modify an old one, which could include deletion
+								if(existingAnno == null) {
+									Position newPos = calcNewFoldPosition(indexedRegion);
+
+									if(newPos != null && newPos.length > 0) {
+										additions.put(annotation, newPos);
+									}
+								} else {
+									updateAnnotations(existingAnno, indexedRegion, additions, modifications, deletions);
+								}
+							} else if (isRemove) {
+								deletions.add(annotation);
+							}
+						}
+					}
+					
+					//be sure projection has not been disabled
+					if(fProjectionAnnotationModel != null) {
+						//send the calculated updates to the annotations to the annotation model
+						fProjectionAnnotationModel.modifyAnnotations((Annotation[])deletions.toArray(new Annotation[1]), additions, (Annotation[])modifications.toArray(new Annotation[0]));
+					}
+				}
+			} finally {
+				if(model != null) {
+					model.releaseFromRead();
+				}
+			}
+		}
+	}
+	
+	/**
+	 * <p>Every implementation of the folding strategy calculates the position for a given
+	 * IndexedRegion differently.  Also this calculation often relies on casting to internal classes
+	 * only available in the implementing classes plugin</p>
+	 * 
+	 * @param indexedRegion the IndexedRegion to calculate a new annotation position for
+	 * @return the calculated annotation position or NULL if none can be calculated based on the given region
+	 */
+	abstract protected Position calcNewFoldPosition(IndexedRegion indexedRegion);
+	
+	/**
+	 * This is the default behavior for updating a dirtied IndexedRegion.  This function
+	 * can be overridden if slightly different functionality is required in a specific instance
+	 * of this class.
+	 * 
+	 * @param existingAnnotationsIter the existing annotations that need to be updated
+	 * based on the given dirtied IndexRegion
+	 * @param dirtyRegion the IndexedRegion that caused the annotations need for updating
+	 * @param modifications the list of annotations to be modified
+	 * @param deletions the list of annotations to be deleted
+	 */
+	protected void updateAnnotations(Annotation existingAnnotation, IndexedRegion dirtyRegion, Map additions, List modifications, List deletions) {
+		if(existingAnnotation instanceof FoldingAnnotation) {
+			FoldingAnnotation foldingAnnotation = (FoldingAnnotation)existingAnnotation;
+			Position newPos = calcNewFoldPosition(foldingAnnotation.getRegion());
+
+			//if a new position can be calculated then update the position of the annotation,
+			//else the annotation needs to be deleted
+			if(newPos != null && newPos.length > 0 && fProjectionAnnotationModel != null) {
+				Position oldPos = fProjectionAnnotationModel.getPosition(foldingAnnotation);
+				//only update the position if we have to
+				if(!newPos.equals(oldPos)) {
+					oldPos.setOffset(newPos.offset);
+					oldPos.setLength(newPos.length);
+					modifications.add(foldingAnnotation);
+				}
+			} else {
+				deletions.add(foldingAnnotation);
+			}
+		}
+	}
+
+	/**
+	 * <p>Searches the given {@link DirtyRegion} for annotations that now have a length of 0.
+	 * This is caused when something that was being folded has been deleted.  These {@link FoldingAnnotation}s
+	 * are then added to the {@link List} of {@link FoldingAnnotation}s to be deleted</p>
+	 * 
+	 * @param dirtyRegion find the now invalid {@link FoldingAnnotation}s in this {@link DirtyRegion}
+	 * @param deletions the current list of {@link FoldingAnnotation}s marked for deletion that the
+	 * newly found invalid {@link FoldingAnnotation}s will be added to
+	 */
+	protected void markInvalidAnnotationsForDeletion(DirtyRegion dirtyRegion, List deletions) {
+		Iterator iter = getAnnotationIterator(dirtyRegion);
+		while(iter.hasNext()) {
+			Annotation anno = (Annotation)iter.next();
+			if(anno instanceof FoldingAnnotation) {
+				Position pos = fProjectionAnnotationModel.getPosition(anno);
+				if(pos.length == 0) {
+					deletions.add(anno);
+	 			}
+	 		}
+	 	}
+	}
+
+	/**
+	 * Should return true if the given IndexedRegion is one that this strategy pays attention to
+	 * when calculating new and updated annotations
+	 * 
+	 * @param indexedRegion the IndexedRegion to check the type of
+	 * @return true if the IndexedRegion is of a valid type, false otherwise
+	 */
+	abstract protected boolean indexedRegionValidType(IndexedRegion indexedRegion);
+	
+	/**
+	 *  Steps are not used in this strategy
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.reconcile.AbstractStructuredTextReconcilingStrategy#containsStep(org.eclipse.jface.text.reconciler.IReconcileStep)
+	 */
+	protected boolean containsStep(IReconcileStep step) {
+		return fFoldingStep.equals(step);
+	}
+
+	/** 
+	 * Steps are not used in this strategy
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.reconcile.AbstractStructuredTextReconcilingStrategy#createReconcileSteps()
+	 */
+	public void createReconcileSteps() {
+		fFoldingStep = new StructuredReconcileStep() { };
+	}
+	
+	/**
+	 * A FoldingAnnotation is a ProjectionAnnotation in a structured document.
+	 * Its extended functionality include storing the <code>IndexedRegion</code> it is folding
+	 * and overriding the paint method (in a hacky type way) to prevent one line folding
+	 * annotations to be drawn.
+	 */
+	protected class FoldingAnnotation extends ProjectionAnnotation {
+		private boolean fIsVisible; /* workaround for BUG85874 */
+		
+		/**
+		 * The IndexedRegion this annotation is folding
+		 */
+		private IndexedRegion fRegion;
+		
+		/**
+		 * Creates a new FoldingAnnotation that is associated with the given IndexedRegion
+		 * 
+		 * @param region the IndexedRegion this annotation is associated with 
+		 * @param isCollapsed true if this annotation should be collapsed, false otherwise
+		 */
+		public FoldingAnnotation(IndexedRegion region, boolean isCollapsed) {
+			super(isCollapsed);
+			
+			fIsVisible = false;
+			fRegion = region;
+		}
+		
+		/**
+		 * Returns the IndexedRegion this annotation is associated with
+		 * 
+		 * @return the IndexedRegion this annotation is associated with
+		 */
+		public IndexedRegion getRegion() {
+			return fRegion;
+		}
+
+		public void setRegion(IndexedRegion region) {
+			fRegion = region;
+		}
+
+		/**
+		 * Does not paint hidden annotations. Annotations are hidden when they
+		 * only span one line.
+		 * 
+		 * @see ProjectionAnnotation#paint(org.eclipse.swt.graphics.GC,
+		 *      org.eclipse.swt.widgets.Canvas,
+		 *      org.eclipse.swt.graphics.Rectangle)
+		 */
+		public void paint(GC gc, Canvas canvas, Rectangle rectangle) {
+			/* workaround for BUG85874 */
+			/*
+			 * only need to check annotations that are expanded because hidden
+			 * annotations should never have been given the chance to
+			 * collapse.
+			 */
+			if (!isCollapsed()) {
+				// working with rectangle, so line height
+				FontMetrics metrics = gc.getFontMetrics();
+				if (metrics != null) {
+					// do not draw annotations that only span one line and
+					// mark them as not visible
+					if ((rectangle.height / metrics.getHeight()) <= 1) {
+						fIsVisible = false;
+						return;
+					}
+				}
+			}
+			fIsVisible = true;
+			super.paint(gc, canvas, rectangle);
+		}
+
+		/**
+		 * @see org.eclipse.jface.text.source.projection.ProjectionAnnotation#markCollapsed()
+		 */
+		public void markCollapsed() {
+			/* workaround for BUG85874 */
+			// do not mark collapsed if annotation is not visible
+			if (fIsVisible)
+				super.markCollapsed();
+		}
+		
+		/**
+		 * Two FoldingAnnotations are equal if their IndexedRegions are equal
+		 * 
+		 * @see java.lang.Object#equals(java.lang.Object)
+		 */
+		public boolean equals(Object obj) {
+			boolean equal = false;
+			
+			if(obj instanceof FoldingAnnotation) {
+				equal = fRegion.equals(((FoldingAnnotation)obj).fRegion);
+			}
+			
+			return equal;
+		}
+		
+		/**
+		 * Returns the hash code of the IndexedRegion this annotation is associated with
+		 * 
+		 * @see java.lang.Object#hashCode()
+		 */
+		public int hashCode() {
+			return fRegion.hashCode();
+		}
+		
+		/**
+		 * Returns the toString of the aIndexedRegion this annotation is associated with
+		 * 
+		 * @see java.lang.Object#toString()
+		 */
+		public String toString() {
+			return fRegion.toString();
+		}
+	}
+	
+	/**
+	 * Given a {@link DirtyRegion} returns an {@link Iterator} of the already existing
+	 * annotations in that region.
+	 * 
+	 * @param dirtyRegion the {@link DirtyRegion} to check for existing annotations in
+	 * 
+	 * @return an {@link Iterator} over the annotations in the given {@link DirtyRegion}.
+	 * The iterator could have no annotations in it. Or <code>null</code> if projection has
+	 * been disabled.
+	 */
+	private Iterator getAnnotationIterator(DirtyRegion dirtyRegion) {
+		Iterator annoIter = null; 
+		//be sure project has not been disabled
+		if(fProjectionAnnotationModel != null) {
+			//workaround for Platform Bug 299416
+			int offset = dirtyRegion.getOffset();
+			if(offset > 0) {
+				offset--;
+			}
+			annoIter = fProjectionAnnotationModel.getAnnotationIterator(offset, dirtyRegion.getLength(), false, false);
+		}
+		return annoIter;
+	}
+
+	/**
+	 * <p>Gets the first {@link Annotation} at the start offset of the given {@link IndexedRegion}.</p>
+	 * 
+	 * @param indexedRegion get the first {@link Annotation} at this {@link IndexedRegion}
+	 * @return the first {@link Annotation} at the start offset of the given {@link IndexedRegion}
+	 */
+	private Annotation getExistingAnnotation(IndexedRegion indexedRegion) {
+		Iterator iter = fProjectionAnnotationModel.getAnnotationIterator(indexedRegion.getStartOffset(), 1, false, true);
+		Annotation anno = null;
+		if(iter.hasNext()) {
+			anno = (Annotation)iter.next();
+		}
+
+		return anno;
+	}
+
+	/**
+	 * <p>Gets all of the {@link IndexedRegion}s from the given {@link IStructuredModel} spand by the given
+	 * {@link IStructuredDocumentRegion}s.</p>
+	 * 
+	 * @param model the {@link IStructuredModel} used to get the {@link IndexedRegion}s
+	 * @param structRegions get the {@link IndexedRegion}s spanned by these {@link IStructuredDocumentRegion}s
+	 * @return the {@link Set} of {@link IndexedRegion}s from the given {@link IStructuredModel} spaned by the
+	 * given {@link IStructuredDocumentRegion}s.
+	 */
+	private Set getIndexedRegions(IStructuredModel model, IStructuredDocumentRegion[] structRegions) {
+		Set indexedRegions = new HashSet();
+
+		//for each text region in each struct doc region find the indexed region it spans/is in
+		for(int structRegionIndex = 0; structRegionIndex < structRegions.length && fProjectionAnnotationModel != null; ++structRegionIndex) {
+			ITextRegionList textRegions = structRegions[structRegionIndex].getRegions();
+			for(int textRegionIndex = 0; textRegionIndex < textRegions.size() && fProjectionAnnotationModel != null; ++textRegionIndex) {
+				int offset = structRegions[structRegionIndex].getStartOffset(textRegions.get(textRegionIndex));
+				indexedRegions.add(model.getIndexedRegion(offset));
+			}
+		}
+
+		return indexedRegions;
+	 }
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/AdapterPropertySheetEntryLabelProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/AdapterPropertySheetEntryLabelProvider.java
new file mode 100644
index 0000000..18f919c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/AdapterPropertySheetEntryLabelProvider.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.properties;
+
+
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.views.properties.IPropertySheetEntry;
+import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
+
+
+public class AdapterPropertySheetEntryLabelProvider extends LabelProvider {
+	public Image getImage(Object element) {
+		if (element == null)
+			return null;
+		if (element instanceof IPropertySheetEntry) {
+			return ((IPropertySheetEntry) element).getImage();
+		}
+		if (element instanceof INodeNotifier) {
+			IPropertySheetEntry entry = (IPropertySheetEntry) ((INodeNotifier) element).getAdapterFor(IPropertySheetEntry.class);
+			if (entry != null)
+				return entry.getImage();
+		}
+		return super.getImage(element);
+	}
+
+	public String getText(Object element) {
+		if (element == null)
+			return null;
+		if (element instanceof IPropertySheetEntry) {
+			return ((IPropertySheetEntry) element).getValueAsString();
+		}
+		if (element instanceof INodeNotifier) {
+			IPropertySheetEntry entry = (IPropertySheetEntry) ((INodeNotifier) element).getAdapterFor(IPropertySheetEntry.class);
+			if (entry != null)
+				return entry.getValueAsString();
+		}
+		return super.getText(element);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/ConfigurablePropertySheetPage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/ConfigurablePropertySheetPage.java
new file mode 100644
index 0000000..881cb2f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/ConfigurablePropertySheetPage.java
@@ -0,0 +1,207 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.properties;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.part.IPageSite;
+import org.eclipse.ui.part.PageBookView;
+import org.eclipse.ui.views.properties.IPropertySheetEntry;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.IPropertySourceProvider;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+import org.eclipse.wst.sse.ui.views.properties.IPropertySourceExtension;
+import org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration;
+
+
+/**
+ * A configurable IPropertySheetPage since the standard PropertySheetPage does
+ * not expose its viewer field.
+ */
+
+public class ConfigurablePropertySheetPage extends PropertySheetPage {
+	private class NullPropertySheetConfiguration extends PropertySheetConfiguration {
+		public IPropertySourceProvider getPropertySourceProvider(IPropertySheetPage page) {
+			return null;
+		}
+	}
+
+	private static final boolean _DEBUG = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/propertySheet")); //$NON-NLS-1$  //$NON-NLS-2$;;
+
+	private long _DEBUG_TIME = 0;
+
+	private PropertySheetConfiguration fConfiguration;
+	private Object[] fSelectedEntries = null;
+	private ISelection fInput = null;
+	private IMenuManager fMenuManager;
+
+	private RemoveAction fRemoveAction;
+
+	private IStatusLineManager fStatusLineManager;
+
+	private IToolBarManager fToolBarManager;
+
+	private final PropertySheetConfiguration NULL_CONFIGURATION = new NullPropertySheetConfiguration();
+
+	public ConfigurablePropertySheetPage() {
+		super();
+	}
+
+	public void createControl(Composite parent) {
+		setPropertySourceProvider(getConfiguration().getPropertySourceProvider(this));
+		super.createControl(parent);
+	}
+
+	public void dispose() {
+		setConfiguration(null);
+		getSite().getWorkbenchWindow().getSelectionService().removePostSelectionListener(this);
+		fSelectedEntries = null;
+		fInput = null;
+		super.dispose();
+	}
+
+	public PropertySheetConfiguration getConfiguration() {
+		if (fConfiguration == null)
+			fConfiguration = NULL_CONFIGURATION;
+		return fConfiguration;
+	}
+
+	public void handleEntrySelection(ISelection selection) {
+		if (getControl() != null && !getControl().isDisposed() && selection != null) {
+			super.handleEntrySelection(selection);
+			if (selection instanceof IStructuredSelection) {
+				fSelectedEntries = ((IStructuredSelection) selection).toArray();
+			}
+			else {
+				fSelectedEntries = null;
+			}
+			fRemoveAction.setEnabled(!selection.isEmpty());
+		}
+	}
+
+	public void init(IPageSite pageSite) {
+		super.init(pageSite);
+		pageSite.getWorkbenchWindow().getSelectionService().addPostSelectionListener(this);
+	}
+
+	public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+		super.makeContributions(menuManager, toolBarManager, statusLineManager);
+		fMenuManager = menuManager;
+		fToolBarManager = toolBarManager;
+		fStatusLineManager = statusLineManager;
+
+		fRemoveAction = new RemoveAction(this);
+		toolBarManager.add(fRemoveAction);
+		menuManager.add(fRemoveAction);
+		getConfiguration().addContributions(menuManager, toolBarManager, statusLineManager);
+
+		menuManager.update(true);
+	}
+
+	void remove() {
+		if (fSelectedEntries != null) {
+			Object[] entries = fSelectedEntries;
+			ISelection selection = fInput;
+			boolean needsRefresh = false;
+			if (selection != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+				IPropertySource source = getConfiguration().getPropertySourceProvider(this).getPropertySource(((IStructuredSelection) selection).getFirstElement());
+				if (source != null && source instanceof IPropertySourceExtension) {
+					for (int i = 0; i < entries.length; i++) {
+						if (entries[i] instanceof IPropertySheetEntry) {
+							IPropertySheetEntry entry = (IPropertySheetEntry) entries[i];
+							needsRefresh = true;
+							((IPropertySourceExtension) source).removeProperty(entry.getDisplayName());
+						}
+					}
+				}
+			}
+			if (needsRefresh) {
+				refresh();
+			}
+		}
+	}
+
+	/*
+	 * Filter the selection through the current Configuration. Not every
+	 * selection received is a Structured selection nor are the Structured
+	 * selection's elements all to be displayed.
+	 * 
+	 * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart,
+	 *      org.eclipse.jface.viewers.ISelection)
+	 */
+	public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+		if (_DEBUG) {
+			_DEBUG_TIME = System.currentTimeMillis();
+		}
+		// skip if we're the source of this selection
+		if (part != null && part instanceof PageBookView) {
+			if (((PageBookView) part).getCurrentPage() == this)
+				return;
+		}
+		if (getControl() != null && getControl().isVisible()) {
+			ISelection preferredSelection = getConfiguration().getInputSelection(part, selection);
+			/*
+			 * Do some minor caching of the selection.
+			 * 
+			 * As a PropertySheetPage, we've always notified of selection
+			 * changes, but we've also subscribed to post selection
+			 * notification so we can track caret movements in source viewers.
+			 * When selecting a block of text, we're thus notified of the new
+			 * selection twice. Remembering what our last *effective*
+			 * selection was allows us to cut out most of the
+			 * double-notification penalty.
+			 */
+			if (!preferredSelection.equals(fInput)) {
+				fInput = preferredSelection;
+				fSelectedEntries = null;
+				super.selectionChanged(part, preferredSelection);
+			}
+
+			if (_DEBUG) {
+				System.out.println("(P:service " + (System.currentTimeMillis() - _DEBUG_TIME) + "ms) " + part + " : " + ((IStructuredSelection) preferredSelection).getFirstElement()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
+		}
+		else if (_DEBUG) {
+			System.out.println("[skipped] (P:" + (System.currentTimeMillis() - _DEBUG_TIME) + "ms) " + part + " : " + selection); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+	}
+
+	/**
+	 * @param configuration
+	 *            The configuration to set.
+	 */
+	public void setConfiguration(PropertySheetConfiguration configuration) {
+		if (fConfiguration != null) {
+			fConfiguration.removeContributions(fMenuManager, fToolBarManager, fStatusLineManager);
+			fConfiguration.unconfigure();
+		}
+
+		fConfiguration = configuration;
+
+		if (fConfiguration != null) {
+			setPropertySourceProvider(fConfiguration.getPropertySourceProvider(this));
+			fConfiguration.addContributions(fMenuManager, fToolBarManager, fStatusLineManager);
+		}
+	}
+
+	public void setFocus() {
+		super.setFocus();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/CustomPropertyDescriptor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/CustomPropertyDescriptor.java
new file mode 100644
index 0000000..154861b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/CustomPropertyDescriptor.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.properties;
+
+
+
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.views.properties.PropertyDescriptor;
+
+public class CustomPropertyDescriptor extends PropertyDescriptor {
+
+	protected Class cellEditorClass = null;
+
+	/**
+	 * Returns a property descriptor with a unique name and a display name.
+	 * 
+	 * @param id
+	 *            the id for the property
+	 * @param displayName
+	 *            the name to display for the property
+	 */
+	public CustomPropertyDescriptor(Object id, String newDisplayName, Class editorClass) {
+		super(id, newDisplayName);
+		setDescription((String) id);
+		setCellEditorClass(editorClass);
+	}
+
+	/**
+	 * Returns a property descriptor with a unique name and a display name.
+	 * 
+	 * @param uniqueName
+	 *            the unique name of the property
+	 * @param displayName
+	 *            the name to display for the property
+	 */
+	public CustomPropertyDescriptor(String uniqueName, String newDisplayName) {
+		this(uniqueName, newDisplayName, TextCellEditor.class);
+	}
+
+	public CellEditor createPropertyEditor(Composite parent) {
+		return getPropertyEditor(parent);
+	}
+
+	public Class getCellEditorClass() {
+		return cellEditorClass;
+	}
+
+	/**
+	 * Returns the editor used to edit the property.
+	 * 
+	 * @return an editor for the property
+	 */
+	protected CellEditor getPropertyEditor(Composite parent) {
+		if (getCellEditorClass() == null)
+			return null;
+
+		java.lang.reflect.Constructor constructor = null;
+		try {
+			constructor = getCellEditorClass().getDeclaredConstructor(new Class[]{Composite.class});
+		} catch (NoSuchMethodException nsme) {
+			return new TextCellEditor(parent);
+		}
+		if (constructor != null) {
+			try {
+				return (CellEditor) constructor.newInstance(new Object[]{parent});
+			} catch (InstantiationException ie) {
+			} catch (java.lang.reflect.InvocationTargetException ite) {
+			} catch (IllegalAccessException iae) {
+			}
+		}
+		return new TextCellEditor(parent);
+	}
+
+	public void setCellEditorClass(Class newCellEditorClass) {
+		cellEditorClass = newCellEditorClass;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/RemoveAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/RemoveAction.java
new file mode 100644
index 0000000..a02a120
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/RemoveAction.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.properties;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
+
+public class RemoveAction extends Action {
+	private ConfigurablePropertySheetPage fPage;
+
+	public RemoveAction(ConfigurablePropertySheetPage page) {
+		super();
+		fPage = page;
+		setText(getText());
+		setToolTipText(getText());
+		setImageDescriptor(EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_ELCL_DELETE));
+		setDisabledImageDescriptor(EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_DLCL_DELETE));
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.Action#getText()
+	 */
+	public String getText() {
+		return SSEUIMessages.RemoveAction_0; //$NON-NLS-1$
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.IAction#run()
+	 */
+	public void run() {
+		fPage.remove();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/ShowPropertiesAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/ShowPropertiesAction.java
new file mode 100644
index 0000000..38b0551
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/ShowPropertiesAction.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.properties;
+
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.ShowViewAction;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
+import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
+
+/**
+ * Surfaces the Properties view
+ */
+public class ShowPropertiesAction extends ShowViewAction {
+	private final static String VIEW_ID = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
+	private ISelectionProvider fSelectionProvider;
+	private IWorkbenchPart fPart;
+
+	public ShowPropertiesAction() {
+		super(SSEUIMessages.ShowPropertiesAction_0, EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_OBJ_PROP_PS)); //$NON-NLS-1$
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IHelpContextIds.CONTMNU_PROPERTIES_HELPID);
+	}
+
+	public ShowPropertiesAction(IWorkbenchPart part, ISelectionProvider provider) {
+		this();
+		fSelectionProvider = provider;
+		fPart = part;
+	}
+
+	protected String getViewID() {
+		return VIEW_ID;
+	}
+
+	public void run() {
+		super.run();
+
+		if (fSelectionProvider != null) {
+			IWorkbenchWindow window = SSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
+			IWorkbenchPage page = window.getActivePage();
+			if (page != null) {
+				IViewPart findView = page.findView(getViewID());
+				if (findView instanceof ISelectionListener && fPart != null) {
+					((ISelectionListener) findView).selectionChanged(fPart, fSelectionProvider.getSelection());
+				}
+				else {
+					findView.getViewSite().getSelectionProvider().setSelection(fSelectionProvider.getSelection());
+				}
+			}
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/preferences/CommonEditorPreferenceNames.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/preferences/CommonEditorPreferenceNames.java
new file mode 100644
index 0000000..3eaa30d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/preferences/CommonEditorPreferenceNames.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.provisional.preferences;
+
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+
+/**
+ * Common editor preference keys used by the Structured Text Editor.
+ * 
+ * @plannedfor 1.0
+ */
+public class CommonEditorPreferenceNames {
+	private CommonEditorPreferenceNames() {
+		// empty private constructor so users cannot instantiate class
+	}
+
+	/**
+	 * A named preference that controls as-you-type validation
+	 * <p>
+	 * Value is of type <code>Boolean</code>.
+	 * </p>
+	 */
+	public static final String EVALUATE_TEMPORARY_PROBLEMS = EditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS;
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryProvider.java
new file mode 100644
index 0000000..e2bf0d4
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryProvider.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.registry;
+
+import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IDocumentTypeHandler;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+
+
+public interface AdapterFactoryProvider {
+
+	public void addAdapterFactories(IStructuredModel structuredModel);
+
+	// TODO_issue: IDocumentTypeHandler doesn't seem correct in this API.
+	// reexamine and see if should be ModelHandler, or ContentTypeIdentifer
+	// instead.
+	public boolean isFor(IDocumentTypeHandler contentTypeDescription);
+
+	/**
+	 * This method should only add those factories related to embedded content
+	 * type
+	 */
+	public void reinitializeFactories(IStructuredModel structuredModel);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistry.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistry.java
new file mode 100644
index 0000000..0a04339
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistry.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.registry;
+
+import java.util.Iterator;
+
+/**
+ * This is basically a "factory for factories". It is to used to associate
+ * "edit time" AdapterFactories with a StructuredModel, based on the
+ * IStructuredModel's ContentTypeDescription. In plugin.xml files, there
+ * should be an AdapterFactoryProvider defined for every definition of
+ * ContentTypeDescription.
+ */
+public interface AdapterFactoryRegistry {
+
+	/**
+	 * Returns an Iterator over a Collection of AdapterFactoryProviders
+	 * 
+	 * @return
+	 */
+	public Iterator getAdapterFactories();
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/NodeAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryExtension.java
similarity index 69%
rename from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/NodeAction.java
rename to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryExtension.java
index 0974e8f..bc47269 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/NodeAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryExtension.java
@@ -10,17 +10,13 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.registry;
 
+import java.util.Iterator;
+import java.util.List;
 
-package org.eclipse.wst.xml.ui.internal.actions;
+public interface AdapterFactoryRegistryExtension {
+	Iterator getAdapterFactories(String contentTypeID);
 
-import org.eclipse.jface.action.Action;
-
-public abstract class NodeAction extends Action {
-
-	public String getSortKey() {
-		return null;
-	}
-
-	public abstract String getUndoDescription();
+	List getAdapterFactoriesAsList(String contentTypeID);
 }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryImpl.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryImpl.java
new file mode 100644
index 0000000..78ebf47
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryImpl.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.registry;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+
+public class AdapterFactoryRegistryImpl implements AdapterFactoryRegistry, AdapterFactoryRegistryExtension {
+
+	protected final static String ATT_CLASS = "class"; //$NON-NLS-1$
+
+	private static AdapterFactoryRegistry instance = null;
+
+	static synchronized public AdapterFactoryRegistry getInstance() {
+		if (instance == null) {
+			instance = new AdapterFactoryRegistryImpl();
+		}
+		return instance;
+	}
+
+	// this map exists so there is only one provider
+	// instance not duplicate providers for different content types
+	private HashMap adapterProviders = null;
+
+	private boolean DEBUG = false;
+	/**
+	 * This HashMap contains: [contentTypeId -> element2providerMap] | V
+	 * [configurationElement -> AdapterFactoryProvider]
+	 * 
+	 */
+	private HashMap hashMap = null;
+
+	// providers with no content type associated
+	// just added through the add(...) method
+	private HashSet unassociatedProviders = null;
+
+	private AdapterFactoryRegistryImpl() {
+		super();
+		this.hashMap = new HashMap();
+		this.unassociatedProviders = new HashSet();
+		this.adapterProviders = new HashMap();
+
+		// doesn't instantiate classes, just stores configuration elements
+		AdapterFactoryRegistryReader.readRegistry(hashMap);
+	}
+
+	void add(AdapterFactoryProvider adapterFactoryProvider) {
+		this.unassociatedProviders.add(adapterFactoryProvider);
+	}
+
+	public Iterator getAdapterFactories() {
+		if (DEBUG) {
+			System.out.println("===================================================================================="); //$NON-NLS-1$
+			System.out.println("GETTING ALL ADAPTER FACTORIES"); //$NON-NLS-1$
+		}
+
+		List results = new ArrayList();
+
+		// add providers that have no content type specification
+		results.addAll(this.unassociatedProviders);
+		Iterator it = this.hashMap.keySet().iterator();
+		String contentTypeId = null;
+		while (it.hasNext()) {
+			contentTypeId = (String) it.next();
+
+			if (DEBUG)
+				System.out.println(" + for: " + contentTypeId); //$NON-NLS-1$
+
+			results.addAll(getAdapterFactoriesAsList(contentTypeId));
+		}
+
+		if (DEBUG) {
+			System.out.println("===================================================================================="); //$NON-NLS-1$
+		}
+
+		return results.iterator();
+	}
+
+	public Iterator getAdapterFactories(String contentTypeID) {
+		if (DEBUG) {
+			System.out.println("===================================================================================="); //$NON-NLS-1$
+			System.out.println("GETTING ADAPTER FACTORIES for: " + contentTypeID); //$NON-NLS-1$
+		}
+
+		List results = new ArrayList();
+
+		// add providers that have no content type specification
+		results.addAll(unassociatedProviders);
+
+		// add unknown content type providers (for backwards compatability)
+		results.addAll(getAdapterFactoriesAsList(AdapterFactoryRegistryReader.UNKNOWN_CONTENT_TYPE));
+
+		// add providers for specific content type
+		results.addAll(getAdapterFactoriesAsList(Platform.getContentTypeManager().getContentType(contentTypeID)));
+
+
+		if (DEBUG) {
+			System.out.println("===================================================================================="); //$NON-NLS-1$
+		}
+
+		return results.iterator();
+	}
+
+	public List getAdapterFactoriesAsList(IContentType contentType) {
+		IContentType type = contentType;
+		List results = new ArrayList();
+		while (type != null && !type.getId().equals(IContentTypeManager.CT_TEXT)) {
+			results.addAll(getAdapterFactoriesAsList(type.getId()));
+			type = type.getBaseType();
+		}
+		return results;
+	}
+
+	/**
+	 * Using this new API, only AdapterFactoryProviders for a certain content
+	 * type are instantiated. This will allow for the minimum number of
+	 * plugins to be loaded rather than all that implement the adapter factory
+	 * extension point.
+	 * 
+	 * @param contentTypeID
+	 * @return
+	 */
+	public List getAdapterFactoriesAsList(String contentTypeID) {
+
+		List results = new ArrayList();
+
+		// get element2Provider map for specified content type
+		Object o = hashMap.get(contentTypeID);
+		if (o != null) {
+			// instantiate if necessary from
+			// element2adapterFactoryProvider
+			// map
+			Map element2Provider = (Map) o;
+			Iterator it = element2Provider.keySet().iterator();
+			IConfigurationElement element = null;
+			String classname = null;
+			Object existing = null;
+			AdapterFactoryProvider p = null;
+			while (it.hasNext()) {
+				element = (IConfigurationElement) it.next();
+				o = element2Provider.get(element);
+				if (o != null) {
+					// this provider has already been created
+					if (DEBUG)
+						System.out.println("already created: " + element.getAttribute(ATT_CLASS)); //$NON-NLS-1$
+
+					results.add(o);
+				}
+				else {
+					// need to create the provider
+					try {
+						classname = element.getAttribute(ATT_CLASS);
+
+						if (DEBUG)
+							System.out.println("about to create: " + classname); //$NON-NLS-1$
+
+						// check if we created one already
+						existing = this.adapterProviders.get(classname);
+						if (existing == null) {
+							// this is the only place
+							// AdapterFactoryProviders
+							// are created
+							p = (AdapterFactoryProvider) element.createExecutableExtension(ATT_CLASS); // $NON-NLS-1$
+							this.adapterProviders.put(classname, p);
+						}
+						else {
+							p = (AdapterFactoryProvider) existing;
+						}
+
+						// add to element2Provider for this contentType
+						element2Provider.put(element, p);
+						// add to results to return for this method
+						results.add(p);
+
+					}
+					catch (CoreException e) {
+						// if the provider throws any exception, just log
+						// and
+						// continue
+						Logger.logException(e);
+					}
+				}
+			}
+		}
+
+		return results;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryReader.java
new file mode 100644
index 0000000..383e5e0
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryReader.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.registry;
+
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+
+/**
+ * This class just converts what's in the plugins registry into a form more
+ * easily useable by others, the ContentTypeRegistry.
+ */
+class AdapterFactoryRegistryReader {
+	protected final static String ATT_CLASS = "class"; //$NON-NLS-1$
+
+	protected final static String ATT_ID = "id"; //$NON-NLS-1$
+
+	private static boolean DEBUG = false;
+	protected final static String EXTENSION_POINT_ID = "adapterFactoryDescription"; //$NON-NLS-1$
+	//
+	protected final static String PLUGIN_ID = "org.eclipse.wst.sse.ui"; //$NON-NLS-1$
+	protected final static String TAG_CONTENT_TYPE = "contentType"; //$NON-NLS-1$
+
+	protected final static String TAG_NAME = "adapterFactoryDescription"; //$NON-NLS-1$
+
+	public final static String UNKNOWN_CONTENT_TYPE = "unknown"; //$NON-NLS-1$
+
+	/**
+	 * adds configuration element to contentTypeId map [contentTypeId ->
+	 * element2providerMap] | V [element -> provider]
+	 * 
+	 * NOTE: this doesn't create the provider yet, that must be done on demand
+	 * and stored in the appropriate element2provider
+	 * 
+	 * @param map
+	 * @param contentTypeId
+	 * @param element
+	 */
+	private static void addElementForContentType(HashMap map, String contentTypeId, IConfigurationElement element) {
+
+		Object o = map.get(contentTypeId);
+		if (o == null) {
+			HashMap element2provider = new HashMap();
+			// don't create the executable extension yet
+			element2provider.put(element, null);
+			map.put(contentTypeId, element2provider);
+
+			if (DEBUG)
+				System.out.println("added " + element.getAttribute(ATT_CLASS) + ", but didn't create exec extension"); //$NON-NLS-1$ //$NON-NLS-2$
+		} else {
+			// add element to unknown list (not executable ext yet...)
+			HashMap element2provider = (HashMap) o;
+			element2provider.put(element, null);
+
+			if (DEBUG)
+				System.out.println("added " + element.getAttribute(ATT_CLASS) + " to unknown list, but didn't create exec extension"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+
+	/**
+	 * the map passed in: [contentTypeId -> element2providerMap] | V [element ->
+	 * provider]
+	 * 
+	 * @param element
+	 * @param map
+	 * @return
+	 */
+	protected static AdapterFactoryProvider readElement(IConfigurationElement element, HashMap map) {
+
+		AdapterFactoryProvider adapterFactoryProvider = null;
+		if (element.getName().equals(TAG_NAME)) {
+			try {
+				IConfigurationElement[] children = element.getChildren();
+				boolean specifiedContentType = false;
+				if (children != null && children.length > 0) {
+					// content types are specified
+					for (int i = 0; i < children.length; i++) {
+						if (children[i].getName().equals(TAG_CONTENT_TYPE)) {
+							// it's possible to have non-contentType childrent
+							specifiedContentType = true;
+							String contentType = children[i].getAttribute(ATT_ID);
+							addElementForContentType(map, contentType, element);
+						}
+					}
+				}
+				if (!specifiedContentType) {
+					// no content type association
+					addElementForContentType(map, UNKNOWN_CONTENT_TYPE, element);
+				}
+			} catch (Exception e) {
+				// if the provider throws any exception, just log and continue
+				Logger.logException(e);
+			}
+		}
+		return adapterFactoryProvider;
+	}
+
+	/**
+	 * We simply require an 'add' method, of what ever it is we are to read
+	 * into
+	 */
+	static void readRegistry(HashMap map) {
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IExtensionPoint point = registry.getExtensionPoint(PLUGIN_ID, EXTENSION_POINT_ID);
+		if (point != null) {
+			IConfigurationElement[] elements = point.getConfigurationElements();
+			for (int i = 0; i < elements.length; i++) {
+				readElement(elements[i], map);
+			}
+		}
+	}
+
+	protected IConfigurationElement configElement = null;
+
+	//    protected final static String ADAPTER_CLASS = "adapterClass";
+	// //$NON-NLS-1$
+	//    protected final static String DOC_TYPE_ID = "docTypeId"; //$NON-NLS-1$
+	//    protected final static String MIME_TYPE_LIST = "mimeTypeList";
+	// //$NON-NLS-1$
+	//
+	/**
+	 * ContentTypeRegistryReader constructor comment.
+	 */
+	AdapterFactoryRegistryReader() {
+		super();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/AbstractLineStyleProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/AbstractLineStyleProvider.java
new file mode 100644
index 0000000..2b80125
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/AbstractLineStyleProvider.java
@@ -0,0 +1,405 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.style;
+
+import java.util.Collection;
+import java.util.HashMap;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.sse.core.internal.util.Debug;
+import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
+import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
+
+
+public abstract class AbstractLineStyleProvider {
+	private class PropertyChangeListener implements IPropertyChangeListener {
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+		 */
+		public void propertyChange(PropertyChangeEvent event) {
+			// have to do it this way so others can override the method
+			handlePropertyChange(event);
+		}
+	}
+
+	protected IStructuredDocument fDocument;
+	protected Highlighter fHighlighter;
+	private boolean fInitialized;
+	protected PropertyChangeListener fPreferenceListener = new PropertyChangeListener();
+
+	//private ISourceViewer fSourceViewer = null;
+	protected ReconcilerHighlighter fRecHighlighter = null;
+	
+	/** Contains all text attributes pertaining to this line style provider */
+	private HashMap fTextAttributes = null;
+
+	// we keep track of LogMessage to avoid writing hundreds of messages,
+	// but still give a hint that something is wrong with attributeProviders
+	// and/or regions.
+	// It's only written in the case of a program error, but there's no use
+	// adding
+	// salt to the wound.
+	// private boolean wroteOneLogMessage;
+	/**
+	 */
+	protected AbstractLineStyleProvider() {
+	}
+
+	/**
+	 * Looks up the colorKey in the preference store and adds the style
+	 * information to list of TextAttributes
+	 * 
+	 * @param colorKey
+	 */
+	protected void addTextAttribute(String colorKey) {
+		if (getColorPreferences() != null) {
+			String prefString = getColorPreferences().getString(colorKey);
+			String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
+			if (stylePrefs != null) {
+				RGB foreground = ColorHelper.toRGB(stylePrefs[0]);
+				RGB background = ColorHelper.toRGB(stylePrefs[1]);
+				boolean bold = Boolean.valueOf(stylePrefs[2]).booleanValue();
+				boolean italic = Boolean.valueOf(stylePrefs[3]).booleanValue();
+				boolean strikethrough = Boolean.valueOf(stylePrefs[4]).booleanValue();
+				boolean underline = Boolean.valueOf(stylePrefs[5]).booleanValue();
+				int style = SWT.NORMAL;
+				if (bold) {
+					style = style | SWT.BOLD;
+				}
+				if (italic) {
+					style = style | SWT.ITALIC;
+				}
+				if (strikethrough) {
+					style = style | TextAttribute.STRIKETHROUGH;
+				}
+				if (underline) {
+					style = style | TextAttribute.UNDERLINE;
+				}
+
+				TextAttribute createTextAttribute = createTextAttribute(foreground, background, style);
+				getTextAttributes().put(colorKey, createTextAttribute);
+			}
+		}
+	}
+
+	protected void commonInit(IStructuredDocument document, Highlighter highlighter) {
+
+		fDocument = document;
+		fHighlighter = highlighter;
+	}
+
+	/**
+	 * this version does "trim" regions to match request
+	 */
+	private StyleRange createStyleRange(ITextRegionCollection flatNode, ITextRegion region, TextAttribute attr, int startOffset, int length) {
+		int start = flatNode.getStartOffset(region);
+		if (start < startOffset)
+			start = startOffset;
+		
+		// Base the text end offset off of the, possibly adjusted, start
+		int textEnd = start + region.getTextLength();
+		int maxOffset = startOffset + length;
+		
+		int end = flatNode.getEndOffset(region);
+		// Use the end of the text in the region to avoid applying background color to trailing whitespace
+		if(textEnd < end)
+			end = textEnd;
+		// instead of end-start?
+		if (end > maxOffset)
+			end = maxOffset;
+		StyleRange result = new StyleRange(start, end - start, attr.getForeground(), attr.getBackground(), attr.getStyle());
+		if((attr.getStyle() & TextAttribute.STRIKETHROUGH) != 0) {
+			result.strikeout = true;
+		}
+		if((attr.getStyle() & TextAttribute.UNDERLINE) != 0) {
+			result.underline = true;
+		}
+		return result;
+
+	}
+
+	protected TextAttribute createTextAttribute(RGB foreground, RGB background, boolean bold) {
+		return new TextAttribute((foreground != null) ? EditorUtility.getColor(foreground) : null, (background != null) ? EditorUtility.getColor(background) : null, bold ? SWT.BOLD : SWT.NORMAL);
+	}
+
+	protected TextAttribute createTextAttribute(RGB foreground, RGB background, int style) {
+		return new TextAttribute((foreground != null) ? EditorUtility.getColor(foreground) : null, (background != null) ? EditorUtility.getColor(background) : null, style);
+	}
+
+	abstract protected TextAttribute getAttributeFor(ITextRegion region);
+	
+	protected TextAttribute getAttributeFor(ITextRegionCollection collection, ITextRegion region) {
+		return getAttributeFor(region);
+	}
+
+	abstract protected IPreferenceStore getColorPreferences();
+
+	protected IStructuredDocument getDocument() {
+		return fDocument;
+	}
+	
+	public void setDocument(IStructuredDocument document) {
+		fDocument = document;
+	}
+
+	/**
+	 */
+	protected Highlighter getHighlighter() {
+		return fHighlighter;
+	}
+
+	/**
+	 * Returns the hashtable containing all the text attributes for this line
+	 * style provider. Lazily creates a hashtable if one has not already been
+	 * created.
+	 * 
+	 * @return
+	 */
+	protected HashMap getTextAttributes() {
+		if (fTextAttributes == null) {
+			fTextAttributes = new HashMap();
+			loadColors();
+		}
+		return fTextAttributes;
+	}
+
+	protected void handlePropertyChange(PropertyChangeEvent event) {
+		// force a full update of the text viewer
+		if(fRecHighlighter != null)
+			fRecHighlighter.refreshDisplay();
+	}
+
+	public void init(IStructuredDocument structuredDocument, Highlighter highlighter) {
+
+		commonInit(structuredDocument, highlighter);
+
+		if (isInitialized())
+			return;
+
+		registerPreferenceManager();
+
+		setInitialized(true);
+	}
+	
+	public void init(IStructuredDocument structuredDocument, ISourceViewer sourceViewer) {
+		init(structuredDocument, (Highlighter) null);
+	}
+	
+	public void init(IStructuredDocument structuredDocument, ReconcilerHighlighter highlighter)	{
+		fDocument = structuredDocument;
+		fRecHighlighter = highlighter;
+		
+		if(isInitialized())
+			return;
+		
+		registerPreferenceManager();
+		
+		setInitialized(true);
+	}
+
+	/**
+	 * @deprecated - left because it's public, but we aren't adapters any more
+	 */
+	public boolean isAdapterForType(java.lang.Object type) {
+		return type == LineStyleProvider.class;
+	}
+
+	/**
+	 * Returns the initialized.
+	 * 
+	 * @return boolean
+	 */
+	public boolean isInitialized() {
+		return fInitialized;
+	}
+	
+	abstract protected void loadColors();
+
+	public boolean prepareRegions(ITypedRegion typedRegion, int lineRequestStart, int lineRequestLength, Collection holdResults) {
+		final int partitionStartOffset = typedRegion.getOffset();
+		final int partitionLength = typedRegion.getLength();
+		IStructuredDocumentRegion structuredDocumentRegion = getDocument().getRegionAtCharacterOffset(partitionStartOffset);
+		boolean handled = false;
+
+		handled = prepareTextRegions(structuredDocumentRegion, partitionStartOffset, partitionLength, holdResults);
+
+		return handled;
+	}
+
+	/**
+	 * @param region
+	 * @param start
+	 * @param length
+	 * @param holdResults
+	 * @return
+	 */
+	private boolean prepareTextRegion(ITextRegionCollection blockedRegion, int partitionStartOffset, int partitionLength, Collection holdResults) {
+		boolean handled = false;
+		final int partitionEndOffset = partitionStartOffset + partitionLength - 1;
+		ITextRegion region = null;
+		ITextRegionList regions = blockedRegion.getRegions();
+		int nRegions = regions.size();
+		StyleRange styleRange = null;
+		for (int i = 0; i < nRegions; i++) {
+			region = regions.get(i);
+			TextAttribute attr = null;
+			TextAttribute previousAttr = null;
+			if (blockedRegion.getStartOffset(region) > partitionEndOffset)
+				break;
+			if (blockedRegion.getEndOffset(region) <= partitionStartOffset)
+				continue;
+
+			if (region instanceof ITextRegionCollection) {
+				handled = prepareTextRegion((ITextRegionCollection) region, partitionStartOffset, partitionLength, holdResults);
+			} else {
+
+				attr = getAttributeFor(blockedRegion, region);
+				if (attr != null) {
+					handled = true;
+					// if this region's attr is the same as previous one, then
+					// just adjust the previous style range
+					// instead of creating a new instance of one
+					// note: to use 'equals' in this case is important, since
+					// sometimes
+					// different instances of attributes are associated with a
+					// region, even the
+					// the attribute has the same values.
+					// TODO: this needs to be improved to handle readonly
+					// regions correctly
+					if ((styleRange != null) && (previousAttr != null) && (previousAttr.equals(attr))) {
+						styleRange.length += region.getLength();
+					} else {
+						styleRange = createStyleRange(blockedRegion, region, attr, partitionStartOffset, partitionLength);
+						holdResults.add(styleRange);
+						// technically speaking, we don't need to update
+						// previousAttr
+						// in the other case, because the other case is when
+						// it hasn't changed
+						previousAttr = attr;
+					}
+				} else {
+					previousAttr = null;
+				}
+			}
+		}
+		return handled;
+	}
+
+	private boolean prepareTextRegions(IStructuredDocumentRegion structuredDocumentRegion, int partitionStartOffset, int partitionLength, Collection holdResults) {
+		boolean handled = false;
+		final int partitionEndOffset = partitionStartOffset + partitionLength - 1;
+		while (structuredDocumentRegion != null && structuredDocumentRegion.getStartOffset() <= partitionEndOffset) {
+			ITextRegion region = null;
+			ITextRegionList regions = structuredDocumentRegion.getRegions();
+			int nRegions = regions.size();
+			StyleRange styleRange = null;
+			for (int i = 0; i < nRegions; i++) {
+				region = regions.get(i);
+				TextAttribute attr = null;
+				TextAttribute previousAttr = null;
+				if (structuredDocumentRegion.getStartOffset(region) > partitionEndOffset)
+					break;
+				if (structuredDocumentRegion.getEndOffset(region) <= partitionStartOffset)
+					continue;
+
+				if (region instanceof ITextRegionCollection) {
+					boolean handledCollection = (prepareTextRegion((ITextRegionCollection) region, partitionStartOffset, partitionLength, holdResults));
+					handled = (!handled) ? handledCollection : handled;
+				} else {
+
+					attr = getAttributeFor(structuredDocumentRegion, region);
+					if (attr != null) {
+						handled = true;
+						// if this region's attr is the same as previous one,
+						// then just adjust the previous style range
+						// instead of creating a new instance of one
+						// note: to use 'equals' in this case is important,
+						// since sometimes
+						// different instances of attributes are associated
+						// with a region, even the
+						// the attribute has the same values.
+						// TODO: this needs to be improved to handle readonly
+						// regions correctly
+						if ((styleRange != null) && (previousAttr != null) && (previousAttr.equals(attr))) {
+							styleRange.length += region.getLength();
+						} else {
+							styleRange = createStyleRange(structuredDocumentRegion, region, attr, partitionStartOffset, partitionLength);
+							holdResults.add(styleRange);
+							// technically speaking, we don't need to update
+							// previousAttr
+							// in the other case, because the other case is
+							// when it hasn't changed
+							previousAttr = attr;
+						}
+					} else {
+						previousAttr = null;
+					}
+				}
+
+				if (Debug.syntaxHighlighting && !handled) {
+					System.out.println("not handled in prepareRegions"); //$NON-NLS-1$
+				}
+			}
+			structuredDocumentRegion = structuredDocumentRegion.getNext();
+		}
+		return handled;
+	}
+
+	protected void registerPreferenceManager() {
+		IPreferenceStore pref = getColorPreferences();
+		if (pref != null) {
+			pref.addPropertyChangeListener(fPreferenceListener);
+		}
+	}
+
+	public void release() {
+		unRegisterPreferenceManager();
+		if (fTextAttributes != null) {
+			fTextAttributes.clear();
+			fTextAttributes = null;
+		}
+		setInitialized(false);
+	}
+
+	/**
+	 * Sets the initialized.
+	 * 
+	 * @param initialized
+	 *            The initialized to set
+	 */
+	private void setInitialized(boolean initialized) {
+		this.fInitialized = initialized;
+	}
+
+	protected void unRegisterPreferenceManager() {
+		IPreferenceStore pref = getColorPreferences();
+		if (pref != null) {
+			pref.removePropertyChangeListener(fPreferenceListener);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/CompatibleHighlighter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/CompatibleHighlighter.java
new file mode 100644
index 0000000..a54398b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/CompatibleHighlighter.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.style;
+
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.swt.custom.LineStyleEvent;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+
+/**
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=224209
+ * 
+ * Created to provide compatibility with refreshDisplay() and getTextViewer()
+ * methods on the superclass that might be called by LineStyleProviders.
+ */
+public final class CompatibleHighlighter extends Highlighter {
+
+	private ITextViewer textViewer;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#addProvider(java.lang.String,
+	 *      org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider)
+	 */
+	public void addProvider(String partitionType, LineStyleProvider provider) {
+		super.addProvider(partitionType, provider);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#getTextViewer()
+	 */
+	public ITextViewer getTextViewer() {
+		return super.getTextViewer();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#install(org.eclipse.jface.text.ITextViewer)
+	 */
+	public void install(ITextViewer newTextViewer) {
+		textViewer = newTextViewer;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#lineGetStyle(int,
+	 *      int)
+	 */
+	public StyleRange[] lineGetStyle(int eventLineOffset, int eventLineLength) {
+		return new StyleRange[0];
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#lineGetStyle(org.eclipse.swt.custom.LineStyleEvent)
+	 */
+	public void lineGetStyle(LineStyleEvent event) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#refreshDisplay()
+	 */
+	public void refreshDisplay() {
+		if (textViewer != null)
+			textViewer.invalidateTextPresentation();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#refreshDisplay(int,
+	 *      int)
+	 */
+	public void refreshDisplay(int start, int length) {
+		refreshDisplay();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#removeProvider(java.lang.String)
+	 */
+	public void removeProvider(String partitionType) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#setDocument(org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument)
+	 */
+	public void setDocument(IStructuredDocument structuredDocument) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#setDocumentPartitioning(java.lang.String)
+	 */
+	public void setDocumentPartitioning(String partitioning) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter#uninstall()
+	 */
+	public void uninstall() {
+		super.uninstall();
+		textViewer = null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/Highlighter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/Highlighter.java
new file mode 100644
index 0000000..b47107d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/Highlighter.java
@@ -0,0 +1,904 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.style;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.IDocumentExtension3;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension5;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.custom.LineStyleEvent;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.util.Debug;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
+
+/**
+ * This class is to directly mediate between the Structured Document data
+ * structure and the text widget's text and events. It assumes there only the
+ * model is interested in text events, and all other views will work from that
+ * model. Changes to the text widgets input can cause changes in the model,
+ * which in turn cause changes to the widget's display.
+ * 
+ */
+public class Highlighter implements IHighlighter {
+
+	/**
+	 * A utility class to do various color manipulations
+	 */
+	private class YUV_RGBConverter {
+		/**
+		 * This class "holds" the YUV values corresponding to RGB color
+		 */
+		private class YUV {
+
+			class NormalizedRGB {
+				double blue;
+				double green;
+				private final double maxRGB = 256.0;
+				double red;
+
+				public NormalizedRGB(RGB rgb) {
+					// first normalize to between 0 - 1
+					red = rgb.red / maxRGB;
+					green = rgb.green / maxRGB;
+					blue = rgb.blue / maxRGB;
+
+					red = gammaNormalized(red);
+					green = gammaNormalized(green);
+					blue = gammaNormalized(blue);
+
+				}
+			}
+
+			private NormalizedRGB normalizedRGB;
+
+			private double u = -1;
+			private double v = -1;
+			private double y = -1;
+
+			private YUV() {
+				super();
+			}
+
+			public YUV(double y, double u, double v) {
+				this();
+				this.y = y;
+				this.u = u;
+				this.v = v;
+			}
+
+			public YUV(RGB rgb) {
+				this();
+				normalizedRGB = new NormalizedRGB(rgb);
+				// force calculations
+				getY();
+				getV();
+				getU();
+			}
+
+			/**
+			 * normalize to "average" gamma 2.2222 or 1/0.45
+			 */
+			double gammaNormalized(double colorComponent) {
+				if (colorComponent < 0.018) {
+					return colorComponent * 0.45;
+				}
+				else {
+					return 1.099 * Math.pow(colorComponent, 0.45) - 0.099;
+				}
+			}
+
+			/**
+			 * @return RGB based on original RGB and current YUV values;
+			 */
+			public RGB getRGB() {
+				RGB result = null;
+				double r = getY() + 1.14 * getV();
+				double g = getY() - 0.395 * getU() - 0.58 * getV();
+				double b = getY() + 2.032 * getU();
+
+				int red = (int) (inverseGammaNormalized(r) * 256);
+				int green = (int) (inverseGammaNormalized(g) * 256);
+				int blue = (int) (inverseGammaNormalized(b) * 256);
+				if (red < 0)
+					red = 0;
+				else if (red > 255)
+					red = 255;
+				if (green < 0)
+					green = 0;
+				else if (green > 255)
+					green = 255;
+				if (blue < 0)
+					blue = 0;
+				else if (blue > 255)
+					blue = 255;
+
+				result = new RGB(red, green, blue);
+				return result;
+			}
+
+			public double getU() {
+				if (u == -1) {
+					u = 0.4949 * (normalizedRGB.blue - getY());
+				}
+				return u;
+
+			}
+
+			public double getV() {
+				if (v == -1) {
+					v = 0.877 * (normalizedRGB.red - getY());
+				}
+				return v;
+			}
+
+			public double getY() {
+				if (y == -1) {
+					y = 0.299 * normalizedRGB.red + 0.587 * normalizedRGB.green + 0.114 * normalizedRGB.blue;
+				}
+				return y;
+			}
+
+			double inverseGammaNormalized(double colorComponent) {
+				if (colorComponent < 0.018) {
+					return colorComponent * .222;
+				}
+				else {
+					return Math.pow(((.9099 * colorComponent + 0.09)), 2.22);
+				}
+			}
+
+		}
+
+		public YUV_RGBConverter() {
+			super();
+		}
+
+		public double calculateYComponent(Color targetColor) {
+			return new YUV(targetColor.getRGB()).getY();
+		}
+
+		public RGB transformRGB(RGB originalRGB, double scaleFactor, double target) {
+			RGB transformedRGB = null;
+			// CCIR601 yuv = new CCIR601(originalRGB);
+			YUV yuv = new YUV(originalRGB);
+			double y = yuv.getY();
+			// zero is black, one is white
+			if (y < target) {
+				// is "dark" make lighter
+				y = y + ((target - y) * scaleFactor);
+			}
+			else {
+				// is "light" make darker
+				y = y - ((y - target) * scaleFactor);
+			}
+			// yuv.setY(y);
+			YUV newYUV = new YUV(y, yuv.getU(), yuv.getV());
+			// CCIR601 newYUV = new CCIR601(y, yuv.getCb601(),
+			// yuv.getCr601());
+			transformedRGB = newYUV.getRGB();
+			return transformedRGB;
+		}
+
+		public RGB transformRGBToGrey(RGB originalRGB, double scaleFactor, double target) {
+			RGB transformedRGB = null;
+			// we left the "full" API method signature, but this
+			// version does not take into account originalRGB, though
+			// it might someday.
+			// for now, we'll simply make the new RGB grey, either a little
+			// lighter, or a little darker than background.
+			double y = 0;
+			double mid = 0.5;
+			// zero is black, one is white
+			if (target < mid) {
+				// is "dark" make lighter
+				y = target + scaleFactor;
+			}
+			else {
+				// is "light" make darker
+				y = target - scaleFactor;
+			}
+			int c = (int) Math.round(y * 255);
+			// just to gaurd against mis-use, or scale's values greater
+			// than mid point (and possibly rounding error)
+			if (c > 255)
+				c = 255;
+			if (c < 0)
+				c = 0;
+			transformedRGB = new RGB(c, c, c);
+			return transformedRGB;
+		}
+	}
+
+	private final boolean DEBUG = false;
+	private final StyleRange[] EMPTY_STYLE_RANGE = new StyleRange[0];
+	static final String LINE_STYLE_PROVIDER_EXTENDED_ID = "linestyleprovider"; //$NON-NLS-1$
+	private static final int MAX_NUMBER_STYLES = 500;
+	private static final int LEFT_STYLES_SIZE = 200;
+	private static final int RIGHT_STYLES_SIZE = 200;
+	private static final int MIDDLE_STYLES_SIZE = 1;
+
+	private IPropertyChangeListener fForegroundScaleListener = new IPropertyChangeListener() {
+		public void propertyChange(PropertyChangeEvent event) {
+			if (EditorPreferenceNames.READ_ONLY_FOREGROUND_SCALE.equals(event.getProperty())) {
+				IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore();
+				readOnlyForegroundScaleFactor = editorStore.getInt(EditorPreferenceNames.READ_ONLY_FOREGROUND_SCALE);
+				disposeColorTable();
+				refreshDisplay();
+			}
+		}
+	};
+	private List fHoldStyleResults;
+	private String fPartitioning = IDocumentExtension3.DEFAULT_PARTITIONING;
+
+	private int fSavedLength = -1;
+	private int fSavedOffset = -1;
+	private StyleRange[] fSavedRanges = null;
+
+	private IStructuredDocument fStructuredDocument;
+	private Map fTableOfProviders;
+
+	private Map fExtendedProviders;
+
+	protected final LineStyleProvider NOOP_PROVIDER = new LineStyleProviderForNoOp();
+
+	private double readOnlyBackgroundScaleFactor = 10;
+	private Hashtable readOnlyColorTable;
+	double readOnlyForegroundScaleFactor = 30;
+
+	private YUV_RGBConverter rgbConverter;
+	private ITextViewer textViewer;
+	private StyledText textWidget;
+
+	public Highlighter() {
+		super();
+		
+		// in the 'limitSize' method, we make this strong assumption, so, will check here, 
+		// so if tweaked in future, we'll get a quick reminder. 
+		if (LEFT_STYLES_SIZE + MIDDLE_STYLES_SIZE + RIGHT_STYLES_SIZE > MAX_NUMBER_STYLES) {
+			throw new IllegalStateException("Highligher constants are not defined correctly"); //$NON-NLS-1$
+		}
+	}
+
+	protected void addEmptyRange(int start, int length, Collection holdResults) {
+		StyleRange result = new StyleRange();
+		result.start = start;
+		result.length = length;
+		holdResults.add(result);
+	}
+
+	/**
+	 * Registers a given line style provider for a particular partition type.
+	 * If there is already a line style provider registered for this type, the
+	 * new line style provider is registered instead of the old one.
+	 * 
+	 * @param partitionType
+	 *            the partition type under which to register
+	 * @param the
+	 *            line style provider to register, or <code>null</code> to
+	 *            remove an existing one
+	 */
+	public void addProvider(String partitionType, LineStyleProvider provider) {
+		getTableOfProviders().put(partitionType, provider);
+	}
+
+	/**
+	 * Adjust the style ranges' start and length so that they refer to the
+	 * textviewer widget's range instead of the textviewer's document range.
+	 * 
+	 * @param ranges
+	 * @param adjustment
+	 */
+	protected void adjust(StyleRange[] ranges, int adjustment) {
+		ITextViewer viewer = getTextViewer();
+
+		if (adjustment != 0) {
+			// just use the adjustment value
+			// convert document regions back to widget regions
+			for (int i = 0; i < ranges.length; i++) {
+				// just adjust the range using the given adjustment
+				ranges[i].start += adjustment;
+			}
+		}
+		else if (viewer instanceof ITextViewerExtension5) {
+			// use ITextViewerExtension5
+			ITextViewerExtension5 extension = (ITextViewerExtension5) viewer;
+
+			// convert document regions back to widget regions
+			for (int i = 0; i < ranges.length; i++) {
+				// get document range, taking into account folding
+				// regions in viewer
+				IRegion region = extension.modelRange2WidgetRange(new Region(ranges[i].start, ranges[i].length));
+				if (region != null) {
+					ranges[i].start = region.getOffset();
+					ranges[i].length = region.getLength();
+				} // else what happens if region is not found?!
+			}
+		}
+	}
+
+
+	/**
+	 * @deprecated - Read Only areas have unchanged background colors
+	 */
+	void adjustBackground(StyleRange styleRange) {
+		RGB oldRGB = null;
+		Color oldColor = styleRange.background;
+		if (oldColor == null) {
+			oldColor = getTextWidget().getBackground();
+		}
+		oldRGB = oldColor.getRGB();
+		Color newColor = getCachedColorFor(oldRGB);
+		if (newColor == null) {
+			double target = getRGBConverter().calculateYComponent(oldColor);
+			// if background is "light" make it darker, and vice versa
+			if (target < 0.5)
+				target = 1.0;
+			else
+				target = 0.0;
+			RGB newRGB = getRGBConverter().transformRGB(oldRGB, readOnlyBackgroundScaleFactor / 100.0, target);
+
+			cacheColor(oldRGB, newRGB);
+			newColor = getCachedColorFor(oldRGB);
+		}
+		styleRange.background = newColor;
+	}
+
+	private void adjustForeground(StyleRange styleRange) {
+		RGB oldRGB = null;
+		// Color oldColor = styleRange.foreground;
+		Color oldColor = styleRange.background;
+		if (oldColor == null) {
+			// oldRGB = getTextWidget().getForeground().getRGB();
+			oldColor = getTextWidget().getBackground();
+			oldRGB = oldColor.getRGB();
+		}
+		else {
+			oldRGB = oldColor.getRGB();
+		}
+		Color newColor = getCachedColorFor(oldRGB);
+		if (newColor == null) {
+			// make text "closer to" background lumanence
+			double target = getRGBConverter().calculateYComponent(oldColor);
+			RGB newRGB = getRGBConverter().transformRGBToGrey(oldRGB, readOnlyForegroundScaleFactor / 100.0, target);
+
+			// save conversion, so calculations only need to be done once
+			cacheColor(oldRGB, newRGB);
+			newColor = getCachedColorFor(oldRGB);
+		}
+		styleRange.foreground = newColor;
+	}
+
+	/**
+	 * Cache read-only color.
+	 * 
+	 * @param oldRGB
+	 * @param newColor
+	 */
+	private void cacheColor(RGB oldRGB, RGB newColor) {
+		if (readOnlyColorTable == null) {
+			readOnlyColorTable = new Hashtable();
+		}
+		readOnlyColorTable.put(oldRGB, newColor);
+	}
+
+	/**
+	 * @param result
+	 * @return
+	 */
+	private StyleRange[] convertReadOnlyRegions(StyleRange[] result, int start, int length) {
+		IStructuredDocument structuredDocument = getDocument();
+
+		/**
+		 * (dmw) For client/provider simplicity (and consistent look and feel)
+		 * we'll handle readonly regions in one spot, here in the Highlighter.
+		 * Currently it is a fair assumption that each readonly region will be
+		 * on an ITextRegion boundary, so we combine consecutive styles when
+		 * found to be equivalent. Plus, for now, we'll just adjust
+		 * foreground. Eventually will use a "dimming" algrorithm to adjust
+		 * color's satuation/brightness.
+		 */
+		if (structuredDocument.containsReadOnly(start, length)) {
+			// something is read-only in the line, so go through each style,
+			// and adjust
+			for (int i = 0; i < result.length; i++) {
+				StyleRange styleRange = result[i];
+				if (structuredDocument.containsReadOnly(styleRange.start, styleRange.length)) {
+					adjustForeground(styleRange);
+				}
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Clear out the readOnlyColorTable
+	 */
+	void disposeColorTable() {
+		if (readOnlyColorTable != null) {
+			readOnlyColorTable.clear();
+		}
+		readOnlyColorTable = null;
+	}
+
+	/**
+	 * This method is just to get existing read-only colors.
+	 */
+	private Color getCachedColorFor(RGB oldRGB) {
+		Color result = null;
+
+		if (readOnlyColorTable != null) {
+			RGB readOnlyRGB = (RGB) readOnlyColorTable.get(oldRGB);
+			result = EditorUtility.getColor(readOnlyRGB);
+		}
+
+		return result;
+	}
+
+	protected IStructuredDocument getDocument() {
+		return fStructuredDocument;
+	}
+
+	/**
+	 * Adjust the given widget offset and length so that they are the
+	 * textviewer document's offset and length, taking into account what is
+	 * actually visible in the document.
+	 * 
+	 * @param offset
+	 * @param length
+	 * @return a region containing the offset and length within the
+	 *         textviewer's document or null if the offset is not within the
+	 *         document
+	 */
+	private IRegion getDocumentRangeFromWidgetRange(int offset, int length) {
+		IRegion styleRegion = null;
+		ITextViewer viewer = getTextViewer();
+		if (viewer instanceof ITextViewerExtension5) {
+			// get document range, taking into account folding regions in
+			// viewer
+			ITextViewerExtension5 extension = (ITextViewerExtension5) viewer;
+			styleRegion = extension.widgetRange2ModelRange(new Region(offset, length));
+		}
+		else {
+			// get document range, taking into account viewer visible region
+			// get visible region in viewer
+			IRegion vr = null;
+			if (viewer != null)
+				vr = viewer.getVisibleRegion();
+			else
+				vr = new Region(0, getDocument().getLength());
+
+			// if offset is not within visible region, then we don't really
+			// care
+			if (offset <= vr.getLength()) {
+				// Adjust the offset to be within visible region
+				styleRegion = new Region(offset + vr.getOffset(), length);
+			}
+		}
+		return styleRegion;
+	}
+
+
+	private Map getExtendedProviders() {
+		if (fExtendedProviders == null) {
+			fExtendedProviders = new HashMap(3);
+		}
+		return fExtendedProviders;
+	}
+
+	/**
+	 * Method getProviderFor.
+	 * 
+	 * @param typedRegion
+	 * @return LineStyleProvider
+	 */
+	private LineStyleProvider getProviderFor(ITypedRegion typedRegion) {
+		String type = typedRegion.getType();
+		LineStyleProvider result = (LineStyleProvider) fTableOfProviders.get(type);
+		if (result == null) {
+			// NOT YET FINALIZED - DO NOT CONSIDER AS API
+			synchronized (getExtendedProviders()) {
+				if (!getExtendedProviders().containsKey(type)) {
+					LineStyleProvider provider = (LineStyleProvider) ExtendedConfigurationBuilder.getInstance().getConfiguration(LINE_STYLE_PROVIDER_EXTENDED_ID, type);
+					getExtendedProviders().put(type, provider);
+					if (provider != null) {
+						provider.init(getDocument(), this);
+					}
+					result = provider;
+				}
+				else {
+					result = (LineStyleProvider) getExtendedProviders().get(type);
+				}
+			}
+		}
+		if (result == null) {
+			result = NOOP_PROVIDER;
+		}
+		return result;
+	}
+
+	private YUV_RGBConverter getRGBConverter() {
+		if (rgbConverter == null) {
+			rgbConverter = new YUV_RGBConverter();
+		}
+		return rgbConverter;
+	}
+
+	private Map getTableOfProviders() {
+		if (fTableOfProviders == null) {
+			fTableOfProviders = new HashMap();
+		}
+		return fTableOfProviders;
+	}
+
+	/**
+	 * Returns the textViewer.
+	 * 
+	 * @return ITextViewer
+	 */
+	public ITextViewer getTextViewer() {
+		return textViewer;
+	}
+
+	/**
+	 * @return
+	 */
+	protected StyledText getTextWidget() {
+		return textWidget;
+	}
+
+	/**
+	 * Installs highlighter support on the given text viewer.
+	 * 
+	 * @param textViewer
+	 *            the text viewer on which content assist will work
+	 */
+	public void install(ITextViewer newTextViewer) {
+		this.textViewer = newTextViewer;
+
+		IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore();
+		editorStore.addPropertyChangeListener(fForegroundScaleListener);
+		readOnlyForegroundScaleFactor = editorStore.getInt(EditorPreferenceNames.READ_ONLY_FOREGROUND_SCALE);
+
+		if (textWidget != null) {
+			textWidget.removeLineStyleListener(this);
+		}
+		textWidget = newTextViewer.getTextWidget();
+		if (textWidget != null) {
+			textWidget.addLineStyleListener(this);
+		}
+
+		refreshDisplay();
+	}
+
+	public StyleRange[] lineGetStyle(int eventLineOffset, int eventLineLength) {
+		StyleRange[] eventStyles = EMPTY_STYLE_RANGE;
+		try {
+			if (getDocument() == null || eventLineLength == 0) {
+				// getDocument() == null
+				// during initialization, this is sometimes called before our
+				// structured
+				// is set, in which case we set styles to be the empty style
+				// range
+				// (event.styles can not be null)
+
+				// eventLineLength == 0
+				// we sometimes get odd requests from the very last CRLF in
+				// the
+				// document
+				// it has no length, and there is no node for it!
+				eventStyles = EMPTY_STYLE_RANGE;
+			}
+			else {
+				/*
+				 * LineStyleProviders work using absolute document offsets. To
+				 * support visible regions, adjust the requested range up to
+				 * the full document offsets.
+				 */
+				IRegion styleRegion = getDocumentRangeFromWidgetRange(eventLineOffset, eventLineLength);
+				if (styleRegion != null) {
+					int start = styleRegion.getOffset();
+					int length = styleRegion.getLength();
+
+					ITypedRegion[] partitions = TextUtilities.computePartitioning(getDocument(), fPartitioning, start, length, false);
+					eventStyles = prepareStyleRangesArray(partitions, start, length);
+
+					/*
+					 * If there is a subtext offset, the style ranges must be
+					 * adjusted to the expected offsets just check if
+					 * eventLineOffset is different than start then adjust,
+					 * otherwise u can leave it alone unless there is special
+					 * handling for itextviewerextension5?
+					 */
+					if (start != eventLineOffset) {
+						int offset = 0;
+						// figure out visible region to use for adjustment
+						// only adjust if need to
+						if (!(getTextViewer() instanceof ITextViewerExtension5)) {
+							IRegion vr = getTextViewer().getVisibleRegion();
+							if (vr != null) {
+								offset = vr.getOffset();
+							}
+						}
+						adjust(eventStyles, -offset);
+					}
+
+					eventStyles = limitSize(eventStyles);
+					
+					// for debugging only
+					if (DEBUG) {
+						if (!valid(eventStyles, eventLineOffset, eventLineLength)) {
+							Logger.log(Logger.WARNING, "Highlighter::lineGetStyle found invalid styles at offset " + eventLineOffset); //$NON-NLS-1$
+						}
+					}
+				}
+
+			}
+
+		}
+		catch (Exception e) {
+			// if ANY exception occurs during highlighting,
+			// just return "no highlighting"
+			eventStyles = EMPTY_STYLE_RANGE;
+			if (Debug.syntaxHighlighting) {
+				System.out.println("Exception during highlighting!"); //$NON-NLS-1$
+			}
+		}
+
+		return eventStyles;
+	}
+
+	/**
+	 * This method is to centralize the logic in limiting the overall number of style ranges
+	 * that make it to the styled text widget. 
+	 * 
+	 * Too many styles sent to StyledText results in apparent, but not real, 
+	 * hangs of Eclipse Display thread. See  
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=108806
+	 * 
+	 * @param eventStyles
+	 * @return
+	 */
+	 private StyleRange[] limitSize(StyleRange[] eventStyles) {
+		
+		// quick return with same object if not modification needed
+		if (eventStyles.length < MAX_NUMBER_STYLES) {
+			return eventStyles;
+		}
+		else {
+			// we could just take the easy way out and truncate, but will 
+			// be much better appearing if both the start of the line and the 
+			// end of the line are displayed with styles. Since these are both
+			// the parts of the line a user is likely to look at. The middle of the 
+			// line will still be "plain". Presumably, the user would re-format the 
+			// file to avoid long lines, so unlikely to see the middle. 
+			StyleRange[] newRanges = new StyleRange[LEFT_STYLES_SIZE + RIGHT_STYLES_SIZE + MIDDLE_STYLES_SIZE]; 
+			System.arraycopy(eventStyles, 0, newRanges, 0, LEFT_STYLES_SIZE);
+			//
+			// do end, before we do middle
+			System.arraycopy(eventStyles, eventStyles.length-RIGHT_STYLES_SIZE, newRanges, LEFT_STYLES_SIZE + MIDDLE_STYLES_SIZE, RIGHT_STYLES_SIZE);
+			//
+			// technically, we should compute the exact middle as one big style range, 
+			// with default colors and styles, so if someone does actually type or work with 
+			// documnet as is, will still be correct. 
+			//
+			StyleRange allBlank = new StyleRange();
+			StyleRange lastKnown = newRanges[LEFT_STYLES_SIZE - 1];
+			allBlank.start = lastKnown.start + lastKnown.length;
+			StyleRange nextKnown = newRanges[LEFT_STYLES_SIZE + MIDDLE_STYLES_SIZE + 1];
+			allBlank.length = nextKnown.start - allBlank.start;
+			newRanges[LEFT_STYLES_SIZE] = allBlank;
+			return newRanges;
+		}
+	}
+
+	/**
+	 * A passthrough method that extracts relevant data from the
+	 * LineStyleEvent and passes it along. This method was separated for
+	 * performance testing purposes.
+	 * 
+	 * @see org.eclipse.swt.custom.LineStyleListener#lineGetStyle(LineStyleEvent)
+	 */
+	public void lineGetStyle(LineStyleEvent event) {
+		int offset = event.lineOffset;
+		int length = event.lineText.length();
+
+		/*
+		 * For some reason, we are sometimes asked for the same style range
+		 * over and over again. This was found to happen during 'revert' of a
+		 * file with one line in it that is 40K long! So, while we don't know
+		 * root cause, caching the styled ranges in case the exact same
+		 * request is made multiple times seems like cheap insurance.
+		 */
+		if (offset == fSavedOffset && length == fSavedLength && fSavedRanges != null) {
+			event.styles = fSavedRanges;
+		}
+		else {
+			// need to assign this array here, or else the field won't get
+			// updated
+			event.styles = lineGetStyle(offset, length);
+			// now saved "cached data" for repeated requests which are exaclty
+			// same
+			fSavedOffset = offset;
+			fSavedLength = length;
+			fSavedRanges = event.styles;
+		}
+	}
+
+	/**
+	 * Note: its very important this method never return null, which is why
+	 * the final null check is in a finally clause
+	 */
+
+	protected StyleRange[] prepareStyleRangesArray(ITypedRegion[] partitions, int start, int length) {
+
+		StyleRange[] result = EMPTY_STYLE_RANGE;
+
+		if (fHoldStyleResults == null) {
+			fHoldStyleResults = new ArrayList(partitions.length);
+		}
+		else {
+			fHoldStyleResults.clear();
+		}
+
+		// TODO: make some of these instance variables to prevent creation on
+		// stack
+		LineStyleProvider currentLineStyleProvider = null;
+		boolean handled = false;
+		for (int i = 0; i < partitions.length; i++) {
+			ITypedRegion currentPartition = partitions[i];
+			currentLineStyleProvider = getProviderFor(currentPartition);
+			currentLineStyleProvider.init(getDocument(), this);
+			handled = currentLineStyleProvider.prepareRegions(currentPartition, currentPartition.getOffset(), currentPartition.getLength(), fHoldStyleResults);
+			if (Debug.syntaxHighlighting && !handled) {
+				System.out.println("Did not handle highlighting in Highlighter inner while"); //$NON-NLS-1$
+			}
+		}
+
+		int resultSize = fHoldStyleResults.size();
+		if (resultSize > 0) {
+			result = (StyleRange[]) fHoldStyleResults.toArray(new StyleRange[fHoldStyleResults.size()]);
+		}
+		else {
+			result = EMPTY_STYLE_RANGE;
+		}
+		result = convertReadOnlyRegions(result, start, length);
+		return result;
+	}
+
+	public void refreshDisplay() {
+		if (textWidget != null && !textWidget.isDisposed())
+			textWidget.redraw();
+	}
+
+	/**
+	 */
+	public void refreshDisplay(int start, int length) {
+		if (textWidget != null && !textWidget.isDisposed())
+			textWidget.redrawRange(start, length, true);
+	}
+
+	public void removeProvider(String partitionType) {
+		getTableOfProviders().remove(partitionType);
+	}
+
+	public void setDocument(IStructuredDocument structuredDocument) {
+		fStructuredDocument = structuredDocument;
+	}
+
+	public void setDocumentPartitioning(String partitioning) {
+		if (partitioning != null) {
+			fPartitioning = partitioning;
+		}
+		else {
+			fPartitioning = IDocumentExtension3.DEFAULT_PARTITIONING;
+		}
+	}
+
+	/**
+	 * Uninstalls highlighter support from the text viewer it has previously
+	 * be installed on.
+	 */
+	public void uninstall() {
+		if (textWidget != null && !textWidget.isDisposed()) {
+			textWidget.removeLineStyleListener(this);
+		}
+		textWidget = null;
+
+		Collection providers = getTableOfProviders().values();
+		Iterator iterator = providers.iterator();
+		while (iterator.hasNext()) {
+			LineStyleProvider lineStyleProvider = (LineStyleProvider) iterator.next();
+			lineStyleProvider.release();
+			// this remove probably isn't strictly needed, since
+			// typically highlighter instance as a whole will go
+			// away ... but in case that ever changes, this seems like
+			// a better style.
+			iterator.remove();
+		}
+
+		synchronized (getExtendedProviders()) {
+			providers = new ArrayList(getExtendedProviders().values());
+			getExtendedProviders().clear();
+		}
+		iterator = providers.iterator();
+		while (iterator.hasNext()) {
+			LineStyleProvider lineStyleProvider = (LineStyleProvider) iterator.next();
+			if (lineStyleProvider != null) {
+				lineStyleProvider.release();
+				iterator.remove();
+			}
+		}
+
+		IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore();
+		editorStore.removePropertyChangeListener(fForegroundScaleListener);
+		disposeColorTable();
+
+		// clear out cached variables (d282894)
+		fSavedOffset = -1;
+		fSavedLength = -1;
+		fSavedRanges = null;
+	}
+
+	/**
+	 * Purely a debugging aide.
+	 */
+	private boolean valid(StyleRange[] eventStyles, int startOffset, int lineLength) {
+		boolean result = false;
+		if (eventStyles != null) {
+			if (eventStyles.length > 0) {
+				StyleRange first = eventStyles[0];
+				StyleRange last = eventStyles[eventStyles.length - 1];
+				if (startOffset > first.start) {
+					result = false;
+				}
+				else {
+					int lineEndOffset = startOffset + lineLength;
+					int lastOffset = last.start + last.length;
+					if (lastOffset > lineEndOffset) {
+						result = false;
+					}
+					else {
+						result = true;
+					}
+				}
+			}
+			else {
+				// a zero length array is ok
+				result = true;
+			}
+		}
+		return result;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/IHighlighter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/IHighlighter.java
new file mode 100644
index 0000000..caf37d0
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/IHighlighter.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.provisional.style;
+
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.swt.custom.LineStyleListener;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+
+/**
+ * @author davidw
+ * 
+ */
+public interface IHighlighter extends LineStyleListener {
+	void addProvider(String partitionType, LineStyleProvider provider);
+
+	void install(ITextViewer viewer);
+
+	void removeProvider(String partitionType);
+
+	void setDocument(IStructuredDocument structuredDocument);
+	
+	void uninstall();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/LineStyleProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/LineStyleProvider.java
new file mode 100644
index 0000000..ff81827
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/LineStyleProvider.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.style;
+
+import java.util.Collection;
+
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+
+/**
+ * This interface is not intended to be implemented by clients. Clients
+ * should instead subclass AbstractLineStyleProvider
+ *
+ */
+public interface LineStyleProvider {
+
+	/**
+	 * Initializes this provider for the given Highlighter and document. This
+	 * method will be called at least once before prepareRegions is called.
+	 * 
+	 * @param document
+	 * @param highlighter
+	 */
+	void init(IStructuredDocument document, Highlighter highlighter);
+
+	/**
+	 * Optionally appends StyleRanges to the styleRanges Collection, in order,
+	 * and only covering the given range within the document. StyleRanges added
+	 * to the collection should not expand outside of the range of the currentRegion
+	 * ITypedRegion.
+	 * 
+	 * @param currentRegion -
+	 *            the current document partition
+	 * @param start
+	 * @param length
+	 * @param styleRanges
+	 * @return whether this LineStyleProvider handled the request; handling
+	 *         includes not adding StyleRanges if that is still the correct
+	 *         behavior
+	 */
+	boolean prepareRegions(ITypedRegion currentRegion, int start, int length, Collection styleRanges);
+
+	/**
+	 * Instructs this provider to free up any "resources" it might be holding
+	 * on to (such as listening for preference changes). It is only called
+	 * once in the lifetime of this provider.
+	 */
+	void release();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/LineStyleProviderForNoOp.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/LineStyleProviderForNoOp.java
new file mode 100644
index 0000000..3d60929
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/LineStyleProviderForNoOp.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.style;
+
+
+
+import java.util.Collection;
+
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+
+/**
+ * This class can be used by default, if no attribute provider is found for a
+ * certain region type. Its probably an error in a factory somewhere if an
+ * adapter is not found, but this class allows the logic to proceed basically
+ * simply providing default colored syntax highlighting.
+ * 
+ * Not to be subclassed.
+ */
+final public class LineStyleProviderForNoOp implements LineStyleProvider {
+
+	public void init(IStructuredDocument document, Highlighter highlighter) {
+		// nothing to do
+	}
+	
+	/**
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.style.AbstractLineStyleProvider#prepareRegions(org.eclipse.jface.text.ITypedRegion,
+	 *      int, int, java.util.Collection)
+	 */
+	public boolean prepareRegions(ITypedRegion currentRegion, int start, int length, Collection holdResults) {
+		// add nothing, but say handled.
+		return true;
+	}
+
+	public void release() {
+		// nothing to do
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/ReconcilerHighlighter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/ReconcilerHighlighter.java
new file mode 100644
index 0000000..1a39d4b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/ReconcilerHighlighter.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.provisional.style;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+public class ReconcilerHighlighter {
+
+	private static final String LINE_STYLE_PROVIDER_EXTENDED_ID = Highlighter.LINE_STYLE_PROVIDER_EXTENDED_ID;
+
+	private Map fTableOfProviders = null;
+
+	private Map fExtendedProviders = null;
+
+	private ITextViewer fTextViewer = null;
+
+	private final static boolean _trace = Boolean.valueOf(Platform.getDebugOption("org.eclipse.wst.sse.ui/structuredPresentationReconciler")).booleanValue(); //$NON-NLS-1$
+	private final static String TRACE_PREFIX = "StructuredPresentationReconciler: "; //$NON-NLS-1$
+	private long time0;
+
+	/**
+	 * instance for older LineStyleProviders loaded by extension point,
+	 * created if needed
+	 */
+	private CompatibleHighlighter fCompatibleHighlighter = null;
+
+	public void refreshDisplay() {
+		if (_trace) {
+			time0 = System.currentTimeMillis();
+		}
+		if (fTextViewer != null)
+			fTextViewer.invalidateTextPresentation();
+		if (_trace) {
+			System.out.println(TRACE_PREFIX + "ReconcilerHighlighter refreshDisplay took " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			System.out.flush();
+		}
+	}
+
+	/**
+	 * Registers a given line style provider for a particular partition type.
+	 * If there is already a line style provider registered for this type, the
+	 * new line style provider is registered instead of the old one.
+	 * 
+	 * @param partitionType
+	 *            the partition type under which to register
+	 * @param the
+	 *            line style provider to register, or <code>null</code> to
+	 *            remove an existing one
+	 */
+	public void addProvider(String partitionType, LineStyleProvider provider) {
+		getTableOfProviders().put(partitionType, provider);
+	}
+
+	public void removeProvider(String partitionType) {
+		getTableOfProviders().remove(partitionType);
+	}
+
+	public LineStyleProvider getProvider(String partitionType) {
+		LineStyleProvider result = (LineStyleProvider) getTableOfProviders().get(partitionType);
+
+		// The provider was not within the default set of providers. Use the
+		// extended configuration
+		// to look up additional providers
+		if (result == null) {
+			// NOT YET FINALIZED - DO NOT CONSIDER AS API
+			synchronized (getExtendedProviders()) {
+				if (!getExtendedProviders().containsKey(partitionType)) {
+					result = (LineStyleProvider) ExtendedConfigurationBuilder.getInstance().getConfiguration(LINE_STYLE_PROVIDER_EXTENDED_ID, partitionType);
+					getExtendedProviders().put(partitionType, result);
+
+					if (result != null && fTextViewer != null && fTextViewer.getDocument() instanceof IStructuredDocument) {
+						if (result instanceof AbstractLineStyleProvider) {
+							((AbstractLineStyleProvider) result).init((IStructuredDocument) fTextViewer.getDocument(), this);
+						}
+						else {
+							Logger.log(Logger.INFO_DEBUG, "CompatibleHighlighter installing compatibility for " + result.getClass()); //$NON-NLS-1$
+							if (fCompatibleHighlighter == null) {
+								fCompatibleHighlighter = new CompatibleHighlighter();
+								fCompatibleHighlighter.install(fTextViewer);
+							}
+							result.init((IStructuredDocument) fTextViewer.getDocument(), fCompatibleHighlighter);
+						}
+					}
+				}
+				else {
+					result = (LineStyleProvider) getExtendedProviders().get(partitionType);
+				}
+			}
+		}
+		return result;
+	}
+
+	private Map getTableOfProviders() {
+		if (fTableOfProviders == null) {
+			fTableOfProviders = new HashMap();
+		}
+		return fTableOfProviders;
+	}
+
+	private Map getExtendedProviders() {
+		if (fExtendedProviders == null) {
+			fExtendedProviders = new HashMap(3);
+		}
+		return fExtendedProviders;
+	}
+
+	public void install(ITextViewer textViewer) {
+		fTextViewer = textViewer;
+		if (fCompatibleHighlighter != null) {
+			fCompatibleHighlighter.uninstall();
+			fCompatibleHighlighter.install(fTextViewer);
+		}
+		refreshDisplay();
+	}
+
+	public void uninstall() {
+		Iterator it = getTableOfProviders().values().iterator();
+
+		while (it.hasNext()) {
+			LineStyleProvider provider = (LineStyleProvider) it.next();
+			if (provider != null)
+				provider.release();
+		}
+
+		it = getExtendedProviders().values().iterator();
+		while (it.hasNext()) {
+			LineStyleProvider provider = (LineStyleProvider) it.next();
+			if (provider != null)
+				provider.release();
+		}
+
+		getTableOfProviders().clear();
+		getExtendedProviders().clear();
+		fTableOfProviders = null;
+		if (fCompatibleHighlighter != null) {
+			fCompatibleHighlighter.uninstall();
+		}
+		fTextViewer = null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/StructuredPresentationReconciler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/StructuredPresentationReconciler.java
new file mode 100644
index 0000000..1001ad5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/StructuredPresentationReconciler.java
@@ -0,0 +1,934 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.provisional.style;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.BadPositionCategoryException;
+import org.eclipse.jface.text.DefaultPositionUpdater;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.DocumentPartitioningChangedEvent;
+import org.eclipse.jface.text.DocumentRewriteSessionEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentExtension3;
+import org.eclipse.jface.text.IDocumentExtension4;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.IDocumentPartitioningListener;
+import org.eclipse.jface.text.IDocumentPartitioningListenerExtension;
+import org.eclipse.jface.text.IDocumentPartitioningListenerExtension2;
+import org.eclipse.jface.text.IDocumentRewriteSessionListener;
+import org.eclipse.jface.text.IPositionUpdater;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextInputListener;
+import org.eclipse.jface.text.ITextListener;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension5;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextEvent;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.TypedPosition;
+import org.eclipse.jface.text.presentation.IPresentationDamager;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.presentation.IPresentationReconcilerExtension;
+import org.eclipse.jface.text.presentation.IPresentationRepairer;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.wst.sse.core.internal.provisional.events.IStructuredDocumentListener;
+import org.eclipse.wst.sse.core.internal.provisional.events.NewDocumentEvent;
+import org.eclipse.wst.sse.core.internal.provisional.events.NoChangeEvent;
+import org.eclipse.wst.sse.core.internal.provisional.events.RegionChangedEvent;
+import org.eclipse.wst.sse.core.internal.provisional.events.RegionsReplacedEvent;
+import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentRegionsReplacedEvent;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+
+public class StructuredPresentationReconciler implements IPresentationReconciler, IPresentationReconcilerExtension {
+
+	/** Prefix of the name of the position category for tracking damage regions. */
+	final static String TRACKED_PARTITION= "__reconciler_tracked_partition"; //$NON-NLS-1$
+	
+	private final static boolean _trace = Boolean.valueOf(Platform.getDebugOption("org.eclipse.wst.sse.ui/structuredPresentationReconciler")).booleanValue(); //$NON-NLS-1$
+	private final static boolean _traceTime = Boolean.valueOf(Platform.getDebugOption("org.eclipse.wst.sse.ui/structuredPresentationReconciler/time")).booleanValue(); //$NON-NLS-1$
+	private static final String TRACE_PREFIX = "StructuredPresentationReconciler: ";
+	private long time0;
+	private long time1;
+
+	/**
+	 * Internal listener class.
+	 */
+	class InternalListener implements
+			ITextInputListener, IDocumentListener, ITextListener, IStructuredDocumentListener,
+			IDocumentPartitioningListener, IDocumentPartitioningListenerExtension, IDocumentPartitioningListenerExtension2, IDocumentRewriteSessionListener {
+
+		/** Set to <code>true</code> if between a document about to be changed and a changed event. */
+		private boolean fDocumentChanging= false;
+		
+		/** Flag for the document being in a rewrite session */
+		private boolean fInRewriteSession = false;
+		
+		/** Flag for some kind of changes being applied during a document rewrite session */
+		private boolean fHasIncomingChanges = false;
+		
+		/**
+		 * The cached redraw state of the text viewer.
+		 * @since 3.0
+		 */
+		private boolean fCachedRedrawState= true;
+
+		public void newModel(NewDocumentEvent structuredDocumentEvent) {
+			if(fInRewriteSession) {
+				fHasIncomingChanges = true;
+				return;
+			}
+			if (_trace) {
+				time1 = System.currentTimeMillis();
+			}
+			int length = structuredDocumentEvent.getLength();
+			recordDamage(new Region(0, length), structuredDocumentEvent.getDocument());
+			if (_trace) {
+				System.out.println("\n" + TRACE_PREFIX + "calculated damage for NewDocumentEvent: (length=" + length + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.flush();
+			}
+			if (_trace && _traceTime) {
+				System.out.println(TRACE_PREFIX + "calculated damage for NewDocumentEvent in " + (System.currentTimeMillis()-time1) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.flush();
+			}
+		}
+
+		public void noChange(NoChangeEvent structuredDocumentEvent) {
+			if(fInRewriteSession) {
+				fHasIncomingChanges = true;
+				return;
+			}
+			if (_trace) {
+				time1 = System.currentTimeMillis();
+			}
+			if (structuredDocumentEvent.reason == NoChangeEvent.NO_CONTENT_CHANGE ) {
+				IRegion damage = new Region(structuredDocumentEvent.fOffset, structuredDocumentEvent.fLength);
+				recordDamage(damage, structuredDocumentEvent.fDocument);
+			}
+			if (_trace && _traceTime) {
+				System.out.println("\n" + TRACE_PREFIX + "calculated damage for NoChangeEvent in " + (System.currentTimeMillis()-time1) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.flush();
+			}
+		}
+
+		public void nodesReplaced(StructuredDocumentRegionsReplacedEvent structuredDocumentEvent) {
+			if(fInRewriteSession) {
+				fHasIncomingChanges = true;
+				return;
+			}
+			if (_trace) {
+				time1 = System.currentTimeMillis();
+			}
+			IRegion damage;
+			IStructuredDocumentRegionList newDocumentRegions = structuredDocumentEvent.getNewStructuredDocumentRegions();
+			if (newDocumentRegions.getLength() > 0) {
+				int startOffset = newDocumentRegions.item(0).getStartOffset();
+				int length = newDocumentRegions.item(newDocumentRegions.getLength() - 1).getEndOffset() - startOffset;
+				damage = new Region(startOffset, length);
+
+			}
+			else {
+				damage = new Region(structuredDocumentEvent.fOffset, structuredDocumentEvent.getLength());
+			}
+			recordDamage(damage, structuredDocumentEvent.fDocument);
+			if (_trace) {
+				System.out.println("\n" + TRACE_PREFIX + "calculated damage for StructuredDocumentRegionsReplacedEvent: [" + damage.getOffset() + ":" + damage.getLength() + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
+				System.out.flush();
+			}
+			if (_trace && _traceTime) {
+				System.out.println(TRACE_PREFIX + "calculated damage for StructuredDocumentRegionsReplacedEvent in " + (System.currentTimeMillis()-time1) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.flush();
+			}
+		}
+
+		public void regionChanged(RegionChangedEvent structuredDocumentEvent) {
+			if(fInRewriteSession) {
+				fHasIncomingChanges = true;
+				return;
+			}
+			if (_trace) {
+				time1 = System.currentTimeMillis();
+			}
+			IStructuredDocumentRegion documentRegion = structuredDocumentEvent.getStructuredDocumentRegion();
+			ITextRegion changedRegion = structuredDocumentEvent.getRegion();
+			int startOffset = documentRegion.getStartOffset(changedRegion);
+			int length = changedRegion.getLength();
+			IRegion damage = new Region(startOffset, length);
+
+			recordDamage(damage, structuredDocumentEvent.fDocument);
+			if (_trace) {
+				System.out.println("\n" + TRACE_PREFIX + "calculated damage for RegionChangedEvent: [" + damage.getOffset() + ":" + damage.getLength() + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
+				System.out.flush();
+			}
+			if (_trace && _traceTime) {
+				System.out.println(TRACE_PREFIX + "calculated damage for RegionChangedEvent in " + (System.currentTimeMillis()-time1) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.flush();
+			}
+		}
+
+		public void regionsReplaced(RegionsReplacedEvent structuredDocumentEvent) {
+			if(fInRewriteSession) {
+				fHasIncomingChanges = true;
+				return;
+			}
+			if (_trace) {
+				time1 = System.currentTimeMillis();
+			}
+			IRegion damage;
+			IStructuredDocumentRegion documentRegion = structuredDocumentEvent.getStructuredDocumentRegion();
+			ITextRegionList newRegions = structuredDocumentEvent.getNewRegions();
+			if (newRegions.size() > 0) {
+				ITextRegion firstChangedRegion = newRegions.get(0);
+				ITextRegion lastChangedRegion = newRegions.get(newRegions.size() - 1);
+				int startOffset = documentRegion.getStartOffset(firstChangedRegion);
+				int length = documentRegion.getEndOffset(lastChangedRegion) - startOffset;
+				damage = new Region(startOffset, length);
+			}
+			else {
+				damage = new Region(documentRegion.getStartOffset(), documentRegion.getLength());
+			}
+			recordDamage(damage, structuredDocumentEvent.fDocument);
+			if (_trace) {
+				System.out.println("\n" + TRACE_PREFIX + "calculated damage for RegionsReplacedEvent: [" + damage.getOffset() + ":" + damage.getLength() + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
+				System.out.flush();
+			}
+			if (_trace && _traceTime) {
+				System.out.println(TRACE_PREFIX + "calculated damage for RegionsReplacedEvent in " + (System.currentTimeMillis()-time1) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.flush();
+			}
+		}
+		
+		/*
+		 * @see ITextInputListener#inputDocumentAboutToBeChanged(IDocument, IDocument)
+		 */
+		public void inputDocumentAboutToBeChanged(IDocument oldDocument, IDocument newDocument) {
+			if (oldDocument != null) {
+				try {
+
+					fViewer.removeTextListener(this);
+					oldDocument.removeDocumentListener(this);
+					oldDocument.removeDocumentPartitioningListener(this);
+					if (oldDocument instanceof IStructuredDocument) {
+						((IStructuredDocument) oldDocument).removeDocumentChangedListener(this);
+					}
+
+					oldDocument.removePositionUpdater(fPositionUpdater);
+					oldDocument.removePositionCategory(fPositionCategory);
+
+				} catch (BadPositionCategoryException x) {
+					// should not happened for former input documents;
+				}
+			}
+		}
+
+		/*
+		 * @see ITextInputListener#inputDocumenChanged(IDocument, IDocument)
+		 */
+		public void inputDocumentChanged(IDocument oldDocument, IDocument newDocument) {
+			if (_trace || _traceTime) {
+				time1 = System.currentTimeMillis();
+			}
+
+			fDocumentChanging= false;
+			fCachedRedrawState= true;
+
+			if (newDocument != null) {
+				newDocument.addPositionCategory(fPositionCategory);
+				newDocument.addPositionUpdater(fPositionUpdater);
+
+				if (newDocument instanceof IStructuredDocument) {
+					newDocument.addDocumentPartitioningListener(this);
+					newDocument.addDocumentListener(this);
+					((IStructuredDocument)newDocument).addDocumentChangedListener(this);
+				}
+				fViewer.addTextListener(this);
+
+				if (newDocument instanceof IStructuredDocument) {
+					setDocumentToDamagers(newDocument);
+					setDocumentToRepairers(newDocument);
+					processDamage(new Region(0, newDocument.getLength()), newDocument);
+				}
+			}
+			if (_trace) {
+				System.out.println(TRACE_PREFIX + "processed damage for inputDocumentChanged in " + (System.currentTimeMillis() - time1) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+
+		/*
+		 * @see IDocumentPartitioningListener#documentPartitioningChanged(IDocument)
+		 */
+		public void documentPartitioningChanged(IDocument document) {
+			if (_traceTime) {
+				time0 = System.currentTimeMillis();
+			}
+			if (!fDocumentChanging && fCachedRedrawState)
+				processDamage(new Region(0, document.getLength()), document);
+			else
+				fDocumentPartitioningChanged= true;
+			if (_trace) {
+				System.out.println(TRACE_PREFIX + "processed damage for documentPartitioningChanged [full document]"); //$NON-NLS-1$
+			}
+			if (_trace && _traceTime) {
+				System.out.println(TRACE_PREFIX + "processed damage for documentPartitioningChanged in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+
+		/*
+		 * @see IDocumentPartitioningListenerExtension#documentPartitioningChanged(IDocument, IRegion)
+		 * @since 2.0
+		 */
+		public void documentPartitioningChanged(IDocument document, IRegion changedRegion) {
+			if (_traceTime) {
+				time0 = System.currentTimeMillis();
+			}
+			if (!fDocumentChanging && fCachedRedrawState) {
+				processDamage(new Region(changedRegion.getOffset(), changedRegion.getLength()), document);
+			} else {
+				fDocumentPartitioningChanged= true;
+				fChangedDocumentPartitions= changedRegion;
+			}
+			if (_trace) {
+				System.out.println(TRACE_PREFIX + "processed damage for documentPartitioningChanged [" + changedRegion.getOffset() + ":" + changedRegion.getLength() + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
+			if (_trace && _traceTime) {
+				System.out.println(TRACE_PREFIX + "processed damage for documentPartitioningChanged in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.IDocumentPartitioningListenerExtension2#documentPartitioningChanged(org.eclipse.jface.text.DocumentPartitioningChangedEvent)
+		 * @since 3.0
+		 */
+		public void documentPartitioningChanged(DocumentPartitioningChangedEvent event) {
+			IRegion changedRegion= event.getChangedRegion(getDocumentPartitioning());
+			if (changedRegion != null)
+				documentPartitioningChanged(event.getDocument(), changedRegion);
+		}
+
+		/*
+		 * @see IDocumentListener#documentAboutToBeChanged(DocumentEvent)
+		 */
+		public void documentAboutToBeChanged(DocumentEvent e) {
+
+			fDocumentChanging= true;
+			if (fCachedRedrawState) {
+				try {
+					int offset= e.getOffset() + e.getLength();
+					ITypedRegion region= getPartition(e.getDocument(), offset);
+					fRememberedPosition= new TypedPosition(region);
+					e.getDocument().addPosition(fPositionCategory, fRememberedPosition);
+				} catch (BadLocationException x) {
+					// can not happen
+				} catch (BadPositionCategoryException x) {
+					// should not happen on input elements
+				}
+			}
+		}
+
+		/*
+		 * @see IDocumentListener#documentChanged(DocumentEvent)
+		 */
+		public void documentChanged(DocumentEvent e) {
+			if (fCachedRedrawState) {
+				try {
+					e.getDocument().removePosition(fPositionCategory, fRememberedPosition);
+				} catch (BadPositionCategoryException x) {
+					// can not happen on input documents
+				}
+			}
+			fDocumentChanging= false;
+		}
+
+		/*
+		 * @see ITextListener#textChanged(TextEvent)
+		 */
+		public void textChanged(TextEvent e) {
+			if(fInRewriteSession) {
+				fHasIncomingChanges = true;
+				return;
+			}
+			fCachedRedrawState= e.getViewerRedrawState();
+	 		if (!fCachedRedrawState) {
+				if (_trace) {
+					System.out.println("\n" + TRACE_PREFIX + "returned early from textChanged(TextEvent)"); //$NON-NLS-1$	 //$NON-NLS-2$	
+				}
+				return;
+			}
+			if (_trace) {
+				System.out.println("\n" + TRACE_PREFIX + "entering textChanged(TextEvent)"); //$NON-NLS-1$ //$NON-NLS-2$
+				time0 = System.currentTimeMillis();
+			}
+
+	 		IRegion damage= null;
+	 		IDocument document= null;
+
+		 	if (e.getDocumentEvent() == null) {
+		 		document= fViewer.getDocument();
+		 		if (document != null)  {
+			 		if (e.getOffset() == 0 && e.getLength() == 0 && e.getText() == null) {
+						// redraw state change, damage the whole document
+						damage= new Region(0, document.getLength());
+			 		} else {
+						IRegion region= widgetRegion2ModelRegion(e);
+						try {
+							String text= document.get(region.getOffset(), region.getLength());
+							DocumentEvent de= new DocumentEvent(document, region.getOffset(), region.getLength(), text);
+							damage= getDamage(de, false);
+						} catch (BadLocationException x) {
+							/* ignored in platform PresentationReconciler, too */
+						}
+			 		}
+		 		}
+		 	} else  {
+		 		DocumentEvent de= e.getDocumentEvent();
+		 		document= de.getDocument();
+		 		damage= getDamage(de, true);
+		 	}
+			if(_trace && _traceTime) {
+				System.out.println(TRACE_PREFIX + "calculated simple text damage at " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.flush();
+			}
+			
+			boolean damageOverlaps = processRecordedDamages(damage, document);
+			if(_trace && _traceTime) {
+				System.out.println(TRACE_PREFIX + "processed recorded structured text damage at " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+
+			if (damage != null && document != null && !damageOverlaps) {
+				processDamage(damage, document);
+				if(_trace && _traceTime) {
+					System.out.println(TRACE_PREFIX + "processed simple text damage at " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+					System.out.flush();
+				}
+			}
+
+			fDocumentPartitioningChanged= false;
+			fChangedDocumentPartitions= null;
+			if(_trace) {
+				System.out.println(TRACE_PREFIX + "finished textChanged(TextEvent) in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+
+		/**
+		 * Translates the given text event into the corresponding range of the viewer's document.
+		 *
+		 * @param e the text event
+		 * @return the widget region corresponding the region of the given event
+		 * @since 2.1
+		 */
+		protected IRegion widgetRegion2ModelRegion(TextEvent e) {
+
+			String text= e.getText();
+			int length= text == null ? 0 : text.length();
+
+			if (fViewer instanceof ITextViewerExtension5) {
+				ITextViewerExtension5 extension= (ITextViewerExtension5) fViewer;
+				return extension.widgetRange2ModelRange(new Region(e.getOffset(), length));
+			}
+
+			IRegion visible= fViewer.getVisibleRegion();
+			IRegion region= new Region(e.getOffset() + visible.getOffset(), length);
+			return region;
+		}
+
+		public void documentRewriteSessionChanged(DocumentRewriteSessionEvent event) {
+			fInRewriteSession = (event != null && event.fChangeType == DocumentRewriteSessionEvent.SESSION_START);
+			if(!fInRewriteSession && fHasIncomingChanges && event != null) {
+				if (_trace)
+					time0 = System.currentTimeMillis();
+				processDamage(new Region(0, event.fDocument.getLength()), event.fDocument);
+				if(_trace && _traceTime)
+					System.out.println(TRACE_PREFIX + " processed damaged after ending document rewrite session at " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				fHasIncomingChanges = false;
+			}
+		}
+
+	}
+	
+	private static class RecordedDamage {
+		IRegion damage; 
+		IDocument document;
+		RecordedDamage(IRegion damage, IDocument document) {
+			this.damage = damage;
+			this.document = document;
+		}
+	}
+
+	/** The map of presentation damagers. */
+	private Map fDamagers;
+	/** The map of presentation repairers. */
+	private Map fRepairers;
+	/** The target viewer. */
+	private ITextViewer fViewer;
+	/** The internal listener. */
+	private InternalListener fInternalListener= new InternalListener();
+	/** The name of the position category to track damage regions. */
+	private String fPositionCategory;
+	/** The position updated for the damage regions' position category. */
+	private IPositionUpdater fPositionUpdater;
+	/** The positions representing the damage regions. */
+	private TypedPosition fRememberedPosition;
+	/** Flag indicating the receipt of a partitioning changed notification. */
+	private boolean fDocumentPartitioningChanged= false;
+	/** The range covering the changed partitioning. */
+	private IRegion fChangedDocumentPartitions= null;
+	
+	/**
+	 * Because structured document events fire before textChanged(), it's
+	 * possible the widget isn't fully aware of the changes to its contents.
+	 * "Record" the damage to process after textChanged() has been fired.
+	 */
+	private List fRecordedDamages = new ArrayList(2);
+	
+	/**
+	 * The partitioning used by this presentation reconciler.
+	 * @since 3.0
+	 */
+	private String fPartitioning;
+
+	private IDocument fLastDocument;
+	
+	/**
+	 * Creates a new presentation reconciler. There are no damagers or repairers
+	 * registered with this reconciler by default. The default partitioning
+	 * <code>IDocumentExtension3.DEFAULT_PARTITIONING</code> is used.
+	 */
+	public StructuredPresentationReconciler() {
+		super();
+		fPartitioning= IDocumentExtension3.DEFAULT_PARTITIONING;
+		fPositionCategory= TRACKED_PARTITION + hashCode();
+		fPositionUpdater= new DefaultPositionUpdater(fPositionCategory);
+	}
+
+	/**
+	 * Sets the document partitioning for this presentation reconciler.
+	 *
+	 * @param partitioning the document partitioning for this presentation reconciler.
+	 * @since 3.0
+	 */
+	public void setDocumentPartitioning(String partitioning) {
+		Assert.isNotNull(partitioning);
+		fPartitioning= partitioning;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.presentation.IPresentationReconcilerExtension#geDocumenttPartitioning()
+	 * @since 3.0
+	 */
+	public String getDocumentPartitioning() {
+		return fPartitioning;
+	}
+
+	/**
+	 * Registers the given presentation damager for a particular content type.
+	 * If there is already a damager registered for this type, the old damager
+	 * is removed first.
+	 *
+	 * @param damager the presentation damager to register, or <code>null</code> to remove an existing one
+	 * @param contentType the content type under which to register
+	 */
+	public void setDamager(IPresentationDamager damager, String contentType) {
+
+		Assert.isNotNull(contentType);
+
+		if (fDamagers == null)
+			fDamagers= new HashMap();
+
+		if (damager == null)
+			fDamagers.remove(contentType);
+		else
+			fDamagers.put(contentType, damager);
+	}
+
+	/**
+	 * Registers the given presentation repairer for a particular content type.
+	 * If there is already a repairer registered for this type, the old repairer
+	 * is removed first.
+	 *
+	 * @param repairer the presentation repairer to register, or <code>null</code> to remove an existing one
+	 * @param contentType the content type under which to register
+	 */
+	public void setRepairer(IPresentationRepairer repairer, String contentType) {
+
+		Assert.isNotNull(contentType);
+
+		if (fRepairers == null)
+			fRepairers= new HashMap();
+
+		if (repairer == null)
+			fRepairers.remove(contentType);
+		else
+			fRepairers.put(contentType, repairer);
+	}
+
+	/*
+	 * @see IPresentationReconciler#install(ITextViewer)
+	 */
+	public void install(ITextViewer viewer) {
+		if(_trace) {
+			time0 = System.currentTimeMillis();
+		}
+		Assert.isNotNull(viewer);
+
+		fViewer= viewer;
+		fViewer.addTextInputListener(fInternalListener);
+		
+		IDocument document= viewer.getDocument();
+		if (document != null) {
+			fInternalListener.inputDocumentChanged(null, document);
+			if(document instanceof IStructuredDocument) {
+				((IStructuredDocument) document).addDocumentChangedListener(fInternalListener);
+			}
+			if(document instanceof IDocumentExtension4) {
+				((IDocumentExtension4) document).addDocumentRewriteSessionListener(fInternalListener);
+			}
+		}
+		if(_trace) {
+			System.out.println(TRACE_PREFIX + "installed to text viewer in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+
+	/*
+	 * @see IPresentationReconciler#uninstall()
+	 */
+	public void uninstall() {
+		if(_trace) {
+			time0 = System.currentTimeMillis();
+		}
+		fViewer.removeTextInputListener(fInternalListener);
+
+		IDocument document = null;
+		if(( document = fViewer.getDocument()) instanceof IStructuredDocument) {
+			((IStructuredDocument) document).removeDocumentChangedListener(fInternalListener);
+		}
+		if(document instanceof IDocumentExtension4) {
+			((IDocumentExtension4) document).removeDocumentRewriteSessionListener(fInternalListener);
+		}
+		// Ensure we uninstall all listeners
+		fInternalListener.inputDocumentAboutToBeChanged(fViewer.getDocument(), null);
+		if(_trace) {
+			System.out.println(TRACE_PREFIX + "uninstalled from text viewer in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+
+	/*
+	 * @see IPresentationReconciler#getDamager(String)
+	 */
+	public IPresentationDamager getDamager(String contentType) {
+
+		if (fDamagers == null)
+			return null;
+
+		return (IPresentationDamager) fDamagers.get(contentType);
+	}
+
+	/*
+	 * @see IPresentationReconciler#getRepairer(String)
+	 */
+	public IPresentationRepairer getRepairer(String contentType) {
+
+		if (fRepairers == null)
+			return null;
+
+		return (IPresentationRepairer) fRepairers.get(contentType);
+	}
+
+	/**
+	 * Informs all registered damagers about the document on which they will work.
+	 *
+	 * @param document the document on which to work
+	 */
+	protected void setDocumentToDamagers(IDocument document) {
+		if (fDamagers != null) {
+			Iterator e= fDamagers.values().iterator();
+			while (e.hasNext()) {
+				IPresentationDamager damager= (IPresentationDamager) e.next();
+				damager.setDocument(document);
+			}
+		}
+	}
+
+	/**
+	 * Informs all registered repairers about the document on which they will work.
+	 *
+	 * @param document the document on which to work
+	 */
+	protected void setDocumentToRepairers(IDocument document) {
+		if (fRepairers != null) {
+			Iterator e= fRepairers.values().iterator();
+			while (e.hasNext()) {
+				IPresentationRepairer repairer= (IPresentationRepairer) e.next();
+				repairer.setDocument(document);
+			}
+		}
+	}
+
+	/**
+	 * Constructs a "repair description" for the given damage and returns this
+	 * description as a text presentation. For this, it queries the partitioning
+	 * of the damage region and asks the appropriate presentation repairer for
+	 * each partition to construct the "repair description" for this partition.
+	 *
+	 * @param damage the damage to be repaired
+	 * @param document the document whose presentation must be repaired
+	 * @return the presentation repair description as text presentation or
+	 *         <code>null</code> if the partitioning could not be computed
+	 */
+	protected TextPresentation createPresentation(IRegion damage, IDocument document) {
+		try {
+			int validLength = Math.min(damage.getLength(), document.getLength() - damage.getOffset());
+			
+			if (fRepairers == null || fRepairers.isEmpty()) {
+				TextPresentation presentation= new TextPresentation(damage, 1);
+				presentation.setDefaultStyleRange(new StyleRange(damage.getOffset(), validLength, null, null));
+				return presentation;
+			}
+
+			TextPresentation presentation= new TextPresentation(damage, 1000);
+
+			ITypedRegion[] partitions= TextUtilities.computePartitioning(document, getDocumentPartitioning(), damage.getOffset(), validLength, false);
+			for (int i= 0; i < partitions.length; i++) {
+				ITypedRegion r= partitions[i];
+				IPresentationRepairer repairer= getRepairer(r.getType());
+				if (repairer != null)
+					repairer.createPresentation(presentation, r);
+			}
+
+			return presentation;
+
+		} catch (BadLocationException x) {
+			/* ignored in platform PresentationReconciler, too */
+		}
+
+		return null;
+	}
+
+
+	/**
+	 * Checks for the first and the last affected partition affected by a
+	 * document event and calls their damagers. Invalidates everything from the
+	 * start of the damage for the first partition until the end of the damage
+	 * for the last partition.
+	 *
+	 * @param e the event describing the document change
+	 * @param optimize <code>true</code> if partition changes should be
+	 *        considered for optimization
+	 * @return the damaged caused by the change or <code>null</code> if
+	 *         computing the partitioning failed
+	 * @since 3.0
+	 */
+	IRegion getDamage(DocumentEvent e, boolean optimize) {
+		int length= e.getText() == null ? 0 : e.getText().length();
+		
+		if (fDamagers == null || fDamagers.isEmpty()) {
+			length= Math.max(e.getLength(), length);
+			length= Math.min(e.getDocument().getLength() - e.getOffset(), length);
+			return new Region(e.getOffset(), length);
+		}
+
+		boolean isDeletion= length == 0;
+		IRegion damage= null;
+		try {
+			int offset= e.getOffset();
+			if (isDeletion)
+				offset= Math.max(0, offset - 1);
+			ITypedRegion partition= getPartition(e.getDocument(), offset);
+			IPresentationDamager damager= getDamager(partition.getType());
+			if (damager == null)
+				return null;
+
+			IRegion r= damager.getDamageRegion(partition, e, fDocumentPartitioningChanged);
+
+			if (!fDocumentPartitioningChanged && optimize && !isDeletion) {
+				damage= r;
+			} else {
+
+				int damageEnd= getDamageEndOffset(e);
+
+				int parititionDamageEnd= -1;
+				if (fChangedDocumentPartitions != null)
+					parititionDamageEnd= fChangedDocumentPartitions.getOffset() + fChangedDocumentPartitions.getLength();
+
+				int end= Math.max(damageEnd, parititionDamageEnd);
+
+				damage= end == -1 ? r : new Region(r.getOffset(), end - r.getOffset());
+			}
+
+		} catch (BadLocationException x) {
+			/* ignored in platform PresentationReconciler, too */
+		}
+
+		return damage;
+	}
+
+	/**
+	 * Returns the end offset of the damage. If a partition has been split by
+	 * the given document event also the second half of the original
+	 * partition must be considered. This is achieved by using the remembered
+	 * partition range.
+	 *
+	 * @param e the event describing the change
+	 * @return the damage end offset (excluding)
+	 * @exception BadLocationException if method accesses invalid offset
+	 */
+	int getDamageEndOffset(DocumentEvent e) throws BadLocationException {
+
+		IDocument d= e.getDocument();
+
+		int length= 0;
+		if (e.getText() != null) {
+			length= e.getText().length();
+			if (length > 0)
+				-- length;
+		}
+
+		ITypedRegion partition= getPartition(d, e.getOffset() + length);
+		int endOffset= partition.getOffset() + partition.getLength();
+		if (endOffset == e.getOffset())
+			return -1;
+
+		int end= fRememberedPosition == null ? -1 : fRememberedPosition.getOffset() + fRememberedPosition.getLength();
+		if (endOffset < end && end < d.getLength())
+			partition= getPartition(d, end);
+
+		//if there is not damager for the partition then use the endOffset of the partition
+		IPresentationDamager damager= getDamager(partition.getType());
+		if (damager != null) {
+			IRegion r= damager.getDamageRegion(partition, e, fDocumentPartitioningChanged);
+			endOffset = r.getOffset() + r.getLength();
+		}
+
+		return endOffset;
+	}
+	
+	void processRecordedDamages() {
+		processRecordedDamages(null, null);
+	}
+	
+	boolean processRecordedDamages(IRegion damage, IDocument document) {
+		RecordedDamage[] recordings = null;
+		boolean recordingOverlaps = false;
+		synchronized (fRecordedDamages) {
+			recordings = (RecordedDamage[]) fRecordedDamages.toArray(new RecordedDamage[fRecordedDamages.size()]);
+			fRecordedDamages.clear();
+		}
+		for (int i = 0; i < recordings.length; i++) {
+			if (isOverlappingRegion(damage, recordings[i].damage) && document == recordings[i].document)
+				recordingOverlaps = true;
+			processDamage(recordings[i].damage, recordings[i].document);
+		}
+		return recordingOverlaps;
+	}
+	
+	private boolean isOverlappingRegion(IRegion base, IRegion damage) {
+		if(base == null || damage == null)
+			return false;
+		
+		int baseEnd = base.getOffset() + base.getLength();
+		int damageEnd = damage.getOffset() + damage.getLength();
+		
+		return damage.getOffset() <= base.getOffset() && (damageEnd >= baseEnd);
+	}
+
+	/**
+	 * Processes the given damage.
+	 * @param damage the damage to be repaired
+	 * @param document the document whose presentation must be repaired
+	 */
+	void processDamage(IRegion damage, IDocument document) {
+		if (damage != null && damage.getLength() > 0) {
+			TextPresentation p = createPresentation(damage, document);
+			if (p != null) {
+				/**
+				 * 229749 - Read-Only highlighting support missing
+				 * 272981 - Read-only highlighting moved to semantic highlighting
+				 */
+				applyTextRegionCollection(p);
+			}
+		}
+	}
+
+	/**
+	 * Processes the given damage.
+	 * @param damage the damage to be repaired
+	 * @param document the document whose presentation must be repaired
+	 */
+	void recordDamage(IRegion damage, IDocument document) {
+		if (damage != null && damage.getLength() > 0) {
+			synchronized (fRecordedDamages) {
+				fRecordedDamages.add(new RecordedDamage(damage, document));
+			}
+		}
+	}
+
+	/**
+	 * Applies the given text presentation to the text viewer the presentation
+	 * reconciler is installed on.
+	 *
+	 * @param presentation the text presentation to be applied to the text viewer
+	 */
+	void applyTextRegionCollection(TextPresentation presentation) {
+		fViewer.changeTextPresentation(presentation, false);
+	}
+
+	/**
+	 * Returns the partition for the given offset in the given document.
+	 *
+	 * @param document the document
+	 * @param offset the offset
+	 * @return the partition
+	 * @throws BadLocationException if offset is invalid in the given document
+	 * @since 3.0
+	 */
+	ITypedRegion getPartition(IDocument document, int offset) throws BadLocationException {
+		return TextUtilities.getPartition(document, getDocumentPartitioning(), offset, false);
+	}
+
+	/**
+	 * Constructs a "repair description" for the given damage and returns this
+	 * description as a text presentation, essentially making
+	 * {@link #createPresentation(IRegion, IDocument)} publicly callable.
+	 * <p>
+	 * NOTE: Should not be used if this reconciler is installed on a viewer.
+	 * This method is considered EXPERIMENTAL and may not be available in
+	 * subsequent versions.
+	 * </p>
+	 * 
+	 * @param damage
+	 *            the damage to be repaired
+	 * @param document
+	 *            the document whose presentation must be repaired
+	 * @return the presentation repair description as text presentation
+	 */
+	public TextPresentation createRepairDescription(IRegion damage, IDocument document) {
+		if (document != fLastDocument) {
+			setDocumentToDamagers(document);
+			setDocumentToRepairers(document);
+			fLastDocument= document;
+		}
+		return createPresentation(damage, document);
+	}	
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/QuickOutlineHandler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/QuickOutlineHandler.java
new file mode 100644
index 0000000..1fa7e13
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/QuickOutlineHandler.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.quickoutline;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.text.information.IInformationPresenter;
+
+public class QuickOutlineHandler extends AbstractHandler {
+
+	IInformationPresenter fPresenter;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		if (fPresenter != null)
+			fPresenter.showInformation();
+		return null;
+	}
+
+	public void configure(IInformationPresenter presenter) {
+		fPresenter = presenter;
+	}
+
+	public void dispose() {
+		super.dispose();
+		if (fPresenter != null) {
+			fPresenter.uninstall();
+			fPresenter = null;
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/QuickOutlinePopupDialog.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/QuickOutlinePopupDialog.java
new file mode 100644
index 0000000..6a2f62c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/QuickOutlinePopupDialog.java
@@ -0,0 +1,435 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.quickoutline;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.PopupDialog;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlExtension;
+import org.eclipse.jface.text.IInformationControlExtension2;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.ui.IContentSelectionProvider;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.quickoutline.StringPatternFilter.StringMatcher;
+import org.eclipse.wst.sse.ui.quickoutline.AbstractQuickOutlineConfiguration;
+
+/**
+ * Popup dialog that contains the filtering input and the outline
+ * view of the editor's input.
+ * 
+ * <p>
+ * Based on {@link org.eclipse.jdt.internal.ui.text.AbstractInformationControl}
+ * </p>
+ * 
+ */
+public class QuickOutlinePopupDialog extends PopupDialog implements IInformationControl, IInformationControlExtension, IInformationControlExtension2, DisposeListener {
+
+	/** Section used for storing the dialog's size and position settings */
+	private static final String DIALOG_SECTION = "org.eclipse.wst.sse.ui.quick_outline"; //$NON-NLS-1$
+
+	/** Text field for entering filter patterns */
+	private Text fFilterText;
+
+	/** Tree for presenting the information outline */
+	private TreeViewer fTreeViewer;
+
+	/** The model to be outlined */
+	private IStructuredModel fModel;
+
+	private ILabelProvider fLabelProvider;
+	private ITreeContentProvider fContentProvider;
+
+	private IContentSelectionProvider fSelectionProvider;
+
+	private StringPatternFilter fFilter;
+	
+	public QuickOutlinePopupDialog(Shell parent, int shellStyle, IStructuredModel model, AbstractQuickOutlineConfiguration configuration) {
+		super(parent, shellStyle, true, true, true, true, true, null, null);
+		fContentProvider = configuration.getContentProvider();
+		fLabelProvider = configuration.getLabelProvider();
+		fSelectionProvider = configuration.getContentSelectionProvider();
+		fModel = model;
+		create();
+	}
+
+	protected Control createDialogArea(Composite parent) {
+		createTreeViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL);
+		addListeners(fTreeViewer.getTree());
+
+		installFilter();
+		return fTreeViewer.getControl();
+	}
+
+	protected Control createTitleControl(Composite parent) {
+		createFilterText(parent);
+
+		return fFilterText;
+	}
+
+	protected void createTreeViewer(Composite parent, int style) {
+		Tree tree = new Tree(parent, style);
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		gd.heightHint = tree.getItemHeight() * 12;
+		tree.setLayoutData(gd);
+
+		fTreeViewer = new TreeViewer(tree);
+		fTreeViewer.setContentProvider(fContentProvider);
+		fTreeViewer.setLabelProvider(fLabelProvider);
+		fTreeViewer.setAutoExpandLevel(2);
+		fTreeViewer.setUseHashlookup(true);
+		fTreeViewer.setInput(fModel);
+	}
+
+	protected void createFilterText(Composite parent) {
+		fFilterText = new Text(parent, SWT.NONE);
+		Dialog.applyDialogFont(fFilterText);
+
+		GridData data= new GridData(GridData.FILL_HORIZONTAL);
+		data.horizontalAlignment= GridData.FILL;
+		data.verticalAlignment= GridData.CENTER;
+		fFilterText.setLayoutData(data);
+		fFilterText.addKeyListener(new KeyListener() {
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == 0x0D) // return
+					gotoSelectedElement();
+				if (e.keyCode == SWT.ARROW_DOWN)
+					fTreeViewer.getTree().setFocus();
+				if (e.keyCode == SWT.ARROW_UP)
+					fTreeViewer.getTree().setFocus();
+				if (e.character == 0x1B) // ESC
+					dispose();
+			}
+			public void keyReleased(KeyEvent e) {
+				// do nothing
+			}
+		});
+	}
+
+	protected void installFilter() {
+		fFilter = new StringPatternFilter();
+		fTreeViewer.addFilter(fFilter);
+		fFilterText.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				String text = ((Text) e.widget).getText();
+				int length = text.length();
+				if (length > 0 && text.charAt(length -1 ) != '*') {
+					text = text + '*';
+				}
+				setMatcherString(text, true);
+			}
+		});
+	}
+
+	protected void setMatcherString(String pattern, boolean update) {
+		fFilter.updatePattern(pattern);
+		if (update)
+			stringMatcherUpdated();
+	}
+	/**
+	 * The string matcher has been modified. The default implementation
+	 * refreshes the view and selects the first matched element
+	 */
+	protected void stringMatcherUpdated() {
+		// refresh viewer to re-filter
+		fTreeViewer.getControl().setRedraw(false);
+		fTreeViewer.refresh();
+		fTreeViewer.expandAll();
+		selectFirstMatch();
+		fTreeViewer.getControl().setRedraw(true);
+	}
+
+	private void selectFirstMatch() {
+		TreeItem item = findItem(fTreeViewer.getTree().getItems(), fFilter.getStringMatcher());
+		if (item != null) {
+			fTreeViewer.getTree().setSelection(item);
+		}
+		else {
+			fTreeViewer.setSelection(StructuredSelection.EMPTY);
+		}
+	}
+
+	private TreeItem findItem(TreeItem[] items, StringMatcher matcher) {
+		if (matcher == null)
+			return items.length > 0 ? items[0] : null;
+		int length = items.length;
+		TreeItem result = null;
+		for (int i = 0; i < length; i++) {
+			if (matcher.match(items[i].getText()))
+				return items[i];
+			if (items[i].getItemCount() > 0) {
+				result = findItem(items[i].getItems(), matcher);
+				if (result != null)
+					return result;
+			}
+				
+		}
+		return result;
+	}
+
+	protected IDialogSettings getDialogSettings() {
+		IDialogSettings settings= SSEUIPlugin.getDefault().getDialogSettings().getSection(DIALOG_SECTION);
+		if (settings == null)
+			settings = SSEUIPlugin.getDefault().getDialogSettings().addNewSection(DIALOG_SECTION);
+
+		return settings;
+	}
+
+	private void gotoSelectedElement() {
+		Object element = getSelectedElement();
+		dispose();
+		ITextEditor editor = getActiveTextEditor();
+		if (editor != null) {
+			editor.selectAndReveal(((IndexedRegion) element).getStartOffset(), ((IndexedRegion) element).getEndOffset() - ((IndexedRegion) element).getStartOffset());
+		}
+	}
+
+	private ITextEditor getActiveTextEditor() {
+		IWorkbench wb = PlatformUI.getWorkbench();
+		ITextEditor editor = null;
+		if (wb != null) {
+			IWorkbenchWindow ww = wb.getActiveWorkbenchWindow();
+			IWorkbenchPage page = ww.getActivePage();
+			if (page != null) {
+				IEditorPart part = page.getActiveEditor();
+				if (part instanceof ITextEditor)
+					editor = (ITextEditor) part;
+				else
+					editor = part != null ? (ITextEditor) part.getAdapter(ITextEditor.class) : null;
+			}
+		}
+		return editor;
+	}
+
+	private Object getSelectedElement() {
+		if (fTreeViewer == null)
+			return null;
+
+		return ((IStructuredSelection) fTreeViewer.getSelection()).getFirstElement();
+	}
+
+	private void addListeners(final Tree tree) {
+		tree.addKeyListener(new KeyListener() {
+			public void keyPressed(KeyEvent e)  {
+				if (e.character == 0x1B) // ESC
+					dispose();
+			}
+			public void keyReleased(KeyEvent e) {
+				// do nothing
+			}
+		});
+
+		tree.addSelectionListener(new SelectionListener() {
+			public void widgetSelected(SelectionEvent e) {
+				// do nothing
+			}
+			public void widgetDefaultSelected(SelectionEvent e) {
+				gotoSelectedElement();
+			}
+		});
+
+		/* Mouse hover */
+		tree.addMouseMoveListener(new MouseMoveListener()	 {
+			TreeItem fLastItem= null;
+			public void mouseMove(MouseEvent e) {
+				if (tree.equals(e.getSource())) {
+					Object o= tree.getItem(new Point(e.x, e.y));
+					if (o instanceof TreeItem) {
+						Rectangle clientArea = tree.getClientArea();
+						if (!o.equals(fLastItem)) {
+							fLastItem= (TreeItem)o;
+							tree.setSelection(new TreeItem[] { fLastItem });
+						} else if (e.y - clientArea.y < tree.getItemHeight() / 4) {
+							// Scroll up
+							Point p= tree.toDisplay(e.x, e.y);
+							Item item= fTreeViewer.scrollUp(p.x, p.y);
+							if (item instanceof TreeItem) {
+								fLastItem= (TreeItem)item;
+								tree.setSelection(new TreeItem[] { fLastItem });
+							}
+						} else if (clientArea.y + clientArea.height - e.y < tree.getItemHeight() / 4) {
+							// Scroll down
+							Point p= tree.toDisplay(e.x, e.y);
+							Item item= fTreeViewer.scrollDown(p.x, p.y);
+							if (item instanceof TreeItem) {
+								fLastItem= (TreeItem)item;
+								tree.setSelection(new TreeItem[] { fLastItem });
+							}
+						}
+					}
+				}
+			}
+		});
+
+		tree.addMouseListener(new MouseAdapter() {
+			public void mouseUp(MouseEvent e) {
+
+				if (tree.getSelectionCount() < 1)
+					return;
+
+				if (e.button != 1)
+					return;
+
+				if (tree.equals(e.getSource())) {
+					Object o= tree.getItem(new Point(e.x, e.y));
+					TreeItem selection= tree.getSelection()[0];
+					if (selection.equals(o))
+						gotoSelectedElement();
+				}
+			}
+		});
+	}
+	public void addDisposeListener(DisposeListener listener) {
+		getShell().addDisposeListener(listener);
+	}
+
+	public void addFocusListener(FocusListener listener) {
+		getShell().addFocusListener(listener);
+	}
+
+	public Point computeSizeHint() {
+		return getShell().getSize();
+	}
+
+	public void dispose() {
+		close();
+	}
+
+	public boolean isFocusControl() {
+		return getShell().getDisplay().getActiveShell() == getShell();
+	}
+
+	public void removeDisposeListener(DisposeListener listener) {
+		getShell().removeDisposeListener(listener);
+	}
+
+	public void removeFocusListener(FocusListener listener) {
+		getShell().removeFocusListener(listener);
+	}
+
+	public void setBackgroundColor(Color background) {
+		applyBackgroundColor(background, getContents());
+	}
+
+	public void setFocus() {
+		getShell().forceFocus();
+		fFilterText.setFocus();
+	}
+
+	public void setForegroundColor(Color foreground) {
+		applyForegroundColor(foreground, getContents());
+	}
+
+	public void setInformation(String information) {
+		// nothing to do
+	}
+
+	public void setLocation(Point location) {
+		/*
+		 * If the location is persisted, it gets managed by PopupDialog - fine. Otherwise, the location is
+		 * computed in Window#getInitialLocation, which will center it in the parent shell / main
+		 * monitor, which is wrong for two reasons:
+		 * - we want to center over the editor / subject control, not the parent shell
+		 * - the center is computed via the initalSize, which may be also wrong since the size may
+		 *   have been updated since via min/max sizing of AbstractInformationControlManager.
+		 * In that case, override the location with the one computed by the manager. Note that
+		 * the call to constrainShellSize in PopupDialog.open will still ensure that the shell is
+		 * entirely visible.
+		 */
+		if (!getPersistLocation() || getDialogSettings() == null)
+			getShell().setLocation(location);
+	}
+
+	public void setSize(int width, int height) {
+		getShell().setSize(width, height);
+	}
+
+	public void setSizeConstraints(int maxWidth, int maxHeight) {
+	}
+
+	public void setVisible(boolean visible) {
+		if (visible) {
+			open();
+		} else {
+			saveDialogBounds(getShell());
+			getShell().setVisible(false);
+		}
+	}
+
+	public boolean hasContents() {
+		return fTreeViewer != null && fTreeViewer.getInput() != null;
+	}
+
+	public void setInput(Object input) {
+		if (!(input instanceof ISelection)) {
+			fTreeViewer.setSelection(new StructuredSelection(input));
+		}
+		else {
+			if (fSelectionProvider != null) {
+				ISelection selection = fSelectionProvider.getSelection(fTreeViewer, (ISelection) input);
+				fTreeViewer.setSelection(selection);
+			}
+			else {
+				fTreeViewer.setSelection((ISelection) input);
+			}
+		}
+	}
+
+	public void widgetDisposed(DisposeEvent e) {
+		fTreeViewer = null;
+		fFilterText = null;
+		fModel = null;
+	}
+
+	protected void fillDialogMenu(IMenuManager dialogMenu) {
+		// Add custom actions
+		super.fillDialogMenu(dialogMenu);
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/StringPatternFilter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/StringPatternFilter.java
new file mode 100644
index 0000000..86c19f2
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/StringPatternFilter.java
@@ -0,0 +1,508 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.quickoutline;
+
+import java.util.Vector;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.osgi.util.TextProcessor;
+
+/**
+ * Default Viewer Filter to be used by the {@link QuickOutlinePopupDialog}
+ * <p>
+ * Based on {@link org.eclipse.jdt.internal.ui.text.AbstractInformationControl.NamePatternFilter}
+ * </p>
+ */
+public class StringPatternFilter extends ViewerFilter {
+
+	private StringMatcher fStringMatcher;
+
+	/*
+	 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	public boolean select(Viewer viewer, Object parentElement, Object element) {
+		StringMatcher matcher = fStringMatcher;
+		if (matcher == null || !(viewer instanceof TreeViewer))
+			return true;
+		TreeViewer treeViewer = (TreeViewer) viewer;
+
+		String matchName = ((ILabelProvider) treeViewer.getLabelProvider()).getText(element);
+		matchName = TextProcessor.deprocess(matchName);
+		if (matchName != null && matcher.match(matchName))
+			return true;
+
+		return hasUnfilteredChild(treeViewer, element);
+	}
+
+	private boolean hasUnfilteredChild(TreeViewer viewer, Object element) {
+		Object[] children=  ((ITreeContentProvider) viewer.getContentProvider()).getChildren(element);
+		for (int i= 0; i < children.length; i++)
+			if (select(viewer, element, children[i]))
+				return true;
+		return false;
+	}
+
+	public void updatePattern(String pattern) {
+		if (pattern.length() == 0) {
+			fStringMatcher = null;
+		}
+		else {
+			fStringMatcher = new StringMatcher(pattern, pattern.toLowerCase().equals(pattern), false);
+		}
+		
+	}
+
+	public StringMatcher getStringMatcher() {
+		return fStringMatcher;
+	}
+
+	/**
+	 * String matcher based on {@link org.eclipse.ui.internal.misc.StringMatcher}
+	 */
+	static class StringMatcher {
+		protected String fPattern;
+
+	    protected int fLength; // pattern length
+
+	    protected boolean fIgnoreWildCards;
+
+	    protected boolean fIgnoreCase;
+
+	    protected boolean fHasLeadingStar;
+
+	    protected boolean fHasTrailingStar;
+
+	    protected String fSegments[]; //the given pattern is split into * separated segments
+
+	    /* boundary value beyond which we don't need to search in the text */
+	    protected int fBound = 0;
+
+	    protected static final char fSingleWildCard = '\u0000';
+
+	    public static class Position {
+	        int start; //inclusive
+
+	        int end; //exclusive
+
+	        public Position(int start, int end) {
+	            this.start = start;
+	            this.end = end;
+	        }
+
+	        public int getStart() {
+	            return start;
+	        }
+
+	        public int getEnd() {
+	            return end;
+	        }
+	    }
+
+	    /**
+	     * StringMatcher constructor takes in a String object that is a simple 
+	     * pattern which may contain '*' for 0 and many characters and
+	     * '?' for exactly one character.  
+	     *
+	     * Literal '*' and '?' characters must be escaped in the pattern 
+	     * e.g., "\*" means literal "*", etc.
+	     *
+	     * Escaping any other character (including the escape character itself), 
+	     * just results in that character in the pattern.
+	     * e.g., "\a" means "a" and "\\" means "\"
+	     *
+	     * If invoking the StringMatcher with string literals in Java, don't forget
+	     * escape characters are represented by "\\".
+	     *
+	     * @param pattern the pattern to match text against
+	     * @param ignoreCase if true, case is ignored
+	     * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
+	     * 		  (everything is taken literally).
+	     */
+	    public StringMatcher(String pattern, boolean ignoreCase,
+	            boolean ignoreWildCards) {
+	        if (pattern == null) {
+				throw new IllegalArgumentException();
+			}
+	        fIgnoreCase = ignoreCase;
+	        fIgnoreWildCards = ignoreWildCards;
+	        fPattern = pattern;
+	        fLength = pattern.length();
+
+	        if (fIgnoreWildCards) {
+	            parseNoWildCards();
+	        } else {
+	            parseWildCards();
+	        }
+	    }
+
+	    /**
+	     * Find the first occurrence of the pattern between <code>start</code)(inclusive) 
+	     * and <code>end</code>(exclusive).  
+	     * @param text the String object to search in 
+	     * @param start the starting index of the search range, inclusive
+	     * @param end the ending index of the search range, exclusive
+	     * @return an <code>StringMatcher.Position</code> object that keeps the starting 
+	     * (inclusive) and ending positions (exclusive) of the first occurrence of the 
+	     * pattern in the specified range of the text; return null if not found or subtext
+	     * is empty (start==end). A pair of zeros is returned if pattern is empty string
+	     * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
+	     * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
+	     */
+	    public StringMatcher.Position find(String text, int start, int end) {
+	        if (text == null) {
+				throw new IllegalArgumentException();
+			}
+
+	        int tlen = text.length();
+	        if (start < 0) {
+				start = 0;
+			}
+	        if (end > tlen) {
+				end = tlen;
+			}
+	        if (end < 0 || start >= end) {
+				return null;
+			}
+	        if (fLength == 0) {
+				return new Position(start, start);
+			}
+	        if (fIgnoreWildCards) {
+	            int x = posIn(text, start, end);
+	            if (x < 0) {
+					return null;
+				}
+	            return new Position(x, x + fLength);
+	        }
+
+	        int segCount = fSegments.length;
+	        if (segCount == 0) {
+				return new Position(start, end);
+			}
+
+	        int curPos = start;
+	        int matchStart = -1;
+	        int i;
+	        for (i = 0; i < segCount && curPos < end; ++i) {
+	            String current = fSegments[i];
+	            int nextMatch = regExpPosIn(text, curPos, end, current);
+	            if (nextMatch < 0) {
+					return null;
+				}
+	            if (i == 0) {
+					matchStart = nextMatch;
+				}
+	            curPos = nextMatch + current.length();
+	        }
+	        if (i < segCount) {
+				return null;
+			}
+	        return new Position(matchStart, curPos);
+	    }
+
+	    /**
+	     * match the given <code>text</code> with the pattern 
+	     * @return true if matched otherwise false
+	     * @param text a String object 
+	     */
+	    public boolean match(String text) {
+	    	if(text == null) {
+				return false;
+			}
+	        return match(text, 0, text.length());
+	    }
+
+	    /**
+	     * Given the starting (inclusive) and the ending (exclusive) positions in the   
+	     * <code>text</code>, determine if the given substring matches with aPattern  
+	     * @return true if the specified portion of the text matches the pattern
+	     * @param text a String object that contains the substring to match 
+	     * @param start marks the starting position (inclusive) of the substring
+	     * @param end marks the ending index (exclusive) of the substring 
+	     */
+	    public boolean match(String text, int start, int end) {
+	        if (null == text) {
+				throw new IllegalArgumentException();
+			}
+
+	        if (start > end) {
+				return false;
+			}
+
+	        if (fIgnoreWildCards) {
+				return (end - start == fLength)
+	                    && fPattern.regionMatches(fIgnoreCase, 0, text, start,
+	                            fLength);
+			}
+	        int segCount = fSegments.length;
+	        if (segCount == 0 && (fHasLeadingStar || fHasTrailingStar)) {
+				return true;
+			}
+	        if (start == end) {
+				return fLength == 0;
+			}
+	        if (fLength == 0) {
+				return start == end;
+			}
+
+	        int tlen = text.length();
+	        if (start < 0) {
+				start = 0;
+			}
+	        if (end > tlen) {
+				end = tlen;
+			}
+
+	        int tCurPos = start;
+	        int bound = end - fBound;
+	        if (bound < 0) {
+				return false;
+			}
+	        int i = 0;
+	        String current = fSegments[i];
+	        int segLength = current.length();
+
+	        /* process first segment */
+	        if (!fHasLeadingStar) {
+	            if (!regExpRegionMatches(text, start, current, 0, segLength)) {
+	                return false;
+	            } else {
+	                ++i;
+	                tCurPos = tCurPos + segLength;
+	            }
+	        }
+	        if ((fSegments.length == 1) && (!fHasLeadingStar)
+	                && (!fHasTrailingStar)) {
+	            // only one segment to match, no wildcards specified
+	            return tCurPos == end;
+	        }
+	        /* process middle segments */
+	        while (i < segCount) {
+	            current = fSegments[i];
+	            int currentMatch;
+	            int k = current.indexOf(fSingleWildCard);
+	            if (k < 0) {
+	                currentMatch = textPosIn(text, tCurPos, end, current);
+	                if (currentMatch < 0) {
+						return false;
+					}
+	            } else {
+	                currentMatch = regExpPosIn(text, tCurPos, end, current);
+	                if (currentMatch < 0) {
+						return false;
+					}
+	            }
+	            tCurPos = currentMatch + current.length();
+	            i++;
+	        }
+
+	        /* process final segment */
+	        if (!fHasTrailingStar && tCurPos != end) {
+	            int clen = current.length();
+	            return regExpRegionMatches(text, end - clen, current, 0, clen);
+	        }
+	        return i == segCount;
+	    }
+
+	    /**
+	     * This method parses the given pattern into segments seperated by wildcard '*' characters.
+	     * Since wildcards are not being used in this case, the pattern consists of a single segment.
+	     */
+	    private void parseNoWildCards() {
+	        fSegments = new String[1];
+	        fSegments[0] = fPattern;
+	        fBound = fLength;
+	    }
+
+	    /**
+	     * Parses the given pattern into segments seperated by wildcard '*' characters.
+	     * @param p, a String object that is a simple regular expression with '*' and/or '?'
+	     */
+	    private void parseWildCards() {
+	        if (fPattern.startsWith("*")) { //$NON-NLS-1$
+				fHasLeadingStar = true;
+			}
+	        if (fPattern.endsWith("*")) {//$NON-NLS-1$
+	            /* make sure it's not an escaped wildcard */
+	            if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {
+	                fHasTrailingStar = true;
+	            }
+	        }
+
+	        Vector temp = new Vector();
+
+	        int pos = 0;
+	        StringBuffer buf = new StringBuffer();
+	        while (pos < fLength) {
+	            char c = fPattern.charAt(pos++);
+	            switch (c) {
+	            case '\\':
+	                if (pos >= fLength) {
+	                    buf.append(c);
+	                } else {
+	                    char next = fPattern.charAt(pos++);
+	                    /* if it's an escape sequence */
+	                    if (next == '*' || next == '?' || next == '\\') {
+	                        buf.append(next);
+	                    } else {
+	                        /* not an escape sequence, just insert literally */
+	                        buf.append(c);
+	                        buf.append(next);
+	                    }
+	                }
+	                break;
+	            case '*':
+	                if (buf.length() > 0) {
+	                    /* new segment */
+	                    temp.addElement(buf.toString());
+	                    fBound += buf.length();
+	                    buf.setLength(0);
+	                }
+	                break;
+	            case '?':
+	                /* append special character representing single match wildcard */
+	                buf.append(fSingleWildCard);
+	                break;
+	            default:
+	                buf.append(c);
+	            }
+	        }
+
+	        /* add last buffer to segment list */
+	        if (buf.length() > 0) {
+	            temp.addElement(buf.toString());
+	            fBound += buf.length();
+	        }
+
+	        fSegments = new String[temp.size()];
+	        temp.copyInto(fSegments);
+	    }
+
+	    /** 
+	     * @param text a string which contains no wildcard
+	     * @param start the starting index in the text for search, inclusive
+	     * @param end the stopping point of search, exclusive
+	     * @return the starting index in the text of the pattern , or -1 if not found 
+	     */
+	    protected int posIn(String text, int start, int end) {//no wild card in pattern
+	        int max = end - fLength;
+
+	        if (!fIgnoreCase) {
+	            int i = text.indexOf(fPattern, start);
+	            if (i == -1 || i > max) {
+					return -1;
+				}
+	            return i;
+	        }
+
+	        for (int i = start; i <= max; ++i) {
+	            if (text.regionMatches(true, i, fPattern, 0, fLength)) {
+					return i;
+				}
+	        }
+
+	        return -1;
+	    }
+
+	    /** 
+	     * @param text a simple regular expression that may only contain '?'(s)
+	     * @param start the starting index in the text for search, inclusive
+	     * @param end the stopping point of search, exclusive
+	     * @param p a simple regular expression that may contains '?'
+	     * @return the starting index in the text of the pattern , or -1 if not found 
+	     */
+	    protected int regExpPosIn(String text, int start, int end, String p) {
+	        int plen = p.length();
+
+	        int max = end - plen;
+	        for (int i = start; i <= max; ++i) {
+	            if (regExpRegionMatches(text, i, p, 0, plen)) {
+					return i;
+				}
+	        }
+	        return -1;
+	    }
+
+	    /**
+	     * 
+	     * @return boolean
+	     * @param text a String to match
+	     * @param start int that indicates the starting index of match, inclusive
+	     * @param end</code> int that indicates the ending index of match, exclusive
+	     * @param p String,  String, a simple regular expression that may contain '?'
+	     * @param ignoreCase boolean indicating wether code>p</code> is case sensitive
+	     */
+	    protected boolean regExpRegionMatches(String text, int tStart, String p,
+	            int pStart, int plen) {
+	        while (plen-- > 0) {
+	            char tchar = text.charAt(tStart++);
+	            char pchar = p.charAt(pStart++);
+
+	            /* process wild cards */
+	            if (!fIgnoreWildCards) {
+	                /* skip single wild cards */
+	                if (pchar == fSingleWildCard) {
+	                    continue;
+	                }
+	            }
+	            if (pchar == tchar) {
+					continue;
+				}
+	            if (fIgnoreCase) {
+	                if (Character.toUpperCase(tchar) == Character
+	                        .toUpperCase(pchar)) {
+						continue;
+					}
+	                // comparing after converting to upper case doesn't handle all cases;
+	                // also compare after converting to lower case
+	                if (Character.toLowerCase(tchar) == Character
+	                        .toLowerCase(pchar)) {
+						continue;
+					}
+	            }
+	            return false;
+	        }
+	        return true;
+	    }
+
+	    /** 
+	     * @param text the string to match
+	     * @param start the starting index in the text for search, inclusive
+	     * @param end the stopping point of search, exclusive
+	     * @param p a pattern string that has no wildcard
+	     * @return the starting index in the text of the pattern , or -1 if not found 
+	     */
+	    protected int textPosIn(String text, int start, int end, String p) {
+
+	        int plen = p.length();
+	        int max = end - plen;
+
+	        if (!fIgnoreCase) {
+	            int i = text.indexOf(p, start);
+	            if (i == -1 || i > max) {
+					return -1;
+				}
+	            return i;
+	        }
+
+	        for (int i = start; i <= max; ++i) {
+	            if (text.regionMatches(true, i, p, 0, plen)) {
+					return i;
+				}
+	        }
+
+	        return -1;
+	    }
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/AbstractStructuredTextReconcilingStrategy.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/AbstractStructuredTextReconcilingStrategy.java
new file mode 100644
index 0000000..d5cc519
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/AbstractStructuredTextReconcilingStrategy.java
@@ -0,0 +1,543 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcileResult;
+import org.eclipse.jface.text.reconciler.IReconcileStep;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModelExtension;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.wst.sse.ui.internal.IReleasable;
+import org.eclipse.wst.sse.ui.internal.ITemporaryAnnotation;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.StructuredMarkerAnnotation;
+
+
+/**
+ * A base ReconcilingStrategy. Subclasses must implement
+ * createReconcileSteps(). This class should not know about
+ * IStructuredDocument, only IDocument.
+ * 
+ * @author pavery
+ */
+public abstract class AbstractStructuredTextReconcilingStrategy implements IReconcilingStrategy, IReconcilingStrategyExtension, IReleasable {
+
+	/** debug flag */
+	protected static final boolean DEBUG;
+	static {
+		String value = Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/reconcilerjob"); //$NON-NLS-1$
+		DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
+	}
+
+	// these limits are safetys for "runaway" validation cases
+	// should be used to safeguard potentially dangerous loops or potentially
+	// long annotations
+	// (since the painter seems to affect performance when painting long
+	// annotations)
+	public static final int ANNOTATION_LENGTH_LIMIT = 25;
+	public static final int ELEMENT_ERROR_LIMIT = 25;
+
+	private IDocument fDocument = null;
+	private IProgressMonitor fProgressMonitor = null;
+	private ISourceViewer fSourceViewer = null;
+
+	// list of "validator" annotations
+	// for gray/un-gray capability
+	private HashSet fMarkerAnnotations = null;
+
+	/**
+	 * Creates a new strategy. The source viewer must be set manually
+	 * after creation before a reconciler using this constructor will work.
+	 */
+	public AbstractStructuredTextReconcilingStrategy() {
+		init();
+	}
+
+	/**
+	 * Creates a new strategy.
+	 * 
+	 * @param editor
+	 */
+	public AbstractStructuredTextReconcilingStrategy(ISourceViewer sourceViewer) {
+		fSourceViewer = sourceViewer;
+		init();
+	}
+
+	/**
+	 * This is where we add results to the annotationModel, doing any special
+	 * "extra" processing.
+	 */
+	protected void addResultToAnnotationModel(IReconcileResult result) {
+		if (!(result instanceof TemporaryAnnotation))
+			return;
+		// can be null when closing the editor
+		if (getAnnotationModel() != null) {
+			TemporaryAnnotation tempAnnotation = (TemporaryAnnotation) result;
+
+			StructuredMarkerAnnotation sma = getCorrespondingMarkerAnnotation(tempAnnotation);
+			if (sma != null) {
+				// un-gray out the marker annotation
+				sma.setGrayed(false);
+			}
+
+			getAnnotationModel().addAnnotation(tempAnnotation, tempAnnotation.getPosition());
+		}
+	}
+
+	/**
+	 * @param object
+	 * @return if this strategy is responisble for adding this type of key
+	 */
+	protected boolean canHandlePartition(String partition) {
+		// String[] haystack = getPartitionTypes();
+		// for (int i = 0; i < haystack.length; i++) {
+		// if (haystack[i].equals(partition))
+		// return true;
+		// }
+		// return false;
+		return false;
+	}
+
+	// /**
+	// * @param step
+	// * @return
+	// */
+	// protected boolean containsStep(IReconcileStep step) {
+	// if (fFirstStep instanceof StructuredReconcileStep)
+	// return ((StructuredReconcileStep) fFirstStep).isSiblingStep(step);
+	// return false;
+	// }
+
+	/**
+	 * This is where you should create the steps for this strategy
+	 */
+	abstract public void createReconcileSteps();
+
+	/**
+	 * Remove ALL temporary annotations that this strategy can handle.
+	 */
+	protected TemporaryAnnotation[] getAllAnnotationsToRemove() {
+		List removals = new ArrayList();
+		IAnnotationModel annotationModel = getAnnotationModel();
+		if (annotationModel != null) {
+			Iterator i = annotationModel.getAnnotationIterator();
+			while (i.hasNext()) {
+				Object obj = i.next();
+				if (!(obj instanceof ITemporaryAnnotation))
+					continue;
+
+				ITemporaryAnnotation annotation = (ITemporaryAnnotation) obj;
+				ReconcileAnnotationKey key = (ReconcileAnnotationKey) annotation.getKey();
+				// then if this strategy knows how to add/remove this
+				// partition type
+				if (canHandlePartition(key.getPartitionType()) /*
+																 * &&
+																 * containsStep(key.getStep())
+																 */)
+					removals.add(annotation);
+			}
+		}
+		return (TemporaryAnnotation[]) removals.toArray(new TemporaryAnnotation[removals.size()]);
+	}
+
+	protected IAnnotationModel getAnnotationModel() {
+		IAnnotationModel model = null;
+		if (fSourceViewer != null) {
+			model = fSourceViewer.getAnnotationModel();
+		}
+		return model;
+	}
+
+	protected TemporaryAnnotation[] getAnnotationsToRemove(DirtyRegion dr, List stepsRun) {
+
+		List remove = new ArrayList();
+		IAnnotationModel annotationModel = getAnnotationModel();
+		// can be null when closing the editor
+		if (getAnnotationModel() != null) {
+
+			// clear validator annotations
+			getMarkerAnnotations().clear();
+
+			Iterator i = annotationModel.getAnnotationIterator();
+			while (i.hasNext()) {
+
+				Object obj = i.next();
+
+				// check if it's a validator marker annotation
+				// if it is save it for comparision later (to "gray" icons)
+				if (obj instanceof StructuredMarkerAnnotation) {
+					StructuredMarkerAnnotation sma = (StructuredMarkerAnnotation) obj;
+
+					if (sma.getAnnotationType() == TemporaryAnnotation.ANNOT_ERROR || sma.getAnnotationType() == TemporaryAnnotation.ANNOT_WARNING)
+						fMarkerAnnotations.add(sma);
+				}
+
+				if (!(obj instanceof TemporaryAnnotation))
+					continue;
+
+				TemporaryAnnotation annotation = (TemporaryAnnotation) obj;
+				ReconcileAnnotationKey key = (ReconcileAnnotationKey) annotation.getKey();
+
+				// then if this strategy knows how to add/remove this
+				// partition type
+				if (canHandlePartition(key.getPartitionType()) && stepsRun.contains(key.getStep())) {
+					if (key.getScope() == ReconcileAnnotationKey.PARTIAL && annotation.getPosition().overlapsWith(dr.getOffset(), dr.getLength())) {
+						remove.add(annotation);
+					}
+					else if (key.getScope() == ReconcileAnnotationKey.TOTAL) {
+						remove.add(annotation);
+					}
+				}
+			}
+		}
+		return (TemporaryAnnotation[]) remove.toArray(new TemporaryAnnotation[remove.size()]);
+	}
+
+
+	protected abstract boolean containsStep(IReconcileStep step);
+
+	/**
+	 * Gets partition types from all steps in this strategy.
+	 * 
+	 * @return parition types from all steps
+	 */
+	// public String[] getPartitionTypes() {
+	// if (fFirstStep instanceof StructuredReconcileStep)
+	// return ((StructuredReconcileStep) fFirstStep).getPartitionTypes();
+	// return new String[0];
+	// }
+	public void init() {
+		createReconcileSteps();
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension#initialReconcile()
+	 */
+	public void initialReconcile() {
+		// do nothing
+	}
+
+	/**
+	 * @return
+	 */
+	protected boolean isCanceled() {
+		if (DEBUG && (fProgressMonitor != null && fProgressMonitor.isCanceled()))
+			System.out.println("** STRATEGY CANCELED **:" + this.getClass().getName()); //$NON-NLS-1$
+		return fProgressMonitor != null && fProgressMonitor.isCanceled();
+	}
+
+	/**
+	 * Process the results from the reconcile steps in this strategy.
+	 * 
+	 * @param results
+	 */
+	private void process(final IReconcileResult[] results) {
+		if (DEBUG)
+			System.out.println("[trace reconciler] > STARTING PROCESS METHOD with (" + results.length + ") results"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		if (results == null)
+			return;
+
+		for (int i = 0; i < results.length && i < ELEMENT_ERROR_LIMIT && !isCanceled(); i++) {
+
+			if (isCanceled()) {
+				if (DEBUG)
+					System.out.println("[trace reconciler] >** PROCESS (adding) WAS CANCELLED **"); //$NON-NLS-1$
+				return;
+			}
+			addResultToAnnotationModel(results[i]);
+		}
+
+		if (DEBUG) {
+			StringBuffer traceString = new StringBuffer();
+			for (int j = 0; j < results.length; j++)
+				traceString.append("\n (+) :" + results[j] + ":\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			System.out.println("[trace reconciler] > PROCESSING (" + results.length + ") results in AbstractStructuredTextReconcilingStrategy " + traceString); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.reconciler.DirtyRegion,
+	 *      org.eclipse.jface.text.IRegion)
+	 */
+	public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+		// not used
+		// we only have validator strategy now
+
+		// // external files may be null
+		// if (isCanceled() || fFirstStep == null)
+		// return;
+		//
+		// TemporaryAnnotation[] annotationsToRemove = new
+		// TemporaryAnnotation[0];
+		// IReconcileResult[] annotationsToAdd = new IReconcileResult[0];
+		// StructuredReconcileStep structuredStep = (StructuredReconcileStep)
+		// fFirstStep;
+		//        
+		// annotationsToRemove = getAnnotationsToRemove(dirtyRegion);
+		// annotationsToAdd = structuredStep.reconcile(dirtyRegion,
+		// subRegion);
+		//        
+		// smartProcess(annotationsToRemove, annotationsToAdd);
+	}
+
+	/**
+	 * @param partition
+	 * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.IRegion)
+	 */
+	public void reconcile(IRegion partition) {
+		// not used, we use:
+		// reconcile(DirtyRegion dirtyRegion, IRegion subRegion)
+	}
+
+	/**
+	 * Calls release() on all the steps in this strategy. Currently done in
+	 * StructuredRegionProcessor.SourceWidgetDisposeListener#widgetDisposed(...)
+	 */
+	public void release() {
+		// release steps (each step calls release on the next)
+		// if (fFirstStep != null && fFirstStep instanceof IReleasable)
+		// ((IReleasable) fFirstStep).release();
+		// we don't to null out the steps, in case
+		// it's reconfigured later
+	}
+
+	private void removeAnnotations(TemporaryAnnotation[] annotationsToRemove) {
+
+		IAnnotationModel annotationModel = getAnnotationModel();
+		// can be null when closing the editor
+		if (annotationModel != null) {
+			for (int i = 0; i < annotationsToRemove.length; i++) {
+				if (isCanceled()) {
+					if (DEBUG)
+						System.out.println("[trace reconciler] >** REMOVAL WAS CANCELLED **"); //$NON-NLS-1$
+					return;
+				}
+				StructuredMarkerAnnotation sma = getCorrespondingMarkerAnnotation(annotationsToRemove[i]);
+				if (sma != null) {
+					// gray out the marker annotation
+					sma.setGrayed(true);
+				}
+				// remove the temp one
+				annotationModel.removeAnnotation(annotationsToRemove[i]);
+
+			}
+		}
+
+		if (DEBUG) {
+			StringBuffer traceString = new StringBuffer();
+			for (int i = 0; i < annotationsToRemove.length; i++)
+				traceString.append("\n (-) :" + annotationsToRemove[i] + ":\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			System.out.println("[trace reconciler] > REMOVED (" + annotationsToRemove.length + ") annotations in AbstractStructuredTextReconcilingStrategy :" + traceString); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+
+	private StructuredMarkerAnnotation getCorrespondingMarkerAnnotation(TemporaryAnnotation tempAnnotation) {
+
+		Iterator it = getMarkerAnnotations().iterator();
+		while (it.hasNext()) {
+			StructuredMarkerAnnotation markerAnnotation = (StructuredMarkerAnnotation) it.next();
+			String message = ""; //$NON-NLS-1$
+			try {
+				message = (String) markerAnnotation.getMarker().getAttribute(IMarker.MESSAGE);
+			}
+			catch (CoreException e) {
+				if (DEBUG)
+					Logger.logException(e);
+			}
+			// it would be nice to check line number here...
+			if (message != null && message.equals(tempAnnotation.getText()))
+				return markerAnnotation;
+		}
+		return null;
+	}
+
+	private void removeAllAnnotations() {
+		removeAnnotations(getAllAnnotationsToRemove());
+	}
+
+	/**
+	 * The user needs to manually set the viewer if the default
+	 * constructor was used. 
+	 *
+	 * @param viewer
+	 */
+	public void setViewer(SourceViewer viewer) {
+		fSourceViewer = viewer;
+	}
+
+	/**
+	 * Set the document for this strategy.
+	 * 
+	 * @param document
+	 * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#setDocument(org.eclipse.jface.text.IDocument)
+	 */
+	public void setDocument(IDocument document) {
+
+		// remove all old annotations since it's a new document
+		removeAllAnnotations();
+
+		if (document == null)
+			release();
+
+		// if (getFirstStep() != null)
+		// getFirstStep().setInputModel(new DocumentAdapter(document));
+
+		fDocument = document;
+	}
+
+	public IDocument getDocument() {
+		return fDocument;
+	}
+
+	/**
+	 * @param monitor
+	 * @see org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension#setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void setProgressMonitor(IProgressMonitor monitor) {
+		// fProgressMonitor = monitor;
+		// if (fFirstStep != null)
+		// fFirstStep.setProgressMonitor(fProgressMonitor);
+	}
+
+	/**
+	 * Check if the annotation is already there, if it is, no need to remove
+	 * or add again. This will avoid a lot of "flickering" behavior.
+	 * 
+	 * @param annotationsToRemove
+	 * @param annotationsToAdd
+	 */
+	protected void smartProcess(TemporaryAnnotation[] annotationsToRemove, IReconcileResult[] annotationsToAdd) {
+//		Comparator comp = getTemporaryAnnotationComparator();
+//		List sortedRemovals = Arrays.asList(annotationsToRemove);
+//		Collections.sort(sortedRemovals, comp);
+//
+//		List sortedAdditions = Arrays.asList(annotationsToAdd);
+//		Collections.sort(sortedAdditions, comp);
+//
+//		List filteredRemovals = new ArrayList(sortedRemovals);
+//		List filteredAdditions = new ArrayList(sortedAdditions);
+//
+//		boolean ignore = false;
+//		int lastFoundAdded = 0;
+//		for (int i = 0; i < sortedRemovals.size(); i++) {
+//			TemporaryAnnotation removal = (TemporaryAnnotation) sortedRemovals.get(i);
+//			for (int j = lastFoundAdded; j < sortedAdditions.size(); j++) {
+//				TemporaryAnnotation addition = (TemporaryAnnotation) sortedAdditions.get(j);
+//				// quick position check here
+//				if (removal.getPosition().equals(addition.getPosition())) {
+//					lastFoundAdded = j;
+//					// remove performs TemporaryAnnotation.equals()
+//					// which checks text as well
+//					filteredAdditions.remove(addition);
+//					ignore = true;
+//					if (DEBUG)
+//						System.out.println(" ~ smart process ignoring: " + removal.getPosition().getOffset()); //$NON-NLS-1$
+//					break;
+//				}
+//			}
+//			if (ignore) {
+//				filteredRemovals.remove(removal);
+//			}
+//			ignore = false;
+//		}
+		if (getAnnotationModel() instanceof IAnnotationModelExtension) {
+//			TemporaryAnnotation[] filteredRemovalArray = (TemporaryAnnotation[]) filteredRemovals.toArray(new TemporaryAnnotation[filteredRemovals.size()]);
+//			// apply "grey"-ness
+//			for (int i = 0; i < filteredRemovalArray.length; i++) {
+//				if (isCanceled()) {
+//					if (DEBUG)
+//						System.out.println("[trace reconciler] >** replacing WAS CANCELLED **"); //$NON-NLS-1$
+//					return;
+//				}
+//				StructuredMarkerAnnotation sma = getCorrespondingMarkerAnnotation(filteredRemovalArray[i]);
+//				if (sma != null) {
+//					// gray out the marker annotation
+//					sma.setGrayed(true);
+//				}
+//			}
+//			Map annotationsToAddMap = new HashMap();
+//			for (int i = 0; i < filteredAdditions.size(); i++) {
+//				TemporaryAnnotation temporaryAnnotation = (TemporaryAnnotation) filteredAdditions.get(i);
+//				annotationsToAddMap.put(temporaryAnnotation, temporaryAnnotation.getPosition());
+//			}
+//			if (isCanceled()) {
+//				if (DEBUG)
+//					System.out.println("[trace reconciler] >** PROCESS (replacing) WAS CANCELLED **"); //$NON-NLS-1$
+//				return;
+//			}
+//			/*
+//			 * Using the extension means we can't enforce the
+//			 * ELEMENT_ERROR_LIMIT limit.
+//			 */
+//			((IAnnotationModelExtension) getAnnotationModel()).replaceAnnotations(filteredRemovalArray, annotationsToAddMap);
+
+			Map annotationsToAddMap = new HashMap();
+			for (int i = 0; i < annotationsToAdd.length; i++) {
+				TemporaryAnnotation temporaryAnnotation = (TemporaryAnnotation) annotationsToAdd[i];
+				annotationsToAddMap.put(temporaryAnnotation, temporaryAnnotation.getPosition());
+			}
+			if (isCanceled()) {
+				if (DEBUG)
+					System.out.println("[trace reconciler] >** PROCESS (replacing) WAS CANCELLED **"); //$NON-NLS-1$
+				return;
+			}
+			((IAnnotationModelExtension) getAnnotationModel()).replaceAnnotations(annotationsToRemove, annotationsToAddMap);
+		}
+		else {
+//			removeAnnotations((TemporaryAnnotation[]) filteredRemovals.toArray(new TemporaryAnnotation[filteredRemovals.size()]));
+//			process((IReconcileResult[]) filteredAdditions.toArray(new IReconcileResult[filteredAdditions.size()]));
+			removeAnnotations(annotationsToRemove);
+			process(annotationsToAdd);
+		}
+	}
+
+//	private Comparator getTemporaryAnnotationComparator() {
+//		if (fComparator == null) {
+//			fComparator = new Comparator() {
+//				public int compare(Object arg0, Object arg1) {
+//					TemporaryAnnotation ta1 = (TemporaryAnnotation) arg0;
+//					TemporaryAnnotation ta2 = (TemporaryAnnotation) arg1;
+//					int result = ta1.getPosition().getOffset() - ta2.getPosition().getOffset();
+//					if(result != 0)
+//						return result;
+//					return Collator.getInstance().compare(ta1.getText(), ta2.getText());
+//				}
+//			};
+//		}
+//		return fComparator;
+//	}
+
+	public HashSet getMarkerAnnotations() {
+		if (fMarkerAnnotations == null)
+			fMarkerAnnotations = new HashSet();
+		return fMarkerAnnotations;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java
new file mode 100644
index 0000000..5649fd6
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java
@@ -0,0 +1,814 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.DocumentRewriteSessionEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentExtension3;
+import org.eclipse.jface.text.IDocumentExtension4;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.IDocumentRewriteSessionListener;
+import org.eclipse.jface.text.ITextInputListener;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.reconciler.IReconcilerExtension;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+
+/**
+ * This Job holds a queue of updates from the editor (DirtyRegions) to
+ * process. When a new request comes in, the current run is canceled, the new
+ * request is added to the queue, then the job is re-scheduled.
+ * 
+ * @author pavery
+ */
+public class DirtyRegionProcessor extends Job implements IReconciler, IReconcilerExtension, IConfigurableReconciler {
+	class DocumentListener implements IDocumentListener {
+		public void documentAboutToBeChanged(DocumentEvent event) {
+			/*
+			 * if in rewrite session and already going to reprocess entire
+			 * document after rewrite session, do nothing
+			 */
+			if (isInRewriteSession() && fReprocessAfterRewrite)
+				return;
+			// save partition type (to see if it changes in documentChanged())
+			fLastPartitions = getPartitionRegions(event.getOffset(), event.getLength());
+		}
+
+		public void documentChanged(DocumentEvent event) {
+			/*
+			 * if in rewrite session and already going to reprocess entire
+			 * document after rewrite session, do nothing
+			 */
+			if (isInRewriteSession() && fReprocessAfterRewrite)
+				return;
+
+			if (partitionsChanged(event)) {
+				// pa_TODO
+				// this is a simple way to ensure old
+				// annotations are removed when partition changes
+
+				// it might be a performance hit though
+				setEntireDocumentDirty(getDocument());
+			}
+			else {
+				/*
+				 * Note that creating DirtyRegions *now* means that the wrong
+				 * text may be included
+				 */
+				DirtyRegion dr = null;
+				if (event.getLength() == 0) {
+					/*
+					 * It's an insert-- we use text length though so that the
+					 * new region gets validated...
+					 */
+					dr = createDirtyRegion(event.getOffset(), 0, DirtyRegion.INSERT);
+				}
+				else {
+					if ("".equals(event.getText())) { //$NON-NLS-1$
+						// it's a delete
+						dr = createDirtyRegion(event.getOffset(), event.getLength(), DirtyRegion.REMOVE);
+					}
+					else {
+						// it's a replace
+						dr = createDirtyRegion(event.getOffset(), event.getLength(), DirtyRegion.INSERT);
+					}
+				}
+				if (isInRewriteSession()) {
+					/*
+					 * while in rewrite session, found a dirty region, so flag
+					 * that entire document needs to be reprocesed after
+					 * rewrite session
+					 */
+					if (!fReprocessAfterRewrite && (dr != null)) {
+						fReprocessAfterRewrite = true;
+					}
+				}
+				else {
+					processDirtyRegion(dr);
+				}
+			}
+		}
+
+		/**
+		 * Checks previous partitions from the span of the event w/ the new
+		 * partitions from the span of the event. If partitions changed,
+		 * return true, else return false
+		 * 
+		 * @param event
+		 * @return
+		 */
+		private boolean partitionsChanged(DocumentEvent event) {
+			boolean changed = false;
+			int length = event.getLength();
+
+			if (event.getLength() == 0 && event.getText().length() > 0) {
+				// it's an insert, we want partitions of the new text
+				length = event.getText().length();
+			}
+
+			ITypedRegion[] newPartitions = getPartitionRegions(event.getOffset(), length);
+			if (fLastPartitions != null) {
+				if (fLastPartitions.length != newPartitions.length) {
+					changed = true;
+				}
+				else {
+					for (int i = 0; i < fLastPartitions.length; i++) {
+						if (!fLastPartitions[i].getType().equals(newPartitions[i].getType())) {
+							changed = true;
+							break;
+						}
+					}
+				}
+			}
+			return changed;
+		}
+
+
+	}
+
+	/**
+	 * Reconciles the entire document when the document in the viewer is
+	 * changed. This happens when the document is initially opened, as well as
+	 * after a save-as.
+	 * 
+	 * Also see processPostModelEvent(...) for similar behavior when document
+	 * for the model is changed.
+	 */
+	class TextInputListener implements ITextInputListener {
+		public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
+			// do nothing
+		}
+
+		public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
+			handleInputDocumentChanged(oldInput, newInput);
+		}
+	}
+
+	class DocumentRewriteSessionListener implements IDocumentRewriteSessionListener {
+		long time0 = 0;
+
+		public void documentRewriteSessionChanged(DocumentRewriteSessionEvent event) {
+			boolean oldValue = fInRewriteSession;
+			fInRewriteSession = event != null && event.getChangeType().equals(DocumentRewriteSessionEvent.SESSION_START);
+
+			if (event.getChangeType().equals(DocumentRewriteSessionEvent.SESSION_START)) {
+				if (DEBUG) {
+					time0 = System.currentTimeMillis();
+				}
+				// bug 235446 - source validation annotations lost after rewrite session
+				if (!getDirtyRegionQueue().isEmpty()) {
+					flushDirtyRegionQueue();
+					fReprocessAfterRewrite = true;	
+				} else {
+					fReprocessAfterRewrite = false;
+				}
+			}
+			else if (event.getChangeType().equals(DocumentRewriteSessionEvent.SESSION_STOP)) {
+				if (fInRewriteSession ^ oldValue && fDocument != null) {
+					if (DEBUG) {
+						Logger.log(Logger.INFO, "Rewrite session lasted " + (System.currentTimeMillis() - time0) + "ms");
+						time0 = System.currentTimeMillis();
+					}
+					if (fReprocessAfterRewrite) {
+						DirtyRegion entireDocument = createDirtyRegion(0, fDocument.getLength(), DirtyRegion.INSERT);
+						processDirtyRegion(entireDocument);
+					}
+					if (DEBUG) {
+						Logger.log(Logger.INFO, "Full document reprocess took " + (System.currentTimeMillis() - time0) + "ms");
+					}
+					fReprocessAfterRewrite = false;
+				}
+			}
+		}
+	}
+
+	/** debug flag */
+	protected static final boolean DEBUG;
+	private static final long UPDATE_DELAY = 500;
+
+	static {
+		String value = Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/reconcilerjob"); //$NON-NLS-1$
+		DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
+	}
+
+	private long fDelay;
+
+
+	/** local queue of dirty regions (created here) to be reconciled */
+	private List fDirtyRegionQueue = Collections.synchronizedList(new ArrayList());
+
+	/** document that this reconciler works on */
+	private IDocument fDocument = null;
+
+	private IDocumentListener fDocumentListener = new DocumentListener();
+	private IDocumentRewriteSessionListener fDocumentRewriteSessionListener = new DocumentRewriteSessionListener();
+
+	/**
+	 * set true after first install to prevent duplicate work done in the
+	 * install method (since install gets called multiple times)
+	 */
+	private boolean fIsInstalled = false;
+
+	/**
+	 * so we can tell if a partition changed after the last edit
+	 */
+	ITypedRegion[] fLastPartitions;
+
+	List fNonIncrementalStrategiesAlreadyProcessed = new ArrayList(1);
+
+	/**
+	 * The partitioning this reconciler uses.
+	 */
+	private String fPartitioning;
+
+	Map fReconcilingStrategies = null;
+
+	/** for initial reconcile when document is opened */
+	private TextInputListener fTextInputListener = null;
+	/** the text viewer */
+	private ITextViewer fViewer;
+	boolean fInRewriteSession = false;
+	/**
+	 * true if entire document needs to be reprocessed after rewrite session
+	 */
+	boolean fReprocessAfterRewrite = false;
+
+	/** The job should be reset because of document changes */
+	private boolean fReset = false;
+	private boolean fIsCanceled = false;
+	private boolean fHasReconciled = false;
+	private Object LOCK = new Object();
+
+	/**
+	 * Creates a new StructuredRegionProcessor
+	 */
+	public DirtyRegionProcessor() {
+		// init job stuff
+		super(SSEUIMessages.proc_dirty_regions_0); //$NON-NLS-1$
+		setPriority(Job.LONG);
+		setSystem(true);
+
+		// init reconciler stuff
+		setDelay(UPDATE_DELAY);
+		fReconcilingStrategies = new HashMap();
+	}
+
+	/**
+	 * Adds the given resource to the set of resources that need refreshing.
+	 * Synchronized in order to protect the collection during add.
+	 * 
+	 * @param resource
+	 */
+	private synchronized void addRequest(DirtyRegion newDirtyRegion) {
+		// NOTE: This method is called a lot so make sure it's fast
+		List dirtyRegionQueue = getDirtyRegionQueue();
+		synchronized (dirtyRegionQueue) {
+			for (Iterator it = dirtyRegionQueue.iterator(); it.hasNext();) {
+				// go through list of existing dirty regions and check if any
+				// dirty regions need to be discarded
+				DirtyRegion currentExisting = (DirtyRegion) it.next();
+				DirtyRegion outer = getOuterRegion(currentExisting, newDirtyRegion);
+				// if we already have a request which contains the new request,
+				// discard the new request
+				if (outer == currentExisting)
+					return;
+				// if new request contains any existing requests,
+				// remove those
+				if (outer == newDirtyRegion)
+					it.remove();
+			}
+			dirtyRegionQueue.add(newDirtyRegion);
+		}
+	}
+
+	/**
+	 * Notifies subclasses that processing of multiple dirty regions has begun
+	 */
+	protected void beginProcessing() {
+		// do nothing by default
+	}
+
+	/**
+	 * @param dirtyRegion
+	 * @return
+	 */
+	protected ITypedRegion[] computePartitioning(DirtyRegion dirtyRegion) {
+		int drOffset = dirtyRegion.getOffset();
+		int drLength = dirtyRegion.getLength();
+
+		return computePartitioning(drOffset, drLength);
+	}
+
+	protected ITypedRegion[] computePartitioning(int drOffset, int drLength) {
+		ITypedRegion[] tr = new ITypedRegion[0];
+		IDocument doc = getDocument();
+		if (doc != null){
+			int docLength = doc.getLength();
+	
+			if (drOffset > docLength) {
+				drOffset = docLength;
+				drLength = 0;
+			}
+			else if (drOffset + drLength > docLength) {
+				drLength = docLength - drOffset;
+			}
+	
+			try {
+				// dirty region may span multiple partitions
+				tr = TextUtilities.computePartitioning(doc, getDocumentPartitioning(), drOffset, drLength, true);
+			}
+			catch (BadLocationException e) {
+				String info = "dr: [" + drOffset + ":" + drLength + "] doc: [" + docLength + "] "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				Logger.logException(info, e);
+				tr = new ITypedRegion[0];
+			}
+		}
+		return tr;
+	}
+
+	/**
+	 * Used to determine if one dirty region contains the other and if so,
+	 * which is the one that contains it.
+	 * 
+	 * @param root
+	 * @param possible
+	 * @return the outer dirty region if it contains the other dirty region,
+	 *         null otherwise
+	 */
+	protected DirtyRegion getOuterRegion(DirtyRegion root, DirtyRegion possible) {
+		DirtyRegion outer = null;
+		if (isContained(root, possible))
+			outer = root;
+		else if (isContained(possible, root))
+			outer = possible;
+		return outer;
+	}
+
+	/**
+	 * Used to determine of a "possible" dirty region can be discarded in
+	 * favor of using just the "root" dirty region.
+	 * 
+	 * @return if the root dirty region contains possible, return true,
+	 *         otherwise return false
+	 */
+	private boolean isContained(DirtyRegion root, DirtyRegion possible) {
+		int rootStart = root.getOffset();
+		int rootEnd = rootStart + root.getLength();
+		int possStart = possible.getOffset();
+		int possEnd = possStart + possible.getLength();
+		if (rootStart <= possStart && rootEnd >= possEnd)
+			return true;
+		return false;
+	}
+
+	protected DirtyRegion createDirtyRegion(int offset, int length, String type) {
+		DirtyRegion durty = null;
+		IDocument doc = getDocument();
+
+		if (doc != null) {
+			// safety for BLE
+			int docLen = doc.getLength();
+			if (offset > docLen) {
+				offset = docLen;
+				length = 0;
+			}
+			else if (offset + length >= docLen)
+				length = docLen - offset;
+			try {
+				durty = new DirtyRegion(offset, length, type, doc.get(offset, length));
+			}
+			catch (BadLocationException e) {
+				String info = "dr: [" + offset + ":" + length + "] doc: [" + docLen + "] "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				Logger.logException(info, e);
+			}
+		}
+		return durty;
+	}
+
+	protected DirtyRegion createDirtyRegion(ITypedRegion tr, String type) {
+		return createDirtyRegion(tr.getOffset(), tr.getLength(), type);
+	}
+
+	protected void flushDirtyRegionQueue() {
+		fDirtyRegionQueue.clear();
+	}
+
+	/**
+	 * Notifies subclasses that processing of multiple dirty regions has
+	 * ended, for now
+	 */
+	protected void endProcessing() {
+		// do nothing by default
+	}
+
+	/**
+	 * Delay between processing of DirtyRegions.
+	 * 
+	 * @return
+	 */
+	long getDelay() {
+		return fDelay;
+	}
+
+	List getDirtyRegionQueue() {
+		return fDirtyRegionQueue;
+	}
+
+	/**
+	 * The IDocument on which this reconciler operates
+	 * 
+	 * @return
+	 */
+	protected IDocument getDocument() {
+		return fDocument;
+	}
+
+	public String getDocumentPartitioning() {
+		if (fPartitioning == null)
+			return IDocumentExtension3.DEFAULT_PARTITIONING;
+		return fPartitioning;
+	}
+
+	protected String[] getPartitions(int drOffset, int drLength) {
+
+		ITypedRegion[] regions = new ITypedRegion[0];
+		int docLength = getDocument().getLength();
+
+		if (drOffset > docLength) {
+			drOffset = docLength;
+			drLength = 0;
+		}
+		else if (drOffset + drLength > docLength) {
+			drLength = docLength - drOffset;
+		}
+
+		try {
+			regions = TextUtilities.computePartitioning(getDocument(), getDocumentPartitioning(), drOffset, drLength, true);
+		}
+		catch (BadLocationException e) {
+			Logger.logException(e);
+			regions = new ITypedRegion[0];
+		}
+		String[] partitions = new String[regions.length];
+		for (int i = 0; i < regions.length; i++)
+			partitions[i] = regions[i].getType();
+		return partitions;
+	}
+
+	ITypedRegion[] getPartitionRegions(int drOffset, int drLength) {
+		ITypedRegion[] regions = new ITypedRegion[0];
+		int docLength = getDocument().getLength();
+
+		if (drOffset > docLength) {
+			drOffset = docLength;
+			drLength = 0;
+		}
+		else if (drOffset + drLength > docLength) {
+			drLength = docLength - drOffset;
+		}
+
+		try {
+			regions = TextUtilities.computePartitioning(getDocument(), getDocumentPartitioning(), drOffset, drLength, true);
+		}
+		catch (BadLocationException e) {
+			Logger.logException(e);
+			regions = new ITypedRegion[0];
+		}
+		return regions;
+	}
+		
+		
+	/**
+	 * Returns the reconciling strategy registered with the reconciler for the
+	 * specified partition type.
+	 * 
+	 * @param partitionType
+	 *            the partition type for which to determine the reconciling
+	 *            strategy
+	 * 
+	 * @return the reconciling strategy registered for the given partition
+	 *         type, or <code>null</code> if there is no such strategy
+	 * 
+	 * @see org.eclipse.jface.text.reconciler.IReconciler#getReconcilingStrategy(java.lang.String)
+	 */
+	public IReconcilingStrategy getReconcilingStrategy(String partitionType) {
+		if (partitionType == null)
+			return null;
+		return (IReconcilingStrategy) fReconcilingStrategies.get(partitionType);
+	}
+
+	/**
+	 * This method also synchronized because it accesses the fRequests queue
+	 * 
+	 * @return an array of the currently requested Nodes to refresh
+	 */
+	private synchronized DirtyRegion[] getRequests() {
+		DirtyRegion[] toRefresh = (DirtyRegion[]) fDirtyRegionQueue.toArray(new DirtyRegion[fDirtyRegionQueue.size()]);
+		flushDirtyRegionQueue();
+		return toRefresh;
+	}
+
+	/**
+	 * Returns the text viewer this reconciler is installed on.
+	 * 
+	 * @return the text viewer this reconciler is installed on
+	 */
+	protected ITextViewer getTextViewer() {
+		return fViewer;
+	}
+
+	/**
+	 * 
+	 * @param oldInput
+	 * @param newInput
+	 */
+	void handleInputDocumentChanged(IDocument oldInput, IDocument newInput) {
+		// don't bother if reconciler not installed
+		if (isInstalled()) {
+			setDocument(newInput);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.reconciler.IReconciler#install(ITextViewer)
+	 */
+	public void install(ITextViewer textViewer) {
+		// we might be called multiple times with the same viewe.r,
+		// maybe after being uninstalled as well, so track separately
+		if (!isInstalled()) {
+			fViewer = textViewer;
+			fTextInputListener = new TextInputListener();
+			textViewer.addTextInputListener(fTextInputListener);
+			setInstalled(true);
+		}
+	}
+
+	/**
+	 * The viewer has been set on this Reconciler.
+	 * 
+	 * @return true if the viewer has been set on this Reconciler, false
+	 *         otherwise.
+	 */
+	public boolean isInstalled() {
+		return fIsInstalled;
+	}
+
+	boolean isInRewriteSession() {
+		return fInRewriteSession;
+	}
+
+	/**
+	 * Subclasses should implement for specific handling of dirty regions. The
+	 * method is invoked for each dirty region in the Job's queue.
+	 * 
+	 * @param dirtyRegion
+	 */
+	protected void process(DirtyRegion dirtyRegion) {
+		if (!isInstalled() || isInRewriteSession() || dirtyRegion == null || getDocument() == null) {
+			return;
+		}
+		/*
+		 * Break the dirty region into a sequence of partitions and find the
+		 * corresponding strategy to reconcile those partitions. If a strategy
+		 * implements INonIncrementalReconcilingStrategy, only call it once
+		 * regardless of the number and types of partitions.
+		 */
+		ITypedRegion[] partitions = computePartitioning(dirtyRegion);
+		for (int i = 0; i < partitions.length; i++) {
+			IReconcilingStrategy strategy = getReconcilingStrategy(partitions[i].getType());
+			if (strategy != null) {
+				strategy.reconcile(partitions[i]);
+			}
+		}
+	}
+
+	/**
+	 * Invoke dirty region processing.
+	 * 
+	 * @param node
+	 */
+	public final void processDirtyRegion(DirtyRegion dr) {
+		if (dr == null || !isInstalled())
+			return;
+
+		addRequest(dr);
+		synchronized (LOCK) {
+			fReset = true;
+		}
+
+		if (DEBUG) {
+			System.out.println("added request for: [" + dr.getText() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
+			System.out.println("queue size is now: " + getDirtyRegionQueue().size()); //$NON-NLS-1$
+		}
+	}
+
+	protected IStatus run(IProgressMonitor monitor) {
+		IStatus status = Status.OK_STATUS;
+		if (!PlatformUI.isWorkbenchRunning())
+			return status;
+
+		if (!fHasReconciled) {
+			initialReconcile();
+			fHasReconciled = true;
+		}
+
+		Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
+		boolean processed = false;
+		try {
+			synchronized (LOCK) {
+				if (fReset) {
+					fReset = false;
+					return status;
+				}
+			}
+			if (fIsCanceled)
+				return status;
+
+			DirtyRegion[] toRefresh = getRequests();
+			if (toRefresh.length > 0) {
+				processed = true;
+				beginProcessing();
+			}
+
+			for (int i = 0; i < toRefresh.length && fDocument != null; i++) {
+				if (monitor.isCanceled())
+					throw new OperationCanceledException();
+				process(toRefresh[i]);
+			}
+		}
+		catch (Exception e) {
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=103676
+			// stop errors from popping up a dialog
+			// from the job manager
+
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=106052
+			// don't log OperationCanceledException
+			if (!(e instanceof OperationCanceledException))
+				Logger.logException("problem with reconciling", e); //$NON-NLS-1$
+		}
+		finally {
+			if (processed)
+				endProcessing();
+			if (!fIsCanceled)
+				schedule(getDelay());
+
+			monitor.done();
+		}
+		return status;
+	}
+
+	public void setDelay(long delay) {
+		fDelay = delay;
+	}
+
+	public void setDocument(IDocument doc) {
+		if (fDocument != null) {
+			// unhook old document listener
+			fDocument.removeDocumentListener(fDocumentListener);
+			if (fDocument instanceof IDocumentExtension4) {
+				((IDocumentExtension4) fDocument).removeDocumentRewriteSessionListener(fDocumentRewriteSessionListener);
+			}
+		}
+
+		fDocument = doc;
+
+		if (fDocument != null) {
+			if (fDocument instanceof IDocumentExtension4) {
+				((IDocumentExtension4) fDocument).addDocumentRewriteSessionListener(fDocumentRewriteSessionListener);
+			}
+			// hook up new document listener
+			fDocument.addDocumentListener(fDocumentListener);
+
+			setEntireDocumentDirty(doc);
+		}
+	}
+
+	/**
+	 * This method is called before the initial reconciling of the document. 
+	 */
+	protected void initialReconcile() {
+	}
+
+	/**
+	 * Sets the document partitioning for this reconciler.
+	 * 
+	 * @param partitioning
+	 *            the document partitioning for this reconciler
+	 */
+	public void setDocumentPartitioning(String partitioning) {
+		fPartitioning = partitioning;
+	}
+
+	/**
+	 * Forces reconciling of the entire document.
+	 */
+	protected void forceReconciling() {
+		if (!fHasReconciled)
+			return;
+
+		setEntireDocumentDirty(getDocument());
+	}
+
+	/**
+	 * Basically means process the entire document.
+	 * 
+	 * @param document
+	 */
+	protected void setEntireDocumentDirty(IDocument document) {
+
+		// make the entire document dirty
+		// this also happens on a "save as"
+		if (document != null && isInstalled()) {
+
+			// since we're marking the entire doc dirty
+			flushDirtyRegionQueue();
+
+			/**
+			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=199053
+			 * 
+			 * Process the strategies for the last known-good partitions to
+			 * ensure all problem annotations are cleared if needed.
+			 */
+			if (fLastPartitions != null && document.getLength() == 0) {
+				for (int i = 0; i < fLastPartitions.length; i++) {
+					IReconcilingStrategy strategy = getReconcilingStrategy(fLastPartitions[i].getType());
+					if (strategy != null) {
+						strategy.reconcile(fLastPartitions[i]);
+					}
+				}
+			}
+			else {
+				DirtyRegion entireDocument = createDirtyRegion(0, document.getLength(), DirtyRegion.INSERT);
+				processDirtyRegion(entireDocument);
+			}
+			schedule(getDelay());
+		}
+	}
+
+	/**
+	 * @param isInstalled
+	 *            The isInstalled to set.
+	 */
+	void setInstalled(boolean isInstalled) {
+		fIsInstalled = isInstalled;
+	}
+
+	public void setReconcilingStrategy(String partitionType, IReconcilingStrategy strategy) {
+		if (partitionType == null) {
+			throw new IllegalArgumentException();
+		}
+
+		if (strategy == null) {
+			fReconcilingStrategies.remove(partitionType);
+		}
+		else {
+			fReconcilingStrategies.put(partitionType, strategy);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.reconciler.IReconciler#uninstall()
+	 */
+	public void uninstall() {
+		if (isInstalled()) {
+			// removes widget listener
+			getTextViewer().removeTextInputListener(fTextInputListener);
+			setInstalled(false);
+			cancel();
+			fIsCanceled = true;
+		}
+		fDirtyRegionQueue.clear();
+		setDocument(null);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentAdapter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentAdapter.java
new file mode 100644
index 0000000..d255746
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentAdapter.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.reconciler.IReconcilableModel;
+
+/**
+ * Adapts an <code>IDocument</code> to a <code>IReconcilableModel</code>.
+ * 
+ */
+public class DocumentAdapter implements IReconcilableModel {
+
+	private IDocument fDocument;
+
+	/**
+	 * Creates a text model adapter for the given document.
+	 * 
+	 * @param document
+	 */
+	public DocumentAdapter(IDocument document) {
+		fDocument = document;
+	}
+
+	/**
+	 * Returns this model's document.
+	 * 
+	 * @return the model's input document
+	 */
+	public IDocument getDocument() {
+		return fDocument;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java
new file mode 100644
index 0000000..1567622
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java
@@ -0,0 +1,402 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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
+ *     David Carver (Intalio) - bug 307323 - remove extraneous call to spell check strategy
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+import org.eclipse.wst.sse.ui.internal.IReleasable;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.projection.AbstractStructuredFoldingStrategy;
+import org.eclipse.wst.sse.ui.internal.provisional.preferences.CommonEditorPreferenceNames;
+import org.eclipse.wst.sse.ui.internal.reconcile.validator.ValidatorBuilder;
+import org.eclipse.wst.sse.ui.internal.reconcile.validator.ValidatorMetaData;
+import org.eclipse.wst.sse.ui.internal.reconcile.validator.ValidatorStrategy;
+import org.eclipse.wst.sse.ui.internal.spelling.SpellcheckStrategy;
+import org.eclipse.wst.sse.ui.reconcile.ISourceReconcilingListener;
+
+/**
+ * Adds to DirtyRegionProcessor Job: - IDocumentListener - ValidatorStrategy -
+ * Text viewer(dispose, input changed) listeners. - default, spelling, and
+ * validator strategies - DirtyRegion processing logic.
+ */
+public class DocumentRegionProcessor extends DirtyRegionProcessor {
+	private static final boolean DEBUG_VALIDATORS = Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/reconcilerValidators")); //$NON-NLS-1$
+
+	/**
+	 * A strategy to use the defined default Spelling service.
+	 */
+	private IReconcilingStrategy fSpellcheckStrategy;
+
+	/**
+	 * The strategy that runs validators contributed via
+	 * <code>org.eclipse.wst.sse.ui.extensions.sourcevalidation</code>
+	 * extension point
+	 */
+	private ValidatorStrategy fValidatorStrategy;
+
+	private ISourceReconcilingListener[] fReconcileListeners = new ISourceReconcilingListener[0];
+
+	private IReconcilingStrategy fSemanticHighlightingStrategy;
+	
+	/**
+	 * The folding strategy for this processor
+	 */
+	private AbstractStructuredFoldingStrategy fFoldingStrategy;
+	
+	private final String SSE_UI_ID = "org.eclipse.wst.sse.ui"; //$NON-NLS-1$
+
+	/**
+	 * true if as you type validation is enabled,
+	 * false otherwise
+	 */
+	private boolean fValidationEnabled;
+
+	public void addReconcilingListener(ISourceReconcilingListener listener) {
+		Set listeners = new HashSet(Arrays.asList(fReconcileListeners));
+		listeners.add(listener);
+		fReconcileListeners = (ISourceReconcilingListener[]) listeners.toArray(new ISourceReconcilingListener[listeners.size()]);
+	}
+
+	protected void beginProcessing() {
+		super.beginProcessing();
+		ValidatorStrategy validatorStrategy = getValidatorStrategy();
+		if (validatorStrategy != null) {
+			validatorStrategy.beginProcessing();
+		}
+		if ((getTextViewer() instanceof ISourceViewer)) {
+			for (int i = 0; i < fReconcileListeners.length; i++) {
+				fReconcileListeners[i].aboutToBeReconciled();
+			}
+		}
+	}
+
+	protected void endProcessing() {
+		super.endProcessing();
+		ValidatorStrategy validatorStrategy = getValidatorStrategy();
+		if (validatorStrategy != null) {
+			validatorStrategy.endProcessing();
+		}
+		/* single spell-check for everything to ensure that SpellingProblem offsets are correct */
+		IReconcilingStrategy spellingStrategy = getSpellcheckStrategy();
+		IDocument document = getDocument();
+		if (spellingStrategy != null && document != null) {
+			 spellingStrategy.reconcile(new Region(0, document.getLength()));
+		}
+		
+		IReconcilingStrategy semanticHighlightingStrategy = getSemanticHighlightingStrategy();
+		if (semanticHighlightingStrategy != null && document != null) {
+			semanticHighlightingStrategy.reconcile(new Region(0, document.getLength()));
+		}
+
+		if ((getTextViewer() instanceof ISourceViewer)) {
+			ISourceViewer sourceViewer = (ISourceViewer) getTextViewer();
+			IAnnotationModel annotationModel = sourceViewer.getAnnotationModel();
+			for (int i = 0; i < fReconcileListeners.length; i++) {
+				fReconcileListeners[i].reconciled(document, annotationModel, false, new NullProgressMonitor());
+			}
+		}
+	}
+
+	public void forceReconciling() {
+		super.forceReconciling();
+	}
+
+	protected String getContentType(IDocument doc) {
+		if (doc == null)
+			return null;
+
+		String contentTypeId = null;
+
+		IContentType ct = null;
+		try {
+			IContentDescription desc = Platform.getContentTypeManager().getDescriptionFor(new StringReader(doc.get()), null, IContentDescription.ALL);
+			if (desc != null) {
+				ct = desc.getContentType();
+				if (ct != null)
+					contentTypeId = ct.getId();
+			}
+		}
+		catch (IOException e) {
+			// just bail
+		}
+		return contentTypeId;
+	}
+
+	protected IReconcilingStrategy getSpellcheckStrategy() {
+		if (fSpellcheckStrategy == null && getDocument() != null) {
+			String contentTypeId = getContentType(getDocument());
+			if (contentTypeId == null) {
+				contentTypeId = IContentTypeManager.CT_TEXT;
+			}
+			if (getTextViewer() instanceof ISourceViewer) {
+				ISourceViewer viewer = (ISourceViewer) getTextViewer();
+				fSpellcheckStrategy = new SpellcheckStrategy(viewer, contentTypeId);
+				fSpellcheckStrategy.setDocument(getDocument());
+			}
+		}
+		return fSpellcheckStrategy;
+	}
+	
+	/**
+	 * <p>Get the folding strategy for this processor. Retrieved from the 
+	 * extended configuration builder.  The processor chosen is set by the plugin.</p>
+	 * 
+	 * <p>EX:<br />
+	 * <code>&lt;extension point="org.eclipse.wst.sse.ui.editorConfiguration"&gt;<br />
+	 *  &lt;provisionalConfiguration<br />
+	 *			type="foldingstrategy"<br />
+	 *			class="org.eclipse.wst.xml.ui.internal.projection.XMLFoldingStrategy"<br />
+	 *			target="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource" /&gt;<br />
+	 *	&lt;/extension&gt;</code></p>
+	 * 
+	 * <p>The type must be equal to <code>AbstractFoldingStrategy.ID</code> (AKA: foldingstrategy)
+	 * and the class must extend <code>org.eclipse.wst.sse.ui.internal.projection.AbstractFoldingStrategy</code>
+	 * and the target must be a structured editor content type ID</p>
+	 * 
+	 * @return the requested folding strategy or null if none can be found
+	 */
+	protected IReconcilingStrategy getFoldingStrategy() {
+		if(fFoldingStrategy == null && getDocument() != null) {
+			String contentTypeId = getContentType(getDocument());
+			if (contentTypeId == null) {
+				contentTypeId = IContentTypeManager.CT_TEXT;
+			}
+			
+			ITextViewer viewer = getTextViewer();
+			if(viewer instanceof ProjectionViewer) {
+				ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
+				
+				IContentType type = Platform.getContentTypeManager().getContentType(contentTypeId);
+				while(fFoldingStrategy == null && type != null) {
+					fFoldingStrategy =(AbstractStructuredFoldingStrategy) builder.getConfiguration(
+							AbstractStructuredFoldingStrategy.ID, type.getId());
+				
+					type = type.getBaseType();
+				}
+				
+				if(fFoldingStrategy != null) {
+					fFoldingStrategy.setViewer((ProjectionViewer)viewer);
+					fFoldingStrategy.setDocument(getDocument());
+				}
+			}
+		}
+		
+		return fFoldingStrategy;
+	}
+	
+	/**
+	 * Enable or disable as you type validation. Typically set by a user preference
+	 * 
+	 * @param enable true to enable as you type validation, false to disable
+	 */
+	public void setValidatorStrategyEnabled(boolean enable) {
+		fValidationEnabled = enable;
+	}
+
+	/**
+	 * @return Returns the ValidatorStrategy.
+	 */
+	protected ValidatorStrategy getValidatorStrategy() {
+		ValidatorStrategy validatorStrategy = null;
+		if (fValidatorStrategy == null && fValidationEnabled) {
+			if (getTextViewer() instanceof ISourceViewer) {
+				ISourceViewer viewer = (ISourceViewer) getTextViewer();
+				String contentTypeId = null;
+
+				IDocument doc = viewer.getDocument();
+				contentTypeId = getContentType(doc);
+
+				if (contentTypeId != null) {
+					validatorStrategy = new ValidatorStrategy(viewer, contentTypeId);
+					ValidatorBuilder vBuilder = new ValidatorBuilder();
+					ValidatorMetaData[] vmds = vBuilder.getValidatorMetaData(SSE_UI_ID);
+					List enabledValidators = new ArrayList(1);
+					/* if any "must" handle this content type, just add them */
+					boolean foundSpecificContentTypeValidators = false;
+					for (int i = 0; i < vmds.length; i++) {
+						if (vmds[i].mustHandleContentType(contentTypeId)) {
+							if (DEBUG_VALIDATORS)
+								Logger.log(Logger.INFO, contentTypeId + " using specific validator " + vmds[i].getValidatorId()); //$NON-NLS-1$
+							foundSpecificContentTypeValidators = true;
+							enabledValidators.add(vmds[i]);
+						}
+					}
+					if (!foundSpecificContentTypeValidators) {
+						for (int i = 0; i < vmds.length; i++) {
+							if (vmds[i].canHandleContentType(contentTypeId)) {
+								if (DEBUG_VALIDATORS)
+									Logger.log(Logger.INFO, contentTypeId + " using inherited(?) validator " + vmds[i].getValidatorId()); //$NON-NLS-1$
+								enabledValidators.add(vmds[i]);
+							}
+						}
+					}
+					for (int i = 0; i < enabledValidators.size(); i++) {
+						validatorStrategy.addValidatorMetaData((ValidatorMetaData) enabledValidators.get(i));
+					}
+				}
+			}
+			fValidatorStrategy = validatorStrategy;
+		} else if(fValidatorStrategy != null && fValidationEnabled) {
+			validatorStrategy = fValidatorStrategy;
+		}
+		return validatorStrategy;
+	}
+	
+	public void setSemanticHighlightingStrategy(IReconcilingStrategy semanticHighlightingStrategy) {
+		fSemanticHighlightingStrategy = semanticHighlightingStrategy;
+		fSemanticHighlightingStrategy.setDocument(getDocument());
+	}
+	
+	protected IReconcilingStrategy getSemanticHighlightingStrategy() {
+		return fSemanticHighlightingStrategy;
+	}
+	
+	/**
+	 * @param dirtyRegion
+	 */
+	protected void process(DirtyRegion dirtyRegion) {
+		if (!isInstalled() || isInRewriteSession() || dirtyRegion == null || getDocument() == null)
+			return;
+
+		super.process(dirtyRegion);
+		
+		ITypedRegion[] partitions = computePartitioning(dirtyRegion);
+		
+		// call the validator strategy once for each effected partition
+		DirtyRegion dirty = null;
+		for (int i = 0; i < partitions.length; i++) {
+			dirty = createDirtyRegion(partitions[i], DirtyRegion.INSERT);
+
+			// [source]validator (extension) for this partition
+			if (getValidatorStrategy() != null) {
+				getValidatorStrategy().reconcile(partitions[i], dirty);
+			}
+		}
+		
+		/* if there is a folding strategy then reconcile it for the
+		 * entire dirty region.
+		 * NOTE: the folding strategy does not care about the sub regions.
+		 */
+		if(getFoldingStrategy() != null) {
+			getFoldingStrategy().reconcile(dirtyRegion, null);
+		}
+	}
+	
+	public void removeReconcilingListener(ISourceReconcilingListener listener) {
+		Set listeners = new HashSet(Arrays.asList(fReconcileListeners));
+		listeners.remove(listener);
+		fReconcileListeners = (ISourceReconcilingListener[]) listeners.toArray(new ISourceReconcilingListener[listeners.size()]);
+	}
+
+
+	public void setDocument(IDocument doc) {
+		super.setDocument(doc);
+		
+		IReconcilingStrategy validatorStrategy = getValidatorStrategy();
+		if (validatorStrategy != null) {
+			validatorStrategy.setDocument(doc);
+		}
+		
+		fSpellcheckStrategy = null;
+		if(fFoldingStrategy != null) {
+			fFoldingStrategy.uninstall();
+		}
+		fFoldingStrategy = null;
+	}
+
+	protected void setEntireDocumentDirty(IDocument document) {
+		super.setEntireDocumentDirty(document);
+
+		// make the entire document dirty
+		// this also happens on a "save as"
+		if (document != null && isInstalled() && fLastPartitions != null && document.getLength() == 0) {
+			/**
+			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=199053
+			 * 
+			 * Process the strategies for the last known-good partitions.
+			 */
+			for (int i = 0; i < fLastPartitions.length; i++) {
+				ValidatorStrategy validatorStrategy = getValidatorStrategy();
+				if (validatorStrategy != null) {
+					validatorStrategy.reconcile(fLastPartitions[i], createDirtyRegion(fLastPartitions[i], DirtyRegion.REMOVE));
+				}
+			}
+			IReconcilingStrategy spellingStrategy = getSpellcheckStrategy();
+			if (spellingStrategy != null) {
+				spellingStrategy.reconcile(new Region(0, document.getLength()));
+			}
+			
+			//if there is a folding strategy then reconcile it
+			if(getFoldingStrategy() != null) {
+				getFoldingStrategy().reconcile(new Region(0, document.getLength()));
+			}
+		}
+	}
+
+	/**
+	 * @see org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcessor#install(org.eclipse.jface.text.ITextViewer)
+	 */
+	public void install(ITextViewer textViewer) {
+		super.install(textViewer);
+
+		//determine if validation is enabled
+		this.fValidationEnabled = SSEUIPlugin.getInstance().getPreferenceStore().getBoolean(
+				CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS);
+	}
+	
+	/**
+	 * @see org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcessor#uninstall()
+	 */
+	public void uninstall() {
+		if (isInstalled()) {
+
+			cancel();
+
+			IReconcilingStrategy validatorStrategy = getValidatorStrategy();
+
+			if (validatorStrategy != null) {
+				if (validatorStrategy instanceof IReleasable)
+					((IReleasable) validatorStrategy).release();
+			}
+			
+			if (fSpellcheckStrategy != null) {
+				fSpellcheckStrategy.setDocument(null);
+				fSpellcheckStrategy = null;
+			}
+
+			fReconcileListeners = new ISourceReconcilingListener[0];
+		}
+		super.uninstall();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IConfigurableReconciler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IConfigurableReconciler.java
new file mode 100644
index 0000000..6f8b28f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IConfigurableReconciler.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+
+/**
+ * A reconciler that allows IReconcilingStrategies to be assigned to partition
+ * types. The reconciler will call the registered IReconcilingStrategy when
+ * dirty regions which contain partitions of a specific type need to be
+ * reconciled.
+ * 
+ * @since 1.1
+ */
+public interface IConfigurableReconciler {
+	/**
+	 * Sets the reconciling strategy for the reconciler to use for the
+	 * specified content type.
+	 * 
+	 * @param partitionType
+	 *            the partition type
+	 * @param strategy
+	 *            the reconciling strategy
+	 */
+	void setReconcilingStrategy(String partitionType, IReconcilingStrategy strategy);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IReconcileAnnotationKey.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IReconcileAnnotationKey.java
new file mode 100644
index 0000000..e3b02b2
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IReconcileAnnotationKey.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import org.eclipse.jface.text.reconciler.IReconcileStep;
+
+/**
+ * Defines an annotation key that the
+ * <code>AbstractStructuredTextReconcilingStrategy</code> knows how to
+ * remove appropriately.
+ * 
+ * @deprecated not API, this will probably just become an abstract class
+ * 
+ * @author pavery
+ */
+public interface IReconcileAnnotationKey {
+	static final int PARTIAL = 1;
+	static final int TOTAL = 0;
+
+	String getPartitionType();
+
+	//int getScope();
+
+	IReconcileStep getStep();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IStructuredReconcileStep.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IStructuredReconcileStep.java
new file mode 100644
index 0000000..d51bc99
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IStructuredReconcileStep.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcileResult;
+import org.eclipse.jface.text.reconciler.IReconcileStep;
+
+/**
+ * @author pavery
+ * @deprecated still working out API (or if anything here should be API)
+ * 
+ * Interface for a step in StructuredRegionProcessor framework.
+ */
+public interface IStructuredReconcileStep extends IReconcileStep {
+	/**
+	 * Partitions for which this step can add/remove annotions
+	 * 
+	 * @return an array of the partitions for which this step can add/remove
+	 *         annotions
+	 */
+	String[] getPartitionTypes();
+
+	/**
+	 * Returns the scope for which this step adds annotations.
+	 * 
+	 * @return the scope for which this step adds annotations
+	 */
+	//int getScope();
+
+	/**
+	 * Tells you if the step is equal to this step or any of the sibling
+	 * steps.
+	 * 
+	 * @return
+	 */
+	boolean isSiblingStep(IReconcileStep step);
+
+	/**
+	 * Adds awareness that the Reconciler is reconciling the entire document
+	 * this call.
+	 * 
+	 * @param dirtyRegion
+	 * @param subRegion
+	 * @param refreshAll
+	 * @return
+	 */
+	IReconcileResult[] reconcile(DirtyRegion dirtyRegion, IRegion subRegion, boolean refreshAll);
+
+	/**
+	 * Used to reset the state of the Strategy. For example: any flags that
+	 * need to be reset after a long running operation like processAll().
+	 */
+	void reset();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IStructuredReconcilingStrategy.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IStructuredReconcilingStrategy.java
new file mode 100644
index 0000000..5b02f88
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IStructuredReconcilingStrategy.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+
+
+/**
+ * Interface for structured reconciling strategies.
+ * 
+ * @deprecated doesn't need to be API and might go away
+ * 
+ * @author pavery
+ */
+public interface IStructuredReconcilingStrategy extends IReconcilingStrategy {
+	/**
+	 * Adds awareness that the reconciler is processing the entire document
+	 * via refreshAll flag.
+	 * 
+	 * @param dirtyRegion
+	 * @param subRegion
+	 * @param refreshAll
+	 */
+	public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion, boolean refreshAll);
+
+	/**
+	 * Used to reset the state of the Strategy. For example: any flags that
+	 * need to be reset after a long running operation like processAll().
+	 */
+	public void reset();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/ReconcileAnnotationKey.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/ReconcileAnnotationKey.java
new file mode 100644
index 0000000..e9284a3
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/ReconcileAnnotationKey.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import org.eclipse.jface.text.reconciler.IReconcileStep;
+
+
+/**
+ * Implementation of <code>IReconcileAnnotationKey</code> note: clients
+ * should use the method StructuredReconcileStep#createKey(String
+ * partitionType, int scope)
+ * 
+ * @author pavery
+ */
+public class ReconcileAnnotationKey {
+    
+    public static final int PARTIAL = 1;
+    public static final int TOTAL = 0;
+    
+	private String fPartitionType = null;
+
+	private IReconcileStep fReconcileStep = null;
+	private int fScope;
+
+	public ReconcileAnnotationKey(IReconcileStep step, String partitionType, int scope) {
+		fReconcileStep = step;
+		fPartitionType = partitionType;
+		fScope = scope;
+	}
+
+	public String getPartitionType() {
+		return fPartitionType;
+	}
+
+	public int getScope() {
+		return fScope;
+	}
+
+	public IReconcileStep getStep() {
+		return fReconcileStep;
+	}
+
+	public String toString() {
+		return this.getClass() + "\r\nid: " + fPartitionType; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredReconcileStep.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredReconcileStep.java
new file mode 100644
index 0000000..bd8b0b7
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredReconcileStep.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.reconciler.AbstractReconcileStep;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilableModel;
+import org.eclipse.jface.text.reconciler.IReconcileResult;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning;
+import org.eclipse.wst.sse.core.text.IStructuredPartitions;
+import org.eclipse.wst.sse.ui.internal.IReleasable;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+
+/**
+ * ReconcileStep that knows about the annotation that it adds to the
+ * AnnotationModel. It knows how to create an annotation key (for smart
+ * removal later) It knows the partition types on which it can operate. It
+ * knows the scope on which it operates (for short circuiting) It knows if the
+ * Reconciler is reconciling the entire document.
+ * 
+ * Clients must subclass this class.
+ * 
+ * @author pavery
+ */
+public abstract class StructuredReconcileStep extends AbstractReconcileStep implements IReleasable {
+
+	/** debug flag */
+	protected static final boolean DEBUG;
+	static {
+		String value = Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/reconcilerjob"); //$NON-NLS-1$
+		DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
+	}
+
+	protected final IReconcileResult[] EMPTY_RECONCILE_RESULT_SET = new IReconcileResult[0];
+	
+	/**
+	 * It's possible for a partial step to get called on the same area twice
+	 * (as w/ a full document reconcile) this list keeps track of area already
+	 * covered. Should be reset() after the "batch" of reconciling is
+	 * finished.
+	 */
+	private HashSet fPartitionTypes = null;
+
+	public StructuredReconcileStep() {
+		super();
+		fPartitionTypes = new HashSet();
+	}
+
+	public ReconcileAnnotationKey createKey(IStructuredDocumentRegion sdRegion, int scope) {
+
+		ITypedRegion tr = getPartition(sdRegion);
+		String partitionType = (tr != null) ? tr.getType() : IStructuredPartitions.UNKNOWN_PARTITION;
+		return createKey(partitionType, scope);
+	}
+
+	/**
+	 * @param sdRegion
+	 * @return
+	 */
+	protected ITypedRegion getPartition(IStructuredDocumentRegion sdRegion) {
+		ITypedRegion tr = null;
+		if (!sdRegion.isDeleted())
+			tr = getPartition(sdRegion.getParentDocument(), sdRegion.getStartOffset());
+		return tr;
+	}
+
+	private ITypedRegion getPartition(IDocument doc, int offset) {
+		ITypedRegion tr = null;
+		// not sure why document would ever be null, but put in this 
+		// guard for 
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86069
+		if (doc != null) {
+			try {
+				tr = TextUtilities.getPartition(doc, IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, offset, false);
+			} catch (BadLocationException e) {
+				if (DEBUG)
+					Logger.logException("problem getting partition at: " + offset, e); //$NON-NLS-1$
+			}
+		}
+		return tr;
+	}
+
+	/**
+	 * Clients should use this method to create annotation keys as it
+	 * registers the key for removal later.
+	 * 
+	 * @param partitionType
+	 * @param scope
+	 * @return
+	 */
+	public ReconcileAnnotationKey createKey(String partitionType, int scope) {
+		fPartitionTypes.add(partitionType);
+		return new ReconcileAnnotationKey(this, partitionType, scope);
+	}
+
+	protected IDocument getDocument() {
+		IDocument doc = null;
+		IReconcilableModel rModel = getModel();
+		if (rModel instanceof DocumentAdapter) {
+			doc = ((DocumentAdapter) rModel).getDocument();
+		}
+		return doc;
+	}
+
+	public IReconcilableModel getModel() {
+		return getInputModel();
+	}
+
+	public String getPartitionType(IDocument doc, int offset) {
+		ITypedRegion tr = getPartition(doc, offset);
+		return (tr != null) ? tr.getType() : IStructuredPartitions.UNKNOWN_PARTITION;
+	}
+
+	public String[] getPartitionTypes() {
+		// using hash set to automatically get rid of dupes
+		HashSet tempResults = new HashSet();
+		// add these partition types
+		tempResults.addAll(fPartitionTypes);
+		return (String[]) tempResults.toArray(new String[tempResults.size()]);
+	}
+
+	protected IStructuredDocument getStructuredDocument() {
+		IStructuredDocument sDoc = null;
+		IDocument doc = getDocument();
+		if (doc instanceof IStructuredDocument)
+			sDoc = (IStructuredDocument) getDocument();
+		return sDoc;
+	}
+
+	/**
+	 * Removes duplicates.
+	 * 
+	 * @param results1
+	 * @param results2
+	 * @return
+	 */
+	protected IReconcileResult[] merge(IReconcileResult[] results1, IReconcileResult[] results2) {
+		if (results1 == null)
+			return results2;
+		if (results2 == null)
+			return results1;
+
+		List results = new ArrayList();
+		results.addAll(Arrays.asList(results1));
+		for (int i = 0; i < results2.length; i++) {
+			results.add(results2[i]);
+		}
+		return (IReconcileResult[]) results.toArray(new IReconcileResult[results.size()]);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.reconciler.AbstractReconcileStep#reconcileModel(org.eclipse.jface.text.reconciler.DirtyRegion,
+	 *      org.eclipse.jface.text.IRegion)
+	 */
+	protected IReconcileResult[] reconcileModel(DirtyRegion dirtyRegion, IRegion subRegion) {
+		return EMPTY_RECONCILE_RESULT_SET;
+	}
+
+	/**
+	 * Release resources used by the step here as needed. Be sure to call
+	 * super.release() when you override this method as to propagate the
+	 * release through all steps.
+	 */
+	public void release() {
+		// 
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredRegionProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredRegionProcessor.java
new file mode 100644
index 0000000..7861f66
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredRegionProcessor.java
@@ -0,0 +1,306 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.model.ModelLifecycleEvent;
+import org.eclipse.wst.sse.core.internal.provisional.IModelLifecycleListener;
+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.text.IStructuredDocument;
+
+/**
+ * An IStructuredModel aware Region Processor. Adds ModelLifecycle listener.
+ * ModelLifecycle listener notifies us that some reinitialization needs to
+ * take place.
+ * 
+ * Model aware "process()" Implements a IndexedRegion-based "contains()"
+ * method using IStructuredModel.
+ * 
+ */
+public class StructuredRegionProcessor extends DocumentRegionProcessor {
+
+	class ModelLifecycleListener implements IModelLifecycleListener {
+		IStructuredModel changing = null;
+		/**
+		 * @see org.eclipse.wst.sse.core.internal.provisional.IModelLifecycleListener#processPostModelEvent(org.eclipse.wst.sse.core.internal.model.ModelLifecycleEvent)
+		 */
+		public void processPostModelEvent(ModelLifecycleEvent event) {
+
+			// if underlying StructuredDocument changed, need to reconnect it
+			// here...
+			// ex. file is modified outside the workbench
+			if (event.getType() == ModelLifecycleEvent.MODEL_DOCUMENT_CHANGED) {
+				if (changing != null && event.getModel() == changing) {
+					IStructuredDocument sDoc = event.getModel().getStructuredDocument();
+
+					if (DEBUG) {
+						System.out.println("======================================================"); //$NON-NLS-1$
+						System.out.println("StructuredRegionProcessor: DOCUMENT MODEL CHANGED TO: "); //$NON-NLS-1$
+						System.out.println(sDoc.get());
+						System.out.println("======================================================"); //$NON-NLS-1$
+					}
+					setDocument(sDoc);
+				}
+				changing = null;
+			}
+		}
+
+		/**
+		 * @see org.eclipse.wst.sse.core.internal.provisional.IModelLifecycleListener#processPreModelEvent(org.eclipse.wst.sse.core.internal.model.ModelLifecycleEvent)
+		 */
+		public void processPreModelEvent(ModelLifecycleEvent event) {
+			if(fCurrentDoc != null) {
+				IStructuredModel model = null;
+				try {
+					model = getStructuredModelForRead(fCurrentDoc);
+					if (event.getType() == ModelLifecycleEvent.MODEL_DOCUMENT_CHANGED && event.getModel() == model) {
+						changing = event.getModel();
+						flushDirtyRegionQueue();
+						// note: old annotations are removed via the strategies on
+						// AbstractStructuredTextReconcilingStrategy#setDocument(...)
+					}
+				} finally {
+					if(model != null) {
+						model.releaseFromRead();
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * The life cycle listener used to listen to the current documents model even though
+	 * this class does not hold onto a reference to the model.
+	 */
+	private IModelLifecycleListener fLifeCycleListener = new ModelLifecycleListener();
+	/** Used to get the current model on demand so a model does not need to be held by permanently */
+	private IDocument fCurrentDoc = null;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcessor#getOuterRegion(org.eclipse.jface.text.reconciler.DirtyRegion,
+	 *      org.eclipse.jface.text.reconciler.DirtyRegion)
+	 */
+	protected DirtyRegion getOuterRegion(DirtyRegion root, DirtyRegion possible) {
+		// first try simple region check if one region contains the other
+		DirtyRegion outer = super.getOuterRegion(root, possible);
+		if (outer == null && fCurrentDoc != null) {
+			IStructuredModel sModel = null;
+			try {
+				sModel = getStructuredModelForRead(fCurrentDoc);
+				if (sModel != null) {
+					// now compare nodes
+					IndexedRegion rootRegion = sModel.getIndexedRegion(root.getOffset());
+					IndexedRegion possRegion = sModel.getIndexedRegion(possible.getOffset());
+					if (rootRegion != null && possRegion != null) {
+						int rootStart = rootRegion.getStartOffset();
+						int possStart = possRegion.getStartOffset();
+						// first just check if rootregion starts before
+						// possregion
+						if (rootStart <= possStart) {
+							// check if possregion is inside rootregion
+							outer = _getOuterRegion(root, possible, sModel, rootStart, possStart);
+						}
+						else {
+							// otherwise if rootregion is inside possregion
+							outer = _getOuterRegion(possible, root, sModel, possStart, rootStart);
+						}
+					}
+				}
+				
+			} finally {
+				if(sModel != null) {
+					sModel.releaseFromRead();
+				}
+			}
+		}
+		return outer;
+	}
+
+	/**
+	 * Assumes that when this method is called, region1's node start offset >=
+	 * region2's node start offset. Determines if region1 contains region2 or
+	 * vice versa. Returns region1 if:
+	 * <ul>
+	 * <li>region1's node region == region2's node region</li>
+	 * <li>region1's node region contains region2's node region</li>
+	 * </ul>
+	 * Returns region2 if:
+	 * <ul>
+	 * <li>region1's node region and region2's node region starts at same
+	 * offset but region2's node region is longer</li>
+	 * </ul>
+	 * Returns null otherwise.
+	 * 
+	 * @param region1
+	 * @param region2
+	 * @param sModel
+	 * @param region1NodeStart
+	 * @param region2NodeStart
+	 * @return outer dirty region or null if none exists.
+	 */
+	private DirtyRegion _getOuterRegion(DirtyRegion region1, DirtyRegion region2, IStructuredModel sModel, int region1NodeStart, int region2NodeStart) {
+		DirtyRegion outer = null;
+		int region1NodeEnd = -1;
+		int region2NodeEnd = -1;
+		// then check if region1's end appears after
+		// region2's end
+		IndexedRegion region1EndNode = sModel.getIndexedRegion(region1.getOffset() + region1.getLength());
+		if (region1EndNode == null) {
+			// if no end, just assume region spans all the
+			// way to the end so it includes other region
+			outer = region1;
+		}
+		else {
+			region1NodeEnd = region1EndNode.getEndOffset();
+			IndexedRegion region2EndNode = sModel.getIndexedRegion(region2.getOffset() + region2.getLength());
+			region2NodeEnd = region2EndNode != null ? region2EndNode.getEndOffset() : getDocument().getLength();
+			if (region1NodeEnd >= region2NodeEnd) {
+				// root contains or is equal to possible
+				outer = region1;
+			}
+			else if (region1NodeStart == region2NodeStart && region2NodeEnd >= region1NodeEnd) {
+				// possible contains root because they
+				// both start at same place but possible
+				// is longer
+				outer = region2;
+			}
+		}
+		if (DEBUG) {
+			if (outer != null)
+				System.out.println("checking if [" + region1NodeStart + ":" + region1NodeEnd + "] contains [" + region2NodeStart + ":" + region2NodeEnd + "] ... " + outer.toString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+			else
+				System.out.println("checking if [" + region1NodeStart + ":" + region1NodeEnd + "] contains [" + region2NodeStart + ":" + region2NodeEnd + "] ... NO CONTAIN"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+		}
+		return outer;
+	}
+
+	/**
+	 * We already know content type from when we created the model, so just
+	 * use that.
+	 */
+	protected String getContentType(IDocument doc) {
+		String contentTypeId = null;
+		IStructuredModel sModel = null;
+		try {
+			sModel = getStructuredModelForRead(doc);
+			if (sModel != null) {
+				contentTypeId = sModel.getContentTypeIdentifier();
+			}
+		}
+		finally {
+			if (sModel != null)
+				sModel.releaseFromRead();
+		}
+		return contentTypeId;
+	}
+
+
+	/**
+	 * Remember to release model after use!!
+	 * 
+	 * @return
+	 */
+	private IStructuredModel getStructuredModelForRead(IDocument doc) {
+		IStructuredModel sModel = null;
+		if (doc != null && doc instanceof IStructuredDocument)
+			sModel = StructuredModelManager.getModelManager().getModelForRead((IStructuredDocument) doc);
+		return sModel;
+	}
+
+	protected void process(DirtyRegion dirtyRegion) {
+		if (!isInstalled() || isInRewriteSession() || dirtyRegion == null || getDocument() == null)
+			return;
+
+		// unhook old lifecycle listener
+		if(fCurrentDoc != null) {
+			IStructuredModel sModel = null;
+			try {
+				sModel = getStructuredModelForRead(fCurrentDoc);
+				
+				// use structured model to determine area to process
+				if (sModel != null) {
+					int start = dirtyRegion.getOffset();
+					int end = start + dirtyRegion.getLength();
+					IndexedRegion irStart = sModel.getIndexedRegion(start);
+					IndexedRegion irEnd = sModel.getIndexedRegion(end);
+
+					if (irStart != null) {
+						start = Math.min(start, irStart.getStartOffset());
+					}
+					if (irEnd != null) {
+						end = Math.max(end, irEnd.getEndOffset());
+					}
+					super.process(createDirtyRegion(start, end - start, DirtyRegion.INSERT));
+				} else {
+					super.process(dirtyRegion);
+				}
+			} finally {
+				if(sModel != null) {
+					sModel.releaseFromRead();
+				}
+			}
+		} else {
+			super.process(dirtyRegion);
+		}
+	}
+
+	/**
+	 * Reinitializes listeners and sets new document onall strategies.
+	 * 
+	 * @see org.eclipse.jface.text.reconciler.AbstractReconciler#reconcilerDocumentChanged(IDocument)
+	 */
+	protected void reconcilerDocumentChanged(IDocument newDocument) {
+		setDocument(newDocument);
+	}
+
+	public void setDocument(IDocument newDocument) {
+		// unhook old lifecycle listener
+		if(fCurrentDoc != null) {
+			IStructuredModel oldModel = null;
+			try {
+				oldModel = getStructuredModelForRead(fCurrentDoc);
+				if(oldModel != null) {
+					oldModel.removeModelLifecycleListener(fLifeCycleListener);
+				}
+			} finally {
+				if(oldModel != null) {
+					oldModel.releaseFromRead();
+				}
+			}
+		}
+		
+		//set the new document
+		super.setDocument(newDocument);
+		fCurrentDoc = newDocument;
+		
+		// add new lifecycle listener
+		if (newDocument != null) {
+			IStructuredModel newModel = null;
+			try {
+				newModel = getStructuredModelForRead(newDocument);
+				if(newModel != null) {
+					newModel.addModelLifecycleListener(fLifeCycleListener);
+				}
+			} finally {
+				if(newModel != null) {
+					newModel.releaseFromRead();
+				}
+			}
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredTextReconcilingStrategy.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredTextReconcilingStrategy.java
new file mode 100644
index 0000000..f995d23
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredTextReconcilingStrategy.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+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.text.IStructuredDocumentRegion;
+
+/**
+ * Uses IStructuredModel nodes to check "overlaps()" when getting annotations to remove.
+ */
+public abstract class StructuredTextReconcilingStrategy extends AbstractStructuredTextReconcilingStrategy {
+	
+
+	public StructuredTextReconcilingStrategy(ISourceViewer sourceViewer) {
+		super(sourceViewer);
+	}
+
+	/**
+	 * Checks if this position overlaps any of the StructuredDocument regions'
+	 * correstponding IndexedRegion.
+	 * 
+	 * @param pos
+	 * @param dr
+	 * @return true if the position overlaps any of the regions, otherwise
+	 *         false.
+	 */
+	protected boolean overlaps(Position pos, IStructuredDocumentRegion[] sdRegions) {
+		int start = -1;
+		int end = -1;
+		for (int i = 0; i < sdRegions.length; i++) {
+		    if(!sdRegions[i].isDeleted()) {
+    			IndexedRegion corresponding = getCorrespondingNode(sdRegions[i]);
+                if(corresponding != null) {
+        			if (start == -1 || start > corresponding.getStartOffset())
+        				start = corresponding.getStartOffset();
+        			if (end == -1 || end < corresponding.getEndOffset())
+        				end = corresponding.getEndOffset();
+                }
+            }
+		}
+		return pos.overlapsWith(start, end - start);
+	}
+
+	/**
+	 * Returns the corresponding node for the StructuredDocumentRegion.
+	 * 
+	 * @param sdRegion
+	 * @return the corresponding node for sdRegion
+	 */
+	protected IndexedRegion getCorrespondingNode(IStructuredDocumentRegion sdRegion) {
+		IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
+        IndexedRegion indexedRegion = null;
+        try {
+            if (sModel != null) 
+                indexedRegion = sModel.getIndexedRegion(sdRegion.getStart());    
+        } finally {
+            if (sModel != null)
+                sModel.releaseFromRead();
+        }
+        return indexedRegion;
+    }
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/TemporaryAnnotation.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/TemporaryAnnotation.java
new file mode 100644
index 0000000..4f7ea9b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/TemporaryAnnotation.java
@@ -0,0 +1,258 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile;
+
+import java.util.Map;
+
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.quickassist.IQuickFixableAnnotation;
+import org.eclipse.jface.text.reconciler.IReconcileResult;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationAccessExtension;
+import org.eclipse.jface.text.source.IAnnotationPresentation;
+import org.eclipse.jface.text.source.ImageUtilities;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.texteditor.AnnotationPreference;
+import org.eclipse.ui.texteditor.AnnotationPreferenceLookup;
+import org.eclipse.wst.sse.ui.internal.ITemporaryAnnotation;
+
+
+/**
+ * An implementation of ITemporaryAnnotation @
+ * @author pavery
+ */
+public class TemporaryAnnotation extends Annotation implements ITemporaryAnnotation, IReconcileResult, IAnnotationPresentation, IQuickFixableAnnotation {
+	// remember to change these if it changes in the extension point
+	// may need a different home for them in the future, but they're here for
+	// now
+	public final static String ANNOT_ERROR = "org.eclipse.wst.sse.ui.temp.error"; //$NON-NLS-1$
+	public final static String ANNOT_INFO = "org.eclipse.wst.sse.ui.temp.info"; //$NON-NLS-1$
+
+	// pa_TODO what should the ID be for this?
+	public final static String ANNOT_UNKNOWN = Annotation.TYPE_UNKNOWN;
+	public final static String ANNOT_WARNING = "org.eclipse.wst.sse.ui.temp.warning"; //$NON-NLS-1$
+
+    // copied from CompilationUnitDocumentProvider.ProblemAnnotation
+    //XXX: To be fully correct these constants should be non-static
+
+    private static final int INFO_LAYER;
+
+    private static final int WARNING_LAYER;
+
+    private static final int ERROR_LAYER;
+
+    static {
+        AnnotationPreferenceLookup lookup= EditorsUI.getAnnotationPreferenceLookup();
+        INFO_LAYER= computeLayer("org.eclipse.wst.sse.ui.temp.info", lookup); //$NON-NLS-1$
+        WARNING_LAYER= computeLayer("org.eclipse.wst.sse.ui.temp.warning", lookup); //$NON-NLS-1$
+        ERROR_LAYER= computeLayer("org.eclipse.wst.sse.ui.temp.error", lookup); //$NON-NLS-1$
+    }
+    
+    private static int computeLayer(String annotationType, AnnotationPreferenceLookup lookup) {
+        Annotation annotation= new Annotation(annotationType, false, null);
+        AnnotationPreference preference= lookup.getAnnotationPreference(annotation);
+        if (preference != null)
+            return preference.getPresentationLayer() + 1;
+        else
+            return IAnnotationAccessExtension.DEFAULT_LAYER + 1;
+    }
+    
+    
+	private Object fAdditionalFixInfo = null;
+
+	private Object fKey = null;
+	private Position fPosition = null;
+	private Map fAttributes = null;
+	private boolean fIsQuickFixable = false;
+	private boolean fIsQuickFixableStateSet = false;
+
+	private int fProblemID;
+
+    private int fLayer = DEFAULT_LAYER;
+    
+    private Image fImage = null;
+
+	public TemporaryAnnotation(Position p, String type, String message, ReconcileAnnotationKey key) {
+		super();
+		fPosition = p;
+		setType(type);
+		fKey = key;
+		setText(message);
+        initLayer();
+        initImage();
+	}
+
+	public TemporaryAnnotation(Position p, String type, String message, ReconcileAnnotationKey key, int problemId) {
+		super();
+		fPosition = p;
+		fKey = key;
+		setType(type);
+		setText(message);
+		fProblemID = problemId;
+        initLayer();
+        initImage();
+	}
+
+    private void initLayer() {
+        
+        String type = getType();
+        if(type.equals(ANNOT_ERROR)) {
+            fLayer = ERROR_LAYER;
+        }
+        else if(type.equals(ANNOT_WARNING)) {
+            fLayer = WARNING_LAYER;
+        }
+        else if(type.equals(ANNOT_INFO)) {
+            fLayer = INFO_LAYER;
+        }
+    }
+    
+    private void initImage() {
+        // later we can add support for quick fix images.
+        String type = getType();
+        if(type.equals(ANNOT_ERROR)) {
+            fImage = null;
+        }
+        else if(type.equals(ANNOT_WARNING)) {
+            fImage = null;
+        }
+        else if(type.equals(ANNOT_INFO)) {
+            fImage = null;
+        }
+    }
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		// this check doesn't take into consideration that annotation
+		// positions that change from a text edit before it
+		// we should be checking if the annotation is still on the same line,
+		// and the distance from the start of the line is the same
+		if (obj instanceof TemporaryAnnotation) {
+
+			TemporaryAnnotation ta = (TemporaryAnnotation) obj;
+
+            boolean samePosition = ta.getPosition().equals(this.getPosition());
+            boolean sameText = false;
+
+            if(ta.getText() != null && this.getText() != null && ta.getText().equals(this.getText()))
+                sameText = true;
+            else if(ta.getText( )== null && this.getText() == null)
+                sameText = true;
+            
+			return  sameText && samePosition;
+		}
+		return super.equals(obj);
+	}
+
+	/**
+	 * Additional info required to fix this problem.
+	 * 
+	 * @return an Object that contains additional info on how to fix this
+	 *         problem, or null if there is none
+	 */
+	public Object getAdditionalFixInfo() {
+		return fAdditionalFixInfo;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.ITemporaryAnnotation#getDescription()
+	 */
+	public String getDescription() {
+		return getText();
+	}
+
+	public Object getKey() {
+		return fKey;
+	}
+
+	public Position getPosition() {
+		return fPosition;
+	}
+
+	/**
+	 * @return Returns the problemID.
+	 */
+	public int getProblemID() {
+		return fProblemID;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.source.Annotation#isPersistent()
+	 */
+	public boolean isPersistent() {
+		return false;
+	}
+
+	/**
+	 * Sets additional information useful to fixing this problem.
+	 * 
+	 * @param an
+	 *            Object that contains additional info on how to fix this
+	 *            problem
+	 */
+	public void setAdditionalFixInfo(Object info) {
+		fAdditionalFixInfo = info;
+		setQuickFixable(true);
+	}
+
+    public int getLayer() {
+        return fLayer;
+    }
+    
+    /*
+     * @see Annotation#paint
+     */
+    public void paint(GC gc, Canvas canvas, Rectangle r) {
+        //initializeImages();
+        if (fImage != null)
+            ImageUtilities.drawImage(fImage, gc, canvas, r, SWT.CENTER, SWT.TOP);
+    }
+    
+	public String toString() {
+		return "" + fPosition.getOffset() + ':' + fPosition.getLength() + ": " + getText(); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	public Map getAttributes() {
+		return fAttributes;
+	}
+	
+	public void setAttributes(Map attributes) {
+		fAttributes = attributes;
+	}
+	
+	public boolean isQuickFixable() {
+		return fIsQuickFixable;
+	}
+	
+	public void setQuickFixable(boolean state) {
+		fIsQuickFixable = state;
+		fIsQuickFixableStateSet = true;
+	}
+	
+	public boolean isQuickFixableStateSet() {
+		return fIsQuickFixableStateSet;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/AnnotationInfo.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/AnnotationInfo.java
new file mode 100644
index 0000000..609420e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/AnnotationInfo.java
@@ -0,0 +1,38 @@
+package org.eclipse.wst.sse.ui.internal.reconcile.validator;
+
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * Holds info to create a TemporaryAnnotation.
+ *
+ * @since 1.0
+ */
+public class AnnotationInfo {
+	
+	public static final int NO_PROBLEM_ID = -1;
+	private	IMessage fMessage = null;
+	private Object fAdditionalFixInfo = null;
+	private int fProblemId = NO_PROBLEM_ID;
+	
+	public AnnotationInfo(IMessage message) {
+		fMessage = message;
+		
+	}
+	public AnnotationInfo(IMessage message, int problemId, Object additionalFixInfo) {
+		this(message);
+		fProblemId = problemId;
+		fAdditionalFixInfo = additionalFixInfo;
+	}
+	
+	public final IMessage getMessage() {
+		return fMessage;
+	}
+	
+	public final Object getAdditionalFixInfo() {
+		return fAdditionalFixInfo;
+	}
+	
+	public final int getProblemId() {
+		return fProblemId;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ISourceValidator.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ISourceValidator.java
new file mode 100644
index 0000000..1e09976
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ISourceValidator.java
@@ -0,0 +1,42 @@
+package org.eclipse.wst.sse.ui.internal.reconcile.validator;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+
+/**
+ * Interface to allow for "partial document" as you type validation.
+ *
+ */
+public interface ISourceValidator {
+	
+	/**
+	 * As you type validation is getting "hooked up" to this IDocument.
+	 * This is the instance of IDocument that the validator should
+	 * operate on for each validate call.
+	 * 
+	 * @param document
+	 */
+	void connect(IDocument document);
+	
+	/**
+	 * The same IDocument passed in from the connect() method.
+	 * This indicates that as you type validation is "shutting down"
+	 * for this IDocument.
+	 * 
+	 * @param document
+	 */
+	void disconnect(IDocument document);
+	
+	/**
+	 * Like IValidator#validate(IValidationContext helper, IReporter reporter)
+	 * except passes the dirty region, so document validation can be better
+	 * optimized.
+	 * 
+	 * @param dirtyRegion
+	 * @param helper
+	 * @param reporter
+	 */
+	void validate(IRegion dirtyRegion, IValidationContext helper, IReporter reporter);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/IncrementalHelper.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/IncrementalHelper.java
new file mode 100644
index 0000000..9615163
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/IncrementalHelper.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile.validator;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+
+
+
+public class IncrementalHelper implements IValidationContext {
+	private IProject fProject;
+
+	private String fURI = null;
+	
+	public IncrementalHelper(IDocument sourceDocument, IProject project) {
+		super();
+		fProject = project;
+	}
+
+	public String getPortableName(IResource resource) {
+		return resource.getProjectRelativePath().toString();
+	}
+
+	public IProject getProject() {
+		return fProject;
+	}
+
+	public Object loadModel(String symbolicName) {
+		return null;
+	}
+
+	public Object loadModel(String symbolicName, Object[] parms) {
+		return null;
+	}
+
+	public void setURI(String uri) {
+		fURI = uri;
+	}
+	
+	public String[] getURIs() {
+		if(fURI != null)
+			return new String[]{fURI};
+		return new String[0];
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/IncrementalReporter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/IncrementalReporter.java
new file mode 100644
index 0000000..d1c8e2c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/IncrementalReporter.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile.validator;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+
+
+/**
+ * Right now we'll only use one reporter per validator.
+ */
+public class IncrementalReporter implements IReporter {
+	private IProgressMonitor fProgressMonitor;
+	private HashMap messages = new HashMap();
+
+	public IncrementalReporter(IProgressMonitor progressMonitor) {
+		super();
+		fProgressMonitor = progressMonitor;
+	}
+
+	public void addMessage(IValidator validator, IMessage message) {
+		AnnotationInfo info = new AnnotationInfo(message);
+		addAnnotationInfo(validator, info);
+	}
+
+	public final void addAnnotationInfo(IValidator validator, AnnotationInfo info) {
+		Object existingValue = messages.get(validator);
+		if (existingValue != null) {
+			((HashSet) existingValue).add(info);
+		}
+		else {
+			HashSet newValue = new HashSet(1);
+			newValue.add(info);
+			messages.put(validator, newValue);
+		}
+	}
+
+	public void displaySubtask(IValidator validator, IMessage message) {
+		if ((message == null) || (message.equals(""))) { //$NON-NLS-1$
+			return;
+		}
+		if (fProgressMonitor != null) {
+			fProgressMonitor.subTask(message.getText(validator.getClass().getClassLoader()));
+		}
+	}
+
+	public List getMessages() {
+		List result = new ArrayList();
+		// messages is a list of:
+		// validators => HashSet(AnnotationInfo1, AnnotationInfo2, ...)
+		// (one HashSet per validator...)
+		Object[] lists = messages.values().toArray();
+		for (int i = 0; i < lists.length; i++) {
+			Iterator it = ((HashSet)lists[i]).iterator();
+			while (it.hasNext()) {
+				AnnotationInfo info = (AnnotationInfo) it.next();
+				result.add(info.getMessage());
+			}
+		}
+		return result;
+	}
+	
+	public AnnotationInfo[] getAnnotationInfo() {
+		List result = new ArrayList();
+		Object[] infos = messages.values().toArray();
+		for (int i = 0; i < infos.length; i++) {
+			result.addAll((HashSet)infos[i]);
+		}
+		return (AnnotationInfo[])result.toArray(new AnnotationInfo[result.size()]);
+	}
+
+	public boolean isCancelled() {
+		if (fProgressMonitor == null)
+			return false;
+		return fProgressMonitor.isCanceled();
+	}
+
+	public void removeAllMessages(IValidator validator) {
+		Object o = messages.get(validator);
+		if(o != null && o instanceof HashSet) {
+			((HashSet)o).clear();
+		}
+	}
+
+	public void removeAllMessages(IValidator validator, Object object) {
+		removeAllMessages(validator);
+	}
+
+	// group names are unsupported
+	public void removeMessageSubset(IValidator validator, Object obj, String groupName) {
+		removeAllMessages(validator);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ReconcileStepForValidator.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ReconcileStepForValidator.java
new file mode 100644
index 0000000..94b41cd
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ReconcileStepForValidator.java
@@ -0,0 +1,363 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile.validator;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilableModel;
+import org.eclipse.jface.text.reconciler.IReconcileResult;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.reconcile.DocumentAdapter;
+import org.eclipse.wst.sse.ui.internal.reconcile.IReconcileAnnotationKey;
+import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey;
+import org.eclipse.wst.sse.ui.internal.reconcile.StructuredReconcileStep;
+import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+
+
+/**
+ * A reconcile step for an IValidator for reconcile. Used the reconcile
+ * framework to create TemporaryAnnotations from the validator messages.
+ * 
+ * @author pavery
+ */
+public class ReconcileStepForValidator extends StructuredReconcileStep {
+
+	/** debug flag */
+	protected static final boolean DEBUG;
+	static {
+		String value = Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/reconcilerjob"); //$NON-NLS-1$
+		DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
+	}
+
+	private final IReconcileResult[] EMPTY_RECONCILE_RESULT_SET = new IReconcileResult[0];
+	private IncrementalHelper fHelper = null;
+	private IncrementalReporter fReporter = null;
+
+	/**
+	 * Declared scope of this validator, either ReconcileAnnotationKey.TOTAL
+	 * or ReconcileAnnotationKey.PARTIAL
+	 */
+	private int fScope = -1;
+	private IValidator fValidator = null;
+	private final String QUICKASSISTPROCESSOR = IQuickAssistProcessor.class.getName();
+
+
+	public ReconcileStepForValidator(IValidator v, int scope) {
+		super();
+
+		if (v == null)
+			throw new IllegalArgumentException("validator cannot be null"); //$NON-NLS-1$
+
+		fValidator = v;
+		fScope = scope;
+	}
+
+	/**
+	 * Converts a map of IValidatorForReconcile to List to annotations based
+	 * on those messages
+	 * 
+	 * @param messages
+	 * @return
+	 */
+	// protected IReconcileResult[] createAnnotations(List messageList) {
+	// List annotations = new ArrayList();
+	// for (int i = 0; i < messageList.size(); i++) {
+	// IMessage validationMessage = (IMessage) messageList.get(i);
+	//
+	// int offset = validationMessage.getOffset();
+	//
+	// if (offset < 0)
+	// continue;
+	//
+	// String messageText = null;
+	// try {
+	// messageText =
+	// validationMessage.getText(validationMessage.getClass().getClassLoader());
+	// }
+	// catch (Exception t) {
+	// Logger.logException("exception reporting message from validator", t);
+	// //$NON-NLS-1$
+	// continue;
+	// }
+	//			
+	// String type = getSeverity(validationMessage);
+	// // this position seems like it would be possibly be the wrong
+	// // length
+	// int length = validationMessage.getLength();
+	// if (length >= 0) {
+	// Position p = new Position(offset, length);
+	// ReconcileAnnotationKey key = createKey(getPartitionType(getDocument(),
+	// offset), getScope());
+	// annotations.add(new TemporaryAnnotation(p, type, messageText, key));
+	// }
+	// }
+	//
+	// return (IReconcileResult[]) annotations.toArray(new
+	// IReconcileResult[annotations.size()]);
+	// }
+	/**
+	 * Converts a map of IValidatorForReconcile to List to annotations based
+	 * on those messages
+	 * 
+	 * @param messages
+	 * @return
+	 */
+	protected IReconcileResult[] createAnnotations(AnnotationInfo[] infos) {
+
+
+		List annotations = new ArrayList();
+		for (int i = 0; i < infos.length; i++) {
+
+			AnnotationInfo info = infos[i];
+
+			IMessage validationMessage = info.getMessage();
+			int offset = validationMessage.getOffset();
+			if (offset < 0)
+				continue;
+
+			String messageText = null;
+			try {
+				messageText = validationMessage.getText(validationMessage.getClass().getClassLoader());
+			}
+			catch (Exception t) {
+				Logger.logException("exception reporting message from validator", t); //$NON-NLS-1$
+				continue;
+			}
+			String type = getSeverity(validationMessage);
+			// this position seems like it would be possibly be the wrong
+			// length
+			int length = validationMessage.getLength();
+			if (length >= 0) {
+
+				Position p = new Position(offset, length);
+				ReconcileAnnotationKey key = createKey(getPartitionType(getDocument(), offset), getScope());
+
+				// create an annotation w/ problem ID and fix info
+				TemporaryAnnotation annotation = new TemporaryAnnotation(p, type, messageText, key);
+				Object extraInfo = info.getAdditionalFixInfo();
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=170988
+				// add quick fix information
+				if (extraInfo == null) {
+					extraInfo = validationMessage.getAttribute(QUICKASSISTPROCESSOR);
+				}
+				annotation.setAdditionalFixInfo(extraInfo);
+				annotation.setAttributes(validationMessage.getAttributes());
+				annotations.add(annotation);
+			}
+		}
+		return (IReconcileResult[]) annotations.toArray(new IReconcileResult[annotations.size()]);
+	}
+
+	private String getSeverity(IMessage validationMessage) {
+		String type = TemporaryAnnotation.ANNOT_INFO;
+		switch (validationMessage.getSeverity()) {
+			case IMessage.HIGH_SEVERITY :
+				type = TemporaryAnnotation.ANNOT_ERROR;
+				break;
+			case IMessage.NORMAL_SEVERITY :
+				type = TemporaryAnnotation.ANNOT_WARNING;
+				break;
+			case IMessage.LOW_SEVERITY :
+				type = TemporaryAnnotation.ANNOT_WARNING;
+				break;
+			case IMessage.ERROR_AND_WARNING :
+				type = TemporaryAnnotation.ANNOT_WARNING;
+				break;
+		}
+		return type;
+	}
+
+	private IFile getFile() {
+		IStructuredModel model = null;
+		IFile file = null;
+		try {
+			model = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
+			if (model != null) {
+				String baseLocation = model.getBaseLocation();
+				// The baseLocation may be a path on disk or relative to the
+				// workspace root. Don't translate on-disk paths to
+				// in-workspace resources.
+				IPath basePath = new Path(baseLocation);
+				if (basePath.segmentCount() > 1 && !basePath.toFile().exists()) {
+					file = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath);
+				}
+			}
+		}
+		finally {
+			if (model != null) {
+				model.releaseFromRead();
+			}
+		}
+		return file;
+	}
+
+	private IncrementalHelper getHelper(IProject project) {
+		if (fHelper == null)
+			fHelper = new IncrementalHelper(getDocument(), project);
+		return fHelper;
+	}
+
+	private IncrementalReporter getReporter() {
+		if (fReporter == null)
+			fReporter = new IncrementalReporter(getProgressMonitor());
+		return fReporter;
+	}
+
+	/**
+	 * If this validator is partial or total
+	 * 
+	 * @return
+	 */
+	public int getScope() {
+		return fScope;
+	}
+
+	public void initialReconcile() {
+		// do nothing
+	}
+
+	protected IReconcileResult[] reconcileModel(DirtyRegion dirtyRegion, IRegion subRegion) {
+		if (DEBUG)
+			System.out.println("[trace reconciler] > reconciling model in VALIDATOR step w/ dirty region: [" + dirtyRegion.getText() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		IReconcileResult[] results = EMPTY_RECONCILE_RESULT_SET;
+		if (dirtyRegion != null) {
+			try {
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=247714
+				if (fValidator instanceof ISourceValidator && getScope() == ReconcileAnnotationKey.PARTIAL) {
+					results = validate(dirtyRegion, subRegion);
+				}
+				else {
+					results = validate();
+				}
+			}
+			catch (Exception ex) {
+				Logger.logException("EXEPTION IN RECONCILE STEP FOR VALIDATOR", ex); //$NON-NLS-1$
+			}
+		}
+
+		if (DEBUG)
+			System.out.println("[trace reconciler] > VALIDATOR step done"); //$NON-NLS-1$
+
+		return results;
+	}
+
+	public String toString() {
+		StringBuffer debugString = new StringBuffer("ValidatorStep: "); //$NON-NLS-1$
+		if (fValidator != null)
+			debugString.append(fValidator.toString());
+		return debugString.toString();
+	}
+
+	protected IReconcileResult[] validate() {
+		IReconcileResult[] results = EMPTY_RECONCILE_RESULT_SET;
+
+		IFile file = getFile();
+
+		try {
+			IncrementalHelper helper = getHelper(file != null ? file.getProject() : null);
+			IncrementalReporter reporter = getReporter();
+
+			if (file != null && file.exists()) {
+				helper.setURI(file.getFullPath().toString());
+			}
+
+			fValidator.validate(helper, reporter);
+
+			// results = createAnnotations(reporter.getMessages());
+			results = createAnnotations(reporter.getAnnotationInfo());
+			reporter.removeAllMessages(fValidator);
+
+			fValidator.cleanup(reporter);
+		}
+		catch (Exception e) {
+			Logger.logException(e);
+		}
+		return results;
+	}
+
+	public void setInputModel(IReconcilableModel inputModel) {
+		if (inputModel instanceof DocumentAdapter) {
+			IDocument document = ((DocumentAdapter) inputModel).getDocument();
+			if (document != null) {
+				if (fValidator instanceof ISourceValidator) {
+					// notify that document connecting
+					((ISourceValidator) fValidator).connect(document);
+				}
+			}
+		}
+		super.setInputModel(inputModel);
+	}
+
+	public void release() {
+		if (fValidator instanceof ISourceValidator) {
+			IDocument document = getDocument();
+			if (document != null) {
+				// notify that document disconnecting
+				((ISourceValidator) fValidator).disconnect(document);
+			}
+			fValidator.cleanup(getReporter());
+		}
+		super.release();
+	}
+
+	protected IReconcileResult[] validate(DirtyRegion dirtyRegion, IRegion subRegion) {
+		IReconcileResult[] results = EMPTY_RECONCILE_RESULT_SET;
+
+		IFile file = getFile();
+
+		try {
+			IncrementalHelper helper = getHelper(file != null ? file.getProject() : null);
+			/*
+			 * Setting the URI isn't necessary for all source validators, we
+			 * can still continue without it
+			 */
+			if (file != null && file.exists()) {
+				helper.setURI(file.getFullPath().toString());
+			}
+
+			if (fValidator instanceof ISourceValidator) {
+				IncrementalReporter reporter = getReporter();
+				if (getScope() == IReconcileAnnotationKey.PARTIAL)
+					((ISourceValidator) fValidator).validate(dirtyRegion, helper, reporter);
+				else
+					((ISourceValidator) fValidator).validate(new Region(0, getDocument().getLength()), helper, reporter);
+				// call IValidator.cleanup() during release()
+				// results = createAnnotations(reporter.getMessages());
+				results = createAnnotations(reporter.getAnnotationInfo());
+				reporter.removeAllMessages(fValidator);
+			}
+		}
+		catch (Exception e) {
+			Logger.logException(e);
+		}
+		return results;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorBuilder.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorBuilder.java
new file mode 100644
index 0000000..e1f6cce
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorBuilder.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile.validator;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.extension.RegistryReader;
+
+
+/**
+ * Based off of TransferBuilder. Reads the extension point for
+ * <code>org.eclipse.wst.sse.ui.extensions.sourcevalidation</code>
+ */
+public class ValidatorBuilder extends RegistryReader {
+    
+	public static final String ATT_CLASS = "class"; //$NON-NLS-1$
+	public static final String ATT_ID = "id"; //$NON-NLS-1$
+	public static final String ATT_SCOPE = "scope"; //$NON-NLS-1$
+
+	public static final ValidatorMetaData[] EMTPY_VMD_ARRAY = new ValidatorMetaData[0];
+
+	// extension point ID
+	public static final String PL_SOURCE_VALIDATION = "sourcevalidation"; //$NON-NLS-1$
+
+	public static final String PLUGIN_ID = "org.eclipse.wst.sse.ui"; //$NON-NLS-1$
+	public static final String TAG_CONTENT_TYPE_IDENTIFIER = "contentTypeIdentifier"; //$NON-NLS-1$
+	public static final String TAG_PARTITION_TYPE = "partitionType"; //$NON-NLS-1$
+
+	public static final String TAG_VALIDATOR = "validator"; //$NON-NLS-1$
+
+	public static final String TRACE_FILTER = "reconcile_validator"; //$NON-NLS-1$
+
+	public static final String TRUE = "true"; //$NON-NLS-1$
+	private String fCurrentCTID;
+	private ValidatorMetaData fCurrentVMD = null;
+	private List fVmds = new ArrayList();
+	protected String targetContributionTag;
+	protected String targetID;
+
+    private final String UNKNOWN = "???"; //$NON-NLS-1$
+    
+	/**
+	 * Returns the name of the part ID attribute that is expected in the
+	 * target extension.
+	 * 
+	 * @param element
+	 * @return String
+	 */
+	protected String getID(IConfigurationElement element) {
+		String value = element.getAttribute(ATT_ID);
+		return value != null ? value : UNKNOWN; //$NON-NLS-1$
+	}
+
+	protected String getValidatorClass(IConfigurationElement element) {
+		String value = element.getAttribute(ATT_CLASS);
+		return value != null ? value : UNKNOWN; //$NON-NLS-1$
+	}
+
+	/**
+	 * @param editorId
+	 * @return Transfer[]
+	 */
+	public ValidatorMetaData[] getValidatorMetaData(String editorId) {
+		readContributions(editorId, TAG_VALIDATOR, PL_SOURCE_VALIDATION);
+		return (ValidatorMetaData[]) fVmds.toArray(new ValidatorMetaData[fVmds.size()]);
+	}
+
+	protected String getValidatorScope(IConfigurationElement element) {
+		String value = element.getAttribute(ATT_SCOPE);
+		return value != null ? value : UNKNOWN; //$NON-NLS-1$
+	}
+
+	/**
+	 * Reads the contributions from the registry for the provided workbench
+	 * part and the provided extension point ID.
+	 * 
+	 * @param id
+	 * @param tag
+	 * @param extensionPoint
+	 */
+	protected void readContributions(String id, String tag, String extensionPoint) {
+		targetID = id;
+		targetContributionTag = tag;
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		readRegistry(registry, PLUGIN_ID, extensionPoint);
+	}
+
+	protected boolean readElement(IConfigurationElement element) {
+		String tag = element.getName();
+		//ie. targetContributionTag == validator
+		if (tag.equals(targetContributionTag)) {
+			String vId = getID(element);
+			String vClass = getValidatorClass(element);
+			String vScope = getValidatorScope(element);
+
+			if (vId == null) {
+				// This is not of interest to us - don't go deeper
+				return true;
+			}
+			// start building a VMD
+			fCurrentVMD = new ValidatorMetaData(element, vId, vClass, vScope);
+			fVmds.add(fCurrentVMD);
+
+			if (Logger.isTracing(ValidatorBuilder.TRACE_FILTER))
+				System.out.println("added reconcile validator: " + vId + ":" + vClass + ":" + vScope); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		} else if (tag.equals(TAG_CONTENT_TYPE_IDENTIFIER)) {
+			// add to current VMD
+			fCurrentCTID = getID(element);
+			fCurrentVMD.addContentTypeId(fCurrentCTID);
+		} else if (tag.equals(TAG_PARTITION_TYPE)) {
+			// add to current VMD
+			String partitionType = getID(element);
+			fCurrentVMD.addParitionType(fCurrentCTID, partitionType);
+
+			return true;
+		} else {
+			return false;
+		}
+
+		readElementChildren(element);
+		return true;
+	}
+}
+
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorMetaData.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorMetaData.java
new file mode 100644
index 0000000..8a412c1
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorMetaData.java
@@ -0,0 +1,241 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile.validator;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * Object that holds information relevant to the creation of a validator for
+ * the reconciling framework.
+ * 
+ * @author pavery,nitind
+ */
+public class ValidatorMetaData {
+	private String fClass = null;
+	private IConfigurationElement fConfigurationElement = null;
+	private String fId = null;
+    private String fScope;
+
+	// a hash map of explicitly declared content type Ids (String) that points to lists of
+	// partition types (List of Strings)
+	// contentTypeId -> List(paritionType, paritionType, partitionType, ...)
+	// contentTypeId2 -> List(partitionType, partitionType, ...)
+	// ...
+	private HashMap fMatrix = null;
+
+	public ValidatorMetaData(IConfigurationElement element, String vId, String vClass, String vScope) {
+		fId = vId;
+		fClass = vClass;
+		fConfigurationElement = element;
+		fScope = vScope;
+		fMatrix = new HashMap();
+	}
+
+    /**
+     * TODO: This exact method is also in ValidatorStrategy. Should be in a common place.
+     * 
+     * @param contentTypeId
+     * @return
+     */
+    private String[] calculateParentContentTypeIds(String contentTypeId) {
+
+        Set parentTypes = new HashSet();
+        
+        IContentTypeManager ctManager = Platform.getContentTypeManager();    
+        IContentType ct = ctManager.getContentType(contentTypeId);
+        String id = contentTypeId;
+
+        while(ct != null && id != null) {
+            
+            parentTypes.add(id);
+            ct = ctManager.getContentType(id);
+            if(ct != null) {
+                IContentType baseType = ct.getBaseType();
+                id = (baseType != null) ? baseType.getId() : null;
+            }
+        }
+        return (String[])parentTypes.toArray(new String[parentTypes.size()]);
+    }
+    
+	public void addContentTypeId(String contentTypeId) {
+		if (!fMatrix.containsKey(contentTypeId))
+			fMatrix.put(contentTypeId, new ArrayList());
+	}
+
+	public void addParitionType(String contentTypeId, String partitionType) {
+		if (!fMatrix.containsKey(contentTypeId))
+			fMatrix.put(contentTypeId, new ArrayList());
+
+		List partitionList = (List) fMatrix.get(contentTypeId);
+		partitionList.add(partitionType);
+	}
+
+	/**
+	 * @param contentType
+	 * @return whether this validator explicitly declared that it could handle
+	 *         this content type or any of its parent content types
+	 */
+	public boolean canHandleContentType(String contentType) {
+        // need to iterate hierarchy
+        String[] contentHierarchy = calculateParentContentTypeIds(contentType);
+        for (int i = 0; i < contentHierarchy.length; i++) {
+            if(fMatrix.containsKey(contentHierarchy[i]))
+                return true;
+        }
+        return false;
+	}
+
+	/**
+	 * @param contentType
+	 * @return whether this validator explicitly declared that it could handle
+	 *         this content type
+	 */
+	public boolean mustHandleContentType(String contentType) {
+        return fMatrix.containsKey(contentType);
+	}
+
+	/**
+	 * @param contentTypeIds
+	 * @param partitionType
+	 * @return whether this validator declared that it could handle this
+	 *         content type, or one of its parent content types, and partition
+	 *         type
+	 */
+	public boolean canHandlePartitionType(String contentTypeIds[], String paritionType) {
+        for(int i=0; i<contentTypeIds.length; i++) {
+        	List partitions = (List) fMatrix.get(contentTypeIds[i]);
+    		if (partitions != null) {
+    			for (int j = 0; j < partitions.size(); j++) {
+    				if (paritionType.equals(partitions.get(j)))
+    					return true;
+    			}
+    		}
+        }
+		return false;
+	}
+
+	/**
+	 * @param element
+	 * @param classAttribute
+	 * @return Object
+	 * @throws CoreException
+	 */
+	Object createExecutableExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
+		Object obj = null;
+		obj = element.createExecutableExtension(classAttribute);
+		return obj;
+	}
+
+	/**
+	 * Creates an extension. If the extension plugin has not been loaded a
+	 * busy cursor will be activated during the duration of the load.
+	 * 
+	 * @param element
+	 * @param classAttribute
+	 * @return Object
+	 * @throws CoreException
+	 */
+	public Object createExtension() {
+		// If plugin has been loaded create extension.
+		// Otherwise, show busy cursor then create extension.
+		final IConfigurationElement element = getConfigurationElement();
+		final Object[] result = new Object[1];
+		String pluginId = element.getDeclaringExtension().getNamespace();
+		Bundle bundle = Platform.getBundle(pluginId);
+		if (bundle.getState() == Bundle.ACTIVE) {
+			try {
+				return createExecutableExtension(element, "class"); //$NON-NLS-1$
+			} catch (CoreException e) {
+				handleCreateExecutableException(result, e);
+			}
+		} else {
+			BusyIndicator.showWhile(null, new Runnable() {
+				public void run() {
+					try {
+						result[0] = createExecutableExtension(element, "class"); //$NON-NLS-1$
+					} catch (Exception e) {
+						handleCreateExecutableException(result, e);
+					}
+				}
+			});
+		}
+		return result[0];
+	}
+
+	/**
+	 * @return a validator instance based on this ValidatorMetaData instance
+	 */
+	public IValidator createValidator() {
+		Object obj = null;
+		obj = createExtension();
+		if (obj == null) {
+			return null;
+		}
+		return (obj instanceof IValidator) ? (IValidator) obj : null;
+	}
+
+	public IConfigurationElement getConfigurationElement() {
+		return fConfigurationElement;
+	}
+
+	public String getValidatorClass() {
+		return fClass;
+	}
+
+	public String getValidatorId() {
+		return fId;
+	}
+
+	/**
+	 * @param result
+	 * @param e
+	 */
+	void handleCreateExecutableException(Object[] result, Throwable e) {
+		Logger.logException(e);
+		e.printStackTrace();
+		result[0] = null;
+	}
+	/**
+	 * ReconcileAnnotationKey.TOTAL or  ReconcileAnnotationKey.PARTIAL
+	 * @return
+	 */
+    public int getValidatorScope() {
+        return fScope.equalsIgnoreCase("total") ? ReconcileAnnotationKey.TOTAL : ReconcileAnnotationKey.PARTIAL; //$NON-NLS-1$
+    }
+    
+	/**
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer debugString = new StringBuffer("ValidatorMetaData:"); //$NON-NLS-1$
+		if (fId != null)
+			debugString.append(" [id:" + fId + "]"); //$NON-NLS-1$ //$NON-NLS-2$
+		return debugString.toString();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorStrategy.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorStrategy.java
new file mode 100644
index 0000000..129e4b3
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorStrategy.java
@@ -0,0 +1,365 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.reconcile.validator;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcileResult;
+import org.eclipse.jface.text.reconciler.IReconcileStep;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.utils.StringUtils;
+import org.eclipse.wst.sse.ui.internal.IReleasable;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.reconcile.DocumentAdapter;
+import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey;
+import org.eclipse.wst.sse.ui.internal.reconcile.StructuredTextReconcilingStrategy;
+import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.eclipse.wst.validation.Validator;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+
+
+/**
+ * Special validator strategy. Runs validator steps contributed via the
+ * <code>org.eclipse.wst.sse.ui.extensions.sourcevalidation</code> extension
+ * point
+ * 
+ * @author pavery
+ */
+public class ValidatorStrategy extends StructuredTextReconcilingStrategy {
+
+	private static final boolean DEBUG_VALIDATION_CAPABLE_BUT_DISABLED = Boolean.valueOf(Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/reconcilerValidatorEnablement")).booleanValue();
+	private static final boolean DEBUG_VALIDATION_UNSUPPORTED = Boolean.valueOf(Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/reconcilerValidatorSupported")).booleanValue();
+
+	private String[] fContentTypeIds = null;
+	private List fMetaData = null;
+	/** validator id (as declared in ext point) -> ReconcileStepForValidator * */
+	private HashMap fVidToVStepMap = null;
+
+	/*
+	 * List of ValidatorMetaDatas of total scope validators that have been run
+	 * since beginProcessing() was called.
+	 */
+	private List fTotalScopeValidatorsAlreadyRun = new ArrayList();
+	
+	/*
+	 * Whether the Validation Framework has indicated that validation is
+	 * suspended for the current resource
+	 */
+	private boolean fValidatorsSuspended = false;
+
+	public ValidatorStrategy(ISourceViewer sourceViewer, String contentType) {
+		super(sourceViewer);
+		fMetaData = new ArrayList();
+		fContentTypeIds = calculateParentContentTypeIds(contentType);
+		fVidToVStepMap = new HashMap();
+	}
+
+	public void addValidatorMetaData(ValidatorMetaData vmd) {
+		fMetaData.add(vmd);
+	}
+
+	public void beginProcessing() {
+		fTotalScopeValidatorsAlreadyRun.clear();
+	}
+
+	/**
+	 * The content type passed in should be the most specific one. TODO: This
+	 * exact method is also in ValidatorMetaData. Should be in a common place.
+	 * 
+	 * @param contentType
+	 * @return
+	 */
+	private String[] calculateParentContentTypeIds(String contentTypeId) {
+
+		Set parentTypes = new HashSet();
+
+		IContentTypeManager ctManager = Platform.getContentTypeManager();
+		IContentType ct = ctManager.getContentType(contentTypeId);
+		String id = contentTypeId;
+
+		while (ct != null && id != null) {
+
+			parentTypes.add(id);
+			ct = ctManager.getContentType(id);
+			if (ct != null) {
+				IContentType baseType = ct.getBaseType();
+				id = (baseType != null) ? baseType.getId() : null;
+			}
+		}
+		return (String[]) parentTypes.toArray(new String[parentTypes.size()]);
+	}
+
+	protected boolean canHandlePartition(String partitionType) {
+		ValidatorMetaData vmd = null;
+		for (int i = 0; i < fMetaData.size(); i++) {
+			vmd = (ValidatorMetaData) fMetaData.get(i);
+			if (vmd.canHandlePartitionType(getContentTypeIds(), partitionType))
+				return true;
+		}
+		return false;
+	}
+
+	protected boolean containsStep(IReconcileStep step) {
+		return fVidToVStepMap.containsValue(step);
+	}
+
+	/**
+	 * @see org.eclipse.wst.sse.ui.internal.provisional.reconcile.AbstractStructuredTextReconcilingStrategy#createReconcileSteps()
+	 */
+	public void createReconcileSteps() {
+		// do nothing, steps are created
+	}
+
+	public void endProcessing() {
+		fTotalScopeValidatorsAlreadyRun.clear();
+	}
+
+	/**
+	 * All content types on which this ValidatorStrategy can run
+	 * 
+	 * @return
+	 */
+	public String[] getContentTypeIds() {
+		return fContentTypeIds;
+	}
+
+	/**
+	 * @param tr
+	 *            Partition of the region to reconcile.
+	 * @param dr
+	 *            Dirty region representation of the typed region
+	 */
+	public void reconcile(ITypedRegion tr, DirtyRegion dr) {
+		/*
+		 * Abort if no workspace file is known (new validation framework does
+		 * not support that scenario) or no validators have been specified
+		 */
+		if (isCanceled() || fMetaData.isEmpty() || fValidatorsSuspended)
+			return;
+
+		IDocument doc = getDocument();
+		// for external files, this can be null
+		if (doc == null)
+			return;
+
+		String partitionType = tr.getType();
+
+		ValidatorMetaData vmd = null;
+		List annotationsToAdd = new ArrayList();
+		List stepsRanOnThisDirtyRegion = new ArrayList(1);
+		
+		/*
+		 * Keep track of the disabled validators by source id for the V2
+		 * validators.
+		 */
+		Set disabledValsBySourceId = new HashSet(20);
+		
+		/*
+		 * Keep track of the disabled validators by class id for the v1
+		 * validators.
+		 */
+		Set disabledValsByClass = new HashSet(20);
+		IFile file = getFile();
+		if (file != null) {
+			if(!file.isAccessible())
+				return;
+
+			Collection disabledValidators = null;
+			try {
+				/*
+				 * Take extra care when calling this external code, as it
+				 * can indirectly cause bundles to start
+				 */
+				disabledValidators = ValidationFramework.getDefault().getDisabledValidatorsFor(file);
+			}
+			catch (Exception e) {
+				Logger.logException(e);
+			}
+
+			if (disabledValidators != null) {
+				for (Iterator it = disabledValidators.iterator(); it.hasNext();) {
+					Validator v = (Validator) it.next();
+					Validator.V1 v1 = null;
+					try {
+						v1 = v.asV1Validator();
+					}
+					catch (Exception e) {
+						Logger.logException(e);
+					}
+					if (v1 != null)
+						disabledValsByClass.add(v1.getId());
+					// not a V1 validator
+					else if (v.getSourceId() != null)
+						disabledValsBySourceId.add(v.getSourceId());
+				}
+			}
+		}
+				
+		/*
+		 * Loop through all of the relevant validator meta data to find
+		 * supporting validators for this partition type. Don't check
+		 * this.canHandlePartition() before-hand since it just loops through
+		 * and calls vmd.canHandlePartitionType()...which we're already doing
+		 * here anyway to find the right vmd.
+		 */
+		for (int i = 0; i < fMetaData.size() && !isCanceled(); i++) {
+			vmd = (ValidatorMetaData) fMetaData.get(i);
+			if (vmd.canHandlePartitionType(getContentTypeIds(), partitionType)) {
+				/*
+				 * Check if validator is enabled according to validation
+				 * preferences before attempting to create/use it
+				 */
+				if (!disabledValsBySourceId.contains(vmd.getValidatorId()) && !disabledValsByClass.contains(vmd.getValidatorClass())) {
+					if (DEBUG_VALIDATION_UNSUPPORTED) {
+						Logger.log(Logger.INFO, "Source validator "+vmd.getValidatorId()+" handling (content types:[" + StringUtils.pack(getContentTypeIds()) + "] partition type:" + partitionType);
+					}
+					int validatorScope = vmd.getValidatorScope();
+					ReconcileStepForValidator validatorStep = null;
+					// get step for partition type
+					Object o = fVidToVStepMap.get(vmd.getValidatorId());
+					if (o != null) {
+						validatorStep = (ReconcileStepForValidator) o;
+					}
+					else {
+						// if doesn't exist, create one
+						IValidator validator = vmd.createValidator();
+
+						validatorStep = new ReconcileStepForValidator(validator, validatorScope);
+						validatorStep.setInputModel(new DocumentAdapter(doc));
+
+						fVidToVStepMap.put(vmd.getValidatorId(), validatorStep);
+					}
+
+					if (!fTotalScopeValidatorsAlreadyRun.contains(vmd)) {
+						annotationsToAdd.addAll(Arrays.asList(validatorStep.reconcile(dr, dr)));
+						stepsRanOnThisDirtyRegion.add(validatorStep);
+
+						if (validatorScope == ReconcileAnnotationKey.TOTAL) {
+							// mark this validator as "run"
+							fTotalScopeValidatorsAlreadyRun.add(vmd);
+						}
+					}
+				}
+				else if (DEBUG_VALIDATION_CAPABLE_BUT_DISABLED) {
+					String message = "Source validator able (id:" + vmd.getValidatorId() + " class:" + vmd.getValidatorClass() + " but skipped because it was reported as disabled";
+					Logger.log(Logger.INFO, message);
+				}
+			}
+			else if (DEBUG_VALIDATION_UNSUPPORTED) {
+				Logger.log(Logger.INFO, "Source validator "+vmd.getValidatorId()+" can not handle (content types:[" + StringUtils.pack(getContentTypeIds()) + "] partition type:" + partitionType);
+			}
+		}
+
+		TemporaryAnnotation[] annotationsToRemove = getAnnotationsToRemove(dr, stepsRanOnThisDirtyRegion);
+		if (annotationsToRemove.length + annotationsToAdd.size() > 0)
+			smartProcess(annotationsToRemove, (IReconcileResult[]) annotationsToAdd.toArray(new IReconcileResult[annotationsToAdd.size()]));
+	}
+
+	public void release() {
+		super.release();
+		Iterator it = fVidToVStepMap.values().iterator();
+		IReconcileStep step = null;
+		while (it.hasNext()) {
+			step = (IReconcileStep) it.next();
+			if (step instanceof IReleasable)
+				((IReleasable) step).release();
+		}
+	}
+
+	/**
+	 * @see org.eclipse.wst.sse.ui.internal.reconcile.AbstractStructuredTextReconcilingStrategy#setDocument(org.eclipse.jface.text.IDocument)
+	 */
+	public void setDocument(IDocument document) {
+
+		super.setDocument(document);
+
+		try {
+			fValidatorsSuspended = false;
+			if (document != null) {
+				IFile file = getFile();
+				if (file != null) {
+					// Validation is suspended for this resource, do nothing
+					fValidatorsSuspended = !file.isAccessible() || ValidationFramework.getDefault().isSuspended(file.getProject()) || ValidationFramework.getDefault().getProjectSettings(file.getProject()).getSuspend();
+				}
+			}
+		}
+		catch (Exception e) {
+			fValidatorsSuspended = true;
+			Logger.logException(e);
+		}
+		
+		// validator steps are in "fVIdToVStepMap" (as opposed to fFirstStep >
+		// next step etc...)
+		Iterator it = fVidToVStepMap.values().iterator();
+		IReconcileStep step = null;
+		while (it.hasNext()) {
+			step = (IReconcileStep) it.next();
+			step.setInputModel(new DocumentAdapter(document));
+		}
+	}
+
+	/**
+	 * Gets IFile from current document
+	 * 
+	 * @return IFile the IFile, null if no such file exists
+	 */
+	private IFile getFile() {
+		IStructuredModel model = null;
+		IFile file = null;
+		try {
+			model = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
+			if (model != null) {
+				String baseLocation = model.getBaseLocation();
+				// The baseLocation may be a path on disk or relative to the
+				// workspace root. Don't translate on-disk paths to
+				// in-workspace resources.
+				IPath basePath = new Path(baseLocation);
+				if (basePath.segmentCount() > 1) {
+					file = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath);
+					/*
+					 * If the IFile doesn't  exist, make sure it's not
+					 * returned
+					 */
+					if (!file.exists())
+						file = null;
+				}
+			}
+		}
+		finally {
+			if (model != null) {
+				model.releaseFromRead();
+			}
+		}
+		return file;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/rules/PresentationCollector.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/rules/PresentationCollector.java
new file mode 100644
index 0000000..436d510
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/rules/PresentationCollector.java
@@ -0,0 +1,83 @@
+/*******************************************************************************

+ * Copyright (c) 2009 IBM Corporation and others.

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ * 

+ * Contributors:

+ *     IBM Corporation - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.wst.sse.ui.internal.rules;

+

+import java.util.AbstractCollection;

+import java.util.Iterator;

+

+import org.eclipse.core.runtime.Assert;

+import org.eclipse.jface.text.TextPresentation;

+import org.eclipse.swt.custom.StyleRange;

+import org.eclipse.wst.sse.ui.internal.Logger;

+

+/**

+ * Passed to LineStyleProviders as the Collection for which StyleRanges are to

+ * be added. This class provides additional sanity checks on the incoming

+ * StyleRanges so that we do not rely upon SWT to report Errors with no record

+ * of the StyleRange or contributing LineStyleProvider, as well as a slight

+ * performance increase by not allocating a redundant collection for the

+ * StyleRanges.

+ * 

+ * This class intentionally violates the contract for java.util.Collection.

+ */

+

+class PresentationCollector extends AbstractCollection {

+	private final TextPresentation fPresentation;

+	private int lastOffset;

+

+	/**

+	 * @param presentation

+	 *            - the Presentation being added to

+	 * @param applyOnAdd

+	 */

+	PresentationCollector(TextPresentation presentation) {

+		super();

+		Assert.isNotNull(presentation);

+		fPresentation = presentation;

+		lastOffset = 0;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * 

+	 * @see java.util.Collection#add(java.lang.Object)

+	 */

+	public boolean add(Object o) {

+		StyleRange range = (StyleRange) o;

+		if (lastOffset > range.start) {

+			IllegalArgumentException e = new IllegalArgumentException("Overlapping start in StyleRange " + range.start + ":" + range.length); //$NON-NLS-1$ //$NON-NLS-2$

+			Logger.logException(e);

+			throw e;

+		}

+		lastOffset = range.start + range.length;

+		fPresentation.addStyleRange(range);

+		return true;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * 

+	 * @see java.util.AbstractCollection#iterator()

+	 */

+	public Iterator iterator() {

+		return fPresentation.getNonDefaultStyleRangeIterator();

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * 

+	 * @see java.util.AbstractCollection#size()

+	 */

+	public int size() {

+		throw new UnsupportedOperationException();

+	}

+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/rules/StructuredDocumentDamagerRepairer.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/rules/StructuredDocumentDamagerRepairer.java
new file mode 100644
index 0000000..f5973d8
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/rules/StructuredDocumentDamagerRepairer.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.rules;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.ui.internal.provisional.style.AbstractLineStyleProvider;
+import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
+
+/**
+ * An implementation of a presentation damager and presentation repairer.
+ * It uses a LineStyleProvider to retrieve the style ranges associated with
+ * the calculated damaged region.
+ * 
+ * @see LineStyleProvider
+ */
+public class StructuredDocumentDamagerRepairer extends DefaultDamagerRepairer {
+	
+	private LineStyleProvider fProvider = null;
+	
+	public StructuredDocumentDamagerRepairer(LineStyleProvider provider) {
+		super(new RuleBasedScanner());
+		Assert.isNotNull(provider);
+		fProvider = provider;
+	}
+
+	public void createPresentation(TextPresentation presentation, ITypedRegion region) {
+		PresentationCollector collector = new PresentationCollector(presentation);
+		fProvider.prepareRegions(region, region.getOffset(), region.getLength(), collector);
+	}
+	
+	public void setProvider(LineStyleProvider provider) {
+		fProvider = provider;
+	}
+	
+	public void setDocument(IDocument document) {
+		super.setDocument(document);
+		if (fProvider instanceof AbstractLineStyleProvider)
+			((AbstractLineStyleProvider) fProvider).setDocument( (IStructuredDocument) document);
+	}
+	
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchLabelProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchLabelProvider.java
new file mode 100644
index 0000000..c20f38a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchLabelProvider.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.search;
+
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
+import org.eclipse.jface.viewers.StyledString.Styler;
+import org.eclipse.search.ui.text.AbstractTextSearchViewPage;
+import org.eclipse.search.ui.text.Match;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * <p>The label provider designed for use with <code>BasicSearchMatchElement</code><p>
+ * 
+ * <p>Displays in the format of:<br/>
+ * lineNum: Message (# matches)</br>
+ * 1: <a></a> (2 matches)</p>
+ */
+public class BasicSearchLabelProvider extends LabelProvider implements IStyledLabelProvider {
+	/**
+	 * ID of match highlighting background color
+	 */
+	private static final String MATCH_BG_ID = "org.eclipse.wst.sse.ui.search.MATCH_BG";
+	
+	//register the match highlighting background color once
+	static {
+		JFaceResources.getColorRegistry().put(MATCH_BG_ID, new RGB(206, 204, 247));
+	}
+	
+	/**
+	 * Match highlighting background color styler
+	 */
+	private static final Styler HIGHLIGHT_WRITE_STYLE= StyledString.createColorRegistryStyler(null, MATCH_BG_ID);
+	
+	
+	/**
+	 * Need the page if want to determine the number of matches, but this can be <code>null</code>
+	 */
+	private AbstractTextSearchViewPage fPage;
+
+	/**
+	 * <p>Construct the provider without a <code>AbstractTextSearchViewPage</code><p>
+	 * <p><b>NOTE:</b>If this constructor is used then the provider will not be able to determine
+	 * the number of matches that are all on the same line for a given element</p>
+	 */
+	public BasicSearchLabelProvider() {
+		this(null);
+	}
+	
+	/**
+	 * <p>Construct the provider with a <code>AbstractTextSearchViewPage</code> so that the
+	 * number of matches that are all on the same line for a given element can be determined.</p>
+	 * 
+	 * @param page Will be used to determine the number of matches that are all on the same line
+	 */
+	public BasicSearchLabelProvider(AbstractTextSearchViewPage page) {
+		fPage= page;
+	}
+	
+	/**
+	 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+	 */
+	public Image getImage(Object element) {
+		return EditorPluginImageHelper.getInstance().getImage(EditorPluginImages.IMG_OBJ_OCC_MATCH);
+	}
+	
+	/**
+	 * <p><b>Note:</b> Because this class implements <code>IStyledLabelProvider</code> the <code>getStyledText</code>
+	 * function should be being called and not this one, but better save then sorry</p>
+	 * 
+	 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+	 * @see org.eclipse.wst.sse.ui.internal.search.BasicSearchLabelProvider#getStyledText(Object)
+	 */
+	public final String getText(Object element) {
+		return getStyledText(element).getString();
+	}
+	
+	/**
+	 * <p>Given a <code>Match</code> object containing a <code>BasicSearchMatchElement</code> element
+	 * returns a <code>StyledString</code> in the form of:</p>
+	 * 
+	 * <p>lineNum: Message (# matches)</br>
+	 * 1: <a></a> (2 matches)</p>
+	 * 
+	 * @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)
+	 */
+	public StyledString getStyledText(Object obj) {
+		StyledString styledText = new StyledString();
+		BasicSearchMatchElement element = null;
+		if (obj instanceof Match) {
+			Match match = (Match) obj;
+
+			if(match.getElement() instanceof BasicSearchMatchElement) {
+				element = (BasicSearchMatchElement) match.getElement();
+			}
+		} else if(obj instanceof BasicSearchMatchElement) {
+			element = (BasicSearchMatchElement)obj;
+		}
+		
+		//get the match count if possible
+		int matchCount = 0;
+		Match[] matches = new Match[0];
+		if(fPage != null) {
+			matches = fPage.getInput().getMatches(obj);
+			matchCount = matches.length;
+		}
+		
+		//if everything was of the right type create our formated message,
+		//else use the toString of the given object for the message
+		if(element != null) {
+			String message = element.getLine().trim(); //$NON-NLS-1$
+			int trimedAmount = element.getLine().indexOf(message);
+			String lineNum = element.getLineNum() + 1 + ": "; //$NON-NLS-1$
+			
+			styledText.append(lineNum, StyledString.QUALIFIER_STYLER);
+			styledText.append(message);
+			
+			//get the match count if possible
+			for(int i = 0; i < matchCount; ++i) {
+				int offset = matches[i].getOffset() - element.geLineOffset() + lineNum.length() - trimedAmount;
+				styledText.setStyle(offset, matches[i].getLength(), HIGHLIGHT_WRITE_STYLE);
+			}
+			
+		} else {
+			styledText.append(obj.toString());
+		}
+		
+		//append the match count if its worth appending
+		if (matchCount > 1) {
+			String matchesMsg = " " + MessageFormat.format(
+				SSEUIMessages.TextSearchLabelProvider_matchCountFormat,
+				new Object[] { new Integer(matchCount) });
+			styledText.append(matchesMsg, StyledString.COUNTER_STYLER);
+		}
+	
+		return styledText;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchMatchElement.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchMatchElement.java
new file mode 100644
index 0000000..425c06a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchMatchElement.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.search;
+
+import org.eclipse.core.resources.IFile;
+
+/**
+ * This is used as the element for a <code>Match</code> object by
+ * <code>BasicSearchQuery</code>.  It contains all the needed information
+ * for use by the query, result providers, and label providers.
+ *
+ * @see org.eclipse.search.ui.text.Match
+ * @see org.eclipse.wst.sse.ui.internal.search.BasicSearchQuery
+ */
+public class BasicSearchMatchElement {
+	/**
+	 * The file this element is a match on
+	 */
+	private IFile fFile;
+	
+	/**
+	 * The line number this element is a match on
+	 */
+	private int fLineNumber;
+	
+	/**
+	 * The offset of the line in the file
+	 */
+	private int fLineOffset;
+	
+	/**
+	 * The line this match is on
+	 */
+	private String fLine;
+	
+	/**
+	 * Constructor
+	 * 
+	 * @param file The file this element is a match on
+	 * @param lineNumber The line number this element is a match on
+	 * @param lineOffset The offset of the line in the file
+	 * @param message The message associated with this element
+	 */
+	public BasicSearchMatchElement(IFile file, int lineNumber, int lineOffset, String message) {
+		this.fFile = file;
+		this.fLineNumber = lineNumber;
+		this.fLineOffset = lineOffset;
+		this.fLine = message;
+	}
+	
+	/**
+	 * @return The file this element is a match on
+	 */
+	public IFile getFile() {
+		return this.fFile;
+	}
+	
+	/**
+	 * @return The line number this element is a match on
+	 */
+	public int getLineNum() {
+		return this.fLineNumber;
+	}
+	
+	/**
+	 * @return the offset of the line the match is on in the file
+	 */
+	public int geLineOffset() {
+		return this.fLineOffset;
+	}
+	
+	/**
+	 * @return The line this match is on
+	 */
+	public String getLine() {
+		return this.fLine;
+	}
+	
+	/**
+	 * <p>Two <code>BasicSearchMatchElement</code> are equal if they are
+	 * both on the same line. This helps with determining how many matches
+	 * are all on the same line which is automatically taken care of by
+	 * internal Eclipse search APIs so long as this equal method is structured
+	 * thusly.</p>
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		boolean equal = false;
+		
+		if(obj instanceof BasicSearchMatchElement) {
+			equal = getLineNum() == ((BasicSearchMatchElement)obj).getLineNum();
+		}
+		
+		return equal;
+	}
+	
+	/**
+	 * Like the <code>#equals</code> method this function is needed so
+	 * that the internal Eclipse search APIs can keep track of matches
+	 * that are on the same line.
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return getLineNum() + getLine().hashCode();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchQuery.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchQuery.java
new file mode 100644
index 0000000..d54823a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchQuery.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.search;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.search.ui.ISearchQuery;
+import org.eclipse.search.ui.ISearchResult;
+import org.eclipse.search.ui.text.AbstractTextSearchResult;
+import org.eclipse.search.ui.text.Match;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+
+/**
+ * Defines a basic search query.  This query does not do anything, it needs to be extended
+ * and the <code>{@link #doQuery()}</code> method needs to be overridden to make the query
+ * actually be functional.
+ *
+ */
+public class BasicSearchQuery implements ISearchQuery {
+	/**
+	 * the file we're searching
+	 */
+	private IFile fFile = null;
+	
+	/**
+	 * The result of this query
+	 */
+	private AbstractTextSearchResult fResult = null;
+
+	/**
+	 * <p>Construct a new basic query.</p>
+	 * 
+	 * <p><b>IMPORTANT: </b>It is very important that after
+	 * creating the query and <b>before</b> running the query
+	 * that you call {@link #setResult(AbstractTextSearchResult)}.
+	 * This is not a parameter because typically a search result needs
+	 * a reference to its query and thus the query needs to be constructed
+	 * before its result object can be set.</p>
+	 * 
+	 * @param file the file this query will take place on
+	 */
+	public BasicSearchQuery(IFile file) {
+		this.fFile = file;
+	}
+	
+	/**
+	 * Runs the query
+	 * 
+	 * @see org.eclipse.search.ui.ISearchQuery#run(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IStatus run(IProgressMonitor monitor) {
+		return doQuery();
+	}
+	
+	/**
+	 * public to avoid synthetic method access from inner class
+	 *
+	 * @return
+	 */
+	public IFile getFile() {
+		return this.fFile;
+	}
+
+	/**
+	 * There is no default label for a basic query,
+	 * this should be overridden by implementing classes
+	 * 
+	 * @see org.eclipse.search.ui.ISearchQuery#getLabel()
+	 */
+	public String getLabel() {
+		return ""; //$NON-NLS-1$
+	}
+
+	/**
+	 * <p>This will be <code>null</code> if {@link #setResult(AbstractTextSearchResult)}
+	 * has not been called yet.</p>
+	 * 
+	 * @see org.eclipse.search.ui.ISearchQuery#getSearchResult()
+	 */
+	public ISearchResult getSearchResult() {
+		return fResult;
+	}
+
+	/**
+	 * Adds a match to the results of this query.
+	 * 
+	 * <p><b>IMPORTANT: </b>It is very important that after
+	 * creating the query and <b>before</b> running the query
+	 * that you call {@link #setResult(AbstractTextSearchResult)}.
+	 * This is not a parameter because typically a search result needs
+	 * a reference to its query and thus the query needs to be constructed
+	 * before its result object can be set.</p>
+	 * 
+	 * @param document the document the match is being added too
+	 * @param matchStart the start character of the match
+	 * @param matchEnd the end character of the match
+	 */
+	public void addMatch(IDocument document, int matchStart, int matchEnd) {
+
+		try {
+			int lineNumber = document.getLineOfOffset(matchStart);
+			int lineStart = document.getLineOffset(lineNumber);
+			int lineLength = document.getLineLength(lineNumber);
+
+			String elementMessage = document.get().substring(lineStart, lineStart + lineLength);
+			
+			//add the match to the result
+				BasicSearchMatchElement element = new BasicSearchMatchElement(fFile, lineNumber, lineStart, elementMessage);
+				fResult.addMatch(new Match(element, Match.UNIT_CHARACTER, matchStart, matchEnd - matchStart));
+			
+		} catch (BadLocationException e) {
+			Logger.logException(e);
+		}
+	}
+
+	/**
+	 * <p><i>Note: </i> as of yet no testing has gone into whether this query
+	 * can be re-run or not or what that even entails.<p>
+	 * 
+	 * @see org.eclipse.search.ui.ISearchQuery#canRerun()
+	 */
+	public boolean canRerun() {
+		return false;
+	}
+
+	/**
+	 * <p>This query can be run in the background</p>
+	 * 
+	 * @see org.eclipse.search.ui.ISearchQuery#canRunInBackground()
+	 */
+	public boolean canRunInBackground() {
+		return true;
+	}
+	
+	/**
+	 * <p>The actual work of the query, called by {@link #run(IProgressMonitor)}</p>
+	 * <p><i>Note: </i>This method should be overridden by implementers so that their query
+	 * will actually do something</p>
+	 * 
+	 * @return the status of the query when it has finished
+	 */
+	protected IStatus doQuery() {
+		return Status.OK_STATUS;
+	}
+	
+	/**
+	 * @return the total number of matches this query found
+	 */
+	protected int getMatchCount() {
+		return fResult.getMatchCount();
+	}
+	
+	/**
+	 * <p>used in search result display labels, should be overridden by implementers</p>
+	 * 
+	 * @return
+	 */
+	protected String getSearchText() {
+		return ""; //$NON-NLS-1$
+	}
+	
+	/**
+	 * <p>This <b>needs</b> to be called after constructing
+	 * the query but before running it, see note on {@link #BasicSearchQuery(IFile)}</p>
+	 * 
+	 * @param result the result this query will use to store its results
+	 */
+	protected void setResult(AbstractTextSearchResult result) {
+		this.fResult = result;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionDelegate.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionDelegate.java
new file mode 100644
index 0000000..ebc74e4
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionDelegate.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.search;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.util.PlatformStatusLineUtil;
+
+/**
+ * Performs the appropriate FindOccurrencesProcessor action call based on
+ * selection. Clients can add processors for different partitions via
+ * <code>getProcessors</code>
+ * 
+ */
+abstract public class FindOccurrencesActionDelegate implements IEditorActionDelegate, IActionDelegate2, IViewActionDelegate {
+	private IEditorPart fEditor;
+
+	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+		fEditor = targetEditor;
+	}
+
+	public void dispose() {
+		// nulling out just in case
+		fEditor = null;
+	}
+
+	public void init(IAction action) {
+		if (action != null) {
+			action.setText(SSEUIMessages.FindOccurrences_label);
+		}
+	}
+
+	public void runWithEvent(IAction action, Event event) {
+		run(action);
+	}
+
+	public void run(IAction action) {
+		boolean okay = false;
+		if (fEditor instanceof ITextEditor) {
+			ITextEditor textEditor = (ITextEditor) fEditor;
+			IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
+			if (document != null) {
+				ITextSelection textSelection = getTextSelection(textEditor);
+				FindOccurrencesProcessor findOccurrenceProcessor = getProcessorForCurrentSelection(document, textSelection);
+				if (findOccurrenceProcessor != null) {
+					if (textEditor.getEditorInput() instanceof IFileEditorInput) {
+						IFile file = ((IFileEditorInput) textEditor.getEditorInput()).getFile();
+						okay = findOccurrenceProcessor.findOccurrences(document, textSelection, file);
+					}
+				}
+			}
+		}
+		if (okay) {
+			// clear status message
+			PlatformStatusLineUtil.clearStatusLine();
+		}
+		else {
+			String errorMessage = SSEUIMessages.FindOccurrencesActionProvider_0; //$NON-NLS-1$
+			if (fEditor instanceof StructuredTextEditor) {
+				PlatformStatusLineUtil.displayTemporaryErrorMessage(((StructuredTextEditor) fEditor).getTextViewer(), errorMessage);
+
+			}
+			else {
+				PlatformStatusLineUtil.displayErrorMessage(errorMessage);
+				PlatformStatusLineUtil.addOneTimeClearListener();
+			}
+		}
+	}
+
+	public void init(IViewPart view) {
+		// do nothing
+	}
+
+	public void selectionChanged(IAction action, ISelection selection) {
+		// clear status message
+		PlatformStatusLineUtil.clearStatusLine();
+	}
+
+	/**
+	 * Get the appropriate find occurrences processor
+	 * 
+	 * @param document -
+	 *            assumes not null
+	 * @param textSelection
+	 * @return
+	 */
+	private FindOccurrencesProcessor getProcessorForCurrentSelection(IDocument document, ITextSelection textSelection) {
+		// check if we have an action that's enabled on the current partition
+		ITypedRegion tr = getPartition(document, textSelection);
+		String partition = tr != null ? tr.getType() : ""; //$NON-NLS-1$
+
+		Iterator it = getProcessors().iterator();
+		FindOccurrencesProcessor processor = null;
+		while (it.hasNext()) {
+			processor = (FindOccurrencesProcessor) it.next();
+			// we just choose the first action that can handle the partition
+			if (processor.enabledForParitition(partition))
+				return processor;
+		}
+		List extendedFindOccurrencesProcessors = ExtendedConfigurationBuilder.getInstance().getConfigurations(FindOccurrencesProcessor.class.getName(), partition);
+		for (int i = 0; i < extendedFindOccurrencesProcessors.size(); i++) {
+			Object o = extendedFindOccurrencesProcessors.get(i);
+			if (o instanceof FindOccurrencesProcessor) {
+				/*
+				 * We just choose the first registered processor that
+				 * explicitly says it can handle the partition
+				 */
+				processor = (FindOccurrencesProcessor) o;
+				if (processor.enabledForParitition(partition))
+					return processor;
+			}
+		}
+		return null;
+	}
+
+	private ITypedRegion getPartition(IDocument document, ITextSelection textSelection) {
+		ITypedRegion region = null;
+		if (textSelection != null) {
+			try {
+				region = document.getPartition(textSelection.getOffset());
+			}
+			catch (BadLocationException e) {
+				region = null;
+			}
+		}
+		return region;
+	}
+
+	private ITextSelection getTextSelection(ITextEditor textEditor) {
+		ITextSelection textSelection = null;
+		ISelection selection = textEditor.getSelectionProvider().getSelection();
+		if (selection instanceof ITextSelection && !selection.isEmpty()) {
+			textSelection = (ITextSelection) selection;
+		}
+		return textSelection;
+	}
+
+	abstract protected List getProcessors();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesProcessor.java
new file mode 100644
index 0000000..dfe0917
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesProcessor.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.search;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.search.ui.ISearchQuery;
+import org.eclipse.search.ui.NewSearchUI;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+
+/**
+ * <p>
+ * Finds occurrences of a specified region type w/ region text in an
+ * IStructuredDocument. Clients must implement getPartitionTypes() and
+ * getRegionTypes() to indicate which partition types and region types it can
+ * operate on.
+ * </p>
+ * 
+ * <p>
+ * Clients should override <code>getSearchQuery()</code> in order to provide
+ * their own type of "search" (eg. searching for XML start tags, searching for
+ * Java elements, etc...)
+ * </p>
+ * 
+ */
+abstract public class FindOccurrencesProcessor {
+	public boolean findOccurrences(IDocument document, ITextSelection textSelection, IFile file) {
+		boolean findOccurrences = false;
+
+		// determine if action should be enabled or not
+		if (document instanceof IStructuredDocument) {
+			IStructuredDocument structuredDocument = (IStructuredDocument) document;
+			IStructuredDocumentRegion sdRegion = structuredDocument.getRegionAtCharacterOffset(textSelection.getOffset());
+			if (sdRegion != null) {
+				ITextRegion r = sdRegion.getRegionAtCharacterOffset(textSelection.getOffset());
+				if (r != null) {
+					String type = r.getType();
+					if (enabledForRegionType(type)) {
+						String matchText = sdRegion.getText(r);
+
+						// first of all activate the view
+						NewSearchUI.activateSearchResultView();
+
+						if (matchText != null && type != null) {
+							ISearchQuery searchQuery = getSearchQuery(file, structuredDocument, matchText, type, textSelection);
+							if (searchQuery != null) {
+								if (searchQuery.canRunInBackground())
+									NewSearchUI.runQueryInBackground(searchQuery);
+								else
+									NewSearchUI.runQueryInForeground(null, searchQuery);
+							}
+							findOccurrences = true;
+						}
+					}
+				}
+			}
+		}
+		return findOccurrences;
+	}
+
+	/**
+	 * @param regionType
+	 * @return <code>true</code> if this action can operate on this region
+	 *         type (ITextRegion), otherwise false.
+	 */
+	protected boolean enabledForRegionType(String regionType) {
+
+		String[] accept = getRegionTypes();
+		for (int i = 0; i < accept.length; i++) {
+			if (regionType.equals(accept[i]))
+				return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Clients should override this to enable find occurrences on certain
+	 * partition(s).
+	 */
+	abstract protected String[] getPartitionTypes();
+
+	/**
+	 * Clients should override this to enable find occurrences on different
+	 * region type(s).
+	 */
+	abstract protected String[] getRegionTypes();
+
+	/**
+	 * Clients should override to provide their own search for the file.
+	 */
+	protected ISearchQuery getSearchQuery(IFile file, IStructuredDocument document, String regionText, String regionType, ITextSelection textSelection) {
+		return new OccurrencesSearchQuery(file, document, regionText, regionType);
+	}
+
+	/**
+	 * @param partitionType
+	 * @return <code>true</code> if this action can operate on this type of
+	 *         partition, otherwise <code>false</code>.
+	 */
+	public boolean enabledForParitition(String partitionType) {
+		String[] accept = getPartitionTypes();
+		for (int i = 0; i < accept.length; i++) {
+			if (partitionType.equals(accept[i]))
+				return true;
+		}
+		return false;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesContentProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesContentProvider.java
new file mode 100644
index 0000000..274c9b6
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesContentProvider.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.search;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * @author pavery
+ */
+public class OccurrencesContentProvider implements IStructuredContentProvider {
+
+	protected final Object[] EMPTY_ARRAY = new Object[0];
+	private OccurrencesSearchResult fResult = null;
+	private TableViewer fTableViewer = null;
+
+	public void clear() {
+		if (this.fTableViewer != null)
+			this.fTableViewer.refresh();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	public void dispose() {
+		// do nothing
+	}
+
+	public void elementsChanged(Object[] updatedElements) {
+
+		//TODO: copied from JavaSearchTableContentProvider
+		int addCount = 0;
+		int removeCount = 0;
+		for (int i = 0; i < updatedElements.length; i++) {
+			if (this.fResult.getMatchCount(updatedElements[i]) > 0) {
+				if (this.fTableViewer.testFindItem(updatedElements[i]) != null)
+					this.fTableViewer.refresh(updatedElements[i]);
+				else
+					this.fTableViewer.add(updatedElements[i]);
+				addCount++;
+			} else {
+				this.fTableViewer.remove(updatedElements[i]);
+				removeCount++;
+			}
+		}
+	}
+
+
+	/**
+	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+	 */
+	public Object[] getElements(Object inputElement) {
+
+		this.fResult = (OccurrencesSearchResult) inputElement;
+		return this.fResult.getElements();
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
+	 *      java.lang.Object, java.lang.Object)
+	 */
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+		if (viewer instanceof TableViewer)
+			this.fTableViewer = (TableViewer) viewer;
+		this.fResult = (OccurrencesSearchResult) newInput;
+	}
+
+	public void refresh() {
+
+		if (this.fTableViewer != null)
+			this.fTableViewer.refresh();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java
new file mode 100644
index 0000000..b37babf
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.search;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+/**
+ * Basic ISearchQuery that finds matches of region type and region text.
+ * 
+ * @author pavery
+ */
+public class OccurrencesSearchQuery extends BasicSearchQuery {
+
+	/**
+	 * We need a runnable so that the search markers show up in the live
+	 * document.
+	 */
+	private class FindRegions implements IWorkspaceRunnable {
+
+		private IStructuredDocument fFindRegionsDocument = null;
+		private String fMatchName = null;
+		private String fMatchRegionType = null;
+
+		public FindRegions(IStructuredDocument document, String matchText, String matchRegionType) {
+
+			this.fFindRegionsDocument = document;
+			this.fMatchName = matchText;
+			this.fMatchRegionType = matchRegionType;
+		}
+
+		private void findOccurrences(IProgressMonitor monitor) {
+
+			if (!isCanceled(monitor)) {
+
+				int matchStart = -1;
+				int matchEnd = -1;
+				String findRegionText = ""; //$NON-NLS-1$
+
+				ITextRegion r = null;
+				ITextRegionList regions = null;
+				IStructuredDocumentRegion current = this.fFindRegionsDocument.getFirstStructuredDocumentRegion();
+
+				// this is the main loop that iterates the document
+				while (current != null && !isCanceled(monitor)) {
+					regions = current.getRegions();
+					for (int i = 0; i < regions.size() && !isCanceled(monitor); i++) {
+
+						r = regions.get(i);
+
+						// maybe this is the equals check where some valid
+						// matches are failing (like searching on end tag)
+						if (r.getType().equals(this.fMatchRegionType) && current.getText(r).equals(this.fMatchName)) {
+
+							findRegionText = current.getText(r);
+
+							// region found
+							matchStart = current.getStartOffset(r);
+							matchEnd = matchStart + findRegionText.trim().length();
+
+							addMatch(this.fFindRegionsDocument, matchStart, matchEnd);
+						}
+					}
+					current = current.getNext();
+				}
+			}
+		}
+
+		private boolean isCanceled(IProgressMonitor monitor) {
+			return monitor != null && monitor.isCanceled();
+		}
+
+		public void run(IProgressMonitor monitor) throws CoreException {
+
+			try {
+				findOccurrences(monitor);
+			} catch (Exception e) {
+				Logger.logException(e);
+			}
+		}
+	}// end inner class FindRegions
+
+
+	private IStructuredDocument fDocument = null;
+	private String fRegionText = null;
+	private String fRegionType = null;
+
+	public OccurrencesSearchQuery(IFile file, IStructuredDocument document, String regionText, String regionType) {
+		super(file);
+		super.setResult(new OccurrencesSearchResult(this));
+		this.fDocument = document;
+		this.fRegionText = regionText;
+		this.fRegionType = regionType;
+	}
+
+	/**
+	 * <p><i>Note: </i>Some investigation needs to be put into how to do this safely</p>
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.search.BasicSearchQuery#canRunInBackground()
+	 */
+	public boolean canRunInBackground() {
+		return false;
+	}
+	
+	/**
+	 * <p>The label format is:<br/>
+	 * searchText - # occurrences in file</p>
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.search.BasicSearchQuery#getLabel()
+	 */
+	public String getLabel() {
+		String label = SSEUIMessages.OccurrencesSearchQuery_0; //$NON-NLS-1$
+		String[] args = {getSearchText(), "" + super.getMatchCount(), getFilename()};
+		return MessageFormat.format(label, args);
+	}
+
+	/**
+	 * This query looks for all occurrences of the selected string
+	 * 
+	 * @see org.eclipse.wst.sse.ui.internal.search.BasicSearchQuery#doQuery()
+	 */
+	protected IStatus doQuery() {
+		IStatus status = Status.OK_STATUS;
+		FindRegions findRegions = new FindRegions(this.fDocument, this.fRegionText, this.fRegionType);
+		try {
+			// BUG158846 - deadlock if lock up entire workspace, so only lock
+			// up the file we are searching on
+			ISchedulingRule markerRule = ResourcesPlugin.getWorkspace().getRuleFactory().markerRule(getFile());
+			ResourcesPlugin.getWorkspace().run(findRegions, markerRule, IWorkspace.AVOID_UPDATE, null);
+		} catch (CoreException e) {
+			status = new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.OK, "", null); //$NON-NLS-1$
+		}
+		return status;
+	}
+
+	protected String getSearchText() {
+		return this.fRegionText;
+	}
+	
+	private String getFilename() {
+		String filename = SSEUIMessages.OccurrencesSearchQuery_2; //$NON-NLS-1$ "file"
+		if (getFile() != null)
+			filename = getFile().getName().toString();
+		return filename;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchResult.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchResult.java
new file mode 100644
index 0000000..8082773
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchResult.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.search;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.search.ui.ISearchQuery;
+import org.eclipse.search.ui.text.AbstractTextSearchResult;
+import org.eclipse.search.ui.text.IEditorMatchAdapter;
+import org.eclipse.search.ui.text.IFileMatchAdapter;
+import org.eclipse.search.ui.text.Match;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
+
+
+/**
+ * @author pavery
+ */
+public class OccurrencesSearchResult extends AbstractTextSearchResult implements IEditorMatchAdapter, IFileMatchAdapter {
+
+	private ISearchQuery fQuery = null;
+	private final Match[] NO_MATCHES = new Match[0];
+
+	public OccurrencesSearchResult(ISearchQuery query) {
+		this.fQuery = query;
+	}
+
+	/**
+	 * @see org.eclipse.search.ui.text.IEditorMatchAdapter#computeContainedMatches(org.eclipse.search.ui.text.AbstractTextSearchResult,
+	 *      org.eclipse.ui.IEditorPart)
+	 */
+	public Match[] computeContainedMatches(AbstractTextSearchResult result, IEditorPart editor) {
+
+		IEditorInput editorInput = editor.getEditorInput();
+		if (editorInput instanceof IFileEditorInput) {
+			IFileEditorInput fileEditorInput = (IFileEditorInput) editorInput;
+			return computeContainedMatches(result, fileEditorInput.getFile());
+		}
+		return this.NO_MATCHES;
+	}
+
+	/**
+	 * @see org.eclipse.search.ui.text.IFileMatchAdapter#computeContainedMatches(org.eclipse.search.ui.text.AbstractTextSearchResult,
+	 *      org.eclipse.core.resources.IFile)
+	 */
+	public Match[] computeContainedMatches(AbstractTextSearchResult result, IFile file) {
+		Match[] matches = this.getMatches();
+		Match[] containedMatches = new Match[0];
+		
+		/* only contains matches if the file for one of the matches is the
+		 * same as the given file.
+		 * Note: all matches in a result are related to the same file
+		 */
+		if(matches.length > 0 &&
+			matches[0].getElement() instanceof BasicSearchMatchElement &&
+			((BasicSearchMatchElement)matches[0].getElement()).getFile().equals(file)) {
+			
+			containedMatches = matches;
+		}
+		return containedMatches;
+	}
+
+	/**
+	 * @see org.eclipse.search.ui.text.AbstractTextSearchResult#getEditorMatchAdapter()
+	 */
+	public IEditorMatchAdapter getEditorMatchAdapter() {
+		return this;
+	}
+
+	/**
+	 * @see org.eclipse.search.ui.text.IFileMatchAdapter#getFile(java.lang.Object)
+	 */
+	public IFile getFile(Object element) {
+		// return the file for the match
+		IFile file = null;
+		//System.out.println("get file for:"+element);
+		if (element instanceof IMarker) {
+			IResource r = ((IMarker) element).getResource();
+			if (r instanceof IFile) {
+				file = (IFile) r;
+			}
+		}
+		return file;
+	}
+
+	public IFileMatchAdapter getFileMatchAdapter() {
+		return this;
+	}
+
+	public ImageDescriptor getImageDescriptor() {
+		return EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_OBJ_OCC_MATCH);
+	}
+
+	/**
+	 * This label shows up in the search history
+	 */
+	public String getLabel() {
+		return getQuery().getLabel();
+	}
+
+	/**
+	 * @return the matches associated with this result
+	 */
+	public Match[] getMatches() {
+		return collectMatches(getElements());
+	}
+
+	public ISearchQuery getQuery() {
+		return this.fQuery;
+	}
+
+	public String getTooltip() {
+		return getLabel();
+	}
+
+	/**
+	 * @see org.eclipse.search.ui.text.IEditorMatchAdapter#isShownInEditor(org.eclipse.search.ui.text.Match,
+	 *      org.eclipse.ui.IEditorPart)
+	 */
+	public boolean isShownInEditor(Match match, IEditorPart editor) {
+		return true;
+	}
+	
+	/**
+	 * <p>Taken from {@link org.eclipse.jdt.internal.ui.search.OccurrencesSearchResult#collectMatches}</p>
+	 * 
+	 * @param elements get the matches for these elements
+	 * @return the matches associated with this result
+	 */
+	private Match[] collectMatches(Object[] elements) {
+		Match[] matches= new Match[getMatchCount()];
+		int writeIndex= 0;
+		for (int i= 0; i < elements.length; i++) {
+			Match[] perElement= getMatches(elements[i]);
+			for (int j= 0; j < perElement.length; j++) {
+				matches[writeIndex++]= perElement[j];
+			}
+		}
+		return matches;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchViewPage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchViewPage.java
new file mode 100644
index 0000000..2e61980
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchViewPage.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.search;
+
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.search.ui.text.AbstractTextSearchViewPage;
+import org.eclipse.search.ui.text.Match;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+
+/**
+ * Base page for Occurrences in file search results.
+ * 
+ * @author pavery
+ */
+public class OccurrencesSearchViewPage extends AbstractTextSearchViewPage {
+
+	private OccurrencesContentProvider fContentProvider = null;
+
+	public OccurrencesSearchViewPage() {
+		super(AbstractTextSearchViewPage.FLAG_LAYOUT_FLAT);
+	}
+
+	/**
+	 * @see org.eclipse.search.ui.text.AbstractTextSearchViewPage#clear()
+	 */
+	protected void clear() {
+		if (this.fContentProvider != null)
+			this.fContentProvider.clear();
+	}
+
+	/**
+	 * @see org.eclipse.search.ui.text.AbstractTextSearchViewPage#configureTableViewer(org.eclipse.jface.viewers.TableViewer)
+	 */
+	protected void configureTableViewer(TableViewer viewer) {
+
+		//sort results by line number, low to high
+		viewer.setComparator(new ViewerComparator() {
+			public int compare(Viewer v, Object obj1, Object obj2) {
+				BasicSearchMatchElement elem1= (BasicSearchMatchElement) obj1;
+				BasicSearchMatchElement elem2= (BasicSearchMatchElement) obj2;
+				return elem1.getLineNum() - elem2.getLineNum();
+			}
+		});
+		
+		//allow for formated labels
+		viewer.setLabelProvider(new DelegatingStyledCellLabelProvider(new BasicSearchLabelProvider(this)));
+		this.fContentProvider = new OccurrencesContentProvider();
+		viewer.setContentProvider(this.fContentProvider);
+	}
+
+	/**
+	 * @see org.eclipse.search.ui.text.AbstractTextSearchViewPage#configureTreeViewer(org.eclipse.jface.viewers.TreeViewer)
+	 */
+	protected void configureTreeViewer(TreeViewer viewer) {
+		// not supported at the moment
+	}
+
+	/**
+	 * @see org.eclipse.search.ui.text.AbstractTextSearchViewPage#elementsChanged(java.lang.Object[])
+	 */
+	protected void elementsChanged(Object[] objects) {
+		if (this.fContentProvider != null) {
+			this.fContentProvider.elementsChanged(objects);
+		}
+	}
+
+	public void forceRefresh() {
+		this.fContentProvider.refresh();
+	}
+
+	private IWorkbenchPage getActivePage() {
+
+		IWorkbench workbench = PlatformUI.getWorkbench();
+		IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+		if (window == null)
+			return null;
+		return workbench.getActiveWorkbenchWindow().getActivePage();
+	}
+
+	/**
+	 * @see org.eclipse.search.ui.text.AbstractTextSearchViewPage#showMatch(org.eclipse.search.ui.text.Match,
+	 *      int, int)
+	 */
+	protected void showMatch(Match match, int currentOffset, int currentLength, boolean activate) throws PartInitException {
+		BasicSearchMatchElement element = (BasicSearchMatchElement) match.getElement();
+		
+		IWorkbenchPage activePage = getActivePage();
+		try {
+			if (activePage != null) {
+				// open editor if needed
+				IDE.openEditor(getActivePage(), element.getFile());
+				//set the selection in the open editor
+				IEditorPart editor = activePage.getActiveEditor();
+				if (activate)
+					editor.getSite().getPage().activate(editor);
+				editor.getEditorSite().getSelectionProvider().setSelection(
+					new TextSelection(currentOffset, currentLength));
+			}
+		} catch (PartInitException e) {
+			// possible exception trying to open editor
+			Logger.logException(e);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/SelectionHistory.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/SelectionHistory.java
new file mode 100644
index 0000000..79a8857
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/SelectionHistory.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.selection;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.util.Assert;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+public class SelectionHistory {
+	private ITextEditor fEditor;
+	private List fHistory;
+	private List fHistoryActions;
+	private int fSelectionChangeListenerCounter;
+	private ISelectionChangedListener fSelectionListener;
+
+	public SelectionHistory(ITextEditor editor) {
+		Assert.isNotNull(editor);
+		fEditor = editor;
+		fHistory = new ArrayList(3);
+		fSelectionListener = new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				if (fSelectionChangeListenerCounter == 0)
+					flush();
+			}
+		};
+		fEditor.getSelectionProvider().addSelectionChangedListener(fSelectionListener);
+	}
+
+	public void dispose() {
+		fEditor.getSelectionProvider().removeSelectionChangedListener(fSelectionListener);
+		fEditor = null;
+		if (fHistory != null && !fHistory.isEmpty()) {
+			fHistory.clear();
+		}
+		if (fHistoryActions != null && !fHistoryActions.isEmpty()) {
+			fHistoryActions.clear();
+		}
+	}
+
+	public void flush() {
+		if (fHistory.isEmpty())
+			return;
+		fHistory.clear();
+		updateHistoryAction();
+	}
+
+	public IRegion getLast() {
+		if (isEmpty())
+			return null;
+		int size = fHistory.size();
+		IRegion result = (IRegion) fHistory.remove(size - 1);
+		updateHistoryAction();
+		return result;
+	}
+
+	public void ignoreSelectionChanges() {
+		fSelectionChangeListenerCounter++;
+	}
+
+	public boolean isEmpty() {
+		return fHistory.isEmpty();
+	}
+
+	public void listenToSelectionChanges() {
+		fSelectionChangeListenerCounter--;
+	}
+
+	public void remember(IRegion region) {
+		fHistory.add(region);
+		updateHistoryAction();
+	}
+
+	public void setHistoryAction(IAction action) {
+		Assert.isNotNull(action);
+		
+		if (fHistoryActions == null)
+			fHistoryActions = new ArrayList();
+		if (!fHistoryActions.contains(action))
+			fHistoryActions.add(action);
+		
+		// update action
+		if (fHistory != null && !fHistory.isEmpty())
+			action.setEnabled(true);
+		else
+			action.setEnabled(false);
+	}
+
+	private void updateHistoryAction() {
+		if (fHistoryActions != null && !fHistoryActions.isEmpty()) {
+			boolean enabled = false;
+			if (fHistory != null && !fHistory.isEmpty())
+				enabled = true;
+
+			Iterator iter = fHistoryActions.iterator();
+			while (iter.hasNext()) {
+				((IAction)iter.next()).setEnabled(enabled);
+			}
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectAction.java
new file mode 100644
index 0000000..fc27d39
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectAction.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.selection;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.util.Assert;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+import org.w3c.dom.Node;
+
+/**
+ * @deprecated use StructuredSelectActionDelegate instead
+ */
+
+public abstract class StructureSelectAction extends Action {
+	protected StructuredTextEditor fEditor = null;
+	protected SelectionHistory fHistory;
+	protected IStructuredModel fModel = null;
+	protected StructuredTextViewer fViewer = null;
+
+	public StructureSelectAction(StructuredTextEditor editor) {
+		super();
+
+		Assert.isNotNull(editor);
+		fEditor = editor;
+		fHistory = (SelectionHistory) editor.getAdapter(SelectionHistory.class);
+		fViewer = editor.getTextViewer();
+		fModel = editor.getModel();
+		Assert.isNotNull(fViewer);
+	}
+
+	abstract protected IndexedRegion getCursorIndexedRegion();
+
+	protected IndexedRegion getIndexedRegion(int offset) {
+		IndexedRegion indexedRegion = null;
+
+		int lastOffset = offset;
+		IDocument document = fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
+		IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
+		if (model != null) {
+			try {
+				indexedRegion = model.getIndexedRegion(lastOffset);
+				while (indexedRegion == null && lastOffset >= 0) {
+					lastOffset--;
+					indexedRegion = model.getIndexedRegion(lastOffset);
+				}
+			}
+			finally {
+				model.releaseFromRead();
+			}
+		}
+
+		return indexedRegion;
+	}
+
+	abstract protected Region getNewSelectionRegion(Node node, Region region);
+
+	public void run() {
+		Region currentRegion = new Region(fViewer.getSelectedRange().x, fViewer.getSelectedRange().y);
+		if (currentRegion.getLength() == fViewer.getDocument().getLength())
+			return;
+
+		IndexedRegion cursorIndexedRegion = getCursorIndexedRegion();
+		if (cursorIndexedRegion instanceof Node) {
+			Node cursorNode = (Node) cursorIndexedRegion;
+
+			// use parent node for empty text node
+			if (cursorNode.getNodeType() == Node.TEXT_NODE && cursorNode.getNodeValue().trim().length() == 0) {
+				cursorNode = cursorNode.getParentNode();
+
+				if (cursorNode instanceof IndexedRegion)
+					cursorIndexedRegion = (IndexedRegion) cursorNode;
+			}
+
+			Region cursorNodeRegion = new Region(cursorIndexedRegion.getStartOffset(), cursorIndexedRegion.getEndOffset() - cursorIndexedRegion.getStartOffset());
+
+			Region newRegion = null;
+			if (cursorNodeRegion.getOffset() >= currentRegion.getOffset() && cursorNodeRegion.getOffset() <= currentRegion.getOffset() + currentRegion.getLength() && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= currentRegion.getOffset() && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= currentRegion.getOffset() + currentRegion.getLength())
+				newRegion = getNewSelectionRegion(cursorNode, currentRegion);
+			else
+				newRegion = cursorNodeRegion;
+
+			if (newRegion != null) {
+				fHistory.remember(currentRegion);
+				try {
+					fHistory.ignoreSelectionChanges();
+					fEditor.selectAndReveal(newRegion.getOffset(), newRegion.getLength());
+				}
+				finally {
+					fHistory.listenToSelectionChanges();
+				}
+			}
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectHistoryAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectHistoryAction.java
new file mode 100644
index 0000000..8037c52
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectHistoryAction.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.selection;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.ui.texteditor.IUpdate;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.w3c.dom.Node;
+
+public class StructureSelectHistoryAction extends StructureSelectAction implements IUpdate {
+	public StructureSelectHistoryAction(StructuredTextEditor editor) {
+		super(editor);
+		setText(SSEUIMessages.StructureSelectHistory_label); //$NON-NLS-1$
+		setToolTipText(SSEUIMessages.StructureSelectHistory_tooltip); //$NON-NLS-1$
+		setDescription(SSEUIMessages.StructureSelectHistory_description); //$NON-NLS-1$
+
+		update();
+	}
+
+	protected IndexedRegion getCursorIndexedRegion() {
+		return null;
+	}
+
+	protected Region getNewSelectionRegion(Node node, Region region) {
+		return null;
+	}
+
+	public void run() {
+		IRegion old = fHistory.getLast();
+		if (old != null) {
+			try {
+				fHistory.ignoreSelectionChanges();
+				fEditor.selectAndReveal(old.getOffset(), old.getLength());
+			} finally {
+				fHistory.listenToSelectionChanges();
+			}
+		}
+	}
+
+	public void update() {
+		setEnabled(!fHistory.isEmpty());
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructuredSelectActionDelegate.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructuredSelectActionDelegate.java
new file mode 100644
index 0000000..dbdf4ae
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructuredSelectActionDelegate.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.selection;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+
+abstract public class StructuredSelectActionDelegate implements IEditorActionDelegate, IActionDelegate2, IViewActionDelegate {
+	private IEditorPart fEditor;
+	private SelectionHistory fHistory;
+
+	public void dispose() {
+		fEditor = null;
+		fHistory = null;
+	}
+
+	public void init(IViewPart view) {
+		// do nothing
+	}
+
+	public void runWithEvent(IAction action, Event event) {
+		run(action);
+	}
+
+	public void run(IAction action) {
+		if (fEditor instanceof ITextEditor) {
+			ITextEditor textEditor = (ITextEditor) fEditor;
+
+			ISelection selection = textEditor.getSelectionProvider().getSelection();
+			IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
+			// determine current text selection
+			if (selection instanceof ITextSelection && document != null) {
+				ITextSelection textSelection = (ITextSelection) selection;
+
+				if (textSelection.getLength() < document.getLength()) {
+					// get current indexed region
+					IndexedRegion cursorIndexedRegion = getCursorIndexedRegion(document, textSelection);
+
+					// determine new selection based on current indexed region
+					Region newSelectionRegion = getNewSelectionRegion(cursorIndexedRegion, textSelection);
+
+					// select new selection
+					if (newSelectionRegion != null) {
+						fHistory.remember(new Region(textSelection.getOffset(), textSelection.getLength()));
+						try {
+							fHistory.ignoreSelectionChanges();
+							textEditor.selectAndReveal(newSelectionRegion.getOffset(), newSelectionRegion.getLength());
+						}
+						finally {
+							fHistory.listenToSelectionChanges();
+						}
+					}
+				}
+			}
+		}
+	}
+
+	public void selectionChanged(IAction action, ISelection selection) {
+		// do nothing
+	}
+
+	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+		fEditor = targetEditor;
+		if (fEditor != null)
+			fHistory = (SelectionHistory) fEditor.getAdapter(SelectionHistory.class);
+		else
+			fHistory = null;
+	}
+	
+	abstract protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection);
+	
+	abstract protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection);
+	
+	/**
+	 * This method will probably be removed and replaced by using new selection provider
+	 * @param document
+	 * @param offset
+	 * @return
+	 */
+	protected IndexedRegion getIndexedRegion(IDocument document, int offset) {
+		IndexedRegion indexedRegion = null;
+
+		int lastOffset = offset;
+		IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
+		if (model != null) {
+			try {
+				indexedRegion = model.getIndexedRegion(lastOffset);
+				while (indexedRegion == null && lastOffset >= 0) {
+					lastOffset--;
+					indexedRegion = model.getIndexedRegion(lastOffset);
+				}
+			}
+			finally {
+				model.releaseFromRead();
+			}
+		}
+
+		return indexedRegion;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructuredSelectHistoryActionDelegate.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructuredSelectHistoryActionDelegate.java
new file mode 100644
index 0000000..47dc5c8
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructuredSelectHistoryActionDelegate.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.internal.selection;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+
+/**
+ * Selection history action delegate. Keeps track of selection within editor.
+ */
+public class StructuredSelectHistoryActionDelegate implements IEditorActionDelegate, IActionDelegate2, IViewActionDelegate {
+	private IEditorPart fEditor;
+	private SelectionHistory fHistory;
+
+	public void dispose() {
+		fEditor = null;
+		fHistory = null;
+	}
+
+	public void init(IAction action) {
+		if (action != null) {
+			action.setText(SSEUIMessages.StructureSelectHistory_label);
+			action.setToolTipText(SSEUIMessages.StructureSelectHistory_tooltip);
+			action.setDescription(SSEUIMessages.StructureSelectHistory_description);
+		}
+	}
+
+	public void init(IViewPart view) {
+		// do nothing
+	}
+
+	public void run(IAction action) {
+		IRegion old = fHistory.getLast();
+		if (old != null) {
+			try {
+				fHistory.ignoreSelectionChanges();
+				if (fEditor instanceof ITextEditor)
+					((ITextEditor) fEditor).selectAndReveal(old.getOffset(), old.getLength());
+			}
+			finally {
+				fHistory.listenToSelectionChanges();
+			}
+		}
+	}
+
+	public void runWithEvent(IAction action, Event event) {
+		run(action);
+	}
+
+	public void selectionChanged(IAction action, ISelection selection) {
+		// do nothing
+	}
+
+	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+		fEditor = targetEditor;
+		if (fEditor != null)
+			fHistory = (SelectionHistory) fEditor.getAdapter(SelectionHistory.class);
+		else
+			fHistory = null;
+		if (fHistory != null) {
+			fHistory.setHistoryAction(action);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/ISpellcheckDelegate.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/ISpellcheckDelegate.java
new file mode 100644
index 0000000..ce55c8f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/ISpellcheckDelegate.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.spelling;
+
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+
+/**
+ * <p>Defines an interface for deciding if an offset in an <code>IStructuredModel</code>
+ * should be spell checked. Created so that content type specific decisions
+ * could be made as to whether a region should be spell-checked or not.
+ * This is done using the <code>IAdapterFactory</code> framework.</p>
+ */
+public interface ISpellcheckDelegate {
+
+	/**
+	 * Decide if the <code>offset</code> in <code>model</code> should be spell checked or not.
+	 * 
+	 * @param offset decide if this offset in the given <code>model</code> should be spell-checked 
+	 * @param model used to decide if the given <code>offset</code> should be spell-checked
+	 * @return <code>true</code> if the given <code>offset</code> in the given <code>model</code>
+	 * should be spell checked, <code>false</code> otherwise.
+	 */
+	public boolean shouldSpellcheck(int offset, IStructuredModel model);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/SpellcheckStrategy.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/SpellcheckStrategy.java
new file mode 100644
index 0000000..d75e8e6
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/SpellcheckStrategy.java
@@ -0,0 +1,407 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.spelling;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcileStep;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModelExtension;
+import org.eclipse.jface.text.source.IAnnotationModelExtension2;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector;
+import org.eclipse.ui.texteditor.spelling.SpellingAnnotation;
+import org.eclipse.ui.texteditor.spelling.SpellingContext;
+import org.eclipse.ui.texteditor.spelling.SpellingProblem;
+import org.eclipse.ui.texteditor.spelling.SpellingService;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.parser.ForeignRegion;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
+import org.eclipse.wst.sse.core.utils.StringUtils;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey;
+import org.eclipse.wst.sse.ui.internal.reconcile.StructuredReconcileStep;
+import org.eclipse.wst.sse.ui.internal.reconcile.StructuredTextReconcilingStrategy;
+import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
+
+/**
+ * A reconciling strategy that queries the SpellingService using its default
+ * engine. Results are show as temporary annotations.
+ * 
+ * @since 1.1
+ */
+public class SpellcheckStrategy extends StructuredTextReconcilingStrategy {
+
+	class SpellCheckPreferenceListener implements IPropertyChangeListener {
+		private boolean isInterestingProperty(Object property) {
+			return SpellingService.PREFERENCE_SPELLING_ENABLED.equals(property) || SpellingService.PREFERENCE_SPELLING_ENGINE.equals(property);
+		}
+
+		public void propertyChange(PropertyChangeEvent event) {
+			if (isInterestingProperty(event.getProperty())) {
+				if (event.getOldValue() == null || event.getNewValue() == null || !event.getNewValue().equals(event.getOldValue())) {
+					reconcile();
+				}
+			}
+		}
+	}
+
+	private class SpellingProblemCollector implements ISpellingProblemCollector {
+		List annotations = new ArrayList();
+
+		public void accept(SpellingProblem problem) {
+			if (isInterestingProblem(problem)) {
+				TemporaryAnnotation annotation = new TemporaryAnnotation(new Position(problem.getOffset(), problem.getLength()), SpellingAnnotation.TYPE, problem.getMessage(), fReconcileAnnotationKey);
+
+				SpellingQuickAssistProcessor quickAssistProcessor = new SpellingQuickAssistProcessor();
+				quickAssistProcessor.setSpellingProblem(problem);
+				annotation.setAdditionalFixInfo(quickAssistProcessor);
+				annotations.add(annotation);
+				if (_DEBUG_SPELLING_PROBLEMS) {
+					Logger.log(Logger.INFO, problem.getMessage());
+				}
+			}
+		}
+
+		public void beginCollecting() {
+		}
+
+		void clear() {
+			annotations.clear();
+		}
+
+		public void endCollecting() {
+		}
+
+		Annotation[] getAnnotations() {
+			return (Annotation[]) annotations.toArray(new Annotation[annotations.size()]);
+		}
+	}
+
+	private static final boolean _DEBUG_SPELLING = Boolean.valueOf(Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/reconcilerSpelling")).booleanValue(); //$NON-NLS-1$
+	private static final boolean _DEBUG_SPELLING_PROBLEMS = Boolean.valueOf(Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/reconcilerSpelling/showProblems")).booleanValue(); //$NON-NLS-1$
+
+	private static final String EXTENDED_BUILDER_TYPE_CONTEXTS = "spellingregions"; //$NON-NLS-1$
+	private static final String KEY_CONTENT_TYPE = "org.eclipse.wst.sse.ui.temp.spelling"; //$NON-NLS-1$
+
+	private String fContentTypeId = null;
+
+	private SpellingProblemCollector fProblemCollector = new SpellingProblemCollector();
+
+	/*
+	 * Keying our Temporary Annotations based on the partition doesn't help
+	 * this strategy to only remove its own TemporaryAnnotations since it's
+	 * possibly run on all partitions. Instead, set the key to use an
+	 * arbitrary partition type that we can check for using our own
+	 * implementation of getAnnotationsToRemove(DirtyRegion).
+	 */
+	ReconcileAnnotationKey fReconcileAnnotationKey;
+
+	private IPropertyChangeListener fSpellCheckPreferenceListener;
+
+	private SpellingContext fSpellingContext;
+
+	private String[] fSupportedTextRegionContexts;
+	private IReconcileStep fSpellingStep = new StructuredReconcileStep() {
+	};
+
+	public SpellcheckStrategy(ISourceViewer viewer, String contentTypeId) {
+		super(viewer);
+		fContentTypeId = contentTypeId;
+
+		fSpellingContext = new SpellingContext();
+		IContentType contentType = Platform.getContentTypeManager().getContentType(fContentTypeId);
+		fSpellingContext.setContentType(contentType);
+		fReconcileAnnotationKey = new ReconcileAnnotationKey(fSpellingStep, KEY_CONTENT_TYPE, ReconcileAnnotationKey.PARTIAL);
+
+		/**
+		 * Inherit spelling region rules
+		 */
+		List contexts = new ArrayList();
+		IContentType testType = contentType;
+		while (testType != null) {
+			String[] textRegionContexts = ExtendedConfigurationBuilder.getInstance().getDefinitions(EXTENDED_BUILDER_TYPE_CONTEXTS, testType.getId());
+			for (int j = 0; j < textRegionContexts.length; j++) {
+				contexts.addAll(Arrays.asList(StringUtils.unpack(textRegionContexts[j])));
+			}
+			testType = testType.getBaseType();
+		}
+		fSupportedTextRegionContexts = (String[]) contexts.toArray(new String[contexts.size()]);
+
+		fSpellCheckPreferenceListener = new SpellCheckPreferenceListener();
+	}
+
+	protected boolean containsStep(IReconcileStep step) {
+		return fSpellingStep.equals(step);
+	}
+
+	public void createReconcileSteps() {
+
+	}
+
+	private TemporaryAnnotation[] getSpellingAnnotationsToRemove(IRegion region) {
+		List toRemove = new ArrayList();
+		IAnnotationModel annotationModel = getAnnotationModel();
+		// can be null when closing the editor
+		if (annotationModel != null) {
+			Iterator i = null;
+			boolean annotationOverlaps = false;
+			if (annotationModel instanceof IAnnotationModelExtension2) {
+				i = ((IAnnotationModelExtension2) annotationModel).getAnnotationIterator(region.getOffset(), region.getLength(), true, true);
+				annotationOverlaps = true;
+			}
+			else {
+				i = annotationModel.getAnnotationIterator();
+			}
+
+			while (i.hasNext()) {
+				Object obj = i.next();
+				if (!(obj instanceof TemporaryAnnotation))
+					continue;
+
+				TemporaryAnnotation annotation = (TemporaryAnnotation) obj;
+				ReconcileAnnotationKey key = (ReconcileAnnotationKey) annotation.getKey();
+
+				// then if this strategy knows how to add/remove this
+				// partition type
+				if (key != null && key.equals(fReconcileAnnotationKey)) {
+					if (key.getScope() == ReconcileAnnotationKey.PARTIAL && (annotationOverlaps || annotation.getPosition().overlapsWith(region.getOffset(), region.getLength()))) {
+						toRemove.add(annotation);
+					}
+					else if (key.getScope() == ReconcileAnnotationKey.TOTAL) {
+						toRemove.add(annotation);
+					}
+				}
+			}
+		}
+
+		return (TemporaryAnnotation[]) toRemove.toArray(new TemporaryAnnotation[toRemove.size()]);
+	}
+
+	/**
+	 * Judge whether a spelling problem is "interesting". Accept any regions
+	 * that are explicitly allowed, and since valid prose areas are rarely in
+	 * a complicated document region, accept any document region with more
+	 * than one text region and reject any document regions containing foreign
+	 * text regions.
+	 * 
+	 * @param problem
+	 *            a SpellingProblem
+	 * @return whether the collector should accept the given SpellingProblem
+	 */
+	protected boolean isInterestingProblem(SpellingProblem problem) {
+		IDocument document = getDocument();
+		if (document instanceof IStructuredDocument) {
+			/*
+			 * If the error is in a read-only section, ignore it. The user
+			 * won't be able to correct it.
+			 */
+			if (((IStructuredDocument) document).containsReadOnly(problem.getOffset(), problem.getLength()))
+				return false;
+
+			IStructuredDocumentRegion documentRegion = ((IStructuredDocument) document).getRegionAtCharacterOffset(problem.getOffset());
+			if (documentRegion != null) {
+				ITextRegion textRegion = documentRegion.getRegionAtCharacterOffset(problem.getOffset());
+				//if the region is not null, and is a supported context and is not a collection of regions,
+				//	and it should be spell-checked, then spell check it.
+				if (textRegion != null && isSupportedContext(textRegion.getType()) && !(textRegion instanceof ITextRegionCollection) && shouldSpellcheck(problem.getOffset())) {
+					return true;
+				}
+				if (documentRegion.getFirstRegion() instanceof ForeignRegion)
+					return false;
+//				[192572] Simple regions were being spellchecked just for the sake of them being simple
+//				if (documentRegion.getRegions().size() == 1)
+//					return true;
+				return false;
+			}
+		}
+		return true;
+	}
+
+
+	private boolean isSupportedContext(String type) {
+		boolean isSupported = false;
+		if (fSupportedTextRegionContexts.length > 0) {
+			for (int i = 0; i < fSupportedTextRegionContexts.length; i++) {
+				if (type.equals(fSupportedTextRegionContexts[i])) {
+					isSupported = true;
+					break;
+				}
+			}
+		}
+		else {
+			isSupported = true;
+		}
+		return isSupported;
+	}
+
+	public void reconcile() {
+		IDocument document = getDocument();
+		if (document != null) {
+			IAnnotationModel annotationModel = getAnnotationModel();
+			if (annotationModel != null) {
+				IRegion documentRegion = new Region(0, document.getLength());
+				spellCheck(documentRegion, documentRegion, annotationModel);
+			}
+		}
+	}
+
+	/**
+	 * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.reconciler.DirtyRegion,
+	 *      org.eclipse.jface.text.IRegion)
+	 */
+	public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+		if (isCanceled())
+			return;
+
+		IAnnotationModel annotationModel = getAnnotationModel();
+
+		IDocument document = getDocument();
+		if (document != null) {
+			long time0 = 0;
+			if (_DEBUG_SPELLING) {
+				time0 = System.currentTimeMillis();
+			}
+			/**
+			 * Apparently the default spelling engine has noticeable overhead
+			 * when called multiple times in rapid succession. It's faster to
+			 * check the entire dirty region at once since we know that we're
+			 * not differentiating by partition.
+			 * 
+			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=192530
+			 */
+			if (_DEBUG_SPELLING) {
+				Logger.log(Logger.INFO, "Spell Checking [" + dirtyRegion.getOffset() + ":" + dirtyRegion.getLength() + "] : " + (System.currentTimeMillis() - time0));
+			}
+			if (annotationModel != null) {
+				spellCheck(dirtyRegion, dirtyRegion, annotationModel);
+			}
+		}
+	}
+
+	private void spellCheck(IRegion dirtyRegion, IRegion regionToBeChecked, IAnnotationModel annotationModel) {
+		if (annotationModel == null)
+			return;
+
+		TemporaryAnnotation[] annotationsToRemove;
+		Annotation[] annotationsToAdd;
+		annotationsToRemove = getSpellingAnnotationsToRemove(regionToBeChecked);
+
+		if (_DEBUG_SPELLING_PROBLEMS) {
+			Logger.log(Logger.INFO, "Spell checking [" + regionToBeChecked.getOffset() + "-" + (regionToBeChecked.getOffset() + regionToBeChecked.getLength()) + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+		if (getDocument() != null) {
+			EditorsUI.getSpellingService().check(getDocument(), new IRegion[]{regionToBeChecked}, fSpellingContext, fProblemCollector, null);
+		}
+		annotationsToAdd = fProblemCollector.getAnnotations();
+		fProblemCollector.clear();
+
+
+		if (annotationModel instanceof IAnnotationModelExtension) {
+			IAnnotationModelExtension modelExtension = (IAnnotationModelExtension) annotationModel;
+			Map annotationsToAddMap = new HashMap();
+			for (int i = 0; i < annotationsToAdd.length; i++) {
+				annotationsToAddMap.put(annotationsToAdd[i], ((TemporaryAnnotation) annotationsToAdd[i]).getPosition());
+			}
+			modelExtension.replaceAnnotations(annotationsToRemove, annotationsToAddMap);
+		}
+
+		else {
+			for (int j = 0; j < annotationsToAdd.length; j++) {
+				annotationModel.addAnnotation(annotationsToAdd[j], ((TemporaryAnnotation) annotationsToAdd[j]).getPosition());
+			}
+			for (int j = 0; j < annotationsToRemove.length; j++) {
+				annotationModel.removeAnnotation(annotationsToRemove[j]);
+			}
+		}
+	}
+
+	/**
+	 * @param partition
+	 * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.IRegion)
+	 */
+
+	public void reconcile(IRegion partition) {
+		IDocument document = getDocument();
+		if (document != null) {
+			IAnnotationModel annotationModel = getAnnotationModel();
+			if (annotationModel != null) {
+				spellCheck(partition, partition, annotationModel);
+			}
+		}
+	}
+
+	public void setDocument(IDocument document) {
+		if (getDocument() != null) {
+			EditorsUI.getPreferenceStore().removePropertyChangeListener(fSpellCheckPreferenceListener);
+		}
+
+		super.setDocument(document);
+
+		if (getDocument() != null) {
+			EditorsUI.getPreferenceStore().addPropertyChangeListener(fSpellCheckPreferenceListener);
+		}
+	}
+	
+	/**
+	 * Decides if the given offset should be spell-checked using an <code>IAdapterFactory</code>
+	 * 
+	 * @param offset Decide if this offset should be spell-checked
+	 * @return <code>true</code> if the given <code>offset</code> should be spell-checked,
+	 * <code>false</code> otherwise.
+	 */
+	private boolean shouldSpellcheck(int offset) {
+		boolean decision = true;
+		
+		IStructuredModel model = null;
+		try {
+			model = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
+			
+			/* use an an adapter factory to get a spell-check decision maker,
+			 * and ask it if the  offset should be spell-checked.  It is done
+			 * this way so content type specific decisions can be made without this
+			 * plugin being aware of any content type specifics.
+			 */
+			ISpellcheckDelegate delegate = (ISpellcheckDelegate)Platform.getAdapterManager().getAdapter(model, ISpellcheckDelegate.class);
+			if(delegate != null) {
+				decision = delegate.shouldSpellcheck(offset, model);
+			}
+		}  finally {
+			if(model != null) {
+				model.releaseFromRead();
+			}
+		}
+		
+		return decision;
+	}
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/SpellingQuickAssistProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/SpellingQuickAssistProcessor.java
new file mode 100644
index 0000000..f8e4ddd
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/SpellingQuickAssistProcessor.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.spelling;
+
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
+import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.ui.texteditor.spelling.SpellingProblem;
+
+/**
+ * Spelling correction processor used to show quick fixes for spelling
+ * problems.
+ * 
+ * @since 2.0
+ */
+class SpellingQuickAssistProcessor implements IQuickAssistProcessor {
+	private SpellingProblem fSpellingProblem = null;
+
+	public boolean canAssist(IQuickAssistInvocationContext invocationContext) {
+		return false;
+	}
+
+	public boolean canFix(Annotation annotation) {
+		return !annotation.isMarkedDeleted();
+	}
+
+	public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext quickAssistContext) {
+		ICompletionProposal[] proposals = null;
+
+		if (fSpellingProblem != null) {
+			proposals = fSpellingProblem.getProposals(quickAssistContext);
+		}
+		return proposals;
+	}
+
+	public String getErrorMessage() {
+		return null;
+	}
+
+	void setSpellingProblem(SpellingProblem spellingProblem) {
+		fSpellingProblem = spellingProblem;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingManager.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingManager.java
new file mode 100644
index 0000000..a7140f5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingManager.java
@@ -0,0 +1,740 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.style;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.wst.sse.core.utils.StringUtils;
+import org.eclipse.wst.sse.ui.ISemanticHighlighting;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
+import org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler;
+import org.eclipse.wst.sse.ui.internal.reconcile.DocumentRegionProcessor;
+import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
+
+/**
+ * Semantic highlighting manager. Responsible for maintaining the semantic highlightings
+ * and the associated styles. Semantic highlighting preference changes are handled
+ * through listeners in this class. Based on org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingManager
+ * 
+ * @since 3.1
+ */
+public class SemanticHighlightingManager implements IPropertyChangeListener {
+	
+	/**
+	 * HighlightingStyle.
+	 */
+	static class HighlightingStyle {
+
+		/** Text attribute */
+		private TextAttribute fTextAttribute;
+		/** Enabled state */
+		private boolean fIsEnabled;
+
+		/**
+		 * Initialize with the given text attribute.
+		 * @param textAttribute The text attribute
+		 * @param isEnabled the enabled state
+		 */
+		public HighlightingStyle(TextAttribute textAttribute, boolean isEnabled) {
+			setTextAttribute(textAttribute);
+			setEnabled(isEnabled);
+		}
+
+		/**
+		 * @return Returns the text attribute.
+		 */
+		public TextAttribute getTextAttribute() {
+			return fTextAttribute;
+		}
+
+		/**
+		 * @param textAttribute The background to set.
+		 */
+		public void setTextAttribute(TextAttribute textAttribute) {
+			fTextAttribute = textAttribute;
+		}
+
+		/**
+		 * @return the enabled state
+		 */
+		public boolean isEnabled() {
+			return fIsEnabled;
+		}
+
+		/**
+		 * @param isEnabled the new enabled state
+		 */
+		public void setEnabled(boolean isEnabled) {
+			fIsEnabled = isEnabled;
+		}
+	}
+	
+	/**
+	 * Highlighted Positions.
+	 */
+	static class HighlightedPosition extends Position {
+
+		/** Highlighting of the position */
+		private HighlightingStyle fStyle;
+
+		private boolean fReadOnly;
+
+		/** Lock object */
+		private Object fLock;
+
+		/**
+		 * Initialize the styled positions with the given offset, length and foreground color.
+		 *
+		 * @param offset The position offset
+		 * @param length The position length
+		 * @param highlighting The position's highlighting
+		 * @param lock The lock object
+		 */
+		public HighlightedPosition(int offset, int length, HighlightingStyle highlighting, Object lock, boolean isReadOnly) {
+			super(offset, length);
+			fStyle = highlighting;
+			fLock = lock;
+			fReadOnly = isReadOnly;
+		}
+
+		public HighlightedPosition(int offset, int length, HighlightingStyle highlighting, Object lock) {
+			this(offset, length, highlighting, lock, false);
+		}
+
+		public HighlightedPosition(Position position, HighlightingStyle highlighting, Object lock) {
+			this(position.offset, position.length, highlighting, lock, false);
+		}
+
+		public HighlightedPosition(Position position, HighlightingStyle highlighting, Object lock, boolean isReadOnly) {
+			this(position.offset, position.length, highlighting, lock, isReadOnly);
+		}
+
+		/**
+		 * @return Returns a corresponding style range.
+		 */
+		public StyleRange createStyleRange() {
+			int len= 0;
+			if (fStyle.isEnabled())
+				len= getLength();
+
+			TextAttribute textAttribute = fStyle.getTextAttribute();
+			int style = textAttribute.getStyle();
+			int fontStyle = style & (SWT.ITALIC | SWT.BOLD | SWT.NORMAL);
+			StyleRange styleRange = new StyleRange(getOffset(), len, textAttribute.getForeground(), textAttribute.getBackground(), fontStyle);
+			styleRange.strikeout = (style & TextAttribute.STRIKETHROUGH) != 0;
+			styleRange.underline = (style & TextAttribute.UNDERLINE) != 0;
+
+			return styleRange;
+		}
+
+		/**
+		 * Uses reference equality for the highlighting.
+		 *
+		 * @param off The offset
+		 * @param len The length
+		 * @param highlighting The highlighting
+		 * @return <code>true</code> iff the given offset, length and highlighting are equal to the internal ones.
+		 */
+		public boolean isEqual(int off, int len, HighlightingStyle highlighting) {
+			synchronized (fLock) {
+				return !isDeleted() && getOffset() == off && getLength() == len && fStyle == highlighting;
+			}
+		}
+		
+		/**
+		 * Uses reference equality for the highlighting.
+		 *
+		 * @param pos The position
+		 * @param highlighting The highlighting
+		 * @return <code>true</code> iff the given offset, length and highlighting are equal to the internal ones.
+		 */
+		public boolean isEqual(Position pos, HighlightingStyle highlighting) {
+			synchronized (fLock) {
+				return !isDeleted() && getOffset() == pos.getOffset() && getLength() == pos.getLength() && fStyle == highlighting;
+			}
+		}
+
+		/**
+		 * Is this position contained in the given range (inclusive)? Synchronizes on position updater.
+		 *
+		 * @param off The range offset
+		 * @param len The range length
+		 * @return <code>true</code> iff this position is not delete and contained in the given range.
+		 */
+		public boolean isContained(int off, int len) {
+			synchronized (fLock) {
+				return !isDeleted() && off <= getOffset() && off + len >= getOffset() + getLength();
+			}
+		}
+
+		public void update(int off, int len) {
+			synchronized (fLock) {
+				super.setOffset(off);
+				super.setLength(len);
+			}
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.Position#setLength(int)
+		 */
+		public void setLength(int length) {
+			synchronized (fLock) {
+				super.setLength(length);
+			}
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.Position#setOffset(int)
+		 */
+		public void setOffset(int offset) {
+			synchronized (fLock) {
+				super.setOffset(offset);
+			}
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.Position#delete()
+		 */
+		public void delete() {
+			synchronized (fLock) {
+				super.delete();
+			}
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.Position#undelete()
+		 */
+		public void undelete() {
+			synchronized (fLock) {
+				super.undelete();
+			}
+		}
+
+		/**
+		 * @return Returns the highlighting.
+		 */
+		public HighlightingStyle getHighlighting() {
+			return fStyle;
+		}
+
+		public boolean isReadOnly() {
+			return fReadOnly;
+		}
+	}
+
+	/**
+	 * Highlighted ranges.
+	 */
+	public static class HighlightedRange extends Region {
+		/** The highlighting key as returned by {@link ISemanticHighlighting#getPreferenceKey()}. */
+		private String fKey;
+
+		/**
+		 * Initialize with the given offset, length and highlighting key.
+		 *
+		 * @param offset
+		 * @param length
+		 * @param key the highlighting key as returned by {@link ISemanticHighlighting#getPreferenceKey()}
+		 */
+		public HighlightedRange(int offset, int length, String key) {
+			super(offset, length);
+			fKey = key;
+		}
+
+		/**
+		 * @return the highlighting key as returned by {@link ISemanticHighlighting#getPreferenceKey()}
+		 */
+		public String getKey() {
+			return fKey;
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.Region#equals(java.lang.Object)
+		 */
+		public boolean equals(Object o) {
+			return super.equals(o) && o instanceof HighlightedRange && fKey.equals(((HighlightedRange)o).getKey());
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.Region#hashCode()
+		 */
+		public int hashCode() {
+			return super.hashCode() | fKey.hashCode();
+		}
+	}
+	
+	private static final String SEMANTIC_HIGHLIGHTING_EXTENSION_POINT = "semanticHighlighting"; //$NON-NLS-1$
+	private static final String TARGET_ATTR = "target"; //$NON-NLS-1$
+	private static final String CLASS_ATTR = "class"; //$NON-NLS-1$
+	private static final String STYLE_KEY_ATTR = "styleStringKey"; //$NON-NLS-1$
+
+	private ISourceViewer fSourceViewer;
+	private IPreferenceStore fPreferenceStore;
+	private SourceViewerConfiguration fConfiguration;
+	private StructuredPresentationReconciler fPresentationReconciler;
+	private String fContentTypeId;
+	
+	private SemanticHighlightingPresenter fPresenter;
+	private SemanticHighlightingReconciler fReconciler;
+	
+	/** The semantic highlightings for the content type */
+	private ISemanticHighlighting[] fHighlightings;
+	/** The semantic highlighting styles associated with the semantic highlightings */
+	private HighlightingStyle[] fHighlightingStyles;
+	/** The semantic highlighting style string preference keys. null of the highlighting doesn't support it */
+	private String[] fHighlightingStyleStringKeys;
+	
+	private IPropertyChangeListener fHighlightingChangeListener = new IPropertyChangeListener() {
+
+		public void propertyChange(PropertyChangeEvent event) {
+				handleHighlightingPropertyChange(event);
+		}
+	};
+	
+	public void propertyChange(PropertyChangeEvent event) {
+		handlePropertyChange(event);
+	}
+	
+	public void install(ISourceViewer sourceViewer, IPreferenceStore preferenceStore, SourceViewerConfiguration configuration, String contentTypeId) {
+		fSourceViewer = sourceViewer;
+		fPreferenceStore = preferenceStore;
+		fConfiguration = configuration;
+		fContentTypeId = contentTypeId;
+		
+		fPreferenceStore.addPropertyChangeListener(this);
+		fPresentationReconciler = (StructuredPresentationReconciler) fConfiguration.getPresentationReconciler(fSourceViewer);
+		
+		if (isEnabled()) {
+			enable();
+		}
+	}
+	
+	/**
+	 * Load the semantic highlightings defined for this content type.
+	 */
+	private void loadSemanticHighlightings() {
+		List semantics = new ArrayList(0);
+		
+		ISemanticHighlighting highlighting = null;
+		String styleKey = null;
+		IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(SSEUIPlugin.ID, SEMANTIC_HIGHLIGHTING_EXTENSION_POINT);
+		
+		IContentType contentType = Platform.getContentTypeManager().getContentType(fContentTypeId);
+		
+		for (int i = 0; i < elements.length; i++) {
+			String[] targets = StringUtils.unpack(elements[i].getAttribute(TARGET_ATTR));
+			for (int j = 0; j < targets.length; j++) {
+				IContentType targetContentType = Platform.getContentTypeManager().getContentType(targets[j]);
+				/* Apply semantic highlighting to kinds of targetContentType */
+				if (contentType.isKindOf(targetContentType)) {
+					try {
+						highlighting = (ISemanticHighlighting) elements[i].createExecutableExtension(CLASS_ATTR);
+						styleKey = elements[i].getAttribute(STYLE_KEY_ATTR);
+					} catch (CoreException e) {
+						Logger.logException(e);
+					}
+					if (highlighting != null)
+						semantics.add(new SemanticContent(targetContentType, highlighting, styleKey));
+
+					break;
+				}
+			}
+		}
+		/* Sort the semantics, so that styles will be applied from general to specific */
+		Collections.sort(semantics);
+		fHighlightings = new ISemanticHighlighting[semantics.size()];
+		fHighlightingStyles = new HighlightingStyle[semantics.size()];
+		fHighlightingStyleStringKeys = new String[semantics.size()];
+
+		for (int i = 0; i < semantics.size(); i++) {
+			fHighlightings[i] = ((SemanticContent) semantics.get(i)).getHighlighting();
+			styleKey = ((SemanticContent) semantics.get(i)).getStyleKey();
+			fHighlightingStyles[i] = createHighlightingStyle(((SemanticContent) semantics.get(i)).getHighlighting(), styleKey);
+			fHighlightingStyleStringKeys[i] = styleKey;
+		}
+	}
+	
+	/**
+	 * This class is used for relating a semantic highlighting to a content type.
+	 * The content type is used in the sorting algorithm. Content types that are more specific
+	 * to the file's content type will cause styles to be applied from general to specific
+	 */
+	private class SemanticContent implements Comparable {
+		public IContentType type;
+		public ISemanticHighlighting highlighting;
+		public String styleKey;
+
+		public SemanticContent(IContentType type, ISemanticHighlighting highlighting, String styleKey) {
+			this.type = type;
+			this.highlighting = highlighting;
+			this.styleKey = styleKey;
+		}
+
+		public int compareTo(Object arg0) {
+			SemanticContent other = (SemanticContent) arg0;
+			/* Equal weighting for the same types */
+			if (this.type.equals(other.type))
+				return 0;
+			/* Subtypes have more weight than base types */
+			if (this.type.isKindOf(other.type))
+				return 1;
+			return -1;
+		}
+		
+		public ISemanticHighlighting getHighlighting() {
+			return highlighting;
+		}
+
+		public String getStyleKey() {
+			return styleKey;
+		}
+	}
+	
+	/**
+	 * Creates a highlighting style based on the preferences defined in the semantic highlighting
+	 * @param highlighting the semantic highlighting
+	 * @return a highlighting style based on the preferences of the semantic highlighting
+	 */
+	private HighlightingStyle createHighlightingStyle(ISemanticHighlighting highlighting, String styleKey) {
+		IPreferenceStore store = highlighting.getPreferenceStore();
+		HighlightingStyle highlightingStyle = null;
+		if (store != null) {
+			TextAttribute attribute = null;
+			// A style string is used instead of separate attribute keys
+			if (styleKey != null) {
+				attribute = createTextAttribute(store.getString(styleKey));
+			}
+			else {
+				int style = getBoolean(store, highlighting.getBoldPreferenceKey()) ? SWT.BOLD : SWT.NORMAL;
+				
+				if (getBoolean(store, highlighting.getItalicPreferenceKey()))
+					style |= SWT.ITALIC;
+				if (getBoolean(store, highlighting.getStrikethroughPreferenceKey()))
+					style |= TextAttribute.STRIKETHROUGH;
+				if (getBoolean(store, highlighting.getUnderlinePreferenceKey()))
+					style |= TextAttribute.UNDERLINE;
+
+				String rgbString = getString(store, highlighting.getColorPreferenceKey());
+				Color color = null;
+				
+				if (rgbString != null)
+					color = EditorUtility.getColor(ColorHelper.toRGB(rgbString));
+				attribute = new TextAttribute(color, null, style);
+			}
+
+			store.addPropertyChangeListener(fHighlightingChangeListener);
+			boolean isEnabled = getBoolean(store, highlighting.getEnabledPreferenceKey());
+			highlightingStyle = new HighlightingStyle(attribute, isEnabled);
+		}
+		return highlightingStyle;
+	}
+
+	/**
+	 * Creates a text attribute from the style string
+	 * 
+	 * @param styleValue style string in the form: <code>RGB foreground (#rrggbb) | RGB background (#rrggbb) | bold (true/false) | italic (true/false) | strikethrough (true/false) | underline (true/false)</code>
+	 * @return text attribute created from the <code>styleValue</code> or null if the <code>styleValue</code> is invalid
+	 */
+	private TextAttribute createTextAttribute(String styleValue) {
+		String[] values = ColorHelper.unpackStylePreferences(styleValue);
+		if (values.length < 6)
+			return null;
+
+		RGB foreground = ColorHelper.toRGB(values[0]);
+		RGB background = ColorHelper.toRGB(values[1]);
+		boolean bold = Boolean.valueOf(values[2]).booleanValue();
+		boolean italic = Boolean.valueOf(values[3]).booleanValue();
+		boolean strikethrough = Boolean.valueOf(values[4]).booleanValue();
+		boolean underline = Boolean.valueOf(values[5]).booleanValue();
+
+		int style = SWT.NORMAL;
+		if (bold)
+			style = style | SWT.BOLD;
+		if (italic)
+			style = style | SWT.ITALIC;
+		if (strikethrough)
+			style = style | TextAttribute.STRIKETHROUGH;
+		if (underline)
+			style = style | TextAttribute.UNDERLINE;
+
+		return createTextAttribute(foreground, background, style);
+	}
+
+	private TextAttribute createTextAttribute(RGB foreground, RGB background, int style) {
+		return new TextAttribute((foreground != null) ? EditorUtility.getColor(foreground) : null, (background != null) ? EditorUtility.getColor(background) : null, style);
+	}
+
+	/**
+	 * Looks up a boolean preference by <code>key</code> from the preference store
+	 * @param store the preference store to lookup the preference from
+	 * @param key the key the preference is stored under
+	 * @return the preference value from the preference store iff key is not null
+	 */
+	private boolean getBoolean(IPreferenceStore store, String key) {
+		return (key == null) ? false : store.getBoolean(key);
+	}
+	
+	/**
+	 * Looks up a String preference by <code>key</code> from the preference store
+	 * @param store the preference store to lookup the preference from
+	 * @param key the key the preference is stored under
+	 * @return the preference value from the preference store iff key is not null
+	 */
+	private String getString(IPreferenceStore store, String key) {
+		return (key == null) ? null : store.getString(key);
+	}
+
+	/**
+	 * Enable semantic highlighting.
+	 */
+	private void enable() {
+		
+		loadSemanticHighlightings();
+		
+		fPresenter = new SemanticHighlightingPresenter();
+		fPresenter.install(fSourceViewer, fPresentationReconciler);
+//		if (fEditor != null) {
+			fReconciler = new SemanticHighlightingReconciler();
+			fReconciler.install(fSourceViewer, fPresenter, fHighlightings, fHighlightingStyles);
+			IReconciler reconciler = fConfiguration.getReconciler(fSourceViewer);
+			if (reconciler instanceof DocumentRegionProcessor)
+				((DocumentRegionProcessor) reconciler).setSemanticHighlightingStrategy(fReconciler);
+//		} else {
+//			fPresenter.updatePresentation(null, createHardcodedPositions(), new HighlightedPosition[0]);
+//		}
+	}
+	
+	/**
+	 * Disable semantic highlighting
+	 */
+	private void disable() {
+		if (fReconciler != null) {
+			fReconciler.uninstall();
+			fReconciler = null;
+		}
+		
+		if (fPresenter != null) {
+			fPresenter.uninstall();
+			fPresenter = null;
+		}
+		
+		if (fHighlightings != null)
+			disposeHighlightings();
+	}
+	
+	private void disposeHighlightings() {
+		/* Remove the property change listener before clearing the lists */
+		if (fHighlightings != null) {
+			for (int i = 0; i < fHighlightings.length; i++) {
+				IPreferenceStore store = fHighlightings[i].getPreferenceStore();
+				if (store != null)
+					store.removePropertyChangeListener(fHighlightingChangeListener);
+			}
+		}
+		
+		fHighlightings = null;
+		fHighlightingStyles = null;
+		fHighlightingStyleStringKeys = null;
+	}
+	
+	/**
+	 * Handles property change events for individual semantic highlightings.
+	 * @param event
+	 */
+	private void handleHighlightingPropertyChange(PropertyChangeEvent event) {
+		String property = event.getProperty();
+		if (property == null)
+			return;
+		
+		boolean refreshRequired = false;
+		
+		for (int i = 0; i < fHighlightings.length; i++) {
+			ISemanticHighlighting highlighting = fHighlightings[i];
+
+			if (fHighlightingStyleStringKeys[i] != null) {
+				if (property.equals(fHighlightingStyleStringKeys[i])) {
+					adaptToStyleChange(fHighlightingStyles[i], event);
+					fPresenter.highlightingStyleChanged(fHighlightingStyles[i]);
+					refreshRequired = true;
+					continue;
+				}
+			}
+
+			if (property.equals(highlighting.getBoldPreferenceKey())) {
+				adaptToTextStyleChange(fHighlightingStyles[i], event, SWT.BOLD);
+				fPresenter.highlightingStyleChanged(fHighlightingStyles[i]);
+				refreshRequired = true;
+				continue;
+			}
+			
+			if (property.equals(highlighting.getColorPreferenceKey())) {
+				adaptToTextForegroundChange(fHighlightingStyles[i], event);
+				fPresenter.highlightingStyleChanged(fHighlightingStyles[i]);
+				refreshRequired = true;
+				continue;
+			}
+			
+			if (property.equals(highlighting.getEnabledPreferenceKey())) {
+				adaptToEnablementChange(fHighlightingStyles[i], event);
+				fPresenter.highlightingStyleChanged(fHighlightingStyles[i]);
+				refreshRequired = true;
+				continue;
+			}
+			
+			if (property.equals(highlighting.getItalicPreferenceKey())) {
+				adaptToTextStyleChange(fHighlightingStyles[i], event, SWT.ITALIC);
+				fPresenter.highlightingStyleChanged(fHighlightingStyles[i]);
+				refreshRequired = true;
+				continue;
+			}
+			
+			if (property.equals(highlighting.getStrikethroughPreferenceKey())) {
+				adaptToTextStyleChange(fHighlightingStyles[i], event, TextAttribute.STRIKETHROUGH);
+				fPresenter.highlightingStyleChanged(fHighlightingStyles[i]);
+				refreshRequired = true;
+				continue;
+			}
+			
+			if (property.equals(highlighting.getUnderlinePreferenceKey())) {
+				adaptToTextStyleChange(fHighlightingStyles[i], event, TextAttribute.UNDERLINE);
+				fPresenter.highlightingStyleChanged(fHighlightingStyles[i]);
+				refreshRequired = true;
+				continue;
+			}
+		}
+		
+		if (refreshRequired && fReconciler != null)
+			fReconciler.refresh();
+	}
+	
+	/**
+	 * Handles property changes for enabling and disabling semantic highlighting for
+	 * Structured Source Editors
+	 * @param event
+	 */
+	private void handlePropertyChange(PropertyChangeEvent event) {
+		String property = event.getProperty();
+		if (property == null || !property.equals(EditorPreferenceNames.SEMANTIC_HIGHLIGHTING))
+			return;
+		
+		Object newValue = event.getNewValue();
+		if (newValue instanceof Boolean) {
+			if (((Boolean) newValue).booleanValue())
+				enable();
+			else
+				disable();
+		}
+		
+		if (fReconciler != null)
+			fReconciler.refresh();
+	}
+	
+	private void adaptToEnablementChange(HighlightingStyle highlighting, PropertyChangeEvent event) {
+		Object value = event.getNewValue();
+		boolean eventValue;
+		if (value instanceof Boolean)
+			eventValue = ((Boolean) value).booleanValue();
+		else if (IPreferenceStore.TRUE.equals(value))
+			eventValue = true;
+		else
+			eventValue = false;
+		highlighting.setEnabled(eventValue);
+	}
+
+	private void adaptToTextForegroundChange(HighlightingStyle highlighting, PropertyChangeEvent event) {
+		RGB rgb = null;
+
+		Object value = event.getNewValue();
+		if (value instanceof RGB)
+			rgb= (RGB) value;
+		else if (value instanceof String)
+			rgb= ColorHelper.toRGB( (String) value);
+
+		if (rgb != null) {
+			Color color= EditorUtility.getColor(rgb);
+			TextAttribute oldAttr= highlighting.getTextAttribute();
+			highlighting.setTextAttribute(new TextAttribute(color, oldAttr.getBackground(), oldAttr.getStyle()));
+		}
+	}
+	
+	private void adaptToTextStyleChange(HighlightingStyle highlighting, PropertyChangeEvent event, int styleAttribute) {
+		boolean eventValue = false;
+		Object value = event.getNewValue();
+		if (value instanceof Boolean)
+			eventValue = ((Boolean) value).booleanValue();
+		else if (IPreferenceStore.TRUE.equals(value))
+			eventValue = true;
+
+		TextAttribute oldAttr = highlighting.getTextAttribute();
+		boolean activeValue = (oldAttr.getStyle() & styleAttribute) == styleAttribute;
+
+		if (activeValue != eventValue)
+			highlighting.setTextAttribute(new TextAttribute(oldAttr.getForeground(), oldAttr.getBackground(), eventValue ? oldAttr.getStyle() | styleAttribute : oldAttr.getStyle() & ~styleAttribute));
+	}
+
+	/**
+	 * Adapts to a style string change
+	 * 
+	 * @param highlighting the highlighting style to update
+	 * @param event the event that triggered the change
+	 */
+	private void adaptToStyleChange(HighlightingStyle highlighting, PropertyChangeEvent event) {
+		Object value = event.getNewValue();
+		if (value instanceof String) {
+			TextAttribute attr = createTextAttribute((String) value);
+			if (attr != null)
+				highlighting.setTextAttribute(attr);
+		}
+	}
+
+	/**
+	 * @return <code>true</code> iff semantic highlighting is enabled in the preferences
+	 */
+	private boolean isEnabled() {
+		return (fPreferenceStore != null) ? fPreferenceStore.getBoolean(EditorPreferenceNames.SEMANTIC_HIGHLIGHTING) : false;
+	}
+	
+	public void uninstall() {
+		disable();
+		
+		if (fPreferenceStore != null) {
+			fPreferenceStore.removePropertyChangeListener(this);
+			fPreferenceStore = null;
+		}
+		
+		fSourceViewer = null;
+		fConfiguration = null;
+		fPresentationReconciler = null;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingPresenter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingPresenter.java
new file mode 100644
index 0000000..ad973d3
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingPresenter.java
@@ -0,0 +1,1062 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.style;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.BadPositionCategoryException;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.IPositionUpdater;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ISynchronizable;
+import org.eclipse.jface.text.ITextInputListener;
+import org.eclipse.jface.text.ITextPresentationListener;
+import org.eclipse.jface.text.ITextViewerExtension2;
+import org.eclipse.jface.text.ITextViewerExtension4;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+import org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler;
+import org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingManager.HighlightedPosition;
+import org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingManager.HighlightingStyle;
+import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
+
+/**
+ * Semantic highlighting presenter - UI thread implementation.  Based on 
+ * org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingPresenter
+ *
+ * @since 3.1
+ */
+public class SemanticHighlightingPresenter implements ITextPresentationListener, ITextInputListener, IDocumentListener {
+
+	/**
+	 * Semantic highlighting position updater.
+	 */
+	private class HighlightingPositionUpdater implements IPositionUpdater {
+
+		/** The position category. */
+		private final String fCategory;
+
+		/**
+		 * Creates a new updater for the given <code>category</code>.
+		 *
+		 * @param category the new category.
+		 */
+		public HighlightingPositionUpdater(String category) {
+			fCategory= category;
+		}
+
+		/*
+		 * @see org.eclipse.jface.text.IPositionUpdater#update(org.eclipse.jface.text.DocumentEvent)
+		 */
+		public void update(DocumentEvent event) {
+
+			int eventOffset= event.getOffset();
+			int eventOldLength= event.getLength();
+			int eventEnd= eventOffset + eventOldLength;
+
+			try {
+				Position[] positions= event.getDocument().getPositions(fCategory);
+
+				for (int i= 0; i != positions.length; i++) {
+
+					HighlightedPosition position= (HighlightedPosition) positions[i];
+
+					// Also update deleted positions because they get deleted by the background thread and removed/invalidated only in the UI runnable
+//					if (position.isDeleted())
+//						continue;
+
+					int offset= position.getOffset();
+					int length= position.getLength();
+					int end= offset + length;
+
+					if (offset > eventEnd)
+						updateWithPrecedingEvent(position, event);
+					else if (end < eventOffset) {
+						// do nothing
+						// updateWithSucceedingEvent(position, event);
+					}
+					else if (offset <= eventOffset && end >= eventEnd)
+						updateWithIncludedEvent(position, event);
+					else if (offset <= eventOffset)
+						updateWithOverEndEvent(position, event);
+					else if (end >= eventEnd)
+						updateWithOverStartEvent(position, event);
+					else
+						updateWithIncludingEvent(position, event);
+				}
+			} catch (BadPositionCategoryException e) {
+				// ignore and return
+			}
+		}
+
+		/**
+		 * Update the given position with the given event. The event precedes the position.
+		 *
+		 * @param position The position
+		 * @param event The event
+		 */
+		private void updateWithPrecedingEvent(HighlightedPosition position, DocumentEvent event) {
+			String newText= event.getText();
+			int eventNewLength= newText != null ? newText.length() : 0;
+			int deltaLength= eventNewLength - event.getLength();
+
+			position.setOffset(position.getOffset() + deltaLength);
+		}
+
+		/**
+		 * Update the given position with the given event. The event succeeds the position.
+		 *
+		 * @param position The position
+		 * @param event The event
+		 */
+//		private void updateWithSucceedingEvent(HighlightedPosition position, DocumentEvent event) {
+//		}
+
+		/**
+		 * Update the given position with the given event. The event is included by the position.
+		 *
+		 * @param position The position
+		 * @param event The event
+		 */
+		private void updateWithIncludedEvent(HighlightedPosition position, DocumentEvent event) {
+			int eventOffset= event.getOffset();
+			String newText= event.getText();
+			if (newText == null)
+				newText= ""; //$NON-NLS-1$
+			int eventNewLength= newText.length();
+
+			int deltaLength= eventNewLength - event.getLength();
+
+			int offset= position.getOffset();
+			int length= position.getLength();
+			int end= offset + length;
+
+			int includedLength= 0;
+			while (includedLength < eventNewLength && !Character.isWhitespace(newText.charAt(includedLength)))
+				includedLength++;
+			if (includedLength == eventNewLength)
+				position.setLength(length + deltaLength);
+			else {
+				int newLeftLength= eventOffset - offset + includedLength;
+
+				int excludedLength= eventNewLength;
+				while (excludedLength > 0 && !Character.isWhitespace(newText.charAt(excludedLength - 1)))
+					excludedLength--;
+				int newRightOffset= eventOffset + excludedLength;
+				int newRightLength= end + deltaLength - newRightOffset;
+
+				if (newRightLength == 0) {
+					position.setLength(newLeftLength);
+				} else {
+					if (newLeftLength == 0) {
+						position.update(newRightOffset, newRightLength);
+					} else {
+						position.setLength(newLeftLength);
+						addPositionFromUI(position);
+					}
+				}
+			}
+		}
+
+		/**
+		 * Update the given position with the given event. The event overlaps with the end of the position.
+		 *
+		 * @param position The position
+		 * @param event The event
+		 */
+		private void updateWithOverEndEvent(HighlightedPosition position, DocumentEvent event) {
+			String newText= event.getText();
+			if (newText == null)
+				newText= ""; //$NON-NLS-1$
+			int eventNewLength= newText.length();
+
+			int includedLength= 0;
+			while (includedLength < eventNewLength && !Character.isWhitespace(newText.charAt(includedLength)))
+				includedLength++;
+			position.setLength(event.getOffset() - position.getOffset() + includedLength);
+		}
+
+		/**
+		 * Update the given position with the given event. The event overlaps with the start of the position.
+		 *
+		 * @param position The position
+		 * @param event The event
+		 */
+		private void updateWithOverStartEvent(HighlightedPosition position, DocumentEvent event) {
+			int eventOffset= event.getOffset();
+			int eventEnd= eventOffset + event.getLength();
+
+			String newText= event.getText();
+			if (newText == null)
+				newText= ""; //$NON-NLS-1$
+			int eventNewLength= newText.length();
+
+			int excludedLength= eventNewLength;
+			while (excludedLength > 0 && !Character.isWhitespace(newText.charAt(excludedLength - 1)))
+				excludedLength--;
+			int deleted= eventEnd - position.getOffset();
+			int inserted= eventNewLength - excludedLength;
+			position.update(eventOffset + excludedLength, position.getLength() - deleted + inserted);
+		}
+
+		/**
+		 * Update the given position with the given event. The event includes the position.
+		 *
+		 * @param position The position
+		 * @param event The event
+		 */
+		private void updateWithIncludingEvent(HighlightedPosition position, DocumentEvent event) {
+			position.delete();
+			position.update(event.getOffset(), 0);
+		}
+	}
+
+	/** Position updater */
+	private IPositionUpdater fPositionUpdater= new HighlightingPositionUpdater(getPositionCategory());
+
+	/** The source viewer this semantic highlighting reconciler is installed on */
+	private ISourceViewer fSourceViewer;
+	/** The background presentation reconciler */
+	private StructuredPresentationReconciler fPresentationReconciler;
+
+	/** UI's current highlighted positions - can contain <code>null</code> elements */
+	private List fPositions= new ArrayList();
+	/** UI position lock */
+	private Object fPositionLock= new Object();
+
+	/** <code>true</code> iff the current reconcile is canceled. */
+	private boolean fIsCanceled= false;
+
+	/** Read-only color support */
+	private YUV_RGBConverter rgbConverter;
+	private Map readOnlyColorTable;
+	double readOnlyForegroundScaleFactor = 30;
+	
+	public SemanticHighlightingPresenter() {
+		// no listener for now since there's no UI to change the value
+		IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore();
+		readOnlyForegroundScaleFactor = editorStore.getInt(EditorPreferenceNames.READ_ONLY_FOREGROUND_SCALE);
+	}
+
+	/**
+	 * Creates and returns a new highlighted position with the given offset, length and highlighting.
+	 * <p>
+	 * NOTE: Also called from background thread.
+	 * </p>
+	 *
+	 * @param offset The offset
+	 * @param length The length
+	 * @param highlighting The highlighting
+	 * @return The new highlighted position
+	 */
+	public HighlightedPosition createHighlightedPosition(int offset, int length, HighlightingStyle highlighting) {
+		// TODO: reuse deleted positions
+		return new HighlightedPosition(offset, length, highlighting, fPositionUpdater);
+	}
+	
+	/**
+	 * Creates and returns a new highlighted position from the given position and highlighting.
+	 * <p>
+	 * NOTE: Also called from background thread.
+	 * </p>
+	 *
+	 * @param position The position
+	 * @param highlighting The highlighting
+	 * @return The new highlighted position
+	 */
+	public HighlightedPosition createHighlightedPosition(Position position, HighlightingStyle highlighting) {
+		// TODO: reuse deleted positions
+		return new HighlightedPosition(position, highlighting, fPositionUpdater);
+	}
+
+	/**
+	 * Creates and returns a new highlighted position from the given position and highlighting.
+	 * <p>
+	 * NOTE: Also called from background thread.
+	 * </p>
+	 *
+	 * @param position The position
+	 * @param highlighting The highlighting
+	 * @param isReadOnly Is this a read-only position
+	 * @return The new highlighted position
+	 */
+	public HighlightedPosition createHighlightedPosition(Position position, HighlightingStyle highlighting, boolean isReadOnly) {
+		// TODO: reuse deleted positions
+		return new HighlightedPosition(position, highlighting, fPositionUpdater, isReadOnly);
+	}
+
+	/**
+	 * Adds all current positions to the given list.
+	 * <p>
+	 * NOTE: Called from background thread.
+	 * </p>
+	 *
+	 * @param list The list
+	 */
+	public void addAllPositions(List list) {
+		synchronized (fPositionLock) {
+			list.addAll(fPositions);
+		}
+	}
+
+	/**
+	 * Create a text presentation in the background.
+	 * <p>
+	 * NOTE: Called from background thread.
+	 * </p>
+	 *
+	 * @param addedPositions the added positions
+	 * @param removedPositions the removed positions
+	 * @return the text presentation or <code>null</code>, if reconciliation should be canceled
+	 */
+	public TextPresentation createPresentation(List addedPositions, List removedPositions) {
+		ISourceViewer sourceViewer= fSourceViewer;
+		StructuredPresentationReconciler presentationReconciler= fPresentationReconciler;
+		if (sourceViewer == null || presentationReconciler == null)
+			return null;
+
+		if (isCanceled())
+			return null;
+
+		IDocument document= sourceViewer.getDocument();
+		if (document == null)
+			return null;
+
+		int minStart= Integer.MAX_VALUE;
+		int maxEnd= Integer.MIN_VALUE;
+		for (int i= 0, n= removedPositions.size(); i < n; i++) {
+			Position position= (Position) removedPositions.get(i);
+			int offset= position.getOffset();
+			minStart= Math.min(minStart, offset);
+			maxEnd= Math.max(maxEnd, offset + position.getLength());
+		}
+		for (int i= 0, n= addedPositions.size(); i < n; i++) {
+			Position position= (Position) addedPositions.get(i);
+			int offset= position.getOffset();
+			minStart= Math.min(minStart, offset);
+			maxEnd= Math.max(maxEnd, offset + position.getLength());
+		}
+
+		if (minStart < maxEnd)
+			try {
+				return presentationReconciler.createRepairDescription(new Region(minStart, maxEnd - minStart), document);
+			} catch (RuntimeException e) {
+				// Assume concurrent modification from UI thread
+			}
+
+		return null;
+	}
+
+	/**
+	 * Create a runnable for updating the presentation.
+	 * <p>
+	 * NOTE: Called from background thread.
+	 * </p>
+	 * @param textPresentation the text presentation
+	 * @param addedPositions the added positions
+	 * @param removedPositions the removed positions
+	 * @return the runnable or <code>null</code>, if reconciliation should be canceled
+	 */
+	public Runnable createUpdateRunnable(final TextPresentation textPresentation, List addedPositions, List removedPositions) {
+		if (fSourceViewer == null || textPresentation == null)
+			return null;
+
+		// TODO: do clustering of positions and post multiple fast runnables
+		final HighlightedPosition[] added= new SemanticHighlightingManager.HighlightedPosition[addedPositions.size()];
+		addedPositions.toArray(added);
+		final SemanticHighlightingManager.HighlightedPosition[] removed= new SemanticHighlightingManager.HighlightedPosition[removedPositions.size()];
+		removedPositions.toArray(removed);
+
+		if (isCanceled())
+			return null;
+
+		Runnable runnable= new Runnable() {
+			public void run() {
+				updatePresentation(textPresentation, added, removed);
+			}
+		};
+		return runnable;
+	}
+
+	/**
+	 * Invalidate the presentation of the positions based on the given added positions and the existing deleted positions.
+	 * Also unregisters the deleted positions from the document and patches the positions of this presenter.
+	 * <p>
+	 * NOTE: Indirectly called from background thread by UI runnable.
+	 * </p>
+	 * @param textPresentation the text presentation or <code>null</code>, if the presentation should computed in the UI thread
+	 * @param addedPositions the added positions
+	 * @param removedPositions the removed positions
+	 */
+	public void updatePresentation(TextPresentation textPresentation, HighlightedPosition[] addedPositions, HighlightedPosition[] removedPositions) {
+		if (fSourceViewer == null)
+			return;
+
+//		checkOrdering("added positions: ", Arrays.asList(addedPositions)); //$NON-NLS-1$
+//		checkOrdering("removed positions: ", Arrays.asList(removedPositions)); //$NON-NLS-1$
+//		checkOrdering("old positions: ", fPositions); //$NON-NLS-1$
+
+		// TODO: double-check consistency with document.getPositions(...)
+		// TODO: reuse removed positions
+		if (isCanceled())
+			return;
+
+		IDocument document= fSourceViewer.getDocument();
+		if (document == null)
+			return;
+
+		String positionCategory= getPositionCategory();
+
+		List removedPositionsList= Arrays.asList(removedPositions);
+
+		try {
+			synchronized (fPositionLock) {
+				List oldPositions= fPositions;
+				int newSize= Math.max(fPositions.size() + addedPositions.length - removedPositions.length, 10);
+
+				/*
+				 * The following loop is a kind of merge sort: it merges two List<Position>, each
+				 * sorted by position.offset, into one new list. The first of the two is the
+				 * previous list of positions (oldPositions), from which any deleted positions get
+				 * removed on the fly. The second of two is the list of added positions. The result
+				 * is stored in newPositions.
+				 */
+				List newPositions= new ArrayList(newSize);
+				Position position= null;
+				Position addedPosition= null;
+				for (int i= 0, j= 0, n= oldPositions.size(), m= addedPositions.length; i < n || position != null || j < m || addedPosition != null;) {
+					// loop variant: i + j < old(i + j)
+
+					// a) find the next non-deleted Position from the old list
+					while (position == null && i < n) {
+						position= (Position) oldPositions.get(i++);
+						if (position.isDeleted() || contain(removedPositionsList, position)) {
+							document.removePosition(positionCategory, position);
+							position= null;
+						}
+					}
+
+					// b) find the next Position from the added list
+					if (addedPosition == null && j < m) {
+						addedPosition= addedPositions[j++];
+						document.addPosition(positionCategory, addedPosition);
+					}
+
+					// c) merge: add the next of position/addedPosition with the lower offset
+					if (position != null) {
+						if (addedPosition != null)
+							if (position.getOffset() <= addedPosition.getOffset()) {
+								newPositions.add(position);
+								position= null;
+							} else {
+								newPositions.add(addedPosition);
+								addedPosition= null;
+							}
+						else {
+							newPositions.add(position);
+							position= null;
+						}
+					} else if (addedPosition != null) {
+						newPositions.add(addedPosition);
+						addedPosition= null;
+					}
+				}
+				fPositions= newPositions;
+				Collections.sort(fPositions, new Comparator() {
+					
+					public int compare(Object arg0, Object arg1) {
+						Position p1 = (Position) arg0;
+						Position p2 = (Position) arg1;
+						return p1.offset - p2.offset;
+					}
+				});
+			}
+		} catch (BadPositionCategoryException e) {
+			// Should not happen
+			Logger.logException(e);
+		} catch (BadLocationException e) {
+			// Should not happen
+			Logger.logException(e);
+		}
+//		checkOrdering("new positions: ", fPositions); //$NON-NLS-1$
+
+		if (textPresentation != null)
+			fSourceViewer.changeTextPresentation(textPresentation, false);
+		else
+			fSourceViewer.invalidateTextPresentation();
+	}
+
+//	private void checkOrdering(String s, List positions) {
+//		Position previous= null;
+//		for (int i= 0, n= positions.size(); i < n; i++) {
+//			Position current= (Position) positions.get(i);
+//			if (previous != null && previous.getOffset() + previous.getLength() > current.getOffset())
+//				return;
+//		}
+//	}
+
+	/**
+	 * Returns <code>true</code> iff the positions contain the position.
+	 * @param positions the positions, must be ordered by offset but may overlap
+	 * @param position the position
+	 * @return <code>true</code> iff the positions contain the position
+	 */
+	private boolean contain(List positions, Position position) {
+		return indexOf(positions, position) != -1;
+	}
+
+	/**
+	 * Returns index of the position in the positions, <code>-1</code> if not found.
+	 * @param positions the positions, must be ordered by offset but may overlap
+	 * @param position the position
+	 * @return the index
+	 */
+	private int indexOf(List positions, Position position) {
+		int index= computeIndexAtOffset(positions, position.getOffset());
+		int size= positions.size();
+		while (index < size) {
+			if (positions.get(index) == position)
+				return index;
+			index++;
+		}
+		return -1;
+	}
+
+	/**
+	 * Insert the given position in <code>fPositions</code>, s.t. the offsets remain in linear order.
+	 *
+	 * @param position The position for insertion
+	 */
+	private void insertPosition(Position position) {
+		int i= computeIndexAfterOffset(fPositions, position.getOffset());
+		fPositions.add(i, position);
+	}
+
+	/**
+	 * Returns the index of the first position with an offset greater than the given offset.
+	 *
+	 * @param positions the positions, must be ordered by offset and must not overlap
+	 * @param offset the offset
+	 * @return the index of the last position with an offset greater than the given offset
+	 */
+	private int computeIndexAfterOffset(List positions, int offset) {
+		int i= -1;
+		int j= positions.size();
+		while (j - i > 1) {
+			int k= (i + j) >> 1;
+			Position position= (Position) positions.get(k);
+			if (position.getOffset() > offset)
+				j= k;
+			else
+				i= k;
+		}
+		return j;
+	}
+
+	/**
+	 * Returns the index of the first position with an offset equal or greater than the given offset.
+	 *
+	 * @param positions the positions, must be ordered by offset and must not overlap
+	 * @param offset the offset
+	 * @return the index of the last position with an offset equal or greater than the given offset
+	 */
+	private int computeIndexAtOffset(List positions, int offset) {
+		int i= -1;
+		int j= positions.size();
+		while (j - i > 1) {
+			int k= (i + j) >> 1;
+			Position position= (Position) positions.get(k);
+			if (position.getOffset() >= offset)
+				j= k;
+			else
+				i= k;
+		}
+		return j;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.ITextPresentationListener#applyTextPresentation(org.eclipse.jface.text.TextPresentation)
+	 */
+	public void applyTextPresentation(TextPresentation textPresentation) {
+		IRegion region= textPresentation.getExtent();
+		int minStart= Integer.MAX_VALUE;
+		int maxEnd= Integer.MIN_VALUE;
+		int i= computeIndexAtOffset(fPositions, region.getOffset()), n= computeIndexAtOffset(fPositions, region.getOffset() + region.getLength());
+		if (n - i > 2) {
+			List ranges= new ArrayList(n - i);
+			for (; i < n; i++) {
+				HighlightedPosition position= (HighlightedPosition) fPositions.get(i);
+				if (!position.isDeleted()) {
+					if (!position.isReadOnly())
+						ranges.add(position.createStyleRange());
+					else {
+						int offset= position.getOffset();
+						minStart= Math.min(minStart, offset);
+						maxEnd= Math.max(maxEnd, offset + position.getLength());
+					}
+						
+				}
+			}
+			StyleRange[] array= new StyleRange[ranges.size()];
+			array= (StyleRange[]) ranges.toArray(array);
+			textPresentation.replaceStyleRanges(array);
+		} else {
+			for (; i < n; i++) {
+				HighlightedPosition position= (HighlightedPosition) fPositions.get(i);
+				if (!position.isDeleted()) {
+					if (!position.isReadOnly())
+						textPresentation.replaceStyleRange(position.createStyleRange());
+					else {
+						int offset= position.getOffset();
+						minStart= Math.min(minStart, offset);
+						maxEnd= Math.max(maxEnd, offset + position.getLength());
+					}
+				}
+			}
+		}
+		if (minStart < maxEnd) {
+			IStructuredDocument document = (IStructuredDocument) fSourceViewer.getDocument();
+			if (document.containsReadOnly(minStart, maxEnd)) {
+				Iterator nonDefaultStyleRangeIterator = textPresentation.getNonDefaultStyleRangeIterator();
+				while (nonDefaultStyleRangeIterator.hasNext()) {
+					StyleRange styleRange = (StyleRange) nonDefaultStyleRangeIterator.next();
+					if (document.containsReadOnly(styleRange.start, styleRange.length)) {
+						adjustForeground(styleRange);
+					}
+				}
+			}
+		}
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.ITextInputListener#inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocument)
+	 */
+	public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
+		setCanceled(true);
+		releaseDocument(oldInput);
+		resetState();
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.ITextInputListener#inputDocumentChanged(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocument)
+	 */
+	public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
+		manageDocument(newInput);
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
+	 */
+	public void documentAboutToBeChanged(DocumentEvent event) {
+		setCanceled(true);
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
+	 */
+	public void documentChanged(DocumentEvent event) {
+	}
+
+	/**
+	 * @return Returns <code>true</code> iff the current reconcile is canceled.
+	 * <p>
+	 * NOTE: Also called from background thread.
+	 * </p>
+	 */
+	public boolean isCanceled() {
+		IDocument document= fSourceViewer != null ? fSourceViewer.getDocument() : null;
+		if (document == null)
+			return fIsCanceled;
+
+		synchronized (getLockObject(document)) {
+			return fIsCanceled;
+		}
+	}
+
+	/**
+	 * Set whether or not the current reconcile is canceled.
+	 *
+	 * @param isCanceled <code>true</code> iff the current reconcile is canceled
+	 */
+	public void setCanceled(boolean isCanceled) {
+		IDocument document= fSourceViewer != null ? fSourceViewer.getDocument() : null;
+		if (document == null) {
+			fIsCanceled= isCanceled;
+			return;
+		}
+
+		synchronized (getLockObject(document)) {
+			fIsCanceled= isCanceled;
+		}
+	}
+
+	/**
+	 * @param document the document
+	 * @return the document's lock object
+	 */
+	private Object getLockObject(IDocument document) {
+		if (document instanceof ISynchronizable) {
+			Object lock= ((ISynchronizable)document).getLockObject();
+			if (lock != null)
+				return lock;
+		}
+		return document;
+	}
+
+	/**
+	 * Install this presenter on the given source viewer and background presentation
+	 * reconciler.
+	 *
+	 * @param sourceViewer the source viewer
+	 * @param backgroundPresentationReconciler the background presentation reconciler,
+	 * 	can be <code>null</code>, in that case {@link SemanticHighlightingPresenter#createPresentation(List, List)}
+	 * 	should not be called
+	 */
+	public void install(ISourceViewer sourceViewer, StructuredPresentationReconciler backgroundPresentationReconciler) {
+		fSourceViewer= sourceViewer;
+		fPresentationReconciler= backgroundPresentationReconciler;
+
+		if (fSourceViewer instanceof StructuredTextViewer)
+			((StructuredTextViewer) fSourceViewer).prependTextPresentationListener(this);
+		else if(fSourceViewer instanceof ITextViewerExtension4)
+			((ITextViewerExtension4)fSourceViewer).addTextPresentationListener(this);
+
+		fSourceViewer.addTextInputListener(this);
+		manageDocument(fSourceViewer.getDocument());
+	}
+
+	/**
+	 * Uninstall this presenter.
+	 */
+	public void uninstall() {
+		setCanceled(true);
+
+		if (fSourceViewer != null) {
+			if (fSourceViewer instanceof ITextViewerExtension4)
+				((ITextViewerExtension4) fSourceViewer).addTextPresentationListener(this);
+			releaseDocument(fSourceViewer.getDocument());
+			invalidateTextPresentation();
+			resetState();
+
+			fSourceViewer.removeTextInputListener(this);
+			fSourceViewer= null;
+		}
+	}
+
+	/**
+	 * Invalidate text presentation of positions with the given highlighting.
+	 *
+	 * @param highlighting The highlighting
+	 */
+	public void highlightingStyleChanged(HighlightingStyle highlighting) {
+		for (int i= 0, n= fPositions.size(); i < n; i++) {
+			HighlightedPosition position= (HighlightedPosition) fPositions.get(i);
+			if (position.getHighlighting() == highlighting && fSourceViewer instanceof ITextViewerExtension2)
+				((ITextViewerExtension2) fSourceViewer).invalidateTextPresentation(position.getOffset(), position.getLength());
+			else
+				fSourceViewer.invalidateTextPresentation();
+		}
+	}
+
+	/**
+	 * Invalidate text presentation of all positions.
+	 */
+	private void invalidateTextPresentation() {
+		if (fSourceViewer instanceof ITextViewerExtension2) {
+			for (int i = 0, n = fPositions.size(); i < n; i++) {
+				Position position = (Position) fPositions.get(i);
+				((ITextViewerExtension2) fSourceViewer).invalidateTextPresentation(position.getOffset(), position.getLength());
+			}
+		}
+		else {
+			fSourceViewer.invalidateTextPresentation();
+		}
+	}
+
+	/**
+	 * Add a position with the given range and highlighting unconditionally, only from UI thread.
+	 * The position will also be registered on the document. The text presentation is not invalidated.
+	 *
+	 * @param uiPosition the highlighted position to add from the UI
+	 */
+	private void addPositionFromUI(HighlightedPosition uiPosition) {
+		Position position= createHighlightedPosition(uiPosition, uiPosition.getHighlighting(), uiPosition.isReadOnly());
+		synchronized (fPositionLock) {
+			insertPosition(position);
+		}
+
+		IDocument document= fSourceViewer.getDocument();
+		if (document == null)
+			return;
+		String positionCategory= getPositionCategory();
+		try {
+			document.addPosition(positionCategory, position);
+		} catch (BadLocationException e) {
+			// Should not happen
+			Logger.logException(e);
+		} catch (BadPositionCategoryException e) {
+			// Should not happen
+			Logger.logException(e);
+		}
+	}
+
+	/**
+	 * Reset to initial state.
+	 */
+	private void resetState() {
+		synchronized (fPositionLock) {
+			fPositions.clear();
+		}
+	}
+
+	/**
+	 * Start managing the given document.
+	 *
+	 * @param document The document
+	 */
+	private void manageDocument(IDocument document) {
+		if (document != null) {
+			document.addPositionCategory(getPositionCategory());
+			document.addPositionUpdater(fPositionUpdater);
+			document.addDocumentListener(this);
+		}
+	}
+
+	/**
+	 * Stop managing the given document.
+	 *
+	 * @param document The document
+	 */
+	private void releaseDocument(IDocument document) {
+		if (document != null) {
+			document.removeDocumentListener(this);
+			document.removePositionUpdater(fPositionUpdater);
+			try {
+				document.removePositionCategory(getPositionCategory());
+			} catch (BadPositionCategoryException e) {
+				// Should not happen
+				Logger.logException(e);
+			}
+		}
+	}
+
+	/**
+	 * @return The semantic reconciler position's category.
+	 */
+	private String getPositionCategory() {
+		return toString();
+	}
+	
+	private void adjustForeground(StyleRange styleRange) {
+		RGB oldRGB = null;
+		// Color oldColor = styleRange.foreground;
+		Color oldColor = styleRange.background;
+		if (oldColor == null) {
+			// oldRGB = getTextWidget().getForeground().getRGB();
+			oldColor = fSourceViewer.getTextWidget().getBackground();
+			oldRGB = oldColor.getRGB();
+		}
+		else {
+			oldRGB = oldColor.getRGB();
+		}
+		Color newColor = getCachedColorFor(oldRGB);
+		if (newColor == null) {
+			// make text "closer to" background lumanence
+			double target = getRGBConverter().calculateYComponent(oldColor);
+			RGB newRGB = getRGBConverter().transformRGBToGrey(oldRGB, readOnlyForegroundScaleFactor / 100.0, target);
+
+			// save conversion, so calculations only need to be done once
+			cacheColor(oldRGB, newRGB);
+			newColor = getCachedColorFor(oldRGB);
+		}
+		styleRange.foreground = newColor;
+	}
+
+	private YUV_RGBConverter getRGBConverter() {
+		if (rgbConverter == null) {
+			rgbConverter = new YUV_RGBConverter();
+		}
+		return rgbConverter;
+	}
+
+	/**
+	 * Cache read-only color.
+	 * 
+	 * @param oldRGB
+	 * @param newColor
+	 */
+	private void cacheColor(RGB oldRGB, RGB newColor) {
+		if (readOnlyColorTable == null) {
+			readOnlyColorTable = new HashMap();
+		}
+		readOnlyColorTable.put(oldRGB, newColor);
+	}
+
+	/**
+	 * This method is just to get existing read-only colors.
+	 */
+	private Color getCachedColorFor(RGB oldRGB) {
+		Color result = null;
+	
+		if (readOnlyColorTable != null) {
+			RGB readOnlyRGB = (RGB) readOnlyColorTable.get(oldRGB);
+			result = EditorUtility.getColor(readOnlyRGB);
+		}
+	
+		return result;
+	}
+	
+	/**
+	 * A utility class to do various color manipulations
+	 */
+	private class YUV_RGBConverter {
+		/**
+		 * This class "holds" the YUV values corresponding to RGB color
+		 */
+		private class YUV {
+
+			class NormalizedRGB {
+				double blue;
+				double green;
+				private final double maxRGB = 256.0;
+				double red;
+
+				public NormalizedRGB(RGB rgb) {
+					// first normalize to between 0 - 1
+					red = rgb.red / maxRGB;
+					green = rgb.green / maxRGB;
+					blue = rgb.blue / maxRGB;
+
+					red = gammaNormalized(red);
+					green = gammaNormalized(green);
+					blue = gammaNormalized(blue);
+
+				}
+			}
+
+			private NormalizedRGB normalizedRGB;
+
+			private double u = -1;
+			private double v = -1;
+			private double y = -1;
+
+			private YUV() {
+				super();
+			}
+
+			public YUV(RGB rgb) {
+				this();
+				normalizedRGB = new NormalizedRGB(rgb);
+				// force calculations
+				getY();
+				getV();
+				getU();
+			}
+
+			/**
+			 * normalize to "average" gamma 2.2222 or 1/0.45
+			 */
+			double gammaNormalized(double colorComponent) {
+				if (colorComponent < 0.018) {
+					return colorComponent * 0.45;
+				}
+				else {
+					return 1.099 * Math.pow(colorComponent, 0.45) - 0.099;
+				}
+			}
+
+			/**
+			 * @return RGB based on original RGB and current YUV values;
+			 */
+
+			public double getU() {
+				if (u == -1) {
+					u = 0.4949 * (normalizedRGB.blue - getY());
+				}
+				return u;
+
+			}
+
+			public double getV() {
+				if (v == -1) {
+					v = 0.877 * (normalizedRGB.red - getY());
+				}
+				return v;
+			}
+
+			public double getY() {
+				if (y == -1) {
+					y = 0.299 * normalizedRGB.red + 0.587 * normalizedRGB.green + 0.114 * normalizedRGB.blue;
+				}
+				return y;
+			}
+
+		}
+
+		public YUV_RGBConverter() {
+			super();
+		}
+
+		public double calculateYComponent(Color targetColor) {
+			return new YUV(targetColor.getRGB()).getY();
+		}
+
+		public RGB transformRGBToGrey(RGB originalRGB, double scaleFactor, double target) {
+			RGB transformedRGB = null;
+			// we left the "full" API method signature, but this
+			// version does not take into account originalRGB, though
+			// it might someday.
+			// for now, we'll simply make the new RGB grey, either a little
+			// lighter, or a little darker than background.
+			double y = 0;
+			double mid = 0.5;
+			// zero is black, one is white
+			if (target < mid) {
+				// is "dark" make lighter
+				y = target + scaleFactor;
+			}
+			else {
+				// is "light" make darker
+				y = target - scaleFactor;
+			}
+			int c = (int) Math.round(y * 255);
+			// just to gaurd against mis-use, or scale's values greater
+			// than mid point (and possibly rounding error)
+			if (c > 255)
+				c = 255;
+			if (c < 0)
+				c = 0;
+			transformedRGB = new RGB(c, c, c);
+			return transformedRGB;
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingReconciler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingReconciler.java
new file mode 100644
index 0000000..ee86fcd
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingReconciler.java
@@ -0,0 +1,296 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.style;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.sse.core.internal.model.ModelManagerImpl;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.ui.ISemanticHighlighting;
+import org.eclipse.wst.sse.ui.ISemanticHighlightingExtension;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingManager.HighlightedPosition;
+import org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingManager.HighlightingStyle;
+
+/**
+ * Semantic highlighting reconciler for Structured Source Editors. Based on 
+ * org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingReconciler
+ *
+ * @since 3.1
+ */
+public class SemanticHighlightingReconciler implements IReconcilingStrategy, IReconcilingStrategyExtension {
+
+	private IDocument fDocument;
+
+	private ITextViewer fViewer;
+	private SemanticHighlightingPresenter fPresenter;
+	private ISemanticHighlighting[] fSemanticHighlightings;
+	private HighlightingStyle[] fHighlightings;
+
+	private List fAddedPositions = new ArrayList();
+	private List fRemovedPositions = new ArrayList();
+	/** Number of removed positions */
+	private int fNOfRemovedPositions;
+	
+	/** Background job */
+	private Job fJob;
+	/** Background job lock */
+	private final Object fJobLock = new Object();
+	
+	/** Reconcile operation lock. */
+	private final Object fReconcileLock = new Object();
+	private boolean fIsReconciling = false;
+	/** The semantic highlighting presenter - cache for background thread, only valid during {@link #reconcile(IRegion)} */
+	private SemanticHighlightingPresenter fJobPresenter;
+	/** Semantic highlightings - cache for background thread, only valid during {@link #reconcile(IRegion)} */
+	private ISemanticHighlighting[] fJobSemanticHighlightings;
+	/** HighlightingStyle - cache for background thread, only valid during {@link #reconcile(IRegion)} */
+	private HighlightingStyle[] fJobHighlightings;
+
+	private boolean fIsInstalled;
+
+	public void install(ITextViewer sourceViewer, SemanticHighlightingPresenter presenter, ISemanticHighlighting[] semanticHighlightings, HighlightingStyle[] highlightings) {
+		fViewer = sourceViewer;
+		fPresenter = presenter;
+		fSemanticHighlightings = semanticHighlightings;
+		fHighlightings = highlightings;
+		fIsInstalled = true;
+	}
+
+	public void uninstall() {
+		fIsInstalled = false;
+		fViewer = null;
+		fPresenter = null;
+		fSemanticHighlightings = null;
+		fHighlightings = null;
+	}
+
+	public void reconcile(IRegion partition) {
+		// ensure at most one thread can be reconciling at any time
+		synchronized (fReconcileLock) {
+			if (fIsReconciling)
+				return;
+			else
+				fIsReconciling= true;
+		}
+		fJobPresenter = fPresenter;
+		fJobSemanticHighlightings = fSemanticHighlightings;
+		fJobHighlightings = fHighlightings;
+		IStructuredModel model = null;
+		try {
+			if (fJobPresenter == null || fJobSemanticHighlightings == null || fJobHighlightings == null)
+				return;
+
+			fJobPresenter.setCanceled(false);
+		
+			startReconcilingPositions();
+			IStructuredDocument document = (IStructuredDocument) fDocument;
+			model = ModelManagerImpl.getInstance().getModelForRead(document);
+			IStructuredDocumentRegion[] regions = document.getStructuredDocumentRegions(partition.getOffset(), partition.getLength());
+			for (int i = 0; i < regions.length && fIsInstalled; i++) {
+				if (document.containsReadOnly(regions[i].getStartOffset(), regions[i].getLength()))
+					addPosition(new Position(regions[i].getStartOffset(), regions[i].getLength()), null, true);
+				else {
+					for (int j = 0; j < fJobSemanticHighlightings.length && fIsInstalled; j++) {
+						if (fJobHighlightings[j].isEnabled()) {
+							Position[] consumes = null;
+							if (fJobSemanticHighlightings[j] instanceof ISemanticHighlightingExtension && model != null) {
+								consumes = ((ISemanticHighlightingExtension) fJobSemanticHighlightings[j]).consumes(regions[i], model.getIndexedRegion(regions[i].getStartOffset()));
+							}
+							else {
+								consumes = fJobSemanticHighlightings[j].consumes(regions[i]);
+							}
+							if (consumes != null) {
+								for (int k = 0; k < consumes.length; k++)
+									addPosition(consumes[k], fJobHighlightings[j]);
+							}
+						}
+					}
+				}
+			}
+
+			if (fIsInstalled) {
+				List oldPositions = fRemovedPositions;
+				List newPositions = new ArrayList(fNOfRemovedPositions);
+				for (int i = 0, n = oldPositions.size(); i < n && fIsInstalled; i++) {
+					Object current = oldPositions.get(i);
+					if (current != null)
+						newPositions.add(current);
+				}
+				fRemovedPositions = newPositions;
+				
+				TextPresentation presentation = null;
+				if (!fJobPresenter.isCanceled())
+					presentation = fJobPresenter.createPresentation(fAddedPositions, fRemovedPositions);
+				if (!fJobPresenter.isCanceled())
+					updatePresentation(presentation, fAddedPositions, fRemovedPositions);
+			}
+			stopReconcilingPositions();
+		}
+		finally {
+			fJobPresenter= null;
+			fJobSemanticHighlightings= null;
+			fJobHighlightings= null;
+			if (model != null)
+				model.releaseFromRead();
+			synchronized (fReconcileLock) {
+				fIsReconciling= false;
+			}
+		}
+	}
+
+	private void addPosition(Position position, HighlightingStyle highlighting) {
+		addPosition(position, highlighting, false);
+	}
+
+	private void addPosition(Position position, HighlightingStyle highlighting, boolean isReadOnly) {
+		boolean isExisting = false;
+		// TODO: use binary search
+		for (int i = 0, n = fRemovedPositions.size(); i < n; i++) {
+			HighlightedPosition highlightedPosition = (HighlightedPosition) fRemovedPositions.get(i);
+			if (highlightedPosition == null)
+				continue;
+			if (highlightedPosition.isEqual(position, highlighting)) {
+				isExisting = true;
+				fRemovedPositions.set(i, null);
+				fNOfRemovedPositions--;
+				break;
+			}
+		}
+		if (!isExisting) {
+			fAddedPositions.add(fJobPresenter.createHighlightedPosition(position, highlighting, isReadOnly));
+		}
+	}
+
+	/**
+	 * Update the presentation.
+	 * 
+	 * @param textPresentation
+	 *            the text presentation
+	 * @param addedPositions
+	 *            the added positions
+	 * @param removedPositions
+	 *            the removed positions
+	 */
+	private void updatePresentation(TextPresentation textPresentation, List addedPositions, List removedPositions) {
+		Runnable runnable = fJobPresenter.createUpdateRunnable(textPresentation, addedPositions, removedPositions);
+		if (runnable == null)
+			return;
+
+		if (fViewer == null)
+			return;
+
+		Control viewerControl = fViewer.getTextWidget();
+		if (viewerControl == null)
+			return;
+
+		Display display = viewerControl.getDisplay();
+		if (display == null || display.isDisposed())
+			return;
+
+		display.asyncExec(runnable);
+	}
+
+	/**
+	 * Start reconciling positions.
+	 */
+	private void startReconcilingPositions() {
+		fJobPresenter.addAllPositions(fRemovedPositions);
+		fNOfRemovedPositions = fRemovedPositions.size();
+	}
+
+	/**
+	 * Stop reconciling positions.
+	 */
+	private void stopReconcilingPositions() {
+		fRemovedPositions.clear();
+		fNOfRemovedPositions = 0;
+		fAddedPositions.clear();
+	}
+
+	public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+		reconcile(dirtyRegion);
+	}
+
+	public void setDocument(IDocument document) {
+		fDocument = document;
+		refresh();
+	}
+
+	public void initialReconcile() {
+		// Do nothing
+	}
+
+	public void setProgressMonitor(IProgressMonitor monitor) {
+	}
+	
+	/**
+	 * Schedule a background job for reconciling the Semantic Highlighting model.
+	 */
+	private void scheduleJob() {
+		synchronized (fJobLock) {
+			final Job oldJob= fJob;
+			if (fJob != null) {
+				fJob.cancel();
+				fJob= null;
+			}
+
+			fJob= new Job("Semantic Highlighting Job") {
+				protected IStatus run(IProgressMonitor monitor) {
+					if (oldJob != null) {
+						try {
+							oldJob.join();
+						} catch (InterruptedException e) {
+							Logger.logException(e);
+							return Status.CANCEL_STATUS;
+						}
+					}
+					if (monitor.isCanceled())
+						return Status.CANCEL_STATUS;
+
+					reconcile(new Region(0, fDocument.getLength()));
+					synchronized (fJobLock) {
+						// allow the job to be gc'ed
+						if (fJob == this)
+							fJob= null;
+					}
+					return Status.OK_STATUS;
+				}
+			};
+			fJob.setSystem(true);
+			fJob.setPriority(Job.DECORATE);
+			fJob.schedule();
+		}
+	}
+
+	public void refresh() {
+		if (fDocument != null)
+			scheduleJob();
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AbstractHoverProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AbstractHoverProcessor.java
new file mode 100644
index 0000000..6f33061
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AbstractHoverProcessor.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.taginfo;
+
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextHoverExtension;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.wst.sse.ui.internal.derived.HTMLTextPresenter;
+
+/**
+ * Abstract class for providing hover information for Source editor. Includes
+ * a hover control creator which has the "Press F2 for focus" message built
+ * in.
+ * 
+ * @since WTP 1.5
+ */
+abstract public class AbstractHoverProcessor implements ITextHover, ITextHoverExtension {
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.ITextHoverExtension#getHoverControlCreator()
+	 */
+	public IInformationControlCreator getHoverControlCreator() {
+		return new IInformationControlCreator() {
+			public IInformationControl createInformationControl(Shell parent) {
+				return new DefaultInformationControl(parent, SWT.NONE, new HTMLTextPresenter(true), EditorsUI.getTooltipAffordanceString());
+			}
+		};
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AnnotationHoverProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AnnotationHoverProcessor.java
new file mode 100644
index 0000000..39082c9
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AnnotationHoverProcessor.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2009 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.taginfo;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.texteditor.AnnotationPreference;
+import org.eclipse.ui.texteditor.ChainedPreferenceStore;
+import org.eclipse.wst.sse.core.utils.StringUtils;
+import org.eclipse.wst.sse.ui.internal.ITemporaryAnnotation;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+
+/**
+ * Hover help that displays annotations shown in text of editor. Currently,
+ * this text hover is used in conjunction with AbstractTextHoverProcessor.
+ * 
+ * @author amywu
+ */
+public class AnnotationHoverProcessor extends AbstractHoverProcessor {
+	private final static String LIST_BEGIN = "<ul>"; //$NON-NLS-1$
+	private final static String LIST_ELEMENT = "<li>"; //$NON-NLS-1$
+	private final static String PARAGRAPH_END = "</p>"; //$NON-NLS-1$
+	private final static String PARAGRAPH_START = "<p>"; //$NON-NLS-1$
+
+	private IPreferenceStore fPreferenceStore = null;
+
+	/**
+	 * 
+	 */
+	public AnnotationHoverProcessor() {
+		super();
+	}
+
+	/**
+	 * Formats a msg to a proper html message
+	 * 
+	 * @param msg -
+	 *            assumes msg is neither null nor empty string
+	 * @return
+	 */
+	private String formatMessage(String msg) {
+		StringBuffer buf = new StringBuffer();
+		buf.append(PARAGRAPH_START);
+		buf.append(StringUtils.convertToHTMLContent(msg));
+		buf.append(PARAGRAPH_END);
+		return buf.toString();
+	}
+
+	/**
+	 * Formats multiple messages into proper html message
+	 * 
+	 * @param messages
+	 * @return
+	 */
+	private String formatMessages(List messages) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(PARAGRAPH_START);
+		buffer.append(SSEUIMessages.Multiple_errors); //$NON-NLS-1$
+		buffer.append(LIST_BEGIN);
+
+		Iterator e = messages.iterator();
+		while (e.hasNext()) {
+			buffer.append(LIST_ELEMENT);
+			buffer.append(StringUtils.convertToHTMLContent((String) e.next()));
+		}
+		buffer.append(PARAGRAPH_END);
+		return buffer.toString();
+	}
+
+	/**
+	 * Returns the annotation preference for the given annotation. (copied
+	 * from org.eclipse.jdt.internal.ui.text.java.hover.AnnotationHover)
+	 * 
+	 * @param annotation
+	 *            the annotation
+	 * @return the annotation preference or <code>null</code> if none
+	 */
+	private AnnotationPreference getAnnotationPreference(Annotation annotation) {
+
+		if (annotation.isMarkedDeleted())
+			return null;
+		return EditorsUI.getAnnotationPreferenceLookup().getAnnotationPreference(annotation);
+	}
+
+	public String getHoverInfo(ITextViewer viewer, IRegion hoverRegion) {
+		IAnnotationModel model = ((SourceViewer) viewer).getAnnotationModel();
+		if (model != null) {
+			List messages = new ArrayList();
+			Iterator e = model.getAnnotationIterator();
+			while (e.hasNext()) {
+				Annotation a = (Annotation) e.next();
+				if (!isAnnotationValid(a))
+					continue;
+
+				Position p = model.getPosition(a);
+				// check if this is an annotation in the region we are
+				// concerned with
+				if (p.overlapsWith(hoverRegion.getOffset(), hoverRegion.getLength())) {
+					String msg = a.getText();
+					if ((msg != null) && msg.trim().length() > 0) {
+						// it is possible for temporary annotations to
+						// duplicate other annotations so make sure not to add
+						// dups
+						if (a instanceof ITemporaryAnnotation) {
+							boolean duplicated = false;
+							int j = 0;
+							while (j < messages.size() && !duplicated) {
+								duplicated = messages.get(j).equals(msg);
+								++j;
+							}
+							if (!duplicated) {
+								messages.add(msg);
+							}
+						}
+						else {
+							messages.add(msg);
+						}
+					}
+				}
+			}
+			if (messages.size() > 1) {
+				return formatMessages(messages);
+			}
+			else if (messages.size() > 0) {
+				return formatMessage(messages.get(0).toString());
+			}
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer,
+	 *      int)
+	 */
+	public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
+		IAnnotationModel model = ((SourceViewer) textViewer).getAnnotationModel();
+		Region hoverRegion = null;
+
+		if (model != null) {
+			Iterator e = model.getAnnotationIterator();
+			while (e.hasNext()) {
+				Annotation a = (Annotation) e.next();
+				if (!isAnnotationValid(a))
+					continue;
+				Position p = model.getPosition(a);
+				if (p != null && p.includes(offset)) {
+					// find the smallest region containing offset
+					if ((hoverRegion == null) || (hoverRegion.getLength() > p.getLength())) {
+						hoverRegion = new Region(p.getOffset(), p.getLength());
+					}
+				}
+			}
+		}
+		return hoverRegion;
+	}
+
+	/**
+	 * Retreives the preference store If no preference store is currently
+	 * stored, retreive the appropriate preference store
+	 */
+	private IPreferenceStore getPreferenceStore() {
+		if (fPreferenceStore == null) {
+			IPreferenceStore sseEditorPrefs = SSEUIPlugin.getDefault().getPreferenceStore();
+			IPreferenceStore baseEditorPrefs = EditorsUI.getPreferenceStore();
+			fPreferenceStore = new ChainedPreferenceStore(new IPreferenceStore[]{sseEditorPrefs, baseEditorPrefs});
+		}
+		return fPreferenceStore;
+	}
+
+	boolean isAnnotationValid(Annotation a) {
+		AnnotationPreference preference = getAnnotationPreference(a);
+		if (preference == null)
+			return false;
+		String textPreferenceKey = preference.getTextPreferenceKey();
+		String highlightPreferenceKey = preference.getHighlightPreferenceKey();
+		if (textPreferenceKey == null || !(getPreferenceStore().getBoolean(textPreferenceKey)) || highlightPreferenceKey == null || getPreferenceStore().getBoolean(highlightPreferenceKey))
+			return false;
+		return true;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/BestMatchHover.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/BestMatchHover.java
new file mode 100644
index 0000000..230159f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/BestMatchHover.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.taginfo;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextHoverExtension;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+/**
+ * Provides the best hover help documentation (by using other hover help
+ * processors) Priority of hover help processors is: ProblemHoverProcessor,
+ * TagInfoProcessor, AnnotationHoverProcessor
+ */
+public class BestMatchHover implements ITextHover, ITextHoverExtension {
+	private ITextHover fBestMatchHover; // current best match text hover
+	private ITextHover[] fTagInfoHovers; // documentation/information hover
+	private List fTextHovers; // list of text hovers to consider in best
+	// match
+
+	public BestMatchHover(ITextHover infoTagHover) {
+		this(new ITextHover[]{infoTagHover});
+	}
+
+	public BestMatchHover(ITextHover[] infoTagHovers) {
+		fTagInfoHovers = infoTagHovers;
+	}
+
+	/**
+	 * Create a list of text hovers applicable to this best match hover
+	 * processor
+	 * 
+	 * @return List of ITextHover - in abstract class this is empty list
+	 */
+	private List createTextHoversList() {
+		List hoverList = new ArrayList();
+		// if currently debugging, then add the debug hover to the list of
+		// best match
+		if (Logger.isTracing(DebugInfoHoverProcessor.TRACEFILTER)) {
+			hoverList.add(new DebugInfoHoverProcessor());
+		}
+
+		hoverList.add(new ProblemAnnotationHoverProcessor());
+		
+		if (fTagInfoHovers != null) {
+			for (int i = 0; i < fTagInfoHovers.length; i++) {
+				hoverList.add(fTagInfoHovers[i]);
+			}
+		}
+		hoverList.add(new AnnotationHoverProcessor());
+		return hoverList;
+	}
+
+	public IInformationControlCreator getHoverControlCreator() {
+		IInformationControlCreator creator = null;
+
+		if (fBestMatchHover instanceof ITextHoverExtension) {
+			creator = ((ITextHoverExtension) fBestMatchHover).getHoverControlCreator();
+		}
+		return creator;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer,
+	 *      org.eclipse.jface.text.IRegion)
+	 */
+	public String getHoverInfo(ITextViewer viewer, IRegion hoverRegion) {
+		String displayText = null;
+
+		// already have a best match hover picked out from getHoverRegion call
+		if (fBestMatchHover != null) {
+			displayText = fBestMatchHover.getHoverInfo(viewer, hoverRegion);
+		}
+		// either had no best match hover or best match hover returned null
+		if (displayText == null) {
+			// go through list of text hovers and return first display string
+			Iterator i = getTextHovers().iterator();
+			while ((i.hasNext()) && (displayText == null)) {
+				ITextHover hover = (ITextHover) i.next();
+				displayText = hover.getHoverInfo(viewer, hoverRegion);
+			}
+		}
+		return displayText;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer,
+	 *      int)
+	 */
+	public IRegion getHoverRegion(ITextViewer viewer, int offset) {
+		IRegion hoverRegion = null;
+
+		// go through list of text hovers and return first hover region
+		ITextHover hover = null;
+		Iterator i = getTextHovers().iterator();
+		while ((i.hasNext()) && (hoverRegion == null)) {
+			hover = (ITextHover) i.next();
+			hoverRegion = hover.getHoverRegion(viewer, offset);
+		}
+
+		// store the text hover processor that found region
+		if (hoverRegion != null)
+			fBestMatchHover = hover;
+		else
+			fBestMatchHover = null;
+
+		return hoverRegion;
+	}
+
+	private List getTextHovers() {
+		if (fTextHovers == null) {
+			fTextHovers = createTextHoversList();
+		}
+		return fTextHovers;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/DebugInfoHoverProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/DebugInfoHoverProcessor.java
new file mode 100644
index 0000000..ea9db05
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/DebugInfoHoverProcessor.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.taginfo;
+
+
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITypedRegion;
+
+/**
+ * Provides debug hover help
+ * 
+ * @see org.eclipse.jface.text.ITextHover
+ */
+public class DebugInfoHoverProcessor extends AbstractHoverProcessor {
+	public static final String TRACEFILTER = "debuginfohover"; //$NON-NLS-1$
+	protected IPreferenceStore fPreferenceStore = null;
+
+	public DebugInfoHoverProcessor() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer,
+	 *      org.eclipse.jface.text.IRegion)
+	 */
+	public String getHoverInfo(ITextViewer viewer, IRegion hoverRegion) {
+		String displayText = null;
+		if ((hoverRegion == null) || (viewer == null) || (viewer.getDocument() == null)) {
+			displayText = null;
+		}
+		else {
+			int offset = hoverRegion.getOffset();
+
+			ITypedRegion region;
+			try {
+				region = viewer.getDocument().getPartition(offset);
+				if (region != null) {
+					displayText = region.getType();
+				}
+				else {
+					displayText = "Null Region was returned?!"; //$NON-NLS-1$
+				}
+			}
+			catch (BadLocationException e) {
+				displayText = "BadLocationException Occurred!?"; //$NON-NLS-1$
+			}
+
+		}
+		return displayText;
+	}
+
+	/**
+	 * Returns the region to hover the text over based on the offset.
+	 * 
+	 * @param textViewer
+	 * @param offset
+	 * 
+	 * @return IRegion region to hover over if offset is not over invalid
+	 *         whitespace. otherwise, returns <code>null</code>
+	 * 
+	 * @see org.eclipse.jface.text.ITextHover#getHoverRegion(ITextViewer, int)
+	 */
+	public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
+		ITypedRegion region = null;
+		if ((textViewer == null) || (textViewer.getDocument() == null)) {
+			region = null;
+		}
+		else {
+
+			try {
+				region = textViewer.getDocument().getPartition(offset);
+			}
+			catch (BadLocationException e) {
+				region = null;
+			}
+		}
+		return region;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/ProblemAnnotationHoverProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/ProblemAnnotationHoverProcessor.java
new file mode 100644
index 0000000..d601231
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/ProblemAnnotationHoverProcessor.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.taginfo;
+
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess;
+
+/**
+ * Hover help that displays problem annotations when shown in text of editor.
+ * 
+ * @author amywu
+ */
+public class ProblemAnnotationHoverProcessor extends AnnotationHoverProcessor {
+
+	// these strings are derived from the annotationTypes extension in
+	// org.eclipse.ui.editors plugin
+	// if those strings change, then these strings need to change as well
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=198584
+	final private String ANNOTATION_ERROR = "org.eclipse.ui.workbench.texteditor.error"; //$NON-NLS-1$
+	final private String ANNOTATION_WARNING = "org.eclipse.ui.workbench.texteditor.warning"; //$NON-NLS-1$
+	private DefaultMarkerAnnotationAccess fAnnotationAccess = new DefaultMarkerAnnotationAccess();
+
+	/**
+	 *  
+	 */
+	public ProblemAnnotationHoverProcessor() {
+		super();
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.sse.ui.taginfo.AnnotationHoverProcessor#isAnnotationValid(org.eclipse.jface.text.source.Annotation)
+	 */
+	protected boolean isAnnotationValid(Annotation a) {
+		String type = a.getType();
+		if (fAnnotationAccess.isSubtype(type, ANNOTATION_ERROR) || fAnnotationAccess.isSubtype(type, ANNOTATION_WARNING))
+			return super.isAnnotationValid(a);
+		return false;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/TextHoverManager.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/TextHoverManager.java
new file mode 100644
index 0000000..428b1a0
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/TextHoverManager.java
@@ -0,0 +1,243 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.taginfo;
+
+import java.util.HashMap;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames;
+
+import com.ibm.icu.util.StringTokenizer;
+
+/**
+ * Manages text hovers for Structured Text editors
+ */
+public class TextHoverManager {
+	/**
+	 * Contains description of a text hover
+	 */
+	public class TextHoverDescriptor {
+		private String fDescription;
+		private boolean fEnabled;
+		private String fId;
+		private String fLabel;
+		private String fModifierString;
+
+		/**
+		 * @param id
+		 * @param label
+		 * @param desc
+		 */
+		public TextHoverDescriptor(String id, String label, String desc) {
+			fId = id;
+			fLabel = label;
+			fDescription = desc;
+		}
+
+		/**
+		 * @param id
+		 * @param label
+		 * @param desc
+		 * @param enabled
+		 * @param modifierString
+		 */
+		public TextHoverDescriptor(String id, String label, String desc, boolean enabled, String modifierString) {
+			fId = id;
+			fLabel = label;
+			fDescription = desc;
+			fEnabled = enabled;
+			fModifierString = modifierString;
+		}
+
+		/**
+		 * @return Returns the fDescription.
+		 */
+		public String getDescription() {
+			return fDescription;
+		}
+
+		/**
+		 * @return Returns the fId.
+		 */
+		public String getId() {
+			return fId;
+		}
+
+		/**
+		 * @return Returns the fLabel
+		 */
+		public String getLabel() {
+			return fLabel;
+		}
+
+		/**
+		 * @return Returns the fModifierString.
+		 */
+		public String getModifierString() {
+			return fModifierString;
+		}
+
+		/**
+		 * @return Returns the fEnabled.
+		 */
+		public boolean isEnabled() {
+			return fEnabled;
+		}
+
+		/**
+		 * @param enabled
+		 *            The fEnabled to set.
+		 */
+		public void setEnabled(boolean enabled) {
+			fEnabled = enabled;
+		}
+
+		/**
+		 * @param modifierString
+		 *            The fModifierString to set.
+		 */
+		public void setModifierString(String modifierString) {
+			fModifierString = modifierString;
+		}
+	}
+
+	public static final String ANNOTATION_HOVER = "annotationHover"; //$NON-NLS-1$
+
+	// list of different types of Source editor hovers
+	public static final String COMBINATION_HOVER = "combinationHover"; //$NON-NLS-1$
+	// hover descriptions are in .properties file with the key in the form of
+	// "[id]_desc"
+	private static final String DESCRIPTION_KEY = "_desc"; //$NON-NLS-1$
+	public static final String DOCUMENTATION_HOVER = "documentationHover"; //$NON-NLS-1$
+	public static final String HOVER_ATTRIBUTE_SEPARATOR = "|"; //$NON-NLS-1$
+	public static final String HOVER_SEPARATOR = ";"; //$NON-NLS-1$
+
+	// hover labels are in .properties file with the key in the form of
+	// "[id]_label"
+	private static final String LABEL_KEY = "_label"; //$NON-NLS-1$
+
+	public static final String NO_MODIFIER = "0"; //$NON-NLS-1$
+	public static final String PROBLEM_HOVER = "problemHover"; //$NON-NLS-1$
+	public static final String[] TEXT_HOVER_IDS = new String[]{COMBINATION_HOVER, PROBLEM_HOVER, DOCUMENTATION_HOVER, ANNOTATION_HOVER};
+	/**
+	 * Current list of Structured Text editor text hovers
+	 */
+	private TextHoverDescriptor[] fTextHovers;
+
+	public TextHoverManager() {
+		super();
+	}
+
+	/**
+	 * Create a best match hover with the give text hover as the documentation
+	 * hover
+	 * 
+	 * @param infoHover
+	 * @return ITextHover
+	 * @deprecated as of WTP 3.0 M3
+	 */
+	public ITextHover createBestMatchHover(ITextHover infoHover) {
+		return new BestMatchHover(infoHover);
+	}
+
+	/**
+	 * Generate a list of text hover descriptors from the given delimited
+	 * string
+	 * 
+	 * @param textHoverStrings
+	 * @return
+	 */
+	public TextHoverDescriptor[] generateTextHoverDescriptors(String textHoverStrings) {
+		StringTokenizer st = new StringTokenizer(textHoverStrings, HOVER_SEPARATOR);
+
+		// read from preference and load id-descriptor mapping to a hash table
+		HashMap idToModifier = new HashMap(st.countTokens());
+		while (st.hasMoreTokens()) {
+			String textHoverString = st.nextToken();
+			StringTokenizer st2 = new StringTokenizer(textHoverString, HOVER_ATTRIBUTE_SEPARATOR);
+			if (st2.countTokens() == 3) {
+				String id = st2.nextToken();
+				boolean enabled = Boolean.valueOf(st2.nextToken()).booleanValue();
+				String modifierString = st2.nextToken();
+				if (modifierString.equals(NO_MODIFIER))
+					modifierString = ""; //$NON-NLS-1$
+
+				String label = null;
+				String description = null;
+				try {
+					label = SSEUIMessages.getResourceBundle().getString(id + LABEL_KEY);
+					description = SSEUIMessages.getResourceBundle().getString(id + DESCRIPTION_KEY);
+				}
+				catch (Exception e) {
+					Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
+				}
+				TextHoverDescriptor descriptor = new TextHoverDescriptor(id, label, description, enabled, modifierString);
+				// should check to see if ids appear more than once
+				idToModifier.put(id, descriptor);
+			}
+		}
+
+		// go through all defined text hovers and match with their preference
+		TextHoverDescriptor[] descriptors = new TextHoverDescriptor[TEXT_HOVER_IDS.length];
+		for (int i = 0; i < TEXT_HOVER_IDS.length; i++) {
+			TextHoverDescriptor desc = (TextHoverDescriptor) idToModifier.get(TEXT_HOVER_IDS[i]);
+			if (desc != null) {
+				descriptors[i] = desc;
+			}
+			else {
+				String label = null;
+				String description = null;
+				try {
+					label = SSEUIMessages.getResourceBundle().getString(TEXT_HOVER_IDS[i] + LABEL_KEY);
+					description = SSEUIMessages.getResourceBundle().getString(TEXT_HOVER_IDS[i] + DESCRIPTION_KEY);
+				}
+				catch (Exception e) {
+					Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
+				}
+				descriptors[i] = new TextHoverDescriptor(TEXT_HOVER_IDS[i], label, description);
+			}
+		}
+		return descriptors;
+	}
+
+	private IPreferenceStore getPreferenceStore() {
+		return SSEUIPlugin.getDefault().getPreferenceStore();
+	}
+
+
+	/**
+	 * Returns the text hovers for Structured Text editor. If fTextHover has
+	 * not been initialied, it will be initialized.
+	 * 
+	 * @return Returns the fTextHovers.
+	 */
+	public TextHoverDescriptor[] getTextHovers() {
+		if (fTextHovers == null) {
+			String textHoverStrings = getPreferenceStore().getString(EditorPreferenceNames.EDITOR_TEXT_HOVER_MODIFIERS);
+			fTextHovers = generateTextHoverDescriptors(textHoverStrings);
+		}
+		return fTextHovers;
+	}
+
+	/**
+	 * Sets fTextHovers to null so that next time getTextHovers is called,
+	 * fTextHovers will be populated with the latest preferences.
+	 */
+	public void resetTextHovers() {
+		fTextHovers = null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/DocumentRegionEdgeMatcher.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/DocumentRegionEdgeMatcher.java
new file mode 100644
index 0000000..cb7fa43
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/DocumentRegionEdgeMatcher.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2008 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.text;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.source.ICharacterPairMatcher;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+
+
+/**
+ * Matches the start and ending characters of IStructuredDocumentRegions with
+ * the given allowed types. Note that Eclipse R3M8 only paints single
+ * character-wide matches and this isn't true pair matching behavior. See RFE
+ * #56836 at https://bugs.eclipse.org/bugs/show_bug.cgi?id=56836.
+ */
+public class DocumentRegionEdgeMatcher implements ICharacterPairMatcher {
+
+	public static final String ID = "characterpairmatcher"; //$NON-NLS-1$
+
+	protected int fAnchor;
+
+	protected ICharacterPairMatcher fNextMatcher;
+
+	protected List fRegionTypes;
+
+	public DocumentRegionEdgeMatcher(String[] validContexts, ICharacterPairMatcher nextMatcher) {
+		fRegionTypes = Arrays.asList(validContexts);
+		fNextMatcher = nextMatcher;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.source.ICharacterPairMatcher#clear()
+	 */
+	public void clear() {
+		if (fNextMatcher != null)
+			fNextMatcher.clear();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.source.ICharacterPairMatcher#dispose()
+	 */
+	public void dispose() {
+		if (fNextMatcher != null)
+			fNextMatcher.dispose();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.source.ICharacterPairMatcher#getAnchor()
+	 */
+	public int getAnchor() {
+		if (fAnchor < 0 && fNextMatcher != null)
+			return fNextMatcher.getAnchor();
+		return fAnchor;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.text.source.ICharacterPairMatcher#match(org.eclipse.jface.text.IDocument,
+	 *      int)
+	 */
+	public IRegion match(IDocument document, int offset) {
+		if (offset < 0 || offset >= document.getLength())
+			return null;
+
+		IRegion match = null;
+		if (!fRegionTypes.isEmpty() && document instanceof IStructuredDocument) {
+			IStructuredDocumentRegion docRegion = ((IStructuredDocument) document).getRegionAtCharacterOffset(offset);
+			if (docRegion != null) {
+				// look at the previous document region first since its end ==
+				// this one's start
+				if (docRegion.getPrevious() != null && docRegion.getPrevious().getEndOffset() == offset && fRegionTypes.contains(docRegion.getPrevious().getType())) {
+					fAnchor = ICharacterPairMatcher.RIGHT;
+					match = new Region(docRegion.getPrevious().getStartOffset(), 1);
+				}
+				// check for offset in the last text region for a match to
+				// document region start offset
+				else if (fRegionTypes.contains(docRegion.getType()) && docRegion.getStartOffset(docRegion.getLastRegion()) <= offset && offset <= docRegion.getEndOffset(docRegion.getLastRegion())) {
+					fAnchor = ICharacterPairMatcher.RIGHT;
+					match = new Region(docRegion.getStartOffset(), 1);
+				}
+				// check for offset in the first text region for a match to
+				// document region end offset
+				else if (fRegionTypes.contains(docRegion.getType())) {
+					if (docRegion.getStartOffset(docRegion.getFirstRegion()) <= offset && offset <= docRegion.getEndOffset(docRegion.getFirstRegion())) {
+						fAnchor = ICharacterPairMatcher.LEFT;
+						match = new Region(docRegion.getEndOffset() - 1, 1);
+					}
+				}
+
+				if (match == null) {
+					/* Now check the text region */
+					ITextRegion currentTextRegion = docRegion.getRegionAtCharacterOffset(offset);
+					if (currentTextRegion != null && currentTextRegion.getTextLength() > 1) {
+						int offsetAtNearEdge = offset;
+						if (offset == docRegion.getTextEndOffset(currentTextRegion)) {
+							offsetAtNearEdge = offset-1;
+						}
+						else if (offset == docRegion.getStartOffset(currentTextRegion)+1) {
+							offsetAtNearEdge = offset-1;
+						}
+
+						if (offsetAtNearEdge == docRegion.getStartOffset(currentTextRegion)) {
+							int end = docRegion.getTextEndOffset(currentTextRegion);
+							try {
+								if (document.getChar(offsetAtNearEdge) == document.getChar(end - 1)) {
+									fAnchor = ICharacterPairMatcher.LEFT;
+									match = new Region(end - 1, 1);
+								}
+							}
+							catch (BadLocationException e) {
+								// nothing, not important enough
+							}
+						}
+						else if (offsetAtNearEdge == docRegion.getTextEndOffset(currentTextRegion)-1) {
+							int start = docRegion.getStartOffset(currentTextRegion);
+							try {
+								if (document.getChar(offsetAtNearEdge) == document.getChar(start)) {
+									fAnchor = ICharacterPairMatcher.RIGHT;
+									match = new Region(start, 1);
+								}
+							}
+							catch (BadLocationException e) {
+								// nothing, not important enough
+							}
+						}
+					}
+				}
+			}
+		}
+		if (match == null && fNextMatcher != null) {
+			fAnchor = -1;
+			match = fNextMatcher.match(document, offset);
+		}
+		return match;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/SourceInfoProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/SourceInfoProvider.java
new file mode 100644
index 0000000..0b7a4f9
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/SourceInfoProvider.java
@@ -0,0 +1,42 @@
+package org.eclipse.wst.sse.ui.internal.text;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.information.IInformationProvider;
+import org.eclipse.jface.text.information.IInformationProviderExtension;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+public class SourceInfoProvider implements IInformationProvider, IInformationProviderExtension  {
+
+	private ITextEditor fEditor;
+
+	public SourceInfoProvider(ITextEditor editor) {
+		fEditor = editor;
+	}
+	public String getInformation(ITextViewer textViewer, IRegion subject) {
+		return getInformation2(textViewer, subject).toString();
+	}
+
+	public IRegion getSubject(ITextViewer textViewer, int offset) {
+		if (textViewer != null && fEditor != null) {
+			IRegion region= WordFinder.findWord(textViewer.getDocument(), offset);
+			if (region != null)
+				return region;
+			else
+				return new Region(offset, 0);
+		}
+		return null;
+	}
+
+	public Object getInformation2(ITextViewer textViewer, IRegion subject) {
+		if (fEditor == null)
+			return null;
+
+		Object selection = fEditor.getSelectionProvider().getSelection();
+		if (selection == null)
+			selection = new Object();
+		return selection;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/WordFinder.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/WordFinder.java
new file mode 100644
index 0000000..4e708c5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/WordFinder.java
@@ -0,0 +1,53 @@
+package org.eclipse.wst.sse.ui.internal.text;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+
+public class WordFinder {
+
+	/* Copied from org.eclipse.jdt.internal.ui.text.JavaWordFinder */
+	public static IRegion findWord(IDocument document, int offset) {
+
+		int start= -2;
+		int end= -1;
+
+		try {
+			int pos= offset;
+			char c;
+
+			while (pos >= 0) {
+				c= document.getChar(pos);
+				if (!Character.isJavaIdentifierPart(c))
+					break;
+				--pos;
+			}
+			start= pos;
+
+			pos= offset;
+			int length= document.getLength();
+
+			while (pos < length) {
+				c= document.getChar(pos);
+				if (!Character.isJavaIdentifierPart(c))
+					break;
+				++pos;
+			}
+			end= pos;
+
+		} catch (BadLocationException x) {
+		}
+
+		if (start >= -1 && end > -1) {
+			if (start == offset && end == offset)
+				return new Region(offset, 0);
+			else if (start == offset)
+				return new Region(start, end - start);
+			else
+				return new Region(start + 1, end - start - 1);
+		}
+
+		return null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/OffsetStatusLineContributionItem.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/OffsetStatusLineContributionItem.java
new file mode 100644
index 0000000..22504dd
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/OffsetStatusLineContributionItem.java
@@ -0,0 +1,1235 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.ui;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentExtension3;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.reconciler.IReconcileStep;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Sash;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+import org.eclipse.ui.texteditor.MarkerUtilities;
+import org.eclipse.ui.texteditor.SimpleMarkerAnnotation;
+import org.eclipse.ui.texteditor.StatusLineContributionItem;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.IPropertySourceProvider;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
+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.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.sse.core.internal.util.Utilities;
+import org.eclipse.wst.sse.core.utils.StringUtils;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
+import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey;
+import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
+
+import com.ibm.icu.text.NumberFormat;
+
+/**
+ * @author nsd A Status Line contribution intended to display the selected
+ *         offsets in an editor. Double-clicking shows information about
+ *         partitions, document regions, annotations, and selection.
+ */
+public class OffsetStatusLineContributionItem extends StatusLineContributionItem {
+
+	class AnnotationPropertySource implements IPropertySource {
+		Annotation fAnnotation = null;
+		IPropertyDescriptor[] fDescriptors = null;
+		String[] TEMPORARY_ANNOTATION_KEYS = new String[]{"Partition Type", "Step", "Scope", "Offset", "Length", "Description"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+
+		public AnnotationPropertySource(Annotation annotation) {
+			super();
+			fAnnotation = annotation;
+		}
+
+		public Object getEditableValue() {
+			return null;
+		}
+
+		public IPropertyDescriptor[] getPropertyDescriptors() {
+			if (fDescriptors == null) {
+				try {
+					if (fAnnotation instanceof SimpleMarkerAnnotation) {
+						Map attrs = ((SimpleMarkerAnnotation) fAnnotation).getMarker().getAttributes();
+						Object[] keys = attrs.keySet().toArray();
+
+						fDescriptors = new IPropertyDescriptor[keys.length];
+						for (int i = 0; i < keys.length; i++) {
+							TextPropertyDescriptor descriptor = new TextPropertyDescriptor(keys[i].toString(), keys[i].toString());
+							fDescriptors[i] = descriptor;
+						}
+					}
+					else if (fAnnotation instanceof TemporaryAnnotation) {
+						Object key = ((TemporaryAnnotation) fAnnotation).getKey();
+						if (key != null && key instanceof ReconcileAnnotationKey) {
+							String[] keys = TEMPORARY_ANNOTATION_KEYS;
+							fDescriptors = new IPropertyDescriptor[keys.length];
+							for (int i = 0; i < keys.length; i++) {
+								TextPropertyDescriptor descriptor = new TextPropertyDescriptor(keys[i].toString(), keys[i].toString());
+								fDescriptors[i] = descriptor;
+							}
+						}
+					}
+				}
+				catch (CoreException e) {
+					e.printStackTrace();
+				}
+			}
+			if (fDescriptors == null)
+				fDescriptors = new IPropertyDescriptor[0];
+			return fDescriptors;
+		}
+
+		public Object getPropertyValue(Object id) {
+			String value = null;
+			if (fAnnotation instanceof SimpleMarkerAnnotation) {
+				Object o;
+				try {
+					o = ((SimpleMarkerAnnotation) fAnnotation).getMarker().getAttributes().get(id);
+					if (o != null) {
+						value = o.toString();
+					}
+				}
+				catch (CoreException e) {
+				}
+			}
+			else if (fAnnotation instanceof TemporaryAnnotation) {
+				if (TEMPORARY_ANNOTATION_KEYS[0].equals(id)) {
+					Object key = ((TemporaryAnnotation) fAnnotation).getKey();
+					if (key != null && key instanceof ReconcileAnnotationKey) {
+						value = ((ReconcileAnnotationKey) key).getPartitionType();
+					}
+				}
+				else if (TEMPORARY_ANNOTATION_KEYS[1].equals(id)) {
+					Object key = ((TemporaryAnnotation) fAnnotation).getKey();
+					if (key != null && key instanceof ReconcileAnnotationKey) {
+						IReconcileStep step = ((ReconcileAnnotationKey) key).getStep();
+						if (step != null) {
+							value = step.toString();
+						}
+					}
+				}
+				else if (TEMPORARY_ANNOTATION_KEYS[2].equals(id)) {
+					Object key = ((TemporaryAnnotation) fAnnotation).getKey();
+					if (key != null && key instanceof ReconcileAnnotationKey) {
+						int scope = ((ReconcileAnnotationKey) key).getScope();
+						if (scope == ReconcileAnnotationKey.PARTIAL) {
+							value = "PARTIAL"; //$NON-NLS-1$
+						}
+						if (scope == ReconcileAnnotationKey.TOTAL) {
+							value = "TOTAL"; //$NON-NLS-1$
+						}
+					}
+				}
+				else if (TEMPORARY_ANNOTATION_KEYS[3].equals(id)) {
+					IAnnotationModel annotationModel = fTextEditor.getDocumentProvider().getAnnotationModel(fTextEditor.getEditorInput());
+					Position p = annotationModel.getPosition(fAnnotation);
+					if (p != null) {
+						value = String.valueOf(p.getOffset());
+					}
+				}
+				else if (TEMPORARY_ANNOTATION_KEYS[4].equals(id)) {
+					IAnnotationModel annotationModel = fTextEditor.getDocumentProvider().getAnnotationModel(fTextEditor.getEditorInput());
+					Position p = annotationModel.getPosition(fAnnotation);
+					if (p != null) {
+						value = String.valueOf(p.getLength());
+					}
+				}
+				else if (TEMPORARY_ANNOTATION_KEYS[5].equals(id)) {
+					value = ((TemporaryAnnotation) fAnnotation).getDescription();
+				}
+			}
+			return value;
+		}
+
+		public boolean isPropertySet(Object id) {
+			return false;
+		}
+
+		public void resetPropertyValue(Object id) {
+			try {
+				if (fAnnotation instanceof SimpleMarkerAnnotation) {
+					((SimpleMarkerAnnotation) fAnnotation).getMarker().getAttributes().remove(id);
+				}
+				else if (fAnnotation instanceof TemporaryAnnotation) {
+				}
+			}
+			catch (CoreException e) {
+				e.printStackTrace();
+			}
+		}
+
+		public void setPropertyValue(Object id, Object value) {
+			try {
+				if (fAnnotation instanceof SimpleMarkerAnnotation) {
+					((MarkerAnnotation) fAnnotation).getMarker().setAttribute(id.toString(), value);
+				}
+				else if (fAnnotation instanceof TemporaryAnnotation) {
+				}
+			}
+			catch (CoreException e) {
+				e.printStackTrace();
+			}
+		}
+	}
+
+	class InformationDialog extends Dialog {
+
+		IDocument fDocument = fTextEditor.getDocumentProvider().getDocument(fTextEditor.getEditorInput());
+
+		public InformationDialog(Shell parentShell) {
+			super(parentShell);
+			setShellStyle(getShellStyle() | SWT.RESIZE);
+		}
+
+		private void createAnnotationTabContents(Composite annotationsTabComposite) {
+			annotationsTabComposite.setLayout(new GridLayout());
+			annotationsTabComposite.setLayoutData(new GridData());
+
+			final Composite annotationsComposite = new Composite(annotationsTabComposite, SWT.NONE);
+			annotationsComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+			final TableViewer annotationsTable = new TableViewer(annotationsComposite, SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+			annotationsTable.setComparator(new ViewerComparator(new Comparator() {
+				public int compare(Object o1, Object o2) {
+					Annotation annotation1 = (Annotation) o1;
+					Annotation annotation2 = (Annotation) o2;
+					String line1 = getLineNumber(annotation1);
+					String line2 = getLineNumber(annotation2);
+					return Integer.parseInt(line1) - Integer.parseInt(line2);
+				}
+			}));
+			annotationsTable.setContentProvider(new ArrayContentProvider());
+			annotationsTable.getTable().setHeaderVisible(true);
+			annotationsTable.getTable().setLinesVisible(true);
+			String[] columns = new String[]{"Line", "Owner", "Type", "Class", "Message"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+			annotationsTable.setLabelProvider(new ITableLabelProvider() {
+				public void addListener(ILabelProviderListener listener) {
+				}
+
+				public void dispose() {
+				}
+
+				public Image getColumnImage(Object element, int columnIndex) {
+					return null;
+				}
+
+				public String getColumnText(Object element, int columnIndex) {
+					Annotation annotation = (Annotation) element;
+					String text = null;
+					switch (columnIndex) {
+						case 0 :
+							text = getLineNumber(annotation);
+							break;
+						case 1 :
+							text = getOwner(annotation);
+							break;
+						case 2 :
+							text = getType(annotation); //$NON-NLS-1$
+							break;
+						case 3 :
+							text = annotation.getClass().getName();
+							break;
+						case 4 :
+							text = annotation.getText();
+							break;
+					}
+					if (text == null)
+						text = ""; //$NON-NLS-1$
+					return text;
+				}
+
+
+				private String getOwner(Annotation annotation) {
+					String owner = null;
+					if (annotation instanceof MarkerAnnotation) {
+						owner = ((MarkerAnnotation) annotation).getMarker().getAttribute("owner", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$				
+					}
+					else if (annotation instanceof TemporaryAnnotation) {
+						Object key = ((TemporaryAnnotation) annotation).getKey();
+						if (key != null) {
+							if (key instanceof ReconcileAnnotationKey) {
+								key = key.getClass().getName();
+							}
+							if (key != null)
+								owner = key.toString();
+						}
+					}
+					return owner;
+				}
+
+				private String getType(Annotation annotation) {
+					String type = null;
+					if (annotation instanceof MarkerAnnotation) {
+						type = "M:"+MarkerUtilities.getMarkerType(((MarkerAnnotation) annotation).getMarker()); //$NON-NLS-1$
+					}
+					else {
+						type = "A:"+annotation.getType(); //$NON-NLS-1$
+					}
+					if (type == null)
+						type = ""; //$NON-NLS-1$
+					return type;
+				}
+
+				public boolean isLabelProperty(Object element, String property) {
+					return true;
+				}
+
+				public void removeListener(ILabelProviderListener listener) {
+				}
+			});
+
+			TableLayout tlayout = new TableLayout();
+			CellEditor[] cellEditors = new CellEditor[columns.length];
+			int columnWidths[] = new int[]{Display.getCurrent().getBounds().width / 14, Display.getCurrent().getBounds().width / 7, Display.getCurrent().getBounds().width / 7, Display.getCurrent().getBounds().width / 14, Display.getCurrent().getBounds().width / 7};
+			for (int i = 0; i < columns.length; i++) {
+				tlayout.addColumnData(new ColumnWeightData(1));
+				TableColumn tc = new TableColumn(annotationsTable.getTable(), SWT.NONE);
+				tc.setText(columns[i]);
+				tc.setResizable(true);
+				tc.setWidth(columnWidths[i]);
+			}
+			annotationsTable.setCellEditors(cellEditors);
+			annotationsTable.setColumnProperties(columns);
+			List matchingAnnotations = new ArrayList(0);
+			if (fTextEditor != null) {
+				IAnnotationModel annotationModel = fTextEditor.getDocumentProvider().getAnnotationModel(fTextEditor.getEditorInput());
+				if (annotationModel != null) {
+					Iterator iterator = annotationModel.getAnnotationIterator();
+					while (iterator.hasNext()) {
+						Annotation element = (Annotation) iterator.next();
+						if (true) {
+							matchingAnnotations.add(element);
+						}
+					}
+				}
+			}
+			annotationsTable.setSorter(new ViewerSorter());
+			annotationsTable.setInput(matchingAnnotations);
+
+			final Sash sash = new Sash(annotationsComposite, SWT.HORIZONTAL);
+
+			final PropertySheetPage propertySheet = new PropertySheetPage();
+			propertySheet.createControl(annotationsComposite);
+			propertySheet.setPropertySourceProvider(new IPropertySourceProvider() {
+				public IPropertySource getPropertySource(Object object) {
+					if (object instanceof Annotation) {
+						IPropertySource annotationPropertySource = new AnnotationPropertySource(((Annotation) object));
+						return annotationPropertySource;
+					}
+					return null;
+				}
+			});
+
+			annotationsTable.addSelectionChangedListener(new ISelectionChangedListener() {
+				public void selectionChanged(SelectionChangedEvent event) {
+					propertySheet.selectionChanged(null, event.getSelection());
+				}
+			});
+
+			final FormLayout form = new FormLayout();
+			annotationsComposite.setLayout(form);
+
+			FormData tableData = new FormData();
+			tableData.top = new FormAttachment(0, 0);
+			tableData.bottom = new FormAttachment(sash, 2);
+			tableData.left = new FormAttachment(0, 0);
+			tableData.right = new FormAttachment(100, 0);
+			annotationsTable.getControl().setLayoutData(tableData);
+
+			FormData propertiesData = new FormData();
+			propertiesData.top = new FormAttachment(sash, 2);
+			propertiesData.left = new FormAttachment(0, 0);
+			propertiesData.right = new FormAttachment(100, 0);
+			propertiesData.bottom = new FormAttachment(100, 0);
+			propertySheet.getControl().setLayoutData(propertiesData);
+
+			final FormData sashData = new FormData();
+			sashData.top = new FormAttachment(60, 0);
+			sashData.left = new FormAttachment(0, 0);
+			sashData.right = new FormAttachment(100, 0);
+			sash.setLayoutData(sashData);
+			sash.addListener(SWT.Selection, new org.eclipse.swt.widgets.Listener() {
+				public void handleEvent(Event e) {
+					sashData.top = new FormAttachment(0, e.y);
+					annotationsComposite.layout();
+				}
+			});
+			annotationsComposite.pack(true);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		protected Control createDialogArea(Composite parent) {
+			ISelection selection = fTextEditor.getSelectionProvider().getSelection();
+			ITextSelection textSelection = (ITextSelection) selection;
+			IStructuredSelection structuredSelection = null;
+			if (selection instanceof IStructuredSelection)
+				structuredSelection = (IStructuredSelection) selection;
+
+			parent.getShell().setText(SSEUIMessages.OffsetStatusLineContributionItem_0 + textSelection.getOffset() + "-" + (textSelection.getOffset() + textSelection.getLength())); //$NON-NLS-1$ //$NON-NLS-2$
+			Composite composite = (Composite) super.createDialogArea(parent);
+
+			Text documentTypeLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY);
+			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+			gd.horizontalSpan = 2;
+			documentTypeLabel.setLayoutData(gd);
+			documentTypeLabel.setText(SSEUIMessages.OffsetStatusLineContributionItem_6 + fDocument.getClass().getName()); //$NON-NLS-1$
+
+			Text documentProviderLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY);
+			gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+			gd.horizontalSpan = 2;
+			documentProviderLabel.setLayoutData(gd);
+			documentProviderLabel.setText(SSEUIMessages.OffsetStatusLineContributionItem_7 + fTextEditor.getDocumentProvider().getClass().getName()); //$NON-NLS-1$
+
+			Text editorInputLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY);
+			gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+			gd.horizontalSpan = 2;
+			editorInputLabel.setLayoutData(gd);
+			editorInputLabel.setText(SSEUIMessages.OffsetStatusLineContributionItem_12 + fTextEditor.getEditorInput().getClass().getName()); //$NON-NLS-1$
+
+			final Text bomLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY);
+			gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+			gd.horizontalSpan = 2;
+			bomLabel.setLayoutData(gd);
+			bomLabel.setEnabled(false);
+			bomLabel.setText("Byte Order Mark: ");
+
+			IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
+			if (model != null) {
+				Text modelIdLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY);
+				gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+				gd.horizontalSpan = 2;
+				modelIdLabel.setLayoutData(gd);
+				modelIdLabel.setText("ID: " + model.getId()); //$NON-NLS-1$
+
+				Text modelBaseLocationLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY);
+				gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+				gd.horizontalSpan = 2;
+				modelBaseLocationLabel.setLayoutData(gd);
+				modelBaseLocationLabel.setText("Base Location: " + model.getBaseLocation()); //$NON-NLS-1$
+
+				Text modelContentTypeLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY);
+				gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+				gd.horizontalSpan = 2;
+				modelContentTypeLabel.setLayoutData(gd);
+				modelContentTypeLabel.setText(SSEUIMessages.OffsetStatusLineContributionItem_4 + model.getContentTypeIdentifier()); //$NON-NLS-1$
+
+				Text modelHandlerContentTypeLabel = new Text(composite, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
+				gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+				gd.horizontalSpan = 2;
+				modelHandlerContentTypeLabel.setLayoutData(gd);
+				modelHandlerContentTypeLabel.setText(SSEUIMessages.OffsetStatusLineContributionItem_5 + model.getModelHandler().getAssociatedContentTypeId() + " (" + model.getModelHandler() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+				final Text counts = new Text(composite, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
+				gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+				gd.horizontalSpan = 2;
+				counts.setLayoutData(gd);
+				counts.setText("Counting...");
+				counts.setEnabled(false);
+				final IStructuredModel finalModel = model;
+				final Display display = Display.getCurrent();
+				Job counter = new Job("Counting regions") {
+					protected IStatus run(IProgressMonitor monitor) {
+						IStructuredDocumentRegion[] structuredDocumentRegions = finalModel.getStructuredDocument().getStructuredDocumentRegions();
+						int length = finalModel.getStructuredDocument().getLength();
+						int regionCount = 0;
+						for (int i = 0; i < structuredDocumentRegions.length; i++) {
+							regionCount += structuredDocumentRegions[i].getNumberOfRegions();
+						}
+						NumberFormat formatter = NumberFormat.getIntegerInstance();
+						final String regioncount = "Count: " + formatter.format(structuredDocumentRegions.length) + " document regions containing " + formatter.format(regionCount) + " text regions representing " + formatter.format(length) + " characters";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+						display.asyncExec(new Runnable() {
+							public void run() {
+								if (!counts.isDisposed()) {
+									counts.setText(regioncount);
+									counts.setEnabled(true);
+								}
+								if (!bomLabel.isDisposed()) {
+									bomLabel.setText("Byte Order Mark: " + getBOMText(fTextEditor.getEditorInput())); //$NON-NLS-1$
+									bomLabel.setEnabled(true);
+								}
+							}
+						});
+						return Status.OK_STATUS;
+					}
+				};
+				counter.schedule(1000);
+
+				Label blankRow = new Label(composite, SWT.NONE);
+				gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+				gd.horizontalSpan = 2;
+				blankRow.setLayoutData(gd);
+			}
+			if (model != null) {
+				model.releaseFromRead();
+			}
+
+			TabFolder tabfolder = new TabFolder(composite, SWT.NONE);
+			tabfolder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+			TabItem partitionTab = new TabItem(tabfolder, SWT.BORDER);
+			partitionTab.setText(SSEUIMessages.OffsetStatusLineContributionItem_2); //$NON-NLS-1$
+			SashForm partitions = new SashForm(tabfolder, SWT.NONE);
+			partitions.setOrientation(SWT.VERTICAL);
+			partitionTab.setControl(partitions);
+			createPartitionTabContents(partitions);
+			partitions.setWeights(new int[]{2, 1});
+
+			TabItem annotationsTab = new TabItem(tabfolder, SWT.BORDER);
+			annotationsTab.setText("Annotations"); //$NON-NLS-1$
+			Composite annotations = new Composite(tabfolder, SWT.NONE);
+			annotationsTab.setControl(annotations);
+			createAnnotationTabContents(annotations);
+
+			// only create the ITextRegions tab for IStructuredDocuments
+			if (fDocument instanceof IStructuredDocument) {
+				TabItem regionTab = new TabItem(tabfolder, SWT.BORDER);
+				regionTab.setText(SSEUIMessages.OffsetStatusLineContributionItem_3); //$NON-NLS-1$
+				SashForm regions = new SashForm(tabfolder, SWT.NONE);
+				regions.setOrientation(SWT.HORIZONTAL);
+				regionTab.setControl(regions);
+				createRegionTabContents(regions);
+				regions.setWeights(new int[]{3, 2});
+			}
+
+			if (structuredSelection != null) {
+				TabItem editorSelectionTab = new TabItem(tabfolder, SWT.BORDER);
+				editorSelectionTab.setText(SSEUIMessages.OffsetStatusLineContributionItem_14);
+				Composite editorSelectionComposite = new Composite(tabfolder, SWT.NONE);
+				editorSelectionTab.setControl(editorSelectionComposite);
+				fillSelectionTabContents(editorSelectionComposite, structuredSelection.toList(), "Class: " + structuredSelection.getClass().getName()); //$NON-NLS-1$
+			}
+
+			model = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
+			if (model != null) {
+				TabItem overlappingIndexedRegionsTab = new TabItem(tabfolder, SWT.BORDER);
+				overlappingIndexedRegionsTab.setText(SSEUIMessages.OffsetStatusLineContributionItem_20);
+				Composite overlappingIndexedRegionsTabComposite = new Composite(tabfolder, SWT.NONE);
+				overlappingIndexedRegionsTab.setControl(overlappingIndexedRegionsTabComposite);
+				fillSelectionTabContents(overlappingIndexedRegionsTabComposite, getIndexedRegions(textSelection), "All IndexedRegions overlapping text selection"); //$NON-NLS-1$
+				model.releaseFromRead();
+			}
+
+			IEditorSite site = fTextEditor.getEditorSite();
+			if (site != null) {
+				IWorkbenchWindow window = site.getWorkbenchWindow();
+				if (window != null) {
+					ISelectionService service = window.getSelectionService();
+					ISelection selectionFromService = service.getSelection();
+					if (service != null && !selectionFromService.equals(structuredSelection) && selectionFromService instanceof IStructuredSelection) {
+						TabItem selectionServiceTab = new TabItem(tabfolder, SWT.BORDER);
+						selectionServiceTab.setText(SSEUIMessages.OffsetStatusLineContributionItem_19);
+						Composite selectionServiceComposite = new Composite(tabfolder, SWT.NONE);
+						selectionServiceTab.setControl(selectionServiceComposite);
+						fillSelectionTabContents(selectionServiceComposite, ((IStructuredSelection) selectionFromService).toList(), "Class: " + selectionFromService.getClass().getName()); //$NON-NLS-1$
+					}
+				}
+			}
+
+			return composite;
+		}
+
+		/**
+		 * @param editorInput
+		 * @return
+		 */
+		private String getBOMText(IEditorInput editorInput) {
+			IFile file = (IFile) editorInput.getAdapter(IFile.class);
+			String detectedBOM = "none"; //$NON-NLS-1$
+			if (file != null) {
+				InputStream s = null;
+				try {
+					s = file.getContents(true);
+					if (s != null) {
+						int b1 = s.read() & 0xFF;
+						int b2 = s.read() & 0xFF;
+						if (b1 == 0xFE && b2 == 0xFF) {
+							detectedBOM = "FE FF (UTF-16BE)"; //$NON-NLS-1$
+						}
+						else if (b1 == 0xFF && b2 == 0xFE) {
+							detectedBOM = "FF FE (UTF-16LE)"; //$NON-NLS-1$
+						}
+						else {
+							int b3 = s.read() & 0xFF;
+							if (b1 == 0xEF && b2 == 0xBB && b3 == 0xBF) {
+								detectedBOM = "EF BB BF (UTF-8)"; //$NON-NLS-1$
+							}
+						}
+					}
+				}
+				catch (Exception e) {
+					detectedBOM = e.getMessage();
+				}
+				finally {
+					if (s != null)
+						try {
+							s.close();
+						}
+						catch (IOException e) {
+						}
+				}
+			}
+			else {
+				detectedBOM = "N/A"; //$NON-NLS-1$
+			}
+			return detectedBOM;
+		}
+
+		private List getIndexedRegions(ITextSelection textSelection) {
+			Set overlappingIndexedRegions = new HashSet(2);
+			int start = textSelection.getOffset();
+			int end = start + textSelection.getLength();
+			IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
+			if (model != null) {
+				for (int i = start; i <= end; i++) {
+					IndexedRegion r = model.getIndexedRegion(i);
+					if (r != null) {
+						overlappingIndexedRegions.add(r);
+					}
+				}
+				model.releaseFromRead();
+			}
+
+			return Arrays.asList(overlappingIndexedRegions.toArray());
+		}
+
+		/**
+		 * @param sash
+		 */
+		private void createPartitionTabContents(SashForm sash) {
+			Composite partioningComposite = new Composite(sash, SWT.NONE);
+			partioningComposite.setLayout(new GridLayout(2, false));
+			partioningComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+			Label label = new Label(partioningComposite, SWT.SINGLE);
+			label.setText(SSEUIMessages.OffsetStatusLineContributionItem_8); //$NON-NLS-1$
+			label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+			final Combo partitioningCombo = new Combo(partioningComposite, SWT.READ_ONLY);
+			partitioningCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+			final Label partitionerInstanceLabel = new Label(partioningComposite, SWT.SINGLE);
+			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+			gd.horizontalSpan = 2;
+			partitionerInstanceLabel.setLayoutData(gd);
+
+			final TableViewer fPartitionTable = new TableViewer(partioningComposite, SWT.FULL_SELECTION);
+			gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+			gd.horizontalSpan = 2;
+			fPartitionTable.getControl().setLayoutData(gd);
+			fPartitionTable.setContentProvider(new ArrayContentProvider());
+			fPartitionTable.getTable().setHeaderVisible(true);
+			fPartitionTable.getTable().setLinesVisible(true);
+			String[] columns = new String[]{SSEUIMessages.OffsetStatusLineContributionItem_9, SSEUIMessages.OffsetStatusLineContributionItem_10, SSEUIMessages.OffsetStatusLineContributionItem_11}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			fPartitionTable.setLabelProvider(new ITableLabelProvider() {
+				public void addListener(ILabelProviderListener listener) {
+				}
+
+				public void dispose() {
+				}
+
+				public Image getColumnImage(Object element, int columnIndex) {
+					return null;
+				}
+
+				public String getColumnText(Object element, int columnIndex) {
+					ITypedRegion partition = (ITypedRegion) element;
+					String text = null;
+					switch (columnIndex) {
+						case 0 :
+							text = Integer.toString(partition.getOffset());
+							break;
+						case 1 :
+							text = Integer.toString(partition.getLength());
+							break;
+						case 2 :
+							text = partition.getType();
+							break;
+					}
+					if (text == null)
+						text = ""; //$NON-NLS-1$
+					return text;
+				}
+
+				public boolean isLabelProperty(Object element, String property) {
+					return false;
+				}
+
+				public void removeListener(ILabelProviderListener listener) {
+				}
+			});
+			TableLayout tlayout = new TableLayout();
+			CellEditor[] cellEditors = new CellEditor[columns.length];
+			int columnWidths[] = new int[]{Display.getCurrent().getBounds().width / 14, Display.getCurrent().getBounds().width / 14, Display.getCurrent().getBounds().width / 5};
+			for (int i = 0; i < columns.length; i++) {
+				tlayout.addColumnData(new ColumnWeightData(1));
+				TableColumn tc = new TableColumn(fPartitionTable.getTable(), SWT.NONE);
+				tc.setText(columns[i]);
+				tc.setResizable(true);
+				tc.setWidth(columnWidths[i]);
+			}
+			fPartitionTable.setCellEditors(cellEditors);
+			fPartitionTable.setColumnProperties(columns);
+			final String[] partitionings = (fDocument instanceof IDocumentExtension3) ? ((IDocumentExtension3) fDocument).getPartitionings() : new String[]{IDocumentExtension3.DEFAULT_PARTITIONING};
+			partitioningCombo.setItems(partitionings);
+			partitioningCombo.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					ISelection sel = fTextEditor.getSelectionProvider().getSelection();
+					ITextSelection textSelection = (ITextSelection) sel;
+					try {
+						String partitionerText = fDocument instanceof IDocumentExtension3 ? ((IDocumentExtension3) fDocument).getDocumentPartitioner(partitioningCombo.getItem(partitioningCombo.getSelectionIndex())).toString() : ("" + fDocument.getDocumentPartitioner()); //$NON-NLS-1$
+						partitionerInstanceLabel.setText(SSEUIMessages.OffsetStatusLineContributionItem_13 + partitionerText); //$NON-NLS-1$
+						fPartitionTable.setInput(TextUtilities.computePartitioning(fDocument, partitioningCombo.getItem(partitioningCombo.getSelectionIndex()), textSelection.getOffset(), textSelection.getLength(), true));
+					}
+					catch (BadLocationException e1) {
+						fPartitionTable.setInput(new ITypedRegion[0]);
+					}
+				}
+			});
+			try {
+				if (partitionings.length > 0) {
+					String selectedPartitioning = partitioningCombo.getItem(0);
+					if (Utilities.contains(partitionings, IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING)) {
+						selectedPartitioning = IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING;
+						for (int i = 0; i < partitionings.length; i++) {
+							if (partitionings[i].equals(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING)) {
+								partitioningCombo.select(i);
+							}
+						}
+					}
+					else {
+						partitioningCombo.select(0);
+					}
+					ISelection sel = fTextEditor.getSelectionProvider().getSelection();
+					ITextSelection textSelection = (ITextSelection) sel;
+					ITypedRegion[] partitions = TextUtilities.computePartitioning(fDocument, selectedPartitioning, textSelection.getOffset(), textSelection.getLength(), true);
+					fPartitionTable.setInput(partitions);
+					String partitionerText = fDocument instanceof IDocumentExtension3 ? ((IDocumentExtension3) fDocument).getDocumentPartitioner(partitioningCombo.getItem(partitioningCombo.getSelectionIndex())).toString() : ("" + fDocument.getDocumentPartitioner()); //$NON-NLS-1$
+					partitionerInstanceLabel.setText(SSEUIMessages.OffsetStatusLineContributionItem_13 + partitionerText); //$NON-NLS-1$
+				}
+				else {
+					ISelection sel = fTextEditor.getSelectionProvider().getSelection();
+					ITextSelection textSelection = (ITextSelection) sel;
+					fPartitionTable.setInput(fDocument.computePartitioning(textSelection.getOffset(), textSelection.getLength()));
+				}
+			}
+			catch (BadLocationException e1) {
+				fPartitionTable.setInput(new ITypedRegion[0]);
+			}
+			partitioningCombo.setFocus();
+
+
+			final StyledText text = new StyledText(sash, SWT.MULTI | SWT.READ_ONLY);
+			fPartitionTable.addSelectionChangedListener(new ISelectionChangedListener() {
+				public void selectionChanged(SelectionChangedEvent event) {
+					if (event.getSelection() instanceof IStructuredSelection) {
+						IRegion partition = (IRegion) ((IStructuredSelection) event.getSelection()).getFirstElement();
+						IDocument document = fTextEditor.getDocumentProvider().getDocument(fTextEditor.getEditorInput());
+						String source;
+						try {
+							source = document.get(partition.getOffset(), partition.getLength());
+							text.setEnabled(true);
+							text.setText(source);
+						}
+						catch (BadLocationException e) {
+							e.printStackTrace();
+						}
+					}
+				}
+			});
+			text.setEnabled(false);
+		}
+
+		/**
+		 * @param composite
+		 * @return
+		 */
+		private Composite createRegionTabContents(SashForm sashForm) {
+			ISelection sel = fTextEditor.getSelectionProvider().getSelection();
+			final ITextSelection textSelection = (ITextSelection) sel;
+			final List documentRegions = new ArrayList();
+			if (fDocument instanceof IStructuredDocument) {
+				IStructuredDocument structuredDocument = (IStructuredDocument) fDocument;
+				int pos = textSelection.getOffset();
+				int end = textSelection.getOffset() + textSelection.getLength();
+				IStructuredDocumentRegion docRegion = structuredDocument.getRegionAtCharacterOffset(pos);
+				IStructuredDocumentRegion endRegion = structuredDocument.getRegionAtCharacterOffset(end);
+				if (pos < end) {
+					while (docRegion != endRegion) {
+						documentRegions.add(docRegion);
+						docRegion = docRegion.getNext();
+					}
+				}
+				documentRegions.add(docRegion);
+			}
+
+			final TreeViewer tree = new TreeViewer(sashForm, SWT.V_SCROLL | SWT.H_SCROLL);
+			final String START = SSEUIMessages.OffsetStatusLineContributionItem_15; //$NON-NLS-1$
+			final String LENGTH = SSEUIMessages.OffsetStatusLineContributionItem_16; //$NON-NLS-1$
+			final String TEXTLENGTH = SSEUIMessages.OffsetStatusLineContributionItem_17; //$NON-NLS-1$
+			final String CONTEXT = SSEUIMessages.OffsetStatusLineContributionItem_18; //$NON-NLS-1$
+			tree.setContentProvider(new ITreeContentProvider() {
+				public void dispose() {
+				}
+
+				public Object[] getChildren(Object parentElement) {
+					List children = new ArrayList(0);
+					if (parentElement instanceof ITextSelection) {
+						children.addAll(documentRegions);
+					}
+					if (parentElement instanceof ITextRegionCollection) {
+						children.add(((ITextRegionCollection) parentElement).getRegions().toArray());
+					}
+					if (parentElement instanceof ITextRegion) {
+						children.add(new KeyValuePair(CONTEXT, ((ITextRegion) parentElement).getType()));
+						children.add(new KeyValuePair(START, Integer.toString(((ITextRegion) parentElement).getStart())));
+						children.add(new KeyValuePair(TEXTLENGTH, Integer.toString(((ITextRegion) parentElement).getTextLength())));
+						children.add(new KeyValuePair(LENGTH, Integer.toString(((ITextRegion) parentElement).getLength())));
+					}
+					if (parentElement instanceof ITextRegionList) {
+						children.add(Arrays.asList(((ITextRegionList) parentElement).toArray()));
+					}
+					if (parentElement instanceof Collection) {
+						children.addAll((Collection) parentElement);
+					}
+					if (parentElement instanceof Object[]) {
+						children.addAll(Arrays.asList((Object[]) parentElement));
+					}
+					return children.toArray();
+				}
+
+				public Object[] getElements(Object inputElement) {
+					return documentRegions.toArray();
+				}
+
+				public Object getParent(Object element) {
+					if (element instanceof IStructuredDocumentRegion)
+						return ((IStructuredDocumentRegion) element).getParentDocument();
+					if (element instanceof ITextRegionContainer) {
+						return ((ITextRegionContainer) element).getParent();
+					}
+					return fDocument;
+				}
+
+				public boolean hasChildren(Object element) {
+					return !(element instanceof KeyValuePair);
+				}
+
+				public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+				}
+			});
+			tree.setLabelProvider(new LabelProvider() {
+				public String getText(Object element) {
+					if (element instanceof KeyValuePair)
+						return ((KeyValuePair) element).fKey.toString().toLowerCase() + ": " + ((KeyValuePair) element).fValue; //$NON-NLS-1$
+					if (element instanceof IStructuredDocumentRegion) {
+						IStructuredDocumentRegion documentRegion = (IStructuredDocumentRegion) element;
+						int packageNameLength = documentRegion.getClass().getPackage().getName().length();
+						if (packageNameLength > 0)
+							packageNameLength++;
+						String name = documentRegion.getClass().getName().substring(packageNameLength);
+						String text = "[" + documentRegion.getStartOffset() + "-" + documentRegion.getEndOffset() + "] " + name + "@" + element.hashCode() + " " + documentRegion.getType(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+						return text;
+					}
+					if (element instanceof ITextRegion) {
+						ITextRegion textRegion = (ITextRegion) element;
+						int packageNameLength = textRegion.getClass().getPackage().getName().length();
+						if (packageNameLength > 0)
+							packageNameLength++;
+						String name = textRegion.getClass().getName().substring(packageNameLength);
+						String text = "[" + textRegion.getStart() + "-" + textRegion.getEnd() + "] " + name + "@" + element.hashCode() + " " + textRegion.getType(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+						return text;
+					}
+					return super.getText(element);
+				}
+			});
+			tree.setInput(fDocument);
+
+
+			final Text displayText = new Text(sashForm, SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY | SWT.BORDER);
+			displayText.setBackground(sashForm.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+			tree.addSelectionChangedListener(new ISelectionChangedListener() {
+				public void selectionChanged(SelectionChangedEvent event) {
+					if (event.getSelection() instanceof IStructuredSelection) {
+						Object o = ((IStructuredSelection) event.getSelection()).getFirstElement();
+						if (o instanceof KeyValuePair)
+							displayText.setText(((KeyValuePair) o).fValue.toString());
+						else if (o instanceof ITextSelection) {
+							ITextSelection text = (ITextSelection) o;
+							try {
+								displayText.setText(fDocument.get(text.getOffset(), text.getLength()));
+							}
+							catch (BadLocationException e) {
+								displayText.setText(""); //$NON-NLS-1$
+							}
+						}
+						else if (o instanceof ITextRegionCollection) {
+							ITextRegionCollection region = (ITextRegionCollection) o;
+							displayText.setText(region.getFullText());
+						}
+						else
+							displayText.setText("" + o); //$NON-NLS-1$
+					}
+				}
+			});
+			return sashForm;
+		}
+
+		private void fillSelectionTabContents(Composite area, List selection, String description) {
+			area.setLayout(new GridLayout());
+			area.setLayoutData(new GridData());
+
+			Label typeName = new Label(area, SWT.WRAP);
+			typeName.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+			typeName.setText(description); //$NON-NLS-1$
+
+			(new Label(area, SWT.NONE)).setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+			SashForm structuredSashForm = new SashForm(area, SWT.NONE);
+			structuredSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+			structuredSashForm.setOrientation(SWT.VERTICAL);
+
+			final TableViewer structuredSelectionTable = new TableViewer(structuredSashForm, SWT.FULL_SELECTION | SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+
+			structuredSelectionTable.getTable().setHeaderVisible(true);
+			structuredSelectionTable.getTable().setLinesVisible(true);
+			structuredSelectionTable.setSorter(new ViewerSorter() {
+				public int category(Object element) {
+					if (element instanceof IndexedRegion)
+						return ((IndexedRegion) element).getStartOffset();
+					return super.category(element);
+				}
+			});
+
+			structuredSelectionTable.setLabelProvider(new ITableLabelProvider() {
+				public void addListener(ILabelProviderListener listener) {
+				}
+
+				public void dispose() {
+				}
+
+				public Image getColumnImage(Object element, int columnIndex) {
+					if (element instanceof INodeNotifier) {
+						INodeAdapter adapterFor = ((INodeNotifier) element).getAdapterFor(IJFaceNodeAdapter.class);
+						if (columnIndex == 2 && adapterFor != null && adapterFor instanceof IJFaceNodeAdapter) {
+							IJFaceNodeAdapter adapter = (IJFaceNodeAdapter) adapterFor;
+							return adapter.getLabelImage((element));
+						}
+					}
+					return null;
+				}
+
+				public String getColumnText(Object element, int columnIndex) {
+					String text = null;
+					if (element != null) {
+						switch (columnIndex) {
+							case 0 : {
+								text = String.valueOf(((List) structuredSelectionTable.getInput()).indexOf(element));
+							}
+								break;
+							case 1 : {
+								text = element.getClass().getName();
+							}
+								break;
+							case 2 : {
+								text = StringUtils.firstLineOf(element.toString());
+							}
+								break;
+							default :
+								text = ""; //$NON-NLS-1$
+						}
+					}
+					return text;
+				}
+
+				public boolean isLabelProperty(Object element, String property) {
+					return false;
+				}
+
+				public void removeListener(ILabelProviderListener listener) {
+				}
+			});
+
+			TableLayout tlayout = new TableLayout();
+			tlayout.addColumnData(new ColumnWeightData(7, true));
+			tlayout.addColumnData(new ColumnWeightData(28, true));
+			tlayout.addColumnData(new ColumnWeightData(50, true));
+			structuredSelectionTable.getTable().setLayout(tlayout);
+
+			TableColumn tc = new TableColumn(structuredSelectionTable.getTable(), SWT.NONE);
+			tc.setText("Item"); //$NON-NLS-1$
+			tc.setResizable(true);
+			tc.setWidth(40);
+
+			tc = new TableColumn(structuredSelectionTable.getTable(), SWT.NONE);
+			tc.setText("Class"); //$NON-NLS-1$
+			tc.setResizable(true);
+			tc.setWidth(40);
+
+			tc = new TableColumn(structuredSelectionTable.getTable(), SWT.NONE);
+			tc.setText("Value"); //$NON-NLS-1$
+			tc.setResizable(true);
+			tc.setWidth(40);
+
+			structuredSelectionTable.setContentProvider(new ArrayContentProvider());
+			final List input = selection;
+			structuredSelectionTable.setInput(input);
+
+			final TreeViewer infoTree = new TreeViewer(structuredSashForm, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+			infoTree.setLabelProvider(new LabelProvider() {
+				public Image getImage(Object element) {
+					if (element instanceof TreeViewer && infoTree.getInput() instanceof INodeNotifier) {
+						INodeAdapter adapterFor = ((INodeNotifier) infoTree.getInput()).getAdapterFor(IJFaceNodeAdapter.class);
+						if (adapterFor != null && adapterFor instanceof IJFaceNodeAdapter) {
+							IJFaceNodeAdapter adapter = (IJFaceNodeAdapter) adapterFor;
+							return adapter.getLabelImage((infoTree.getInput()));
+						}
+					}
+					return super.getImage(element);
+				}
+
+				public String getText(Object element) {
+					if (element instanceof Class) {
+						return "Class: " + ((Class) element).getName(); //$NON-NLS-1$
+					}
+					if (element instanceof Collection) {
+						return "Registered Adapters:"; //$NON-NLS-1$
+					}
+					if (element instanceof IRegion) {
+						return "Indexed Region offset span: [" + ((IRegion) element).getOffset() + "-" + ((IRegion) element).getLength() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					}
+					if (element instanceof TreeViewer && infoTree.getInput() instanceof INodeNotifier) {
+						IJFaceNodeAdapter adapter = (IJFaceNodeAdapter) ((INodeNotifier) infoTree.getInput()).getAdapterFor(IJFaceNodeAdapter.class);
+						if (adapter != null) {
+							return adapter.getLabelText((infoTree.getInput()));
+						}
+					}
+					return super.getText(element);
+				}
+			});
+			infoTree.setContentProvider(new ITreeContentProvider() {
+				public void dispose() {
+				}
+
+				public Object[] getChildren(Object parentElement) {
+					if (parentElement instanceof Collection)
+						return ((Collection) parentElement).toArray();
+					return new Object[0];
+				}
+
+				public Object[] getElements(Object inputElement) {
+					List elements = new ArrayList(4);
+					if (inputElement != null) {
+						if (inputElement instanceof INodeNotifier && ((INodeNotifier) inputElement).getAdapterFor(IJFaceNodeAdapter.class) != null) {
+							elements.add(infoTree);
+						}
+						elements.add(inputElement.getClass());
+						if (inputElement instanceof IndexedRegion) {
+							elements.add(new Region(((IndexedRegion) inputElement).getStartOffset(), ((IndexedRegion) inputElement).getEndOffset()));
+						}
+						if (inputElement instanceof INodeNotifier) {
+							elements.add(((INodeNotifier) inputElement).getAdapters());
+						}
+					}
+					return elements.toArray();
+				}
+
+				public Object getParent(Object element) {
+					return null;
+				}
+
+				public boolean hasChildren(Object element) {
+					return element instanceof Collection;
+				}
+
+				public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+				}
+			});
+
+			structuredSelectionTable.addSelectionChangedListener(new ISelectionChangedListener() {
+				public void selectionChanged(SelectionChangedEvent event) {
+					int selectionIndex = structuredSelectionTable.getTable().getSelectionIndex();
+					if (selectionIndex != -1) {
+						infoTree.setInput(structuredSelectionTable.getElementAt(selectionIndex));
+					}
+					else {
+						infoTree.setInput(event.getSelectionProvider().getSelection());
+					}
+					infoTree.expandToLevel(2);
+				}
+			});
+
+			structuredSashForm.setWeights(new int[]{3, 2});
+		}
+
+		private String getLineNumber(Annotation annotation) {
+			int line = -1;
+			if (annotation instanceof MarkerAnnotation) {
+				line = MarkerUtilities.getLineNumber(((MarkerAnnotation) annotation).getMarker());//$NON-NLS-1$
+			}
+			else {
+				IAnnotationModel annotationModel = fTextEditor.getDocumentProvider().getAnnotationModel(fTextEditor.getEditorInput());
+				Position p = annotationModel.getPosition(annotation);
+				if (p != null && !p.isDeleted()) {
+					try {
+						// don't forget the +1
+						line = fDocument.getLineOfOffset(p.getOffset()) + 1;
+					}
+					catch (BadLocationException e) {
+						return e.getMessage();
+					}
+				}
+			}
+			return Integer.toString(line);
+		}
+	}
+
+	static class KeyValuePair {
+		Object fKey;
+		String fValue;
+
+		public KeyValuePair(Object key, String value) {
+			fKey = key;
+			fValue = value;
+		}
+	}
+
+	class ShowEditorInformationAction extends Action {
+		public ShowEditorInformationAction() {
+			super();
+		}
+
+		public void run() {
+			/**
+			 * TODO: Provide a more useful control, maybe a table where the
+			 * selection shows you the partition's text in a StyledText pane
+			 * beneath it.
+			 */
+			super.run();
+			new InformationDialog(((Control) fTextEditor.getAdapter(Control.class)).getShell()).open();
+		}
+	}
+
+	IAction fShowEditorInformationAction = new ShowEditorInformationAction();
+
+	ITextEditor fTextEditor = null;
+
+	/**
+	 * @param id
+	 */
+	public OffsetStatusLineContributionItem(String id) {
+		super(id);
+		setToolTipText("Double-click for more information");
+	}
+
+	/**
+	 * @param id
+	 * @param visible
+	 * @param widthInChars
+	 */
+	public OffsetStatusLineContributionItem(String id, boolean visible, int widthInChars) {
+		super(id, visible, widthInChars);
+		setToolTipText("Double-click for more information");
+	}
+
+	public void setActiveEditor(ITextEditor textEditor) {
+		fTextEditor = textEditor;
+		setActionHandler(fShowEditorInformationAction);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/StructuredTextAnnotationImageProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/StructuredTextAnnotationImageProvider.java
new file mode 100644
index 0000000..4d4923a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/StructuredTextAnnotationImageProvider.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.texteditor.IAnnotationImageProvider;
+
+/**
+ * Image provider for structured text editor annotations.
+ * 
+ * @author pavery
+ */
+public class StructuredTextAnnotationImageProvider implements IAnnotationImageProvider {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getImageDescriptor(java.lang.String)
+	 */
+	public ImageDescriptor getImageDescriptor(String imageDescritporId) {
+		return null;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getImageDescriptorId(org.eclipse.jface.text.source.Annotation)
+	 */
+	public String getImageDescriptorId(Annotation annotation) {
+        return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getManagedImage(org.eclipse.jface.text.source.Annotation)
+	 */
+	public Image getManagedImage(Annotation annotation) {
+		// future return different types of managed images as JDT does
+		// eg. overlay icon images, "grayed" images, quick fixable, etc...
+		return null;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/Assert.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/Assert.java
new file mode 100644
index 0000000..d04eaed
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/Assert.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.util;
+
+
+/**
+ * <code>Assert</code> is useful for for embedding runtime sanity checks in
+ * code. The predicate methods all test a condition and throw some type of
+ * unchecked exception if the condition does not hold.
+ * <p>
+ * Assertion failure exceptions, like most runtime exceptions, are thrown when
+ * something is misbehaving. Assertion failures are invariably unspecified
+ * behavior; consequently, clients should never rely on these being thrown
+ * (and certainly should not being catching them specifically).
+ * </p>
+ */
+public final class Assert {
+
+	/**
+	 * <code>AssertionFailedException</code> is a runtime exception thrown
+	 * by some of the methods in <code>Assert</code>.
+	 * <p>
+	 * This class is not declared public to prevent some misuses; programs
+	 * that catch or otherwise depend on assertion failures are susceptible to
+	 * unexpected breakage when assertions in the code are added or removed.
+	 * </p>
+	 */
+	class AssertionFailedException extends RuntimeException {
+		/**
+		 * Comment for <code>serialVersionUID</code>
+		 */
+		private static final long serialVersionUID = 1L;
+
+		/**
+		 * Constructs a new exception.
+		 */
+		public AssertionFailedException() {
+			super();
+		}
+
+		/**
+		 * Constructs a new exception with the given message.
+		 */
+		public AssertionFailedException(String detail) {
+			super(detail);
+		}
+	}
+
+	/**
+	 * Asserts that an argument is legal. If the given boolean is not
+	 * <code>true</code>, an <code>IllegalArgumentException</code> is
+	 * thrown. The given message is included in that exception, to aid
+	 * debugging.
+	 * 
+	 * @param expression
+	 *            the outcode of the check
+	 * @param message
+	 *            the message to include in the exception
+	 * @return <code>true</code> if the check passes (does not return if the
+	 *         check fails)
+	 * @exception IllegalArgumentException
+	 *                if the legality test failed
+	 */
+	public static boolean isLegal(boolean expression, String message) {
+		if (!expression)
+			throw new IllegalArgumentException(message);
+		return expression;
+	}
+
+	/**
+	 * Asserts that the given object is not <code>null</code>. If this is
+	 * not the case, some kind of unchecked exception is thrown. The given
+	 * message is included in that exception, to aid debugging.
+	 * 
+	 * @param object
+	 *            the value to test
+	 * @param message
+	 *            the message to include in the exception
+	 * @exception IllegalArgumentException
+	 *                if the object is <code>null</code>
+	 */
+	public static void isNotNull(Object object, String message) {
+		if (object == null) {
+			throw new Assert().new AssertionFailedException(message);
+		}
+	}
+
+	/**
+	 * Asserts that the given boolean is <code>true</code>. If this is not
+	 * the case, some kind of unchecked exception is thrown. The given message
+	 * is included in that exception, to aid debugging.
+	 * 
+	 * @param expression
+	 *            the outcode of the check
+	 * @param message
+	 *            the message to include in the exception
+	 * @return <code>true</code> if the check passes (does not return if the
+	 *         check fails)
+	 */
+	public static boolean isTrue(boolean expression, String message) {
+		if (!expression) {
+			throw new Assert().new AssertionFailedException(message);
+		}
+		return expression;
+	}
+
+	/* This class is not intended to be instantiated. */
+	private Assert() {
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/EditorUtility.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/EditorUtility.java
new file mode 100644
index 0000000..8a26343
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/EditorUtility.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.util;
+
+
+import com.ibm.icu.util.StringTokenizer;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+
+/**
+ * Helpful methods to be used with the Source Editor
+ */
+public class EditorUtility {
+
+	/**
+	 * Appends to modifier string of the given SWT modifier bit to the given
+	 * modifierString.
+	 * 
+	 * @param modifierString
+	 *            the modifier string
+	 * @param modifier
+	 *            an int with SWT modifier bit
+	 * @return the concatenated modifier string
+	 */
+	private static String appendModifierString(String modifierString, int modifier) {
+		if (modifierString == null)
+			modifierString = ""; //$NON-NLS-1$
+		String newModifierString = Action.findModifierString(modifier);
+		if (modifierString.length() == 0)
+			return newModifierString;
+		return modifierString + " + " + newModifierString; //$NON-NLS-1$
+	}
+
+	/**
+	 * Computes the state mask for the given modifier string.
+	 * 
+	 * @param modifiers
+	 *            the string with the modifiers, separated by '+', '-', ';',
+	 *            ',' or '.'
+	 * @return the state mask or -1 if the input is invalid
+	 */
+	public static int computeStateMask(String modifiers) {
+		if (modifiers == null)
+			return -1;
+
+		if (modifiers.length() == 0)
+			return SWT.NONE;
+
+		int stateMask = 0;
+		StringTokenizer modifierTokenizer = new StringTokenizer(modifiers, ",;.:+-* "); //$NON-NLS-1$
+		while (modifierTokenizer.hasMoreTokens()) {
+			int modifier = EditorUtility.findLocalizedModifier(modifierTokenizer.nextToken());
+			if (modifier == 0 || (stateMask & modifier) == modifier)
+				return -1;
+			stateMask = stateMask | modifier;
+		}
+		return stateMask;
+	}
+
+	/**
+	 * Maps the localized modifier name to a code in the same manner as
+	 * #findModifier.
+	 * 
+	 * @return the SWT modifier bit, or <code>0</code> if no match was found
+	 * @see findModifier
+	 */
+	public static int findLocalizedModifier(String token) {
+		if (token == null)
+			return 0;
+
+		if (token.equalsIgnoreCase(Action.findModifierString(SWT.CTRL)))
+			return SWT.CTRL;
+		if (token.equalsIgnoreCase(Action.findModifierString(SWT.SHIFT)))
+			return SWT.SHIFT;
+		if (token.equalsIgnoreCase(Action.findModifierString(SWT.ALT)))
+			return SWT.ALT;
+		if (token.equalsIgnoreCase(Action.findModifierString(SWT.COMMAND)))
+			return SWT.COMMAND;
+
+		return 0;
+	}
+
+	/**
+	 * Temporary method to help migrate from using StructuredTextColors to
+	 * using base ColorRegistry. Instead of using symbolic names in the color
+	 * registry, we are currently mapping the rgb.toString value to
+	 * corresponding color.
+	 * 
+	 * @param rgb
+	 * @return Color
+	 */
+	public static Color getColor(RGB rgb) {
+		if (rgb == null)
+			return null;
+
+		// get the color from the platform color registry
+		Color color = JFaceResources.getColorRegistry().get(rgb.toString());
+
+		// if the platform color registry does not have this color yet, add to
+		// the registry
+		if (color == null) {
+			JFaceResources.getColorRegistry().put(rgb.toString(), rgb);
+			color = JFaceResources.getColorRegistry().get(rgb.toString());
+		}
+		return color;
+	}
+
+	/**
+	 * Returns the modifier string for the given SWT modifier modifier bits.
+	 * 
+	 * @param stateMask
+	 *            the SWT modifier bits
+	 * @return the modifier string
+	 */
+	public static String getModifierString(int stateMask) {
+		String modifierString = ""; //$NON-NLS-1$
+		if ((stateMask & SWT.CTRL) == SWT.CTRL)
+			modifierString = appendModifierString(modifierString, SWT.CTRL);
+		if ((stateMask & SWT.ALT) == SWT.ALT)
+			modifierString = appendModifierString(modifierString, SWT.ALT);
+		if ((stateMask & SWT.SHIFT) == SWT.SHIFT)
+			modifierString = appendModifierString(modifierString, SWT.SHIFT);
+		if ((stateMask & SWT.COMMAND) == SWT.COMMAND)
+			modifierString = appendModifierString(modifierString, SWT.COMMAND);
+
+		return modifierString;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/PixelConverter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/PixelConverter.java
new file mode 100644
index 0000000..a12e28c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/PixelConverter.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.util;
+
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.widgets.Control;
+
+
+/**
+ * @deprecated - use {@link org.eclipse.jface.layout.PixelConverter}
+ */
+public class PixelConverter extends org.eclipse.jface.layout.PixelConverter {
+
+	public PixelConverter(Control control) {
+		super(control);
+	}
+
+	public PixelConverter(Font font) {
+		super(font);
+	}	
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/PlatformStatusLineUtil.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/PlatformStatusLineUtil.java
new file mode 100644
index 0000000..c71017e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/PlatformStatusLineUtil.java
@@ -0,0 +1,238 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2010 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.util;
+
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.custom.VerifyKeyListener;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+
+/**
+ * Utility to display (and/or clear) messages on the status line.
+ * 
+ * @author pavery
+ */
+public class PlatformStatusLineUtil {
+
+	private static class ClearMessage implements Runnable {
+		public void run() {
+			displayMessage(null);
+		}
+	}
+
+	private static class ClearStatusLine implements Runnable {
+		private IStatusLineManager fManager;
+		private boolean fIsError;
+
+		ClearStatusLine(IStatusLineManager statusLineManager, boolean isError) {
+			fManager = statusLineManager;
+			fIsError = isError;
+		}
+
+		public void run() {
+			if (fIsError) {
+				fManager.setErrorMessage(null);
+			}
+			else {
+				fManager.setMessage(null);
+			}
+		}
+	}
+
+	/**
+	 * Used to clear message on focus loss, change of selection, key type,
+	 * etc...
+	 */
+	private static class OneTimeListener extends FocusAdapter implements VerifyKeyListener, SelectionListener, MouseListener {
+		private Runnable fRunner = null;
+		private StyledText fStyledText;
+
+		OneTimeListener(StyledText target, Runnable r) {
+			fStyledText = target;
+			fRunner = r;
+			fStyledText.addVerifyKeyListener(this);
+			fStyledText.addFocusListener(this);
+			fStyledText.addSelectionListener(this);
+			fStyledText.addMouseListener(this);
+		}
+
+		public void focusLost(FocusEvent e) {
+			unhookAndRun();
+		}
+
+		public void mouseDoubleClick(MouseEvent e) {
+			unhookAndRun();
+		}
+
+		public void mouseDown(MouseEvent e) {
+			unhookAndRun();
+		}
+
+		public void mouseUp(MouseEvent e) {
+			//
+		}
+
+		private void unhookAndRun() {
+			fStyledText.removeVerifyKeyListener(this);
+			fStyledText.removeFocusListener(this);
+			fStyledText.removeSelectionListener(this);
+			fStyledText.removeMouseListener(this);
+			fStyledText.getDisplay().asyncExec(fRunner);
+		}
+
+		public void verifyKey(VerifyEvent event) {
+			unhookAndRun();
+		}
+
+		public void widgetDefaultSelected(SelectionEvent e) {
+			unhookAndRun();
+		}
+
+		public void widgetSelected(SelectionEvent e) {
+			unhookAndRun();
+		}
+	}
+
+	/**
+	 * Status line error message will be cleared w/ key type or selection change
+	 * 
+	 * @deprecated
+	 */
+	public static void addOneTimeClearListener() {
+		IEditorPart editor = getActiveEditor();
+		boolean added = false;
+		if (editor != null) {
+			Control control = (Control) editor.getAdapter(Control.class);
+			if (control instanceof StyledText) {
+				new OneTimeListener((StyledText) control, new ClearMessage());
+				added = true;
+			}
+		}
+		if (!added) {
+			// clear the error message immediately
+			displayMessage(null);
+		}
+	}
+
+	/**
+	 * Clears the status line immediately
+	 * @deprecated
+	 */
+	public static void clearStatusLine() {
+		displayMessage(null);
+	}
+
+	/**
+	 * Display a message on the status line (with a beep)
+	 * @deprecated
+	 * @param msg
+	 */
+	public static void displayErrorMessage(String msg) {
+		displayMessage(msg);
+		PlatformUI.getWorkbench().getDisplay().beep();
+	}
+
+	/**
+	 * Display a message on the status line (no beep)
+	 * @deprecated
+	 * @param msg
+	 */
+	public static void displayMessage(String msg) {
+		IEditorPart editor = getActiveEditor();
+		if (editor != null) {
+			editor.getEditorSite().getActionBars().getStatusLineManager().setErrorMessage(msg);
+		}
+
+	}
+
+	private static IEditorPart getActiveEditor() {
+		IEditorPart editor = null;
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (window == null) {
+			IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
+			if (windows.length > 0) {
+				window = windows[0];
+			}
+		}
+		if (window != null) {
+			IWorkbenchPage page = window.getActivePage();
+			if (page != null)
+				editor = page.getActiveEditor();
+		}
+		return editor;
+	}
+
+	private PlatformStatusLineUtil() {
+		// force use of singleton
+	}
+
+	/**
+	 * Display an error message on the status line
+	 * 
+	 * @param viewer
+	 * @param msg
+	 */
+	public static boolean displayTemporaryErrorMessage(ITextViewer viewer, String msg) {
+		return _displayTemporaryMessage(viewer, msg, true);
+	}
+
+	/**
+	 * Display a message on the status line
+	 * 
+	 * @param viewer
+	 * @param msg
+	 */
+	public static boolean displayTemporaryMessage(ITextViewer viewer, String msg) {
+		return _displayTemporaryMessage(viewer, msg, false);
+	}
+
+	static boolean _displayTemporaryMessage(ITextViewer viewer, String msg, boolean isError) {
+		boolean messageShown = false;
+		IEditorPart editor = getActiveEditor();
+		if (editor != null) {
+			ITextEditor textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
+			if (textEditor != null && textEditor instanceof StructuredTextEditor) {
+				if (((StructuredTextEditor) textEditor).getTextViewer() == viewer) {
+					IStatusLineManager statusLineManager = editor.getEditorSite().getActionBars().getStatusLineManager();
+					if (isError)
+						statusLineManager.setErrorMessage(msg);
+					else
+						statusLineManager.setMessage(msg);
+					new OneTimeListener(viewer.getTextWidget(), new ClearStatusLine(statusLineManager, isError));
+					messageShown = true;
+				}
+			}
+		}
+		
+		if (!messageShown) {
+			displayErrorMessage(msg);
+			addOneTimeClearListener();
+		}
+
+		return messageShown;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/RegistryReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/RegistryReader.java
new file mode 100644
index 0000000..6fc895b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/RegistryReader.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.util;
+
+
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IPluginRegistry;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+
+/**
+ * Template implementation of a registry reader that creates objects
+ * representing registry contents. Typically, an extension contains one
+ * element, but this reader handles multiple elements per extension.
+ * 
+ * To start reading the extensions from the registry for an extension point,
+ * call the method <code>readRegistry</code>.
+ * 
+ * To read children of an IConfigurationElement, call the method
+ * <code>readElementChildren</code> from your implementation of the method
+ * <code>readElement</code>, as it will not be done by default.
+ */
+public abstract class RegistryReader {
+
+
+	protected static final String TAG_DESCRIPTION = "description"; //$NON-NLS-1$
+
+	/**
+	 * The constructor.
+	 */
+	protected RegistryReader() {
+	}
+
+	/**
+	 * This method extracts description as a subelement of the given element.
+	 * 
+	 * @return description string if defined, or empty string if not.
+	 */
+	protected String getDescription(IConfigurationElement config) {
+		IConfigurationElement[] children = config.getChildren(TAG_DESCRIPTION);
+		if (children.length >= 1) {
+			return children[0].getValue();
+		}
+		return ""; //$NON-NLS-1$
+	}
+
+	/**
+	 * Logs the error in the workbench log using the provided text and the
+	 * information in the configuration element.
+	 */
+	protected void logError(IConfigurationElement element, String text) {
+		IExtension extension = element.getDeclaringExtension();
+		StringBuffer buf = new StringBuffer();
+		buf.append("Plugin " + extension.getNamespace() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-2$//$NON-NLS-1$
+		buf.append("\n" + text); //$NON-NLS-1$
+		Logger.log(Logger.ERROR, buf.toString());
+	}
+
+	/**
+	 * Logs a very common registry error when a required attribute is missing.
+	 */
+	protected void logMissingAttribute(IConfigurationElement element, String attributeName) {
+		logError(element, "Required attribute '" + attributeName + "' not defined"); //$NON-NLS-2$//$NON-NLS-1$
+	}
+
+	/**
+	 * Logs a registry error when the configuration element is unknown.
+	 */
+	protected void logUnknownElement(IConfigurationElement element) {
+		logError(element, "Unknown extension tag found: " + element.getName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Apply a reproducable order to the list of extensions provided, such
+	 * that the order will not change as extensions are added or removed.
+	 */
+	protected IExtension[] orderExtensions(IExtension[] extensions) {
+		// By default, the order is based on plugin id sorted
+		// in ascending order. The order for a plugin providing
+		// more than one extension for an extension point is
+		// dependent in the order listed in the XML file.
+		Sorter sorter = new Sorter() {
+			public boolean compare(Object extension1, Object extension2) {
+				String s1 = ((IExtension) extension1).getNamespace().toUpperCase();
+				String s2 = ((IExtension) extension2).getNamespace().toUpperCase();
+				//Return true if elementTwo is 'greater than' elementOne
+				return s2.compareTo(s1) > 0;
+			}
+		};
+
+		Object[] sorted = sorter.sort(extensions);
+		IExtension[] sortedExtension = new IExtension[sorted.length];
+		System.arraycopy(sorted, 0, sortedExtension, 0, sorted.length);
+		return sortedExtension;
+	}
+
+	/**
+	 * Implement this method to read element's attributes. If children should
+	 * also be read, then implementor is responsible for calling
+	 * <code>readElementChildren</code>. Implementor is also responsible
+	 * for logging missing attributes.
+	 * 
+	 * @return true if element was recognized, false if not.
+	 */
+	protected abstract boolean readElement(IConfigurationElement element);
+
+	/**
+	 * Read the element's children. This is called by the subclass'
+	 * readElement method when it wants to read the children of the element.
+	 */
+	protected void readElementChildren(IConfigurationElement element) {
+		readElements(element.getChildren());
+	}
+
+	/**
+	 * Read each element one at a time by calling the subclass implementation
+	 * of <code>readElement</code>.
+	 * 
+	 * Logs an error if the element was not recognized.
+	 */
+	protected void readElements(IConfigurationElement[] elements) {
+		for (int i = 0; i < elements.length; i++) {
+			if (!readElement(elements[i]))
+				logUnknownElement(elements[i]);
+		}
+	}
+
+	/**
+	 * Read one extension by looping through its configuration elements.
+	 */
+	protected void readExtension(IExtension extension) {
+		readElements(extension.getConfigurationElements());
+	}
+
+	/**
+	 * @deprecated use readRegistry(IExtensionRegistry registry, String pluginId, String extensionPoint)
+	 */
+	protected void readRegistry(IPluginRegistry registry, String pluginId, String extensionPoint) {
+		IExtensionPoint point = registry.getExtensionPoint(pluginId, extensionPoint);
+		if (point != null) {
+			IExtension[] extensions = point.getExtensions();
+			extensions = orderExtensions(extensions);
+			for (int i = 0; i < extensions.length; i++)
+				readExtension(extensions[i]);
+		}
+	}
+	
+	/**
+	 * Start the registry reading process using the supplied plugin ID and
+	 * extension point.
+	 */
+	protected void readRegistry(IExtensionRegistry registry, String pluginId, String extensionPoint) {
+		IExtensionPoint point = registry.getExtensionPoint(pluginId, extensionPoint);
+		if (point != null) {
+			IExtension[] extensions = point.getExtensions();
+			extensions = orderExtensions(extensions);
+			for (int i = 0; i < extensions.length; i++)
+				readExtension(extensions[i]);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/SWTUtil.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/SWTUtil.java
new file mode 100644
index 0000000..c58494e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/SWTUtil.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.util;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.layout.PixelConverter;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+
+
+/**
+ * <p>Utility class to simplify access to some SWT resources.</p>
+ * 
+ * @base org.eclipse.jdt.internal.ui.util.SWTUtil
+ */
+public class SWTUtil {
+
+	/**
+	 * Returns a width hint for a button control.
+	 * @param button the button
+	 * @return the width hint
+	 */
+	public static int getButtonWidthHint(Button button) {
+		button.setFont(JFaceResources.getDialogFont());
+		PixelConverter converter= new PixelConverter(button);
+		int widthHint= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+		return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
+	}
+
+	/**
+	 * Sets width and height hint for the button control.
+	 * <b>Note:</b> This is a NOP if the button's layout data is not
+	 * an instance of <code>GridData</code>.
+	 *
+	 * @param button	the button for which to set the dimension hint
+	 */
+	public static void setButtonDimensionHint(Button button) {
+		Assert.isNotNull(button);
+		Object gd= button.getLayoutData();
+		if (gd instanceof GridData) {
+			((GridData)gd).widthHint= getButtonWidthHint(button);
+			((GridData)gd).horizontalAlignment = GridData.FILL;
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/Sorter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/Sorter.java
new file mode 100644
index 0000000..3a895d3
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/Sorter.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.util;
+
+
+
+/**
+ * The SortOperation takes a collection of objects and returns a sorted
+ * collection of these objects. Concrete instances of this class provide the
+ * criteria for the sorting of the objects based on the type of the objects.
+ */
+public abstract class Sorter {
+
+	/**
+	 * Returns true if elementTwo is 'greater than' elementOne This is the
+	 * 'ordering' method of the sort operation. Each subclass overides this
+	 * method with the particular implementation of the 'greater than' concept
+	 * for the objects being sorted.
+	 */
+	public abstract boolean compare(Object elementOne, Object elementTwo);
+
+	/**
+	 * Sort the objects in sorted collection and return that collection.
+	 */
+	private Object[] quickSort(Object[] sortedCollection, int left, int right) {
+		int originalLeft = left;
+		int originalRight = right;
+		Object mid = sortedCollection[(left + right) / 2];
+
+		do {
+			while (compare(sortedCollection[left], mid))
+				left++;
+			while (compare(mid, sortedCollection[right]))
+				right--;
+			if (left <= right) {
+				Object tmp = sortedCollection[left];
+				sortedCollection[left] = sortedCollection[right];
+				sortedCollection[right] = tmp;
+				left++;
+				right--;
+			}
+		} while (left <= right);
+
+		if (originalLeft < right)
+			sortedCollection = quickSort(sortedCollection, originalLeft, right);
+		if (left < originalRight)
+			sortedCollection = quickSort(sortedCollection, left, originalRight);
+
+		return sortedCollection;
+	}
+
+	/**
+	 * Return a new sorted collection from this unsorted collection. Sort
+	 * using quick sort.
+	 */
+	public Object[] sort(Object[] unSortedCollection) {
+		int size = unSortedCollection.length;
+		Object[] sortedCollection = new Object[size];
+
+		//copy the array so can return a new sorted collection
+		System.arraycopy(unSortedCollection, 0, sortedCollection, 0, size);
+		if (size > 1)
+			quickSort(sortedCollection, 0, size - 1);
+
+		return sortedCollection;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/CaretEvent.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/CaretEvent.java
new file mode 100644
index 0000000..e907834
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/CaretEvent.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.view.events;
+
+/**
+ * @deprecated - use base selection notification
+ * 
+ * Simply holds data to be passed to CaretEventListeners
+ */
+public class CaretEvent extends java.util.EventObject {
+
+	/**
+	 * Comment for <code>serialVersionUID</code>
+	 */
+	private static final long serialVersionUID = 1L;
+	// initialize to impossible location
+	int fPosition = -1;
+
+	/**
+	 * doesnt't make sense to have a CaretEvent without the Caret postion, so
+	 * use other constructor
+	 */
+	protected CaretEvent(Object source) {
+		super(source);
+	}
+
+	/**
+	 * This is the preferred constructor.
+	 */
+	public CaretEvent(Object source, int position) {
+		super(source);
+		setPosition(position);
+	}
+
+	public int getPosition() {
+		return fPosition;
+	}
+
+	void setPosition(int newPosition) {
+		fPosition = newPosition;
+	}
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/ICaretListener.java
similarity index 73%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/ICaretListener.java
index 607270a..695e72b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/ICaretListener.java
@@ -10,11 +10,11 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.view.events;
 
-
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-public interface UpdateListener {
-
-	public void updateOccured(Object object, Object arg);
+/**
+ * @deprecated - use base selection notification
+ */
+public interface ICaretListener extends java.util.EventListener {
+	public void caretMoved(CaretEvent event);
 }
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/INodeSelectionListener.java
similarity index 73%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/INodeSelectionListener.java
index 607270a..94fd9a6 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/INodeSelectionListener.java
@@ -10,11 +10,13 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.view.events;
 
 
-package org.eclipse.wst.xml.ui.internal.dialogs;
+/**
+ * @deprecated - use base selection notification
+ */
 
-public interface UpdateListener {
-
-	public void updateOccured(Object object, Object arg);
+public interface INodeSelectionListener {
+	void nodeSelectionChanged(NodeSelectionChangedEvent event);
 }
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/ITextSelectionListener.java
similarity index 73%
copy from bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
copy to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/ITextSelectionListener.java
index 607270a..f241bfb 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/ITextSelectionListener.java
@@ -10,11 +10,11 @@
  *     Jens Lukowski/Innoopract - initial renaming/restructuring
  *     
  *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.view.events;
 
-
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-public interface UpdateListener {
-
-	public void updateOccured(Object object, Object arg);
+/**
+ * @deprecated - use base selection notification
+ */
+public interface ITextSelectionListener {
+	void textSelectionChanged(TextSelectionChangedEvent event);
 }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/NodeSelectionChangedEvent.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/NodeSelectionChangedEvent.java
new file mode 100644
index 0000000..579d753
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/NodeSelectionChangedEvent.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.view.events;
+
+import java.util.List;
+
+/**
+ * @deprecated - use base selection notification
+ */
+public class NodeSelectionChangedEvent extends java.util.EventObject {
+	/**
+	 * Comment for <code>serialVersionUID</code>
+	 */
+	private static final long serialVersionUID = 1L;
+
+	int fCaretPosition;
+
+	List fSelectedNodes;
+
+	public NodeSelectionChangedEvent(Object source, List selectedNodes, int caretPosition) {
+		super(source);
+		fSelectedNodes = selectedNodes;
+		fCaretPosition = caretPosition;
+	}
+
+	public int getCaretPosition() {
+		return fCaretPosition;
+	}
+
+	public List getSelectedNodes() {
+		return fSelectedNodes;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/TextSelectionChangedEvent.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/TextSelectionChangedEvent.java
new file mode 100644
index 0000000..d7807e5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/TextSelectionChangedEvent.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.internal.view.events;
+
+/**
+ * @deprecated - use base selection notification
+ */
+public class TextSelectionChangedEvent extends java.util.EventObject {
+	/**
+	 * Comment for <code>serialVersionUID</code>
+	 */
+	private static final long serialVersionUID = 1L;
+
+	int fTextSelectionEnd;
+
+	int fTextSelectionStart;
+
+	public TextSelectionChangedEvent(Object source, int textSelectionStart, int textSelectionEnd) {
+		super(source);
+		fTextSelectionStart = textSelectionStart;
+		fTextSelectionEnd = textSelectionEnd;
+	}
+
+	public int getTextSelectionEnd() {
+		return fTextSelectionEnd;
+	}
+
+	public int getTextSelectionStart() {
+		return fTextSelectionStart;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/AbstractCompletionProposalCategoriesConfiguration.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/AbstractCompletionProposalCategoriesConfiguration.java
new file mode 100644
index 0000000..b6c171f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/AbstractCompletionProposalCategoriesConfiguration.java
@@ -0,0 +1,392 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.preferences;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalCategory;
+
+import com.ibm.icu.util.StringTokenizer;
+
+/**
+ * <p>Implements a completion proposal categories configuration
+ * reader and writer using an {@link IPreferenceStore}</p>
+ * 
+ * <p>This class is meant to be subclasses by implementers of the
+ * <code>org.eclipse.wst.sse.ui.completionProposalCategoriesConfiguration</code>
+ * extension point as a convince rather then implementing
+ * {@link ICompletionProposalCategoriesConfigurationReader} and
+ * {@link ICompletionProposalCategoriesConfigurationWriter} from scratch.</p>
+ */
+public abstract class AbstractCompletionProposalCategoriesConfiguration
+		implements ICompletionProposalCategoriesConfigurationReader,
+		ICompletionProposalCategoriesConfigurationWriter {
+
+	/** Separator used between preferences stored in the same key */
+	private static final String PREFERENCE_CATEGORY_SEPERATOR = "\0"; //$NON-NLS-1$
+	
+	/**
+	 * <p>{@link CompletionProposalCategory} IDs sorted by the order they should
+	 * be listed on the default page if they are being displayed there</p>
+	 * 
+	 * <code>{@link List}<{@link String}></code>
+	 * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
+	 */
+	private List fDefaultPageSortOrder;
+	
+	/**
+	 * <p>{@link CompletionProposalCategory} IDs sorted by the order they should
+	 * be cycled through</p>
+	 * 
+	 * <code>{@link List}<{@link String}></code>
+	 * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
+	 */
+	private List fOwnPageSortOrder;
+	
+	/**
+	 * <p>{@link CompletionProposalCategory} IDs that should not be displayed on
+	 * their own page</p>
+	 * 
+	 * <code>{@link Set}<{@link String}></code>
+	 * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
+	 */
+	private Set fShouldNotDisplayOnOwnPage;
+	
+	/**
+	 * <p>{@link CompletionProposalCategory} IDs that should not be displayed on
+	 * on the default page</p>
+	 * 
+	 * <code>{@link Set}<{@link String}></code>
+	 * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
+	 */
+	private Set fShouldNotDisplayOnDefaultPage;
+	
+	/**
+	 * <p>Create a new configuration by loading from the associated {@link IPreferenceStore}</p>
+	 */
+	public AbstractCompletionProposalCategoriesConfiguration() {
+		this.fOwnPageSortOrder = new ArrayList();
+		this.fDefaultPageSortOrder = new ArrayList();
+		this.fShouldNotDisplayOnOwnPage = new HashSet();
+		this.fShouldNotDisplayOnDefaultPage = new HashSet();
+		
+		this.loadUserConfiguration();
+	}
+	
+	/**
+	 * @return {@link IPreferenceStore} to read and write the configuration to and from
+	 */
+	protected abstract IPreferenceStore getPreferenceStore();
+	
+	/**
+	 * @return Preference key to use in the {@link IPreferenceStore} for the category sort order
+	 * when cycling through the pages
+	 */
+	protected abstract String getPageSortOrderPrefKey();
+	
+	/**
+	 * @return Preference key to use in the {@link IPreferenceStore} for the category sort order
+	 * on the default page
+	 */
+	protected abstract String getDefaultPageSortOrderPrefKey();
+	
+	/**
+	 * @return Preference key to use in the {@link IPreferenceStore} for which
+	 * categories not to display on their own page
+	 */
+	protected abstract String getShouldNotDisplayOnOwnPagePrefKey();
+	
+	/**
+	 * @return Preference key to use in the {@link IPreferenceStore} for which
+	 * categories not to display on the default page
+	 */
+	protected abstract String getShouldNotDisplayOnDefaultPagePrefKey();
+
+	/**
+	 * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationReader#getPageSortOrder(java.lang.String)
+	 */
+	public int getPageSortOrder(String categoryID) {
+		int sortOrder = this.fOwnPageSortOrder.indexOf(categoryID);
+		if(sortOrder == -1) {
+			sortOrder = DEFAULT_SORT_ORDER;
+		}
+		
+		return sortOrder;
+	}
+	
+	/**
+	 * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationReader#getDefaultPageSortOrder(java.lang.String)
+	 */
+	public int getDefaultPageSortOrder(String categoryID) {
+		int sortOrder = this.fDefaultPageSortOrder.indexOf(categoryID);
+		if(sortOrder == -1) {
+			sortOrder = DEFAULT_SORT_ORDER;
+		}
+		
+		return sortOrder;
+	}
+
+	/**
+	 * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationReader#shouldDisplayOnDefaultPage(java.lang.String)
+	 */
+	public boolean shouldDisplayOnDefaultPage(String categoryID) {
+		return !fShouldNotDisplayOnDefaultPage.contains(categoryID);
+	}
+
+	/**
+	 * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationReader#shouldDisplayOnOwnPage(java.lang.String)
+	 */
+	public boolean shouldDisplayOnOwnPage(String categoryID) {
+		return !this.fShouldNotDisplayOnOwnPage.contains(categoryID);
+	}
+
+	/**
+	 * <p> Loads defaults from the associated {@link IPreferenceStore}</p>
+	 * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#loadDefaults()
+	 */
+	public void loadDefaults() {
+		this.loadDefaultPagePreference(true);
+		this.loadPageSortOrder(true);
+		this.loadDefaultPageSortOrder(true);
+		this.loadShouldNotDisplayOnOwnPage(true);
+	}
+
+	/**
+	 * <p>Saves to the associated {@link IPreferenceStore}</p>
+	 * 
+	 * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#saveConfiguration()
+	 */
+	public boolean saveConfiguration() {
+		this.saveShouldDisplayOnDefaultPageConfiguration();
+		this.saveShouldDisplayOnOwnPageConfiguration();
+		this.saveDefaultPageSortOrderConfiguration();
+		this.savePageSortOrderConfiguration();
+		
+		return true;
+	}
+
+	/**
+	 * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#setShouldDisplayOnDefaultPage(java.lang.String, boolean)
+	 */
+	public void setShouldDisplayOnDefaultPage(String categoryID,
+			boolean shouldDisplay) {
+		
+		if(shouldDisplay) {
+			this.fShouldNotDisplayOnDefaultPage.remove(categoryID);
+		} else {
+			this.fShouldNotDisplayOnDefaultPage.add(categoryID);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#setShouldDisplayOnOwnPage(java.lang.String, boolean)
+	 */
+	public void setShouldDisplayOnOwnPage(String categoryID, boolean shouldDisplay) {
+		
+		if(shouldDisplay) {
+			this.fShouldNotDisplayOnOwnPage.remove(categoryID);
+		} else {
+			this.fShouldNotDisplayOnOwnPage.add(categoryID);
+		}
+	}
+	
+	/**
+	 * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#setPageOrder(java.util.List)
+	 */
+	public void setPageOrder(List order) {
+		this.fOwnPageSortOrder = order;
+	}
+	
+	/**
+	 * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#setDefaultPageOrder(java.util.List)
+	 */
+	public void setDefaultPageOrder(List order) {
+		this.fDefaultPageSortOrder = order;
+	}
+
+	/**
+	 * <p>Loads the user configuration from the associated {@link IPreferenceStore}</p>
+	 */
+	private void loadUserConfiguration() {
+		this.loadDefaultPagePreference(false);
+		this.loadPageSortOrder(false);
+		this.loadDefaultPageSortOrder(false);
+		this.loadShouldNotDisplayOnOwnPage(false);
+	}
+	
+	/**
+	 * <p>Loads the user preferences for which categories to
+	 * display on the default content assist page</p>
+	 * 
+	 * @param useDefaults if <code>true</code> then use the {@link IPreferenceStore} defaults,
+	 * otherwise use the user specified preferences
+	 */
+	private void loadDefaultPagePreference(boolean useDefaults) {
+		//clear the current display on default page configuration
+		this.fShouldNotDisplayOnDefaultPage.clear();
+		
+		//parse either the default or user configuration preference
+		String displayOnDefaultPage;
+		if(useDefaults) {
+			displayOnDefaultPage = getPreferenceStore().getDefaultString(getShouldNotDisplayOnDefaultPagePrefKey());
+		} else {
+			displayOnDefaultPage = getPreferenceStore().getString(getShouldNotDisplayOnDefaultPagePrefKey());
+		}
+		StringTokenizer defaultPageTokenizer = new StringTokenizer(displayOnDefaultPage, PREFERENCE_CATEGORY_SEPERATOR);
+		while (defaultPageTokenizer.hasMoreTokens()) {
+			fShouldNotDisplayOnDefaultPage.add(defaultPageTokenizer.nextToken());
+		}
+	}
+	
+	/**
+	 * <p>Loads the user preferences for the sort order of the content assist pages</p>
+	 * 
+	 * @param useDefaults if <code>true</code> then use the {@link IPreferenceStore} defaults,
+	 * otherwise use the user specified preferences
+	 */
+	private void loadPageSortOrder(boolean useDefaults){
+		//clear the current sort order
+		this.fOwnPageSortOrder.clear();
+		
+		//parse either the default or user configuration preference
+		String sortOrder;
+		if(useDefaults) {
+			sortOrder = getPreferenceStore().getDefaultString(getPageSortOrderPrefKey());
+		} else {
+			sortOrder = getPreferenceStore().getString(getPageSortOrderPrefKey());
+		}
+		StringTokenizer tokenizer = new StringTokenizer(sortOrder, PREFERENCE_CATEGORY_SEPERATOR);
+		while (tokenizer.hasMoreTokens()) {
+			String categoryID = tokenizer.nextToken();
+			this.fOwnPageSortOrder.add(categoryID);
+		}
+	}
+	
+	/**
+	 * <p>Loads the user preferences for the sort order of the content assist pages</p>
+	 * 
+	 * @param useDefaults if <code>true</code> then use the {@link IPreferenceStore} defaults,
+	 * otherwise use the user specified preferences
+	 */
+	private void loadDefaultPageSortOrder(boolean useDefaults){
+		//clear the current sort order
+		this.fDefaultPageSortOrder.clear();
+		
+		//parse either the default or user configuration preference
+		String sortOrder;
+		if(useDefaults) {
+			sortOrder = getPreferenceStore().getDefaultString(getDefaultPageSortOrderPrefKey());
+		} else {
+			sortOrder = getPreferenceStore().getString(getDefaultPageSortOrderPrefKey());
+		}
+		StringTokenizer tokenizer = new StringTokenizer(sortOrder, PREFERENCE_CATEGORY_SEPERATOR);
+		while (tokenizer.hasMoreTokens()) {
+			String categoryID = tokenizer.nextToken();
+			this.fDefaultPageSortOrder.add(categoryID);
+		}
+	}
+	
+	/**
+	 * <p>Loads the user preferences for which categories should not be displayed on their own
+	 * content assist page</p>
+	 * 
+	 * @param useDefaults if <code>true</code> then use the {@link IPreferenceStore} defaults,
+	 * otherwise use the user specified preferences
+	 */
+	private void loadShouldNotDisplayOnOwnPage(boolean useDefaults){
+		//clear the current sort order
+		this.fShouldNotDisplayOnOwnPage.clear();
+		
+		//parse either the default or user configuration preference
+		String preference;
+		if(useDefaults) {
+			preference = getPreferenceStore().getDefaultString(getShouldNotDisplayOnOwnPagePrefKey());
+		} else {
+			preference = getPreferenceStore().getString(getShouldNotDisplayOnOwnPagePrefKey());
+		}
+		StringTokenizer tokenizer = new StringTokenizer(preference, PREFERENCE_CATEGORY_SEPERATOR);
+		while (tokenizer.hasMoreTokens()) {
+			String categoryID = tokenizer.nextToken();
+			this.fShouldNotDisplayOnOwnPage.add(categoryID);
+		}
+	}
+	
+	/**
+	 * <p>Saves the user preferences for which categories to
+	 * display on the default content assist page</p>
+	 */
+	private void saveShouldDisplayOnDefaultPageConfiguration() {
+		//create the preference string
+		StringBuffer defaultPageBuff = new StringBuffer();
+		Iterator defaultPageIter = this.fShouldNotDisplayOnDefaultPage.iterator();
+		while(defaultPageIter.hasNext()) {
+			String categoryID = (String)defaultPageIter.next();
+			defaultPageBuff.append(categoryID + PREFERENCE_CATEGORY_SEPERATOR);
+		}
+		
+		//save the preference
+		this.getPreferenceStore().setValue(this.getShouldNotDisplayOnDefaultPagePrefKey(), defaultPageBuff.toString());
+	}
+	
+	/**
+	 * <p>Saves the user preferences for the sort order of the content assist pages</p>
+	 */
+	private void savePageSortOrderConfiguration() {
+		//create the preference string
+		StringBuffer orderBuff = new StringBuffer();
+		for(int i = 0; i < this.fOwnPageSortOrder.size(); ++i) {
+			if(this.fOwnPageSortOrder.get(i) != null) {
+				orderBuff.append(this.fOwnPageSortOrder.get(i) + PREFERENCE_CATEGORY_SEPERATOR);
+			}
+		}
+		
+		//save the preference
+		this.getPreferenceStore().setValue(this.getPageSortOrderPrefKey(), orderBuff.toString());
+	}
+	
+	/**
+	 * <p>Saves the user preferences for the sort order of the categories on the default page</p>
+	 */
+	private void saveDefaultPageSortOrderConfiguration() {
+		//create the preference string
+		StringBuffer orderBuff = new StringBuffer();
+		for(int i = 0; i < this.fDefaultPageSortOrder.size(); ++i) {
+			if(this.fDefaultPageSortOrder.get(i) != null) {
+				orderBuff.append(this.fDefaultPageSortOrder.get(i) + PREFERENCE_CATEGORY_SEPERATOR);
+			}
+		}
+		
+		//save the preference
+		this.getPreferenceStore().setValue(this.getDefaultPageSortOrderPrefKey(), orderBuff.toString());
+	}
+	
+	/**
+	 * <p>Saves the user preferences for which categories should not be displayed on their own
+	 * content assist page</p>
+	 */
+	private void saveShouldDisplayOnOwnPageConfiguration() {
+		//create the preference string
+		StringBuffer buff = new StringBuffer();
+		Iterator iter = this.fShouldNotDisplayOnOwnPage.iterator();
+		while(iter.hasNext()) {
+			String categoryID = (String)iter.next();
+			buff.append(categoryID + PREFERENCE_CATEGORY_SEPERATOR);
+		}
+		
+		//save the preference
+		this.getPreferenceStore().setValue(this.getShouldNotDisplayOnOwnPagePrefKey(), buff.toString());
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/CodeAssistCyclingConfigurationBlock.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/CodeAssistCyclingConfigurationBlock.java
new file mode 100644
index 0000000..e1cfead
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/CodeAssistCyclingConfigurationBlock.java
@@ -0,0 +1,891 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.preferences;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.CommandManager;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.commands.contexts.ContextManager;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.bindings.BindingManager;
+import org.eclipse.jface.bindings.Scheme;
+import org.eclipse.jface.bindings.TriggerSequence;
+import org.eclipse.jface.layout.PixelConverter;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.keys.IBindingService;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalCategory;
+import org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalComputerRegistry;
+import org.eclipse.wst.sse.ui.internal.util.SWTUtil;
+
+
+/**
+ * <p>A helpful preference configuration block implementation for allowing a user to
+ * set their preferences for which content assist categories to show on the default
+ * content assist page as well as on their own separate page and page ordering for
+ * a specific content type</p>
+ * 
+ * @base org.eclipse.jdt.internal.ui.preferences.CodeAssistAdvancedConfigurationBlock
+ */
+public final class CodeAssistCyclingConfigurationBlock  {
+
+	/**
+	 * <p>Used to compare categories based on their assigned page rank</p>
+	 */
+	private final Comparator fCategoryPageComparator = new Comparator() {
+		private int getRank(Object o) {
+			return ((ModelElement) o).getOwnPageRank();
+		}
+
+		public int compare(Object o1, Object o2) {
+			int result = getRank(o1) - getRank(o2);
+			if(result == 0) {
+				result = ((ModelElement) o1).getId().compareTo(((ModelElement) o2).getId());
+			}
+			return result;
+		}
+	};
+	
+	/**
+	 * <p>Used to compare categories based on their assigned default page rank</p>
+	 */
+	private final Comparator fCategoryDefaultPageComparator = new Comparator() {
+		private int getRank(Object o) {
+			return ((ModelElement) o).getDefaultPageRank();
+		}
+
+		public int compare(Object o1, Object o2) {
+			int result = getRank(o1) - getRank(o2);
+			if(result == 0) {
+				result = ((ModelElement) o1).getId().compareTo(((ModelElement) o2).getId());
+			}
+			return result;
+		}
+	};
+
+	/** the preference model for this block */
+	private final PreferenceModel fModel;
+	
+	/**
+	 * <code>{@link Map}<{@link ImageDescriptor}, {@link Image}></code>
+	 */
+	private final Map fImages= new HashMap();
+
+	/** table viewer to configure which categories are displayed on the default page */
+	private CheckboxTableViewer fDefaultPageViewer;
+	
+	/**
+	 * table viewer to configure which categories are displayed
+	 * on their own page, as well as their ordering
+	 */
+	private CheckboxTableViewer fOwnPageViewer;
+	
+	/** categories pages sort order up button */
+	private Button fPageOrderUpButton;
+	
+	/** categories pages sort order down button */
+	private Button fPageOrderDownButton;
+	
+	/** categories default page sort order up button */
+	private Button fDefaultPageOrderUpButton;
+	
+	/** categories default page  sort order down button */
+	private Button fDefaultPageOrderDownButton;
+	
+	/** The content type ID this configuration block is for */
+	private String fContentTypeID;
+	
+	/** The writable categories configuration */
+	private ICompletionProposalCategoriesConfigurationWriter fConfigurationWriter;
+
+	/**
+	 * <p>Creates a new content assist preference block for the given content type
+	 * using the given configuration writer</p>
+	 * 
+	 * @param contentTypeID content type this content assist preference block is for
+	 * @param configurationWriter {@link ICompletionProposalCategoriesConfigurationWriter} used
+	 * to read and write the user preferences 
+	 */
+	public CodeAssistCyclingConfigurationBlock(String contentTypeID, ICompletionProposalCategoriesConfigurationWriter configurationWriter) {
+		this.fContentTypeID = contentTypeID;
+		this.fConfigurationWriter = configurationWriter;
+		
+		List categories = CompletionProposalComputerRegistry.getDefault().getProposalCategories(this.fContentTypeID);
+		this.fModel = new PreferenceModel(categories);
+	}
+	
+	/**
+	 * <p>Saves the user configuration</p>
+	 * @return <code>true</code> if store was successful, <code>false</code> otherwise
+	 */
+	public boolean storeValues() {
+		return this.fConfigurationWriter.saveConfiguration();
+	}
+	
+	/**
+	 * <p>Loads the preference defaults</p>
+	 */
+	public void performDefaults() {
+		this.fConfigurationWriter.loadDefaults();
+		this.initializeValues();
+		this.fModel.performDefaults();
+	}
+	
+	/**
+	 * <p>Disposes of this preference block</p>
+	 */
+	public void dispose() {
+		for (Iterator it= fImages.values().iterator(); it.hasNext();) {
+			Image image= (Image) it.next();
+			image.dispose();
+		}
+	}
+
+	/**
+	 * <p>Creates the contents of this configuration block using a {@link Group} if
+	 * the given <code>groupTitle</code> is not <code>null</code> else creates it
+	 * as a composite and in either case adds itself to the given parent</p>
+	 * 
+	 * @param parent {@link Composite} parent to add this configuration block to
+	 * @param groupTitle Title to use for the configuration block group, if
+	 * <code>null</code> then a {@link Composite} will be used instead of a
+	 * {@link Group}
+	 * 
+	 * @return the created configuration block that has already been added to the parent
+	 */
+	public Control createContents(Composite parent, String groupTitle) {
+		Composite container;
+		if(groupTitle != null) {
+			container = new Group(parent, SWT.NULL);
+			((Group)container).setText(groupTitle);
+		} else {
+			container = new Composite(parent, SWT.NULL);
+		}
+		int columns= 2;
+		GridLayout layout= new GridLayout(columns, false);
+		container.setLayout(layout);
+		
+		GridData data = new GridData(GridData.FILL);
+		data.horizontalIndent = 0;
+		data.verticalAlignment = GridData.FILL;
+		data.horizontalAlignment = GridData.FILL;
+		data.grabExcessHorizontalSpace = true;
+		container.setLayoutData(data);
+
+		createDefaultPageLabel(container, columns);
+		createDefaultPageSection(container);
+
+		createFiller(container, columns);
+
+		createOwnPageLabel(container, columns);
+        createOwnPageSection(container);
+
+        createFiller(container, columns);
+
+		if (fModel.pageElements.size() > 0) {
+			fDefaultPageViewer.getTable().select(0);
+			fOwnPageViewer.getTable().select(0);
+			handleOwnPageTableSelection();
+			handleDefaultPageTableSelection();
+		}
+		
+		return container;
+	}
+	
+	/**
+	 * <p>Initialize the values of the configuration block</p>
+	 */
+	public void initializeValues() {
+		updateCheckedState();
+		fDefaultPageViewer.refresh();
+		fOwnPageViewer.refresh();
+		handleOwnPageTableSelection();
+		handleDefaultPageTableSelection();
+	}
+	
+	private void createDefaultPageSection(Composite composite) {
+		createDefaultPageViewer(composite);
+		createDefaultPageButtonList(composite);
+	}
+
+	private void createDefaultPageLabel(Composite composite, int h_span) {
+	    final ICommandService commandSvc= (ICommandService) PlatformUI.getWorkbench().getAdapter(ICommandService.class);
+		final Command command= commandSvc.getCommand(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+		ParameterizedCommand pCmd= new ParameterizedCommand(command, null);
+		String key= getKeyboardShortcut(pCmd);
+		if (key == null) {
+			key= SSEUIMessages.CodeAssistAdvancedConfigurationBlock_no_shortcut;
+		}
+
+		PixelConverter pixelConverter= new PixelConverter(composite);
+		int width= pixelConverter.convertWidthInCharsToPixels(40);
+
+		Label label= new Label(composite, SWT.NONE | SWT.WRAP);
+		label.setText(NLS.bind(SSEUIMessages.CodeAssistAdvancedConfigurationBlock_page_description, new Object[] { key }));
+		GridData gd= new GridData(GridData.FILL, GridData.FILL, true, false, h_span, 1);
+		gd.widthHint= width;
+		label.setLayoutData(gd);
+
+		createFiller(composite, h_span);
+
+		label= new Label(composite, SWT.NONE | SWT.WRAP);
+		label.setText(SSEUIMessages.CodeAssistAdvancedConfigurationBlock_default_table_description);
+		gd= new GridData(GridData.FILL, GridData.FILL, true, false, h_span, 1);
+		gd.widthHint= width;
+		label.setLayoutData(gd);
+    }
+
+	private void createDefaultPageViewer(Composite composite) {
+		fDefaultPageViewer= CheckboxTableViewer.newCheckList(composite, SWT.SINGLE | SWT.BORDER);
+		Table table= fDefaultPageViewer.getTable();
+		table.setHeaderVisible(true);
+		table.setLinesVisible(false);
+		table.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false, 1, 1));
+
+		TableColumn nameColumn= new TableColumn(table, SWT.NONE);
+		nameColumn.setText(SSEUIMessages.CodeAssistAdvancedConfigurationBlock_default_table_category_column_title);
+		nameColumn.setResizable(false);
+
+		fDefaultPageViewer.addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				boolean checked= event.getChecked();
+				ModelElement element= (ModelElement) event.getElement();
+				element.setShouldDisplayOnDefaultPage(checked);
+			}
+		});
+
+		fDefaultPageViewer.setContentProvider(new ArrayContentProvider());
+
+		DefaultPageTableLabelProvider labelProvider= new DefaultPageTableLabelProvider();
+		fDefaultPageViewer.setLabelProvider(labelProvider);
+		fDefaultPageViewer.setInput(fModel.defaultPageElements);
+		fDefaultPageViewer.setComparator(new ModelViewerComparator(fCategoryDefaultPageComparator));
+
+		final int ICON_AND_CHECKBOX_WITH= 50;
+		final int HEADER_MARGIN= 20;
+		int minNameWidth= computeWidth(table, nameColumn.getText()) + HEADER_MARGIN;
+		for (int i= 0; i < fModel.defaultPageElements.size(); i++) {
+			minNameWidth= Math.max(minNameWidth, computeWidth(table, labelProvider.getColumnText(fModel.defaultPageElements.get(i), 0)) + ICON_AND_CHECKBOX_WITH);
+		}
+
+		nameColumn.setWidth(minNameWidth);
+		
+		table.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				handleDefaultPageTableSelection();
+			}
+		});
+	}
+	
+	/**
+	 * <p>Create the Up and Down buttons for the default page viewer</p>
+	 * @param parent {@link Composite} to add the button list to 
+	 */
+	private void createDefaultPageButtonList(Composite parent) {
+		Composite composite= new Composite(parent, SWT.NONE);
+		composite.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
+
+		GridLayout layout= new GridLayout();
+		layout.marginWidth= 0;
+		layout.marginHeight= 0;
+		composite.setLayout(layout);
+
+		fDefaultPageOrderUpButton= new Button(composite, SWT.PUSH | SWT.CENTER);
+		fDefaultPageOrderUpButton.setText(SSEUIMessages.CodeAssistAdvancedConfigurationBlock_Up);
+		fDefaultPageOrderUpButton.addSelectionListener(new SelectionAdapter() {
+        	public void widgetSelected(SelectionEvent e) {
+        		int index = fDefaultPageViewer.getTable().getSelectionIndex();
+        		if (index != -1) {
+        			fModel.moveDefaultPageCategoryUp(index);
+        			fDefaultPageViewer.refresh();
+        			handleDefaultPageTableSelection();
+        		}
+        	}
+        });
+		fDefaultPageOrderUpButton.setLayoutData(new GridData());
+        
+        SWTUtil.setButtonDimensionHint(fDefaultPageOrderUpButton);
+
+        fDefaultPageOrderDownButton= new Button(composite, SWT.PUSH | SWT.CENTER);
+        fDefaultPageOrderDownButton.setText(SSEUIMessages.CodeAssistAdvancedConfigurationBlock_Down);
+        fDefaultPageOrderDownButton.addSelectionListener(new SelectionAdapter() {
+        	public void widgetSelected(SelectionEvent e) {
+        		int index= fDefaultPageViewer.getTable().getSelectionIndex();
+        		if (index != -1) {
+        			fModel.moveDefaultPageCategoryDown(index);
+        			fDefaultPageViewer.refresh();
+        			handleDefaultPageTableSelection();
+        		}
+        	}
+        });
+        fDefaultPageOrderDownButton.setLayoutData(new GridData());
+        SWTUtil.setButtonDimensionHint(fDefaultPageOrderDownButton);
+	}
+
+	private void createFiller(Composite composite, int h_span) {
+	    Label filler= new Label(composite, SWT.NONE);
+		filler.setVisible(false);
+		filler.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, h_span, 1));
+    }
+
+	private void createOwnPageLabel(Composite composite, int h_span) {
+		PixelConverter pixelConverter= new PixelConverter(composite);
+		int width= pixelConverter.convertWidthInCharsToPixels(40);
+
+		Label label= new Label(composite, SWT.NONE | SWT.WRAP);
+		label.setText(SSEUIMessages.CodeAssistAdvancedConfigurationBlock_separate_table_description);
+		GridData gd= new GridData(GridData.FILL, GridData.FILL, false, false, h_span, 1);
+		gd.widthHint= width;
+		label.setLayoutData(gd);
+	}
+
+	private void createOwnPageSection(Composite composite) {
+		createOwnPageViewer(composite);
+		createOwnPageButtonList(composite);
+	}
+
+	private void createOwnPageViewer(Composite composite) {
+		fOwnPageViewer= CheckboxTableViewer.newCheckList(composite, SWT.SINGLE | SWT.BORDER);
+		Table table= fOwnPageViewer.getTable();
+		table.setHeaderVisible(true);
+		table.setLinesVisible(false);
+		table.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false, 1, 1));
+
+		TableColumn nameColumn= new TableColumn(table, SWT.NONE);
+		nameColumn.setText(SSEUIMessages.CodeAssistAdvancedConfigurationBlock_separate_table_category_column_title);
+		nameColumn.setResizable(false);
+
+		fOwnPageViewer.setContentProvider(new ArrayContentProvider());
+
+		ITableLabelProvider labelProvider= new OwnPageTableLabelProvider();
+		fOwnPageViewer.setLabelProvider(labelProvider);
+		fOwnPageViewer.setInput(fModel.pageElements);
+		fOwnPageViewer.setComparator(new ModelViewerComparator(fCategoryPageComparator));
+
+		final int ICON_AND_CHECKBOX_WITH= 50;
+		final int HEADER_MARGIN= 20;
+		int minNameWidth= computeWidth(table, nameColumn.getText()) + HEADER_MARGIN;
+		for (int i= 0; i < fModel.pageElements.size(); i++) {
+			minNameWidth= Math.max(minNameWidth, computeWidth(table, labelProvider.getColumnText(fModel.pageElements.get(i), 0)) + ICON_AND_CHECKBOX_WITH);
+		}
+
+		nameColumn.setWidth(minNameWidth);
+
+		fOwnPageViewer.addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				boolean checked= event.getChecked();
+				ModelElement element= (ModelElement) event.getElement();
+				element.setShouldDisplayOnOwnPage(checked);
+			}
+		});
+
+		table.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				handleOwnPageTableSelection();
+			}
+		});
+
+	}
+
+	/**
+	 * <p>Create the Up and Down buttons for the own page viewer</p>
+	 * @param parent {@link Composite} to add the button list to 
+	 */
+	private void createOwnPageButtonList(Composite parent) {
+		Composite composite= new Composite(parent, SWT.NONE);
+		composite.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
+
+		GridLayout layout= new GridLayout();
+		layout.marginWidth= 0;
+		layout.marginHeight= 0;
+		composite.setLayout(layout);
+
+		fPageOrderUpButton= new Button(composite, SWT.PUSH | SWT.CENTER);
+        fPageOrderUpButton.setText(SSEUIMessages.CodeAssistAdvancedConfigurationBlock_PagesUp);
+        fPageOrderUpButton.addSelectionListener(new SelectionAdapter() {
+        	public void widgetSelected(SelectionEvent e) {
+        		int index = fOwnPageViewer.getTable().getSelectionIndex();
+        		if (index != -1) {
+        			fModel.movePageUp(index);
+        			fOwnPageViewer.refresh();
+        			handleOwnPageTableSelection();
+        		}
+        	}
+        });
+        fPageOrderUpButton.setLayoutData(new GridData());
+        
+        SWTUtil.setButtonDimensionHint(fPageOrderUpButton);
+
+        fPageOrderDownButton= new Button(composite, SWT.PUSH | SWT.CENTER);
+        fPageOrderDownButton.setText(SSEUIMessages.CodeAssistAdvancedConfigurationBlock_PagesDown);
+        fPageOrderDownButton.addSelectionListener(new SelectionAdapter() {
+        	public void widgetSelected(SelectionEvent e) {
+        		int index= fOwnPageViewer.getTable().getSelectionIndex();
+        		if (index != -1) {
+        			fModel.movePageDown(index);
+        			fOwnPageViewer.refresh();
+        			handleOwnPageTableSelection();
+        		}
+        	}
+        });
+        fPageOrderDownButton.setLayoutData(new GridData());
+        SWTUtil.setButtonDimensionHint(fPageOrderDownButton);
+	}
+
+	/**
+	 * <p>Update the enablement of the Up and Down buttons for the own page table viewer</p>
+	 */
+	private void handleOwnPageTableSelection() {
+		ModelElement item= (ModelElement) ((IStructuredSelection) fOwnPageViewer.getSelection()).getFirstElement();
+		if (item != null) {
+			int index= fOwnPageViewer.getTable().getSelectionIndex();
+			fPageOrderUpButton.setEnabled(index > 0);
+			fPageOrderDownButton.setEnabled(index < fModel.pageElements.size() - 1);
+		} else {
+			fPageOrderUpButton.setEnabled(false);
+			fPageOrderDownButton.setEnabled(false);
+		}
+	}
+	
+	/**
+	 * <p>Update the enablement of the Up and Down buttons for the default page table viewer</p>
+	 */
+	private void handleDefaultPageTableSelection() {
+		ModelElement item= (ModelElement) ((IStructuredSelection) fDefaultPageViewer.getSelection()).getFirstElement();
+		if (item != null) {
+			int index = fDefaultPageViewer.getTable().getSelectionIndex();
+			fDefaultPageOrderUpButton.setEnabled(index > 0);
+			fDefaultPageOrderDownButton.setEnabled(index < fModel.defaultPageElements.size() - 1);
+		} else {
+			fDefaultPageOrderUpButton.setEnabled(false);
+			fDefaultPageOrderDownButton.setEnabled(false);
+		}
+	}
+
+	private void updateCheckedState() {
+		/* does not matter which set of elements we use here
+		 * because order does not matter in this case
+		 */
+		final int size= fModel.pageElements.size();
+		List defaultChecked= new ArrayList(size);
+		List separateChecked= new ArrayList(size);
+
+		for (Iterator it= fModel.pageElements.iterator(); it.hasNext();) {
+			ModelElement element= (ModelElement) it.next();
+			if (element.shouldDisplayOnDefaultPage())
+				defaultChecked.add(element);
+			if (element.shouldDisplayOnOwnPage())
+				separateChecked.add(element);
+		}
+
+		fDefaultPageViewer.setCheckedElements(defaultChecked.toArray(new Object[defaultChecked.size()]));
+		fOwnPageViewer.setCheckedElements(separateChecked.toArray(new Object[separateChecked.size()]));
+	}
+
+	private int computeWidth(Control control, String name) {
+		if (name == null)
+			return 0;
+		GC gc= new GC(control);
+		try {
+			gc.setFont(JFaceResources.getDialogFont());
+			return gc.stringExtent(name).x + 10;
+		} finally {
+			gc.dispose();
+		}
+	}
+
+	private static BindingManager fgLocalBindingManager;
+	static {
+		fgLocalBindingManager= new BindingManager(new ContextManager(), new CommandManager());
+		final IBindingService bindingService= (IBindingService)PlatformUI.getWorkbench().getService(IBindingService.class);
+		final Scheme[] definedSchemes= bindingService.getDefinedSchemes();
+		if (definedSchemes != null) {
+			try {
+				for (int i = 0; i < definedSchemes.length; i++) {
+					final Scheme scheme= definedSchemes[i];
+					final Scheme copy= fgLocalBindingManager.getScheme(scheme.getId());
+					copy.define(scheme.getName(), scheme.getDescription(), scheme.getParentId());
+				}
+			} catch (final NotDefinedException e) {
+				Logger.logException(e);
+			}
+		}
+		fgLocalBindingManager.setLocale(bindingService.getLocale());
+		fgLocalBindingManager.setPlatform(bindingService.getPlatform());
+	}
+
+	private static String getKeyboardShortcut(ParameterizedCommand command) {
+		IBindingService bindingService= (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+		fgLocalBindingManager.setBindings(bindingService.getBindings());
+		try {
+			Scheme activeScheme= bindingService.getActiveScheme();
+			if (activeScheme != null)
+				fgLocalBindingManager.setActiveScheme(activeScheme);
+		} catch (NotDefinedException e) {
+			Logger.logException(e);
+		}
+
+		TriggerSequence[] bindings= fgLocalBindingManager.getActiveBindingsDisregardingContextFor(command);
+		if (bindings.length > 0)
+			return bindings[0].format();
+		return null;
+	}
+
+	/**
+	 * <p>Gets and image based on an image descriptor, and stores the image so it
+	 * does not have to be created more then once</p>
+	 * 
+	 * @param imgDesc {@link ImageDescriptor} to get the {@link Image} for
+	 * @return {@link Image} created from the {@link ImageDescriptor}, or stored
+	 * {@link Image} associated with the given {@link ImageDescriptor} if an
+	 * {@link Image} had already been created for the given {@link ImageDescriptor}
+	 */
+	private Image getImage(ImageDescriptor imgDesc) {
+		if (imgDesc == null)
+			return null;
+
+		Image img= (Image) fImages.get(imgDesc);
+		if (img == null) {
+			img= imgDesc.createImage(false);
+			fImages.put(imgDesc, img);
+		}
+		return img;
+	}
+
+	/**
+	 * <p>Label provider for the table for configuring which categories should be displayed on the
+	 * default assist page</p>
+	 */
+	private final class DefaultPageTableLabelProvider extends LabelProvider implements ITableLabelProvider {
+		/**
+		 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+		 */
+		public Image getColumnImage(Object element, int columnIndex) {
+			if (columnIndex == 0)
+				return ((ModelElement) element).getImage();
+			return null;
+		}
+
+		/**
+		 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+		 */
+		public String getColumnText(Object element, int columnIndex) {
+			switch (columnIndex) {
+	            case 0:
+	            	return ((ModelElement) element).getName();
+	            default:
+	            	Assert.isTrue(false);
+	            	return null;
+            }
+		}
+
+		/**
+		 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+		 */
+		public String getText(Object element) {
+		    return getColumnText(element, 0); // needed to make the sorter work
+		}
+	}
+
+	/**
+	 * <p>Label provider for the table for configuring which categories should be displayed on their
+	 * own content assist page</p>
+	 */
+	private final class OwnPageTableLabelProvider extends LabelProvider implements ITableLabelProvider {
+		/**
+		 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+		 */
+		public Image getColumnImage(Object element, int columnIndex) {
+			if (columnIndex == 0)
+				return ((ModelElement) element).getImage();
+			return null;
+		}
+
+		/**
+		 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+		 */
+		public String getColumnText(Object element, int columnIndex) {
+			switch (columnIndex) {
+				case 0:
+					return ((ModelElement) element).getName();
+				default:
+					Assert.isTrue(false);
+				return null;
+			}
+		}
+	}
+	
+	/**
+	 * <p>PreferenceModel used to read and write the user preferences
+	 * using the {@link ICompletionProposalCategoriesConfigurationWriter}</p>
+	 */
+	private final class PreferenceModel {
+		/** private modifiable page element list */
+		private final List fPageElements;
+		
+		/** public unmodifiable page element list */
+		final List pageElements;
+		
+		/** private modifiable default page element list */
+		private final List fDefaultPageElements;
+		
+		/** public unmodifiable default page element list */
+		final List defaultPageElements;
+
+		/**
+		 * <p>Create the preference model for the given categories</p>
+		 * 
+		 * @param categories <code>{@link List}<{@link CompletionProposalCategory}></code>
+		 */
+		public PreferenceModel(List categories) {
+			//need separate lists because they will be ordered differently
+			this.fPageElements = new ArrayList();
+			this.fDefaultPageElements = new ArrayList();
+			for (Iterator it= categories.iterator(); it.hasNext();) {
+				CompletionProposalCategory category= (CompletionProposalCategory) it.next();
+				if (category.hasComputers()) {
+					ModelElement elem = new ModelElement(category);
+					fPageElements.add(elem);
+					fDefaultPageElements.add(elem);
+				}
+			}
+			//sort the lists
+			this.performDefaults();
+			
+			pageElements = Collections.unmodifiableList(fPageElements);
+			defaultPageElements = Collections.unmodifiableList(fDefaultPageElements);
+		}
+
+		/**
+		 * <p>Move the model element specified by the given index
+		 * up in the content assist page order</p>
+		 * 
+		 * @param elementIndex the index of the model element to move up
+		 */
+        public void movePageUp(int elementIndex) {
+        	Object removed = fPageElements.remove(elementIndex);
+        	fPageElements.add(elementIndex-1, removed);
+        	
+        	fConfigurationWriter.setPageOrder(getPageOrderedCategoryIDs());
+        }
+        
+        /**
+		 * <p>Move the model element specified by the given index
+		 * down in the content assist page order</p>
+		 * 
+		 * @param elementIndex the index of the model element to move up
+		 */
+        public void movePageDown(int elementIndex) {
+        	Object removed = fPageElements.remove(elementIndex);
+        	fPageElements.add(elementIndex+1, removed);
+        	
+        	fConfigurationWriter.setPageOrder(getPageOrderedCategoryIDs());
+        }
+        
+        /**
+		 * <p>Move the model element specified by the given index
+		 * up in the content assist page order</p>
+		 * 
+		 * @param elementIndex the index of the model element to move up
+		 */
+        public void moveDefaultPageCategoryUp(int elementIndex) {
+        	Object removed = fDefaultPageElements.remove(elementIndex);
+        	fDefaultPageElements.add(elementIndex-1, removed);
+        	
+        	fConfigurationWriter.setDefaultPageOrder(getDefaultPageOrderedCategoryIDs());
+        }
+        
+        /**
+		 * <p>Move the model element specified by the given index
+		 * down in the content assist page order</p>
+		 * 
+		 * @param elementIndex the index of the model element to move up
+		 */
+        public void moveDefaultPageCategoryDown(int elementIndex) {
+        	Object removed = fDefaultPageElements.remove(elementIndex);
+        	fDefaultPageElements.add(elementIndex+1, removed);
+        	
+        	fConfigurationWriter.setDefaultPageOrder(getDefaultPageOrderedCategoryIDs());
+        }
+        
+        /**
+         * @return <code>{@link List}<{@link String}></code> -
+         * List of category IDs by page order
+         */
+        private List getPageOrderedCategoryIDs() {
+        	List ordered = new ArrayList(pageElements.size());
+        	for(int i = 0; i < pageElements.size(); ++i) {
+        		ordered.add(((ModelElement)pageElements.get(i)).getId());
+        	}
+        	
+        	return ordered;
+        }
+        
+        /**
+         * @return <code>{@link List}<{@link String}></code> -
+         * List of category IDs by default page order
+         */
+        private List getDefaultPageOrderedCategoryIDs() {
+        	List ordered = new ArrayList(defaultPageElements.size());
+        	for(int i = 0; i < defaultPageElements.size(); ++i) {
+        		ordered.add(((ModelElement)defaultPageElements.get(i)).getId());
+        	}
+        	
+        	return ordered;
+        }
+        
+        /**
+         * <p>need to re-sort the lists after performing defaults</p>
+         */
+        public void performDefaults() {
+        	Collections.sort(fPageElements, fCategoryPageComparator);
+			Collections.sort(fDefaultPageElements, fCategoryDefaultPageComparator);
+        }
+	}
+	
+	/**
+	 * <p>Wraps a {@link CompletionProposalCategory} for use in the {@link PreferenceModel}</p>
+	 */
+	private final class ModelElement {
+		/** The wrapped category */
+		private final CompletionProposalCategory fCategory;
+
+		/**
+		 * <p>Create a new model element wrapping the given category</p>
+		 * 
+		 * @param category {@link CompletionProposalCategory} to be wrapped by this model element
+		 * for use in the {@link PreferenceModel}
+		 */
+		ModelElement(CompletionProposalCategory category) {
+			fCategory= category;
+		}
+		
+		/**
+		 * @return {@link Image} associated with the wrapped category
+		 */
+		Image getImage() {
+			return CodeAssistCyclingConfigurationBlock.this.getImage(fCategory.getImageDescriptor());
+		}
+		
+		/**
+		 * @return name of the wrapped category
+		 */
+		String getName() {
+			return fCategory.getDisplayName();
+		}
+		
+		String getId() {
+			return fCategory.getId();
+		}
+		
+		/**
+		 * @return <code>true</code> if the wrapped category should be displayed on the
+		 * default content assist page, <code>false</code> otherwise
+		 */
+		boolean shouldDisplayOnDefaultPage() {
+			return fConfigurationWriter.shouldDisplayOnDefaultPage(this.getId());
+		}
+		
+		/**
+		 * @param included <code>true</code> if the wrapped category should be displayed on the
+		 * default content assist page, <code>false</code> otherwise
+		 */
+		void setShouldDisplayOnDefaultPage(boolean included) {
+			fConfigurationWriter.setShouldDisplayOnDefaultPage(this.getId(), included);
+		}
+		
+		/**
+		 * @return <code>true</code> if the wrapped category should be displayed on the
+		 * its own content assist page, <code>false</code> otherwise
+		 */
+		boolean shouldDisplayOnOwnPage() {
+			return fConfigurationWriter.shouldDisplayOnOwnPage(this.getId());
+		}
+		
+		/**
+		 * @param shouldDisplay <code>true</code> if the wrapped category should be displayed on the
+		 * its own content assist page, <code>false</code> otherwise
+		 */
+		void setShouldDisplayOnOwnPage(boolean shouldDisplay) {
+			fConfigurationWriter.setShouldDisplayOnOwnPage(this.getId(), shouldDisplay);
+		}
+		
+		/**
+		 * @return the wrapped categories content assist page sort rank compared to the
+		 * other categories
+		 */
+		int getOwnPageRank() {
+			return fConfigurationWriter.getPageSortOrder(this.getId());
+		}
+		
+		/**
+		 * @return the wrapped categories content assist page sort rank compared to the
+		 * other categories
+		 */
+		int getDefaultPageRank() {
+			return fConfigurationWriter.getDefaultPageSortOrder(this.getId());
+		}
+	}
+	
+	private class ModelViewerComparator extends ViewerComparator {
+		/**
+		 * 
+		 */
+		public ModelViewerComparator(Comparator comparator) {
+			super(comparator);
+		}
+		
+		/**
+		 * @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+		 */
+		public int compare(Viewer viewer, Object e1, Object e2) {
+			return this.getComparator().compare(e1, e2);
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationReader.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationReader.java
new file mode 100644
index 0000000..74c95df
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationReader.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.preferences;
+
+/**
+ * <p>Implementers of the <code>org.eclipse.wst.sse.ui.completionProposalCategoriesConfiguration</code>
+ * extension will need an implementation of this interface for their extension</p>
+ * 
+ * <p><b>NOTE: </b>Implementers must have a 0 argument constructor so class can be instantiated by
+ * extension.</p>
+ * 
+ * @see ICompletionProposalCategoriesConfigurationWriter
+ */
+public interface ICompletionProposalCategoriesConfigurationReader {
+	/** 
+	 * The default is to display a category on its own page
+	 * if not otherwise defined by a property.
+	 */
+	boolean DEFAULT_DISPLAY_ON_OWN_PAGE = true;
+	
+	/** The default is to display a category on the default content assist page. */
+	boolean DEFAULT_INCLUDE_ON_DEFAULTS_PAGE = true;
+	
+	/** the default sort order if none is defined by a properties extension */
+	int DEFAULT_SORT_ORDER = Integer.MAX_VALUE;
+	
+	/**
+	 * <p>Determines if the given category should be displayed on its own content
+	 * assist page</p>
+	 * 
+	 * @param categoryID determine if this category should be displayed on its own
+	 * content assist page
+	 * 
+	 * @return <code>true</code> if the given category should be displayed on its
+	 * own content assist page, <code>false</code> otherwise
+	 */
+	boolean shouldDisplayOnOwnPage(String categoryID);
+	
+	/**
+	 * <p>Determines if the given category should be displayed on the default
+	 * content assist page</p>
+	 * 
+	 * @param categoryID determine if this category should be displayed on the
+	 * default content assist page
+	 * 
+	 * @return <code>true</code> if the given category should be displayed on the
+	 * default content assist page, <code>false</code> otherwise
+	 */
+	boolean shouldDisplayOnDefaultPage(String categoryID);
+	
+	/**
+	 * <p>Determines the sort order ranking of the given category when compared
+	 * to the other categories, this is used to determine the order in which
+	 * the separate content assist pages should be displayed</p>
+	 * 
+	 * @param categoryID determine the sort order ranking of this category
+	 * 
+	 * @return the sort order ranking of the given category when compared
+	 * to the other categories
+	 */
+	int getPageSortOrder(String categoryID);
+	
+	/**
+	 * <p>Determines the sort order ranking of the given category when compared
+	 * to the other categories, this is used to determine the order in which
+	 * categories should be listed on the default page</p>
+	 * 
+	 * @param categoryID determine the sort order ranking of this category
+	 * 
+	 * @return the sort order ranking of the given category when compared
+	 * to the other categories
+	 */
+	int getDefaultPageSortOrder(String categoryID);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationWriter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationWriter.java
new file mode 100644
index 0000000..0462819
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationWriter.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.preferences;
+
+import java.util.List;
+
+import org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalCategory;
+
+/**
+ * <p>Implementers of the <code>org.eclipse.wst.sse.ui.completionProposalCategoriesConfiguration</code>
+ * extension can implement this interface if their configuration should be user edible and thus
+ * needs writing capabilities</p>
+ * 
+ * <p><b>NOTE: </b>Implementers must have a 0 argument constructor so class can be instantiated by
+ * extension.</p>
+ * 
+ * @see ICompletionProposalCategoriesConfigurationReader
+ */
+public interface ICompletionProposalCategoriesConfigurationWriter extends
+		ICompletionProposalCategoriesConfigurationReader {
+	
+	/**
+	 * <p>If a writer has a known associated properties page then that properties
+	 * page ID can be used so that error messages during the content assist process
+	 * can link to that preference page to allow the user to change the settings</p>
+	 * 
+	 * @return <code>true</code> if this writer has a known associated properties
+	 * preference page, <code>false</code> otherwise
+	 */
+	boolean hasAssociatedPropertiesPage();
+	
+	/**
+	 * @return If {@link #hasAssociatedPropertiesPage()} returns <code>true</code> then
+	 * this method must return a valid properties page ID where the user can edit the
+	 * content assist configuration, else it can return <code>null</code>
+	 */
+	String getPropertiesPageID();
+	
+	/**
+	 * <p>Sets whether or not the given category should be displayed on its own content
+	 * assist page.<p>
+	 * 
+	 * <p><b>NOTE: </b>This preference should <b>NOT</b> be saved permanently here, that action
+	 * should wait until {@link #saveConfiguration()} is called</p>
+	 * 
+	 * @param categoryID the category that should either be displayed on its own content
+	 * assist page or not
+	 * @param shouldDisplay <code>true</code> if the given category should be displayed
+	 * on its own content assist page, <code>false</code> otherwise
+	 */
+	void setShouldDisplayOnDefaultPage(String categoryID, boolean shouldDisplay);
+	
+	/**
+	 * <p>Sets whether or not the given category should be displayed on the default content
+	 * assist page.<p>
+	 * 
+	 * <p><b>NOTE: </b>This preference should <b>NOT</b> be saved permanently here, that action
+	 * should wait until {@link #saveConfiguration()} is called</p>
+	 * 
+	 * @param categoryID the category that should either be displayed on the default content
+	 * assist page or not
+	 * @param shouldDisplay <code>true</code> if the given category should be displayed
+	 * on the default content assist page, <code>false</code> otherwise
+	 */
+	void setShouldDisplayOnOwnPage(String categoryID, boolean shouldDisplay);
+	
+	/**
+	 * <p>Sets the order in which the categories should be cycled when invoking content
+	 * assist multiple times.  Event categories that are not activated to display on their
+	 * own content assist page can be listed here so that when activated to display on their
+	 * own page they have a rank.  The entire order needs to be re-set each time one category
+	 * moves because the writer has no way of knowing how to move just one category in the order</p>
+	 * 
+	 * <p><b>NOTE: </b>This preference should <b>NOT</b> be saved permanently here, that action
+	 * should wait until {@link #saveConfiguration()} is called</p>
+	 * 
+	 * @param order <code>{@link List}<{@link String}></code>
+	 * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
+	 */
+	void setPageOrder(List order);
+	
+	/**
+	 * <p>Sets the order in which the categories should be listed on the default page.
+	 * Event categories that are not activated to display on the default content assist
+	 * page can be listed here so that when activated to display on the default page
+	 * they have a rank.  The entire order needs to be re-set each time one category
+	 * moves because the writer has no way of knowing how to move just one category in the order</p>
+	 * 
+	 * <p><b>NOTE: </b>This preference should <b>NOT</b> be saved permanently here, that action
+	 * should wait until {@link #saveConfiguration()} is called</p>
+	 * 
+	 * @param order <code>{@link List}<{@link String}></code>
+	 * <ul><li><b>values:</b> {@link CompletionProposalCategory} IDs</li></ul>
+	 */
+	void setDefaultPageOrder(List order);
+	
+	/**
+	 * <p>Should load the default settings from wherever they are being stored</p>
+	 */
+	void loadDefaults();
+	
+	/**
+	 * <p>Should save the configuration permanently.  Typically called after the user
+	 * changes some preferences using a preference page and then applies them, but if they do
+	 * not apply the changes then this function should not be called.  This is the reason why the
+	 * various <code>set*</code> methods should not permanently save the configuration</p>
+	 * 
+	 * @return <code>true</code> if the save was successful, <code>false</code> otherwise
+	 */
+	boolean saveConfiguration();
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/quickoutline/AbstractQuickOutlineConfiguration.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/quickoutline/AbstractQuickOutlineConfiguration.java
new file mode 100644
index 0000000..33ff2d8
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/quickoutline/AbstractQuickOutlineConfiguration.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.quickoutline;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.wst.sse.ui.IContentSelectionProvider;
+
+/**
+ * Base class that provides configuration for a quick outline.
+ *
+ */
+public abstract class AbstractQuickOutlineConfiguration {
+
+	/**
+	 * Provides the label provider to be used by the quick outline
+	 * 
+	 * @return an <code>ILabelProvider</code> to be used by the quick outline
+	 */
+	public abstract ILabelProvider getLabelProvider();
+
+	/**
+	 * Provides the content provider to be used by the quick outline
+	 * 
+	 * @return a <code>ITreeContentProvider</code> to be used when providing the content of the quick outline
+	 */
+	public abstract ITreeContentProvider getContentProvider();
+
+	/**
+	 * Provides the content selection provider to be used by the quick outline. This allows
+	 * for adjusting the selection to be displayed in the outline based on the editor's selection
+	 * 
+	 * @return an <code>IContentSelectionProvider</code> used by the quick outline. By default, returns
+	 * null indicating that the selection in the editor translates to the selection in the outline.
+	 */
+	public IContentSelectionProvider getContentSelectionProvider() {
+		return null;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/reconcile/ISourceReconcilingListener.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/reconcile/ISourceReconcilingListener.java
new file mode 100644
index 0000000..1109386
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/reconcile/ISourceReconcilingListener.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.sse.ui.reconcile;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.IAnnotationModel;
+
+/**
+ * A course listener for source viewer "reconciling" of a document
+ * 
+ */
+public interface ISourceReconcilingListener {
+
+	/**
+	 * Called before reconciling is started.
+	 */
+	void aboutToBeReconciled();
+
+	/**
+	 * Called after reconciling has been finished.
+	 * 
+	 * @param document
+	 *            the text document or <code>null</code> if reconciliation has
+	 *            been cancelled
+	 * @param model
+	 *            the annotation model that was changed or <code>null</code>
+	 *            if reconciliation has been cancelled
+	 * @param forced
+	 *            <code>true</code> iff this reconciliation was forced
+	 * @param progressMonitor
+	 *            the progress monitor
+	 */
+	void reconciled(IDocument document, IAnnotationModel model, boolean forced, IProgressMonitor progressMonitor);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/typing/AbstractCharacterPairInserter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/typing/AbstractCharacterPairInserter.java
new file mode 100644
index 0000000..653965b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/typing/AbstractCharacterPairInserter.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.typing;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.link.ILinkedModeListener;
+import org.eclipse.jface.text.link.LinkedModeModel;
+import org.eclipse.jface.text.link.LinkedModeUI;
+import org.eclipse.jface.text.link.LinkedPosition;
+import org.eclipse.jface.text.link.LinkedPositionGroup;
+import org.eclipse.jface.text.link.LinkedModeUI.ExitFlags;
+import org.eclipse.jface.text.link.LinkedModeUI.IExitPolicy;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.wst.sse.ui.internal.Logger;
+
+abstract public class AbstractCharacterPairInserter {
+
+	class ExitPolicy implements IExitPolicy {
+
+		private char fExit;
+		private char fEscape;
+		private IDocument fDocument;
+
+		public ExitPolicy(char exit, char escape, IDocument document) {
+			fExit = exit;
+			fEscape = escape;
+			fDocument = document;
+		}
+
+		public ExitFlags doExit(LinkedModeModel model, VerifyEvent event, int offset, int length) {
+			if(!isMasked(offset)) {
+				if (event.character == fExit)
+					return new ExitFlags(ILinkedModeListener.UPDATE_CARET, false);
+			}
+			return null;
+		}
+
+		private boolean isMasked(int offset) {
+			try {
+				return fEscape == fDocument.getChar(offset - 1);
+			} catch (BadLocationException e) {
+			}
+			return false;
+		}
+	}
+
+	/**
+	 * Pair the character <code>c</code> in the source viewer <code>viewer</code>.
+	 * Positions are linked before and after the inserted character.
+	 * 
+	 * @param viewer the source viewer to add the linked mode to
+	 * @param c the character to pair with
+	 * @return true if the character was successfully paired; false otherwise
+	 */
+	public boolean pair(final ISourceViewer viewer, final char c) {
+		if (!shouldPair(viewer, c))
+			return false;
+
+		final char mc = getPair(c);
+		final char[] chars = new char[2];
+		chars[0] = c;
+		chars[1] = mc;
+
+		IDocument document = viewer.getDocument();
+
+		final Point selection= viewer.getSelectedRange();
+		final int offset= selection.x;
+		final int length= selection.y;
+
+		boolean paired = false;
+		try {
+			document.replace(offset, length, new String(chars));
+			LinkedModeModel model = new LinkedModeModel();
+			LinkedPositionGroup group = new LinkedPositionGroup();
+			group.addPosition(new LinkedPosition(document, offset + 1, 0, LinkedPositionGroup.NO_STOP));
+			model.addGroup(group);
+			model.forceInstall();
+
+			LinkedModeUI ui = new LinkedModeUI(model, viewer);
+			ui.setCyclingMode(LinkedModeUI.CYCLE_NEVER);
+			ui.setExitPosition(viewer, offset + 2, 0, Integer.MAX_VALUE);
+			ui.setExitPolicy(getExitPolicy(mc, getEscapeChar(c), document));
+			ui.setSimpleMode(true);
+			ui.enter();
+
+			paired = true;
+		} catch (BadLocationException e) {
+			Logger.logException(e);
+		}
+		return paired;
+	}
+
+	/**
+	 * Hook to evaluate if the character should be paired. Clients may override
+	 * to evaluate the case.
+	 * @param viewer the source viewer where the character would be paired
+	 * @param c the character to pair
+	 * @return true if the character should have its pair character inserted; false otherwise
+	 */
+	protected boolean shouldPair(ISourceViewer viewer, char c) {
+		return true;
+	}
+
+	/**
+	 * Can the character be paired by the inserter
+	 * @param c the character of interest
+	 * @return true if the character can be paired by the inserter; false otherwise
+	 */
+	abstract public boolean hasPair(char c);
+
+	/**
+	 * Get the paired character for <code>c</code>
+	 * @param c the character to find the pair of
+	 * @return the pair character
+	 */
+	abstract protected char getPair(char c);
+
+	/**
+	 * Gets the escape character for <code>c</code> in case <code>c</code> is to be used
+	 * within the paired characters
+	 * @param c the character to find the escape character of
+	 * @return the escape character
+	 */
+	protected char getEscapeChar(char c) {
+		return 0;
+	}
+
+	public void initialize() {
+	}
+
+	public void dispose() {
+	}
+
+	protected IExitPolicy getExitPolicy(char exit, char escape, IDocument document) {
+		return new ExitPolicy(exit, escape, document);
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/ContentOutlineConfiguration.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/ContentOutlineConfiguration.java
new file mode 100644
index 0000000..d8cbf59
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/ContentOutlineConfiguration.java
@@ -0,0 +1,316 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 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
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.views.contentoutline;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.util.TransferDragSourceListener;
+import org.eclipse.jface.util.TransferDropTargetListener;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateAction;
+import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateActionContributionItem;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
+import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
+
+/**
+ * Basic Configuration class for Outline Pages
+ * 
+ * @since 1.0
+ */
+public abstract class ContentOutlineConfiguration {
+	/**
+	 * Add a collapse action to help with navigation.
+	 */
+	private class CollapseTreeAction extends Action {
+		private TreeViewer fTreeViewer = null;
+
+		public CollapseTreeAction(TreeViewer viewer) {
+			super(SSEUIMessages.ContentOutlineConfiguration_0, AS_PUSH_BUTTON); //$NON-NLS-1$
+			setImageDescriptor(COLLAPSE_E);
+			setDisabledImageDescriptor(COLLAPSE_D);
+			setToolTipText(getText());
+			fTreeViewer = viewer;
+		}
+
+		public void run() {
+			super.run();
+			fTreeViewer.collapseAll();
+		}
+	}
+
+	/**
+	 * Toggles whether incoming selection notification affects us
+	 */
+	private class ToggleLinkAction extends PropertyChangeUpdateAction {
+		public ToggleLinkAction(IPreferenceStore store, String preference) {
+			super(SSEUIMessages.ContentOutlineConfiguration_1, store, preference, true); //$NON-NLS-1$
+			setToolTipText(getText());
+			setDisabledImageDescriptor(SYNCED_D);
+			setImageDescriptor(SYNCED_E);
+			update();
+		}
+
+		public void update() {
+			super.update();
+			setLinkWithEditor(isChecked());
+		}
+	}
+
+	ImageDescriptor COLLAPSE_D = EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_DLCL_COLLAPSEALL);
+	ImageDescriptor COLLAPSE_E = EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_ELCL_COLLAPSEALL);
+
+	private boolean fIsLinkWithEditor = false;
+
+	private ILabelProvider fLabelProvider;
+	private IContributionItem[] fMenuContributions = null;
+	private IContributionItem[] fToolbarContributions = null;
+	private final String OUTLINE_LINK_PREF = "outline-link-editor"; //$NON-NLS-1$
+	ImageDescriptor SYNCED_D = EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_DLCL_SYNCED);
+	ImageDescriptor SYNCED_E = EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_ELCL_SYNCED);
+
+	/**
+	 * Create new instance of ContentOutlineConfiguration
+	 */
+	public ContentOutlineConfiguration() {
+		// Must have empty constructor to createExecutableExtension
+		super();
+	}
+
+	/**
+	 * Creates the contributions for the view's local menu. Subclasses should
+	 * merge their contributions with these.
+	 * 
+	 * @param viewer
+	 *            the TreeViewer associated with this configuration
+	 * @return menu contributions
+	 */
+	protected IContributionItem[] createMenuContributions(TreeViewer viewer) {
+		IContributionItem toggleLinkItem = new PropertyChangeUpdateActionContributionItem(new ToggleLinkAction(getPreferenceStore(), OUTLINE_LINK_PREF));
+		IContributionItem[] items = new IContributionItem[]{toggleLinkItem};
+		return items;
+	}
+
+	/**
+	 * Creates the toolbar contributions. Subclasses should merge their
+	 * contributions with these.
+	 * 
+	 * @param viewer
+	 *            the TreeViewer associated with this configuration
+	 * @return toolbar contributions
+	 */
+	protected IContributionItem[] createToolbarContributions(TreeViewer viewer) {
+		IContributionItem collapseAllItem = new ActionContributionItem(new CollapseTreeAction(viewer));
+		IContributionItem[] items = new IContributionItem[]{collapseAllItem};
+		return items;
+	}
+
+	/**
+	 * Returns the ContentProvider to use with the given viewer.
+	 * 
+	 * @param viewer
+	 *            the TreeViewer associated with this configuration
+	 * @return the IContentProvider to use with this viewer
+	 */
+	public abstract IContentProvider getContentProvider(TreeViewer viewer);
+
+	/**
+	 * Returns an array of KeyListeners to attach to the given viewer's
+	 * control or null.
+	 * 
+	 * @param viewer
+	 *            the TreeViewer associated with this configuration
+	 * @return an array of KeyListeners to attach to the TreeViewer's Control,
+	 *         or null. The listeners should adhere to the KeyEvent.doit field
+	 *         to ensure proper behaviors. Ordering of the event notifications
+	 *         is dependent on the Control in the TreeViewer.
+	 */
+	public KeyListener[] getKeyListeners(TreeViewer viewer) {
+		return null;
+	}
+
+	/**
+	 * Returns the LabelProvider for the items within the given viewer.
+	 * 
+	 * @param viewer
+	 *            the TreeViewer associated with this configuration
+	 * @return the ILabelProvider for items within the viewer
+	 */
+	public ILabelProvider getLabelProvider(TreeViewer viewer) {
+		if (fLabelProvider == null)
+			fLabelProvider = new LabelProvider();
+		return fLabelProvider;
+	}
+
+	/**
+	 * Returns the menu contribution items for the local menu in the outline.
+	 * 
+	 * @param viewer
+	 *            the TreeViewer associated with this configuration
+	 * @return IContributionItem[] for the local menu
+	 */
+	public final IContributionItem[] getMenuContributions(TreeViewer viewer) {
+		if (fMenuContributions == null) {
+			fMenuContributions = createMenuContributions(viewer);
+		}
+		return fMenuContributions;
+	}
+
+	/**
+	 * Returns the menu listener to notify when the given viewer's context
+	 * menu is about to be shown or null.
+	 * 
+	 * @param viewer
+	 *            the TreeViewer associated with this configuration
+	 * @return the IMenuListener to notify when the viewer's context menu is
+	 *         about to be shown, or null
+	 */
+	public IMenuListener getMenuListener(TreeViewer viewer) {
+		return null;
+	}
+
+	/**
+	 * Returns the PreferenceStore to use for this configuration.
+	 * 
+	 * @return the preference store in which to remember preferences (such as
+	 *         the link-with-editor toggle state)
+	 */
+	protected IPreferenceStore getPreferenceStore() {
+		return SSEUIPlugin.getInstance().getPreferenceStore();
+	}
+
+	/**
+	 * Returns the (filtered) selection from the given selection.
+	 * 
+	 * @param selection
+	 *            model selection
+	 * @param viewer
+	 *            the TreeViewer associated with this configuration
+	 * @return The (filtered) selection from this event. Uses include mapping
+	 *         model selection onto elements provided by the content provider.
+	 *         Should only return elements that will be shown in the Tree
+	 *         Control.
+	 */
+	public ISelection getSelection(TreeViewer viewer, ISelection selection) {
+		return selection;
+	}
+
+	/**
+	 * @since 2.0
+	 * @param treeViewer
+	 * @return a label provider providing the status line contents
+	 */
+	public ILabelProvider getStatusLineLabelProvider(TreeViewer treeViewer) {
+		return null;
+	}
+
+	/**
+	 * Returns contribution items for the local toolbar in the outline.
+	 * 
+	 * @param viewer
+	 *            the TreeViewer associated with this configuration
+	 * @return IContributionItem[] for the local toolbar
+	 */
+	public final IContributionItem[] getToolbarContributions(TreeViewer viewer) {
+		if (fToolbarContributions == null) {
+			fToolbarContributions = createToolbarContributions(viewer);
+		}
+		return fToolbarContributions;
+	}
+
+	/**
+	 * Adopted since you can't easily removeDragSupport from
+	 * StructuredViewers.
+	 * 
+	 * @param treeViewer
+	 *            the TreeViewer associated with this configuration
+	 * @return an array of TransferDragSourceListeners
+	 */
+	public TransferDragSourceListener[] getTransferDragSourceListeners(TreeViewer treeViewer) {
+		return new TransferDragSourceListener[0];
+	}
+
+	/**
+	 * Adopted since you can't easily removeDropSupport from
+	 * StructuredViewers.
+	 * 
+	 * @param treeViewer
+	 *            the TreeViewer associated with this configuration
+	 * @return an array of TransferDropTargetListeners
+	 */
+	public TransferDropTargetListener[] getTransferDropTargetListeners(TreeViewer treeViewer) {
+		return new TransferDropTargetListener[0];
+	}
+
+	/**
+	 * Returns true if node selection changes affect selection in the
+	 * TreeViewer.
+	 * 
+	 * @param treeViewer
+	 *            the TreeViewer associated with this configuration
+	 * @return true if outline is currently linked to selection in editor,
+	 *         false otherwise
+	 */
+	public boolean isLinkedWithEditor(TreeViewer treeViewer) {
+		return fIsLinkWithEditor;
+	}
+
+	/**
+	 * Sets whether or not outline view should be linked with selection in
+	 * editor.
+	 * 
+	 * @param isLinkWithEditor
+	 *            The isLinkWithEditor to set.
+	 */
+	void setLinkWithEditor(boolean isLinkWithEditor) {
+		fIsLinkWithEditor = isLinkWithEditor;
+	}
+
+	/**
+	 * General hook for resource releasing and listener removal when
+	 * configurations change or the viewer is disposed of. This implementation
+	 * stops of any remaining PropertyChangeUpdateActionContributionItem from
+	 * preference listening.
+	 * 
+	 * @param viewer
+	 *            the TreeViewer associated with this configuration
+	 */
+	public void unconfigure(TreeViewer viewer) {
+		if (fToolbarContributions != null) {
+			for (int i = 0; i < fToolbarContributions.length; i++) {
+				if (fToolbarContributions[i] instanceof PropertyChangeUpdateActionContributionItem) {
+					((PropertyChangeUpdateActionContributionItem) fToolbarContributions[i]).disconnect();
+				}
+			}
+			fToolbarContributions = null;
+		}
+		if (fMenuContributions != null) {
+			for (int i = 0; i < fMenuContributions.length; i++) {
+				if (fMenuContributions[i] instanceof PropertyChangeUpdateActionContributionItem) {
+					((PropertyChangeUpdateActionContributionItem) fMenuContributions[i]).disconnect();
+				}
+			}
+			fMenuContributions = null;
+		}
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/IPropertySourceExtension.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/IPropertySourceExtension.java
new file mode 100644
index 0000000..d74eee9
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/IPropertySourceExtension.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.views.properties;
+
+/**
+ * Declares that this IPropertySource might support outright removal of a
+ * property
+ * 
+ * @since 1.0
+ */
+public interface IPropertySourceExtension {
+
+	/**
+	 * Returns true if the property matching the given name can be removed,
+	 * false otherwise.
+	 * 
+	 * @param name
+	 *            the name of the property
+	 * @return whether the property matching this name can be removed
+	 */
+	boolean isPropertyRemovable(Object name);
+
+	/**
+	 * Removes the property with the given displayed name. If no such property
+	 * exists, nothing is done.
+	 * 
+	 * @param name
+	 *            the displayed name of the property
+	 */
+	void removeProperty(Object name);
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/PropertySheetConfiguration.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/PropertySheetConfiguration.java
new file mode 100644
index 0000000..f89e38d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/PropertySheetConfiguration.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jens Lukowski/Innoopract - initial renaming/restructuring
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.sse.ui.views.properties;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.IPropertySourceProvider;
+
+
+/**
+ * Configuration class for Property Sheet Pages. Not finalized.
+ * 
+ * @since 1.0
+ */
+public abstract class PropertySheetConfiguration {
+	/**
+	 * Create new instance of PropertySheetConfiguration
+	 */
+	public PropertySheetConfiguration() {
+		// Must have empty constructor to createExecutableExtension
+		super();
+	}
+
+	/**
+	 * Adds contribution menu items to the given menuManager, toolbarManager,
+	 * statusLineManager.
+	 * 
+	 * @param menuManager
+	 *            the local menu manager of the property sheet
+	 * @param toolBarManager
+	 *            the local toolbar manager of the property sheet
+	 * @param statusLineManager
+	 *            the status line manager of the property sheet
+	 */
+	public void addContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+		// do nothing
+	}
+
+	/**
+	 * Allows for filteration of selection before being sent to the viewer.
+	 * 
+	 * @param selectingPart
+	 *            may be null
+	 * @param selection
+	 *            model selection
+	 * @return the (filtered) selection to be sent to the viewer
+	 */
+	public ISelection getInputSelection(IWorkbenchPart selectingPart, ISelection selection) {
+		ISelection preferredSelection = selection;
+		if (selection instanceof IStructuredSelection) {
+			// don't support more than one selected node
+			if (((IStructuredSelection) selection).size() > 1)
+				preferredSelection = StructuredSelection.EMPTY;
+		}
+		return preferredSelection;
+	}
+
+	/**
+	 * Returns the correct IPropertySourceProvider.
+	 * 
+	 * @param page
+	 *            the page to be configured by this configuration
+	 * @return the IPropertySourceProvider for the given page
+	 */
+	public abstract IPropertySourceProvider getPropertySourceProvider(IPropertySheetPage page);
+
+	/**
+	 * Removes contribution menu items from the given menuManager,
+	 * toolbarManager, statusLineManager.
+	 * 
+	 * @param menuManager
+	 *            the local menu manager of the property sheet
+	 * @param toolBarManager
+	 *            the local toolbar manager of the property sheet
+	 * @param statusLineManager
+	 *            the status line manager of the property sheet
+	 */
+	public void removeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+		// do nothing
+	}
+
+	/**
+	 * General hook for resource releasing and listener removal when
+	 * configurations change.
+	 */
+	public void unconfigure() {
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.ui/testToc.xml b/bundles/org.eclipse.wst.sse.ui/testToc.xml
new file mode 100644
index 0000000..6142b90
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/testToc.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc
+	label="Test TOC"
+	topic="html/toc.html">
+	<link toc="toc.xml" />
+</toc>
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/toc.xml b/bundles/org.eclipse.wst.sse.ui/toc.xml
new file mode 100644
index 0000000..a5c0bb6
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.ui/toc.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Sample Table of Contents">
+	<topic
+		label="Main Topic"
+		href="html/maintopic.html">
+		<topic
+			label="Sub Topic"
+			href="html/subtopic.html" />
+	</topic>
+	<topic label="Main Topic 2" />
+</toc>
diff --git a/bundles/org.eclipse.wst.xml.ui/.classpath b/bundles/org.eclipse.wst.xml.ui/.classpath
deleted file mode 100644
index 9d03c22..0000000
--- a/bundles/org.eclipse.wst.xml.ui/.classpath
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src" />
-	<classpathentry kind="src" path="src-validation" />
-	<classpathentry kind="src" path="src-multipage" />
-	<classpathentry kind="src" path="src-wizards" />
-	<classpathentry kind="src" path="src-catalog" />
-	<classpathentry kind="con"
-		path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4" />
-	<classpathentry kind="con"
-		path="org.eclipse.pde.core.requiredPlugins">
-		<accessrules>
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/core/ValidationException" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/operations/LocalizedMessage/" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/provisional/core/IMessage" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/core/Message" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/provisional/core/IReporter" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/provisional/core/IValidationContext" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/provisional/core/IValidator" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/common/ui/internal/dnd/DefaultDragAndDropCommand" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/common/ui/internal/dialogs/SelectSingleFileDialog" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/core/IMessageAccess" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/provisional/core/IProjectValidationContext" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/provisional/core/IValidatorJob" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/common/ui/internal/viewers/SelectSingleFileView" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/common/ui/internal/dnd/DragAndDropCommand" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/common/ui/internal/dnd/DragAndDropManager" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/common/ui/internal/dnd/ObjectTransfer" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/common/ui/internal/dnd/ViewerDragAdapter" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/common/ui/internal/dnd/ViewerDropAdapter" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/ConfigurationManager" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/ProjectConfiguration" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/ValidationRegistryReader" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/ValidatorMetaData" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/provisional/ValidationFactory" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/common/ui/internal/viewers/*" />
-			<accessrule kind="accessible"
-				pattern="org/eclipse/wst/validation/internal/ValidationConfiguration" />
-		</accessrules>
-	</classpathentry>
-	<classpathentry kind="output" path="bin" />
-</classpath>
diff --git a/bundles/org.eclipse.wst.xml.ui/.cvsignore b/bundles/org.eclipse.wst.xml.ui/.cvsignore
deleted file mode 100644
index 701c285..0000000
--- a/bundles/org.eclipse.wst.xml.ui/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-bin
-temp.folder
-build.xml
-xmleditor.jar
-org.eclipse.wst.xml.ui_1.0.0.jar
-org.eclipse.wst.xml.ui_1.0.0.zip
-xmleditorsrc.zip
-@dot
-src.zip
-javaCompiler...args
diff --git a/bundles/org.eclipse.wst.xml.ui/.options b/bundles/org.eclipse.wst.xml.ui/.options
deleted file mode 100644
index 5acae8f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.xml.ui/projectionperf=false
diff --git a/bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 0ece7b5..0000000
--- a/bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,51 +0,0 @@
-#Wed Nov 22 23:23:01 EST 2006
-cleanup.add_default_serial_version_id=true
-cleanup.add_generated_serial_version_id=false
-cleanup.add_missing_annotations=false
-cleanup.add_missing_deprecated_annotations=true
-cleanup.add_missing_nls_tags=false
-cleanup.add_missing_override_annotations=true
-cleanup.add_serial_version_id=true
-cleanup.always_use_blocks=true
-cleanup.always_use_parentheses_in_expressions=true
-cleanup.always_use_this_for_non_static_field_access=false
-cleanup.always_use_this_for_non_static_method_access=false
-cleanup.convert_to_enhanced_for_loop=false
-cleanup.format_comment=true
-cleanup.format_javadoc=true
-cleanup.format_multi_line_comment=true
-cleanup.format_single_line_comment=true
-cleanup.format_source_code=true
-cleanup.make_local_variable_final=true
-cleanup.make_parameters_final=false
-cleanup.make_private_fields_final=true
-cleanup.make_variable_declarations_final=false
-cleanup.never_use_blocks=false
-cleanup.never_use_parentheses_in_expressions=false
-cleanup.organize_imports=true
-cleanup.qualify_static_field_accesses_with_declaring_class=false
-cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-cleanup.qualify_static_member_accesses_with_declaring_class=true
-cleanup.qualify_static_method_accesses_with_declaring_class=false
-cleanup.remove_private_constructors=true
-cleanup.remove_unnecessary_casts=true
-cleanup.remove_unnecessary_nls_tags=true
-cleanup.remove_unused_imports=true
-cleanup.remove_unused_local_variables=false
-cleanup.remove_unused_private_fields=true
-cleanup.remove_unused_private_members=true
-cleanup.remove_unused_private_methods=true
-cleanup.remove_unused_private_types=true
-cleanup.use_blocks=true
-cleanup.use_blocks_only_for_return_and_throw=false
-cleanup.use_parentheses_in_expressions=true
-cleanup.use_this_for_non_static_field_access=false
-cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-cleanup.use_this_for_non_static_method_access=false
-cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-cleanup_profile=_SSE Team Styles
-cleanup_settings_version=2
-eclipse.preferences.version=1
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates/>
diff --git a/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 12e271b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,61 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.xml.ui; singleton:=true
-Bundle-Version: 1.0.401.qualifier
-Bundle-Activator: org.eclipse.wst.xml.ui.internal.XMLUIPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.xml.ui,
- org.eclipse.wst.xml.ui.internal;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.actions;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.autoedit;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.catalog;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.catalog.icons.etool50;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.catalog.icons.obj16;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.catalog.icons.ovr16;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.contentassist;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.contentoutline;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.correction;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.dialogs;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.dnd;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.doubleclick;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.editor;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.handlers;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.hyperlink;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.nsedit;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.preferences;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.projection;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.properties;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.provisional;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.registry;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.search;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.selection;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.style;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.tabletree;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.taginfo;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.templates;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.text;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.util;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.validation;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.validation.core.errorinfo;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.internal.wizards;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
- org.eclipse.wst.xml.ui.views.contentoutline,
- org.eclipse.wst.xml.ui.views.properties
-Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.views;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,1.2.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.common.ui;bundle-version="[1.1.301,1.2.0)",
- org.eclipse.wst.validation;bundle-version="[1.2.0,1.3.0)",
- com.ibm.icu;bundle-version="[3.8.1,4.0.0)",
- org.eclipse.core.expressions;bundle-version="[3.3.0,4.0.0)"
-Bundle-ActivationPolicy: lazy; exclude:="org.eclipse.wst.xml.ui.internal.validation.core.errorinfo"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.wst.xml.ui/examples/EditingAndValidatingXML.zip b/bundles/org.eclipse.wst.xml.ui/examples/EditingAndValidatingXML.zip
deleted file mode 100644
index 6257767..0000000
--- a/bundles/org.eclipse.wst.xml.ui/examples/EditingAndValidatingXML.zip
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/XMLFile.gif b/bundles/org.eclipse.wst.xml.ui/icons/XMLFile.gif
deleted file mode 100644
index 14eb1be..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/XMLFile.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/collapse.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/collapse.gif
deleted file mode 100644
index ce74721..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/collapse.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/constrainoff.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/constrainoff.gif
deleted file mode 100644
index 4bdceb8..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/constrainoff.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/constrainon.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/constrainon.gif
deleted file mode 100644
index e823d57..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/constrainon.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/expand.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/expand.gif
deleted file mode 100644
index bc37b7a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/expand.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/expand_all.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/expand_all.gif
deleted file mode 100644
index 492c14f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/expand_all.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/new_xml.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/new_xml.gif
deleted file mode 100644
index e1cfdf7..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/new_xml.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/rldgrmr.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/rldgrmr.gif
deleted file mode 100644
index 49325dd..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/rldgrmr.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/validate.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/validate.gif
deleted file mode 100644
index 561d146..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/validate.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/collapse.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/collapse.gif
deleted file mode 100644
index b75bc19..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/collapse.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/constrainoff.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/constrainoff.gif
deleted file mode 100644
index c1ab04c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/constrainoff.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/constrainon.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/constrainon.gif
deleted file mode 100644
index 082f9c0..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/constrainon.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/expand.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/expand.gif
deleted file mode 100644
index b2f4530..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/expand.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/expand_all.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/expand_all.gif
deleted file mode 100644
index 0205b29..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/expand_all.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/new_xml.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/new_xml.gif
deleted file mode 100644
index 9dfb62d..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/new_xml.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/rldgrmr.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/rldgrmr.gif
deleted file mode 100644
index 049cac6..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/rldgrmr.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/validate.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/validate.gif
deleted file mode 100644
index 2b347ac..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/etool16/validate.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/XSDFile.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/XSDFile.gif
deleted file mode 100644
index cc0eeb7..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/XSDFile.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/add_correction.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/add_correction.gif
deleted file mode 100644
index 252d7eb..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/add_correction.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/att_req_obj.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/att_req_obj.gif
deleted file mode 100644
index a8c66d5..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/att_req_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/attribute_obj.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/attribute_obj.gif
deleted file mode 100644
index 79d49d0..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/attribute_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/cdatasection.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/cdatasection.gif
deleted file mode 100644
index 6b0872c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/cdatasection.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/choice.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/choice.gif
deleted file mode 100644
index d13ba2e..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/choice.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/comment_obj.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/comment_obj.gif
deleted file mode 100644
index 28c2ccb..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/comment_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/correction_change.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/correction_change.gif
deleted file mode 100644
index af83c52..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/correction_change.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/doctype.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/doctype.gif
deleted file mode 100644
index 3300f82..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/doctype.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/dtdfile.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/dtdfile.gif
deleted file mode 100644
index 3c0acad..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/dtdfile.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/element_obj.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/element_obj.gif
deleted file mode 100644
index 3567815..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/element_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/entity.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/entity.gif
deleted file mode 100644
index 61fd3d4..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/entity.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/entity_reference.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/entity_reference.gif
deleted file mode 100644
index 3af9149..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/entity_reference.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/enum.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/enum.gif
deleted file mode 100644
index 5c0a481..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/enum.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/error-overlay.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/error-overlay.gif
deleted file mode 100644
index 119dccc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/error-overlay.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/localvariable_obj.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/localvariable_obj.gif
deleted file mode 100644
index 3244b26..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/localvariable_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/notation.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/notation.gif
deleted file mode 100644
index 57ad089..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/notation.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/occurone_obj.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/occurone_obj.gif
deleted file mode 100644
index 7bb65c9..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/occurone_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/proinst_obj.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/proinst_obj.gif
deleted file mode 100644
index 74436d8..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/proinst_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-generic.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-generic.gif
deleted file mode 100644
index 65f516e..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-generic.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-macro.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-macro.gif
deleted file mode 100644
index 5d1f81b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-macro.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag_generic_deemphasized_obj.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag_generic_deemphasized_obj.gif
deleted file mode 100644
index cacb405..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag_generic_deemphasized_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag_generic_emphasized_obj.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag_generic_emphasized_obj.gif
deleted file mode 100644
index 45c1db4..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag_generic_emphasized_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/text.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/text.gif
deleted file mode 100644
index efa7a38..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/text.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/txtext.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/txtext.gif
deleted file mode 100644
index b226e41..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/txtext.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/warning_obj.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/warning_obj.gif
deleted file mode 100644
index 1e5f5eb..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/obj16/warning_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/error_ovr.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/error_ovr.gif
deleted file mode 100644
index 119dccc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/error_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/stale_error_ovr.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/stale_error_ovr.gif
deleted file mode 100644
index 5b0471b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/stale_error_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/warn_ovr.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/warn_ovr.gif
deleted file mode 100644
index c350704..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/warn_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/view16/attibute.gif b/bundles/org.eclipse.wst.xml.ui/icons/full/view16/attibute.gif
deleted file mode 100644
index 79d49d0..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/view16/attibute.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/full/wizban/generatexml_wiz.png b/bundles/org.eclipse.wst.xml.ui/icons/full/wizban/generatexml_wiz.png
deleted file mode 100644
index b17e48a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/full/wizban/generatexml_wiz.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/newSampleProject_wiz.gif b/bundles/org.eclipse.wst.xml.ui/icons/newSampleProject_wiz.gif
deleted file mode 100644
index dc96b10..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/newSampleProject_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/newSampleProject_wizbanner.png b/bundles/org.eclipse.wst.xml.ui/icons/newSampleProject_wizbanner.png
deleted file mode 100644
index be71474..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/newSampleProject_wizbanner.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/icons/xmldoc.gif b/bundles/org.eclipse.wst.xml.ui/icons/xmldoc.gif
deleted file mode 100644
index 14eb1be..0000000
--- a/bundles/org.eclipse.wst.xml.ui/icons/xmldoc.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/plugin.properties b/bundles/org.eclipse.wst.xml.ui/plugin.properties
deleted file mode 100644
index 8e2a32a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/plugin.properties
+++ /dev/null
@@ -1,134 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2008 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
-#     Jens Lukowski/Innoopract - initial renaming/restructuring
-#     David Carver / STAR Standards - added XML Catalog Import/Export Wizard
-#                                     bug 192568
-#     David Carver / STAR Standards - bug 212330 - migrate to org.eclipse.ui.menus 	
-###############################################################################
-providerName=Eclipse.org
-pluginName=XML UI Plugin
-XML.name=XML
-XML_Files.name=XML Files
-XML_Source.name=Editor
-XML_Templates.name=Templates
-XML_Styles.name=Styles
-XML_Syntax_Coloring=Syntax Coloring
-XML_Typing=Typing
-XML_Editor.name=XML Editor
-###############################################################################
-_UI_WIZARD_NEW_XML=XML
-_UI_WIZARD_XML_CATEGORY=XML
-genMenuLabel=&Generate
-_UI_ACTION_CREATE_XML=&XML File...
-_UI_CREATE_NEW_XML_FILE=Create a new XML file
-_UI_WIZARD_IMPORT_EXPORT_XMLCATALOG=XML Catalog
-_UI_IMPORT_XML_CATALOG_FILE=Import an existing XML Catalog.
-_UI_EXPORT_XML_CATALOG_FILE=Export an XML Catalog.
-XMLExample.name=Editing and validating XML files
-XMLExampleProjectCreationWizard.description=Create a project containing XML sample files
-XMLExampleProjectCreationWizard.projectname=XMLExamples
-XMLExampleProjectCreationWizard.pagetitle=XML sample files for editing and validating
-XMLExampleProjectCreationWizard.pagedescription=Create a project containing XML sample files.
-XMLExampleProjectCreationWizard.label=&Project Name:
-###############################################################################
-All_XML_context_type_Extension_Element.name=All XML
-XML_New_context_type_Extension_Element.name=New XML
-XML_Tag_context_type_Extension_Element.name=XML Tag
-XML_Attribute_context_type_Extension_Element.name=XML Attribute
-XML_Attribute_value_context_type_Extension_Element.name=XML Attribute value
-###############################################################################
-AddTask.label=Add &Task...
-AddTask.tooltip=Add Task...
-AddBookmark.label=Add Boo&kmark...
-AddBookmark.tooltip=Add Bookmark...
-SelectRuler.label=Select Ruler
-###############################################################################
-XML_Catalog_File_Type_Extension_Point.name=XML Catalog file type extension point
-_UI_PREF_XML_CATALOG=XML Catalog
-_UI_PREF_DTD_FILES=DTD Files
-_UI_PREF_XSD_FILES=XSD Files
-_UI_PREF_TAGLIB_DEF_FILES=Taglib Definition Files
-###############################################################################
-_UI_XML_VALIDATOR                   = XML Validator
-_UI_REF_FILE_SHOW_DETAILS           = Show Details...
-_UI_MENU_VALIDATE_XML               = Validate XML File
-##
-CleanupDocument_label=Cleanup Document...
-CleanupDocument_tooltip=Cleanup Document
-ToggleComment_label=Toggle Comment
-ToggleComment_tooltip=Toggle Comment
-AddBlockComment_label=Add Block Comment
-AddBlockComment_tooltip=Add Block Comment
-RemoveBlockComment_label=Remove Block Comment
-RemoveBlockComment_tooltip=Remove Block Comment
-FindOccurrences_label=Occurrences in File
-##
-preferenceKeywords.files=editor xml creating saving files suffix specified encoding iana
-preferenceKeywords.source=editor xml source formatting line width split multiple attributes new clear blank indent tabs spaces size content assist automatically suggestions prompt characters inserted strategy lax strict grammar constraints inferred absence dtd schema
-preferenceKeywords.templates=editor xml templates snippet macros
-preferenceKeywords.styles=editor xml style customize syntax highlighting type text content foreground background bold color
-preferenceKeywords.xmlcatalog=xml catalog entries
-preferenceKeywords.severities=xml grammar errors warnings ignore options severity severities suppress project specific projectspecific
-
-##
-XML_Source_target_name=XML Source
-XML_hyperlink=Tags And Attributes
-##
-DesignMenu_name=&Design
-ReloadDependencies_name=Reload Dependencies
-ReloadDependencies_description=Reload Dependencies
-ReloadDependencies_mnemonic=R
-Constraints_name=Turn off Grammar Constraints
-Constraints_description=Turn off grammar Constraints
-Constraints_mnemonic=T
-ExpandAll_name=Expand All
-CollapseAll_name=Collapse All
-ActionDefinition.nextSibling.name=Next Sibling
-ActionDefinition.nextSibling.description=Go to Next Sibling
-ActionDefinition.previousSibling.name=Previous Sibling
-ActionDefinition.previousSibling.description=Go to Previous Sibling
-ActionDefinition.gotoMatchingTag.name=Matching Tag
-ActionDefinition.gotoMatchingTag.description=Go to Matching Tag
-MatchingTagPreference.label=Matching Tags
-
-scope.structured.text.editor.xml.name=Editing XML Source
-scope.structured.text.editor.xml.description=Editing XML Source
-scope.structured.text.editor.xml.navigation.name=XML Source Navigation
-scope.structured.text.editor.xml.navigation.description=XML Source Navigation
-scope.structured.text.editor.xml.cleanup.name=XML Source Cleanup
-scope.structured.text.editor.xml.cleanup.description=XML Source Cleanup
-scope.structured.text.editor.xml.comments.name=XML Source Comments
-scope.structured.text.editor.xml.comments.description=XML Source Comments
-scope.structured.text.editor.xml.selection.name=XML Source Selection
-scope.structured.text.editor.xml.selection.description=XML Source Selection
-scope.structured.text.editor.xml.dependencies.name=XML Source Dependencies
-scope.structured.text.editor.xml.dependencies.description=XML Source Dependencies
-scope.structured.text.editor.xml.grammar.name=XML Source Grammar
-scope.structured.text.editor.xml.grammar.description=XML Source Grammar
-scope.structured.text.editor.xml.expand.name=XML Source Expand/Collapse
-scope.structured.text.editor.xml.expand.description=XML Source Expand/Collapse
-scope.structured.text.editor.xml.occurrences.name=XML Source Occurrences
-scope.structured.text.editor.xml.occurrences.description=XML Source Occurrences
-
-Colors.tagAttributeName=Tag Attribute Name
-Colors.tagAttributeValue=Tag Attribute Value
-Colors.commentBorder=Comment Border
-Colors.commentText=Comment Text
-Colors.declBorder=Declaration Border
-Colors.doctypeName=Doctype Name
-Colors.doctypeExternalPubref=Doctype External Public Reference
-Colors.doctypeExternalId=Doctype External Id
-Colors.doctypeExtrenalSysref=Doctype External System Reference
-Colors.tagBorder=Tag Border
-Colors.tagName=Tag Name
-Colors.piBorder=Processing Instruction Border
-Colors.cdataBorder=CDATA Border
-Colors.cdataText=CDATA Text
-Colors.entityReference=Entity Reference
diff --git a/bundles/org.eclipse.wst.xml.ui/plugin.xml b/bundles/org.eclipse.wst.xml.ui/plugin.xml
deleted file mode 100644
index cc053a2..0000000
--- a/bundles/org.eclipse.wst.xml.ui/plugin.xml
+++ /dev/null
@@ -1,1519 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.3"?>
-<plugin>
-
-	<extension-point id="catalogFileType" name="%XML_Catalog_File_Type_Extension_Point.name" schema="schema/catalogFileType.exsd"/>
-
-	<extension point="org.eclipse.wst.xml.ui.catalogFileType">
-		<fileType
-			extensions="dtd, ent, mod"
-			description="%_UI_PREF_DTD_FILES"
-			id="org.eclipse.wst.xml.core.ui.catalogFileType.dtd">
-		</fileType>
-		<fileType
-			extensions="xsd"
-			description="%_UI_PREF_XSD_FILES"
-			id="org.eclipse.wst.xml.core.ui.catalogFileType.xsd">
-		</fileType>
-		<fileType
-			extensions="tld"
-			description="%_UI_PREF_TAGLIB_DEF_FILES"
-			id="org.eclipse.wst.xml.core.ui.catalogFileType.tld">
-		</fileType>
-	</extension>
-
-	<!--The org.eclipse.wst.xml.core.xmlsource content type is only for
-		handling some special cases of ill-formed xml in a reasonable
-		manner, and should not be emulated by clients. The two content
-		types are often used interchangeably by the XML component, but
-		please use org.eclipse.core.runtime.xml instead. -->
-	<extension point="org.eclipse.wst.sse.ui.editorConfiguration">
-		<sourceViewerConfiguration
-			class="org.eclipse.wst.xml.ui.StructuredTextViewerConfigurationXML"
-			target="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource" />
-		<contentOutlineConfiguration
-			class="org.eclipse.wst.xml.ui.views.contentoutline.XMLContentOutlineConfiguration"
-			target="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource" />
-		<propertySheetConfiguration
-			class="org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConfiguration"
-			target="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource" />
-		<documentationTextHover
-        	class="org.eclipse.wst.xml.ui.internal.taginfo.XMLTagInfoHoverProcessor"
-        	target="org.eclipse.wst.xml.XML_DEFAULT">
-  		</documentationTextHover>
-  		<doubleClickStrategy
-        	class="org.eclipse.wst.xml.ui.internal.doubleclick.XMLDoubleClickStrategy"
-        	target="org.eclipse.wst.xml.XML_DEFAULT">
-  		</doubleClickStrategy>
-		<provisionalConfiguration
-			type="sourceeditingtexttools"
-			class="org.eclipse.wst.xml.ui.internal.provisional.XMLSourceEditingTextTools"
-			target="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource" />
-		<provisionalConfiguration
-			type="characterpairmatcher"
-			class="org.eclipse.wst.xml.ui.internal.text.XMLDocumentRegionEdgeMatcher"
-			target="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource" />
-		<provisionalConfiguration
-			type="structuredtextfoldingprovider"
-			class="org.eclipse.wst.xml.ui.internal.projection.StructuredTextFoldingProviderXML"
-			target="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource" />
-		<provisionalConfiguration
-			type="org.eclipse.jface.text.quickassist.IQuickAssistProcessor"
-			class="org.eclipse.wst.xml.ui.internal.correction.XMLQuickAssistProcessor"
-			target="org.eclipse.wst.xml.XML_DEFAULT" />
-		<provisionalConfiguration
-			type="autoeditstrategy"
-			class="org.eclipse.wst.xml.ui.internal.autoedit.StructuredAutoEditStrategyXML"
-			target="org.eclipse.wst.xml.XML_DEFAULT" />
-		<provisionalDefinition
-			type="preferencepages"
-			value="org.eclipse.wst.xml.ui.preferences.xml.xml, org.eclipse.wst.sse.ui.preferences.xml.source, org.eclipse.wst.sse.ui.preferences.xml.templates, org.eclipse.wst.sse.ui.preferences.xml.colors"
-			target="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource" />
-		<provisionalDefinition
-			type="spellingregions"
-			value="XML_COMMENT_TEXT, XML_CONTENT, XML_DEFAULT"
-			target="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.core.xmlsource" />
-		<provisionalDefinition
-			type="activecontexts"
-			value="org.eclipse.core.runtime.xml, org.eclipse.wst.xml.navigation, org.eclipse.wst.xml.cleanup, org.eclipse.wst.xml.comments, org.eclipse.wst.xml.selection, org.eclipse.wst.xml.dependencies, org.eclipse.wst.xml.grammar, org.eclipse.wst.xml.expand, org.eclipse.wst.xml.occurrences"
-        	target="org.eclipse.core.runtime.xml" />
-	</extension>
-	
-	<extension point="org.eclipse.ui.contexts">
-		<context
-			name="%scope.structured.text.editor.xml.name"
-			parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			description="%scope.structured.text.editor.xml.description"
-			id="org.eclipse.core.runtime.xml">
-		</context>
-		<context
-			name="%scope.structured.text.editor.xml.navigation.name"
-			parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			description="%scope.structured.text.editor.xml.navigation.description"
-			id="org.eclipse.wst.xml.navigation">
-		</context>
-		<context
-			name="%scope.structured.text.editor.xml.cleanup.name"
-			parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			description="%scope.structured.text.editor.xml.cleanup.description"
-			id="org.eclipse.wst.xml.cleanup">
-		</context>
-		<context
-			name="%scope.structured.text.editor.xml.comments.name"
-			parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			description="%scope.structured.text.editor.xml.comments.description"
-			id="org.eclipse.wst.xml.comments">
-		</context>
-		<context
-			name="%scope.structured.text.editor.xml.selection.name"
-			parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			description="%scope.structured.text.editor.xml.selection.description"
-			id="org.eclipse.wst.xml.selection">
-		</context>
-		<context
-			name="%scope.structured.text.editor.xml.dependencies.name"
-			parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			description="%scope.structured.text.editor.xml.dependencies.description"
-			id="org.eclipse.wst.xml.dependencies">
-		</context>
-		<context
-			name="%scope.structured.text.editor.xml.grammar.name"
-			parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			description="%scope.structured.text.editor.xml.grammar.description"
-			id="org.eclipse.wst.xml.grammar">
-		</context>
-		<context
-			name="%scope.structured.text.editor.xml.expand.name"
-			parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			description="%scope.structured.text.editor.xml.expand.description"
-			id="org.eclipse.wst.xml.expand">
-		</context>
-		<context
-			name="%scope.structured.text.editor.xml.occurrences.name"
-			parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			description="%scope.structured.text.editor.xml.occurrences.description"
-			id="org.eclipse.wst.xml.occurrences">
-		</context>
-	</extension>
-	
-	<extension
-		point="org.eclipse.core.filebuffers.annotationModelCreation">
-		<factory
-			contentTypeId="org.eclipse.core.runtime.xml"
-			class="org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModelFactory" />
-		<factory
-			contentTypeId="org.eclipse.wst.xml.core.xmlsource"
-			class="org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModelFactory" />
-	</extension>
-	<extension
-		point="org.eclipse.wst.sse.ui.adapterFactoryDescription">
-		<adapterFactoryDescription
-			class="org.eclipse.wst.xml.ui.internal.registry.AdapterFactoryProviderForXML">
-			<contentType id="org.eclipse.core.runtime.xml" />
-			<contentType id="org.eclipse.wst.xml.core.xmlsource" />
-		</adapterFactoryDescription>
-	</extension>
-	<extension point="org.eclipse.ui.preferencePages">
-		<!-- The "top-level" XML category -->
-		<page
-			name="%XML.name"
-			class="org.eclipse.wst.xml.ui.internal.preferences.EmptyFilePreferencePage"
-			id="org.eclipse.wst.xml.ui.preferences.xml">
-		</page>
-		<!-- The "lower level" XML Files category/page -->
-		<page
-			name="%XML_Files.name"
-			category="org.eclipse.wst.xml.ui.preferences.xml"
-			class="org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage"
-			id="org.eclipse.wst.xml.ui.preferences.xml.xml">
-         	<keywordReference id="org.eclipse.wst.xml.ui.files"/>
-         	<keywordReference id="org.eclipse.wst.xml.ui.severities"/>
-        </page>
-		<!-- XML PREFERENCE PAGES -->
-		<page
-			name="%XML_Source.name"
-			category="org.eclipse.wst.xml.ui.preferences.xml.xml"
-			class="org.eclipse.wst.xml.ui.internal.preferences.XMLSourcePreferencePage"
-			id="org.eclipse.wst.sse.ui.preferences.xml.source">
-         	<keywordReference id="org.eclipse.wst.xml.ui.source"/>
-		</page>
-		<page
-			name="%XML_Templates.name"
-			category="org.eclipse.wst.sse.ui.preferences.xml.source"
-			class="org.eclipse.wst.xml.ui.internal.preferences.XMLTemplatePreferencePage"
-			id="org.eclipse.wst.sse.ui.preferences.xml.templates">
-         	<keywordReference id="org.eclipse.wst.xml.ui.templates"/>
-		</page>
-		<page
-			name="%XML_Syntax_Coloring"
-			category="org.eclipse.wst.sse.ui.preferences.xml.source"
-			class="org.eclipse.wst.xml.ui.internal.preferences.XMLSyntaxColoringPage"
-			id="org.eclipse.wst.sse.ui.preferences.xml.colors">
-         	<keywordReference id="org.eclipse.wst.xml.ui.styles"/>
-		</page>
-		<page
-			name="%_UI_PREF_XML_CATALOG"
-			category="org.eclipse.wst.xml.ui.preferences.xml"
-			class="org.eclipse.wst.xml.ui.internal.catalog.XMLCatalogPreferencePage"
-			id="org.eclipse.wst.xml.core.ui.XMLCatalogPreferencePage">
-         	<keywordReference id="org.eclipse.wst.xml.ui.xmlcatalog"/>
-		</page>
-		<page
-			name="%XML_Typing"
-			category="org.eclipse.wst.sse.ui.preferences.xml.source"
-			class="org.eclipse.wst.xml.ui.internal.preferences.XMLTypingPreferencePage"
-			id="org.eclipse.wst.sse.ui.preferences.xml.typing">
-		</page>
-	</extension>
-	
-	<!-- Keywords for preference and properties pages -->
-	<extension point="org.eclipse.ui.keywords">
-		<keyword
-			label="%preferenceKeywords.files"
-			id="org.eclipse.wst.xml.ui.files"/>
-		<keyword
-			label="%preferenceKeywords.source"
-			id="org.eclipse.wst.xml.ui.source"/>
-		<keyword
-			label="%preferenceKeywords.templates"
-			id="org.eclipse.wst.xml.ui.templates"/>
-		<keyword
-			label="%preferenceKeywords.styles"
-			id="org.eclipse.wst.xml.ui.styles"/>
-		<keyword
-			label="%preferenceKeywords.xmlcatalog"
-			id="org.eclipse.wst.xml.ui.xmlcatalog"/>
-		<keyword
-			label="%preferenceKeywords.severities"
-			id="org.eclipse.wst.xml.ui.severities"/>
-    </extension>
-	
-	<!-- Editor actionsets -->
-	<extension point="org.eclipse.ui.actionSetPartAssociations">
-		<actionSetPartAssociation
-			targetID="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
-			<part id="org.eclipse.core.runtime.xml.source"></part>
-			<part id="org.eclipse.core.runtime.xml.source2"></part>
-		</actionSetPartAssociation>
-		<actionSetPartAssociation
-			targetID="org.eclipse.ui.NavigateActionSet">
-			<part id="org.eclipse.core.runtime.xml.source"></part>
-			<part id="org.eclipse.core.runtime.xml.source2"></part>
-		</actionSetPartAssociation>
-	</extension>
-
-	<!-- Templates -->
-	<extension point="org.eclipse.ui.editors.templates">
-		<contextType
-			name="%All_XML_context_type_Extension_Element.name"
-			class="org.eclipse.wst.xml.ui.internal.templates.TemplateContextTypeXML"
-			id="xml_all">
-		</contextType>
-		<contextType
-			name="%XML_New_context_type_Extension_Element.name"
-			class="org.eclipse.wst.xml.ui.internal.templates.TemplateContextTypeXML"
-			id="xml_new">
-		</contextType>
-		<contextType
-			name="%XML_Tag_context_type_Extension_Element.name"
-			class="org.eclipse.wst.xml.ui.internal.templates.TemplateContextTypeXML"
-			id="xml_tag">
-		</contextType>
-		<contextType
-			name="%XML_Attribute_context_type_Extension_Element.name"
-			class="org.eclipse.wst.xml.ui.internal.templates.TemplateContextTypeXML"
-			id="xml_attribute">
-		</contextType>
-		<contextType
-			name="%XML_Attribute_value_context_type_Extension_Element.name"
-			class="org.eclipse.wst.xml.ui.internal.templates.TemplateContextTypeXML"
-			id="xml_attribute_value">
-		</contextType>
-		<include
-			file="templates/xmldefault-templates.xml"
-			translations="$nl$/templates/xmldefault-templates.properties">
-		</include>
-	</extension>
-
-	<extension point="org.eclipse.ui.editors">
-		<editor
-			name="%XML_Editor.name"
-			icon="$nl$/icons/xmldoc.gif"
-			contributorClass="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorActionBarContributor"
-			class="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart"
-			id="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart">
-			<contentTypeBinding
-				contentTypeId="org.eclipse.core.runtime.xml" />
-			<contentTypeBinding
-				contentTypeId="org.eclipse.wst.xml.core.xmlsource" />
-
-		</editor>
-	</extension>
-
-	<!-- Editor actionsets -->
-	<extension point="org.eclipse.ui.actionSetPartAssociations">
-		<actionSetPartAssociation
-			targetID="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
-			<part
-				id="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart">
-			</part>
-		</actionSetPartAssociation>
-		<actionSetPartAssociation
-			targetID="org.eclipse.ui.NavigateActionSet">
-			<part
-				id="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart">
-			</part>
-		</actionSetPartAssociation>
-	</extension>
-
-
-
-	<!-- ================================================== -->
-	<!-- Contribute a 'New Wizard' for XML files            -->
-	<!-- ================================================== -->
-	<extension point="org.eclipse.ui.newWizards">
-		<category
-			name="%_UI_WIZARD_XML_CATEGORY"
-			id="org.eclipse.wst.XMLCategory">
-		</category>
-		<wizard
-			name="%_UI_WIZARD_NEW_XML"
-			icon="$nl$/icons/XMLFile.gif"
-			category="org.eclipse.wst.XMLCategory"
-			class="org.eclipse.wst.xml.ui.internal.wizards.NewXMLWizard"
-			id="org.eclipse.wst.xml.ui.internal.wizards.NewXMLWizard">
-			<description>%_UI_CREATE_NEW_XML_FILE</description>
-			<selection class="org.eclipse.core.resources.IResource">
-			</selection>
-		</wizard>
-	</extension>
-
-	<!-- =============================================================================== -->
-	<!-- Allow the 'New XML' wizard to be accessed via the 'Generate' menu on a XSD file -->
-	<!-- =============================================================================== -->
-<!--
-	<extension point="org.eclipse.ui.popupMenus">
-		<objectContribution
-			objectClass="org.eclipse.core.resources.IFile"
-			nameFilter="*.xsd"
-			id="org.eclipse.wst.xmlwizard.createXMLFromXSD">
-			<menu
-				label="%genMenuLabel"
-				path="additions"
-				id="generateXMLArtifacts">
-				<separator name="xml" />
-			</menu>
-			<action
-				label="%_UI_ACTION_CREATE_XML"
-				class="org.eclipse.wst.xml.ui.internal.wizards.XMLImportActionDelegate"
-				menubarPath="generateXMLArtifacts/xml"
-				enablesFor="1"
-				id="org.eclipse.wst.xmlwizard.createXMLFromXSDAction">
-			</action>
-		</objectContribution>
-	</extension>
--->
-
-	<!-- =============================================================================== -->
-	<!-- Allow the 'New XML' wizard to be accessed via the 'Generate' menu on a DTD file -->
-	<!-- =============================================================================== -->
-<!--	
-	<extension point="org.eclipse.ui.popupMenus">
-		<objectContribution
-			objectClass="org.eclipse.core.resources.IFile"
-			nameFilter="*.dtd"
-			id="org.eclipse.wst.xmlwizard.createXMLFromDTD">
-			<menu
-				label="%genMenuLabel"
-				path="additions"
-				id="generateXMLArtifacts">
-				<separator name="xml" />
-			</menu>
-			<action
-				label="%_UI_ACTION_CREATE_XML"
-				class="org.eclipse.wst.xml.ui.internal.wizards.XMLImportActionDelegate"
-				menubarPath="generateXMLArtifacts/xml"
-				enablesFor="1"
-				id="org.eclipse.wst.xmlwizard.createXMLFromDTDAction">
-			</action>
-		</objectContribution>
-	</extension>
--->
-
-	<!-- =============================================================================== -->
-	<!-- Contribute a New->Example... entry for Editing and Validating XML files         -->
-	<!-- =============================================================================== -->
-
-	<!-- define the XMLSamples project wizard -->
-	<extension point="org.eclipse.ui.newWizards">
-		<category
-			name="%_UI_WIZARD_NEW_XML"
-			parentCategory="org.eclipse.ui.Examples"
-			id="org.eclipse.wst.xml.examples">
-		</category>
-		<wizard
-			name="%XMLExample.name"
-			class="org.eclipse.wst.xml.ui.internal.wizards.ExampleProjectCreationWizard"
-			category="org.eclipse.ui.Examples/org.eclipse.wst.xml.examples"
-			id="org.eclipse.wst.xml.ui.XMLExampleProjectCreationWizard"
-			project="true"
-			icon="$nl$/icons/newSampleProject_wiz.gif">
-			<description>
-				%XMLExampleProjectCreationWizard.description
-			</description>
-		</wizard>
-	</extension>
-
-	<!-- configure the XMLSamples project wizard -->
-	<extension
-		point="org.eclipse.wst.common.ui.exampleProjectCreationWizard"
-		id="XMLExampleProjectCreationWizardExtension">
-		<wizard
-			id="org.eclipse.wst.xml.ui.XMLExampleProjectCreationWizard"
-			banner="icons/newSampleProject_wizbanner.png">
-			<projectsetup
-				pagetitle="%XMLExampleProjectCreationWizard.pagetitle"
-				name="%XMLExampleProjectCreationWizard.projectname"
-				label="%XMLExampleProjectCreationWizard.label"
-				pagedescription="%XMLExampleProjectCreationWizard.pagedescription"
-				open="readme.html">
-				<import
-					dest=""
-					src="examples/EditingAndValidatingXML.zip" />
-			</projectsetup>
-		</wizard>
-	</extension>
-
-	<!-- initialize xml ui preferences -->
-	<extension point="org.eclipse.core.runtime.preferences">
-		<initializer
-			class="org.eclipse.wst.xml.ui.internal.preferences.XMLUIPreferenceInitializer" />
-	</extension>
-
-	<extension point="org.eclipse.wst.sse.ui.sourcevalidation">
-		<validator
-			scope="total"
-			class="org.eclipse.wst.xml.ui.internal.validation.DelegatingSourceValidatorForXML"
-			id="org.eclipse.wst.xml.ui.internal.validation.DelegatingSourceValidatorForXML">
-			<contentTypeIdentifier id="org.eclipse.core.runtime.xml">
-				<partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
-				<partitionType id="org.eclipse.wst.sse.ST_DEFAULT"/>
-			</contentTypeIdentifier>
-			<contentTypeIdentifier id="org.eclipse.wst.xml.core.xmlsource">
-				<partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
-				<partitionType id="org.eclipse.wst.sse.ST_DEFAULT"/>
-			</contentTypeIdentifier>
-		</validator>
-	</extension>
-	
-	<extension point="org.eclipse.wst.sse.ui.sourcevalidation">
-		<validator
-			scope="partial"
-			class="org.eclipse.wst.xml.ui.internal.validation.MarkupValidator"
-			id="org.eclipse.wst.xml.ui.internal.validation.markupvalidator">
-			<contentTypeIdentifier id="org.eclipse.core.runtime.xml">
-				<partitionType id="org.eclipse.wst.sse.ST_DEFAULT"/>
-				<partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
-			</contentTypeIdentifier>
-			<contentTypeIdentifier id="org.eclipse.wst.xml.core.xmlsource">
-				<partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
-				<partitionType id="org.eclipse.wst.sse.ST_DEFAULT"/>
-			</contentTypeIdentifier>
-		</validator>
-	</extension>
-	
-   <extension point="org.eclipse.ui.editors.annotationTypes">
-      <type name="org.eclipse.wst.xml.ui.matching.tag"/>
-   </extension>
-   <extension point="org.eclipse.ui.editors.markerAnnotationSpecification">
-      <specification
-      		includeOnPreferencePage="true"
-            colorPreferenceValue="212,212,212"
-            annotationType="org.eclipse.wst.xml.ui.matching.tag"
-            colorPreferenceKey="matchingTagIndicationColor"
-            presentationLayer="4"
-            label="%MatchingTagPreference.label"
-            icon="icons/full/obj16/tag-generic.gif"
-            textPreferenceValue="false"
-            textPreferenceKey="matchingTagIndication"
-            highlightPreferenceKey="matchingTagHighlight"
-            highlightPreferenceValue="true"
-            verticalRulerPreferenceKey="matchingTagVerticalRuler"
-            verticalRulerPreferenceValue="false"
-            overviewRulerPreferenceKey="matchingTagIndicationInOverviewRuler"
-            overviewRulerPreferenceValue="true"
-            textStylePreferenceKey="matchingTagTextStyle"
-			textStylePreferenceValue="NONE">
-      </specification>
-   </extension>
-
-	<!--======================================================================================-->
-	<!-- Document provider for ExternalFileEditorInput                                        -->
-	<!--======================================================================================-->
-	<extension point="org.eclipse.ui.editors.documentProviders">
-		<provider
-			inputTypes="org.eclipse.wst.xml.ui.internal.hyperlink.ExternalFileEditorInput"
-			class="org.eclipse.ui.editors.text.TextFileDocumentProvider"
-			id="org.eclipse.wst.xml.ui.internal.ExternalFileDocumentProvider">
-		</provider>
-	</extension>
-
-	<!-- To Do: migrate this to the org.eclipse.ui.menus popup: format -->
-	<extension point="org.eclipse.ui.popupMenus">
-		<viewerContribution
-			targetID="org.eclipse.core.runtime.xml.source.RulerContext"
-			id="org.eclipse.ui.texteditor.ruler.context.actions">
-			<action
-				label="%AddTask.label"
-				helpContextId="org.eclipse.ui.AddTask_action_context"
-				class="org.eclipse.ui.texteditor.TaskRulerAction"
-				tooltip="%AddTask.tooltip"
-				menubarPath="additions"
-				id="org.eclipse.ui.texteditor.TaskRulerAction">
-			</action>
-			<action
-				label="%AddBookmark.label"
-				helpContextId="org.eclipse.ui.bookmark_action_context"
-				class="org.eclipse.ui.texteditor.BookmarkRulerAction"
-				tooltip="%AddBookmark.tooltip"
-				menubarPath="additions"
-				id="org.eclipse.ui.texteditor.BookmarkRulerAction">
-			</action>
-		</viewerContribution>
-	</extension>
-
-	<!--======================================================================================-->
-	<!-- Pop-up menu and associated command/handler for nested validation messages.           -->
-	<!--======================================================================================-->
-
-	<extension point="org.eclipse.ui.menus">
-      <menuContribution locationURI="popup:org.eclipse.ui.ide.MarkersView">
-          <command commandId="org.eclipse.wst.xml.ui.referencedFileErrors">
-             <visibleWhen checkEnabled="false">
-				<reference definitionId="org.eclipse.wst.xml.ui.referencedFileErrors" />
-             </visibleWhen>
-         </command>
-      </menuContribution>
-	</extension>
-	
-	<extension point="org.eclipse.ui.commands">
-		<command
-			description="%_UI_REF_FILE_SHOW_DETAILS"
-			id="org.eclipse.wst.xml.ui.referencedFileErrors" 
-			name="%_UI_REF_FILE_SHOW_DETAILS" />
-	</extension>
-	
-    <extension point="org.eclipse.ui.handlers">
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.validation.core.errorinfo.ReferencedFileErrorsHandler"
-             commandId="org.eclipse.wst.xml.ui.referencedFileErrors">
-             <enabledWhen>
-				<reference definitionId="org.eclipse.wst.xml.ui.referencedFileErrors" />
-             </enabledWhen>
-       </handler>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.propertyTesters">
-	   <propertyTester
-	         class="org.eclipse.wst.xml.ui.internal.validation.core.errorinfo.GroupNamePropertyTester"
-	         id="org.eclipse.wst.xml.ui.markerGroupNamePropertyTester"
-	         namespace="org.eclipse.wst.xml.ui"
-	         properties="groupNamePrefix"
-	         type="org.eclipse.core.resources.IMarker">
-	   </propertyTester>
-	</extension>
-	 
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.referencedFileErrors">
-                <and>
-                   <count value="1" />
-                   <with variable="selection">
-                   		<iterate operator="or">
-                      		<adapt type="org.eclipse.core.resources.IMarker">
-                            	<test property="org.eclipse.wst.xml.ui.groupNamePrefix" value="referencedFileError" forcePluginActivation="true" />
-                      		</adapt>
-                   		</iterate>
-                	</with>
-                </and>
-		</definition>
-	</extension>	 
-
-<!--	
-	<extension point="org.eclipse.ui.editorActions">
-		<editorContribution
-			id="org.eclipse.core.runtime.xml.source.editorActions"
-			targetID="org.eclipse.core.runtime.xml.source">
-			<action
-				id="CleanupDocument"
-				label="%CleanupDocument_label"
-				definitionId="org.eclipse.wst.sse.ui.cleanup.document"
-				tooltip="%CleanupDocument_tooltip"
-				class="org.eclipse.wst.xml.ui.internal.actions.CleanupActionXMLDelegate"
-				actionID="CleanupDocument">
-			</action>
-			<action
-				id="ToggleComment"
-				label="%ToggleComment_label"
-				definitionId="org.eclipse.wst.sse.ui.toggle.comment"
-				tooltip="%ToggleComment_tooltip"
-				class="org.eclipse.wst.xml.ui.internal.actions.ToggleCommentActionXMLDelegate"
-				actionID="ToggleComment">
-			</action>
-			<action
-				id="AddBlockComment"
-				label="%AddBlockComment_label"
-				definitionId="org.eclipse.wst.sse.ui.add.block.comment"
-				tooltip="%AddBlockComment_tooltip"
-				class="org.eclipse.wst.xml.ui.internal.actions.AddBlockCommentActionXMLDelegate"
-				actionID="AddBlockComment">
-			</action>
-			<action
-				id="RemoveBlockComment"
-				label="%RemoveBlockComment_label"
-				definitionId="org.eclipse.wst.sse.ui.remove.block.comment"
-				tooltip="%RemoveBlockComment_tooltip"
-				class="org.eclipse.wst.xml.ui.internal.actions.RemoveBlockCommentActionXMLDelegate"
-				actionID="RemoveBlockComment">
-			</action>
-			<action
-				id="FindOccurrences"
-				label="%FindOccurrences_label"
-				definitionId="org.eclipse.wst.sse.ui.search.find.occurrences"
-				class="org.eclipse.wst.xml.ui.internal.search.XMLFindOccurrencesActionDelegate"
-				actionID="FindOccurrences">
-			</action>
-			<action
-				id="StructureSelectEnclosing"
-				label="%StructureSelectEnclosing_label"
-				definitionId="org.eclipse.wst.sse.ui.structure.select.enclosing"
-				tooltip="%StructureSelectEnclosing_tooltip"
-				class="org.eclipse.wst.xml.ui.internal.selection.StructuredSelectEnclosingXMLActionDelegate"
-				actionID="StructureSelectEnclosing">
-			</action>
-			<action
-				id="StructureSelectNext"
-				label="%StructureSelectNext_label"
-				definitionId="org.eclipse.wst.sse.ui.structure.select.next"
-				tooltip="%StructureSelectNext_tooltip"
-				class="org.eclipse.wst.xml.ui.internal.selection.StructuredSelectNextXMLActionDelegate"
-				actionID="StructureSelectNext">
-			</action>
-			<action
-				id="StructureSelectPrevious"
-				label="%StructureSelectPrevious_label"
-				definitionId="org.eclipse.wst.sse.ui.structure.select.previous"
-				tooltip="%StructureSelectPrevious_tooltip"
-				class="org.eclipse.wst.xml.ui.internal.selection.StructuredSelectPreviousXMLActionDelegate"
-				actionID="StructureSelectPrevious">
-			</action>
-			<action
-				id="StructureSelectHistory"
-				label="%StructureSelectHistory_label"
-				definitionId="org.eclipse.wst.sse.ui.structure.select.last"
-				tooltip="%StructureSelectHistory_tooltip"
-				class="org.eclipse.wst.sse.ui.internal.selection.StructuredSelectHistoryActionDelegate"
-				actionID="StructureSelectHistory">
-			</action>
-		</editorContribution>
-        <editorContribution
-            targetID="org.eclipse.core.runtime.xml.source"
-            id="org.eclipse.core.runtime.xml.source.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.workbench.texteditor.hyperlinkDetectorTargets">
-		<target
-			id="org.eclipse.core.runtime.xml"
-			name="%XML_Source_target_name">
-		</target>
-	</extension>
-	<extension
-		point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
-		<hyperlinkDetector
-			class="org.eclipse.wst.xml.ui.internal.hyperlink.XMLHyperlinkDetector"
-			id="org.eclipse.wst.xml.ui.internal.hyperlink.XMLHyperlinkDetector"
-			name="%XML_hyperlink"
-			targetId="org.eclipse.core.runtime.xml">
-		</hyperlinkDetector>
-   </extension>
- <extension
-       point="org.eclipse.ui.importWizards">
-    <category
-          id="org.eclipse.wst.XMLCategory"
-          name="%_UI_WIZARD_NEW_XML">
-    </category>
-    <wizard
-          category="org.eclipse.wst.XMLCategory"
-          class="org.eclipse.wst.xml.ui.internal.wizards.ImportXMLCatalogWizard"
-          icon="icons/xmldoc.gif"
-          id="org.eclipse.wst.xml.ui.internal.wizards.ImportXMLCatalogWizard"
-          name="%_UI_WIZARD_IMPORT_EXPORT_XMLCATALOG">
-       <description>
-          %_UI_IMPORT_XML_CATALOG_FILE
-       </description>
-    </wizard>
- </extension>
- <extension
-       point="org.eclipse.ui.exportWizards">
-    <category
-          id="org.eclipse.wst.XMLCategory"
-          name="%_UI_WIZARD_NEW_XML">
-    </category>
-    <wizard
-          category="org.eclipse.wst.XMLCategory"
-          class="org.eclipse.wst.xml.ui.internal.wizards.ExportXMLCatalogWizard"
-          icon="icons/xmldoc.gif"
-          id="org.eclipse.wst.xml.ui.internal.wizards.ExportXMLCatalogWizard"
-          name="%_UI_WIZARD_IMPORT_EXPORT_XMLCATALOG">
-       <description>
-          %_UI_EXPORT_XML_CATALOG_FILE
-       </description>
-    </wizard>
- </extension>
-
-	<extension point="org.eclipse.ui.commands">
-		<!-- Navigate commands -->
-		<command
-			name="%ActionDefinition.nextSibling.name"
-			description="%ActionDefinition.nextSibling.description"
-			categoryId="org.eclipse.ui.category.edit"
-			id="org.eclipse.wst.xml.ui.nextSibling">
-		</command>
-		<command
-			name="%ActionDefinition.previousSibling.name"
-			description="%ActionDefinition.previousSibling.description"
-			categoryId="org.eclipse.ui.category.edit"
-			id="org.eclipse.wst.xml.ui.previousSibling">
-		</command>
-		<command
-			name="%ActionDefinition.gotoMatchingTag.name"
-			description="%ActionDefinition.gotoMatchingTag.description"
-			categoryId="org.eclipse.ui.category.edit"
-			id="org.eclipse.wst.xml.ui.gotoMatchingTag">
-		</command>
-	</extension>
-
-	<extension point="org.eclipse.ui.bindings">
-      <!--  win32:  M1=CTRL,    M2=SHIFT, M3=ALT, M4=-
-            carbon: M1=COMMAND, M2=SHIFT, M3=ALT, M4=CTRL
-            gtk: ? 
-      -->
-      <!-- Navigate commands -->
-		<key
-			sequence="M1+M2+ARROW_UP"
-			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			commandId="org.eclipse.wst.xml.ui.previousSibling"
-			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
-		<key
-			platform="carbon"
-			sequence="CTRL+SHIFT+ARROW_UP"
-			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			commandId="org.eclipse.wst.xml.ui.previousSibling"
-			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
-		<key
-			sequence="M1+M2+ARROW_DOWN"
-			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			commandId="org.eclipse.wst.xml.ui.nextSibling"
-			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
-		<key
-			platform="carbon"
-			sequence="CTRL+SHIFT+ARROW_DOWN"
-			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			commandId="org.eclipse.wst.xml.ui.nextSibling"
-			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
-		<key
-			sequence="M1+M2+&gt;"
-			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			commandId="org.eclipse.wst.xml.ui.gotoMatchingTag"
-			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
-		<key
-			platform="carbon"
-			sequence="CTRL+SHIFT+."
-			contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
-			commandId="org.eclipse.wst.xml.ui.gotoMatchingTag"
-			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
-			
-	</extension>
-	
-<!--
-   This section contains the new org.eclipse.ui.menus extions points and command handler
-   definitions.
- -->
- 
-	<extension point="org.eclipse.ui.menus">
-		<!-- Unable to contribute to Search menu at the moment due to bug 213385 -->
-<!--
-		<menuContribution locationURI="menu:org.eclipse.search.menu">
--->
-	    <menuContribution locationURI="menu:goTo?after=matchingEnd">
-<!--		
-	       <command commandId="org.eclipse.wst.xml.ui.gotoMatchingTag" id="GoToMatchingTag" label="%GoToMatchingTag_label" style="push">
-			   <visibleWhen checkEnabled="false">
-				   <reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"></reference>
-			   </visibleWhen>
-	       </command>
--->		
-	       <separator name="goToSiblingsBegin" visible="true"></separator>
-	       <command commandId="org.eclipse.wst.xml.ui.nextSibling" id="GoToNextSibling" label="%ActionDefinition.nextSibling.name" style="push">
-			   <visibleWhen checkEnabled="false">
-					<reference definitionId="org.eclipse.wst.xml.ui.navigation"></reference>
-				</visibleWhen>
-	       </command>
-	       <command commandId="org.eclipse.wst.xml.ui.previousSibling" id="GoToPreviousSibling" label="%ActionDefinition.previousSibling.name" style="push">
-			   <visibleWhen checkEnabled="false">
-					<reference definitionId="org.eclipse.wst.xml.ui.navigation"></reference>
-				</visibleWhen>
-	       </command>
-	       <separator name="goToSiblingsEnd" visible="false"></separator>
-		</menuContribution>
-       <menuContribution
-           locationURI="menu:org.eclipse.ui.main.menu?before=window">
-        <menu
-              id="org.eclipse.wst.xml.ui.designMenuId"
-              label="%DesignMenu_name">
-           <separator
-                 name="designStart">
-           </separator>
-           <command
-                 commandId="org.eclipse.wst.xml.ui.disable.grammar.constraints"
-                 icon="icons/full/etool16/constrainon.gif"
-                 id="ToggleGrammarConstraints"
-                 mnemonic="%Constraints_mnemonic"
-                 style="push">
-                 <visibleWhen checkEnabled="false">
-                	 <and>
-                       <reference definitionId="org.eclipse.wst.xml.ui.grammar"/>
-                       <not>
-                         <reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"/>
-                       </not>
-                    </and>
-                 </visibleWhen>
-           </command>
-           <command
-                 commandId="org.eclipse.wst.xml.ui.reload.dependecies"
-                 icon="icons/full/etool16/rldgrmr.gif"
-                 id="ReloadDependencies"
-                 mnemonic="%ReloadDependencies_mnemonic"
-                 style="push">
-                 <visibleWhen checkEnabled="false">
-                	<and>
-                       <reference definitionId="org.eclipse.wst.xml.ui.dependencies"/>
-                       <not>
-                         <reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"/>
-                       </not>
-                    </and>
-                 </visibleWhen>
-           </command>
-           <separator
-                 name="expand"
-                 visible="true">
-           </separator>
-           
-           <command
-                 commandId="sed.tabletree.expandAll"
-                 icon="icons/full/etool16/expand_all.gif"
-                 id="ExpandAll"
-                 style="push">
-                 <visibleWhen checkEnabled="false">
-                    <and>
-                       <reference definitionId="org.eclipse.wst.xml.ui.expand"/>
-                       <not>
-                         <reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"/>
-                       </not>
-                    </and>
-                 </visibleWhen>
-           </command>
-           <command
-                 commandId="sed.tabletree.collapseAll"
-                 icon="icons/full/etool16/collapse_all.gif"
-                 id="CollapseAll"
-                 style="push">
-                 <visibleWhen checkEnabled="false">
-                    <and>
-                       <reference definitionId="org.eclipse.wst.xml.ui.expand"/>
-                       <not>
-                         <reference definitionId="org.eclipse.wst.sse.ui.sseActiveContext.definition"/>
-                       </not>
-                    </and>
-                 </visibleWhen>
-           </command>
-           
-           <separator
-                 name="additions"
-                 visible="true">
-           </separator>
-           <separator
-                 name="designEnd"
-                 visible="false">
-           </separator>
-        </menu>
-     </menuContribution>
-     <menuContribution locationURI="menu:edit?after=additions">
-		<command commandId="org.eclipse.ui.edit.text.contentAssist.proposals" id="XMLContentAssist" style="push">
-		   <visibleWhen checkEnabled="false">
-				<reference definitionId="org.eclipse.wst.xml.ui.xmlSourceContributions.definition"></reference>
-			</visibleWhen>
-		</command>
-	</menuContribution>		
-     <menuContribution
-           locationURI="popup:org.eclipse.ui.popup.any?after=additions">
-        <menu
-              id="generateMenuId"
-              label="%genMenuLabel">
-	        <command
-	              commandId="org.eclipse.wst.sse.ui.generate.xml"
-	              id="GenerateXML"
-	              style="push">
-	           <visibleWhen checkEnabled="false">
-	              <or>
-					<iterate ifEmpty="false">
-						<adapt
-							type="org.eclipse.core.resources.IFile">
-							<test
-								property="org.eclipse.wst.sse.core.resources.contentTypeId"
-                    			value="org.eclipse.wst.xsd.core.xsdsource">
-							</test>
-						</adapt>
-					</iterate>
-					<iterate ifEmpty="false">
-						<adapt
-							type="org.eclipse.core.resources.IFile">
-							<test
-								property="org.eclipse.wst.sse.core.resources.contentTypeId"
-                    			value="org.eclipse.wst.dtd.core.dtdsource">
-							</test>
-						</adapt>
-					</iterate>
-				 </or>	
-	           </visibleWhen>
-	        </command>
-        </menu>
-     </menuContribution>
-     
-     <menuContribution
-           locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
-        <toolbar
-              id="org.eclipse.wst.xml.ui.design.DesignToolBar">
-           <separator
-                 name="sed.tabletree.separator.1"
-                 visible="true">
-           </separator>
-           <command
-                 commandId="org.eclipse.wst.xml.ui.disable.grammar.constraints"
-                 icon="icons/full/etool16/constrainon.gif"
-                 id="ToggleGrammarConstraints"
-                 style="push"
-                 tooltip="%Constraints_name">
-	           <visibleWhen
-	                 checkEnabled="false">
-	              <reference
-	                    definitionId="org.eclipse.wst.xml.ui.grammar">
-	              </reference>
-	           </visibleWhen>
-           </command>
-           <command
-                 commandId="org.eclipse.wst.xml.ui.reload.dependecies"
-                 icon="icons/full/etool16/rldgrmr.gif"
-                 id="ReloadDependencies"
-                 style="push">
-	           <visibleWhen
-	                 checkEnabled="false">
-	              <reference
-	                    definitionId="org.eclipse.wst.xml.ui.dependencies">
-	              </reference>
-	           </visibleWhen>
-           </command>
-           <separator
-                 name="sed.tabletree.separator.2"
-                 visible="true">
-           </separator>
-           <command
-                 commandId="sed.tabletree.expandAll"
-                 icon="icons/full/etool16/expand_all.gif"
-                 id="ExpandAll"
-                 style="push">
-	           <visibleWhen
-	                 checkEnabled="false">
-	              <reference
-	                    definitionId="org.eclipse.wst.xml.ui.expand">
-	              </reference>
-	           </visibleWhen>
-           </command>
-           <command
-                 commandId="sed.tabletree.collapseAll"
-                 icon="icons/full/etool16/collapse_all.gif"
-                 id="CollapseAll"
-                 style="push">
-	             <visibleWhen
-	                 checkEnabled="false">
-	              <reference
-	                    definitionId="org.eclipse.wst.xml.ui.expand">
-	              </reference>
-	           </visibleWhen>
-           </command>
-        </toolbar>
-     </menuContribution>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.xmlSourceContributions.definition">
-            <with variable="activeContexts">
-	           <iterate operator="or">
-	              <equals value="org.eclipse.core.runtime.xml"/>
-	           </iterate>
-            </with>
-		</definition>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.core">
-			<with variable="activeContexts">
-				<iterate operator="or">
-					<equals value="org.eclipse.core.runtime.xml"/>
-				</iterate>
-			</with>
-		</definition>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.occurrences">
-            <with variable="activeContexts">
-	           <iterate operator="or">
-	              <equals value="org.eclipse.wst.xml.occurrences"/>
-	           </iterate>
-            </with>
-		</definition>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.comments">
-			<with variable="activeContexts">
-				<iterate operator="or">
-					<equals value="org.eclipse.wst.xml.comments"/>
-				</iterate>
-			</with>
-		</definition>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.cleanup">
-			<with variable="activeContexts">
-				<iterate operator="or">
-					<equals value="org.eclipse.wst.xml.cleanup"/>
-				</iterate>
-			</with>
-		</definition>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.navigation">
-			<with variable="activeContexts">
-				<iterate operator="or">
-					<equals value="org.eclipse.wst.xml.navigation"/>
-				</iterate>
-			</with>
-		</definition>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.selection">
-			<with variable="activeContexts">
-				<iterate operator="or">
-					<equals value="org.eclipse.wst.xml.selection"/>
-				</iterate>
-			</with>
-		</definition>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.dependencies">
-			<or>
-				<with variable="activeEditorId">
-					<equals value="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart"></equals>
-				</with>
-				<with variable="activeContexts">
-					<iterate operator="or">
-						<equals value="org.eclipse.wst.xml.dependencies"/>
-					</iterate>
-				</with>
-			</or>
-		</definition>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.grammar">
-			<or>
-				<with variable="activeEditorId">
-					<equals value="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart"></equals>
-				</with>
-				<with variable="activeContexts">
-					<iterate operator="or">
-						<equals value="org.eclipse.wst.xml.grammar"/>
-					</iterate>
-				</with>
-			</or>
-		</definition>
-	</extension>
-	
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.expand">
-			<or>
-				<with variable="activeEditorId">
-					<equals value="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart"></equals>
-				</with>
-				<with variable="activeContexts">
-					<iterate operator="or">
-						<equals value="org.eclipse.wst.xml.expand"/>
-					</iterate>
-				</with>
-			</or>
-		</definition>
-	</extension>
-	
-    <extension
-       point="org.eclipse.ui.handlers">
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.CleanupdocumentHandler"
-             commandId="org.eclipse.wst.sse.ui.cleanup.document">
-          <activeWhen>
-			 <reference definitionId="org.eclipse.wst.xml.ui.cleanup"/>
-          </activeWhen>
-          <enabledWhen>
-             <reference definitionId="org.eclipse.wst.xml.ui.cleanup"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.ToggleCommentHandler"
-             commandId="org.eclipse.wst.sse.ui.toggle.comment">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.comments"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.comments"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.AddBlockCommentHandler"
-             commandId="org.eclipse.wst.sse.ui.add.block.comment">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.comments"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.comments"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.RemoveBlockCommentHandler"
-             commandId="org.eclipse.wst.sse.ui.remove.block.comment">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.comments"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.comments"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.StructuredSelectEnclosingXMLHandler"
-             commandId="org.eclipse.wst.sse.ui.structure.select.enclosing">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.selection"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.selection"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.StructuredSelectNextXMLHandler"
-             commandId="org.eclipse.wst.sse.ui.structure.select.next">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.selection"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.selection"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.StructuredSelectPreviousXMLHandler"
-             commandId="org.eclipse.wst.sse.ui.structure.select.previous">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.selection"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.selection"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.sse.ui.internal.handlers.StructuredSelectHistoryHandler"
-             commandId="org.eclipse.wst.sse.ui.structure.select.last">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.selection"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.selection"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.XMLFindOccurencesHandler"
-             commandId="org.eclipse.wst.sse.ui.search.find.occurrences">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.occurrences"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.occurrences"/>
-          </enabledWhen>
-       </handler>
-<!--
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.GoToMatchingTagHandler"
-             commandId="org.eclipse.wst.xml.ui.gotoMatchingTag">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.navigation"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.navigation"/>
-          </enabledWhen>
-       </handler>
--->
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.NextSiblingNavigationHandler"
-             commandId="org.eclipse.wst.xml.ui.nextSibling">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.navigation"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.navigation"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.PreviousSiblingNavigationHandler"
-             commandId="org.eclipse.wst.xml.ui.previousSibling">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.navigation"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.navigation"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.ReloadDependenciesHandler"
-             commandId="org.eclipse.wst.xml.ui.reload.dependecies">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.dependencies"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.dependencies"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.ToggleEditModeHandler"
-             commandId="org.eclipse.wst.xml.ui.disable.grammar.constraints">
-          <activeWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.grammar"/>
-          </activeWhen>
-          <enabledWhen>
-              <reference definitionId="org.eclipse.wst.xml.ui.grammar"/>
-          </enabledWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.wizards.NewXMLHandler"
-             commandId="org.eclipse.wst.sse.ui.generate.xml">
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.ExpandAllHandler"
-             commandId="sed.tabletree.expandAll">
-             <activeWhen>
-                 <not>
-		            <with variable="activeContexts">
-			           <iterate operator="or">
-			              <equals value="org.eclipse.wst.sse.ui.structuredTextEditorScope"/>
-			           </iterate>
-		            </with>
-                 </not>
-             </activeWhen>
-       </handler>
-       <handler
-             class="org.eclipse.wst.xml.ui.internal.handlers.CollapseAllHandler"
-             commandId="sed.tabletree.collapseAll">
-             <activeWhen>
-                 <not>
-		            <with variable="activeContexts">
-			           <iterate operator="or">
-			              <equals value="org.eclipse.wst.sse.ui.structuredTextEditorScope"/>
-			           </iterate>
-		            </with>
-                 </not>
-             </activeWhen>
-       </handler>
-    </extension>
-    
-    <extension
-       point="org.eclipse.ui.commands">
-	    <command
-	          id="org.eclipse.wst.sse.ui.generate.xml"
-	          name="%_UI_ACTION_CREATE_XML">
-	    </command>
-	    <command
-	          description="%ReloadDependencies_description"
-	          id="org.eclipse.wst.xml.ui.reload.dependecies"
-	          name="%ReloadDependencies_name">
-	    </command>
-	    <command
-	          description="%Constraints_description"
-	          id="org.eclipse.wst.xml.ui.disable.grammar.constraints"
-	          name="%Constraints_name">
-	    </command>
-	    <command
-	          id="sed.tabletree.expandAll"
-	          name="%ExpandAll_name">
-	    </command>
-	    <command
-	          id="sed.tabletree.collapseAll"
-	          name="%CollapseAll_name">
-	    </command>
-	</extension> 
-	
-	<!-- Define theme -->
-	<extension
-		point="org.eclipse.ui.themes">
-		<theme
-			id="org.eclipse.ui.ide.systemDefault">
-			<colorOverride
-				id="tagAttributeName"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="tagAttributeValue"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="commentBorder"
-				value="COLOR_LIST_SELECTION">
-			</colorOverride>
-			<colorOverride
-				id="commentText"
-				value="COLOR_LIST_SELECTION">
-			</colorOverride>
-			<colorOverride
-				id="declBoder"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="doctypeName"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="doctypeExternalPubref"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="doctypeExternalId"
-				value="COLOR_WIDGET_NORMAL_SHADOW">
-			</colorOverride>
-			<colorOverride
-				id="doctypeExtrenalSysref"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="tagBorder"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="tagName"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="piBorder"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="cdataBorder"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="cdataText"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-			<colorOverride
-				id="entityReference"
-				value="COLOR_LIST_FOREGROUND">
-			</colorOverride>
-		</theme>
-		<colorDefinition
-			id="tagAttributeName"
-			isEditable="false"
-			label="%Colors.tagAttributeName"
-			value="127, 0, 127">
-		</colorDefinition>
-		<colorDefinition
-			id="tagAttributeValue"
-			isEditable="false"
-			label="%Colors.tagAttributeValue"
-			value="42, 0, 255">
-		</colorDefinition>
-		<colorDefinition
-			id="commentBorder"
-			isEditable="false"
-			label="%Colors.commentBorder"
-			value="63, 95, 191">
-		</colorDefinition>
-		<colorDefinition
-			id="commentText"
-			isEditable="false"
-			label="%Colors.commentText"
-			value="63, 95, 191">
-		</colorDefinition>
-		<colorDefinition
-			id="declBoder"
-			isEditable="false"
-			label="%Colors.declBorder"
-			value="0, 128, 128">
-		</colorDefinition>
-		<colorDefinition
-			id="doctypeName"
-			isEditable="false"
-			label="%Colors.doctypeName"
-			value="0, 128, 128">
-		</colorDefinition>
-		<colorDefinition
-			id="doctypeExternalPubref"
-			isEditable="false"
-			label="%Colors.doctypeExternalPubref"
-			value="0, 128, 128">
-		</colorDefinition>
-		<colorDefinition
-			id="doctypeExternalId"
-			isEditable="false"
-			label="%Colors.doctypeExternalId"
-			value="128, 128, 128">
-		</colorDefinition>
-		<colorDefinition
-			id="doctypeExtrenalSysref"
-			isEditable="false"
-			label="%Colors.doctypeExtrenalSysref"
-			value="63, 127, 95">
-		</colorDefinition>
-		<colorDefinition
-			id="tagBorder"
-			isEditable="false"
-			label="%Colors.tagBorder"
-			value="0, 128, 128">
-		</colorDefinition>
-		<colorDefinition
-			id="tagName"
-			isEditable="false"
-			label="%Colors.tagName"
-			value="63, 127, 127">
-		</colorDefinition>
-		<colorDefinition
-			id="piBorder"
-			isEditable="false"
-			label="%Colors.piBorder"
-			value="0, 128, 128">
-		</colorDefinition>
-		<colorDefinition
-			id="cdataBorder"
-			isEditable="false"
-			label="%Colors.cdataBorder"
-			value="0, 128, 128">
-		</colorDefinition>
-		<colorDefinition
-			id="cdataText"
-			isEditable="false"
-			label="%Colors.cdataText"
-			value="0, 0, 0">
-		</colorDefinition>
-		<colorDefinition
-			id="entityReference"
-			isEditable="false"
-			label="%Colors.entityReference"
-			value="42, 0, 255">
-		</colorDefinition>
-	</extension>
-
-	<!-- Enable the FormatHandler for XML Content Type -->
-	<extension point="org.eclipse.ui.handlers">
-		<handler 
-			class="org.eclipse.wst.sse.ui.internal.handlers.FormatHandler"
-			commandId="org.eclipse.wst.sse.ui.format">
-			<activeWhen>
-				<reference definitionId="org.eclipse.wst.xml.ui.xmlContentType.definition"></reference>
-			</activeWhen>
-			<enabledWhen>
-				<reference definitionId="org.eclipse.wst.xml.ui.xmlContentType.definition"></reference>
-			</enabledWhen>
-		</handler>
-	</extension>
-	
-	<!-- Set up a definition for XML Content Types -->
-	<extension point="org.eclipse.core.expressions.definitions">
-		<definition id="org.eclipse.wst.xml.ui.xmlContentType.definition">
-			<or>
-            	<iterate ifEmpty="false">
-					<adapt type="org.eclipse.core.resources.IFile">
-						<test property="org.eclipse.wst.sse.core.resources.contentTypeId" 
-							value="org.eclipse.wst.xml.core.xmlsource"/>
-					</adapt>
-				</iterate>
-				<iterate ifEmpty="false">
-					<adapt type="org.eclipse.core.resources.IFile">
-						<test property="org.eclipse.wst.sse.core.resources.contentTypeId"
-							value="org.eclipse.core.runtime.xml"/>
-					</adapt>
-				</iterate>
-			</or>
-		</definition>
-	</extension>
-</plugin>
diff --git a/bundles/org.eclipse.wst.xml.ui/schema/catalogFileType.exsd b/bundles/org.eclipse.wst.xml.ui/schema/catalogFileType.exsd
deleted file mode 100644
index 3629659..0000000
--- a/bundles/org.eclipse.wst.xml.ui/schema/catalogFileType.exsd
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.xml.ui">
-<annotation>
-      <appInfo>
-         <meta.schema plugin="org.eclipse.wst.xml.ui" id="catalogFileType" name="XML Catalog file type extension point"/>
-      </appInfo>
-      <documentation>
-         &lt;b&gt;This extension point is internal and should not be used by any other plugins.&lt;/b&gt;
-      </documentation>
-   </annotation>
-
-   <element name="extension">
-      <complexType>
-         <sequence>
-            <element ref="fileType" minOccurs="1" maxOccurs="unbounded"/>
-         </sequence>
-         <attribute name="point" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appInfo>
-                  <meta.attribute translatable="true"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <element name="fileType">
-      <complexType>
-         <attribute name="extensions" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="description" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="since"/>
-      </appInfo>
-      <documentation>
-         &lt;b&gt;This extension point is internal and should not be used by any other plugins.&lt;/b&gt;
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="examples"/>
-      </appInfo>
-      <documentation>
-         
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="apiInfo"/>
-      </appInfo>
-      <documentation>
-         
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="implementation"/>
-      </appInfo>
-      <documentation>
-         
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="copyright"/>
-      </appInfo>
-      <documentation>
-         Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made 
-available under the terms of the Eclipse Public License v1.0 which accompanies 
-this distribution, and is available at &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
-      </documentation>
-   </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/AdvancedOptionsDialog.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/AdvancedOptionsDialog.java
deleted file mode 100644
index ac1dec6..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/AdvancedOptionsDialog.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import java.io.ByteArrayInputStream;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.SaveAsDialog;
-import org.eclipse.wst.common.ui.internal.dialogs.SelectSingleFileDialog;
-import org.eclipse.wst.xml.core.internal.catalog.CatalogSet;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-public class AdvancedOptionsDialog extends Dialog {
-	protected ICatalog workingUserCatalog;
-
-	public AdvancedOptionsDialog(Shell parentShell, ICatalog workingUserCatalog) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.workingUserCatalog = workingUserCatalog;
-	}
-
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-	}
-
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogArea = (Composite) super.createDialogArea(parent);
-		// WorkbenchHelp.setHelp(dialogArea, new
-		// ControlContextComputer(dialogArea,
-		// XMLBuilderContextIds.XMLP_PROJECT_DIALOG));
-
-		Composite composite = new Composite(dialogArea, SWT.NONE);
-		composite.setLayout(new GridLayout());
-		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-		Label label = new Label(composite, SWT.NONE);
-		label.setText(XMLCatalogMessages.UI_LABEL_DIALOG_DESCRIPTION);
-
-		Composite buttonComposite = new Composite(composite, SWT.NONE);
-		GridLayout gridLayout = new GridLayout();
-		gridLayout.numColumns = 3;
-		buttonComposite.setLayout(gridLayout);
-		buttonComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-		Composite placeHolder = new Composite(buttonComposite, SWT.NONE);
-		placeHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-		Composite buttonGroup = new Composite(buttonComposite, SWT.NONE);
-		gridLayout = new GridLayout();
-		gridLayout.numColumns = 2;
-		gridLayout.makeColumnsEqualWidth = true;
-		buttonGroup.setLayout(gridLayout);
-		buttonGroup.setLayoutData(createGridData());
-
-		Button importButton = new Button(buttonGroup, SWT.PUSH | SWT.CENTER);
-		importButton.setText("  " + XMLCatalogMessages.UI_BUTTON_IMPORT + "  "); //$NON-NLS-1$ //$NON-NLS-2$
-
-		Button exportButton = new Button(buttonGroup, SWT.PUSH | SWT.CENTER);
-		exportButton.setText("  " + XMLCatalogMessages.UI_BUTTON_EXPORT + "  "); //$NON-NLS-1$ //$NON-NLS-2$
-
-		placeHolder = new Composite(buttonComposite, SWT.NONE);
-		placeHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-		// add importButton listener
-		SelectionListener importButtonSelectionListener = new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				invokeImportDialog();
-			}
-		};
-		importButton.addSelectionListener(importButtonSelectionListener);
-
-		// add exportButton listener
-		SelectionListener exportButtonSelectionListener = new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				invokeExportDialog();
-			}
-		};
-		exportButton.addSelectionListener(exportButtonSelectionListener);
-
-		return dialogArea;
-	}
-
-	protected GridData createGridData() {
-		GridData gd = new GridData(GridData.CENTER);
-		gd.horizontalAlignment = GridData.HORIZONTAL_ALIGN_CENTER;
-		gd.verticalAlignment = GridData.VERTICAL_ALIGN_CENTER;
-		return gd;
-	}
-
-
-	protected void invokeImportDialog() {
-		SelectSingleFileDialog dialog = new SelectSingleFileDialog(getShell(), null, true);
-		String[] extensions = {".xmlcatalog", ".xml"}; //$NON-NLS-1$ //$NON-NLS-2$
-		dialog.addFilterExtensions(extensions);
-		dialog.create();
-		dialog.getShell().setText(XMLCatalogMessages.UI_LABEL_IMPORT_DIALOG_TITLE);
-		dialog.setTitle(XMLCatalogMessages.UI_LABEL_IMPORT_DIALOG_HEADING);
-		dialog.setMessage(XMLCatalogMessages.UI_LABEL_IMPORT_DIALOG_MESSAGE);
-		dialog.setBlockOnOpen(true);
-		int rc = dialog.open();
-		if (rc == Window.OK) {
-			IFile file = dialog.getFile();
-			if (file != null) {
-				String fileName = file.getLocation().toFile().toURI().toString();
-				try {
-					CatalogSet tempResourceSet = new CatalogSet();
-					ICatalog newCatalog = tempResourceSet.lookupOrCreateCatalog("temp", fileName); //$NON-NLS-1$
-					workingUserCatalog.addEntriesFromCatalog(newCatalog);
-				}
-				catch (Exception e) {
-					// TODO... give error message
-				}
-			}
-			close();
-		}
-	}
-
-
-	protected void invokeExportDialog() {
-		IPath originalFilePath = null;
-		IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
-		if (projects.length > 0) {
-			originalFilePath = projects[0].getFullPath().append(".xmlcatalog"); //$NON-NLS-1$
-		}
-
-		SaveAsDialog dialog = new SaveAsDialog(getShell());
-		if (originalFilePath != null) {
-			IFile originalFile = ResourcesPlugin.getWorkspace().getRoot().getFile(originalFilePath);
-			dialog.setOriginalFile(originalFile);
-		}
-		dialog.create();
-
-		dialog.getShell().setText(XMLCatalogMessages.UI_LABEL_EXPORT_DIALOG_TITLE);
-		dialog.setTitle(XMLCatalogMessages.UI_LABEL_EXPORT_DIALOG_HEADING);
-		dialog.setMessage(XMLCatalogMessages.UI_LABEL_EXPORT_DIALOG_MESSAGE);
-
-		dialog.setBlockOnOpen(true);
-		int rc = dialog.open();
-		if (rc == Window.OK) {
-			IPath path = dialog.getResult();
-			if (path != null) {
-				IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-				String fileName = file.getLocation().toFile().toURI().toString();
-
-				// here we save the catalog entries to the selected file
-				try {
-					createFileIfRequired(file);
-					workingUserCatalog.setLocation(fileName);
-					workingUserCatalog.save();
-				}
-				catch (Exception ex) {
-					try {
-						String title = XMLCatalogMessages.UI_LABEL_CATALOG_SAVE_ERROR;
-						String briefMessage = XMLCatalogMessages.UI_LABEL_CATALOG_COULD_NOT_BE_SAVED;
-						String reason = file.isReadOnly() ? NLS.bind(XMLCatalogMessages.UI_LABEL_FILE_IS_READ_ONLY, fileName) : NLS.bind(XMLCatalogMessages.ERROR_SAVING_FILE, fileName);
-						String details = NLS.bind(XMLCatalogMessages.ERROR_SAVING_FILE, fileName);
-
-						ErrorDialog.openError(Display.getCurrent().getActiveShell(), title, briefMessage, createStatus(reason, details));
-					}
-					catch (Exception ex2) {
-					}
-				}
-				close();
-			}
-		}
-	}
-
-	// TODO... This was copied from WindowUtility. Is there an easier way to
-	// create a status object?
-	// If not, we should open an eclipse bug or add a similar utility to
-	// baseExtensionsUI.
-	//
-	private static IStatus createStatus(String reason, String msg) {
-		String pluginId = XMLUIPlugin.getDefault().getBundle().getSymbolicName();
-		MultiStatus multiStatus = new MultiStatus(pluginId, 0, reason, null);
-		Status status = new Status(IStatus.ERROR, pluginId, 0, msg, null);
-		multiStatus.add(status);
-		return multiStatus;
-	}
-
-
-	protected void createFileIfRequired(IFile file) {
-		try {
-			if ((file != null) && !file.exists()) {
-				ByteArrayInputStream inputStream = new ByteArrayInputStream(new byte[0]);
-				file.create(inputStream, true, null);
-				// createEmptyXMLCatalog(file);
-			}
-		}
-		catch (Exception e) {
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/CatalogFileTypeRegistryReader.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/CatalogFileTypeRegistryReader.java
deleted file mode 100644
index 6165312..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/CatalogFileTypeRegistryReader.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import java.util.Collection;
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-public class CatalogFileTypeRegistryReader {
-	private static CatalogFileTypeRegistryReader _instance;
-
-	static final String ATT_DESCRIPTION = "description"; //$NON-NLS-1$
-
-	static final String ATT_EXTENSIONS = "extensions"; //$NON-NLS-1$
-
-	static final String ATT_ICON = "icon"; //$NON-NLS-1$
-
-	static final String ATT_ID = "id"; //$NON-NLS-1$
-
-	static final String EXTENSION_POINT_ID = "catalogFileType"; //$NON-NLS-1$
-
-	static final String TAG_NAME = "fileType"; //$NON-NLS-1$
-
-	private static CatalogFileTypeRegistryReader getInstance() {
-		if (_instance == null) {
-			_instance = new CatalogFileTypeRegistryReader();
-		}
-		return _instance;
-	}
-
-	public static Collection getXMLCatalogFileTypes() {
-		return getInstance().hashMap.values();
-	}
-
-	private HashMap hashMap;
-
-	public CatalogFileTypeRegistryReader() {
-		this.hashMap = new HashMap();
-		readRegistry();
-	}
-
-	private void readElement(IConfigurationElement element) {
-		if (element.getName().equals(TAG_NAME)) {
-			String id = element.getAttribute(ATT_ID);
-			if (id != null) {
-				XMLCatalogFileType fileType = (XMLCatalogFileType) hashMap.get(id);
-				if (fileType == null) {
-					fileType = new XMLCatalogFileType();
-					hashMap.put(id, fileType);
-				}
-
-				if (fileType.description == null) {
-					String description = element.getAttribute(ATT_DESCRIPTION);
-					fileType.description = description;
-				}
-
-				fileType.addExtensions(element.getAttribute(ATT_EXTENSIONS));
-			}
-		}
-	}
-
-	private void readRegistry() {
-		readRegistry(EXTENSION_POINT_ID);
-	}
-
-	private void readRegistry(String extensionPointId) {
-		IExtensionRegistry pluginRegistry = Platform.getExtensionRegistry();
-		IExtensionPoint point = pluginRegistry.getExtensionPoint(XMLUIPlugin.ID, extensionPointId);
-		if (point != null) {
-			IConfigurationElement[] elements = point.getConfigurationElements();
-			for (int i = 0; i < elements.length; i++) {
-				readElement(elements[i]);
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/EditCatalogEntryDialog.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/EditCatalogEntryDialog.java
deleted file mode 100644
index 302c29b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/EditCatalogEntryDialog.java
+++ /dev/null
@@ -1,1053 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.ToolItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.wst.common.ui.internal.dialogs.SelectSingleFileDialog;
-import org.eclipse.wst.common.uriresolver.internal.URI;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogElement;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-
-public class EditCatalogEntryDialog extends Dialog {
-	protected static Image borwseImage = ImageFactory.INSTANCE.getImage("icons/obj16/file_expand.gif"); //$NON-NLS-1$
-	protected static Image catalogEntryToolBarImage = ImageFactory.INSTANCE.getImage("icons/etool50/catalogEntry.gif"); //$NON-NLS-1$
-	protected static Image nextCatalogToolBarImage = ImageFactory.INSTANCE.getImage("icons/etool50/nextCatalog.gif"); //$NON-NLS-1$
-
-	protected class CatalogEntryPage extends CatalogElementPage {
-
-		protected Button browseButton;
-
-		protected ICatalogEntry catalogEntry;
-
-		protected Button checkboxButton;
-
-		protected Label errorMessageLabel;
-
-		protected Text keyField;
-
-		protected Combo keyTypeCombo;
-
-		protected Text resourceLocationField;
-
-		protected Combo resourceTypeCombo;
-
-		protected Text webAddressField;
-		
-		protected String key;
-		
-		protected int type;
-
-		protected void computeErrorMessage() {
-			errorMessage = null;
-			warningMessage = null;
-
-			if (errorMessage == null) {
-				String fileName = resourceLocationField.getText();
-				if (fileName.trim().length() > 0) {
-					if ((fileName.indexOf("..") != -1) || (fileName.indexOf("./") != -1) || (fileName.indexOf("/.") != -1) || (fileName.indexOf(".\\") != -1) || (fileName.indexOf("\\.") != -1)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-						errorMessage = XMLCatalogMessages.UI_WARNING_URI_MUST_NOT_HAVE_DOTS;
-					}
-
-					String uri = fileName;
-					if (!URIHelper.hasProtocol(uri)) {
-						URIHelper.isAbsolute(uri);
-						uri = (URIHelper.isAbsolute(uri)) ? URIHelper.prependFileProtocol(uri) : URIHelper.prependPlatformResourceProtocol(uri);
-					}
-
-					if ((errorMessage == null) && !URIHelper.isReadableURI(uri, false)) {
-						errorMessage = XMLCatalogMessages.UI_WARNING_URI_NOT_FOUND_COLON + fileName;
-					}
-				}
-				else {
-					// this an error that is not actaully
-					// reported ... OK is just disabled
-					errorMessage = ""; //$NON-NLS-1$
-				}
-
-				// Make sure the key is a fully qualified URI in the cases
-				// where the key type is "System ID" or "Schema location"
-				if ((keyField.getText().length() > 0) && (getKeyType() == ICatalogEntry.ENTRY_TYPE_SYSTEM)) {
-					URI uri = URI.createURI(keyField.getText());
-					if (uri.scheme() == null) {
-						warningMessage = XMLCatalogMessages.UI_WARNING_SHOULD_BE_FULLY_QUALIFIED_URI;
-					}
-				}
-			}
-
-			if ((errorMessage == null) && checkboxButton.getSelection() && (webAddressField.getText().trim().length() == 0)) {
-				// this an error that is not actaully
-				// reported ... OK is just disabled
-				errorMessage = ""; //$NON-NLS-1$
-			}
-
-			if ((errorMessage == null) && (keyField.getText().trim().length() == 0)) {
-				// this an error that is not actaully
-				// reported ... OK is just disabled
-				errorMessage = ""; //$NON-NLS-1$
-			}
-		}
-
-		protected Control createCatalogEntryPanel(Composite parent) {
-
-			ModifyListener modifyListener = new ModifyListener() {
-				public void modifyText(ModifyEvent e) {
-					if (e.widget == resourceLocationField) {
-						if (keyField.getText().length() == 0) {
-							String uri = resourceLocationField.getText();
-							if (uri.endsWith("xsd") && !URIHelper.hasProtocol(uri)) { //$NON-NLS-1$
-								uri = URIHelper.isAbsolute(uri) ? URIHelper.prependFileProtocol(uri) : URIHelper.prependPlatformResourceProtocol(uri);
-								String namespaceURI = XMLQuickScan.getTargetNamespaceURIForSchema(uri);
-								if (namespaceURI != null) {
-									keyField.setText(namespaceURI);
-								}
-							}
-						}
-					}
-					updateWidgets(e.widget);
-				}
-			};
-
-
-			Composite composite = new Composite(parent, SWT.NONE);
-			GridData gd = new GridData(GridData.FILL_BOTH);
-			composite.setLayoutData(gd);
-
-			GridLayout layout = new GridLayout();
-			composite.setLayout(layout);
-
-			Composite group = new Composite(composite, SWT.NONE);
-			gd = new GridData(GridData.FILL_HORIZONTAL);
-			group.setLayoutData(gd);
-
-			layout = new GridLayout(3, false);
-			group.setLayout(layout);
-
-			Label resourceLocationLabel = new Label(group, SWT.NONE);
-			resourceLocationLabel.setText(XMLCatalogMessages.UI_LABEL_LOCATION_COLON);
-
-			resourceLocationField = new Text(group, SWT.SINGLE | SWT.BORDER);
-			gd = new GridData();
-			gd.horizontalAlignment = SWT.FILL;
-			gd.grabExcessHorizontalSpace = true;
-			resourceLocationField.setLayoutData(gd);
-
-			resourceLocationField.setText(getDisplayValue(URIUtils.convertURIToLocation(getEntry().getURI())));
-
-			// WorkbenchHelp.setHelp(resourceLocationField,
-			// XMLBuilderContextIds.XMLP_ENTRY_URI);
-			resourceLocationField.addModifyListener(modifyListener);
-
-
-			browseButton = createBrowseButton(group);
-			// WorkbenchHelp.setHelp(browseButton,
-			// XMLBuilderContextIds.XMLP_ENTRY_BROWSE);
-			browseButton.addSelectionListener(new DropDownSelectionListener(resourceLocationField));
-
-			// Key Type
-			//
-			Label keyTypeLabel = new Label(group, SWT.NONE);
-			keyTypeLabel.setText(XMLCatalogMessages.UI_KEY_TYPE_COLON);
-
-			keyTypeCombo = new Combo(group, SWT.NONE);
-			gd = new GridData();
-			gd.horizontalAlignment = SWT.FILL;
-			gd.grabExcessHorizontalSpace = true;
-			keyTypeCombo.setLayoutData(gd);
-			updateKeyTypeCombo(getEntry().getEntryType());
-			keyTypeCombo.addModifyListener(modifyListener);
-			// WorkbenchHelp.setHelp(keyTypeCombo,
-			// XMLBuilderContextIds.XMLP_ENTRY_KEY_TYPE);
-
-			// a placeholder to fill the 3rd column
-			Button placeHolder = new Button(group, SWT.NONE);
-			placeHolder.setVisible(false);
-
-			// Key
-			// 
-			Label keyValueLabel = new Label(group, SWT.NONE);
-			keyValueLabel.setText(XMLCatalogMessages.UI_LABEL_KEY_COLON);
-			keyField = new Text(group, SWT.SINGLE | SWT.BORDER);
-			// WorkbenchHelp.setHelp(keyField,
-			// XMLBuilderContextIds.XMLP_ENTRY_KEY);
-			keyField.setLayoutData(gd);
-			keyField.setText(getDisplayValue(getEntry().getKey()));
-			keyField.addModifyListener(modifyListener);
-
-			Composite group2 = new Composite(composite, SWT.NONE);
-			gd = new GridData(GridData.FILL_HORIZONTAL);
-			group2.setLayoutData(gd);
-
-			layout = new GridLayout();
-			group2.setLayout(layout);
-
-			// checkbox -- note parent is dialogArea
-			//
-			checkboxButton = new Button(group2, SWT.CHECK);
-			// WorkbenchHelp.setHelp(checkboxButton,
-			// XMLBuilderContextIds.XMLP_ENTRY_SPECIFY_ALTERNATIVE);
-			checkboxButton.setText(XMLCatalogMessages.UI_LABEL_SPECIFY_ALTERNATIVE_WEB_URL);
-			checkboxButton.setLayoutData(new GridData());
-			checkboxButton.setSelection(getEntry().getAttributeValue(ICatalogEntry.ATTR_WEB_URL) != null);
-			SelectionListener buttonListener = new SelectionListener() {
-				public void widgetDefaultSelected(SelectionEvent event) {
-					// no impl
-				}
-
-				public void widgetSelected(SelectionEvent event) {
-					if (event.widget == checkboxButton) {
-						updateWidgets(checkboxButton);
-					}
-				}
-			};
-			checkboxButton.addSelectionListener(buttonListener);
-
-			// Web Address field
-			//
-
-			ModifyListener webAddressFieldListener = new ModifyListener() {
-				public void modifyText(ModifyEvent e) {
-					computeErrorMessage();
-					updateErrorMessageLabel(errorMessageLabel);
-					updateOKButtonState();
-				}
-			};
-
-			webAddressField = new Text(group2, SWT.SINGLE | SWT.BORDER);
-			// WorkbenchHelp.setHelp(webAddressField,
-			// XMLBuilderContextIds.XMLP_ENTRY_WEB_ADDRESS);
-			webAddressField.setLayoutData(gd);
-			webAddressField.setText(getDisplayValue(getEntry().getAttributeValue(ICatalogEntry.ATTR_WEB_URL)));
-			webAddressField.setEnabled(false);
-			webAddressField.addModifyListener(webAddressFieldListener);
-
-
-			errorMessageLabel = new Label(group2, SWT.NONE);
-			errorMessageLabel.setForeground(color);
-			errorMessageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-			updateWidgets(null);
-			
-			key = getEntry().getKey();
-			type = getEntry().getEntryType();
-
-			return composite;
-		}
-
-		public Control createControl(Composite parent) {
-
-			fControl = createCatalogEntryPanel(parent);
-
-			return fControl;
-		}
-
-
-		public ICatalogElement getData() {
-			return getEntry();
-		}
-
-		protected ICatalogEntry getEntry() {
-			if (catalogEntry == null) {
-				if ((fCatalogElement != null) && (fCatalogElement.getType() == ICatalogElement.TYPE_ENTRY)) {
-					catalogEntry = (ICatalogEntry) fCatalogElement;
-				}
-				else {
-					if (catalog != null) {
-						catalogEntry = (ICatalogEntry) catalog.createCatalogElement(ICatalogElement.TYPE_ENTRY);
-					}
-				}
-			}
-			return catalogEntry;
-		}
-
-		protected int getKeyType() {
-			switch (keyTypeCombo.getSelectionIndex()) {
-				case 0 :
-					if ("schema".equals(keyTypeCombo.getData("keyType"))) { //$NON-NLS-1$ //$NON-NLS-2$
-						return ICatalogEntry.ENTRY_TYPE_URI; // xsd
-																// namespace
-																// is URI type
-																// key
-					}
-					return ICatalogEntry.ENTRY_TYPE_PUBLIC;
-				case 1 :
-					return ICatalogEntry.ENTRY_TYPE_SYSTEM;
-				case 2 :
-					return ICatalogEntry.ENTRY_TYPE_URI;
-				default :
-					return ICatalogEntry.ENTRY_TYPE_PUBLIC;
-			}
-		}
-
-		public void saveData() {
-			if (validateData()) {
-				getEntry().setURI(URIUtils.convertLocationToURI(resourceLocationField.getText()));
-				getEntry().setKey(keyField.getText());
-				getEntry().setEntryType(getKeyType());
-				getEntry().setAttributeValue(ICatalogEntry.ATTR_WEB_URL, checkboxButton.getSelection() ? webAddressField.getText() : null);
-				dataSaved = true;
-			}
-			else {
-				errorMessage = XMLCatalogMessages.UI_WARNING_DUPLICATE_ENTRY;
-				errorMessageLabel.setText(errorMessage);
-				updateOKButtonState();
-				dataSaved = false;
-			}
-		}
-		
-		/**
-		 * Validates that the data entered does not conflict with an existing entry in either catalog.
-		 * @return True if validated, false otherwise.
-		 */
-		protected boolean validateData() {
-		
-			String result = null;
-			if (key == null || !key.equals(keyField.getText()) || type != getKeyType())
-			{
-				// get system catalog
-				ICatalog systemCatalog = null;			
-				ICatalog defaultCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
-				INextCatalog[] nextCatalogs = defaultCatalog.getNextCatalogs();
-				for (int i = 0; i < nextCatalogs.length; i++) {
-					INextCatalog catalog = nextCatalogs[i];
-					ICatalog referencedCatalog = catalog.getReferencedCatalog();
-					if (referencedCatalog != null) {
-						if (XMLCorePlugin.SYSTEM_CATALOG_ID.equals(referencedCatalog.getId())) {
-							systemCatalog = referencedCatalog;
-						}
-					}
-				}
-				
-				try {
-					switch( getKeyType() )
-					{
-					case ICatalogEntry.ENTRY_TYPE_PUBLIC:
-						result = catalog.resolvePublic(keyField.getText(), null);		
-						if (result == null) {
-							result = systemCatalog.resolvePublic(keyField.getText(), null);
-						}
-						break;
-					case ICatalogEntry.ENTRY_TYPE_SYSTEM:
-						result = catalog.resolveSystem(keyField.getText());
-						if (result == null) {
-							result = systemCatalog.resolveSystem(keyField.getText());
-						}
-						break;
-					case ICatalogEntry.ENTRY_TYPE_URI:
-						result = catalog.resolveURI(keyField.getText());
-						if (result == null) {
-							result = systemCatalog.resolveURI(keyField.getText());
-						}
-						break;
-					}
-				}
-				catch (Exception e) {
-				}
-			}
-			
-			return (result == null);
-		}
-
-		protected void updateKeyTypeCombo(int type) {
-			keyTypeCombo.removeAll();
-			for (Iterator i = CatalogFileTypeRegistryReader.getXMLCatalogFileTypes().iterator(); i.hasNext();) {
-				XMLCatalogFileType theFileType = (XMLCatalogFileType) i.next();
-				if (theFileType.extensions != null) {
-					for (Iterator j = theFileType.extensions.iterator(); j.hasNext();) {
-						String extension = (String) j.next();
-						if (resourceLocationField.getText().endsWith(extension)) {
-							if (theFileType.description.equals("XSD Files")) { //$NON-NLS-1$
-								keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_XSD_PUBLIC);
-								keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_XSD_SYSTEM);
-								keyTypeCombo.setData("keyType", "schema"); //$NON-NLS-1$ //$NON-NLS-2$
-							}
-							else if (theFileType.description.equals("DTD Files")) { //$NON-NLS-1$
-								keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_DTD_PUBLIC);
-								keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_DTD_SYSTEM);
-								keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_URI);
-							}
-							else {
-								keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_URI);
-							}
-						}
-
-					}
-
-				}
-			}
-			if (keyTypeCombo.getItemCount() == 0) {
-				keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_DTD_PUBLIC);
-				keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_DTD_SYSTEM);
-				keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_URI);
-			}
-
-			switch (type) {
-				case ICatalogEntry.ENTRY_TYPE_PUBLIC :
-					keyTypeCombo.select(0);
-					break;
-				case ICatalogEntry.ENTRY_TYPE_SYSTEM :
-					keyTypeCombo.select(1);
-					break;
-				case ICatalogEntry.ENTRY_TYPE_URI : // handle XML Schema,
-													// where namespace name is
-													// mapped to URI situation
-					if ("schema".equals(keyTypeCombo.getData("keyType"))) { //$NON-NLS-1$ //$NON-NLS-2$
-						keyTypeCombo.select(0); // namespace name as URI key
-												// type
-					}
-					else {
-						keyTypeCombo.select(2); // URI key type
-					}
-					break;
-				default :
-					if (keyTypeCombo.getItemCount() > 0) {
-						keyTypeCombo.select(0);
-					}
-					break;
-			}
-
-		}
-
-		protected void updateWebAddressWidgets(int keyType) {
-			boolean isPublicKeyType = (keyType == ICatalogEntry.ENTRY_TYPE_PUBLIC);
-			checkboxButton.setEnabled(isPublicKeyType);
-			webAddressField.setEnabled(isPublicKeyType && checkboxButton.getSelection());
-		}
-
-		protected void updateWidgets(Widget widget) {
-			if (widget != keyTypeCombo) {
-				updateKeyTypeCombo(getKeyType());
-			}
-			updateWebAddressWidgets(getKeyType());
-			computeErrorMessage();
-			updateErrorMessageLabel(errorMessageLabel);
-			updateOKButtonState();
-		}
-
-	}
-
-	protected abstract class CatalogElementPage {
-
-		Control fControl;
-
-		public CatalogElementPage() {
-			super();
-
-		}
-
-		public abstract Control createControl(Composite parent);
-
-		public Control getControl() {
-			return fControl;
-		}
-
-		public abstract ICatalogElement getData();
-
-		public abstract void saveData();
-	}
-
-	protected class FilterableSelectSingleFileDialog extends SelectSingleFileDialog implements SelectionListener {
-		protected Combo filterControl;
-
-		public FilterableSelectSingleFileDialog(Shell parentShell) {
-			super(parentShell, null, true);
-			setFilters(null);
-		}
-
-		public void createAndOpen() {
-			this.create();
-			setBlockOnOpen(true);
-			getShell().setText(XMLCatalogMessages.UI_LABEL_FILE_SELECTION);
-			this.setTitle(XMLCatalogMessages.UI_LABEL_SELECT_FILE);
-			this.setMessage(XMLCatalogMessages.UI_LABEL_CHOOSE_FILE_TO_ADD_TO_CATALOG);
-			open();
-		}
-
-		public void createFilterControl(Composite composite) {
-			Label label = new Label(composite, SWT.NONE);
-			label.setText(XMLCatalogMessages.UI_LABEL_SELECT_FILE_FILTER_CONTROL);
-
-			filterControl = new Combo(composite, SWT.NONE);
-			GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-			filterControl.setLayoutData(gd);
-
-			filterControl.setText(XMLCatalogMessages.UI_TEXT_SELECT_FILE_FILTER_CONTROL);
-			filterControl.add(XMLCatalogMessages.UI_TEXT_SELECT_FILE_FILTER_CONTROL);
-
-			for (Iterator i = CatalogFileTypeRegistryReader.getXMLCatalogFileTypes().iterator(); i.hasNext();) {
-				XMLCatalogFileType fileType = (XMLCatalogFileType) i.next();
-				if (fileType.description != null) {
-					filterControl.add(fileType.description);
-				}
-			}
-
-			filterControl.addSelectionListener(this);
-		}
-
-		protected void setFilters(XMLCatalogFileType fileType) {
-			if (fileType == null) {
-				// compute all the supported file extensions
-				List list = new ArrayList();
-				for (Iterator i = CatalogFileTypeRegistryReader.getXMLCatalogFileTypes().iterator(); i.hasNext();) {
-					XMLCatalogFileType theFileType = (XMLCatalogFileType) i.next();
-					if (theFileType.extensions != null) {
-						list.addAll(theFileType.extensions);
-					}
-				}
-				// Any files are now supported with Resource URI
-				// selectSingleFileView.setFilterExtensions(createStringArray(list));
-			}
-			else {
-				if (fileType.extensions != null) {
-					selectSingleFileView.setFilterExtensions(createStringArray(fileType.extensions));
-				}
-			}
-		}
-
-		public void widgetDefaultSelected(SelectionEvent e) {
-			// do nothing
-		}
-
-		public void widgetSelected(SelectionEvent e) {
-			String text = filterControl.getText();
-			XMLCatalogFileType fileType = getMatchingFileType(text);
-			setFilters(fileType);
-		}
-	}
-
-	protected class NextCatalogPage extends CatalogElementPage {
-		protected Button browseButton;
-
-		protected Text catalogLocationField;
-
-		protected INextCatalog nextCatalog;
-
-		protected Label errorMessageLabel;
-
-		protected void computeErrorMessage() {
-			errorMessage = null;
-
-			if (errorMessage == null) {
-				String fileName = catalogLocationField.getText();
-				if (fileName.trim().length() > 0) {
-					if ((fileName.indexOf("..") != -1) || (fileName.indexOf("./") != -1) || (fileName.indexOf("/.") != -1) || (fileName.indexOf(".\\") != -1) || (fileName.indexOf("\\.") != -1)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-						errorMessage = XMLCatalogMessages.UI_WARNING_URI_MUST_NOT_HAVE_DOTS;
-					}
-
-					String uri = fileName;
-					if (!URIHelper.hasProtocol(uri)) {
-						uri = URIHelper.isAbsolute(uri) ? URIHelper.prependFileProtocol(uri) : URIHelper.prependPlatformResourceProtocol(uri);
-					}
-
-					if ((errorMessage == null) && !URIHelper.isReadableURI(uri, false)) {
-						errorMessage = XMLCatalogMessages.UI_WARNING_URI_NOT_FOUND_COLON + fileName;
-					}
-				}
-				else {
-					// this an error that is not actually
-					// reported ... OK is just disabled
-					errorMessage = ""; //$NON-NLS-1$
-				}
-			}
-
-		}
-
-		public Control createControl(Composite parent) {
-			fControl = createNextCatalogPanel(parent);
-			return fControl;
-		}
-
-		protected Control createNextCatalogPanel(Composite parent) {
-			ModifyListener modifyListener = new ModifyListener() {
-				public void modifyText(ModifyEvent e) {
-					updateWidgets(e.widget);
-				}
-			};
-
-			Composite composite = new Composite(parent, SWT.NONE);
-			GridData gd = new GridData(GridData.FILL_BOTH);
-			composite.setLayoutData(gd);
-
-			GridLayout layout = new GridLayout();
-			composite.setLayout(layout);
-
-			Composite group = new Composite(composite, SWT.NONE);
-			gd = new GridData(GridData.FILL_HORIZONTAL);
-			group.setLayoutData(gd);
-
-			layout = new GridLayout(2, false);
-			group.setLayout(layout);
-
-			Label resourceLocationLabel = new Label(group, SWT.NONE);
-			resourceLocationLabel.setText(XMLCatalogMessages.UI_LABEL_CATALOG_URI_COLON);
-
-			// filler
-			new Label(group, SWT.NONE);
-
-			catalogLocationField = new Text(group, SWT.SINGLE | SWT.BORDER);
-			catalogLocationField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			catalogLocationField.setText(URIUtils.convertURIToLocation(getDisplayValue(getNextCatalog().getCatalogLocation())));
-			// WorkbenchHelp.setHelp(resourceLocationField,
-			// XMLBuilderContextIds.XMLP_ENTRY_URI);
-			catalogLocationField.addModifyListener(modifyListener);
-
-			browseButton = createBrowseButton(group);
-			browseButton.addSelectionListener(new DropDownSelectionListener(catalogLocationField));
-
-			errorMessageLabel = new Label(group, SWT.NONE);
-			errorMessageLabel.setForeground(color);
-			errorMessageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			updateWidgets(null);
-			return composite;
-		}
-
-		public ICatalogElement getData() {
-			return getNextCatalog();
-		}
-
-		protected INextCatalog getNextCatalog() {
-			if (nextCatalog == null) {
-				if ((fCatalogElement != null) && (fCatalogElement.getType() == ICatalogElement.TYPE_NEXT_CATALOG)) {
-					nextCatalog = (INextCatalog) fCatalogElement;
-				}
-				else {
-					if (catalog != null) {
-						nextCatalog = (INextCatalog) catalog.createCatalogElement(ICatalogElement.TYPE_NEXT_CATALOG);
-					}
-				}
-			}
-			return nextCatalog;
-		}
-
-		public void saveData() {
-			getNextCatalog().setCatalogLocation(URIUtils.convertLocationToURI(catalogLocationField.getText()));
-			dataSaved = true;
-		}
-
-		protected void updateWidgets(Widget widget) {
-			computeErrorMessage();
-			updateErrorMessageLabel(errorMessageLabel);
-			updateOKButtonState();
-		}
-	}
-
-	protected class ToolBarItemSelectionChangeListener implements SelectionListener {
-		public void widgetDefaultSelected(SelectionEvent e) {
-			// TODO Auto-generated method stub
-
-		}
-
-		public void widgetSelected(SelectionEvent e) {
-			Object selection = e.getSource();
-			if (selection instanceof ToolItem) {
-				if (!showPage((CatalogElementPage) ((ToolItem) selection).getData())) {
-					// Page flipping wasn't successful
-					// handleError();
-				}
-			}
-		}
-
-	}
-
-	public static String[] createStringArray(List list) {
-		String[] stringArray = new String[list.size()];
-		for (int i = 0; i < stringArray.length; i++) {
-			stringArray[i] = (String) list.get(i);
-		}
-		return stringArray;
-	}
-
-	public static String removeLeadingSlash(String uri) {
-		// remove leading slash from the value to avoid the whole leading
-		// slash
-		// ambiguity problem
-		//       
-		if (uri != null) {
-			while (uri.startsWith("/") || uri.startsWith("\\")) { //$NON-NLS-1$ //$NON-NLS-2$
-				uri = uri.substring(1);
-			}
-		}
-		return uri;
-	}
-
-	protected ICatalog catalog;
-
-	protected ICatalogElement fCatalogElement;
-
-	protected String errorMessage;
-
-	protected String warningMessage;
-
-	protected Button okButton;
-
-	protected PageBook pageContainer;
-
-	protected CatalogElementPage selectedPage;
-
-	// protected TreeViewer treeViewer;
-
-	protected ToolBar toolBar;
-
-	protected Color color;
-	protected boolean dataSaved;
-
-	public EditCatalogEntryDialog(Shell parentShell, ICatalog aCatalog) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.catalog = aCatalog;
-	}
-
-	public EditCatalogEntryDialog(Shell parentShell, ICatalogElement catalogElement, ICatalog aCatalog) {
-		this(parentShell, aCatalog);
-		this.fCatalogElement = catalogElement;
-		// TODO EB: fix his
-		// entry.setURI(URIHelper.removePlatformResourceProtocol(entry.getURI()));
-	}
-
-	protected void buttonPressed(int buttonId) {
-		if (buttonId == IDialogConstants.OK_ID) {
-			selectedPage.saveData();
-			if (!dataSaved) {				
-				// do not exit edit dialog
-				return;
-			}
-		}
-		super.buttonPressed(buttonId);
-	}
-
-
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		okButton.setEnabled(false);
-		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-		updateOKButtonState();
-	}
-
-	protected void createCatalogEntryButton() {
-		CatalogElementPage page = new CatalogEntryPage();
-		page.createControl(pageContainer);
-		ToolItem toolItem = new ToolItem(toolBar, SWT.PUSH);
-		toolItem.setImage(catalogEntryToolBarImage);
-		toolItem.setText(XMLCatalogMessages.EditCatalogEntryDialog_catalogEntryLabel);
-		toolItem.setData(page);
-		toolItem.addSelectionListener(new ToolBarItemSelectionChangeListener());
-	}
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogAreaComposite = (Composite) super.createDialogArea(parent);
-		color = new Color(dialogAreaComposite.getDisplay(), 200, 0, 0);
-		GridLayout layout = new GridLayout();
-		layout.marginHeight = 0;
-		layout.marginWidth = 0;
-		dialogAreaComposite.setLayout(layout);
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		gd.widthHint = 500;
-		gd.heightHint = 250;
-		dialogAreaComposite.setLayoutData(gd);
-		createMainComponent(dialogAreaComposite);
-		return this.dialogArea;
-	}
-
-	public boolean close() {
-		if (color != null) {
-			color.dispose();
-		}
-		return super.close();
-	}
-
-	protected Composite createMainComponent(Composite composite) {
-		if (fCatalogElement != null) // "edit" action
-		{
-			Composite composite1 = new Composite(composite, SWT.NONE);
-			GridData data = new GridData(GridData.FILL_BOTH);
-			composite1.setLayoutData(data);
-			GridLayout layout = new GridLayout();
-			composite1.setLayout(layout);
-
-			pageContainer = new PageBook(composite1, SWT.NONE);
-			pageContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-			if (fCatalogElement.getType() == ICatalogElement.TYPE_ENTRY) {
-				CatalogElementPage entryPage = new CatalogEntryPage();
-				entryPage.createControl(pageContainer);
-				showPage(entryPage);
-			}
-			else if (fCatalogElement.getType() == ICatalogElement.TYPE_NEXT_CATALOG) {
-				CatalogElementPage nextCatalogPage = new NextCatalogPage();
-				nextCatalogPage.createControl(pageContainer);
-				showPage(nextCatalogPage);
-			}
-
-			return composite1;
-		}
-		return createMainComponentWithToolbar(composite);
-
-	}
-
-	protected Composite createMainComponentWithToolbar(Composite composite) {
-
-		FormLayout formLayout = new FormLayout();
-		formLayout.marginHeight = 5;
-		formLayout.marginWidth = 5;
-		composite.setLayout(formLayout);
-
-		Label label = new Label(composite, SWT.NONE);
-		FormData data = new FormData();
-		data.top = new FormAttachment(0, 0);
-		data.left = new FormAttachment(0, 0);
-		data.right = new FormAttachment(100, 0);
-		label.setLayoutData(data);
-
-		toolBar = new ToolBar(composite, SWT.BORDER | SWT.FLAT | SWT.VERTICAL);
-
-		data = new FormData();
-		data.top = new FormAttachment(label, 0);
-		data.left = new FormAttachment(0, 0);
-		data.bottom = new FormAttachment(100, 0);
-		// data.height = 250;
-		// data.width = 50;
-		toolBar.setLayoutData(data);
-
-		Composite composite1 = new Composite(composite, SWT.BORDER);
-		data = new FormData();
-		data.top = new FormAttachment(label, 0);
-		data.left = new FormAttachment(toolBar, 0, SWT.DEFAULT);
-		data.right = new FormAttachment(100, 0);
-		data.bottom = new FormAttachment(100, 0);
-		composite1.setLayoutData(data);
-		GridLayout layout = new GridLayout();
-		layout.marginHeight = 0;
-		layout.marginWidth = 0;
-		composite1.setLayout(layout);
-
-		// createPageBookPanel(composite1);
-		pageContainer = new PageBook(composite1, SWT.NONE);
-		pageContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-		// add pages for each type of catalog element
-		createCatalogEntryButton();
-		createNextCatalogButton();
-		if (toolBar.getItemCount() > 0) {
-			ToolItem item = toolBar.getItem(0);
-			showPage((CatalogElementPage) (item.getData()));
-		}
-		return composite1;
-	}
-
-	protected void createNextCatalogButton() {
-		CatalogElementPage page = new NextCatalogPage();
-		page.createControl(pageContainer);
-		ToolItem toolItem = new ToolItem(toolBar, SWT.PUSH);
-		toolItem.setImage(nextCatalogToolBarImage);
-		toolItem.setText(XMLCatalogMessages.EditCatalogEntryDialog_nextCatalogLabel);
-		toolItem.setData(page);
-		toolItem.addSelectionListener(new ToolBarItemSelectionChangeListener());
-
-	}
-
-	protected ICatalogElement getCatalogElement() {
-		return fCatalogElement;
-	}
-
-	protected String getDisplayValue(String string) {
-		return string != null ? string : ""; //$NON-NLS-1$
-	}
-
-	protected XMLCatalogFileType getMatchingFileType(String description) {
-		XMLCatalogFileType fileType = null;
-		for (Iterator i = CatalogFileTypeRegistryReader.getXMLCatalogFileTypes().iterator(); i.hasNext();) {
-			XMLCatalogFileType theFileType = (XMLCatalogFileType) i.next();
-			if ((theFileType.description != null) && theFileType.description.equals(description)) {
-				fileType = theFileType;
-			}
-		}
-		return fileType;
-	}
-
-	protected boolean showPage(CatalogElementPage page) {
-		if (pageContainer.isDisposed()) {
-			return false;
-		}
-		selectedPage = page;
-		pageContainer.setVisible(true);
-		pageContainer.showPage(selectedPage.getControl());
-		fCatalogElement = selectedPage.getData();
-		return true;
-	}
-
-	protected void updateErrorMessageLabel(Label errorMessageLabel) {
-		if (errorMessage != null) {
-			errorMessageLabel.setText(errorMessage);
-		}
-		else if (warningMessage != null) {
-			errorMessageLabel.setText(warningMessage);
-		}
-		else {
-			errorMessageLabel.setText("");
-		}
-	}
-
-	protected void updateOKButtonState() {
-		if (okButton != null) {
-			okButton.setEnabled(errorMessage == null);
-		}
-	}
-
-	protected Button createBrowseButton(Composite composite) {
-		Button browseButton = new Button(composite, SWT.FLAT);
-		// browseButton.setText(XMLCatalogMessages.
-		// UI_BUTTON_BROWSE"));
-		browseButton.setImage(borwseImage);
-		Rectangle r = borwseImage.getBounds();
-		GridData gd = new GridData();
-		int IMAGE_WIDTH_MARGIN = 6;
-		int IMAGE_HEIGHT_MARGIN = 6;
-		gd.heightHint = r.height + IMAGE_HEIGHT_MARGIN;
-		gd.widthHint = r.width + IMAGE_WIDTH_MARGIN;
-		browseButton.setLayoutData(gd);
-
-		return browseButton;
-
-	}
-
-	class DropDownSelectionListener extends SelectionAdapter {
-		private Menu menu = null;
-		private Control control;
-
-		public DropDownSelectionListener(Control aControl) {
-			super();
-			this.control = aControl;
-		}
-
-		public void widgetSelected(SelectionEvent event) {
-			// Create the menu if it has not already been created
-			if (menu == null) {
-				// Lazy create the menu.
-				menu = new Menu(getShell());
-				MenuItem menuItem = new MenuItem(menu, SWT.NONE);
-				menuItem.setText(XMLCatalogMessages.UI_BUTTON_MENU_BROWSE_WORKSPACE);
-				/*
-				 * Add a menu selection listener so that the menu is hidden
-				 * when the user selects an item from the drop down menu.
-				 */
-				menuItem.addSelectionListener(new SelectionAdapter() {
-					public void widgetSelected(SelectionEvent e) {
-						setMenuVisible(false);
-						invokeWorkspaceFileSelectionDialog();
-					}
-				});
-
-				menuItem = new MenuItem(menu, SWT.NONE);
-				menuItem.setText(XMLCatalogMessages.UI_BUTTON_MENU_BROWSE_FILE_SYSTEM);
-				/*
-				 * Add a menu selection listener so that the menu is hidden
-				 * when the user selects an item from the drop down menu.
-				 */
-				menuItem.addSelectionListener(new SelectionAdapter() {
-					public void widgetSelected(SelectionEvent e) {
-						setMenuVisible(false);
-						invokeFileSelectionDialog();
-					}
-				});
-
-			}
-
-			// Position the menu below and vertically aligned with the the
-			// drop down tool button.
-			Button button = (Button) event.widget;
-
-			// set location
-			Point ptBrowse = button.getLocation();
-			Rectangle rcBrowse = button.getBounds();
-			ptBrowse.y += rcBrowse.height;
-			ptBrowse = button.getParent().toDisplay(ptBrowse);
-			menu.setLocation(ptBrowse.x, ptBrowse.y);
-
-			setMenuVisible(true);
-
-		}
-
-		void setMenuVisible(boolean visible) {
-			menu.setVisible(visible);
-			// this.visible = visible;
-		}
-
-		void invokeWorkspaceFileSelectionDialog() {
-			FilterableSelectSingleFileDialog dialog = new FilterableSelectSingleFileDialog(getShell());
-			dialog.createAndOpen();
-
-			IFile file = dialog.getFile();
-			if (file != null) {
-				// remove leading slash from the value to avoid the
-				// whole leading slash ambiguity problem
-				//                    
-				String uri = file.getFullPath().toString();
-				while (uri.startsWith("/") || uri.startsWith("\\")) { //$NON-NLS-1$ //$NON-NLS-2$
-					uri = uri.substring(1);
-				}
-				if (control instanceof Text) {
-					((Text) control).setText(uri);
-				}
-
-			}
-		}
-
-		void invokeFileSelectionDialog() {
-			FileDialog dialog = new FileDialog(getShell(), SWT.SINGLE);
-			String file = dialog.open();
-			if ((control instanceof Text) && (file != null)) {
-				((Text) control).setText(file);
-			}
-		}
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ElementNodePage.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ElementNodePage.java
deleted file mode 100644
index 0ec61e6..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ElementNodePage.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogElement;
-
-
-public abstract class ElementNodePage {
-
-	Control fControl;
-
-	public ElementNodePage() {
-		super();
-
-	}
-
-	public abstract Control createControl(Composite parent);
-
-	public Control getControl() {
-		return fControl;
-	}
-
-	public abstract void saveData();
-
-	public abstract ICatalogElement getData();
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ImageFactory.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ImageFactory.java
deleted file mode 100644
index 3938a7e..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ImageFactory.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import java.util.Hashtable;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-public class ImageFactory {
-	public static final int TOP_LEFT = 1;
-	public static final int TOP_RIGHT = 2;
-	public static final int BOTTOM_LEFT = 3;
-	public static final int BOTTOM_RIGHT = 4;
-
-	protected static final int[][] OVERLAY_COORDINATE = {{0, 0}, {0, 2}, {2, 0}, {2, 2}};
-
-	protected static ImageFactory INSTANCE = new ImageFactory();
-
-	protected Hashtable compositeImageTable = new Hashtable();
-
-	public ImageFactory() {
-		super();
-	}
-
-	public Image getImage(String iconName) {
-		ImageRegistry imageRegistry = XMLUIPlugin.getDefault().getImageRegistry();
-
-		if (imageRegistry.get(iconName) != null) {
-			return imageRegistry.get(iconName);
-		}
-		else {
-			imageRegistry.put(iconName, ImageDescriptor.createFromFile(getClass(), iconName));
-			return imageRegistry.get(iconName);
-		}
-	}
-
-	public Image createCompositeImage(Image base, Image overlay, int overlayPosition) {
-		String key = base + "*" + overlay + "*" + overlayPosition; //$NON-NLS-1$ //$NON-NLS-2$
-		Image result = (Image) compositeImageTable.get(key);
-		if (result == null) {
-			ImageDescriptor overlays[][] = new ImageDescriptor[3][3];
-			int[] coord = OVERLAY_COORDINATE[overlayPosition];
-			overlays[coord[1]][coord[0]] = new ImageBasedImageDescriptor(overlay);
-			OverlayIcon icon = new OverlayIcon(new ImageBasedImageDescriptor(base), overlays, new Point(16, 16));
-			result = icon.createImage();
-			compositeImageTable.put(key, result);
-		}
-		return result;
-	}
-
-
-	public static ImageDescriptor createImageDescriptorWrapper(Image image) {
-		return new ImageBasedImageDescriptor(image);
-	}
-
-	/**
-	 * An OverlayIcon consists of a main icon and several adornments.
-	 */
-	class OverlayIcon extends CompositeImageDescriptor {
-
-		static final int DEFAULT_WIDTH = 22;
-
-		static final int DEFAULT_HEIGHT = 16;
-
-		private Point fSize = null;
-
-		private ImageDescriptor fBase;
-
-		private ImageDescriptor fOverlays[][];
-
-		public OverlayIcon(ImageDescriptor base, ImageDescriptor[][] overlays, Point size) {
-			fBase = base;
-			fOverlays = overlays;
-			fSize = size;
-		}
-
-		protected void drawBottomLeft(ImageDescriptor[] overlays) {
-			if (overlays == null) {
-				return;
-			}
-			int length = overlays.length;
-			int x = 0;
-			for (int i = 0; i < 3; i++) {
-				if ((i < length) && (overlays[i] != null)) {
-					ImageData id = overlays[i].getImageData();
-					drawImage(id, x, getSize().y - id.height);
-					x += id.width;
-				}
-			}
-		}
-
-		protected void drawBottomRight(ImageDescriptor[] overlays) {
-			if (overlays == null) {
-				return;
-			}
-			int length = overlays.length;
-			int x = getSize().x;
-			for (int i = 2; i >= 0; i--) {
-				if ((i < length) && (overlays[i] != null)) {
-					ImageData id = overlays[i].getImageData();
-					x -= id.width;
-					drawImage(id, x, getSize().y - id.height);
-				}
-			}
-		}
-
-		/**
-		 * @see CompositeImageDescriptor#drawCompositeImage(int, int)
-		 */
-		protected void drawCompositeImage(int width, int height) {
-			ImageData bg;
-			if ((fBase == null) || ((bg = fBase.getImageData()) == null)) {
-				bg = DEFAULT_IMAGE_DATA;
-			}
-			drawImage(bg, 0, 0);
-
-			if (fOverlays != null) {
-				if (fOverlays.length > 0) {
-					drawTopRight(fOverlays[0]);
-				}
-
-				if (fOverlays.length > 1) {
-					drawBottomRight(fOverlays[1]);
-				}
-
-				if (fOverlays.length > 2) {
-					drawBottomLeft(fOverlays[2]);
-				}
-
-				if (fOverlays.length > 3) {
-					drawTopLeft(fOverlays[3]);
-				}
-			}
-		}
-
-		protected void drawTopLeft(ImageDescriptor[] overlays) {
-			if (overlays == null) {
-				return;
-			}
-			int length = overlays.length;
-			int x = 0;
-			for (int i = 0; i < 3; i++) {
-				if ((i < length) && (overlays[i] != null)) {
-					ImageData id = overlays[i].getImageData();
-					drawImage(id, x, 0);
-					x += id.width;
-				}
-			}
-		}
-
-		protected void drawTopRight(ImageDescriptor[] overlays) {
-			if (overlays == null) {
-				return;
-			}
-			int length = overlays.length;
-			int x = getSize().x;
-			for (int i = 2; i >= 0; i--) {
-				if ((i < length) && (overlays[i] != null)) {
-					ImageData id = overlays[i].getImageData();
-					x -= id.width;
-					drawImage(id, x, 0);
-				}
-			}
-		}
-
-		/**
-		 * @see CompositeImageDescriptor#getSize()
-		 */
-		protected Point getSize() {
-			return fSize;
-		}
-	}
-
-	static class ImageBasedImageDescriptor extends ImageDescriptor {
-		protected Image image;
-
-		public ImageBasedImageDescriptor(Image image) {
-			this.image = image;
-		}
-
-		public ImageData getImageData() {
-			return image.getImageData();
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/URIUtils.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/URIUtils.java
deleted file mode 100644
index ea0c2bc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/URIUtils.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-
-public class URIUtils {
-	
-	  private static final String PROTOCOL_PATTERN = ":"; 
-	  private static final String FILE_PROTOCOL = "file:";
-	  private static final String PLATFORM_RESOURCE_PROTOCOL = "platform:/resource/";
-	  private static final String LOCAL_FILE_PROTOCOL_FORWARD_SLASH = "\\\\\\";
-	  private static final String LOCAL_FILE_PROTOCOL_BACK_SLASH = "///";
-	  private static final char   PATH_SEPARATOR_FORWARD_SLASH = '/';
-	  private static final char   PATH_SEPARATOR_BACK_SLASH = '\\';
-	  
-	  public static String convertURIToLocation(String uri) {
-			String location = uri;
-			if (uri != null) {
-				if (uri.startsWith(FILE_PROTOCOL)) {
-					location = org.eclipse.wst.common.uriresolver.internal.URI.createURI(uri).toFileString();
-					if (location != null && (location.startsWith(LOCAL_FILE_PROTOCOL_BACK_SLASH)
-							|| location.startsWith(LOCAL_FILE_PROTOCOL_FORWARD_SLASH))) {
-						location = location.substring(LOCAL_FILE_PROTOCOL_BACK_SLASH.length());
-					}
-				} else if (uri.startsWith(PLATFORM_RESOURCE_PROTOCOL)) {
-					location = uri.substring(PLATFORM_RESOURCE_PROTOCOL.length());
-				}
-			}
-		return location;
-	  }
-	  
-	  public static String convertLocationToURI(String location) {
-		  String uri = location;
-			if (!URIHelper.hasProtocol(location)) {
-				uri = URIHelper.isAbsolute(location)? org.eclipse.wst.common.uriresolver.internal.URI.createFileURI(location).toString()
-						: URIHelper.prependPlatformResourceProtocol(location);
-			}
-			if (uri.startsWith(FILE_PROTOCOL) && uri.indexOf(PROTOCOL_PATTERN, FILE_PROTOCOL.length()) != -1) {
-				uri = URIHelper.ensureFileURIProtocolFormat(uri);
-			}
-			uri = uri.replace(PATH_SEPARATOR_BACK_SLASH, PATH_SEPARATOR_FORWARD_SLASH);
-			return uri;
-	  }
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntriesView.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntriesView.java
deleted file mode 100644
index 92f8bb5..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntriesView.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.xml.core.internal.catalog.Catalog;
-import org.eclipse.wst.xml.core.internal.catalog.CatalogElement;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogElement;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-
-
-public class XMLCatalogEntriesView extends Composite {
-	protected Button newButton;
-	protected Button editButton;
-	protected Button deleteButton;
-	protected XMLCatalogTreeViewer tableViewer;
-	protected ICatalog workingUserCatalog;
-	protected ICatalog systemCatalog;
-
-	// protected boolean isPageEnabled = true;
-
-	public XMLCatalogEntriesView(Composite parent, ICatalog workingUserCatalog, ICatalog systemCatalog) {
-		super(parent, SWT.NONE);
-		this.workingUserCatalog = workingUserCatalog;
-		this.systemCatalog = systemCatalog;
-
-		GridLayout gridLayout = new GridLayout();
-		gridLayout.numColumns = 2;
-		this.setLayout(gridLayout);
-
-		tableViewer = createTableViewer(this);
-		tableViewer.setInput("dummy"); //$NON-NLS-1$
-		
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=202692
-		// specifically set size of tree before expanding it
-		Point initialSize = tableViewer.getTree().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		GridData gridData = new GridData(GridData.FILL_BOTH);
-		gridData.widthHint = initialSize.x;
-		gridData.heightHint = initialSize.y;
-		tableViewer.getControl().setLayoutData(gridData);
-		
-		tableViewer.expandToLevel(2);
-		tableViewer.reveal(XMLCatalogTreeViewer.USER_SPECIFIED_ENTRIES_OBJECT);
-		
-		ISelectionChangedListener listener = new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				updateWidgetEnabledState();
-			}
-		};
-		tableViewer.addSelectionChangedListener(listener);
-
-		createButtons(this);
-	}
-
-	public static String removeLeadingSlash(String uri) {
-		// remove leading slash from the value to avoid the whole leading
-		// slash ambiguity problem
-		//       
-		if (uri != null) {
-			while (uri.startsWith("/") || uri.startsWith("\\")) //$NON-NLS-1$ //$NON-NLS-2$
-			{
-				uri = uri.substring(1);
-			}
-		}
-		return uri;
-	}
-
-	protected XMLCatalogTreeViewer createTableViewer(Composite parent) {
-		String headings[] = new String[2];
-		headings[0] = XMLCatalogMessages.UI_LABEL_KEY;
-		headings[1] = XMLCatalogMessages.UI_LABEL_URI;
-
-		XMLCatalogTreeViewer theTableViewer = new XMLCatalogTreeViewer(parent, workingUserCatalog, systemCatalog);
-		return theTableViewer;
-	}
-
-	protected void createButtons(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridData gd = new GridData();
-		gd.verticalAlignment = GridData.BEGINNING;
-		composite.setLayoutData(gd);
-		GridLayout gridLayout = new GridLayout();
-		gridLayout.marginHeight = 0;
-		gridLayout.marginWidth = 0;
-		gridLayout.marginLeft = 3;
-		composite.setLayout(gridLayout);
-
-		SelectionListener selectionListener = new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				if (e.widget == newButton) {
-					performNew();
-				}
-				else if (e.widget == editButton) {
-					performEdit();
-				}
-				else if (e.widget == deleteButton) {
-					performDelete();
-				}
-			}
-		};
-
-		// add the "New..." button
-		//
-		gd = new GridData();
-		gd.horizontalAlignment = GridData.FILL;
-		gd.grabExcessHorizontalSpace = true;
-
-		newButton = new Button(composite, SWT.NONE);
-		newButton.setText(XMLCatalogMessages.UI_BUTTON_NEW);
-		// WorkbenchHelp.setHelp(newButton,
-		// XMLBuilderContextIds.XMLP_MAPPING_NEW);
-		newButton.setLayoutData(gd);
-		newButton.addSelectionListener(selectionListener);
-
-		// add the "Edit..." button
-		//
-		gd = new GridData();
-		gd.horizontalAlignment = GridData.FILL;
-		gd.grabExcessHorizontalSpace = true;
-		editButton = new Button(composite, SWT.NONE);
-		editButton.setText(XMLCatalogMessages.UI_BUTTON_EDIT);
-		// WorkbenchHelp.setHelp(editButton,
-		// XMLBuilderContextIds.XMLP_MAPPING_EDIT);
-		editButton.setLayoutData(gd);
-		editButton.addSelectionListener(selectionListener);
-
-		// add the "Delete" button
-		//
-		gd = new GridData();
-		gd.horizontalAlignment = GridData.FILL;
-		gd.grabExcessHorizontalSpace = true;
-		deleteButton = new Button(composite, SWT.NONE);
-		deleteButton.setText(XMLCatalogMessages.UI_BUTTON_REMOVE);
-		// WorkbenchHelp.setHelp(deleteButton,
-		// XMLBuilderContextIds.XMLP_MAPPING_DELETE);
-		deleteButton.setLayoutData(gd);
-		deleteButton.addSelectionListener(selectionListener);
-		
-		gd = new GridData();
-		gd.horizontalAlignment = GridData.FILL;
-		gd.grabExcessHorizontalSpace = true;
-		gd.horizontalSpan = 4;
-
-		Button hiddenButton = new Button(composite, SWT.NONE);
-		hiddenButton.setLayoutData(gd);
-		hiddenButton.setVisible(false);
-		hiddenButton.setEnabled(false);
-
-		// a cruddy hack so that the PreferenceDialog doesn't close every time
-		// we press 'enter'
-		//
-		getShell().setDefaultButton(hiddenButton);
-		updateWidgetEnabledState();
-	}
-
-	public void refresh() {
-		tableViewer.refresh();// XMLCatalogTreeViewer.USER_SPECIFIED_ENTRIES_OBJECT);
-	}
-
-	protected EditCatalogEntryDialog invokeDialog(String title, ICatalogElement entry, ICatalog catalog) {
-		Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
-		EditCatalogEntryDialog dialog = entry != null ? new EditCatalogEntryDialog(shell, entry, catalog) : new EditCatalogEntryDialog(shell, catalog);
-		dialog.create();
-		dialog.getShell().setText(title);
-		dialog.setBlockOnOpen(true);
-		dialog.open();
-		return dialog;
-	}
-
-	protected EditCatalogEntryDialog invokeDialog(String title, ICatalog catalog) {
-		return invokeDialog(title, null, catalog);
-	}
-
-
-	protected void performNew() {
-
-		// ICatalogEntry newEntry =
-		// (ICatalogEntry)workingUserCatalog.createCatalogElement(ICatalogElement.TYPE_ENTRY);
-		EditCatalogEntryDialog dialog = invokeDialog(XMLCatalogMessages.UI_LABEL_NEW_DIALOG_TITLE, workingUserCatalog);
-		ICatalogElement element = dialog.getCatalogElement();
-		if (dialog.getReturnCode() == Window.OK) {
-			workingUserCatalog.addCatalogElement(element);
-			tableViewer.setSelection(new StructuredSelection(element), true);
-			tableViewer.refresh();
-		}
-	}
-
-	protected void performEdit() {
-		ISelection selection = tableViewer.getSelection();
-		Object selectedObject = (selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;
-
-		if (selectedObject instanceof ICatalogElement) {
-			ICatalogElement oldEntry = (ICatalogElement) selectedObject;
-			ICatalogElement newEntry = (ICatalogElement) ((CatalogElement) oldEntry).clone();
-
-			EditCatalogEntryDialog dialog = invokeDialog(XMLCatalogMessages.UI_LABEL_EDIT_DIALOG_TITLE, newEntry, workingUserCatalog);
-			if (dialog.getReturnCode() == Window.OK) {
-				// delete the old value if the 'mapFrom' has changed
-				//
-				workingUserCatalog.removeCatalogElement(oldEntry);
-
-				// update the new mapping
-				//
-				workingUserCatalog.addCatalogElement(newEntry);
-				tableViewer.setSelection(new StructuredSelection(newEntry));
-			}
-		}
-	}
-
-	protected void performDelete() {
-		ISelection selection = tableViewer.getSelection();
-		if(selection instanceof IStructuredSelection) {
-			IStructuredSelection structuredSelection = (IStructuredSelection)selection;
-			Iterator iterator = structuredSelection.iterator();
-			while(iterator.hasNext()) {
-				Object selectedObject = iterator.next();
-				if (selectedObject instanceof ICatalogElement) {
-					ICatalogElement catalogElement = (ICatalogElement) selectedObject;
-					workingUserCatalog.removeCatalogElement(catalogElement);
-				}
-			}
-		}
-	}
-
-	protected void updateWidgetEnabledState() {
-		boolean isEditable = false;
-		ISelection selection = tableViewer.getSelection();
-		boolean multipleSelection = false;
-		if(selection instanceof IStructuredSelection) {
-			IStructuredSelection structuredSelection = (IStructuredSelection)selection;
-			if(structuredSelection.size() > 1) {
-				multipleSelection = true;
-			}
-			Object selectedObject = structuredSelection.getFirstElement();
-			if (selectedObject instanceof ICatalogElement) {
-				ICatalogElement[] elements = ((Catalog) workingUserCatalog).getCatalogElements();
-				// dw List entriesList = new ArrayList(elements.length);
-				for (int i = 0; i < elements.length; i++) {
-					ICatalogElement element = elements[i];
-					isEditable = selectedObject.equals(element);
-					if (isEditable) {
-						break;
-					}
-				}
-			}
-		}
-
-		// if (isPageEnabled)
-		{
-			editButton.setEnabled(isEditable & !multipleSelection);
-			deleteButton.setEnabled(isEditable);
-		}
-	}
-
-	/*
-	 * public void setPageEnabled(boolean enabled) { isPageEnabled = enabled;
-	 * 
-	 * tableViewer.getControl().setEnabled(isPageEnabled);
-	 * 
-	 * newButton.setEnabled(isPageEnabled);
-	 * editButton.setEnabled(isPageEnabled);
-	 * deleteButton.setEnabled(isPageEnabled); }
-	 */
-	public void updatePage() {
-		refresh();
-		updateWidgetEnabledState();
-	}
-
-	public Viewer getViewer() {
-		return tableViewer;
-	}
-
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntryDetailsView.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntryDetailsView.java
deleted file mode 100644
index fe97a1c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntryDetailsView.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-
-
-
-public class XMLCatalogEntryDetailsView {
-	protected Text detailsText;
-	protected ScrollBar verticalScroll, horizontalScroll;
-
-	public XMLCatalogEntryDetailsView(Composite parent) {
-		Color color = parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
-
-		detailsText = new Text(parent, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
-
-		GridData data = new GridData(GridData.FILL_BOTH);
-		data.heightHint = 85;
-		detailsText.setLayoutData(data);
-
-		verticalScroll = detailsText.getVerticalBar();
-		// verticalScroll.setVisible(false);
-		horizontalScroll = detailsText.getHorizontalBar();
-		detailsText.setEditable(false);
-		detailsText.setBackground(color);
-	}
-
-	public void setCatalogElement(ICatalogEntry entry) {
-		if (entry == null) {
-			detailsText.setText(""); //$NON-NLS-1$
-			return;
-		}
-
-		String value = getDisplayValue(entry != null ? entry.getURI() : ""); //$NON-NLS-1$
-		String line1 = XMLCatalogMessages.UI_LABEL_DETAILS_URI_COLON + "\t\t" + value; //$NON-NLS-1$
-
-		String line0;
-		if (value.startsWith("jar:file:")) {
-			String jarFile = URIUtils.convertURIToLocation(URIHelper.ensureURIProtocolFormat(value.substring("jar:".length(), value.indexOf('!'))));
-			String internalFile = URIUtils.convertURIToLocation(URIHelper.ensureURIProtocolFormat("file://" + value.substring(value.indexOf('!') + 1)));
-			line0 = XMLCatalogMessages.UI_LABEL_DETAILS_URI_LOCATION + "\t" + internalFile + " " + XMLCatalogMessages.UI_LABEL_DETAILS_IN_JAR_FILE + " " + jarFile;
-		}
-		else {
-			value = URIUtils.convertURIToLocation(value);
-			line0 = XMLCatalogMessages.UI_LABEL_DETAILS_URI_LOCATION + "\t" + value; //$NON-NLS-1$
-
-		}
-
-		value = entry != null ? getKeyTypeValue(entry) : ""; //$NON-NLS-1$
-		String line2 = XMLCatalogMessages.UI_KEY_TYPE_DETAILS_COLON + "\t" + value; //$NON-NLS-1$
-
-		value = getDisplayValue(entry != null ? entry.getKey() : ""); //$NON-NLS-1$
-		String line3 = XMLCatalogMessages.UI_LABEL_DETAILS_KEY_COLON + "\t\t" + value; //$NON-NLS-1$
-
-		String entireString = "\n" + line0 + "\n" + line1 + "\n" + line2 + "\n" + line3; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		detailsText.setText(entireString);
-	}
-
-	public void setCatalogElement(INextCatalog nextCatalog) {
-		String value = getDisplayValue(nextCatalog != null ? nextCatalog.getCatalogLocation() : ""); //$NON-NLS-1$
-		String line1 = XMLCatalogMessages.UI_LABEL_DETAILS_URI_COLON + "\t\t" + value; //$NON-NLS-1$
-
-		String line0 = XMLCatalogMessages.UI_LABEL_DETAILS_URI_LOCATION + "\t" + URIUtils.convertURIToLocation(value);
-
-		String entireString = "\n" + line0 + "\n" + line1; //$NON-NLS-1$
-		detailsText.setText(entireString);
-	}
-
-	protected String getDisplayValue(String string) {
-		return string != null ? string : ""; //$NON-NLS-1$
-	}
-
-	protected String getKeyTypeValue(ICatalogEntry entry) {
-		String result = null;
-		if ((entry.getURI() != null) && entry.getURI().endsWith("xsd")) //$NON-NLS-1$
-		{
-			result = (entry.getEntryType() == ICatalogEntry.ENTRY_TYPE_URI) ? XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_XSD_PUBLIC : XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_XSD_SYSTEM;
-		}
-		else {
-			switch (entry.getEntryType()) {
-				case ICatalogEntry.ENTRY_TYPE_PUBLIC :
-					result = XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_DTD_PUBLIC;
-					break;
-				case ICatalogEntry.ENTRY_TYPE_SYSTEM :
-					result = XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_DTD_SYSTEM;
-					break;
-				default :
-					result = XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_URI;
-					break;
-			}
-
-		}
-		return result;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogFileType.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogFileType.java
deleted file mode 100644
index aadb767..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogFileType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import com.ibm.icu.util.StringTokenizer;
-
-import org.eclipse.swt.graphics.Image;
-
-
-public class XMLCatalogFileType {
-	public String description;
-	public List extensions = new ArrayList();
-	public String iconFileName;
-	public Image icon;
-
-	public void addExtensions(String contributedExtensions) {
-		List list = parseExtensions(contributedExtensions);
-		for (Iterator i = list.iterator(); i.hasNext();) {
-			String extension = (String) i.next();
-			if (!extensions.contains(extension)) {
-				extensions.add(extension);
-			}
-		}
-	}
-
-	protected List parseExtensions(String string) {
-		List list = new ArrayList();
-		for (StringTokenizer st = new StringTokenizer(string, ", "); st.hasMoreTokens();) //$NON-NLS-1$
-		{
-			String token = st.nextToken();
-			if (token != null) {
-				list.add(token);
-			}
-		}
-		return list;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogMessages.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogMessages.java
deleted file mode 100644
index 177c196..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogMessages.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by XML Editor
- * 
- * @plannedfor 1.0
- */
-public class XMLCatalogMessages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.wst.xml.ui.internal.catalog.XMLCatalogResources";//$NON-NLS-1$
-
-	public static String UI_WIZARD_SCHEMA_AND_NAME_SPACE_INFO;
-	public static String UI_LABEL_NAME_SPACE_PREFIX;
-	public static String UI_LABEL_NAME_SPACE_URI;
-	public static String UI_LABEL_XSD_LOCATION;
-	public static String UI_LABEL_DOCTYPE_INFORMATION;
-	public static String UI_LABEL_SYSTEM_ID;
-	public static String UI_LABEL_PUBLIC_ID;
-	public static String UI_LABEL_SELECT_FILE;
-	public static String UI_LABEL_KEY;
-	public static String UI_LABEL_KEY_COLON;
-	public static String UI_LABEL_DETAILS_KEY_COLON;
-	public static String UI_LABEL_DETAILS_IN_JAR_FILE;
-	public static String UI_LABEL_URI;
-	public static String UI_LABEL_LOCATION_COLON;
-	public static String UI_LABEL_CATALOG_URI_COLON;
-	public static String UI_LABEL_DETAILS_URI_COLON;
-	public static String UI_LABEL_DETAILS_URI_LOCATION;
-	public static String UI_KEY_TYPE_COLON;
-	public static String UI_KEY_TYPE_DETAILS_COLON;
-	public static String UI_KEY_TYPE_DESCRIPTION_XSD_PUBLIC;
-	public static String UI_KEY_TYPE_DESCRIPTION_XSD_SYSTEM;
-	public static String UI_KEY_TYPE_DESCRIPTION_DTD_PUBLIC;
-	public static String UI_KEY_TYPE_DESCRIPTION_DTD_SYSTEM;
-	public static String UI_KEY_TYPE_DESCRIPTION_URI;
-	public static String UI_LABEL_SPECIFY_ALTERNATIVE_WEB_URL;
-	public static String UI_WARNING_URI_MUST_NOT_HAVE_DOTS;
-	public static String UI_LABEL_FILE_SELECTION;
-	public static String UI_LABEL_CHOOSE_FILE_TO_ADD_TO_CATALOG;
-
-
-	public static String UI_WARNING_URI_NOT_FOUND_COLON;
-	public static String UI_WARNING_URI_NOT_FOUND_LONG;
-	public static String UI_WARNING_INVALID_FILE;
-	public static String UI_WARNING_INVALID_FILE_LONG;
-	public static String UI_WARNING_NO_ELEMENT;
-	public static String UI_WARNING_NO_ELEMENT_DTD_LONG;
-	public static String UI_WARNING_NO_ELEMENT_XSD_LONG;
-	public static String UI_WARNING_SHOULD_BE_FULLY_QUALIFIED_URI;
-	public static String UI_WARNING_DUPLICATE_ENTRY;
-
-
-	// NewModelWizard
-	public static String UI_INVALID_GRAMMAR_ERROR;
-	public static String UI_BUTTON_BROWSE;
-
-	// XMLCatalogIdMappingPage
-	public static String UI_LABEL_MAP_TO;
-	public static String UI_LABEL_MAP_FROM;
-	public static String UI_BUTTON_NEW;
-	public static String UI_BUTTON_EDIT;
-	public static String UI_BUTTON_DELETE;
-	public static String UI_BUTTON_REMOVE;
-	public static String UI_LABEL_NEW_DIALOG_TITLE;
-	public static String UI_LABEL_EDIT_DIALOG_TITLE;
-
-
-	// XMLCatalogPreferencePage
-	public static String UI_LABEL_USER_ENTRIES;
-	public static String UI_LABEL_USER_ENTRIES_TOOL_TIP;
-	public static String UI_LABEL_SYSTEM_ENTRIES;
-	public static String UI_LABEL_SYSTEM_ENTRIES_TOOL_TIP;
-	public static String UI_BUTTON_CHANGE;
-	public static String UI_LABEL_SELECT_PROJECT;
-	public static String UI_LABEL_SPECIFY_PROJECT_DESCRIPTION;
-	public static String UI_WARNING_NO_PROJECTS_CREATED;
-	public static String UI_WARNING_PROJECT_NOT_SPECIFIED;
-	public static String UI_WARNING_PROJECT_DOES_NOT_EXIST;
-	public static String UI_LABEL_PROJECT_TO_USE;
-	public static String UI_LABEL_CATALOG_SAVE_ERROR;
-	public static String UI_LABEL_CATALOG_COULD_NOT_BE_SAVED;
-	public static String UI_LABEL_ADVANCED;
-	public static String UI_LABEL_ADVANCED_XML_CATALOG_PREFS;
-	public static String UI_LABEL_SPECIFY_PERSISTENCE_FILE;
-	public static String UI_LABEL_SAVE_CATALOG_DIALOG_TITLE;
-	public static String UI_LABEL_SAVE_CATALOG_DIALOG_DESC;
-	public static String UI_LABEL_BROWSE_CATALOG_FILE_TITLE;
-	public static String UI_LABEL_BROWSE_CATALOG_FILE_DESC;
-	public static String UI_LABEL_DETAILS;
-	public static String UI_LABEL_USER_SPECIFIED_ENTRIES;
-	public static String UI_LABEL_PLUGIN_SPECIFIED_ENTRIES;
-	public static String UI_LABEL_PLATFORM_RESOURCE;
-	public static String UI_LABEL_FILE_SYSTEM_RESOURCE;
-	// AdvancedOptionsDialog
-	public static String UI_BUTTON_IMPORT;
-	public static String UI_BUTTON_EXPORT;
-
-	public static String UI_LABEL_IMPORT_DIALOG_TITLE;
-	public static String UI_LABEL_IMPORT_DIALOG_HEADING;
-	public static String UI_LABEL_IMPORT_DIALOG_MESSAGE;
-
-	public static String UI_LABEL_EXPORT_DIALOG_TITLE;
-	public static String UI_LABEL_EXPORT_DIALOG_HEADING;
-	public static String UI_LABEL_EXPORT_DIALOG_MESSAGE;
-	public static String ERROR_SAVING_FILE;
-	public static String UI_LABEL_FILE_IS_READ_ONLY;
-	public static String UI_LABEL_DIALOG_DESCRIPTION;
-
-	public static String EditCatalogEntryDialog_catalogEntryLabel;
-	public static String EditCatalogEntryDialog_nextCatalogLabel;
-	public static String UI_BUTTON_MENU_BROWSE_WORKSPACE;
-	public static String UI_BUTTON_MENU_BROWSE_FILE_SYSTEM;
-	public static String UI_LABEL_SELECT_FILE_FILTER_CONTROL;
-	public static String UI_TEXT_SELECT_FILE_FILTER_CONTROL;
-
-
-
-	static {
-		// load message values from bundle file
-		NLS.initializeMessages(BUNDLE_NAME, XMLCatalogMessages.class);
-	}
-
-	private XMLCatalogMessages() {
-		// cannot create new instance
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogPreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogPreferencePage.java
deleted file mode 100644
index 7316e01..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogPreferencePage.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     David Carver/STAR Standard - d_a_carver@yahoo.com - bug 192568
- *            Removed Advanced button - Functionality is now in the
- *            Import/Export XML Catalog Wizards. 
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.CatalogSet;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEvent;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogListener;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-
-public class XMLCatalogPreferencePage extends PreferencePage implements IWorkbenchPreferencePage, ICatalogListener {
-
-	protected XMLCatalogEntriesView catalogEntriesView;
-
-	protected ICatalog workingUserCatalog;
-
-	protected ICatalog systemCatalog;
-
-	protected ICatalog userCatalog;
-
-	protected ICatalog defaultCatalog;
-
-	protected Button advancedButton;
-
-	public XMLCatalogPreferencePage() {
-		defaultCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
-		INextCatalog[] nextCatalogs = defaultCatalog.getNextCatalogs();
-		for (int i = 0; i < nextCatalogs.length; i++) {
-			INextCatalog catalog = nextCatalogs[i];
-			ICatalog referencedCatalog = catalog.getReferencedCatalog();
-			if (referencedCatalog != null) {
-				if (XMLCorePlugin.SYSTEM_CATALOG_ID.equals(referencedCatalog.getId())) {
-					systemCatalog = referencedCatalog;
-				}
-				else if (XMLCorePlugin.USER_CATALOG_ID.equals(referencedCatalog.getId())) {
-					userCatalog = referencedCatalog;
-				}
-			}
-		}
-	}
-
-	public void dispose() {
-		super.dispose();
-		workingUserCatalog.removeListener(this);
-	}
-
-	/**
-	 * Refresh the view in responce to an event sent by the Catalog
-	 */
-	public void catalogChanged(ICatalogEvent event) {
-		catalogEntriesView.updatePage();
-	}
-
-	/**
-	 * Creates preference page controls on demand.
-	 * 
-	 * @param parent
-	 *            the parent for the preference page
-	 */
-	protected Control createContents(Composite parent) {
-		// we create a working copy of the 'User Settings' for the Catalog
-		// that we can modify
-		CatalogSet tempCatalogSet = new CatalogSet();
-		workingUserCatalog = tempCatalogSet.lookupOrCreateCatalog("working", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
-		// TODO: add entries from the nested catalogs as well
-		workingUserCatalog.addEntriesFromCatalog(userCatalog);
-		workingUserCatalog.addListener(this);
-		noDefaultAndApplyButton();
-		Composite composite = new Composite(parent, SWT.NULL);
-		// WorkbenchHelp.setHelp(composite, new
-		// ControlContextComputer(composite,
-		// XMLBuilderContextIds.XMLP_CATALOG_PAGE));
-		composite.setLayout(new GridLayout());
-		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-		createCatalogEntriesView(composite);
-		createCatalogDetailsView(composite);
-		//createAdvancedButton(composite);
-		// catalogEntriesView.updatePage();
-		applyDialogFont(composite);
-
-		return composite;
-	}
-
-	/**
-	 * @deprecated
-	 * @param composite
-	 */
-	protected void createAdvancedButton(Composite composite) {
-		Composite panel = new Composite(composite, SWT.NONE);
-		GridLayout gridLayout = new GridLayout();
-		gridLayout.numColumns = 3;
-		panel.setLayout(gridLayout);
-		panel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		// TODO... is there a better way to expand the page width?
-		// This invisible label is created to force the width of the page to
-		// be
-		// wide enough to show
-		// the rather long uri and key fields of a catalog entry.
-		Label widthFudger = new Label(panel, SWT.NONE);
-		String widthFudgerString = ""; //$NON-NLS-1$
-		for (int i = 0; i < 55; i++) {
-			widthFudgerString += "x"; //$NON-NLS-1$
-		}
-		widthFudger.setText(widthFudgerString);
-		widthFudger.setVisible(false);
-		Composite placeHolder = new Composite(panel, SWT.NONE);
-		placeHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		advancedButton = new Button(panel, SWT.NONE);
-		advancedButton.setText(XMLCatalogMessages.UI_LABEL_ADVANCED);
-		SelectionListener selectionListener = new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				AdvancedOptionsDialog dialog = new AdvancedOptionsDialog(getShell(), workingUserCatalog);
-				dialog.create();
-				dialog.getShell().setText(XMLCatalogMessages.UI_LABEL_ADVANCED_XML_CATALOG_PREFS);
-				dialog.setBlockOnOpen(true);
-				dialog.open();
-			}
-		};
-		advancedButton.addSelectionListener(selectionListener);
-	}
-
-	public boolean isSameFileName(String a, String b) {
-		boolean result = false;
-		if ((a == null) && (b == null)) {
-			result = true;
-		}
-		else if ((a != null) && (b != null)) {
-			result = a.equals(b);
-		}
-		return result;
-	}
-
-	protected void createCatalogEntriesView(Composite parent) {
-		Group group = new Group(parent, SWT.NONE);
-		group.setLayout(new GridLayout());
-		group.setLayoutData(new GridData(GridData.FILL_BOTH));
-		group.setText(XMLCatalogMessages.UI_LABEL_USER_ENTRIES);
-		group.setToolTipText(XMLCatalogMessages.UI_LABEL_USER_ENTRIES_TOOL_TIP);
-		// WorkbenchHelp.setHelp(userEntriesGroup, new
-		// ControlContextComputer(userEntriesGroup,
-		// XMLBuilderContextIds.XMLP_CATALOG_USER_GROUP));
-		catalogEntriesView = new XMLCatalogEntriesView(group, workingUserCatalog, systemCatalog);
-		catalogEntriesView.setLayoutData(new GridData(GridData.FILL_BOTH));
-	}
-
-	protected void createCatalogDetailsView(Composite parent) {
-		Group detailsGroup = new Group(parent, SWT.NONE);
-		detailsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		detailsGroup.setLayout(new GridLayout());
-		detailsGroup.setText(XMLCatalogMessages.UI_LABEL_DETAILS);
-		final XMLCatalogEntryDetailsView detailsView = new XMLCatalogEntryDetailsView(detailsGroup);
-		ISelectionChangedListener listener = new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				ISelection selection = event.getSelection();
-				Object selectedObject = (selection instanceof IStructuredSelection) && ((IStructuredSelection) selection).size() == 1 ? ((IStructuredSelection) selection).getFirstElement() : null;
-				if (selectedObject instanceof ICatalogEntry) {
-					ICatalogEntry entry = (ICatalogEntry) selectedObject;
-					detailsView.setCatalogElement(entry);
-				}
-				else if (selectedObject instanceof INextCatalog) {
-					INextCatalog entry = (INextCatalog) selectedObject;
-					detailsView.setCatalogElement(entry);
-				}
-				else {
-					detailsView.setCatalogElement((ICatalogEntry) null);
-				}
-
-			}
-		};
-		catalogEntriesView.getViewer().addSelectionChangedListener(listener);
-	}
-
-	/**
-	 * Do anything necessary because the OK button has been pressed.
-	 * 
-	 * @return whether it is okay to close the preference page
-	 */
-	public boolean performOk() {
-		return storeValues();
-	}
-
-	/**
-	 * @see IWorkbenchPreferencePage
-	 */
-	public void init(IWorkbench workbench) {
-	}
-
-	/**
-	 * Stores the values of the controls back to the preference store.
-	 */
-	private boolean storeValues() {
-		// dw Object fileObject = null;
-		try {
-			// update the userCatalog so that its the same as the working
-			// catalog
-			userCatalog.clear();
-			// TODO add entries from the nested catalogs?
-			userCatalog.addEntriesFromCatalog(workingUserCatalog);
-			// now save the userCatalog
-			userCatalog.save();
-		}
-		catch (Exception e) {
-		}
-		return true;
-	}
-
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogResources.properties b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogResources.properties
deleted file mode 100644
index 0910d6c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogResources.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2008 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
-#     David Carver/STAR Standard, d_a_carver@yahoo.com, bug 192568
-#        - Fixed grammar in XML Catalog Import dialog.
-###############################################################################
-UI_WIZARD_SCHEMA_AND_NAME_SPACE_INFO = Schema and Namespace Information
-UI_LABEL_NAME_SPACE_PREFIX           = Namespace prefix:
-UI_LABEL_NAME_SPACE_URI              = Namespace URI:
-UI_LABEL_XSD_LOCATION                = Schema location:
-UI_LABEL_DOCTYPE_INFORMATION         = Document type information
-UI_LABEL_SYSTEM_ID                   = &System ID:
-UI_LABEL_PUBLIC_ID                   = &Public ID:
-UI_LABEL_SELECT_FILE                 = Select File
-UI_LABEL_KEY                         = Key
-UI_LABEL_KEY_COLON                   = &Key:
-UI_LABEL_DETAILS_KEY_COLON           = Key:
-UI_LABEL_DETAILS_IN_JAR_FILE		 = in jar file
-UI_LABEL_URI                         = URI
-UI_LABEL_LOCATION_COLON              = &Location:  
-UI_LABEL_CATALOG_URI_COLON		      = Location of another XML Catalog file:
-UI_LABEL_DETAILS_URI_COLON           = URI:   
-UI_KEY_TYPE_COLON                    = Key &Type:
-UI_KEY_TYPE_DETAILS_COLON            = Key Type:
-UI_LABEL_DETAILS_URI_LOCATION        = Location:
-UI_KEY_TYPE_DESCRIPTION_XSD_PUBLIC   = Namespace Name
-UI_KEY_TYPE_DESCRIPTION_XSD_SYSTEM   = Schema Location
-UI_KEY_TYPE_DESCRIPTION_DTD_PUBLIC   = Public ID
-UI_KEY_TYPE_DESCRIPTION_DTD_SYSTEM   = System ID
-UI_KEY_TYPE_DESCRIPTION_URI   		  = URI
-UI_LABEL_SPECIFY_ALTERNATIVE_WEB_URL = Specify &alternative web address
-UI_WARNING_URI_MUST_NOT_HAVE_DOTS    = URI must not included '.' or '..'
-UI_LABEL_PLATFORM_RESOURCE 		 	 = Workspace
-UI_LABEL_FILE_SYSTEM_RESOURCE		 = File System
-
-UI_WARNING_URI_NOT_FOUND_COLON       = The specified resource can't be located :
-UI_WARNING_SHOULD_BE_FULLY_QUALIFIED_URI = Warning: the key value should be a fully qualified URI
-UI_WARNING_URI_NOT_FOUND_LONG        = The specified file cannot be found. It may have been moved to a different location. If the file is located remotely, a network connection cannot be established to the remote location. 
-UI_WARNING_INVALID_FILE              = The specified file is invalid.
-UI_WARNING_INVALID_FILE_LONG         = The specified file is invalid. A proper XML file cannot be generated from it. Open the DTD or XML schema file, edit it as necessary, validate it and try again.
-UI_WARNING_NO_ELEMENT                = The specified file must contain at least one element declaration.
-UI_WARNING_NO_ELEMENT_DTD_LONG       = The specified file must contain at least one element declaration that can be used as the root element in the generated XML file.
-UI_WARNING_NO_ELEMENT_XSD_LONG       = The specified file must contain at least one global element declaration that can be used as the root element in the generated XML file.
-UI_WARNING_DUPLICATE_ENTRY			 = The specified entry is invalid. An existing entry has the same key and key type.
-
-
-!NewModelWizard
-UI_INVALID_GRAMMAR_ERROR             = Invalid Grammar
-UI_BUTTON_BROWSE                     = &Browse...
-
-!XMLCatalogIdMappingPage
-UI_LABEL_MAP_TO                      = Map to:
-UI_LABEL_MAP_FROM                    = Map from:
-UI_BUTTON_NEW                        = &Add...
-UI_BUTTON_EDIT                       = &Edit...
-UI_BUTTON_DELETE                     = &Delete
-UI_BUTTON_REMOVE                     = &Remove
-UI_LABEL_NEW_DIALOG_TITLE            = Add XML Catalog Entry
-UI_LABEL_EDIT_DIALOG_TITLE           = Edit XML Catalog Entry
-
-
-!XMLCatalogPreferencePage
-UI_LABEL_USER_ENTRIES                = XML Catalog Entries
-UI_LABEL_USER_ENTRIES_TOOL_TIP       = XML Catalog entries that have been specified by the user
-UI_LABEL_SYSTEM_ENTRIES              = Plug-in specified entries
-UI_LABEL_SYSTEM_ENTRIES_TOOL_TIP     = XML Catalog entries that have been specified by a plug-in
-UI_BUTTON_CHANGE                     = Change...
-UI_LABEL_SELECT_PROJECT              = Select Project
-UI_LABEL_SPECIFY_PROJECT_DESCRIPTION = Specify the project to persist the XML Catalog information
-UI_WARNING_NO_PROJECTS_CREATED       = No projects have been created yet.
-UI_WARNING_PROJECT_NOT_SPECIFIED     = A project name has not been specified.
-UI_WARNING_PROJECT_DOES_NOT_EXIST    = The specified project does not exist.
-UI_LABEL_PROJECT_TO_USE              = Project to use to persist XML Catalog User Entries: 
-UI_LABEL_CATALOG_SAVE_ERROR          = XML Catalog Save Error
-UI_LABEL_CATALOG_COULD_NOT_BE_SAVED  = The XML Catalog entry could not be saved.
-UI_LABEL_ADVANCED                    = &Advanced...
-UI_LABEL_ADVANCED_XML_CATALOG_PREFS  = Advanced XML Catalog Preferences   
-UI_LABEL_SPECIFY_PERSISTENCE_FILE    = &Specify a file to use to persist the XML Catalog information.
-UI_LABEL_SAVE_CATALOG_DIALOG_TITLE   = Save Changes
-UI_LABEL_SAVE_CATALOG_DIALOG_DESC    = You have made unsaved changes to the current XML Catalog settings. Do you wish to save your changes before loading the new XML Catalog settings?   
-UI_LABEL_BROWSE_CATALOG_FILE_TITLE   = Select Folder
-UI_LABEL_BROWSE_CATALOG_FILE_DESC    = Select the folder that contains the '.xmlcatalog' file.   
-UI_LABEL_DETAILS                     = Details
-UI_LABEL_USER_SPECIFIED_ENTRIES      = User Specified Entries
-UI_LABEL_PLUGIN_SPECIFIED_ENTRIES    = Plugin Specified Entries
-UI_LABEL_FILE_SELECTION				 = File Selection
-UI_LABEL_CHOOSE_FILE_TO_ADD_TO_CATALOG				 = Choose a file to add to the XML Catalog
- 
-!AdvancedOptionsDialog
-UI_LABEL_DIALOG_DESCRIPTION          = Use the buttons below to import or export XML Catalog settings.
-UI_BUTTON_IMPORT                     = Import...
-UI_BUTTON_EXPORT                     = Export...
-                                   
-UI_LABEL_IMPORT_DIALOG_TITLE         = Import XML Catalog Settings
-UI_LABEL_IMPORT_DIALOG_HEADING       = Specify XML Catalog File
-UI_LABEL_IMPORT_DIALOG_MESSAGE       = Specify the file that will be used to load the XML Catalog Settings
-
-UI_LABEL_EXPORT_DIALOG_TITLE         = Export XML Catalog Settings
-UI_LABEL_EXPORT_DIALOG_HEADING       = Specify XML Catalog File
-UI_LABEL_EXPORT_DIALOG_MESSAGE       = Specify the file that will used to save the XML Catalog Setting
-ERROR_SAVING_FILE					 = Error saving file %1
-UI_LABEL_FILE_IS_READ_ONLY           = File %1 is read only
-
-EditCatalogEntryDialog_catalogEntryLabel=Catalog Entry
-EditCatalogEntryDialog_nextCatalogLabel=Next Catalog
-UI_BUTTON_MENU_BROWSE_WORKSPACE=Workspace...
-UI_BUTTON_MENU_BROWSE_FILE_SYSTEM=File System...
-UI_LABEL_SELECT_FILE_FILTER_CONTROL=Files of type:
-UI_TEXT_SELECT_FILE_FILTER_CONTROL=All Supported Files
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogTreeViewer.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogTreeViewer.java
deleted file mode 100644
index 30d4959..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogTreeViewer.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import com.ibm.icu.text.Collator;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogElement;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-
-
-public class XMLCatalogTreeViewer extends TreeViewer {
-	protected static Image xmlCatalogImage = ImageFactory.INSTANCE.getImage("icons/obj16/xmlcatalog_obj.gif"); //$NON-NLS-1$
-	protected static Image errorImage = ImageFactory.INSTANCE.getImage("icons/ovr16/error-overlay.gif"); //$NON-NLS-1$
-	protected static Image entryImage = ImageFactory.INSTANCE.getImage("icons/obj16/entry_obj.png"); //$NON-NLS-1$
-	protected static Image nextCatalogImage = ImageFactory.INSTANCE.getImage("icons/obj16/nextCatalog_obj.gif"); //$NON-NLS-1$
-
-	protected static String ERROR_STATE_KEY = "errorstatekey"; //$NON-NLS-1$
-
-	protected ICatalog fWorkingUserCatalog;
-	protected ICatalog fSystemCatalog;
-
-	public static String USER_SPECIFIED_ENTRIES_OBJECT = XMLCatalogMessages.UI_LABEL_USER_SPECIFIED_ENTRIES;
-	public static String PLUGIN_SPECIFIED_ENTRIES_OBJECT = XMLCatalogMessages.UI_LABEL_PLUGIN_SPECIFIED_ENTRIES;
-
-	public XMLCatalogTreeViewer(Composite parent, ICatalog workingUserCatalog, ICatalog systemCatalog) {
-		super(parent, SWT.MULTI | SWT.BORDER);
-		this.fWorkingUserCatalog = workingUserCatalog;
-		this.fSystemCatalog = systemCatalog;
-
-		setContentProvider(new CatalogEntryContentProvider());
-		setLabelProvider(new CatalogEntryLabelProvider());
-	}
-
-	public void setFilterExtensions(String[] extensions) {
-		resetFilters();
-		addFilter(new XMLCatalogTableViewerFilter(extensions));
-	}
-
-	public class CatalogEntryLabelProvider extends LabelProvider {
-		protected HashMap imageTable = new HashMap();
-
-		public String getText(Object object) {
-			String result = null;
-			if (object instanceof ICatalogEntry) {
-				ICatalogEntry catalogEntry = (ICatalogEntry) object;
-				result = catalogEntry.getKey();
-				// result = URIHelper.removePlatformResourceProtocol(result);
-			}
-			else if (object instanceof INextCatalog) {
-				INextCatalog nextCatalog = (INextCatalog) object;
-				// result = nextCatalog.getCatalogLocation();
-				result = URIUtils.convertURIToLocation(nextCatalog.getCatalogLocation());
-				if (nextCatalog.getCatalogLocation().startsWith("file:")) {
-					result += " (" + XMLCatalogMessages.UI_LABEL_FILE_SYSTEM_RESOURCE + ")";
-				}
-				else if (nextCatalog.getCatalogLocation().startsWith("platform:")) {
-					result += " (" + XMLCatalogMessages.UI_LABEL_PLATFORM_RESOURCE + ")";
-				}
-			}
-			return result != null ? result : object.toString();
-		}
-
-		public Image getImage(Object object) {
-			Image result = null;
-			Image base = null;
-			if (object instanceof String) {
-				result = xmlCatalogImage;
-			}
-			else if (object instanceof ICatalogEntry) {
-				ICatalogEntry catalogEntry = (ICatalogEntry) object;
-				String uri = catalogEntry.getURI();
-				IEditorRegistry er = PlatformUI.getWorkbench().getEditorRegistry();
-				ImageDescriptor imageDescriptor = er.getImageDescriptor(uri);
-				Image image = (Image) imageTable.get(imageDescriptor);
-				if (image == null) {
-					image = imageDescriptor.createImage();
-					imageTable.put(imageDescriptor, image);
-				}
-				base = image;
-
-				if (base != null) {
-					if (URIHelper.isReadableURI(uri, true)) {
-						result = base;
-					}
-					else {
-						result = ImageFactory.INSTANCE.createCompositeImage(base, errorImage, ImageFactory.BOTTOM_LEFT);
-					}
-				}
-			}
-			else if (object instanceof INextCatalog) {
-				// TODO: add image to the imageTable and add error overlay if
-				// next catalog URI is not readable
-				result = nextCatalogImage;
-			}
-			return result;
-		}
-
-		public void dispose() {
-			super.dispose();
-			for (Iterator it = imageTable.values().iterator(); it.hasNext();) {
-				((Image) it.next()).dispose();
-			}
-		}
-	}
-
-
-	public class CatalogEntryContentProvider implements ITreeContentProvider {
-		protected Object[] roots;
-
-		public CatalogEntryContentProvider() {
-			roots = new Object[2];
-			roots[0] = USER_SPECIFIED_ENTRIES_OBJECT;
-			roots[1] = PLUGIN_SPECIFIED_ENTRIES_OBJECT;
-		}
-
-		public boolean isRoot(Object object) {
-			return (object instanceof String) || (object instanceof INextCatalog);
-		}
-
-		public Object[] getElements(Object element) {
-			return roots;
-		}
-
-		public Object[] getChildren(Object parentElement) {
-			Object[] result = new Object[0];
-			if (parentElement == roots[0]) {
-				result = getChildrenHelper(fWorkingUserCatalog);
-			}
-			else if (parentElement == roots[1]) {
-				result = getChildrenHelper(fSystemCatalog);
-			}
-			else if (parentElement instanceof INextCatalog) {
-				ICatalog nextCatalog = ((INextCatalog) parentElement).getReferencedCatalog();
-				result = getChildrenHelper(nextCatalog);
-			}
-			return result;
-		}
-
-		protected Object[] getChildrenHelper(ICatalog catalog) {
-			// TODO add entries from the nested catalogs
-
-			ICatalogEntry[] entries = catalog.getCatalogEntries();
-			if (entries.length > 0) {
-				Comparator comparator = new Comparator() {
-					public int compare(Object o1, Object o2) {
-						int result = 0;
-						if ((o1 instanceof ICatalogEntry) && (o2 instanceof ICatalogEntry)) {
-							ICatalogEntry entry1 = (ICatalogEntry) o1;
-							ICatalogEntry entry2 = (ICatalogEntry) o2;
-							result = Collator.getInstance().compare(entry1.getKey(), entry2.getKey());
-						}
-						return result;
-					}
-				};
-				Arrays.sort(entries, comparator);
-			}
-			Vector result = new Vector();
-			result.addAll(Arrays.asList(entries));
-			INextCatalog[] nextCatalogs = catalog.getNextCatalogs();
-			List nextCatalogsList = Arrays.asList(nextCatalogs);
-			result.addAll(nextCatalogsList);
-
-			return result.toArray(new ICatalogElement[result.size()]);
-		}
-
-		public Object getParent(Object element) {
-			return (element instanceof String) ? null : USER_SPECIFIED_ENTRIES_OBJECT;
-		}
-
-		public boolean hasChildren(Object element) {
-			return isRoot(element) ? getChildren(element).length > 0 : false;
-		}
-
-		public void dispose() {
-			// nothing to dispose
-		}
-
-		public void inputChanged(Viewer viewer, Object old, Object newobj) {
-			// ISSUE: seems we should do something here
-		}
-
-		public boolean isDeleted(Object object) {
-			return false;
-		}
-	}
-
-
-	public void menuAboutToShow(IMenuManager menuManager) {
-		Action action = new Action("hello") { //$NON-NLS-1$
-			public void run() {
-				System.out.println("run!"); //$NON-NLS-1$
-			}
-		};
-		menuManager.add(action);
-	}
-
-
-	class XMLCatalogTableViewerFilter extends ViewerFilter {
-		protected String[] extensions;
-
-		public XMLCatalogTableViewerFilter(String[] extensions1) {
-			this.extensions = extensions1;
-		}
-
-		public boolean isFilterProperty(Object element, Object property) {
-			return false;
-		}
-
-		public boolean select(Viewer viewer, Object parent, Object element) {
-			boolean result = false;
-			if (element instanceof ICatalogEntry) {
-				ICatalogEntry catalogEntry = (ICatalogEntry) element;
-				for (int i = 0; i < extensions.length; i++) {
-					if (catalogEntry.getURI().endsWith(extensions[i])) {
-						result = true;
-						break;
-					}
-				}
-			}
-			else if (element.equals(XMLCatalogTreeViewer.PLUGIN_SPECIFIED_ENTRIES_OBJECT) || element.equals(XMLCatalogTreeViewer.USER_SPECIFIED_ENTRIES_OBJECT)) {
-				return true;
-			}
-			return result;
-		}
-	}
-
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLQuickScan.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLQuickScan.java
deleted file mode 100644
index 723539d..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLQuickScan.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.catalog;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * 
- */
-public class XMLQuickScan {
-	public static String getTargetNamespaceURIForSchema(String uri) {
-		String result = null;
-		try {
-			URL url = new URL(uri);
-			InputStream inputStream = url.openStream();
-			result = XMLQuickScan.getTargetNamespaceURIForSchema(inputStream);
-		}
-		catch (Exception e) {
-		}
-		return result;
-	}
-
-	public static String getTargetNamespaceURIForSchema(InputStream input) {
-		TargetNamespaceURIContentHandler handler = new TargetNamespaceURIContentHandler();
-		ClassLoader prevClassLoader = Thread.currentThread().getContextClassLoader();
-		try {
-			Thread.currentThread().setContextClassLoader(XMLQuickScan.class.getClassLoader());
-			SAXParserFactory factory = SAXParserFactory.newInstance();
-			factory.setNamespaceAware(true);
-			SAXParser parser = factory.newSAXParser();
-			parser.parse(new InputSource(input), handler);
-		}
-		catch (StopParseException e) {
-			// this is a normal exception to stop parsing early,
-			// when info is found, so we can safely ignore
-		}
-		catch (ParserConfigurationException e) {
-			Logger.logException(e);
-		}
-		catch (SAXException e) {
-			Logger.logException(e);
-		}
-		catch (IOException e) {
-			Logger.logException(e);
-		}
-		finally {
-			Thread.currentThread().setContextClassLoader(prevClassLoader);
-		}
-		return handler.targetNamespaceURI;
-	}
-
-	/**
-	 * This is a special exception that is used to stop parsing when required
-	 * information is found.
-	 */
-	static class StopParseException extends org.xml.sax.SAXException {
-		static final long serialVersionUID = 1L;
-
-		/**
-		 * Constructor StopParseException.
-		 */
-		StopParseException() {
-			super("targetnamespace found, no need to continue the parse");
-		}
-	}
-
-	static class TargetNamespaceURIContentHandler extends DefaultHandler {
-		public String targetNamespaceURI;
-
-		public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
-			if (localName.equals("schema")) //$NON-NLS-1$
-			{
-				int nAttributes = attributes.getLength();
-				for (int i = 0; i < nAttributes; i++) {
-					if (attributes.getLocalName(i).equals("targetNamespace")) //$NON-NLS-1$
-					{
-						targetNamespaceURI = attributes.getValue(i);
-						break;
-					}
-				}
-			}
-			throw new StopParseException();
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/etool50/catalogEntry.gif b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/etool50/catalogEntry.gif
deleted file mode 100644
index d65b280..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/etool50/catalogEntry.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/etool50/nextCatalog.gif b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/etool50/nextCatalog.gif
deleted file mode 100644
index 3a934b9..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/etool50/nextCatalog.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/entry_obj.png b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/entry_obj.png
deleted file mode 100644
index be71474..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/entry_obj.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/file_expand.gif b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/file_expand.gif
deleted file mode 100644
index 85f9baa..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/file_expand.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/file_obj.gif b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/file_obj.gif
deleted file mode 100644
index 061161a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/file_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/nextCatalog_obj.gif b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/nextCatalog_obj.gif
deleted file mode 100644
index d4bfe79..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/nextCatalog_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/xmlcatalog_obj.gif b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/xmlcatalog_obj.gif
deleted file mode 100644
index a61441f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/xmlcatalog_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/ovr16/error-overlay.gif b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/ovr16/error-overlay.gif
deleted file mode 100644
index 119dccc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/ovr16/error-overlay.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/DOMPropertyDescriptorFactory.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/DOMPropertyDescriptorFactory.java
deleted file mode 100644
index 5bebb72..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/DOMPropertyDescriptorFactory.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.ui.internal.properties.EnumeratedStringPropertyDescriptor;
-import org.w3c.dom.Attr;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Comment;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.Node;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-
-public class DOMPropertyDescriptorFactory {
-
-	protected static final String HACK = "hack"; //$NON-NLS-1$
-
-	public DOMPropertyDescriptorFactory() {
-	}
-
-	public IPropertyDescriptor createAttributePropertyDescriptor(Attr attr) {
-		IPropertyDescriptor result = null;
-
-		String attributeName = attr.getName();
-
-		ModelQuery mq = ModelQueryUtil.getModelQuery(attr.getOwnerDocument());
-
-		if (mq != null) {
-			CMAttributeDeclaration ad = mq.getCMAttributeDeclaration(attr);
-			if (ad != null) {
-				String[] valuesArray = mq.getPossibleDataTypeValues(attr.getOwnerElement(), ad);
-				if ((valuesArray != null) && (valuesArray.length > 0)) {
-					result = new EnumeratedStringPropertyDescriptor(attributeName, attributeName, valuesArray);
-				}
-			}
-		}
-
-		if (result == null) {
-			result = createDefaultPropertyDescriptor(attributeName);
-		}
-		return result;
-	}
-
-	public IPropertyDescriptor createCDATASectionPropertyDescriptor(CDATASection cdataSection) {
-		return createDefaultPropertyDescriptor(HACK);
-	}
-
-	public IPropertyDescriptor createCommentPropertyDescriptor(Comment comment) {
-		return createDefaultPropertyDescriptor(HACK);
-	}
-
-	protected IPropertyDescriptor createDefaultPropertyDescriptor(String attributeName) {
-		TextPropertyDescriptor descriptor = new TextPropertyDescriptor(attributeName, attributeName);
-		return descriptor;
-	}
-
-	public IPropertyDescriptor createDocumentTypePropertyDescriptor(DocumentType documentType) {
-		return null; // new TextPropertyDescriptor(HACK, HACK);
-	}
-
-	public IPropertyDescriptor createElementPropertyDescriptor(Element element) {
-		return createDefaultPropertyDescriptor(HACK);
-	}
-
-	public IPropertyDescriptor createEntityReferencePropertyDescriptor(EntityReference entityReference) {
-		return createDefaultPropertyDescriptor(HACK);
-	}
-
-	public IPropertyDescriptor createProcessingInstructionPropertyDescriptor(ProcessingInstruction pi) {
-		return createDefaultPropertyDescriptor(HACK);
-	}
-
-	public IPropertyDescriptor createPropertyDescriptor(Object object) {
-		IPropertyDescriptor result = null;
-		if (object instanceof Node) {
-			Node node = (Node) object;
-			int nodeType = node.getNodeType();
-			switch (nodeType) {
-				case Node.ATTRIBUTE_NODE : {
-					result = createAttributePropertyDescriptor((Attr) node);
-					break;
-				}
-				case Node.CDATA_SECTION_NODE : {
-					result = createCDATASectionPropertyDescriptor((CDATASection) node);
-					break;
-				}
-				case Node.COMMENT_NODE : {
-					result = createCommentPropertyDescriptor((Comment) node);
-					break;
-				}
-				case Node.DOCUMENT_TYPE_NODE : {
-					result = createDocumentTypePropertyDescriptor((DocumentType) node);
-					break;
-				}
-				case Node.ELEMENT_NODE : {
-					result = createElementPropertyDescriptor((Element) node);
-					break;
-				}
-				case Node.ENTITY_REFERENCE_NODE : {
-					result = createEntityReferencePropertyDescriptor((EntityReference) node);
-					break;
-				}
-				case Node.PROCESSING_INSTRUCTION_NODE : {
-					result = createProcessingInstructionPropertyDescriptor((ProcessingInstruction) node);
-					break;
-				}
-				case Node.TEXT_NODE : {
-					result = createTextPropertyDescriptor((Text) node);
-					break;
-				}
-			}
-		}
-		return result;
-	}
-
-	public IPropertyDescriptor createTextPropertyDescriptor(Text text) {
-		return createDefaultPropertyDescriptor(HACK);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/IDesignViewer.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/IDesignViewer.java
deleted file mode 100644
index f1be97f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/IDesignViewer.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Control;
-
-public interface IDesignViewer {
-	public Control getControl();
-
-	String getTitle();
-
-	void setDocument(IDocument document);
-
-	ISelectionProvider getSelectionProvider();
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/IDesignViewerActionBarContributor.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/IDesignViewerActionBarContributor.java
deleted file mode 100644
index 411a3f9..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/IDesignViewerActionBarContributor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-
-
-import org.eclipse.ui.IActionBars;
-import org.eclipse.wst.sse.ui.internal.ISourceViewerActionBarContributor;
-
-
-public interface IDesignViewerActionBarContributor extends ISourceViewerActionBarContributor {
-	public void initViewerSpecificContributions(IActionBars bars);
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/SourceEditorActionBarContributor.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/SourceEditorActionBarContributor.java
deleted file mode 100644
index 5e9ffcc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/SourceEditorActionBarContributor.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorActionBarContributor;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
-import org.eclipse.ui.part.MultiPageEditorPart;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder;
-import org.eclipse.wst.sse.ui.internal.IExtendedContributor;
-import org.eclipse.wst.sse.ui.internal.ISourceViewerActionBarContributor;
-
-
-public class SourceEditorActionBarContributor extends MultiPageEditorActionBarContributor implements IExtendedContributor {
-
-	protected IEditorActionBarContributor designViewerActionBarContributor = null;
-	protected IEditorActionBarContributor sourceViewerActionContributor = null;
-	protected MultiPageEditorPart multiPageEditor = null;
-
-	// EditorExtension
-	private static final String EDITOR_ID = "org.eclipse.wst.xml.ui.XMLMultiPageEditorPart"; //$NON-NLS-1$
-	private IExtendedContributor extendedContributor;
-
-	public SourceEditorActionBarContributor() {
-		super();
-
-		sourceViewerActionContributor = new SourcePageActionContributor();
-
-		// Read action extensions.
-		ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder();
-		extendedContributor = builder.readActionExtensions(EDITOR_ID);
-	}
-
-	public void init(IActionBars actionBars) {
-		super.init(actionBars);
-
-		if (actionBars != null) {
-			initDesignViewerActionBarContributor(actionBars);
-			initSourceViewerActionContributor(actionBars);
-		}
-	}
-
-	protected void initDesignViewerActionBarContributor(IActionBars actionBars) {
-		if (designViewerActionBarContributor != null) {
-			designViewerActionBarContributor.init(actionBars, getPage());
-		}
-	}
-
-	protected void initSourceViewerActionContributor(IActionBars actionBars) {
-		if (sourceViewerActionContributor != null) {
-			sourceViewerActionContributor.init(actionBars, getPage());
-		}
-	}
-
-	public void dispose() {
-		super.dispose();
-
-		if (designViewerActionBarContributor != null) {
-			designViewerActionBarContributor.dispose();
-		}
-
-		if (sourceViewerActionContributor != null) {
-			sourceViewerActionContributor.dispose();
-		}
-
-		if (extendedContributor != null) {
-			extendedContributor.dispose();
-		}
-	}
-
-	/**
-	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToMenu(IMenuManager)
-	 */
-	public final void contributeToMenu(IMenuManager menu) {
-		super.contributeToMenu(menu);
-
-		//addToMenu(menu);
-
-		if (extendedContributor != null) {
-			extendedContributor.contributeToMenu(menu);
-		}
-	}
-
-	protected void addToMenu(IMenuManager menu) {
-	}
-
-	/**
-	 * @see IExtendedContributor#contributeToPopupMenu(IMenuManager)
-	 */
-	public final void contributeToPopupMenu(IMenuManager menu) {
-
-		addToPopupMenu(menu);
-
-		if (extendedContributor != null) {
-			extendedContributor.contributeToPopupMenu(menu);
-		}
-	}
-
-	protected void addToPopupMenu(IMenuManager menu) {
-	}
-
-	/**
-	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToToolBar(IToolBarManager)
-	 */
-	public final void contributeToToolBar(IToolBarManager toolBarManager) {
-		super.contributeToToolBar(toolBarManager);
-
-		addToToolBar(toolBarManager);
-
-		if (extendedContributor != null) {
-			extendedContributor.contributeToToolBar(toolBarManager);
-		}
-	}
-
-	protected void addToToolBar(IToolBarManager toolBarManager) {
-	}
-
-	/**
-	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToStatusLine(IStatusLineManager)
-	 */
-	public final void contributeToStatusLine(IStatusLineManager manager) {
-		super.contributeToStatusLine(manager);
-
-		addToStatusLine(manager);
-
-		if (extendedContributor != null) {
-			extendedContributor.contributeToStatusLine(manager);
-		}
-	}
-
-	protected void addToStatusLine(IStatusLineManager manager) {
-	}
-
-	/**
-	 * @see IExtendedContributor#updateToolbarActions()
-	 */
-	public void updateToolbarActions() {
-		if (extendedContributor != null) {
-			extendedContributor.updateToolbarActions();
-		}
-	}
-
-	public void setActiveEditor(IEditorPart targetEditor) {
-		// save multiPageEditor before calling
-		// super.setActiveEditor(targetEditor)
-		// super.setActiveEditor will call setActivePage(IEditorPart
-		// activeEditor)
-		// multiPageEditor is needed in setActivePage(IEditorPart
-		// activeEditor)
-		if (targetEditor instanceof MultiPageEditorPart) {
-			multiPageEditor = (MultiPageEditorPart) targetEditor;
-		}
-
-		super.setActiveEditor(targetEditor);
-
-		updateToolbarActions();
-
-		if (extendedContributor != null) {
-			extendedContributor.setActiveEditor(targetEditor);
-		}
-	}
-
-	public void setActivePage(IEditorPart activeEditor) {
-		// This contributor is designed for StructuredTextMultiPageEditorPart.
-		// To safe-guard this from problems caused by unexpected usage by
-		// other editors, the following
-		// check is added.
-		if (multiPageEditor != null) {
-			if ((activeEditor != null) && (activeEditor instanceof StructuredTextEditor)) {
-				activateSourcePage(activeEditor);
-			}
-			else {
-				activateDesignPage(activeEditor);
-			}
-		}
-
-		updateToolbarActions();
-
-		IActionBars actionBars = getActionBars();
-		if (actionBars != null) {
-			// update menu bar and tool bar
-			actionBars.updateActionBars();
-		}
-	}
-
-	protected void activateDesignPage(IEditorPart activeEditor) {
-		if ((designViewerActionBarContributor != null) && (designViewerActionBarContributor instanceof IDesignViewerActionBarContributor)) {
-			designViewerActionBarContributor.setActiveEditor(multiPageEditor);
-		}
-
-		if ((sourceViewerActionContributor != null) && (sourceViewerActionContributor instanceof ISourceViewerActionBarContributor)) {
-			// if design page is not really an IEditorPart, activeEditor ==
-			// null, so pass in multiPageEditor instead (d282414)
-			if (activeEditor == null) {
-				sourceViewerActionContributor.setActiveEditor(multiPageEditor);
-			}
-			else {
-				sourceViewerActionContributor.setActiveEditor(activeEditor);
-			}
-			((ISourceViewerActionBarContributor) sourceViewerActionContributor).setViewerSpecificContributionsEnabled(false);
-		}
-	}
-
-	protected void activateSourcePage(IEditorPart activeEditor) {
-		if ((designViewerActionBarContributor != null) && (designViewerActionBarContributor instanceof IDesignViewerActionBarContributor)) {
-			designViewerActionBarContributor.setActiveEditor(multiPageEditor);
-		}
-
-		if ((sourceViewerActionContributor != null) && (sourceViewerActionContributor instanceof ISourceViewerActionBarContributor)) {
-			sourceViewerActionContributor.setActiveEditor(activeEditor);
-			((ISourceViewerActionBarContributor) sourceViewerActionContributor).setViewerSpecificContributionsEnabled(true);
-		}
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/SourcePageActionContributor.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/SourcePageActionContributor.java
deleted file mode 100644
index bd1e251..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/SourcePageActionContributor.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-
-
-import org.eclipse.ui.IActionBars;
-import org.eclipse.wst.xml.ui.internal.actions.ActionContributorXML;
-
-
-/**
- * SourcePageActionContributor
- * 
- * This class is for multi page editor's source page contributor.
- * 
- * Use XMLEditorActionContributor for single page editor.
- */
-public class SourcePageActionContributor extends ActionContributorXML {
-
-	private IActionBars fBars;
-
-	/**
-	 * This method calls:
-	 * <ul>
-	 * <li><code>contributeToMenu</code> with <code>bars</code>' menu
-	 * manager</li>
-	 * <li><code>contributeToToolBar</code> with <code>bars</code>' tool
-	 * bar manager</li>
-	 * <li><code>contributeToStatusLine</code> with <code>bars</code>'
-	 * status line manager</li>
-	 * </ul>
-	 * The given action bars are also remembered and made accessible via
-	 * <code>getActionBars</code>.
-	 * 
-	 * @param bars
-	 *            the action bars
-	 * 
-	 */
-	public void init(IActionBars bars) {
-		fBars = bars;
-		contributeToMenu(bars.getMenuManager());
-		contributeToToolBar(bars.getToolBarManager());
-		contributeToStatusLine(bars.getStatusLineManager());
-	}
-
-	/**
-	 * Returns this contributor's action bars.
-	 * 
-	 * @return the action bars
-	 */
-	public IActionBars getActionBars() {
-		return fBars;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java
deleted file mode 100644
index 11a4dd6..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java
+++ /dev/null
@@ -1,459 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMWriter;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Attr;
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-
-/**
- * This performs the work of taking a DOM tree and converting it to a
- * displayable 'UI' tree.
- * 
- * For example : - white space text nodes are ommited from the 'UI' tree -
- * adjacent Text and EntityReference nodes are combined into a single 'UI'
- * node - Elements with 'text only' children are diplayed without children
- * 
- */
-public class TreeContentHelper {
-
-	public static final int HIDE_WHITE_SPACE_TEXT_NODES = 8;
-	public static final int COMBINE_ADJACENT_TEXT_AND_ENTITY_REFERENCES = 16;
-	public static final int HIDE_ELEMENT_CHILD_TEXT_NODES = 32;
-
-	protected int style = HIDE_WHITE_SPACE_TEXT_NODES | COMBINE_ADJACENT_TEXT_AND_ENTITY_REFERENCES | HIDE_ELEMENT_CHILD_TEXT_NODES;
-
-	/**
-	 * 
-	 */
-	public boolean hasStyleFlag(int flag) {
-		return (style & flag) != 0;
-	}
-
-	/**
-	 * 
-	 */
-	public Object[] getChildren(Object element) {
-		Object[] result = null;
-
-		if (element instanceof Node) {
-			Node node = (Node) element;
-			List list = new ArrayList();
-			boolean textContentOnly = true;
-
-			NamedNodeMap map = node.getAttributes();
-			if (map != null) {
-				int length = map.getLength();
-				for (int i = 0; i < length; i++) {
-					list.add(map.item(i));
-					textContentOnly = false;
-				}
-			}
-
-			Node prevIncludedNode = null;
-			for (Node childNode = node.getFirstChild(); childNode != null; childNode = childNode.getNextSibling()) {
-				int childNodeType = childNode.getNodeType();
-				boolean includeNode = true;
-
-				if (includeNode && hasStyleFlag(HIDE_WHITE_SPACE_TEXT_NODES)) {
-					if (isIgnorableText(childNode)) {
-						// filter out the ignorable text node
-						includeNode = false;
-					}
-				}
-
-				if (includeNode && hasStyleFlag(COMBINE_ADJACENT_TEXT_AND_ENTITY_REFERENCES)) {
-					if (isTextOrEntityReferenceNode(childNode) && (prevIncludedNode != null) && isTextOrEntityReferenceNode(prevIncludedNode)) {
-						// we only show the first of a list of adjacent text
-						// or entity reference node in the tree
-						// so we filter out this subsequent one
-						includeNode = false;
-					}
-				}
-
-				if (hasStyleFlag(HIDE_ELEMENT_CHILD_TEXT_NODES)) {
-					if ((childNodeType != Node.TEXT_NODE) && (childNodeType != Node.ENTITY_REFERENCE_NODE)) {
-						textContentOnly = false;
-					}
-				}
-
-				if (includeNode) {
-					list.add(childNode);
-					prevIncludedNode = childNode;
-				}
-			}
-
-			if (hasStyleFlag(HIDE_ELEMENT_CHILD_TEXT_NODES) && textContentOnly) {
-				result = new Object[0];
-			}
-			else {
-				result = list.toArray();
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * 
-	 */
-	protected boolean isTextOrEntityReferenceNode(Node node) {
-		return (node.getNodeType() == Node.TEXT_NODE) || (node.getNodeType() == Node.ENTITY_REFERENCE_NODE);
-	}
-
-	/**
-	 * 
-	 */
-	public boolean isIgnorableText(Node node) {
-		boolean result = false;
-		if (node.getNodeType() == Node.TEXT_NODE) {
-			String data = ((Text) node).getData();
-			result = ((data == null) || (data.trim().length() == 0));
-		}
-		return result;
-	}
-
-	/**
-	 * 
-	 */
-	public boolean isCombinedTextNode(Node node) {
-		boolean result = false;
-		if (node.getNodeType() == Node.TEXT_NODE) {
-			Node nextNode = node.getNextSibling();
-			if (nextNode != null) {
-				if (nextNode.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
-					result = true;
-				}
-			}
-		}
-		else if (node.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
-			result = true;
-		}
-		return result;
-	}
-
-	/**
-	 * 
-	 */
-	public List getCombinedTextNodeList(Node theNode) {
-		List list = new Vector();
-		boolean prevIsEntity = false;
-		for (Node node = theNode; node != null; node = node.getNextSibling()) {
-			int nodeType = node.getNodeType();
-			if (nodeType == Node.ENTITY_REFERENCE_NODE) {
-				prevIsEntity = true;
-				list.add(node);
-			}
-			else if ((nodeType == Node.TEXT_NODE) && (prevIsEntity || (node == theNode))) {
-				prevIsEntity = false;
-				list.add(node);
-			}
-			else {
-				break;
-			}
-		}
-		return list;
-	}
-
-	public String getElementTextValue(Element element) {
-		List list = _getElementTextContent(element);
-		return list != null ? getValueForTextContent(list) : null;
-	}
-
-	public void setElementTextValue(Element element, String value) {
-		setElementNodeValue(element, value);
-	}
-
-	private List _getElementTextContent(Element element) {
-		List result = null;
-
-		for (Node node = element.getFirstChild(); node != null; node = node.getNextSibling()) {
-			if ((node.getNodeType() == Node.TEXT_NODE) || (node.getNodeType() == Node.ENTITY_REFERENCE_NODE)) {
-				if (result == null) {
-					result = new Vector();
-				}
-				result.add(node);
-			}
-			else {
-				result = null;
-				break;
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * If the element is has 'text only' content this method will return the
-	 * list of elements that compose the text only content
-	 */
-	public List getElementTextContent(Element element) {
-		List result = null;
-		if (!element.hasAttributes()) {
-			result = _getElementTextContent(element);
-		}
-		return result;
-	}
-
-
-	/**
-	 * 
-	 */
-	public String getNodeValue(Node node) {
-		String result = null;
-		int nodeType = node.getNodeType();
-		switch (nodeType) {
-			case Node.ATTRIBUTE_NODE : {
-				result = ((Attr) node).getValue();
-				break;
-			}
-			case Node.CDATA_SECTION_NODE :
-				// drop thru
-			case Node.COMMENT_NODE : {
-				result = ((CharacterData) node).getData();
-				break;
-			}
-			case Node.DOCUMENT_TYPE_NODE : {
-				result = getDocumentTypeValue((DocumentType) node);
-				break;
-			}
-			case Node.ELEMENT_NODE : {
-				result = getElementNodeValue((Element) node);
-				break;
-			}
-			case Node.ENTITY_REFERENCE_NODE :
-				// drop thru
-			case Node.TEXT_NODE : {
-				result = getTextNodeValue(node);
-				break;
-			}
-			case Node.PROCESSING_INSTRUCTION_NODE : {
-				result = ((ProcessingInstruction) node).getData();
-				break;
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * 
-	 */
-	public void setNodeValue(Node node, String value) {
-		int nodeType = node.getNodeType();
-		try {
-			switch (nodeType) {
-				case Node.ATTRIBUTE_NODE : {
-					((Attr) node).setValue(value);
-					break;
-				}
-				case Node.CDATA_SECTION_NODE :
-					// drop thru
-				case Node.COMMENT_NODE : {
-					((CharacterData) node).setData(value);
-					break;
-				}
-				case Node.ELEMENT_NODE : {
-					setElementNodeValue((Element) node, value);
-					break;
-				}
-				case Node.ENTITY_REFERENCE_NODE :
-					// drop thru
-				case Node.TEXT_NODE : {
-					setTextNodeValue(node, value);
-					break;
-				}
-				case Node.PROCESSING_INSTRUCTION_NODE : {
-					((ProcessingInstruction) node).setData(value);
-					break;
-				}
-			}
-		}
-		catch (DOMException e) {
-			Display d = getDisplay();
-			if (d != null) {
-				d.beep();
-			}
-		}
-	}
-
-	private Display getDisplay() {
-
-		return PlatformUI.getWorkbench().getDisplay();
-	}
-
-
-	/**
-	 * 
-	 */
-	protected String getDocumentTypeValue(DocumentType documentType) {
-		return DOMWriter.getDocumentTypeData(documentType);
-	}
-
-	/**
-	 * 
-	 */
-	protected String getElementNodeValue(Element element) {
-		String result = null;
-		List list = getElementTextContent(element);
-		if (list != null) {
-			result = getValueForTextContent(list);
-		}
-		return result;
-	}
-
-	/**
-	 * 
-	 */
-	protected void setElementNodeValue(Element element, String value) {
-		List list = getElementTextContent(element);
-		if (list != null) {
-			setValueForTextContent(list, value);
-		}
-		else {
-			Document document = element.getOwnerDocument();
-			Text text = document.createTextNode(value);
-			element.appendChild(text);
-		}
-	}
-
-	/**
-	 * 
-	 */
-	protected String getTextNodeValue(Node node) {
-		String result = null;
-		List list = null;
-		if (isCombinedTextNode(node)) {
-			list = getCombinedTextNodeList(node);
-		}
-		else {
-			list = new Vector();
-			list.add(node);
-		}
-		result = getValueForTextContent(list);
-		return result;
-	}
-
-	/**
-	 * 
-	 */
-	protected void setTextNodeValue(Node node, String value) {
-		List list = null;
-		if (isCombinedTextNode(node)) {
-			list = getCombinedTextNodeList(node);
-		}
-		else {
-			list = new Vector();
-			list.add(node);
-		}
-		setValueForTextContent(list, value);
-	}
-
-	public Text getEffectiveTextNodeForCombinedNodeList(List list) {
-		Text result = null;
-		for (Iterator i = list.iterator(); i.hasNext();) {
-			Node node = (Node) i.next();
-			if (node.getNodeType() == Node.TEXT_NODE) {
-				result = (Text) node;
-				break;
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * 
-	 */
-	protected String getValueForTextContent(List list) {
-		String result = null;
-		if (list.size() > 0) {
-			IDOMNode first = (IDOMNode) list.get(0);
-			IDOMNode last = (IDOMNode) list.get(list.size() - 1);
-			IDOMModel model = first.getModel();
-			int start = first.getStartOffset();
-			int end = last.getEndOffset();
-			try {
-				result = model.getStructuredDocument().get(start, end - start);
-			}
-			catch (Exception e) {
-			}
-		}
-
-		// we trim the content so that it looks nice when viewed
-		// we need to be carfull to preserve the 'trimmed' text when the value
-		// is set (see setValueForTextContent)
-		if (result != null) {
-			result = result.trim();
-		}
-		return result;
-	}
-
-	/**
-	 * 
-	 */
-	protected void setValueForTextContent(List list, String value) {
-		// String oldValue = getValueForTextContent();
-		// we worry about preserving trimmed text
-		if (list.size() > 0) {
-			IDOMNode first = (IDOMNode) list.get(0);
-			IDOMNode last = (IDOMNode) list.get(list.size() - 1);
-			int start = first.getStartOffset();
-			int end = last.getEndOffset();
-			first.getModel().getStructuredDocument().replaceText(this, start, end - start, value);
-		}
-	}
-
-	/**
-	 * 
-	 */
-	public boolean isEditable(Node node) {
-		int nodeType = node.getNodeType();
-		boolean result = false;
-		switch (nodeType) {
-			case Node.ATTRIBUTE_NODE :
-				// drop thru
-			case Node.CDATA_SECTION_NODE :
-				// drop thru
-			case Node.COMMENT_NODE :
-				// drop thru
-			case Node.ENTITY_REFERENCE_NODE :
-				// drop thru
-			case Node.TEXT_NODE :
-				// drop thru
-			case Node.PROCESSING_INSTRUCTION_NODE : {
-				result = true;
-				break;
-			}
-			case Node.ELEMENT_NODE : {
-				result = (getElementTextContent((Element) node) != null) || (node.getChildNodes().getLength() == 0);
-				break;
-			}
-		}
-		return result;
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeExtension.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeExtension.java
deleted file mode 100644
index c9832cc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeExtension.java
+++ /dev/null
@@ -1,557 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ICellEditorListener;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseMoveListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.PlatformUI;
-
-
-public class TreeExtension implements PaintListener {
-
-	protected Tree fTree;
-	protected EditManager editManager;
-	protected String[] fColumnProperties;
-	protected ICellModifier cellModifier;
-	protected int columnPosition = 300;
-	protected int columnHitWidth = 5;
-	protected Color tableLineColor;
-	protected int controlWidth;
-	protected DelayedDrawTimer delayedDrawTimer;
-	private boolean fisUnsupportedInput = false;
-
-	public TreeExtension(Tree tree) {
-		this.fTree = tree;
-		InternalMouseListener listener = new InternalMouseListener();
-		tree.addMouseMoveListener(listener);
-		tree.addMouseListener(listener);
-		tree.addPaintListener(this);
-		editManager = new EditManager(tree);
-		delayedDrawTimer = new DelayedDrawTimer(tree);
-
-		tableLineColor = tree.getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW);
-	}
-
-	public void dispose() {
-		tableLineColor.dispose();
-	}
-
-	public void setCellModifier(ICellModifier modifier) {
-		cellModifier = modifier;
-	}
-
-	public void resetCachedData() {
-		// todo: sure seems we should reset something?
-	}
-
-	public ICellModifier getCellModifier() {
-		return cellModifier;
-	}
-
-	public List getItemList() {
-		List list = new Vector();
-		getItemListHelper(fTree.getItems(), list);
-		return list;
-	}
-
-	protected void getItemListHelper(TreeItem[] items, List list) {
-		for (int i = 0; i < items.length; i++) {
-			TreeItem item = items[i];
-			list.add(item);
-			getItemListHelper(item.getItems(), list);
-		}
-	}
-
-	protected TreeItem getTreeItemOnRow(int px, int py) {
-		TreeItem result = null;
-		List list = getItemList();
-		for (Iterator i = list.iterator(); i.hasNext();) {
-			TreeItem item = (TreeItem) i.next();
-			Rectangle r = item.getBounds();
-			if ((r != null) && (px >= r.x) && (py >= r.y) && (py <= r.y + r.height)) {
-				result = item;
-			}
-		}
-		return result;
-	}
-
-	protected class InternalMouseListener extends MouseAdapter implements MouseMoveListener {
-		protected int columnDragged = -1;
-		protected boolean isDown = false;
-		protected int prevX = -1;
-		protected Cursor cursor = null;
-
-		public void mouseMove(MouseEvent e) {
-			if ((e.x > columnPosition - columnHitWidth) && (e.x < columnPosition + columnHitWidth)) {
-				if (cursor == null) {
-					cursor = new Cursor(fTree.getDisplay(), SWT.CURSOR_SIZEWE);
-					fTree.setCursor(cursor);
-				}
-			}
-			else {
-				if (cursor != null) {
-					fTree.setCursor(null);
-					cursor.dispose();
-					cursor = null;
-				}
-			}
-
-			if (columnDragged != -1) {
-				// using the delay timer will make redraws less flickery
-				if (e.x > 20) {
-					columnPosition = e.x;
-					delayedDrawTimer.reset(20);
-				}
-			}
-		}
-
-		public void mouseDown(MouseEvent e) {
-			// here we handle the column resizing by detect if the user has
-			// click on a column separator
-			//
-			columnDragged = -1;
-			editManager.deactivateCellEditor();
-
-			if ((e.x > columnPosition - columnHitWidth) && (e.x < columnPosition + columnHitWidth)) {
-				columnDragged = 0;
-			}
-
-			// here we handle selecting tree items when any thing on the 'row'
-			// is clicked
-			//
-			TreeItem item = fTree.getItem(new Point(e.x, e.y));
-			if (item == null) {
-				item = getTreeItemOnRow(e.x, e.y);
-				if (item != null) {
-					TreeItem[] items = new TreeItem[1];
-					items[0] = item;
-					fTree.setSelection(items);
-				}
-			}
-		}
-
-		public void mouseUp(MouseEvent e) {
-			columnDragged = -1;
-		}
-	}
-
-	public String[] getColumnProperties() {
-		return fColumnProperties;
-	}
-
-	public void setColumnProperties(String[] columnProperties) {
-		this.fColumnProperties = columnProperties;
-	}
-
-	public void paintControl(PaintEvent event) {
-		GC gc = event.gc;
-		Rectangle treeBounds = fTree.getBounds();
-
-		controlWidth = treeBounds.width;
-		Color bg = fTree.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
-		Color bg2 = fTree.getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION);
-
-		gc.setBackground(bg2);
-
-		// // This next part causes problems on LINUX, so let's not do it
-		// there
-		// if (B2BHacks.IS_UNIX == false) {
-		// TreeItem[] selectedItems = tree.getSelection();
-		// if (selectedItems.length > 0) {
-		// for (int i = 0; i < selectedItems.length; i++) {
-		// TreeItem item = selectedItems[i];
-		// Rectangle bounds = item.getBounds();
-		// if (bounds != null) {
-		// gc.fillRectangle(bounds.x + bounds.width, bounds.y, controlWidth,
-		// bounds.height);
-		// }
-		// }
-		// }
-		// }
-		//
-		if (!fisUnsupportedInput) {
-			TreeItem[] items = fTree.getItems();
-			if (items.length > 0) {
-				gc.setForeground(tableLineColor);
-				gc.setBackground(bg);
-
-				gc.fillRectangle(columnPosition, treeBounds.x, treeBounds.width, treeBounds.height);
-
-				Rectangle itemBounds = items[0].getBounds();
-				int height = computeTreeItemHeight();
-
-				if (itemBounds != null) {
-					/*
-					 * Bounds will be for the first item, which will either be
-					 * visible at the top of the Tree, or scrolled off with
-					 * negative values
-					 */
-					int startY = itemBounds.y;
-
-					/* Only draw lines within the Tree boundaries */
-					for (int i = startY; i < treeBounds.height; i += height) {
-						if (i >= treeBounds.y) {
-							gc.drawLine(0, i, treeBounds.width, i);
-						}
-					}
-				}
-				gc.drawLine(columnPosition, 0, columnPosition, treeBounds.height);
-				paintItems(gc, items, treeBounds);
-
-			}
-			else {
-				addEmptyTreeMessage(gc);
-			}
-		}
-		else {
-			addUnableToPopulateTreeMessage(gc);
-		}
-	}
-
-	protected int computeTreeItemHeight() {
-		int result = -1;
-
-		/*
-		 * On GTK tree.getItemHeight() seems to lie to us. It reports that the
-		 * tree item occupies a few pixles less vertical space than it should
-		 * (possibly because of the image height vs. the text height?). This
-		 * foils our code that draws the 'row' lines since we assume that
-		 * lines should be drawn at 'itemHeight' increments. Don't trust
-		 * getItemHeight() to compute the increment... instead compute the
-		 * value based on distance between two TreeItems, and then use the
-		 * larger value.
-		 * 
-		 * This strategy only works on trees where the items are of even
-		 * height, however bug
-		 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=117201 indicates that
-		 * this is no longer promised, at least on win32 and likely on other
-		 * platforms soon.
-		 */
-		if (fTree.getItemCount() > 0) {
-			TreeItem[] items = fTree.getItems();
-			Rectangle itemBounds = items[0].getBounds();
-
-			if (items[0].getExpanded()) {
-				TreeItem[] children = items[0].getItems();
-				if (children.length > 0) {
-					result = children[0].getBounds().y - itemBounds.y;
-				}
-			}
-			else if (items.length > 1) {
-				result = items[1].getBounds().y - itemBounds.y;
-			}
-		}
-
-		result = Math.max(fTree.getItemHeight(), result);
-		return result;
-	}
-
-	protected void addEmptyTreeMessage(GC gc) {
-		// nothing to add here
-	}
-
-	private void addUnableToPopulateTreeMessage(GC gc) {
-		// here we print a message when the document cannot be displayed just
-		// to give the
-		// user a visual cue
-		// so that they know how to proceed to edit the blank view
-		gc.setForeground(fTree.getDisplay().getSystemColor(SWT.COLOR_BLACK));
-		gc.setBackground(fTree.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
-		gc.drawString(XMLEditorMessages.TreeExtension_0, 10, 10);
-	}
-
-	void setIsUnsupportedInput(boolean isUnsupported) {
-		fisUnsupportedInput = isUnsupported;
-	}
-
-	public void paintItems(GC gc, TreeItem[] items, Rectangle treeBounds) {
-		if (items != null) {
-			for (int i = 0; i < items.length; i++) {
-				TreeItem item = items[i];
-				if (item != null) {
-					Rectangle bounds = item.getBounds();
-					if (bounds != null) {
-						if (treeBounds.intersects(bounds)) {
-							paintItem(gc, item, bounds);
-						}
-					}
-
-					// defect 241039
-					//
-					if (item.getExpanded()) {
-						paintItems(gc, item.getItems(), treeBounds);
-					}
-				}
-			}
-		}
-	}
-
-	protected void paintItem(GC gc, TreeItem item, Rectangle bounds) {
-		// nothing to paint
-	}
-
-	public interface ICellEditorProvider {
-		CellEditor getCellEditor(Object o, int col);
-	}
-
-	/**
-	 * This class is used to improve drawing during a column resize.
-	 */
-	public class DelayedDrawTimer implements Runnable {
-		protected Control control;
-
-		public DelayedDrawTimer(Control control1) {
-			this.control = control1;
-		}
-
-		public void reset(int milliseconds) {
-			getDisplay().timerExec(milliseconds, this);
-		}
-
-		public void run() {
-			control.redraw();
-		}
-	}
-
-	Display getDisplay() {
-
-		return PlatformUI.getWorkbench().getDisplay();
-	}
-
-	/**
-	 * EditManager
-	 */
-	public class EditManager {
-		protected Tree fTree1;
-		protected Control cellEditorHolder;
-		protected CellEditorState cellEditorState;
-
-		public EditManager(Tree tree) {
-			this.fTree1 = tree;
-			this.cellEditorHolder = new Composite(tree, SWT.NONE);
-
-			final Tree theTree = tree;
-
-			MouseAdapter theMouseAdapter = new MouseAdapter() {
-				public void mouseDown(MouseEvent e) {
-					deactivateCellEditor();
-
-					if (e.x > columnPosition + columnHitWidth) {
-						TreeItem[] items = theTree.getSelection();
-						// No edit if more than one row is selected.
-						if (items.length == 1) {
-							Rectangle bounds = items[0].getBounds();
-							if ((bounds != null) && (e.y >= bounds.y) && (e.y <= bounds.y + bounds.height)) {
-								int columnToEdit = 1;
-								activateCellEditor(items[0], columnToEdit);
-							}
-						}
-					}
-				}
-			};
-
-			SelectionListener selectionListener = new SelectionListener() {
-				public void widgetDefaultSelected(SelectionEvent e) {
-					applyCellEditorValue();
-				}
-
-				public void widgetSelected(SelectionEvent e) {
-					applyCellEditorValue();
-				}
-			};
-
-			KeyListener keyListener = new KeyAdapter() {
-				public void keyPressed(KeyEvent e) {
-					if (e.character == SWT.CR) {
-						deactivateCellEditor();
-						TreeItem[] items = theTree.getSelection();
-						if (items.length == 1) {
-							activateCellEditor(items[0], 1);
-						}
-					}
-				}
-			};
-
-			tree.addMouseListener(theMouseAdapter);
-			tree.addKeyListener(keyListener);
-			ScrollBar hBar = tree.getHorizontalBar();
-			if (hBar != null) {
-				hBar.addSelectionListener(selectionListener);
-			}
-			ScrollBar vBar = tree.getVerticalBar();
-			if (vBar != null) {
-				vBar.addSelectionListener(selectionListener);
-			}
-		}
-
-		public boolean isCellEditorActive() {
-			return cellEditorState != null;
-		}
-
-		public void applyCellEditorValue() {
-			if ((cellEditorState != null) && (cellModifier != null)) {
-				TreeItem treeItem = cellEditorState.fTreeItem;
-
-				// The area below the cell editor needs to be explicity
-				// repainted on Linux
-				//
-				// Rectangle r = B2BHacks.IS_UNIX ? treeItem.getBounds() :
-				// null;
-
-				Object value = cellEditorState.fCellEditor.getValue();
-				String property = cellEditorState.fProperty;
-
-				deactivateCellEditor();
-
-				cellModifier.modify(treeItem, property, value);
-
-				// if (r != null) {
-				// tree.redraw(r.x, r.y, tree.getBounds().width, r.height,
-				// false);
-				// }
-			}
-		}
-
-		public void deactivateCellEditor() {
-			// Clean up any previous editor control
-			if (cellEditorState != null) {
-				cellEditorState.deactivate();
-				cellEditorState = null;
-			}
-		}
-
-		public void activateCellEditor(TreeItem treeItem, int column) {
-			if (cellModifier instanceof ICellEditorProvider) {
-				ICellEditorProvider cellEditorProvider = (ICellEditorProvider) cellModifier;
-				Object data = treeItem.getData();
-				if (fColumnProperties.length > column) {
-					String property = fColumnProperties[column];
-					if (cellModifier.canModify(data, property)) {
-						CellEditor newCellEditor = cellEditorProvider.getCellEditor(data, column);
-						if (newCellEditor != null) {
-							// The control that will be the editor must be a
-							// child of the columnPosition
-							Control control = newCellEditor.getControl();
-							if (control != null) {
-								cellEditorState = new CellEditorState(newCellEditor, control, treeItem, column, property);
-								cellEditorState.activate();
-							}
-						}
-					}
-				}
-			}
-		}
-
-		/**
-		 * this class holds the state that is need on a per cell editor
-		 * invocation basis
-		 */
-		public class CellEditorState implements ICellEditorListener, FocusListener {
-			public CellEditor fCellEditor;
-			public Control fControl;
-			public TreeItem fTreeItem;
-			public int fColumnNumber;
-			public String fProperty;
-
-			public CellEditorState(CellEditor cellEditor, Control control, TreeItem treeItem, int columnNumber, String property) {
-				this.fCellEditor = cellEditor;
-				this.fControl = control;
-				this.fTreeItem = treeItem;
-				this.fColumnNumber = columnNumber;
-				this.fProperty = property;
-			}
-
-			public void activate() {
-				Object element = fTreeItem.getData();
-				String value = cellModifier.getValue(element, fProperty).toString();
-				if (fControl instanceof Text) {
-					Text text = (Text) fControl;
-					int requiredSize = value.length() + 100;
-					if (text.getTextLimit() < requiredSize) {
-						text.setTextLimit(requiredSize);
-					}
-				}
-				Rectangle r = fTreeItem.getBounds();
-				if (r != null) {
-					fControl.setBounds(columnPosition + 5, r.y + 1, fTree1.getClientArea().width - (columnPosition + 5), r.height - 1);
-					fControl.setVisible(true);
-					fCellEditor.setValue(value);
-					fCellEditor.addListener(this);
-					fCellEditor.setFocus();
-					fControl.addFocusListener(this);
-				}
-			}
-
-			public void deactivate() {
-				fCellEditor.removeListener(this);
-				fControl.removeFocusListener(this);
-				fCellEditor.deactivate();
-				fTree1.forceFocus();
-			}
-
-			// ICellEditorListener methods
-			//
-			public void applyEditorValue() {
-				applyCellEditorValue();
-			}
-
-			public void cancelEditor() {
-				deactivateCellEditor();
-			}
-
-			public void editorValueChanged(boolean oldValidState, boolean newValidState) {
-				// nothing, for now
-			}
-
-			// FocusListener methods
-			//
-			public void focusGained(FocusEvent e) {
-				// do nothing
-			}
-
-			public void focusLost(FocusEvent e) {
-				applyCellEditorValue();
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java
deleted file mode 100644
index 02fd23c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-public class ViewerExpandCollapseAction extends Action {
-
-	protected boolean isExpandAction;
-	protected AbstractTreeViewer viewer = null;
-
-	public ViewerExpandCollapseAction(boolean isExpandAction) {
-		this.isExpandAction = isExpandAction;
-		if (isExpandAction) {
-			ImageDescriptor e_imageDescriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_ETOOL_EXPANDALL);
-			ImageDescriptor d_imageDescriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_DTOOL_EXPANDALL);
-
-			setImageDescriptor(e_imageDescriptor);
-			setDisabledImageDescriptor(d_imageDescriptor);
-			setToolTipText(XMLUIMessages._UI_INFO_EXPAND_ALL);
-		}
-		else {
-			ImageDescriptor e_imageDescriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_ETOOL_COLLAPSEALL);
-			ImageDescriptor d_imageDescriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_DTOOL_COLLAPSEALL);
-
-			setImageDescriptor(e_imageDescriptor);
-			setDisabledImageDescriptor(d_imageDescriptor);
-			setToolTipText(XMLUIMessages._UI_INFO_COLLAPSE_ALL);
-		}
-	}
-
-	public void setViewer(AbstractTreeViewer viewer) {
-		this.viewer = viewer;
-	}
-
-	public void run() {
-		if (viewer != null) {
-			// temporarily set the visibility to false
-			// this has a HUGE performance benefit
-			boolean isVisible = viewer.getControl().getVisible();
-			viewer.getControl().setVisible(false);
-
-			if (isExpandAction) {
-				viewer.expandAll();
-			}
-			else {
-				viewer.collapseAll();
-			}
-
-			// restore the previous visibility state
-			// 
-			viewer.getControl().setVisible(isVisible);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorActionDefinitionIds.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorActionDefinitionIds.java
deleted file mode 100644
index 1d380cf..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorActionDefinitionIds.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-
-
-/**
- * Defines the definitions ids for the XML editor actions.
- * 
- * @deprecated Use org.eclipse.wst.sse.ui.edit.util.ActionDefinitionIds
- *             instead
- */
-public interface XMLEditorActionDefinitionIds {
-	public final static String CLEANUP_DOCUMENT = "org.eclipse.wst.sse.ui.edit.ui.cleanup.document";//$NON-NLS-1$
-	public final static String FORMAT_DOCUMENT = "org.eclipse.wst.sse.ui.edit.ui.format.document";//$NON-NLS-1$
-	public final static String FORMAT_ACTIVE_ELEMENTS = "org.eclipse.wst.sse.ui.edit.ui.format.active.elements";//$NON-NLS-1$
-	public final static String OPEN_FILE = "org.eclipse.wst.sse.ui.edit.ui.open.file.from.source";//$NON-NLS-1$
-	// public final static String INFORMATION =
-	// "org.eclipse.wst.sse.ui.edit.ui.show.tooltip.information";//$NON-NLS-1$
-	public final static String INFORMATION = "org.eclipse.jdt.ui.edit.text.java.show.javadoc";//$NON-NLS-1$
-	public final static String ADD_BREAKPOINTS = "org.eclipse.wst.sse.ui.edit.ui.add.breakpoints";//$NON-NLS-1$
-	public final static String MANAGE_BREAKPOINTS = "org.eclipse.wst.sse.ui.edit.ui.manage.breakpoints";//$NON-NLS-1$
-	public final static String ENABLE_BREAKPOINTS = "org.eclipse.wst.sse.ui.edit.ui.enable.breakpoints";//$NON-NLS-1$
-	public final static String DISABLE_BREAKPOINTS = "org.eclipse.wst.sse.ui.edit.ui.disable.breakpoints";//$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorMessages.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorMessages.java
deleted file mode 100644
index c0471bf..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorMessages.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by XML Editor
- * 
- * @plannedfor 1.0
- */
-public class XMLEditorMessages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.wst.xml.ui.internal.tabletree.XMLEditorResources";//$NON-NLS-1$
-
-	public static String XMLTableTreeViewer_0;
-	public static String XMLMultiPageEditorPart_0;
-	public static String XMLTreeExtension_0;
-	public static String XMLTreeExtension_1;
-	public static String XMLTreeExtension_3;
-	public static String XMLTreeExtension_4;
-	public static String XMLTableTreeActionBarContributor_0;
-	public static String XMLTableTreeActionBarContributor_1;
-	public static String XMLTableTreeActionBarContributor_2;
-	public static String XMLTableTreeActionBarContributor_3;
-	public static String XMLTableTreeActionBarContributor_4;
-	public static String XMLTableTreeActionBarContributor_5;
-	public static String XMLTableTreeActionBarContributor_6;
-	public static String XMLTableTreeActionBarContributor_7;
-	public static String XMLTableTreeActionBarContributor_8;
-	public static String An_error_has_occurred_when1_ERROR_;
-	public static String Resource__does_not_exist;
-	public static String Editor_could_not_be_open;
-	public static String TreeExtension_0;
-
-	static {
-		// load message values from bundle file
-		NLS.initializeMessages(BUNDLE_NAME, XMLEditorMessages.class);
-	}
-
-	private XMLEditorMessages() {
-		// cannot create new instance
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginHOLD_OLD.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginHOLD_OLD.java
deleted file mode 100644
index fd3acc0..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginHOLD_OLD.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistry;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistryImpl;
-
-/**
- * @deprecated This plugin has combined with the org.eclipse.wst.xml.ui
- *             plugin. Use XMLUIPlugin instead.
- */
-public class XMLEditorPluginHOLD_OLD extends AbstractUIPlugin {
-
-	public final static String PLUGIN_ID = "org.eclipse.wst.xml.ui.internal.XMLEditorPluginHOLD_OLD"; //$NON-NLS-1$
-	protected static XMLEditorPluginHOLD_OLD instance = null;
-
-	/**
-	 * XMLUIPlugin constructor comment.
-	 */
-	public XMLEditorPluginHOLD_OLD() {
-		super();
-		instance = this;
-
-		// reference the preference store so
-		// initializeDefaultPreferences(IPreferenceStore preferenceStore) is
-		// called
-		getPreferenceStore();
-	}
-
-	public static XMLEditorPluginHOLD_OLD getDefault() {
-		return instance;
-	}
-
-	public synchronized static XMLEditorPluginHOLD_OLD getInstance() {
-		return instance;
-	}
-
-	public AdapterFactoryRegistry getAdapterFactoryRegistry() {
-		return AdapterFactoryRegistryImpl.getInstance();
-
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginImageHelper.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginImageHelper.java
deleted file mode 100644
index b0d11df..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginImageHelper.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import java.util.HashMap;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-/**
- * Helper class to handle images provided by this plug-in.
- * 
- * NOTE: For internal use only. For images used externally, please use the
- * Shared***ImageHelper class instead.
- * 
- * @author amywu
- */
-public class XMLEditorPluginImageHelper {
-	private final String PLUGINID = XMLUIPlugin.ID;
-	private static XMLEditorPluginImageHelper instance = null;
-
-	// save a descriptor for each image
-	private HashMap fImageDescRegistry = null;
-
-	/**
-	 * Gets the instance.
-	 * 
-	 * @return Returns a XMLEditorPluginImageHelper
-	 */
-	public synchronized static XMLEditorPluginImageHelper getInstance() {
-		if (instance == null) {
-			instance = new XMLEditorPluginImageHelper();
-		}
-		return instance;
-	}
-
-	/**
-	 * Retrieves the image associated with resource from the image registry.
-	 * If the image cannot be retrieved, attempt to find and load the image at
-	 * the location specified in resource.
-	 * 
-	 * @param resource
-	 *            the image to retrieve
-	 * @return Image the image associated with resource or null if one could
-	 *         not be found
-	 */
-	public Image getImage(String resource) {
-		Image image = getImageRegistry().get(resource);
-		if (image == null) {
-			// create an image
-			image = createImage(resource);
-		}
-		return image;
-	}
-
-	/**
-	 * Retrieves the image descriptor associated with resource from the image
-	 * descriptor registry. If the image descriptor cannot be retrieved,
-	 * attempt to find and load the image descriptor at the location specified
-	 * in resource.
-	 * 
-	 * @param resource
-	 *            the image descriptor to retrieve
-	 * @return ImageDescriptor the image descriptor assocated with resource or
-	 *         the default "missing" image descriptor if one could not be
-	 *         found
-	 */
-	public ImageDescriptor getImageDescriptor(String resource) {
-		ImageDescriptor imageDescriptor = null;
-		Object o = getImageDescriptorRegistry().get(resource);
-		if (o == null) {
-			// create a descriptor
-			imageDescriptor = createImageDescriptor(resource);
-		}
-		else {
-			imageDescriptor = (ImageDescriptor) o;
-		}
-		return imageDescriptor;
-	}
-
-	/**
-	 * Returns the image descriptor registry for this plugin.
-	 * 
-	 * @return HashMap - image descriptor registry for this plugin
-	 */
-	private HashMap getImageDescriptorRegistry() {
-		if (fImageDescRegistry == null) {
-			fImageDescRegistry = new HashMap();
-		}
-		return fImageDescRegistry;
-	}
-
-	/**
-	 * Returns the image registry for this plugin.
-	 * 
-	 * @return ImageRegistry - image registry for this plugin
-	 */
-	private ImageRegistry getImageRegistry() {
-		return JFaceResources.getImageRegistry();
-	}
-
-	/**
-	 * Creates an image from the given resource and adds the image to the
-	 * image registry.
-	 * 
-	 * @param resource
-	 * @return Image
-	 */
-	private Image createImage(String resource) {
-		ImageDescriptor desc = getImageDescriptor(resource);
-		Image image = null;
-
-		if (desc != null) {
-			image = desc.createImage();
-			// dont add the missing image descriptor image to the image
-			// registry
-			if (!desc.equals(ImageDescriptor.getMissingImageDescriptor())) {
-				getImageRegistry().put(resource, image);
-			}
-		}
-		return image;
-	}
-
-	/**
-	 * Creates an image descriptor from the given imageFilePath and adds the
-	 * image descriptor to the image descriptor registry. If an image
-	 * descriptor could not be created, the default "missing" image descriptor
-	 * is returned but not added to the image descriptor registry.
-	 * 
-	 * @param imageFilePath
-	 * @return ImageDescriptor image descriptor for imageFilePath or default
-	 *         "missing" image descriptor if resource could not be found
-	 */
-	private ImageDescriptor createImageDescriptor(String imageFilePath) {
-		ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGINID, imageFilePath);
-		if (imageDescriptor != null) {
-			getImageDescriptorRegistry().put(imageFilePath, imageDescriptor);
-		}
-		else {
-			imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
-		}
-
-		return imageDescriptor;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginImages.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginImages.java
deleted file mode 100644
index a35f00f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginImages.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-/**
- * Bundle of most images used by the XML Editor plug-in.
- */
-public class XMLEditorPluginImages {
-	public static final String IMG_DTOOL_COLLAPSE = "icons/full/dtool16/collapse.gif"; //$NON-NLS-1$
-	public static final String IMG_ETOOL_COLLAPSE = "icons/full/etool16/collapse.gif"; //$NON-NLS-1$
-	public static final String IMG_DTOOL_COLLAPSEALL = "icons/full/dtool16/collapse_all.gif"; //$NON-NLS-1$
-	public static final String IMG_ETOOL_COLLAPSEALL = "icons/full/etool16/collapse_all.gif"; //$NON-NLS-1$
-	public static final String IMG_DTOOL_EXPAND = "icons/full/dtool16/expand.gif"; //$NON-NLS-1$
-	public static final String IMG_ETOOL_EXPAND = "icons/full/etool16/expand.gif"; //$NON-NLS-1$
-	public static final String IMG_DTOOL_EXPANDALL = "icons/full/dtool16/expand_all.gif"; //$NON-NLS-1$
-	public static final String IMG_ETOOL_EXPANDALL = "icons/full/etool16/expand_all.gif"; //$NON-NLS-1$
-	public static final String IMG_DTOOL_NEW_XML = "icons/full/dtool16/new_xml.gif"; //$NON-NLS-1$
-	public static final String IMG_ETOOL_NEW_XML = "icons/full/etool16/new_xml.gif"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorResources.properties b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorResources.properties
deleted file mode 100644
index 2fc1735..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorResources.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-XMLTableTreeViewer_0=Design
-XMLMultiPageEditorPart_0=Source
-XMLTreeExtension_0=Structure
-XMLTreeExtension_1=Value
-XMLTreeExtension_3=The document is empty.
-XMLTreeExtension_4=Right mouse click here to insert content.
-XMLTableTreeActionBarContributor_0=&XML
-XMLTableTreeActionBarContributor_1=&Expand All
-XMLTableTreeActionBarContributor_2=&Collapse All
-XMLTableTreeActionBarContributor_3=Turn Grammar Constraints Off
-XMLTableTreeActionBarContributor_4=&Turn Grammar Constraints Off
-XMLTableTreeActionBarContributor_5=Turn Grammar Constraints On
-XMLTableTreeActionBarContributor_6=&Turn Grammar Constraints On
-XMLTableTreeActionBarContributor_7=Reload Dependencies
-XMLTableTreeActionBarContributor_8=&Reload Dependencies
-##
-An_error_has_occurred_when1_ERROR_=An error has occurred when initializing the input for the the editor's source page.
-Resource__does_not_exist=Resource {0} does not exist.
-Editor_could_not_be_open=Editor could not be open on {0}
-TreeExtension_0=Cannot display document contents.
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorActionBarContributor.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorActionBarContributor.java
deleted file mode 100644
index 7d4ee4b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorActionBarContributor.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-
-
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.wst.sse.ui.internal.ISourceViewerActionBarContributor;
-
-
-public class XMLMultiPageEditorActionBarContributor extends SourceEditorActionBarContributor {
-
-	private boolean needsMultiInit = true;
-
-	public XMLMultiPageEditorActionBarContributor() {
-		super();
-	}
-
-	protected void initDesignViewerActionBarContributor(IActionBars actionBars) {
-		super.initDesignViewerActionBarContributor(actionBars);
-
-		if (designViewerActionBarContributor != null) {
-			if (designViewerActionBarContributor instanceof IDesignViewerActionBarContributor) {
-				((IDesignViewerActionBarContributor) designViewerActionBarContributor).initViewerSpecificContributions(actionBars);
-			}
-		}
-	}
-
-	protected void activateDesignPage(IEditorPart activeEditor) {
-		if ((sourceViewerActionContributor != null) && (sourceViewerActionContributor instanceof ISourceViewerActionBarContributor)) {
-			// if design page is not really an IEditorPart, activeEditor ==
-			// null, so pass in multiPageEditor instead (d282414)
-			if (activeEditor == null) {
-				sourceViewerActionContributor.setActiveEditor(multiPageEditor);
-			}
-			else {
-				sourceViewerActionContributor.setActiveEditor(activeEditor);
-			}
-			((ISourceViewerActionBarContributor) sourceViewerActionContributor).setViewerSpecificContributionsEnabled(false);
-		}
-
-		if ((designViewerActionBarContributor != null) && (designViewerActionBarContributor instanceof IDesignViewerActionBarContributor)) {
-			designViewerActionBarContributor.setActiveEditor(multiPageEditor);
-			((IDesignViewerActionBarContributor) designViewerActionBarContributor).setViewerSpecificContributionsEnabled(true);
-		}
-	}
-
-	protected void activateSourcePage(IEditorPart activeEditor) {
-		if ((designViewerActionBarContributor != null) && (designViewerActionBarContributor instanceof IDesignViewerActionBarContributor)) {
-			designViewerActionBarContributor.setActiveEditor(multiPageEditor);
-			((IDesignViewerActionBarContributor) designViewerActionBarContributor).setViewerSpecificContributionsEnabled(false);
-		}
-
-		if ((sourceViewerActionContributor != null) && (sourceViewerActionContributor instanceof ISourceViewerActionBarContributor)) {
-			sourceViewerActionContributor.setActiveEditor(activeEditor);
-			((ISourceViewerActionBarContributor) sourceViewerActionContributor).setViewerSpecificContributionsEnabled(true);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.part.EditorActionBarContributor#init(org.eclipse.ui.IActionBars)
-	 */
-	public void init(IActionBars actionBars) {
-		super.init(actionBars);
-		needsMultiInit = true;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(org.eclipse.ui.IEditorPart)
-	 */
-	public void setActiveEditor(IEditorPart targetEditor) {
-		if (needsMultiInit) {
-			designViewerActionBarContributor = new XMLTableTreeActionBarContributor();
-			initDesignViewerActionBarContributor(getActionBars());
-			needsMultiInit = false;
-		}
-		super.setActiveEditor(targetEditor);
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
deleted file mode 100644
index 082edfc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
+++ /dev/null
@@ -1,899 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and
- * is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM Corporation - initial API and implementation
- ****************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextInputListener;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ILabelProvider;
-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.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.IEditorActionBarContributor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IPartService;
-import org.eclipse.ui.IPropertyListener;
-import org.eclipse.ui.IWindowListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.ide.IGotoMarker;
-import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
-import org.eclipse.ui.part.MultiPageEditorPart;
-import org.eclipse.ui.part.MultiPageEditorSite;
-import org.eclipse.ui.part.MultiPageSelectionProvider;
-import org.eclipse.ui.progress.UIJob;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-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.text.ITextRegion;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.xml.core.internal.provisional.IXMLPreferenceNames;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeLabelProvider;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-
-public class XMLMultiPageEditorPart extends MultiPageEditorPart {
-
-	/**
-	 * Internal part activation listener, copied from AbstractTextEditor
-	 */
-	class ActivationListener implements IPartListener, IWindowListener {
-
-		/** Cache of the active workbench part. */
-		private IWorkbenchPart fActivePart;
-		/** Indicates whether activation handling is currently be done. */
-		private boolean fIsHandlingActivation = false;
-		/**
-		 * The part service.
-		 * 
-		 * @since 3.1
-		 */
-		private IPartService fPartService;
-
-		/**
-		 * Creates this activation listener.
-		 * 
-		 * @param partService
-		 *            the part service on which to add the part listener
-		 * @since 3.1
-		 */
-		public ActivationListener(IPartService partService) {
-			fPartService = partService;
-			fPartService.addPartListener(this);
-			PlatformUI.getWorkbench().addWindowListener(this);
-		}
-
-		/**
-		 * Disposes this activation listener.
-		 * 
-		 * @since 3.1
-		 */
-		public void dispose() {
-			fPartService.removePartListener(this);
-			PlatformUI.getWorkbench().removeWindowListener(this);
-			fPartService = null;
-		}
-
-		/*
-		 * @see IPartListener#partActivated(org.eclipse.ui.IWorkbenchPart)
-		 */
-		public void partActivated(IWorkbenchPart part) {
-			fActivePart = part;
-			handleActivation();
-		}
-
-		/*
-		 * @see IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart)
-		 */
-		public void partBroughtToTop(IWorkbenchPart part) {
-			// do nothing
-		}
-
-		/*
-		 * @see IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
-		 */
-		public void partClosed(IWorkbenchPart part) {
-			// do nothing
-		}
-
-		/*
-		 * @see IPartListener#partDeactivated(org.eclipse.ui.IWorkbenchPart)
-		 */
-		public void partDeactivated(IWorkbenchPart part) {
-			fActivePart = null;
-		}
-
-		/*
-		 * @see IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart)
-		 */
-		public void partOpened(IWorkbenchPart part) {
-			// do nothing
-		}
-
-		/**
-		 * Handles the activation triggering a element state check in the
-		 * editor.
-		 */
-		void handleActivation() {
-			if (fIsHandlingActivation || (getTextEditor() == null)) {
-				return;
-			}
-
-			if (fActivePart == XMLMultiPageEditorPart.this) {
-				fIsHandlingActivation = true;
-				try {
-					getTextEditor().safelySanityCheckState(getEditorInput());
-				}
-				finally {
-					fIsHandlingActivation = false;
-				}
-			}
-		}
-
-		/*
-		 * @see org.eclipse.ui.IWindowListener#windowActivated(org.eclipse.ui.IWorkbenchWindow)
-		 * @since 3.1
-		 */
-		public void windowActivated(IWorkbenchWindow window) {
-			if (window == getEditorSite().getWorkbenchWindow()) {
-				/*
-				 * Workaround for problem described in
-				 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11731 Will be
-				 * removed when SWT has solved the problem.
-				 */
-				window.getShell().getDisplay().asyncExec(new Runnable() {
-					public void run() {
-						handleActivation();
-					}
-				});
-			}
-		}
-
-		/*
-		 * @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.IWorkbenchWindow)
-		 * @since 3.1
-		 */
-		public void windowDeactivated(IWorkbenchWindow window) {
-			// do nothing
-		}
-
-		/*
-		 * @see org.eclipse.ui.IWindowListener#windowClosed(org.eclipse.ui.IWorkbenchWindow)
-		 * @since 3.1
-		 */
-		public void windowClosed(IWorkbenchWindow window) {
-			// do nothing
-		}
-
-		/*
-		 * @see org.eclipse.ui.IWindowListener#windowOpened(org.eclipse.ui.IWorkbenchWindow)
-		 * @since 3.1
-		 */
-		public void windowOpened(IWorkbenchWindow window) {
-			// do nothing
-		}
-	}
-
-	/**
-	 * Listens for selection from the source page, applying it to the design
-	 * viewer.
-	 */
-	private class TextEditorPostSelectionAdapter extends UIJob implements ISelectionChangedListener {
-		boolean forcePostSelection = false;
-		ISelection selection = null;
-
-		public TextEditorPostSelectionAdapter() {
-			super(getTitle());
-			setUser(true);
-		}
-
-		public IStatus runInUIThread(IProgressMonitor monitor) {
-			if (selection != null) {
-				fDesignViewer.getSelectionProvider().setSelection(selection);
-			}
-			return Status.OK_STATUS;
-		}
-
-		public void selectionChanged(SelectionChangedEvent event) {
-			if ((fDesignViewer != null) && ((getActivePage() != fDesignPageIndex) || !XMLMultiPageEditorPart.this.equals(getSite().getPage().getActivePart()))) {
-				if (forcePostSelection) {
-					selection = event.getSelection();
-					schedule(200);
-				}
-				else {
-					fDesignViewer.getSelectionProvider().setSelection(event.getSelection());
-				}
-			}
-		}
-	}
-
-	/**
-	 * Internal IPropertyListener
-	 */
-	class PropertyListener implements IPropertyListener {
-		public void propertyChanged(Object source, int propId) {
-			switch (propId) {
-				// had to implement input changed "listener" so that
-				// StructuredTextEditor could tell it containing editor that
-				// the input has change, when a 'resource moved' event is
-				// found.
-				case IEditorPart.PROP_INPUT : {
-				  if (source == getTextEditor() && fDesignViewer instanceof XMLTableTreeViewer) {
-				    IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
-				    try {
-				      if (model instanceof IDOMModel) {
-				        IDOMDocument modelDocument = ((IDOMModel)model).getDocument();
-	                    Object designInput = ((XMLTableTreeViewer)fDesignViewer).getInput();
-				        if (modelDocument != designInput)
-				          setInput(getTextEditor().getEditorInput());
-				      }
-				    } finally {
-				      if (model != null)
-				        model.releaseFromRead();
-				    }
-				  }
-				}
-				case IEditorPart.PROP_DIRTY : {
-					if (source == getTextEditor()) {
-						if (getTextEditor().getEditorInput() != getEditorInput()) {
-							setInput(getTextEditor().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.
-							 */
-							((Control) getTextEditor().getAdapter(Control.class)).getDisplay().asyncExec(runnable);
-						}
-					}
-					break;
-				}
-				case IWorkbenchPart.PROP_TITLE : {
-					// update the input if the title is changed
-					if (source == getTextEditor()) {
-						if (getTextEditor().getEditorInput() != getEditorInput()) {
-							setInput(getTextEditor().getEditorInput());
-						}
-					}
-					break;
-				}
-				default : {
-					// propagate changes. Is this needed? Answer: Yes.
-					if (source == getTextEditor()) {
-						_firePropertyChange(propId);
-					}
-					break;
-				}
-			}
-
-		}
-	}
-
-	class TextInputListener implements ITextInputListener {
-		public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
-			// do nothing
-		}
-
-		public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
-			if ((fDesignViewer != null) && (newInput != null)) {
-				fDesignViewer.setDocument(newInput);
-			}
-		}
-	}
-
-	class StatusLineLabelProvider extends JFaceNodeLabelProvider {
-		public StatusLineLabelProvider() {
-		}
-
-		public String getText(Object element) {
-			if (element == null)
-				return null;
-
-			Node node = (Node) element;
-			if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
-				return getText(((Attr) node).getOwnerElement());
-			}
-
-			StringBuffer s = new StringBuffer();
-			if (node.getNodeType() != Node.DOCUMENT_NODE) {
-				while (node != null && node instanceof INodeNotifier) {
-					INodeNotifier notifier = (INodeNotifier) node;
-					if (node.getNodeType() != Node.DOCUMENT_NODE) {
-						IJFaceNodeAdapter adapter = (IJFaceNodeAdapter) notifier.getAdapterFor(IJFaceNodeAdapter.class);
-						if (adapter != null) {
-							s.insert(0, adapter.getLabelText(node));
-						}
-					}
-					node = node.getParentNode();
-					if (node != null && node.getNodeType() != Node.DOCUMENT_NODE)
-						s.insert(0, IPath.SEPARATOR);
-				}
-			}
-			return s.toString();
-		}
-
-		public Image getImage(Object element) {
-			if (element == null)
-				return null;
-
-			Node node = (Node) element;
-			if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
-				return getImage(((Attr) node).getOwnerElement());
-			}
-			return super.getImage(element);
-		}
-	}
-
-	/** The design page index. */
-	private int fDesignPageIndex;
-
-	/** The design viewer */
-	IDesignViewer fDesignViewer;
-
-	private ActivationListener fActivationListener;
-
-	IPropertyListener fPropertyListener = null;
-
-	/** The source page index. */
-	int fSourcePageIndex;
-
-	/** The text editor. */
-	private StructuredTextEditor fTextEditor;
-
-	private TextEditorPostSelectionAdapter fTextEditorSelectionListener;
-
-	private ILabelProvider fStatusLineLabelProvider;
-
-	/**
-	 * StructuredTextMultiPageEditorPart constructor comment.
-	 */
-	public XMLMultiPageEditorPart() {
-		super();
-		fStatusLineLabelProvider = new StatusLineLabelProvider();
-	}
-
-	/*
-	 * This method is just to make firePropertyChanged accessible from some
-	 * (anonomous) inner classes.
-	 */
-	void _firePropertyChange(int property) {
-		super.firePropertyChange(property);
-	}
-
-	/**
-	 * Adds the source page of the multi-page editor.
-	 */
-	private void addSourcePage() throws PartInitException {
-		fSourcePageIndex = addPage(fTextEditor, getEditorInput());
-		setPageText(fSourcePageIndex, XMLEditorMessages.XMLMultiPageEditorPart_0);
-
-		firePropertyChange(PROP_TITLE);
-
-		// Changes to the Text Viewer's document instance should also
-		// force an
-		// input refresh
-		fTextEditor.getTextViewer().addTextInputListener(new TextInputListener());
-	}
-
-	/**
-	 * Connects the design viewer with the viewer selection manager. Should be
-	 * done after createSourcePage() is done because we need to get the
-	 * ViewerSelectionManager from the TextEditor. setModel is also done here
-	 * because getModel() needs to reference the TextEditor.
-	 */
-	private void connectDesignPage() {
-		if (fDesignViewer != null) {
-			fDesignViewer.setDocument(getDocument());
-		}
-
-		/*
-		 * Connect selection from the Design page to the selection provider
-		 * for the XMLMultiPageEditorPart so that selection changes in the
-		 * Design page will propogate across the workbench
-		 */
-		if (fDesignViewer.getSelectionProvider() instanceof IPostSelectionProvider) {
-			((IPostSelectionProvider) fDesignViewer.getSelectionProvider()).addPostSelectionChangedListener(new ISelectionChangedListener() {
-				public void selectionChanged(SelectionChangedEvent event) {
-					((MultiPageSelectionProvider) getSite().getSelectionProvider()).firePostSelectionChanged(event);
-				}
-			});
-		}
-		fDesignViewer.getSelectionProvider().addSelectionChangedListener(new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				((MultiPageSelectionProvider) getSite().getSelectionProvider()).fireSelectionChanged(event);
-			}
-		});
-
-		/*
-		 * Connect selection from the Design page to the selection provider of
-		 * the Source page so that selection in the Design page will drive
-		 * selection in the Source page. Prefer post selection.
-		 */
-		if (fDesignViewer.getSelectionProvider() instanceof IPostSelectionProvider) {
-			((IPostSelectionProvider) fDesignViewer.getSelectionProvider()).addPostSelectionChangedListener(new ISelectionChangedListener() {
-				public void selectionChanged(final SelectionChangedEvent event) {
-					/*
-					 * Only force selection update if source page is not
-					 * active
-					 */
-					if (getActivePage() != fSourcePageIndex) {
-						getTextEditor().getSelectionProvider().setSelection(event.getSelection());
-					}
-				}
-			});
-		}
-		else {
-			fDesignViewer.getSelectionProvider().addSelectionChangedListener(new ISelectionChangedListener() {
-				public void selectionChanged(SelectionChangedEvent event) {
-					/*
-					 * Only force selection update if source page is not
-					 * active
-					 */
-					if (getActivePage() != fSourcePageIndex) {
-						getTextEditor().getSelectionProvider().setSelection(event.getSelection());
-					}
-					/* Bug 210481 - Removed call to updateStatusLine because this is already
-					 * handled by the selection in the source page */
-				}
-			});
-		}
-
-		/*
-		 * Handle double-click in the Design page by selecting the
-		 * corresponding amount of text in the Source page.
-		 */
-		fDesignViewer.getControl().addListener(SWT.MouseDoubleClick, new Listener() {
-			public void handleEvent(Event event) {
-				ISelection selection = fDesignViewer.getSelectionProvider().getSelection();
-				int start = -1;
-				int length = -1;
-				if (selection instanceof IStructuredSelection) {
-					/*
-					 * selection goes from the start of the first object to
-					 * the end of the last
-					 */
-					IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-					Object o = structuredSelection.getFirstElement();
-					Object o2 = null;
-					if (structuredSelection.size() > 1) {
-						o2 = structuredSelection.toArray()[structuredSelection.size() - 1];
-					}
-					else {
-						o2 = o;
-					}
-					if (o instanceof IndexedRegion) {
-						start = ((IndexedRegion) o).getStartOffset();
-						length = ((IndexedRegion) o2).getEndOffset() - start;
-					}
-					else if (o2 instanceof ITextRegion) {
-						start = ((ITextRegion) o).getStart();
-						length = ((ITextRegion) o2).getEnd() - start;
-					}
-				}
-				else if (selection instanceof ITextSelection) {
-					start = ((ITextSelection) selection).getOffset();
-					length = ((ITextSelection) selection).getLength();
-				}
-				if ((start > -1) && (length > -1)) {
-					getTextEditor().selectAndReveal(start, length);
-				}
-			}
-		});
-
-		/*
-		 * Connect selection from the Source page to the selection provider of
-		 * the Design page so that selection in the Source page will drive
-		 * selection in the Design page. Prefer post selection.
-		 */
-		ISelectionProvider provider = getTextEditor().getSelectionProvider();
-		if (fTextEditorSelectionListener == null) {
-			fTextEditorSelectionListener = new TextEditorPostSelectionAdapter();
-		}
-		if (provider instanceof IPostSelectionProvider) {
-			fTextEditorSelectionListener.forcePostSelection = false;
-			((IPostSelectionProvider) provider).addPostSelectionChangedListener(fTextEditorSelectionListener);
-		}
-		else {
-			fTextEditorSelectionListener.forcePostSelection = true;
-			provider.addSelectionChangedListener(fTextEditorSelectionListener);
-		}
-	}
-
-	/**
-	 * Create and Add the Design Page using a registered factory
-	 * 
-	 */
-	private void createAndAddDesignPage() {
-		IDesignViewer designViewer = createDesignPage();
-
-		fDesignViewer = designViewer;
-		// note: By adding the design page as a Control instead of an
-		// IEditorPart, page switches will indicate
-		// a "null" active editor when the design page is made active
-		fDesignPageIndex = addPage(designViewer.getControl());
-		setPageText(fDesignPageIndex, designViewer.getTitle());
-	}
-
-	protected IDesignViewer createDesignPage() {
-		XMLTableTreeViewer tableTreeViewer = new XMLTableTreeViewer(getContainer());
-		// Set the default infopop for XML design viewer.
-		XMLUIPlugin.getInstance().getWorkbench().getHelpSystem().setHelp(tableTreeViewer.getControl(), XMLTableTreeHelpContextIds.XML_DESIGN_VIEW_HELPID);
-		return tableTreeViewer;
-	}
-
-	/**
-	 * Creates the pages of this multi-page editor.
-	 * <p>
-	 * Subclasses of <code>MultiPageEditor</code> must implement this
-	 * method.
-	 * </p>
-	 */
-	protected void createPages() {
-		try {
-			// source page MUST be created before design page, now
-			createSourcePage();
-
-			createAndAddDesignPage();
-			addSourcePage();
-			connectDesignPage();
-
-			// set the active editor in the action bar contributor first
-			// before setactivepage calls action bar contributor's
-			// setactivepage (bug141013 - remove when bug151488 is fixed)
-			IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor();
-			if (contributor instanceof MultiPageEditorActionBarContributor) {
-				((MultiPageEditorActionBarContributor) contributor).setActiveEditor(this);
-			}
-
-			int activePageIndex = getPreferenceStore().getInt(IXMLPreferenceNames.LAST_ACTIVE_PAGE);
-			if ((activePageIndex >= 0) && (activePageIndex < getPageCount())) {
-				setActivePage(activePageIndex);
-			}
-			else {
-				setActivePage(fSourcePageIndex);
-			}
-		}
-		catch (PartInitException e) {
-			Logger.logException(e);
-			throw new RuntimeException(e);
-		}
-	}
-
-	/**
-	 * @see org.eclipse.ui.part.MultiPageEditorPart#createSite(org.eclipse.ui.IEditorPart)
-	 */
-	protected IEditorSite createSite(IEditorPart editor) {
-		IEditorSite site = null;
-		if (editor == fTextEditor) {
-			site = new MultiPageEditorSite(this, editor) {
-				/**
-				 * @see org.eclipse.ui.part.MultiPageEditorSite#getActionBarContributor()
-				 */
-				public IEditorActionBarContributor getActionBarContributor() {
-					IEditorActionBarContributor contributor = super.getActionBarContributor();
-					IEditorActionBarContributor multiContributor = XMLMultiPageEditorPart.this.getEditorSite().getActionBarContributor();
-					if (multiContributor instanceof XMLMultiPageEditorActionBarContributor) {
-						contributor = ((XMLMultiPageEditorActionBarContributor) multiContributor).sourceViewerActionContributor;
-					}
-					return contributor;
-				}
-
-				public String getId() {
-					// sets this id so nested editor is considered xml source
-					// page
-					return ContentTypeIdForXML.ContentTypeID_XML + ".source"; //$NON-NLS-1$;
-				}
-			};
-		}
-		else {
-			site = super.createSite(editor);
-		}
-		return site;
-	}
-
-	/**
-	 * Creates the source page of the multi-page editor.
-	 */
-	protected void createSourcePage() throws PartInitException {
-		fTextEditor = createTextEditor();
-		fTextEditor.setEditorPart(this);
-
-		if (fPropertyListener == null) {
-			fPropertyListener = new PropertyListener();
-		}
-		fTextEditor.addPropertyListener(fPropertyListener);
-	}
-
-	/**
-	 * Method createTextEditor.
-	 * 
-	 * @return StructuredTextEditor
-	 */
-	private StructuredTextEditor createTextEditor() {
-		return new StructuredTextEditor();
-	}
-
-	private void disconnectDesignPage() {
-		if (fDesignViewer != null) {
-			fDesignViewer.setDocument(null);
-		}
-	}
-
-	public void dispose() {
-		Logger.trace("Source Editor", "XMLMultiPageEditorPart::dispose entry"); //$NON-NLS-1$ //$NON-NLS-2$
-
-		disconnectDesignPage();
-
-		if (fActivationListener != null) {
-			fActivationListener.dispose();
-			fActivationListener = null;
-		}
-
-		if ((fTextEditor != null) && (fPropertyListener != null)) {
-			fTextEditor.removePropertyListener(fPropertyListener);
-		}
-
-		// moved to last when added window ... seems like
-		// we'd be in danger of losing some data, like site,
-		// or something.
-		super.dispose();
-
-		Logger.trace("Source Editor", "StructuredTextMultiPageEditorPart::dispose exit"); //$NON-NLS-1$ //$NON-NLS-2$
-
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public void doSave(IProgressMonitor monitor) {
-		fTextEditor.doSave(monitor);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.ISaveablePart#doSaveAs()
-	 */
-	public void doSaveAs() {
-		fTextEditor.doSaveAs();
-		/*
-		 * Update the design viewer since the editor input would have changed
-		 * to the new file.
-		 */
-		if (fDesignViewer != null) {
-			fDesignViewer.setDocument(getDocument());
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-	 */
-	public Object getAdapter(Class key) {
-		Object result = null;
-
-		// we extend superclass, not override it, so allow it first
-		// chance to satisfy request.
-		result = super.getAdapter(key);
-
-		if (result == null) {
-			if (key == IDesignViewer.class) {
-				result = fDesignViewer;
-
-			}
-			else if (key.equals(IGotoMarker.class)) {
-				result = new IGotoMarker() {
-					public void gotoMarker(IMarker marker) {
-						XMLMultiPageEditorPart.this.gotoMarker(marker);
-					}
-				};
-			}
-			else {
-				/*
-				 * DMW: I'm bullet-proofing this because its been reported (on
-				 * very early versions) a null pointer sometimes happens here
-				 * on startup, when an editor has been left open when
-				 * workbench shutdown.
-				 */
-				if (fTextEditor != null) {
-					result = fTextEditor.getAdapter(key);
-				}
-			}
-		}
-		return result;
-	}
-
-	private IDocument getDocument() {
-		IDocument document = null;
-		if (fTextEditor != null) {
-			document = fTextEditor.getDocumentProvider().getDocument(fTextEditor.getEditorInput());
-		}
-		return document;
-	}
-
-	private IPreferenceStore getPreferenceStore() {
-		return XMLUIPlugin.getDefault().getPreferenceStore();
-	}
-
-	StructuredTextEditor getTextEditor() {
-		return fTextEditor;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.IWorkbenchPart#getTitle()
-	 */
-	public String getTitle() {
-		String title = null;
-		if (getTextEditor() == null) {
-			if (getEditorInput() != null) {
-				title = getEditorInput().getName();
-			}
-		}
-		else {
-			title = getTextEditor().getTitle();
-		}
-		if (title == null) {
-			title = getPartName();
-		}
-		return title;
-	}
-
-	void gotoMarker(IMarker marker) {
-		setActivePage(fSourcePageIndex);
-		IDE.gotoMarker(fTextEditor, marker);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.IEditorPart#init(org.eclipse.ui.IEditorSite,
-	 *      org.eclipse.ui.IEditorInput)
-	 */
-	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
-		try {
-			super.init(site, input);
-			// we want to listen for our own activation
-			fActivationListener = new ActivationListener(site.getWorkbenchWindow().getPartService());
-		}
-		catch (Exception e) {
-			Logger.logException("exception initializing " + getClass().getName(), e); //$NON-NLS-1$
-		}
-		setPartName(input.getName());
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
-	 */
-	public boolean isSaveAsAllowed() {
-		return (fTextEditor != null) && fTextEditor.isSaveAsAllowed();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
-	 */
-	public boolean isSaveOnCloseNeeded() {
-		// overriding super class since it does a lowly isDirty!
-		if (fTextEditor != null) {
-			return fTextEditor.isSaveOnCloseNeeded();
-		}
-		return isDirty();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.part.MultiPageEditorPart#pageChange(int)
-	 */
-	protected void pageChange(int newPageIndex) {
-		super.pageChange(newPageIndex);
-		saveLastActivePageIndex(newPageIndex);
-
-		if (newPageIndex == fDesignPageIndex) {
-			// design page isn't an IEditorPart, therefore we have to send
-			// selection changes ourselves
-			ISelectionProvider selectionProvider = fDesignViewer.getSelectionProvider();
-			if (selectionProvider != null) {
-				SelectionChangedEvent event = new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection());
-				((MultiPageSelectionProvider) getSite().getSelectionProvider()).fireSelectionChanged(event);
-				((MultiPageSelectionProvider) getSite().getSelectionProvider()).firePostSelectionChanged(event);
-			}
-		}
-	}
-
-	private void saveLastActivePageIndex(int newPageIndex) {
-		// save the last active page index to preference manager
-		getPreferenceStore().setValue(IXMLPreferenceNames.LAST_ACTIVE_PAGE, newPageIndex);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.part.EditorPart#setInput(org.eclipse.ui.IEditorInput)
-	 */
-	protected void setInput(IEditorInput input) {
-		/*
-		 * If driven from the Source page, it's "model" may not be up to date
-		 * with (or even exist for) the input just yet. Later notification
-		 * from the TextViewer could set us straight, although it's not
-		 * guaranteed to happen after the model has been created.
-		 */
-		super.setInput(input);
-		if (fDesignViewer != null) {
-			fDesignViewer.setDocument(getDocument());
-		}
-		setPartName(input.getName());
-	}
-
-	void updateStatusLine(ISelection selection) {
-		IStatusLineManager statusLineManager = getEditorSite().getActionBars().getStatusLineManager();
-		if (fStatusLineLabelProvider != null && statusLineManager != null) {
-			String text = null;
-			Image image = null;
-			if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
-				Object firstElement = ((IStructuredSelection) selection).getFirstElement();
-				if (firstElement != null) {
-					text = fStatusLineLabelProvider.getText(firstElement);
-					image = fStatusLineLabelProvider.getImage((firstElement));
-				}
-			}
-			if (image == null) {
-				statusLineManager.setMessage(text);
-			}
-			else {
-				statusLineManager.setMessage(image, text);
-			}
-		}
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
deleted file mode 100644
index 9da1fef..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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
- *     David Carver - bug 212330 - migrate to org.eclipse.ui.menus extension point
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionManager;
-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.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorSite;
-//import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.CMDocumentLoader;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.InferredGrammarBuildingCMDocumentLoader;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
-import org.w3c.dom.Document;
-
-/**
- * 
- */
-public class XMLTableTreeActionBarContributor implements IDesignViewerActionBarContributor {
-
-	protected IEditorPart editorPart;
-	protected final static String DESIGN_VIEWER_SEPARATOR_1_ID = "sed.tabletree.separator.1"; //$NON-NLS-1$
-	protected final static String DESIGN_VIEWER_SEPARATOR_2_ID = "sed.tabletree.separator.2"; //$NON-NLS-1$
-	protected final static String VALIDATE_XML_ID = "sed.tabletree.validateXML"; //$NON-NLS-1$
-	protected final static String RELOAD_GRAMMAR_ID = "sed.tabletree.reloadGrammar"; //$NON-NLS-1$
-	protected final static String TOGGLE_EDIT_MODE_ID = "sed.tabletree.toggleEditMode"; //$NON-NLS-1$
-	protected final static String EXPAND_ALL_ID = "sed.tabletree.expandAll"; //$NON-NLS-1$
-	protected final static String COLLAPSE_ALL_ID = "sed.tabletree.collapseAll"; //$NON-NLS-1$
-
-	protected ToggleEditModeAction toggleAction;
-	protected ReloadGrammarAction reloadGrammarAction;
-	// protected ValidateXMLAction validateXMLAction;
-	protected ViewerExpandCollapseAction expandAction;
-	protected ViewerExpandCollapseAction collapseAction;
-	protected ViewerExpandCollapseAction xmlMenuExpandAction;
-	protected ViewerExpandCollapseAction xmlMenuCollapseAction;
-
-	public XMLTableTreeActionBarContributor() {
-	}
-
-	protected void removeContributions(IContributionManager manager) {
-/*		try {
-			doRemove(manager, DESIGN_VIEWER_SEPARATOR_1_ID);
-			doRemove(manager, DESIGN_VIEWER_SEPARATOR_2_ID);
-			doRemove(manager, VALIDATE_XML_ID);
-			doRemove(manager, RELOAD_GRAMMAR_ID);
-			doRemove(manager, TOGGLE_EDIT_MODE_ID);
-			doRemove(manager, EXPAND_ALL_ID);
-			doRemove(manager, COLLAPSE_ALL_ID);
-		}
-		catch (Exception e) {
-		}
-*/		
-	}
-
-	protected void doRemove(IContributionManager manager, String id) {
-/*		try {
-			if (manager.find(id) != null) {
-				manager.remove(id);
-			}
-		}
-		catch (Exception e) {
-		}
-*/	}
-
-	public void init(IActionBars bars, IWorkbenchPage page) {
-		init(bars);
-	}
-
-	public void init(IActionBars bars) {
-//		IToolBarManager tbm = bars.getToolBarManager();
-
-/*		IMenuManager xmlMenu = bars.getMenuManager().findMenuUsingPath("org.eclipse.core.runtime.xml.design.xmlmenu"); //$NON-NLS-1$
-
-		if (xmlMenu == null) {
-			xmlMenu = new MenuManager(XMLEditorMessages.XMLTableTreeActionBarContributor_0, "org.eclipse.core.runtime.xml.design.xmlmenu"); //$NON-NLS-1$
-			// For RCP usage
-			if (bars.getMenuManager().find(IWorkbenchActionConstants.M_WINDOW) != null) {
-				bars.getMenuManager().insertBefore(IWorkbenchActionConstants.M_WINDOW, xmlMenu);
-			}
-		}
-		else {
-			removeContributions(xmlMenu);
-		}
-
-		tbm.add(new Separator("DESIGN_VIEWER_SEPARATOR_1_ID")); //$NON-NLS-1$
-*/
-		// ToggleEditModeAction
-		//           
-/*		toggleAction = new ToggleEditModeAction();
-		toggleAction.setId(TOGGLE_EDIT_MODE_ID);
-		xmlMenu.add(toggleAction);
-		tbm.add(toggleAction);
-*/
-		// ReloadGrammarAction
-		//
-/*		reloadGrammarAction = new ReloadGrammarAction();
-		reloadGrammarAction.setId(RELOAD_GRAMMAR_ID);
-		tbm.add(reloadGrammarAction);
-		xmlMenu.add(reloadGrammarAction);
-
-		xmlMenu.add(new Separator());
-*/
-		// ExpandCollapseAction
-		//
-/*		xmlMenuExpandAction = new ViewerExpandCollapseAction(true);
-		xmlMenuExpandAction.setId(EXPAND_ALL_ID);
-		xmlMenuExpandAction.setText(XMLEditorMessages.XMLTableTreeActionBarContributor_1);
-		xmlMenu.add(xmlMenuExpandAction);
-
-		xmlMenuCollapseAction = new ViewerExpandCollapseAction(false);
-		xmlMenuCollapseAction.setId(COLLAPSE_ALL_ID);
-		xmlMenuCollapseAction.setId(EXPAND_ALL_ID);
-		xmlMenuCollapseAction.setText(XMLEditorMessages.XMLTableTreeActionBarContributor_2);
-		xmlMenu.add(xmlMenuCollapseAction);
-*/		
-	}
-
-	protected void addActionWithId(IMenuManager menuManager, Action action, String id) {
-		action.setId(id);
-		menuManager.add(action);
-	}
-
-	public void initViewerSpecificContributions(IActionBars bars) {
-/*		IToolBarManager tbm = bars.getToolBarManager();
-		tbm.add(new Separator(DESIGN_VIEWER_SEPARATOR_2_ID));
-
-		expandAction = new ViewerExpandCollapseAction(true);
-		expandAction.setId(EXPAND_ALL_ID);
-		tbm.add(expandAction);
-
-		collapseAction = new ViewerExpandCollapseAction(false);
-		collapseAction.setId(COLLAPSE_ALL_ID);
-		tbm.add(collapseAction);
-*/		
-	}
-
-	public void setViewerSpecificContributionsEnabled(boolean enabled) {
-/*		if (expandAction != null) {
-			expandAction.setEnabled(enabled);
-			xmlMenuExpandAction.setEnabled(enabled);
-		}
-
-		if (collapseAction != null) {
-			collapseAction.setEnabled(enabled);
-			xmlMenuCollapseAction.setEnabled(enabled);
-		}
-*/		
-	}
-
-	public void setActiveEditor(IEditorPart targetEditor) {
-		editorPart = targetEditor;
-
-//		IStructuredModel model = getModelForEditorPart(targetEditor);
-/*		reloadGrammarAction.setModel(model);
-		toggleAction.setModelQuery(ModelQueryUtil.getModelQuery(model));
-
-		XMLTableTreeViewer tableTreeViewer = getTableTreeViewerForEditorPart(editorPart);
-		if (tableTreeViewer != null) {
-			expandAction.setViewer(tableTreeViewer);
-			collapseAction.setViewer(tableTreeViewer);
-
-			xmlMenuExpandAction.setViewer(tableTreeViewer);
-			xmlMenuCollapseAction.setViewer(tableTreeViewer);
-		}
-*/
-		if (editorPart instanceof XMLMultiPageEditorPart) {
-			IWorkbenchPartSite site = editorPart.getSite();
-			if (site instanceof IEditorSite) {
-				ITextEditor textEditor = ((XMLMultiPageEditorPart) editorPart).getTextEditor();
-				IActionBars actionBars = ((IEditorSite) site).getActionBars();
-				actionBars.setGlobalActionHandler(ITextEditorActionConstants.UNDO, getAction(textEditor, ITextEditorActionConstants.UNDO));
-				actionBars.setGlobalActionHandler(ITextEditorActionConstants.REDO, getAction(textEditor, ITextEditorActionConstants.REDO));
-			}
-		}
-
-		// TODO... uncomment this and investigate NPE
-		//
-		// add the cut/copy/paste for text fields
-		// ActionHandlerPlugin.connectPart(editorPart);
-	}
-
-	protected final IAction getAction(ITextEditor editor, String actionId) {
-		return (editor == null ? null : editor.getAction(actionId));
-	}
-
-	protected IStructuredModel getModelForEditorPart(IEditorPart targetEditor) {
-		IStructuredModel result = null;
-		if (editorPart instanceof XMLMultiPageEditorPart) {
-			StructuredTextEditor textEditor = ((XMLMultiPageEditorPart) targetEditor).getTextEditor();
-			result = (textEditor != null) ? textEditor.getModel() : null;
-		}
-		return result;
-	}
-
-	protected XMLTableTreeViewer getTableTreeViewerForEditorPart(IEditorPart targetEditor) {
-		XMLTableTreeViewer result = null;
-		Object object = targetEditor.getAdapter(IDesignViewer.class);
-		if (object instanceof XMLTableTreeViewer) {
-			result = (XMLTableTreeViewer) object;
-		}
-		return result;
-	}
-
-	/**
-	 * 
-	 */
-	public class ToggleEditModeAction extends Action {
-		protected ImageDescriptor onImage = SharedXMLEditorPluginImageHelper.getImageDescriptor(SharedXMLEditorPluginImageHelper.IMG_ETOOL_CONSTRAINON);
-		protected ImageDescriptor offImage = SharedXMLEditorPluginImageHelper.getImageDescriptor(SharedXMLEditorPluginImageHelper.IMG_ETOOL_CONSTRAINOFF);
-		protected ModelQuery modelQuery;
-
-		public ToggleEditModeAction() {
-			setAppearanceForEditMode(ModelQuery.EDIT_MODE_CONSTRAINED_STRICT);
-		}
-
-		public void run() {
-			if (modelQuery != null) {
-				int newState = getNextState(modelQuery.getEditMode());
-				modelQuery.setEditMode(newState);
-				setAppearanceForEditMode(newState);
-			}
-		}
-
-		public void setModelQuery(ModelQuery newModelQuery) {
-			modelQuery = newModelQuery;
-			if (modelQuery != null) {
-				setAppearanceForEditMode(modelQuery.getEditMode());
-			}
-		}
-
-		public void setAppearanceForEditMode(int editMode) {
-			if (editMode == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) {
-				setToolTipText(XMLEditorMessages.XMLTableTreeActionBarContributor_3);
-				setText(XMLEditorMessages.XMLTableTreeActionBarContributor_4);
-				setImageDescriptor(onImage);
-			}
-			else {
-				setToolTipText(XMLEditorMessages.XMLTableTreeActionBarContributor_5);
-				setText(XMLEditorMessages.XMLTableTreeActionBarContributor_6);
-				setImageDescriptor(offImage);
-			}
-		}
-
-		public int getNextState(int editMode) {
-			int result = -1;
-			if (editMode == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) {
-				result = ModelQuery.EDIT_MODE_UNCONSTRAINED;
-			}
-			else {
-				result = ModelQuery.EDIT_MODE_CONSTRAINED_STRICT;
-			}
-			return result;
-		}
-	}
-
-	/**
-	 * 
-	 */
-	public class ReloadGrammarAction extends Action {
-		protected IStructuredModel model;
-
-		public ReloadGrammarAction() {
-			setDisabledImageDescriptor(SharedXMLEditorPluginImageHelper.getImageDescriptor(SharedXMLEditorPluginImageHelper.IMG_DTOOL_RLDGRMR));
-			setImageDescriptor(SharedXMLEditorPluginImageHelper.getImageDescriptor(SharedXMLEditorPluginImageHelper.IMG_ETOOL_RLDGRMR));
-			setToolTipText(XMLEditorMessages.XMLTableTreeActionBarContributor_7);
-			setText(XMLEditorMessages.XMLTableTreeActionBarContributor_8);
-		}
-
-		public void setModel(IStructuredModel newModel) {
-			this.model = newModel;
-		}
-
-		public void run() {
-			if (model != null) {
-				ModelQuery modelQuery = ModelQueryUtil.getModelQuery(model);
-				Document document = ((IDOMModel) model).getDocument();
-				if ((modelQuery != null) && (modelQuery.getCMDocumentManager() != null)) {
-					modelQuery.getCMDocumentManager().getCMDocumentCache().clear();
-					// TODO... need to figure out how to access the
-					// DOMObserver via ModelQuery
-					// ...why?
-					CMDocumentLoader loader = new InferredGrammarBuildingCMDocumentLoader(document, modelQuery);
-					loader.loadCMDocuments();
-				}
-			}
-		}
-	}
-
-	/**
-	 * @see org.eclipse.ui.IEditorActionBarContributor#dispose()
-	 */
-	public void dispose() {
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeContentProvider.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeContentProvider.java
deleted file mode 100644
index c713320..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeContentProvider.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapterFactory;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManagerListener;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-
-public class XMLTableTreeContentProvider implements ITreeContentProvider, ITableLabelProvider, ILabelProvider, CMDocumentManagerListener {
-
-	protected CMDocumentManager documentManager;
-
-	StructuredViewer fViewer = null;
-
-	private TreeContentHelper treeContentHelper = new TreeContentHelper();
-
-	public XMLTableTreeContentProvider() {
-		super();
-	}
-
-	//
-	// ILabelProvider stuff
-	//
-	public void addListener(ILabelProviderListener listener) {
-		// since we always return 'false' for "isLabelProperty",
-		// not need to listen. Maybe that should change some day?
-	}
-
-	// CMDocumentManagerListener
-	//
-	public void cacheCleared(CMDocumentCache cache) {
-		doDelayedRefreshForViewers();
-	}
-
-	public void cacheUpdated(CMDocumentCache cache, final String uri, int oldStatus, int newStatus, CMDocument cmDocument) {
-		if ((newStatus == CMDocumentCache.STATUS_LOADED) || (newStatus == CMDocumentCache.STATUS_ERROR)) {
-			doDelayedRefreshForViewers();
-		}
-	}
-
-	public void dispose() {
-	}
-
-	private void doDelayedRefreshForViewers() {
-		if ((fViewer != null) && !fViewer.getControl().isDisposed()) {
-			fViewer.getControl().getDisplay().asyncExec(new Runnable() {
-				public void run() {
-					if ((fViewer != null) && !fViewer.getControl().isDisposed()) {
-						fViewer.refresh(true);
-					}
-				}
-			});
-		}
-	}
-
-	public Object[] getChildren(Object element) {
-		if (element instanceof INodeNotifier) {
-			((INodeNotifier) element).getAdapterFor(IJFaceNodeAdapter.class);
-		}
-		return treeContentHelper.getChildren(element);
-	}
-
-	public Image getColumnImage(Object object, int columnIndex) {
-		return (columnIndex == 0) ? getImage(object) : null;
-	}
-
-	//
-	// ITableLabelProvider stuff
-	//
-	public String getColumnText(Object object, int column) {
-		String result = null;
-		if (column == 0) {
-			result = getText(object);
-		}
-		else if ((column == 1) && (object instanceof Node)) {
-			result = treeContentHelper.getNodeValue((Node) object);
-		}
-		return result != null ? result : ""; //$NON-NLS-1$
-	}
-
-	public Object[] getElements(Object element) {
-		return getChildren(element);
-	}
-
-	public Image getImage(Object object) {
-		if (object instanceof INodeNotifier) {
-			((INodeNotifier) object).getAdapterFor(IJFaceNodeAdapter.class);
-		}
-
-		Image image = null;
-		if (object instanceof Node) {
-			Node node = (Node) object;
-			switch (node.getNodeType()) {
-				case Node.ATTRIBUTE_NODE : {
-					image = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_ATTRIBUTE);
-					break;
-				}
-				case Node.CDATA_SECTION_NODE : {
-					image = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_CDATASECTION);
-					break;
-				}
-				case Node.COMMENT_NODE : {
-					image = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_COMMENT);
-					break;
-				}
-				case Node.DOCUMENT_TYPE_NODE : {
-					image = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_DOCTYPE);
-					break;
-				}
-				case Node.ELEMENT_NODE : {
-					image = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_ELEMENT);
-					break;
-				}
-				case Node.PROCESSING_INSTRUCTION_NODE : {
-					image = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_PROCESSINGINSTRUCTION);
-					break;
-				}
-				case Node.TEXT_NODE : {
-					image = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_TXTEXT);
-					break;
-				}
-				case Node.ENTITY_REFERENCE_NODE : {
-					image = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_ENTITY_REFERENCE);
-					break;
-				}
-			}
-
-			// if (image != null) {
-			// Image markerOverlayImage =
-			// overlayIconManager.getOverlayImageForObject(node);
-			// if (markerOverlayImage != null) {
-			// image = imageFactory.createCompositeImage(image,
-			// markerOverlayImage, ImageFactory.BOTTOM_LEFT);
-			// }
-			// }
-		}
-		return image;
-	}
-
-	public Object getParent(Object o) {
-		if (o instanceof INodeNotifier) {
-			((INodeNotifier) o).getAdapterFor(IJFaceNodeAdapter.class);
-		}
-
-		Object result = null;
-		if (o instanceof Node) {
-			Node node = (Node) o;
-			if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
-				result = ((Attr) node).getOwnerElement();
-			}
-			else {
-				result = node.getParentNode();
-			}
-		}
-		return result;
-	}
-
-	public Element getRootElement(Document document) {
-		Element rootElement = null;
-
-		for (Node childNode = document.getFirstChild(); childNode != null; childNode = childNode.getNextSibling()) {
-			if (childNode.getNodeType() == Node.ELEMENT_NODE) {
-				rootElement = (Element) childNode;
-				break;
-			}
-		}
-		return rootElement;
-	}
-
-	public String getText(Object object) {
-		if (object instanceof INodeNotifier) {
-			((INodeNotifier) object).getAdapterFor(IJFaceNodeAdapter.class);
-		}
-
-		String result = null;
-		if (object instanceof Node) {
-			Node node = (Node) object;
-			switch (node.getNodeType()) {
-				case Node.ATTRIBUTE_NODE : {
-					result = node.getNodeName();
-					break;
-				}
-				case Node.DOCUMENT_TYPE_NODE : {
-					result = "DOCTYPE"; //$NON-NLS-1$
-					break;
-				}
-				case Node.ELEMENT_NODE : {
-					result = node.getNodeName();
-					break;
-				}
-				case Node.PROCESSING_INSTRUCTION_NODE : {
-					result = ((ProcessingInstruction) node).getTarget();
-					break;
-				}
-			}
-		}
-		return result != null ? result : ""; //$NON-NLS-1$
-	}
-
-	public boolean hasChildren(Object element) {
-		return getChildren(element).length > 0;
-	}
-
-	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-		// remove our listeners to the old state
-		if (oldInput != null) {
-			Document domDoc = (Document) oldInput;
-			ModelQuery mq = ModelQueryUtil.getModelQuery(domDoc);
-			if (mq != null) {
-				documentManager = mq.getCMDocumentManager();
-				if (documentManager != null) {
-					documentManager.removeListener(this);
-				}
-			}
-		}
-
-		if ((oldInput != null) && (oldInput instanceof IDOMNode)) {
-			IJFaceNodeAdapterFactory factory = (IJFaceNodeAdapterFactory) ((IDOMNode) oldInput).getModel().getFactoryRegistry().getFactoryFor(IJFaceNodeAdapter.class);
-			if (factory != null) {
-				factory.removeListener(viewer);
-			}
-		}
-
-		if (viewer instanceof StructuredViewer) {
-			fViewer = null;
-		}
-		else {
-			fViewer = (StructuredViewer) viewer;
-		}
-
-		if ((newInput != null) && (newInput instanceof IDOMNode)) {
-			IJFaceNodeAdapterFactory factory = (IJFaceNodeAdapterFactory) ((IDOMNode) newInput).getModel().getFactoryRegistry().getFactoryFor(IJFaceNodeAdapter.class);
-			if (factory != null) {
-				factory.addListener(viewer);
-			}
-		}
-
-		if (newInput != null) {
-			Document domDoc = (Document) newInput;
-			ModelQuery mq = ModelQueryUtil.getModelQuery(domDoc);
-
-			if (mq != null) {
-				documentManager = mq.getCMDocumentManager();
-				if (documentManager != null) {
-					documentManager.setPropertyEnabled(CMDocumentManager.PROPERTY_ASYNC_LOAD, true);
-					documentManager.addListener(this);
-				}
-			}
-		}
-	}
-
-	public boolean isDeleted(Object element) {
-		return element != null;
-	}
-
-	// the following methods handle filtering aspects of the viewer
-	//
-	//
-	public boolean isIgnorableText(Node node) {
-		boolean result = false;
-		try {
-			if (node.getNodeType() == Node.TEXT_NODE) {
-				String data = ((Text) node).getData();
-				result = ((data == null) || (data.trim().length() == 0));
-			}
-		}
-		catch (Exception e) {
-			Logger.logException(e);
-		}
-		return result;
-	}
-
-	public boolean isLabelProperty(Object object, String property) {
-		return false;
-	}
-
-	public void propertyChanged(CMDocumentManager cmDocumentManager, String propertyName) {
-		if (cmDocumentManager.getPropertyEnabled(CMDocumentManager.PROPERTY_AUTO_LOAD)) {
-			doDelayedRefreshForViewers();
-		}
-	}
-
-	public void removeListener(ILabelProviderListener listener) {
-		// since we always return 'false' for "isLabelProperty",
-		// not need to listen. Maybe that should change some day?
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeHelpContextIds.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeHelpContextIds.java
deleted file mode 100644
index 60bc4df..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeHelpContextIds.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-
-
-/**
- * Help context ids for the TableTree view.
- * <p>
- * This interface contains constants only; it is not intended to be
- * implemented or extended.
- * </p>
- * 
- */
-public interface XMLTableTreeHelpContextIds {
-	// org.eclipse.wst.xml.ui.
-	public static final String PREFIX = XMLUIPlugin.ID + "."; //$NON-NLS-1$
-
-	// XML Design View
-	public static final String XML_DESIGN_VIEW_HELPID = PREFIX + "xmlm3000"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreePropertyDescriptorFactory.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreePropertyDescriptorFactory.java
deleted file mode 100644
index b929b4c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreePropertyDescriptorFactory.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import java.util.List;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.ui.internal.properties.EnumeratedStringPropertyDescriptor;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-
-public class XMLTableTreePropertyDescriptorFactory extends DOMPropertyDescriptorFactory {
-
-	protected TreeContentHelper treeContentHelper = new TreeContentHelper();
-
-	public XMLTableTreePropertyDescriptorFactory() {
-		super();
-	}
-
-	protected IPropertyDescriptor createPropertyDescriptorHelper(String name, Element element, CMNode cmNode) {
-		IPropertyDescriptor result = null;
-
-		ModelQuery mq = ModelQueryUtil.getModelQuery(element.getOwnerDocument());
-		String[] valuesArray = null;
-		if (mq != null) {
-			valuesArray = mq.getPossibleDataTypeValues(element, cmNode);
-		}
-		if ((valuesArray != null) && (valuesArray.length > 0)) {
-			result = new EnumeratedStringPropertyDescriptor(name, name, valuesArray);
-		}
-		else {
-			result = createDefaultPropertyDescriptor(name);
-		}
-
-		return result;
-	}
-
-	public IPropertyDescriptor createTextPropertyDescriptor(Text text) {
-		IPropertyDescriptor result = null;
-		Node parentNode = text.getParentNode();
-		if ((parentNode != null) && (parentNode.getNodeType() == Node.ELEMENT_NODE)) {
-			Element parentElement = (Element) parentNode;
-			ModelQuery mq = ModelQueryUtil.getModelQuery(text.getOwnerDocument());
-			CMElementDeclaration ed = null;
-			if (mq != null) {
-				ed = mq.getCMElementDeclaration(parentElement);
-			}
-			if (ed != null) {
-				result = createPropertyDescriptorHelper(HACK, parentElement, ed);
-			}
-			else {
-				result = createDefaultPropertyDescriptor(parentElement.getNodeName());
-			}
-		}
-
-		if (result == null) {
-			result = new TextPropertyDescriptor(HACK, HACK);
-		}
-
-		return result;
-	}
-
-	public IPropertyDescriptor createAttributePropertyDescriptor(Attr attr) {
-		IPropertyDescriptor result = null;
-
-		String attributeName = attr.getName();
-		ModelQuery mq = ModelQueryUtil.getModelQuery(attr.getOwnerDocument());
-
-		CMAttributeDeclaration ad = null;
-		if (mq != null) {
-			ad = mq.getCMAttributeDeclaration(attr);
-		}
-		if (ad != null) {
-			result = createPropertyDescriptorHelper(attributeName, attr.getOwnerElement(), ad);
-		}
-
-		if (result == null) {
-			result = new TextPropertyDescriptor(attributeName, attributeName);
-		}
-
-		return result;
-	}
-
-	public IPropertyDescriptor createElementPropertyDescriptor(Element element) {
-		IPropertyDescriptor result = null;
-		List list = treeContentHelper.getElementTextContent(element);
-		if (list != null) {
-			Text text = treeContentHelper.getEffectiveTextNodeForCombinedNodeList(list);
-			if (text != null) {
-				result = createTextPropertyDescriptor(text);
-			}
-		}
-
-		if (result == null) {
-			result = new TextPropertyDescriptor(HACK, HACK);
-		}
-		return result;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
deleted file mode 100644
index 331f2d6..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and
- * is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM Corporation - initial API and implementation
- ****************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jface.viewers.CellEditor;
-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.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DragSource;
-import org.eclipse.swt.dnd.DragSourceEvent;
-import org.eclipse.swt.dnd.DragSourceListener;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.DropTargetListener;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.actions.NodeAction;
-import org.eclipse.wst.xml.ui.internal.contentoutline.XMLNodeActionManager;
-import org.eclipse.wst.xml.ui.internal.dnd.DragNodeCommand;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-public class XMLTableTreeViewer extends TreeViewer implements IDesignViewer {
-
-	class NodeActionMenuListener implements IMenuListener {
-		public void menuAboutToShow(IMenuManager menuManager) {
-			// used to disable NodeSelection listening while running
-			// NodeAction
-			XMLNodeActionManager nodeActionManager = new XMLNodeActionManager(((IDOMDocument) getInput()).getModel(), XMLTableTreeViewer.this) {
-				public void beginNodeAction(NodeAction action) {
-					super.beginNodeAction(action);
-				}
-
-				public void endNodeAction(NodeAction action) {
-					super.endNodeAction(action);
-				}
-			};
-			nodeActionManager.fillContextMenu(menuManager, getSelection());
-		}
-	}
-	
-	private class SelectionProvider implements IPostSelectionProvider {
-
-		public void addPostSelectionChangedListener(ISelectionChangedListener listener) {
-			XMLTableTreeViewer.this.addPostSelectionChangedListener(listener);
-		}
-
-		public void removePostSelectionChangedListener(ISelectionChangedListener listener) {
-			XMLTableTreeViewer.this.removePostSelectionChangedListener(listener);
-		}
-
-		public void addSelectionChangedListener(ISelectionChangedListener listener) {
-			XMLTableTreeViewer.this.addSelectionChangedListener(listener);
-		}
-
-		public ISelection getSelection() {
-			return XMLTableTreeViewer.this.getSelection();
-		}
-
-		public void removeSelectionChangedListener(ISelectionChangedListener listener) {
-			XMLTableTreeViewer.this.removeSelectionChangedListener(listener);
-		}
-
-		public void setSelection(ISelection selection) {
-			boolean selectionSet = false;
-			if (!selection.isEmpty() && selection instanceof IStructuredSelection) {
-				IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-				if (selection instanceof ITextSelection) {
-					ITextSelection textSelection = (ITextSelection) selection;
-					
-					if (structuredSelection.size() == 1) {
-						if (structuredSelection.getFirstElement() instanceof IDOMNode) {
-							IDOMNode domNode = (IDOMNode) structuredSelection.getFirstElement();
-							IStructuredDocumentRegion startStructuredDocumentRegion = domNode.getStartStructuredDocumentRegion();
-							if (startStructuredDocumentRegion != null) {
-								ITextRegion matchingRegion = startStructuredDocumentRegion.getRegionAtCharacterOffset(textSelection.getOffset());
-								int allowedIterations = 40;
-								while (matchingRegion != null && !matchingRegion.getType().equals(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) && allowedIterations > 0) {
-									matchingRegion = startStructuredDocumentRegion.getRegionAtCharacterOffset(startStructuredDocumentRegion.getStartOffset(matchingRegion) - 1);
-									allowedIterations--;
-								}
-								if (matchingRegion != null && matchingRegion.getType().equals(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) {
-									String attrName = startStructuredDocumentRegion.getText(matchingRegion);
-									NamedNodeMap attributes = domNode.getAttributes();
-									if (attributes != null && attrName.length() > 0) {
-										Node attr = attributes.getNamedItem(attrName);
-										if (attr != null) {
-											selectionSet = true;
-											XMLTableTreeViewer.this.setSelection(new StructuredSelection(attr));
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-			if (!selectionSet) {
-				XMLTableTreeViewer.this.setSelection(selection);
-			}
-		}
-	}
-
-	protected CellEditor cellEditor;
-
-	protected XMLTreeExtension treeExtension;
-	
-	private ISelectionProvider fSelectionProvider = new SelectionProvider();
-
-	public XMLTableTreeViewer(Composite parent) {
-		super(parent, SWT.FULL_SELECTION | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
-
-		// set up providers
-		this.treeExtension = new XMLTreeExtension(getTree());
-
-		XMLTableTreeContentProvider provider = new XMLTableTreeContentProvider();
-		setContentProvider(provider);
-		setLabelProvider(provider);
-
-		createContextMenu();
-
-		DragSource dragSource = new DragSource(getControl(), DND.DROP_COPY | DND.DROP_MOVE);
-		dragSource.addDragListener(createDragSourceListener());
-		dragSource.setTransfer(new Transfer[] {LocalSelectionTransfer.getTransfer()});
-		DropTarget dropTarget = new DropTarget(getControl(), DND.DROP_COPY | DND.DROP_MOVE);
-		dropTarget.addDropListener(createDropTargetListener());
-		dropTarget.setTransfer(new Transfer[] {LocalSelectionTransfer.getTransfer()});
-	}
-
-	/**
-	 * This creates a context menu for the viewer and adds a listener as well
-	 * registering the menu for extension.
-	 */
-	protected void createContextMenu() {
-		MenuManager contextMenu = new MenuManager("#PopUp"); //$NON-NLS-1$
-		contextMenu.add(new Separator("additions")); //$NON-NLS-1$
-		contextMenu.setRemoveAllWhenShown(true);
-		contextMenu.addMenuListener(new NodeActionMenuListener());
-		Menu menu = contextMenu.createContextMenu(getControl());
-		getControl().setMenu(menu);
-	}
-
-	private DragSourceListener createDragSourceListener() {
-		return new DragSourceListener() {
-			public void dragFinished(DragSourceEvent event) {
-				LocalSelectionTransfer.getTransfer().setSelection(null);
-			}
-
-			public void dragSetData(DragSourceEvent event) {
-			}
-
-			public void dragStart(DragSourceEvent event) {
-				LocalSelectionTransfer.getTransfer().setSelection(getSelection());
-			}
-		};
-	}
-
-	private DropTargetListener createDropTargetListener() {
-		return new DropTargetListener() {
-			public void dragEnter(DropTargetEvent event) {
-			}
-
-			public void dragLeave(DropTargetEvent event) {
-			}
-
-			public void dragOperationChanged(DropTargetEvent event) {
-			}
-
-			public void drop(DropTargetEvent event) {
-				if (event.operations != DND.DROP_NONE && LocalSelectionTransfer.getTransfer().getSelection() instanceof IStructuredSelection) {
-					dragOver(event);
-					IStructuredSelection selection = (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection();
-					if (selection != null && !selection.isEmpty() && event.item != null && event.item.getData() != null) {
-						/*
-						 * the command uses these numbers instead of the
-						 * feedback constants (even though it converts in
-						 * the other direction as well)
-						 */
-						float feedbackFloat = getHeightInItem(event);
-
-						final DragNodeCommand command = new DragNodeCommand(event.item.getData(), feedbackFloat, event.operations, event.detail, selection.toList(), XMLTableTreeViewer.this);
-						if (command != null && command.canExecute()) {
-							SafeRunnable.run(new SafeRunnable() {
-								public void run() throws Exception {
-									command.execute();
-								}
-							});
-						}
-					}
-				}
-			}
-
-			public void dropAccept(DropTargetEvent event) {
-			}
-
-			public void dragOver(DropTargetEvent event) {
-				event.feedback = DND.FEEDBACK_SELECT;
-				float feedbackFloat = getHeightInItem(event);
-				if (feedbackFloat > 0.75) {
-					event.feedback = DND.FEEDBACK_INSERT_AFTER;
-				}
-				else if (feedbackFloat < 0.25) {
-					event.feedback = DND.FEEDBACK_INSERT_BEFORE;
-				}
-				event.feedback |= DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL;
-			}
-
-			private float getHeightInItem(DropTargetEvent event) {
-				if(event.item == null) return .5f;
-				if (event.item instanceof TreeItem) {
-					TreeItem treeItem = (TreeItem) event.item;
-					Control control = treeItem.getParent();
-					Point point = control.toControl(new Point(event.x, event.y));
-					Rectangle bounds = treeItem.getBounds();
-					return (float) (point.y - bounds.y) / (float) bounds.height;
-				}
-				else if (event.item instanceof TableItem) {
-					TableItem tableItem = (TableItem) event.item;
-					Control control = tableItem.getParent();
-					Point point = control.toControl(new Point(event.x, event.y));
-					Rectangle bounds = tableItem.getBounds(0);
-					return (float) (point.y - bounds.y) / (float) bounds.height;
-				}
-				else {
-					return 0.0F;
-				}
-			}
-		};
-	}
-	
-	protected void doRefresh(Object o, boolean fromDelayed) {
-		treeExtension.resetCachedData();
-		super.refresh(o);
-	}
-
-	public ISelectionProvider getSelectionProvider() {
-		return fSelectionProvider;
-	}
-
-	public String getTitle() {
-		return XMLEditorMessages.XMLTableTreeViewer_0;
-	}
-
-	protected void handleDispose(DisposeEvent event) {
-		super.handleDispose(event);
-		treeExtension.dispose();
-		setDocument(null);
-	}
-
-	public void refresh() {
-		treeExtension.resetCachedData();
-		super.refresh();
-	}
-
-	public void refresh(Object o) {
-		treeExtension.resetCachedData();
-		super.refresh(o);
-	}
-
-	public void refresh(boolean updateLabels) {
-		treeExtension.resetCachedData();
-		super.refresh(updateLabels);
-		getControl().redraw();
-	}
-
-	public void refresh(Object element, boolean updateLabels) {
-		treeExtension.resetCachedData();
-		super.refresh(element, updateLabels);
-		getControl().redraw();
-	}
-
-	public void setDocument(IDocument document) {
-		/*
-		 * let the text editor to be the one that manages the model's lifetime
-		 */
-		IStructuredModel model = null;
-		try {
-			model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
-
-			if ((model != null) && (model instanceof IDOMModel)) {
-				Document domDoc = null;
-				domDoc = ((IDOMModel) model).getDocument();
-				setInput(domDoc);
-				treeExtension.setIsUnsupportedInput(false);
-			}
-			else {
-				treeExtension.setIsUnsupportedInput(true);
-			}
-		}
-		finally {
-			if (model != null) {
-				model.releaseFromRead();
-			}
-		}
-
-	}
-
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
deleted file mode 100644
index dfcfc5a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.tabletree;
-
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDescriptionBuilder;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-public class XMLTreeExtension extends TreeExtension {
-
-	public final static String STRUCTURE_PROPERTY = XMLEditorMessages.XMLTreeExtension_0;
-	public final static String VALUE_PROPERTY = XMLEditorMessages.XMLTreeExtension_1;
-
-	protected Composite control;
-	protected MyCellModifier modifier;
-	protected XMLTableTreePropertyDescriptorFactory propertyDescriptorFactory;
-	protected CMDescriptionBuilder decriptionBuilder = new CMDescriptionBuilder();
-	protected TreeContentHelper treeContentHelper = new TreeContentHelper();
-
-	protected Color f1, f2, b1, b2;
-	protected boolean cachedDataIsValid = true;
-
-	public XMLTreeExtension(Tree tree) {
-		super(tree);
-		control = tree;
-		modifier = new MyCellModifier();
-		setCellModifier(modifier);
-		String[] properties = {STRUCTURE_PROPERTY, VALUE_PROPERTY};
-		setColumnProperties(properties);
-
-		/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=185851 - Used to be hardcoded as COLOR_BLACK */
-		f1 = tree.getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
-		Color background = tree.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
-
-		int r = Math.abs(background.getRed() - 125);
-		int g = Math.abs(background.getGreen() - 85);
-		int b = Math.abs(background.getBlue() - 105);
-
-		f2 = new Color(tree.getDisplay(), r, g, b);
-		b1 = tree.getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION);
-		b2 = background;
-
-		propertyDescriptorFactory = new XMLTableTreePropertyDescriptorFactory();
-	}
-
-	public void dispose() {
-		super.dispose();
-		f2.dispose();
-	}
-
-	public void resetCachedData() {
-		cachedDataIsValid = false;
-	}
-
-	public void paintItems(GC gc, TreeItem[] items, Rectangle treeBounds) {
-		super.paintItems(gc, items, treeBounds);
-		cachedDataIsValid = true;
-	}
-
-	protected Object[] computeTreeExtensionData(Object object) {
-		Color color = f1;
-		String string = ""; //$NON-NLS-1$
-		if (string.length() == 0) {
-			string = (String) modifier.getValue(object, VALUE_PROPERTY);
-			color = f1;
-		}
-		if ((string.length() == 0) && (object instanceof Element)) {
-			string = getElementValueHelper((Element) object);
-			color = f2;
-		}
-		Object[] data = new Object[2];
-		data[0] = string;
-		data[1] = color;
-		return data;
-	}
-
-	protected void paintItem(GC gc, TreeItem item, Rectangle bounds) {
-		super.paintItem(gc, item, bounds);
-		Object[] data = computeTreeExtensionData(item.getData());
-		if ((data != null) && (data.length == 2)) {
-			gc.setClipping(columnPosition, bounds.y + 1, controlWidth, bounds.height);
-			gc.setForeground((Color) data[1]);
-			gc.drawString((String) data[0], columnPosition + 5, bounds.y + 1);
-			gc.setClipping((Rectangle) null);
-		}
-	}
-
-	protected void addEmptyTreeMessage(GC gc) {
-		// here we print a message when the document is empty just to give the
-		// user a visual cue
-		// so that they know how to proceed to edit the blank view
-		gc.setForeground(fTree.getDisplay().getSystemColor(SWT.COLOR_BLACK));
-		gc.setBackground(fTree.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
-		gc.drawString(XMLEditorMessages.XMLTreeExtension_3, 10, 10);
-		gc.drawString(XMLEditorMessages.XMLTreeExtension_4, 10, 10 + gc.getFontMetrics().getHeight());
-	}
-
-	public String getElementValueHelper(Element element) {
-		String result = null;
-
-		ModelQuery mq = ModelQueryUtil.getModelQuery(element.getOwnerDocument());
-		if ((result == null) && (mq != null)) {
-			CMElementDeclaration ed = mq.getCMElementDeclaration(element);
-			if ((ed != null) && !Boolean.TRUE.equals(ed.getProperty("isInferred"))) { //$NON-NLS-1$
-				result = decriptionBuilder.buildDescription(ed);
-			}
-		}
-		return result != null ? result : ""; //$NON-NLS-1$
-	}
-
-	/**
-	 * 
-	 */
-	public class MyCellModifier implements ICellModifier, TreeExtension.ICellEditorProvider {
-		public boolean canModify(Object element, String property) {
-			boolean result = false;
-			if (element instanceof Node) {
-				Node node = (Node) element;
-				result = (property == VALUE_PROPERTY) && treeContentHelper.isEditable(node);
-			}
-			return result;
-		}
-
-		public Object getValue(Object object, String property) {
-			String result = null;
-			if (object instanceof Node) {
-				result = treeContentHelper.getNodeValue((Node) object);
-			}
-			return (result != null) ? result : ""; //$NON-NLS-1$
-		}
-
-		public void modify(Object element, String property, Object value) {
-			// enableNodeSelectionListener(false);
-			Item item = (Item) element;
-			String oldValue = treeContentHelper.getNodeValue((Node) item.getData());
-			String newValue = value.toString();
-			if ((newValue != null) && !newValue.equals(oldValue)) {
-				treeContentHelper.setNodeValue((Node) item.getData(), value.toString());
-			}
-			// enableNodeSelectionListener(true);
-		}
-
-		public CellEditor getCellEditor(Object o, int col) {
-			IPropertyDescriptor pd = propertyDescriptorFactory.createPropertyDescriptor(o);
-			return pd != null ? pd.createPropertyEditor(control) : null;
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidationUIMessages.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidationUIMessages.java
deleted file mode 100644
index ff3bea2..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidationUIMessages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.validation;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by XML Validation
- */
-public class XMLValidationUIMessages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.wst.xml.ui.internal.validation.xmlvalidation"; //$NON-NLS-1$
-
-	private XMLValidationUIMessages() {
-		// cannot create new instance
-	}
-
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, XMLValidationUIMessages.class);
-	}
-	public static String _UI_REF_FILE_ERROR_DESCRIPTION;
-	public static String _UI_REF_FILE_ERROR_MESSAGE;
-	public static String _UI_REF_FILE_ERROR_DETAILS;
-	public static String _UI_DETAILS_INFORMATION_UNAVAILABLE;
-	public static String _UI_DETAILS_INFO_REVALIDATE_TO_REGENERATE;
-	public static String _UI_SAVE_DIRTY_FILE_MESSAGE;
-	public static String _UI_SAVE_DIRTY_FILE_TITLE;
-	public static String TaskListTableViewer_0;
-	public static String TaskListTableViewer_1;
-	public static String TaskListTableViewer_2;
-	public static String TaskListTableViewer_3;
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/GroupNamePropertyTester.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/GroupNamePropertyTester.java
deleted file mode 100644
index 7c3e9bc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/GroupNamePropertyTester.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.validation.core.errorinfo;
-
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.resources.IMarker;
-
-
-/**
- * Custom property tester used to determine if the groupName attribute is
- * present on a marker and that its value starts with a given expected value.
- */
-public class GroupNamePropertyTester extends PropertyTester
-{
-  /**
-   * The group name prefix property name.
-   */
-  private static final String GROUP_NAME_PREFIX = "groupNamePrefix"; //$NON-NLS-1$  
-
-  /**
-   * The group name marker attribute.
-   */
-  private static final String GROUP_NAME = "groupName"; //$NON-NLS-1$
-
-  public boolean test(Object receiver, String property, Object[] args, Object expectedValue)
-  {
-    if (GROUP_NAME_PREFIX.equals(property))
-    {
-      if (receiver instanceof IMarker)
-      {
-        IMarker marker = (IMarker)receiver;
-
-        String groupName = marker.getAttribute(GROUP_NAME, null);
-
-        boolean testValue = groupName != null && expectedValue instanceof String && groupName.startsWith((String)expectedValue);
-        return testValue;
-      }
-    }
-
-    return false;
-  }
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorDialog.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorDialog.java
deleted file mode 100644
index 4cc9f29..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorDialog.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * 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.xml.ui.internal.validation.core.errorinfo;
-
-import java.util.List;
-import com.ibm.icu.util.StringTokenizer;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseMoveListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
-import org.eclipse.wst.xml.ui.internal.validation.XMLValidationUIMessages;
-
-
-public class ReferencedFileErrorDialog extends Dialog {
-	protected TaskListTableViewer tableViewer;
-	protected List errorList;
-	protected String markedUpDetailsMessage;
-	protected String contextFile;
-	protected String referencedFile;
-	protected StyledText styledText;
-	protected Text fullFileNameField;
-
-	public ReferencedFileErrorDialog(Shell parentShell, List errorList, String contextFile, String referencedFile) {
-		super(parentShell);
-
-		int styleBits = getShellStyle() | SWT.RESIZE;
-		styleBits &= ~SWT.APPLICATION_MODAL;
-
-		setShellStyle(styleBits);
-		this.errorList = errorList;
-
-		this.referencedFile = referencedFile;
-		this.contextFile = contextFile;
-		this.markedUpDetailsMessage = getMarkedUpDetailsMessage();
-	}
-
-	public int createAndOpen() {
-		create();
-		getShell().setText(XMLValidationUIMessages._UI_REF_FILE_ERROR_DETAILS);
-
-		setBlockOnOpen(false);
-		return open();
-	}
-
-
-	protected Control createButtonBar(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		composite.setLayout(new GridLayout(2, false));
-		composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-		fullFileNameField = new Text(composite, SWT.NONE);
-		fullFileNameField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		fullFileNameField.setBackground(parent.getBackground());
-		fullFileNameField.setEditable(false);
-
-		super.createButtonBar(composite);
-
-		return composite;
-	}
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogArea = (Composite) super.createDialogArea(parent);
-		dialogArea.setLayout(new GridLayout());
-
-		Composite c = new Composite(dialogArea, SWT.NONE);
-		c.setLayout(new GridLayout());
-		c.setLayoutData(createGridData(true, -1, 200));
-
-		styledText = new StyledText(c, SWT.MULTI | SWT.WRAP);
-		styledText.setBackground(c.getBackground());
-		setStyledText(styledText, markedUpDetailsMessage);
-		styledText.setEditable(false);
-		styledText.setLayoutData(createGridData(false, 650, -1));
-
-		MouseListener mouseListener = new MouseListener();
-		styledText.addMouseMoveListener(mouseListener);
-
-		tableViewer = new TaskListTableViewer(c, 10);
-		tableViewer.setInput(errorList);
-		tableViewer.addSelectionChangedListener(new InternalSelectionListener());
-		tableViewer.getControl().setLayoutData(createGridData(true, 700, -1));
-		return dialogArea;
-	}
-
-	String getFullURI(int offset) {
-		String uri = ""; //$NON-NLS-1$
-		int index = getIndex(offset);
-		if (index != -1) {
-			if ((index == 0) || (index == 2) || (index == 3)) {
-				uri = referencedFile;
-			}
-			else {
-				uri = contextFile;
-			}
-		}
-		return uri;
-	}
-
-	private int getIndex(int offset) {
-		int result = -1;
-		StyleRange[] range = styledText.getStyleRanges();
-		for (int i = 0; i < range.length; i++) {
-			int l = range[i].start;
-			int r = l + range[i].length;
-			if ((l <= offset) && (r >= offset)) {
-				result = i;
-				break;
-			}
-		}
-		return result;
-	}
-
-	class MouseListener implements MouseMoveListener {
-		public void mouseMove(MouseEvent event) {
-			String toolTipText = ""; //$NON-NLS-1$
-			try {
-
-				int offset = styledText.getOffsetAtLocation(new Point(event.x, event.y));
-				toolTipText = getFullURI(offset);
-
-			}
-			catch (Exception e) {
-				// Do nothing.
-			}
-			styledText.setToolTipText(toolTipText);
-			if ((toolTipText != null) && (toolTipText.length() > 0)) {
-				fullFileNameField.setText(toolTipText);
-			}
-		}
-	}
-
-	private String getMarkedUpDetailsMessage() {
-		String detailsMessage = ""; //$NON-NLS-1$
-		// TODO... need to move '_UI_REF_FILE_ERROR_DESCRIPTION' to this
-		// plugin's properties file
-		//			
-		String string = XMLValidationUIMessages._UI_REF_FILE_ERROR_DESCRIPTION;
-		// TODO... need to edit the properties file to remove "'" characters
-		// from the string
-		// I'm using these characters to markup the bold font. It's safer if I
-		// add these programtically.
-		//
-		string = removePattern(string, "'"); //$NON-NLS-1$
-
-		String c = "'" + getLastSegment(contextFile) + "'"; //$NON-NLS-1$ //$NON-NLS-2$
-		String r = "'" + getLastSegment(referencedFile) + "'"; //$NON-NLS-1$ //$NON-NLS-2$
-
-		detailsMessage = NLS.bind(string, new Object[]{r, c, r, c});
-		return detailsMessage;
-	}
-
-	private String removePattern(String string, String pattern) {
-		while (true) {
-			int index = string.indexOf(pattern);
-			if (index != -1) {
-				string = string.substring(0, index) + string.substring(index + pattern.length());
-			}
-			else {
-				break;
-			}
-		}
-		return string;
-	}
-
-	private void setStyledText(StyledText styledText, String text) {
-		String visibleMessage = ""; //$NON-NLS-1$
-		for (StringTokenizer st = new StringTokenizer(markedUpDetailsMessage, "'", false); st.hasMoreTokens();) //$NON-NLS-1$
-		{
-			String token = st.nextToken();
-			visibleMessage += token;
-		}
-
-		styledText.setText(visibleMessage);
-		// dw Font font = styledText.getFont();
-
-		boolean inQuote = false;
-		int position = 0;
-		for (StringTokenizer st = new StringTokenizer(markedUpDetailsMessage, "'", true); st.hasMoreTokens();) //$NON-NLS-1$
-		{
-			String token = st.nextToken();
-
-			if (token.equals("'")) //$NON-NLS-1$
-			{
-				inQuote = !inQuote;
-			}
-			else {
-				if (inQuote) {
-					try {
-
-						StyleRange style = new StyleRange(position, token.length(), styledText.getForeground(), styledText.getBackground(), SWT.BOLD);
-						styledText.setStyleRange(style);
-					}
-					catch (Exception e) {
-						e.printStackTrace();
-					}
-				}
-				position = position + token.length();
-			}
-		}
-	}
-
-	private static GridData createGridData(boolean fillBoth, int w, int h) {
-		GridData gd = new GridData(fillBoth ? GridData.FILL_BOTH : GridData.FILL_HORIZONTAL);
-		gd.widthHint = w;
-		gd.heightHint = h;
-		return gd;
-	}
-
-	private static String getLastSegment(String uri) {
-		String result = uri;
-		int index = Math.max(uri.lastIndexOf("/"), uri.lastIndexOf("\\")); //$NON-NLS-1$ //$NON-NLS-2$
-		if (index != -1) {
-			result = uri.substring(index + 1);
-		}
-		return result;
-	}
-
-	protected class InternalSelectionListener implements ISelectionChangedListener {
-		public void selectionChanged(SelectionChangedEvent event) {
-			ISelection selection = event.getSelection();
-			if (selection instanceof StructuredSelection) {
-				ValidationMessage validationMessage = (ValidationMessage) ((StructuredSelection) selection).getFirstElement();
-				if (validationMessage != null) {
-					String uristring = validationMessage.getUri();
-					ReferencedFileErrorUtility.openEditorAndGotoError(uristring, validationMessage.getLineNumber(), validationMessage.getColumnNumber());
-				}
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorUtility.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorUtility.java
deleted file mode 100644
index 378ee89..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorUtility.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.validation.core.errorinfo;
-
-import java.net.URL;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.editors.text.TextEditor;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.wst.xml.core.internal.validation.core.logging.LoggerFactory;
-
-
-public class ReferencedFileErrorUtility {
-	public static void openEditorAndGotoError(String uristring, final int line, final int column) {
-		if (uristring != null) {
-			try {
-				URL uri = new URL(uristring);
-				if (uri != null) {
-					if ("file".equals(uri.getProtocol())) //$NON-NLS-1$
-					{
-						String pathString = uri.getPath();
-						IPath path = new Path(pathString);
-						String device = path.getDevice();
-						if ((device != null) && device.startsWith("/")) //$NON-NLS-1$
-						{
-							path = path.setDevice(device.substring(1));
-						}
-						final IFile iFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
-						if ((iFile != null) && iFile.exists()) {
-							// Open the editor for this file.
-							final IWorkbench workbench = PlatformUI.getWorkbench();
-							final IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
-
-							Display.getDefault().asyncExec(new Runnable() {
-								public void run() {
-									try {
-										IContentType contentType = iFile.getContentDescription().getContentType();
-										IEditorRegistry editorRegistry = workbench.getEditorRegistry();
-										String fileName = iFile.getName();
-										IEditorDescriptor descriptor = editorRegistry.getDefaultEditor(fileName, contentType);
-										String editorId;
-										if (descriptor != null) {
-											editorId = descriptor.getId();
-										}
-										else {
-											descriptor = editorRegistry.getDefaultEditor(fileName + ".txt"); //$NON-NLS-1$
-											editorId = descriptor.getId(); 
-										}
-										
-										if (editorId != null)
-										{
-										  FileEditorInput editorInput = new FileEditorInput(iFile);
-										  IWorkbenchPage activePage = workbenchWindow.getActivePage();
-										  activePage.openEditor(editorInput, editorId);
-										}
-									}
-									catch (Exception ex) {
-										LoggerFactory.getLoggerInstance().logError("Exception encountered when attempting to open file: " + iFile + "\n\n", ex); //$NON-NLS-1$ //$NON-NLS-2$
-									}
-								}
-							});
-
-							Runnable runnable = new Runnable() {
-								public void run() {
-									IEditorPart editorPart = workbenchWindow.getActivePage().getActiveEditor();
-									gotoError(editorPart, line, column);
-								}
-							};
-							Display.getCurrent().asyncExec(runnable);
-						}
-					}
-				}
-			}
-			catch (Exception e) {
-				// Do nothing.
-			}
-		}
-	}
-
-	static void gotoError(IEditorPart editorPart, int line, int column) {
-		if (editorPart != null) {
-			TextEditor textEditor = (TextEditor) editorPart.getAdapter(TextEditor.class);
-			if (textEditor != null) {
-				try {
-					IDocumentProvider dp = textEditor.getDocumentProvider();
-					IDocument document = (dp != null) ? dp.getDocument(textEditor.getEditorInput()) : null;
-					textEditor.selectAndReveal(document.getLineOffset(line - 1) + column - 1, 0);
-				}
-				catch (BadLocationException x) {
-					// marker refers to invalid text position -> do nothing
-				}
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorsHandler.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorsHandler.java
deleted file mode 100644
index 3db6243..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorsHandler.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.validation.core.errorinfo;
-
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.views.markers.MarkerViewHandler;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
-import org.eclipse.wst.xml.ui.internal.validation.XMLValidationUIMessages;
-
-
-/**
- * Handler for the referenced file errors command. This class replaces the old
- * ReferencedFileErrorActionDelegate.
- */
-public class ReferencedFileErrorsHandler extends MarkerViewHandler
-{
-  public Object execute(ExecutionEvent event) throws ExecutionException
-  {
-    final IMarker[] selectedMarkers = getSelectedMarkers(event);
-
-    IMarker selectedMarker = selectedMarkers[0];
-
-    if (selectedMarker != null)
-    {
-      try
-      {
-
-        IResource resource = selectedMarker.getResource();
-        Map map = (Map)resource.getSessionProperty(ValidationMessage.ERROR_MESSAGE_MAP_QUALIFIED_NAME);
-        if (map == null)
-        {
-          String infoUnavailable = XMLValidationUIMessages._UI_DETAILS_INFORMATION_UNAVAILABLE;
-          String revalidateToRegenerateErrors = XMLValidationUIMessages._UI_DETAILS_INFO_REVALIDATE_TO_REGENERATE;
-          MessageDialog.openInformation(Display.getCurrent().getActiveShell(), infoUnavailable, revalidateToRegenerateErrors);
-        }
-        else
-        {
-          String uri = null;
-
-          String groupName = (String)selectedMarker.getAttribute("groupName"); //$NON-NLS-1$
-          if (groupName.startsWith("referencedFileError")) //$NON-NLS-1$
-          {
-            int index1 = groupName.indexOf("("); //$NON-NLS-1$
-            int index2 = groupName.lastIndexOf(")"); //$NON-NLS-1$
-            if ((index1 != -1) && (index2 > index1))
-            {
-              uri = groupName.substring(index1 + 1, index2);
-            }
-          }
-
-          if (uri != null)
-          {
-            List list = Collections.EMPTY_LIST;
-
-            ValidationMessage message = (ValidationMessage)map.get(uri);
-            if (message != null)
-            {
-              list = message.getNestedMessages();
-            }
-
-            IPath resourceLocation = resource.getLocation();
-            
-            if (resourceLocation != null)
-            {
-              String validatedFileURI = resourceLocation.toOSString();
-              validatedFileURI = "file:/" + validatedFileURI; //$NON-NLS-1$
-
-              ReferencedFileErrorDialog dialog = new ReferencedFileErrorDialog(
-                HandlerUtil.getActiveShell(event),
-                list,
-                validatedFileURI,
-                uri);
-              dialog.createAndOpen();
-            }
-          }
-        }
-      }
-      catch (CoreException e)
-      {
-        // Do nothing.
-      }
-    }
-
-    return this;
-  }
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/TaskListTableViewer.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/TaskListTableViewer.java
deleted file mode 100644
index 433edf7..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/TaskListTableViewer.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * 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.xml.ui.internal.validation.core.errorinfo;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.validation.XMLValidationUIMessages;
-
-
-
-public class TaskListTableViewer extends TableViewer {
-	protected static final int COLUMN_ICON = 0;
-	protected static final int COLUMN_DESCRIPTION = 1;
-	protected static final int COLUMN_RESOURCE = 3;
-	protected static final int COLUMN_LOCATION = 2;
-
-	protected static final String LABEL_ICON = ""; //$NON-NLS-1$
-	protected static final String LABEL_DESCRIPTION = XMLValidationUIMessages.TaskListTableViewer_0;
-	protected static final String LABEL_RESOURCE = XMLValidationUIMessages.TaskListTableViewer_1;
-	protected static final String LABEL_LOCATION = XMLValidationUIMessages.TaskListTableViewer_2;
-
-	protected int visibleRows = -1;
-
-	protected int getColumnWidth(int column) {
-		int result = 0;
-		switch (column) {
-			case COLUMN_ICON : {
-				result = 1;
-				break;
-			}
-			case COLUMN_DESCRIPTION : {
-				result = 20;
-				break;
-			}
-			case COLUMN_RESOURCE : {
-				result = 3;
-				break;
-			}
-			case COLUMN_LOCATION : {
-				result = 3;
-				break;
-			}
-		}
-		return result;
-	}
-
-	public TaskListTableViewer(Composite parent, int visibleRows) {
-		this(parent, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER, visibleRows);
-	}
-
-	public TaskListTableViewer(Composite parent, int style, int visibleRows) {
-		super(new Table(parent, style));
-		getTable().setLinesVisible(true);
-
-		Provider provider = new Provider();
-		setContentProvider(provider);
-		setLabelProvider(provider);
-
-		String[] columnPropertiesArray = {LABEL_ICON, LABEL_DESCRIPTION, LABEL_LOCATION};
-		setColumnProperties(columnPropertiesArray);
-
-		Table table = getTable();
-		table.setHeaderVisible(true);
-		table.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-		TableLayout layout = new TableLayout();
-
-		for (int i = 0; i < columnPropertiesArray.length; i++) {
-			TableColumn column = new TableColumn(table, i);
-			column.setText(columnPropertiesArray[i]);
-			column.setAlignment(SWT.LEFT);
-			layout.addColumnData(new ColumnWeightData(getColumnWidth(i), true));
-		}
-
-		table.setLayout(layout);
-
-		this.visibleRows = visibleRows;
-	}
-
-	/**
-	 * NamespaceInfoTableLabelProvider
-	 */
-	protected class Provider extends LabelProvider implements ITableLabelProvider, IStructuredContentProvider {
-		Viewer viewer;
-		Image errorImage;
-		Image warnImage;
-
-		public Provider() {
-			errorImage = XMLUIPlugin.getInstance().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
-
-			warnImage = XMLUIPlugin.getInstance().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
-		}
-
-		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-			this.viewer = viewer;
-		}
-
-		public Object[] getElements(Object inputElement) {
-			List list = (List) viewer.getInput();
-			return list != null ? list.toArray() : null;
-		}
-
-		public Image getColumnImage(Object object, int columnIndex) {
-			ValidationMessage validationMessage = (ValidationMessage) object;
-			Image result = null;
-			if (columnIndex == 0) {
-				int severity = validationMessage.getSeverity();
-				if ((severity == IMessage.HIGH_SEVERITY) || (severity == IMessage.NORMAL_SEVERITY)) {
-					result = errorImage;
-				}
-				else {
-					result = warnImage;
-				}
-			}
-			return result;
-		}
-
-		public String getColumnText(Object object, int column) {
-			ValidationMessage errorMessage = (ValidationMessage) object;
-			String result = ""; //$NON-NLS-1$
-			switch (column) {
-				case COLUMN_DESCRIPTION : {
-					result = errorMessage.getMessage();
-					break;
-				}
-				case COLUMN_LOCATION : {
-					result = XMLValidationUIMessages.TaskListTableViewer_3 + errorMessage.getLineNumber();
-					break;
-				}
-			}
-			return result;
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/xmlvalidation.properties b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/xmlvalidation.properties
deleted file mode 100644
index c35c849..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/xmlvalidation.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-### Constants for strings  
-
-#
-# Referenced File Dialog 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_MESSAGE          = Referenced file contains errors ({0}).  For more information, right click on the message and select "Show Details..."
-_UI_REF_FILE_ERROR_DETAILS          = Referenced File Error Details
-
-_UI_DETAILS_INFORMATION_UNAVAILABLE       = Details Information Unavailable
-_UI_DETAILS_INFO_REVALIDATE_TO_REGENERATE = Details information currently unavailable.  Please revalidate the file to regenerate the error details.
-
-#
-# Dirty File Dialog Related Messages
-#
-TaskListTableViewer_0=Description
-TaskListTableViewer_1=Resource
-TaskListTableViewer_2=Location
-TaskListTableViewer_3=line 
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationOperation.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationOperation.java
deleted file mode 100644
index cd809c7..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationOperation.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.zip.ZipFile;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.ui.dialogs.IOverwriteQuery;
-import org.eclipse.ui.wizards.datatransfer.ImportOperation;
-import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.osgi.framework.Bundle;
-
-public class ExampleProjectCreationOperation implements IRunnableWithProgress {
-
-	private IResource elementToOpen;
-
-	private IOverwriteQuery overwriteQuery;
-
-	private ExampleProjectCreationWizardPage[] pages;
-
-	/**
-	 * Constructor for ExampleProjectCreationOperation
-	 */
-	public ExampleProjectCreationOperation(ExampleProjectCreationWizardPage[] myPages, IOverwriteQuery myOverwriteQuery) {
-		elementToOpen = null;
-		pages = myPages;
-		overwriteQuery = myOverwriteQuery;
-	}
-
-	private IProject configNewProject(IWorkspaceRoot root, String name, String[] natureIds, IProject[] referencedProjects, IProgressMonitor monitor) throws InvocationTargetException {
-		try {
-			IProject project = root.getProject(name);
-			if (!project.exists()) {
-				project.create(null);
-			}
-			if (!project.isOpen()) {
-				project.open(null);
-			}
-			IProjectDescription desc = project.getDescription();
-			desc.setLocation(null);
-			desc.setNatureIds(natureIds);
-			desc.setReferencedProjects(referencedProjects);
-
-			project.setDescription(desc, new SubProgressMonitor(monitor, 1));
-
-			return project;
-		}
-		catch (CoreException e) {
-			throw new InvocationTargetException(e);
-		}
-	}
-
-	private void createProject(IWorkspaceRoot root, ExampleProjectCreationWizardPage page, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-		IConfigurationElement desc = page.getConfigurationElement();
-
-		IConfigurationElement[] imports = desc.getChildren("import"); //$NON-NLS-1$
-		IConfigurationElement[] natures = desc.getChildren("nature"); //$NON-NLS-1$
-		IConfigurationElement[] references = desc.getChildren("references"); //$NON-NLS-1$
-		int nImports = (imports == null) ? 0 : imports.length;
-		int nNatures = (natures == null) ? 0 : natures.length;
-		int nReferences = (references == null) ? 0 : references.length;
-
-		monitor.beginTask(XMLWizardsMessages.ExampleProjectCreationOperation_op_desc_proj, nImports + 1);
-
-		String name = page.getProjectName();
-
-		String[] natureIds = new String[nNatures];
-		for (int i = 0; i < nNatures; i++) {
-			natureIds[i] = natures[i].getAttribute("id"); //$NON-NLS-1$
-		}
-		IProject[] referencedProjects = new IProject[nReferences];
-		for (int i = 0; i < nReferences; i++) {
-			referencedProjects[i] = root.getProject(references[i].getAttribute("id")); //$NON-NLS-1$
-		}
-
-		IProject proj = configNewProject(root, name, natureIds, referencedProjects, monitor);
-
-		for (int i = 0; i < nImports; i++) {
-			doImports(proj, imports[i], new SubProgressMonitor(monitor, 1));
-		}
-
-		String open = desc.getAttribute("open"); //$NON-NLS-1$
-		if ((open != null) && (open.length() > 0)) {
-			IResource fileToOpen = proj.findMember(new Path(open));
-			if (fileToOpen != null) {
-				elementToOpen = fileToOpen;
-			}
-		}
-
-	}
-
-	private void doImports(IProject project, IConfigurationElement curr, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-		try {
-			IPath destPath;
-			String name = curr.getAttribute("dest"); //$NON-NLS-1$
-			if ((name == null) || (name.length() == 0)) {
-				destPath = project.getFullPath();
-			}
-			else {
-				IFolder folder = project.getFolder(name);
-				if (!folder.exists()) {
-					folder.create(true, true, null);
-				}
-				destPath = folder.getFullPath();
-			}
-			String importPath = curr.getAttribute("src"); //$NON-NLS-1$
-			if (importPath == null) {
-				importPath = ""; //$NON-NLS-1$
-				Logger.log(Logger.ERROR, "projectsetup descriptor: import missing"); //$NON-NLS-1$
-				return;
-			}
-
-			ZipFile zipFile = getZipFileFromPluginDir(importPath, getContributingPlugin(curr));
-			importFilesFromZip(zipFile, destPath, new SubProgressMonitor(monitor, 1));
-		}
-		catch (CoreException e) {
-			throw new InvocationTargetException(e);
-		}
-	}
-
-	private String getContributingPlugin(IConfigurationElement configurationElement) {
-		Object parent = configurationElement;
-		while (parent != null) {
-			if (parent instanceof IExtension) {
-				return ((IExtension) parent).getNamespace();
-			}
-			parent = ((IConfigurationElement) parent).getParent();
-		}
-		return null;
-	}
-
-	public IResource getElementToOpen() {
-		return elementToOpen;
-	}
-
-	private ZipFile getZipFileFromPluginDir(String pluginRelativePath, String symbolicName) throws CoreException {
-		try {
-			Bundle bundle = Platform.getBundle(symbolicName);
-			URL starterURL = new URL(bundle.getEntry("/"), pluginRelativePath); //$NON-NLS-1$
-			return new ZipFile(Platform.asLocalURL(starterURL).getFile());
-		}
-		catch (IOException e) {
-			String message = pluginRelativePath + ": " + e.getMessage(); //$NON-NLS-1$
-			Status status = new Status(IStatus.ERROR, XMLUIPlugin.ID, IStatus.ERROR, message, e);
-			throw new CoreException(status);
-		}
-	}
-
-	private void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-		ZipFileStructureProvider structureProvider = new ZipFileStructureProvider(srcZipFile);
-		ImportOperation op = new ImportOperation(destPath, structureProvider.getRoot(), structureProvider, overwriteQuery);
-		op.run(monitor);
-	}
-
-	/*
-	 * @see IRunnableWithProgress#run(IProgressMonitor)
-	 */
-	public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-		if (monitor == null) {
-			monitor = new NullProgressMonitor();
-		}
-		try {
-			monitor.beginTask(XMLWizardsMessages.ExampleProjectCreationOperation_op_desc, pages.length);
-			IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-
-			for (int i = 0; i < pages.length; i++) {
-				createProject(root, pages[i], new SubProgressMonitor(monitor, 1));
-			}
-		}
-		finally {
-			monitor.done();
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationWizard.java
deleted file mode 100644
index d968c92..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationWizard.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
-import org.eclipse.ui.dialogs.IOverwriteQuery;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
-import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-public class ExampleProjectCreationWizard extends Wizard implements INewWizard, IExecutableExtension {
-
-	private class ImportOverwriteQuery implements IOverwriteQuery {
-
-		private int openDialog(final String file) {
-			final int[] result = {IDialogConstants.CANCEL_ID};
-			getShell().getDisplay().syncExec(new Runnable() {
-				public void run() {
-					String title = XMLWizardsMessages.ExampleProjectCreationWizard_overwritequery_title;
-					String msg = NLS.bind(XMLWizardsMessages.ExampleProjectCreationWizard_overwritequery_message, file);
-					String[] options = {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.CANCEL_LABEL};
-					MessageDialog dialog = new MessageDialog(getShell(), title, null, msg, MessageDialog.QUESTION, options, 0);
-					result[0] = dialog.open();
-				}
-			});
-			return result[0];
-		}
-
-		public String queryOverwrite(String file) {
-			String[] returnCodes = {YES, NO, ALL, CANCEL};
-			int returnVal = openDialog(file);
-			return returnVal < 0 ? CANCEL : returnCodes[returnVal];
-		}
-	}
-
-	private IConfigurationElement wizardConfigElement;
-	private IConfigurationElement exampleConfigElement;
-
-	private String EXAMPLE_WIZARD_XP_ID = "org.eclipse.wst.common.ui.exampleProjectCreationWizard"; //$NON-NLS-1$
-
-	private ExampleProjectCreationWizardPage[] pages;
-
-	private final String WEB_BROWSER_ID = "org.eclipse.ui.browser.editor"; //$NON-NLS-1$
-
-	public ExampleProjectCreationWizard() {
-		super();
-		setDialogSettings(XMLUIPlugin.getDefault().getDialogSettings());
-		setWindowTitle(XMLWizardsMessages.ExampleProjectCreationWizard_title);
-		setNeedsProgressMonitor(true);
-	}
-
-	/*
-	 * @see Wizard#addPages
-	 */
-	public void addPages() {
-		super.addPages();
-
-		if (exampleConfigElement == null) {
-			return;
-		}
-		IConfigurationElement[] children = exampleConfigElement.getChildren("projectsetup"); //$NON-NLS-1$
-		if ((children == null) || (children.length == 0)) {
-			Logger.log(Logger.ERROR, "descriptor must contain one ore more projectsetup tags"); //$NON-NLS-1$
-			return;
-		}
-
-		pages = new ExampleProjectCreationWizardPage[children.length];
-
-		for (int i = 0; i < children.length; i++) {
-			pages[i] = new ExampleProjectCreationWizardPage(i, children[i]);
-			addPage(pages[i]);
-		}
-	}
-
-	public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
-		if (exampleConfigElement != null) {
-			String banner = exampleConfigElement.getAttribute("banner"); //$NON-NLS-1$
-			if (banner != null) {
-				URL imageURL = Platform.find(Platform.getBundle(exampleConfigElement.getDeclaringExtension().getNamespace()), new Path(banner));
-				ImageDescriptor desc = ImageDescriptor.createFromURL(imageURL);
-				setDefaultPageImageDescriptor(desc);
-			}
-		}
-	}
-
-	protected IConfigurationElement[] getExtendedConfigurationElements() {
-		IExtensionRegistry registry = Platform.getExtensionRegistry();
-		IExtensionPoint exampleWizardXP = registry.getExtensionPoint(EXAMPLE_WIZARD_XP_ID);
-		if (exampleWizardXP == null) {
-			return new IConfigurationElement[0];
-		}
-		IExtension extension = exampleWizardXP.getExtension(getWizardExtensionId());
-		if (extension != null) {
-			return extension.getConfigurationElements();
-		}
-		IConfigurationElement[] exampleWizardCEs = exampleWizardXP.getConfigurationElements();
-		return exampleWizardCEs;
-	}
-
-	private void handleException(Throwable target) {
-		String title = XMLWizardsMessages.ExampleProjectCreationWizard_op_error_title;
-		String message = XMLWizardsMessages.ExampleProjectCreationWizard_op_error_message;
-		if (target instanceof CoreException) {
-			IStatus status = ((CoreException) target).getStatus();
-			ErrorDialog.openError(getShell(), title, message, status);
-			Logger.logException(status.getMessage(), status.getException());
-		}
-		else {
-			MessageDialog.openError(getShell(), title, target.getMessage());
-			Logger.logException(target);
-		}
-	}
-
-	private void openResource(final IResource resource) {
-		if (resource.getType() != IResource.FILE) {
-			return;
-		}
-		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-		if (window == null) {
-			return;
-		}
-		final IWorkbenchPage activePage = window.getActivePage();
-		if (activePage != null) {
-			final Display display = getShell().getDisplay();
-			display.asyncExec(new Runnable() {
-				public void run() {
-					try {
-						IDE.openEditor(activePage, (IFile) resource, WEB_BROWSER_ID, true);
-					}
-					catch (PartInitException e) {
-						Logger.logException(e);
-					}
-				}
-			});
-			BasicNewResourceWizard.selectAndReveal(resource, activePage.getWorkbenchWindow());
-		}
-	}
-
-	/*
-	 * @see Wizard#performFinish
-	 */
-	public boolean performFinish() {
-		ExampleProjectCreationOperation runnable = new ExampleProjectCreationOperation(pages, new ImportOverwriteQuery());
-
-		IRunnableWithProgress op = new WorkspaceModifyDelegatingOperation(runnable);
-		try {
-			getContainer().run(false, true, op);
-		}
-		catch (InvocationTargetException e) {
-			handleException(e.getTargetException());
-			return false;
-		}
-		catch (InterruptedException e) {
-			return false;
-		}
-		BasicNewProjectResourceWizard.updatePerspective(wizardConfigElement);
-		IResource res = runnable.getElementToOpen();
-		if (res != null) {
-			openResource(res);
-		}
-		return true;
-	}
-
-	/**
-	 * Stores the configuration element for the wizard. The config element
-	 * will be used in <code>performFinish</code> to set the result
-	 * perspective.
-	 */
-	public void setInitializationData(IConfigurationElement cfig, String propertyName, Object data) {
-		wizardConfigElement = cfig;
-		String title = wizardConfigElement.getAttribute("name"); //$NON-NLS-1$
-		if (title != null) {
-			setWindowTitle(title);
-		}
-		String wizardId = getWizardExtensionId();
-		IConfigurationElement[] exampleWizardCEs = getExtendedConfigurationElements();
-		for (int i = 0; i < exampleWizardCEs.length; i++) {
-			IConfigurationElement element = exampleWizardCEs[i];
-			String extWizardId = element.getAttribute("id"); //$NON-NLS-1$
-			if ((wizardId != null) && (extWizardId != null) && wizardId.equals(extWizardId)) {
-				exampleConfigElement = element;
-			}
-		}
-		// initializeDefaultPageImageDescriptor();
-	}
-
-	public String getWizardExtensionId() {
-		return wizardConfigElement.getAttribute("id"); //$NON-NLS-1$
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationWizardPage.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationWizardPage.java
deleted file mode 100644
index 3f13b33..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationWizardPage.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
-
-public class ExampleProjectCreationWizardPage extends WizardNewProjectCreationPage {
-
-	private IConfigurationElement configurationElement;
-
-	public ExampleProjectCreationWizardPage(int pageNumber, IConfigurationElement elem) {
-
-		super("page" + pageNumber); //$NON-NLS-1$
-		configurationElement = elem;
-
-		String name = getAttribute(elem, "name"); //$NON-NLS-1$
-		setInitialProjectName(calculateInitialProjectName(name));
-
-		setDescription(getAttribute(configurationElement, "pagedescription")); //$NON-NLS-1$
-		setTitle(getAttribute(configurationElement, "pagetitle")); //$NON-NLS-1$
-
-	}
-
-	/*
-	 * Set the default project name that is to appear on the initialPage page
-	 * of this wizard.
-	 */
-	protected String calculateInitialProjectName(String projectName) {
-		IProject projectHandle = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
-		if (!projectHandle.exists()) {
-			return projectName;
-		}
-		// Change the name until it doesn't exists. Try 9 times and then
-		// give up.
-		for (int i = 1; i < 10; i++) {
-			projectHandle = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName + i);
-			if (!projectHandle.exists()) {
-				return projectName + i;
-			}
-		}
-		return projectName + "9"; //$NON-NLS-1$
-
-	}
-
-	private String getAttribute(IConfigurationElement elem, String tag) {
-		String res = elem.getAttribute(tag);
-		if (res == null) {
-			return '!' + tag + '!';
-		}
-		return res;
-	}
-
-
-
-	/**
-	 * Returns the configuration element of this page.
-	 * 
-	 * @return Returns a IConfigurationElement
-	 */
-	public IConfigurationElement getConfigurationElement() {
-		return configurationElement;
-	}
-
-	/**
-	 * @see org.eclipse.ui.dialogs.WizardNewProjectCreationPage#validatePage()
-	 */
-	protected boolean validatePage() {
-		if (!super.validatePage()) {
-			return false;
-		}
-
-		String projectName = getProjectName();
-		if (projectName == null) {
-			return false;
-		}
-
-		IWizard wizard = getWizard();
-		if (wizard instanceof ExampleProjectCreationWizard) {
-			IWizardPage[] pages = wizard.getPages();
-			for (int i = 0; i < pages.length; i++) {
-				if ((pages[i] != this) && (pages[i] instanceof ExampleProjectCreationWizardPage)) {
-					if (projectName.equals(((ExampleProjectCreationWizardPage) pages[i]).getProjectName())) {
-						setErrorMessage(XMLWizardsMessages.ExampleProjectCreationWizardPage_error_alreadyexists);
-						return false;
-					}
-				}
-			}
-		}
-
-		return true;
-	}
-
-
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExportXMLCatalogWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExportXMLCatalogWizard.java
deleted file mode 100644
index a079682..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExportXMLCatalogWizard.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Standards for Technology in Automotive Retail (STAR) 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:
- *     David Carver/STAR - dcarver@starstandard.org/d_a_carver@yahoo.com - bug 192568
- *            Initial API - This implements the functionality of the
- *            old Export Dialog for the XML Catalog. 
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import java.io.File;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IExportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.CatalogSet;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-
-public class ExportXMLCatalogWizard extends BasicNewFileResourceWizard implements IExportWizard {
-
-	protected WizardNewFileCreationPage exportPage = null;
-	protected ICatalog workingUserCatalog = null;
-	protected ICatalog userCatalog = null;
-	
-	public ExportXMLCatalogWizard() {
-		setWindowTitle(XMLWizardsMessages._UI_DIALOG_XMLCATALOG_EXPORT_TITLE);
-		ImageDescriptor descriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_WIZBAN_GENERATEXML);
-		setDefaultPageImageDescriptor(descriptor);
-		ICatalog defaultCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
-		INextCatalog[] nextCatalogs = defaultCatalog.getNextCatalogs();
-		for (int i = 0; i < nextCatalogs.length; i++) {
-			INextCatalog catalog = nextCatalogs[i];
-			ICatalog referencedCatalog = catalog.getReferencedCatalog();
-			if (referencedCatalog != null) {
-				if (XMLCorePlugin.USER_CATALOG_ID.equals(referencedCatalog.getId())) {
-					userCatalog = referencedCatalog;
-				}
-			}
-		}
-		CatalogSet tempCatalogSet = new CatalogSet();
-		workingUserCatalog = tempCatalogSet.lookupOrCreateCatalog("working", ""); //$NON-NLS-1$ //$NON-NLS-2$
-		workingUserCatalog.addEntriesFromCatalog(userCatalog);
-
-	}
-
-	public boolean performFinish() {
-		IWorkspace workspace = ResourcesPlugin.getWorkspace();
-		IWorkspaceRoot workspaceRoot = workspace.getRoot();
-		String workspacePath = workspaceRoot.getLocation().toOSString();
-		String fullPath = workspacePath + exportPage.getContainerFullPath().toOSString();
-		String requiredString=fullPath + File.separator + exportPage.getFileName();
-		try {
-			exportPage.createNewFile();
-			workingUserCatalog.setLocation(requiredString);
-			workingUserCatalog.save();
-		} catch (Exception ex) {
-			return false;
-		}
-		return true;
-	}
-	
-	public void addPages() {
-		exportPage = new WizardNewFileCreationPage("XML Catalog Export",  getSelection());
-		exportPage.setTitle(XMLWizardsMessages._UI_DIALOG_XMLCATALOG_EXPORT_TITLE);
-		exportPage.setDescription(XMLWizardsMessages._UI_DIALOG_XMLCATALOG_EXPORT_DESCRIPTION);
-		addPage(exportPage);
-	}
-	
-	public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
-		super.init(workbench, currentSelection);
-		setWindowTitle(XMLWizardsMessages._UI_DIALOG_XMLCATALOG_EXPORT_TITLE);
-		ImageDescriptor descriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_WIZBAN_GENERATEXML);
-		setDefaultPageImageDescriptor(descriptor);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/IXMLWizardHelpContextIds.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/IXMLWizardHelpContextIds.java
deleted file mode 100644
index e342efa..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/IXMLWizardHelpContextIds.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-/**
- * Help context ids for the xml wizard.
- * <p>
- * This interface contains constants only; it is not intended to be
- * implemented.
- * </p>
- */
-interface IXMLWizardHelpContextIds {
-	// org.eclipse.wst.xml.ui.
-	public static final String PREFIX = XMLUIPlugin.ID + "."; //$NON-NLS-1$
-	// Create XML file from a DTD file radio
-	public static final String XML_NEWWIZARD_CREATEXML1_HELPID = PREFIX + "xmlc0101"; //$NON-NLS-1$
-	// Create XML file from an XML schema file radio button
-	public static final String XML_NEWWIZARD_CREATEXML2_HELPID = PREFIX + "xmlc0102"; //$NON-NLS-1$
-	// Create XML file from scratch radio button
-	public static final String XML_NEWWIZARD_CREATEXML3_HELPID = PREFIX + "xmlc0103"; //$NON-NLS-1$
-	// Select Source file page
-	public static final String XML_NEWWIZARD_SELECTSOURCE_HELPID = PREFIX + "xmlc0500"; //$NON-NLS-1$
-	// Root element for both DTD and XML schema
-	public static final String XML_NEWWIZARD_SELECTROOTELEMENT_HELPID = PREFIX + "xmlc0410"; //$NON-NLS-1$
-	// Create Optional Attributes
-	public static final String XML_NEWWIZARD_SELECTROOTELEMENT1_HELPID = PREFIX + "xmlc0441"; //$NON-NLS-1$
-	// Create Optional Elements
-	public static final String XML_NEWWIZARD_SELECTROOTELEMENT2_HELPID = PREFIX + "xmlc0442"; //$NON-NLS-1$
-	// Create first choice of required choice
-	public static final String XML_NEWWIZARD_SELECTROOTELEMENT3_HELPID = PREFIX + "xmlc0443"; //$NON-NLS-1$
-	// Fill elements and attribute with data
-	public static final String XML_NEWWIZARD_SELECTROOTELEMENT4_HELPID = PREFIX + "xmlc0444"; //$NON-NLS-1$
-	// System ID for DTD
-	public static final String XML_NEWWIZARD_SELECTROOTELEMENT5_HELPID = PREFIX + "xmlc0210"; //$NON-NLS-1$
-	// Public ID for DTD
-	public static final String XML_NEWWIZARD_SELECTROOTELEMENT6_HELPID = PREFIX + "xmlc0220"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ImportXMLCatalogPage.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ImportXMLCatalogPage.java
deleted file mode 100644
index 38e3447..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ImportXMLCatalogPage.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Standards for Technology in Automotive Retail (STAR) 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:
- *     David Carver/STAR - dcarver@starstandard.org/d_a_carver@yahoo.com - bug 192568
- *            Initial API - This implements the functionality of the
- *            old Import Dialog for the XML Catalog. 
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.ui.internal.viewers.SelectSingleFileView;
-
-public class ImportXMLCatalogPage extends WizardPage {
-
-	protected SelectSingleFileView selectSingleFileView;
-	protected IStructuredSelection selection;
-	
-
-	public ImportXMLCatalogPage() {
-		super(XMLWizardsMessages._UI_DIALOG_XMLCATALOG_IMPORT_TITLE);
-		setTitle(XMLWizardsMessages._UI_DIALOG_XMLCATALOG_IMPORT_TITLE);
-		selection = new StructuredSelection();
-		selectSingleFileView = new SelectSingleFileView(selection, false) {
-			public void createFilterControl(Composite composite) {
-				ImportXMLCatalogPage.this.createFilterControl(composite);
-			}
-		};
-
-	}
-
-	public void createControl(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NULL);
-		composite.setLayout(new GridLayout());
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		gd.widthHint = 350;
-		gd.heightHint = 350;
-		composite.setLayoutData(gd);
-		String[] extensions = { ".xmlcatalog", ".xml" }; //$NON-NLS-1$ //$NON-NLS-2$
-		selectSingleFileView.addFilterExtensions(extensions);
-		selectSingleFileView.createControl(composite);
-		selectSingleFileView.setVisibleHelper(true);
-		selectSingleFileView.addSelectionChangedTreeListener(new ISelectionChangedListener(){
-			public void selectionChanged(SelectionChangedEvent event) {
-				ImportXMLCatalogPage.this.setPageComplete(selectSingleFileView.getFile() != null);
-			}
-		});
-		setControl(composite);
-	}
-
-	public void createFilterControl(Composite composite) {
-	}
-
-	public IFile getFile() {
-		return selectSingleFileView.getFile();
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ImportXMLCatalogWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ImportXMLCatalogWizard.java
deleted file mode 100644
index f1200a2..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ImportXMLCatalogWizard.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail (STAR) 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:
- *     David Carver/STAR - dcarver@starstandard.org/d_a_carver@yahoo.com - bug 192568
- *            Initial API - This implements the functionality of the
- *            old Import Dialog for the XML Catalog. 
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.CatalogSet;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-import org.eclipse.wst.xml.ui.internal.catalog.XMLCatalogMessages;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-
-public class ImportXMLCatalogWizard extends Wizard implements IImportWizard {
-
-	protected ImportXMLCatalogPage importPage = null;
-	protected ICatalog workingUserCatalog = null;
-	protected ICatalog userCatalog = null;
-	
-	public ImportXMLCatalogWizard() {
-		setWindowTitle(XMLWizardsMessages._UI_DIALOG_XMLCATALOG_IMPORT_TITLE);
-		ImageDescriptor descriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_WIZBAN_GENERATEXML);
-		setDefaultPageImageDescriptor(descriptor);
-		ICatalog defaultCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
-		INextCatalog[] nextCatalogs = defaultCatalog.getNextCatalogs();
-		for (int i = 0; i < nextCatalogs.length; i++) {
-			INextCatalog catalog = nextCatalogs[i];
-			ICatalog referencedCatalog = catalog.getReferencedCatalog();
-			if (referencedCatalog != null) {
-				if (XMLCorePlugin.USER_CATALOG_ID.equals(referencedCatalog.getId())) {
-					userCatalog = referencedCatalog;
-				}
-			}
-		}
-
-		CatalogSet tempCatalogSet = new CatalogSet();
-		workingUserCatalog = tempCatalogSet.lookupOrCreateCatalog("working", ""); //$NON-NLS-1$ //$NON-NLS-2$
-		workingUserCatalog.addEntriesFromCatalog(userCatalog);
-	}
-	
-	public boolean canFinish() {
-		return importPage.isPageComplete();
-	}
-
-	public boolean performFinish() {
-		IFile file = importPage.getFile();
-		if (file != null) {
-			String fileName = file.getLocation().toFile().toURI().toString();
-			try {
-				CatalogSet tempResourceSet = new CatalogSet();
-				ICatalog newCatalog = tempResourceSet.lookupOrCreateCatalog("temp", fileName); //$NON-NLS-1$
-				
-				workingUserCatalog.addEntriesFromCatalog(newCatalog);
-				userCatalog.clear();
-				userCatalog.addEntriesFromCatalog(workingUserCatalog);
-				userCatalog.save();
-			}
-			catch (Exception e) {
-				return false;
-			}
-		}
-		
-		return true;
-	}
-
-	public void init(IWorkbench workbench, IStructuredSelection selection) {
-		// TODO Auto-generated method stub
-
-	}
-	
-	public void addPages() {
-		importPage = new ImportXMLCatalogPage();
-		importPage.setTitle(XMLCatalogMessages.UI_LABEL_IMPORT_DIALOG_HEADING);
-		importPage.setDescription(XMLWizardsMessages._UI_DIALOG_XMLCATALOG_IMPORT_DESCRIPTION);
-		importPage.setMessage(XMLCatalogMessages.UI_LABEL_IMPORT_DIALOG_MESSAGE);
-		addPage(importPage);
-		importPage.setPageComplete(false);
-	}
-}
-
-
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java
deleted file mode 100644
index 09eed81..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * 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.xml.ui.internal.wizards;
-
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAnyElement;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.ContentBuilder;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-
-public class NamespaceInfoContentBuilder extends ContentBuilder {
-	protected int count = 1;
-	public List list = new Vector();
-	protected Hashtable table = new Hashtable();
-
-	public NamespaceInfoContentBuilder() {
-		super();
-	}
-
-	public void visitCMElementDeclaration(CMElementDeclaration ed) {
-		if (ed.getProperty("http://org.eclipse.wst/cm/properties/definitionInfo") != null) //$NON-NLS-1$
-		{
-			super.visitCMElementDeclaration(ed);
-		}
-	}
-
-	protected void createAnyElementNode(CMAnyElement anyElement) {
-		String uri = anyElement.getNamespaceURI();
-		if ((uri != null) && !uri.startsWith("##")) //$NON-NLS-1$
-		{
-			if (table.get(uri) == null) {
-				NamespaceInfo info = new NamespaceInfo();
-				info.uri = uri;
-				info.prefix = "p" + count++; //$NON-NLS-1$
-				table.put(uri, info);
-				list.add(info);
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java
deleted file mode 100644
index 9cfcd23..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*******************************************************************************
- * 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
- *	   David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-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.content.IContentType;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-
-public class NewModelWizard extends Wizard implements INewWizard {
-
-	protected IStructuredSelection fSelection;
-	protected IWorkbench fWorkbench;
-	protected String fCurrentDirectory;
-
-	public NewModelWizard() {
-		super();
-	}
-
-	public void init(IWorkbench workbench, IStructuredSelection selection) {
-		this.fWorkbench = workbench;
-		this.fSelection = selection;
-	}
-
-	public boolean performFinish() {
-		boolean result = true;
-		WizardPage currentPage = (WizardPage) getContainer().getCurrentPage();
-		if (currentPage != null) {
-			result = currentPage.isPageComplete();
-		}
-		return result;
-	}
-
-	/**
-	 * showFileDialog
-	 */
-	public FileDialog showFileDialog(Shell shell, String defaultDirectory, String defaultFile, String[] filterExtensions) {
-		FileDialog fileDialog = new FileDialog(shell, SWT.OPEN);
-
-		// Get the last visit directory if we haven't defined a particular one
-		// here.
-		if ((defaultDirectory == null) || (defaultDirectory.length() == 0)) {
-			// defaultDirectory =
-			// Locate.instance(this).getLastSelectedDirectory(getResourcePath());
-		}
-
-		if ((defaultDirectory != null) && (defaultDirectory.length() != 0)) {
-			fileDialog.setFilterPath(defaultDirectory);
-		}
-
-		fileDialog.setFileName(defaultFile);
-		fileDialog.setFilterExtensions(filterExtensions);
-
-		fileDialog.open();
-
-		return fileDialog;
-	}
-
-
-	public void setCurrentDirectory(String currentDirectory1) {
-		this.fCurrentDirectory = currentDirectory1;
-	}
-
-
-	public void createWorkbenchResource(IContainer container, String fileName) {
-		IPath path = container.getFullPath();
-		path = path.append(fileName);
-		IFile file = container.getWorkspace().getRoot().getFile(path);
-		if (!file.exists()) {
-			try {
-				file.create(null, true, null);
-			}
-			catch (CoreException e) {
-				// XMLBuilderPlugin.getPlugin().getMsgLogger().write("Encountered
-				// exception creating file: " + e.getMessage());
-			}
-		}
-	}
-
-	/**
-	 * StartPage
-	 */
-	public class StartPage extends WizardPage implements Listener {
-		protected int selectedButton;
-		protected String[] radioButtonLabel;
-		protected Button[] radioButton;
-
-		public StartPage(String pageName, String[] radioButtonLabel) {
-			super(pageName);
-			this.radioButtonLabel = radioButtonLabel;
-			radioButton = new Button[radioButtonLabel.length];
-		}
-
-		public Button getRadioButtonAtIndex(int i) {
-			Button result = null;
-			if ((i >= 0) && (i < radioButton.length)) {
-				result = radioButton[i];
-			}
-			return result;
-		}
-
-		public int getSelectedRadioButtonIndex() {
-			int result = -1;
-			for (int i = 0; i < radioButton.length; i++) {
-				if (radioButton[i].getSelection()) {
-					result = i;
-				}
-			}
-			return result;
-		}
-
-		public void createControl(Composite parent) {
-			Composite base = new Composite(parent, SWT.NONE);
-			base.setLayout(new GridLayout());
-
-			// radio buttons' container
-			Composite radioButtonsGroup = new Composite(base, SWT.NONE);
-			GridLayout layout = new GridLayout();
-			layout.numColumns = 1;
-			layout.makeColumnsEqualWidth = true;
-			layout.marginWidth = 0;
-
-			radioButtonsGroup.setLayout(layout);
-			GridData gd = new GridData(GridData.FILL_BOTH);
-			gd.heightHint = 300;
-			gd.widthHint = 400;
-			radioButtonsGroup.setLayoutData(gd);
-
-			for (int i = 0; i < radioButtonLabel.length; i++) {
-				radioButton[i] = new Button(radioButtonsGroup, SWT.RADIO);
-				radioButton[i].setText(radioButtonLabel[i]);
-				radioButton[i].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-				// radioButton[i].addListener(SWT.Modify, this);
-			}
-			setControl(base);
-			setPageComplete(isPageComplete());
-			Dialog.applyDialogFont(parent);
-		}
-
-		public void handleEvent(Event event) {
-			if (event.type == SWT.Modify) {
-				setPageComplete(isPageComplete());
-			}
-		}
-	}
-
-
-	/**
-	 * NewFilePage
-	 */
-	public class NewFilePage extends WizardNewFileCreationPage {
-		public String defaultName = "NewFile"; //$NON-NLS-1$
-		public String defaultFileExtension = ".txt"; //$NON-NLS-1$
-		public String[] filterExtensions = {"*.txt"}; //$NON-NLS-1$
-		private List fValidExtensions = null;
-
-		public NewFilePage(IStructuredSelection selection) {
-			super("", selection); //$NON-NLS-1$
-		}
-
-		protected String computeDefaultFileName() {
-			int count = 0;
-			String fileName = defaultName + defaultFileExtension;
-			IPath containerFullPath = getContainerFullPath();
-			if (containerFullPath != null) {
-				while (true) {
-					IPath path = containerFullPath.append(fileName);
-					if (ResourcesPlugin.getWorkspace().getRoot().exists(path)) {
-						count++;
-						fileName = defaultName + count + defaultFileExtension;
-					}
-					else {
-						break;
-					}
-				}
-			}
-			return fileName;
-		}
-
-		// returns true if file of specified name exists in any case for
-		// selected container
-		protected String existsFileAnyCase(String fileName) {
-			if ((getContainerFullPath() != null) && (getContainerFullPath().isEmpty() == false) && (fileName.compareTo("") != 0)) //$NON-NLS-1$
-			{
-				// look through all resources at the specified container -
-				// compare in upper case
-				IResource parent = ResourcesPlugin.getWorkspace().getRoot().findMember(getContainerFullPath());
-				if (parent instanceof IContainer) {
-					IContainer container = (IContainer) parent;
-					try {
-						IResource[] members = container.members();
-						String enteredFileUpper = fileName.toUpperCase();
-						for (int i = 0; i < members.length; i++) {
-							String resourceUpperName = members[i].getName().toUpperCase();
-							if (resourceUpperName.equals(enteredFileUpper)) {
-								return members[i].getName();
-							}
-						}
-					}
-					catch (CoreException e) {
-					}
-				}
-			}
-			return null;
-		}
-
-
-		protected boolean validatePage() {
-			String fullFileName = getFileName();
-			if (!extensionValidForContentType(fullFileName)) {
-				setErrorMessage(NLS.bind(XMLWizardsMessages._ERROR_BAD_FILENAME_EXTENSION, getValidExtensions().toString()));
-				return false;
-			}
-			// no fileExtension, let's check for this file with default file
-			// extension
-			fullFileName += defaultFileExtension;
-			if ((getContainerFullPath() != null) && (getContainerFullPath().isEmpty() == false) && (getFileName().compareTo("") != 0)) //$NON-NLS-1$
-			{
-				Path fullPath = new Path(getContainerFullPath().toString() + '/' + fullFileName);
-				IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(fullPath);
-				if (resource != null) {
-					setErrorMessage(XMLWizardsMessages._ERROR_FILE_ALREADY_EXISTS);
-					return false;
-				}
-			}
-
-			// check for file should be case insensitive
-			String sameName = existsFileAnyCase(fullFileName);
-			if (sameName != null) {
-				// ISSUE: is qualitifedFileName not needed, or is it supposed
-				// to be used in error message?
-				// String qualifiedFileName =
-				// getContainerFullPath().toString() + '/' + fullFileName;
-				setErrorMessage(XMLWizardsMessages._ERROR_FILE_ALREADY_EXISTS + " " + sameName); //$NON-NLS-1$
-				return false;
-			}
-
-			return super.validatePage();
-		}
-
-		public void createControl(Composite parent) {
-			// inherit default container and name specification widgets
-			super.createControl(parent);
-			this.setFileName(computeDefaultFileName());
-			setPageComplete(validatePage());
-		}
-
-		/**
-		 * Get list of valid extensions for XML Content type
-		 * 
-		 * @return List
-		 */
-		List getValidExtensions() {
-			if (fValidExtensions == null) {
-				IContentType type = Platform.getContentTypeManager().getContentType(ContentTypeIdForXML.ContentTypeID_XML);
-				fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
-			}
-			return fValidExtensions;
-		}
-
-		/**
-		 * Verifies if fileName is valid name for content type. Takes base
-		 * content type into consideration.
-		 * 
-		 * @param fileName
-		 * @return true if extension is valid for this content type
-		 */
-		boolean extensionValidForContentType(String fileName) {
-			boolean valid = false;
-
-			IContentType type = Platform.getContentTypeManager().getContentType(ContentTypeIdForXML.ContentTypeID_XML);
-			// there is currently an extension
-			if (fileName.lastIndexOf('.') != -1) {
-				// check what content types are associated with current
-				// extension
-				IContentType[] types = Platform.getContentTypeManager().findContentTypesFor(fileName);
-				int i = 0;
-				while ((i < types.length) && !valid) {
-					valid = types[i].isKindOf(type);
-					++i;
-				}
-			}
-			else {
-				valid = true; // no extension so valid
-			}
-			return valid;
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
deleted file mode 100644
index 406a406..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.ContentBuilder;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilderImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMWriter;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-public class NewXMLGenerator {
-
-	protected String grammarURI;
-	protected CMDocument cmDocument;
-	protected int buildPolicy;
-	protected String rootElementName;
-
-	protected ICatalogEntry xmlCatalogEntry;
-
-	// info for dtd
-	protected String publicId;
-	protected String systemId;
-	protected String defaultSystemId;
-
-	// info for xsd
-	public List namespaceInfoList;
-
-	public NewXMLGenerator() {
-		super();
-	}
-
-	public NewXMLGenerator(String grammarURI, CMDocument cmDocument) {
-		this.grammarURI = grammarURI;
-		this.cmDocument = cmDocument;
-	}
-
-
-	public static CMDocument createCMDocument(String uri, String[] errorInfo) {
-		String title = null;
-		String message = null;
-		List errorList = new Vector();
-		CMDocument cmDocument = null;
-
-		if (URIHelper.isReadableURI(uri, true)) {
-			// (cs) assume the uri has been provided in a normalized form
-			cmDocument = ContentModelManager.getInstance().createCMDocument(uri, null);
-
-			if (uri.endsWith(".dtd")) { //$NON-NLS-1$
-				if (errorList.size() > 0) {
-					title = XMLWizardsMessages._UI_INVALID_GRAMMAR_ERROR;
-					message = XMLWizardsMessages._UI_LABEL_ERROR_DTD_INVALID_INFO;
-				}
-			}
-			else // ".xsd"
-			{
-				// To be consistent with the schema editor validation
-				XMLSchemaValidationChecker validator = new XMLSchemaValidationChecker();
-				if (!validator.isValid(uri)) {
-					title = XMLWizardsMessages._UI_INVALID_GRAMMAR_ERROR;
-					message = XMLWizardsMessages._UI_LABEL_ERROR_SCHEMA_INVALID_INFO;
-				}
-				else if (cmDocument != null) {
-					int globalElementCount = cmDocument.getElements().getLength();
-					if (globalElementCount == 0) {
-						title = XMLWizardsMessages._UI_WARNING_TITLE_NO_ROOT_ELEMENTS;
-						message = XMLWizardsMessages._UI_WARNING_MSG_NO_ROOT_ELEMENTS;
-					}
-				}
-			}
-		}
-		else {
-			title = XMLWizardsMessages._UI_WARNING_TITLE_NO_ROOT_ELEMENTS;
-			message = XMLWizardsMessages._UI_WARNING_URI_NOT_FOUND_COLON + " " + uri; //$NON-NLS-1$
-		}
-		errorInfo[0] = title;
-		errorInfo[1] = message;
-
-		return cmDocument;
-	}
-	
-	private String applyLineDelimiter(IFile file, String text) {
-		String lineDelimiter = Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, System.getProperty("line.separator"), new IScopeContext[] {new ProjectScope(file.getProject()), new InstanceScope() });//$NON-NLS-1$
-		String convertedText = StringUtils.replace(text, "\r\n", "\n");
-		convertedText = StringUtils.replace(convertedText, "\r", "\n");
-		convertedText = StringUtils.replace(convertedText, "\n", lineDelimiter);
-		return convertedText;
-	}
-
-	/**
-	 * @deprecated use createTemplateXMLDocument(IFile, String) instead
-	 */
-	public void createEmptyXMLDocument(IFile newFile) throws Exception {
-		String charSet = getUserPreferredCharset();
-		String contents = "<?xml version=\"1.0\" encoding=\"" + charSet + "\"?>"; //$NON-NLS-1$ //$NON-NLS-2$
-		createTemplateXMLDocument(newFile, contents);
-	}
-	
-	void createTemplateXMLDocument(IFile newFile, String contents) throws Exception {
-		if (contents != null) {
-			String charSet = getUserPreferredCharset();
-			ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-	
-			PrintWriter writer = new PrintWriter(new OutputStreamWriter(outputStream, charSet));
-			contents = applyLineDelimiter(newFile, contents);
-			writer.println(contents);
-			writer.flush();
-			outputStream.close();
-	
-			ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
-			newFile.setContents(inputStream, true, true, null);
-			inputStream.close();
-		}
-	}
-
-	private String getUserPreferredCharset() {
-		Preferences preference = XMLCorePlugin.getDefault().getPluginPreferences();
-		String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
-		return charSet;
-	}
-
-	public void createXMLDocument(String xmlFileName) throws Exception {
-		IContentType contentType = Platform.getContentTypeManager().findContentTypeFor(xmlFileName);
-		String charset = null;
-		if (contentType != null) {
-			charset = contentType.getDefaultCharset();
-		}
-		ByteArrayOutputStream outputStream = createXMLDocument(xmlFileName, charset);
-
-		File file = new File(xmlFileName);
-		FileOutputStream fos = new FileOutputStream(file);
-		outputStream.writeTo(fos);
-		fos.close();
-	}
-
-
-	public void createXMLDocument(IFile newFile, String xmlFileName) throws Exception {
-		String charset = newFile.getCharset();
-		ByteArrayOutputStream outputStream = createXMLDocument(xmlFileName, charset);
-
-		String contents = outputStream.toString(charset);
-		contents = applyLineDelimiter(newFile, contents);
-
-		ByteArrayInputStream inputStream = new ByteArrayInputStream(contents.getBytes(charset));
-		newFile.setContents(inputStream, true, true, null);
-		inputStream.close();
-	}
-
-
-	public ByteArrayOutputStream createXMLDocument(String xmlFileName, String charset) throws Exception {
-		if (charset == null) {
-			charset = getUserPreferredCharset();
-			if (charset == null) {
-				charset = "UTF-8"; //$NON-NLS-1$
-			}
-		}
-		CMDocument cmDocument = getCMDocument();
-
-		Assert.isNotNull(cmDocument);
-		Assert.isNotNull(getRootElementName());
-
-		// create the xml model
-		CMNamedNodeMap nameNodeMap = cmDocument.getElements();
-		CMElementDeclaration cmElementDeclaration = (CMElementDeclaration) nameNodeMap.getNamedItem(getRootElementName());
-
-		Document xmlDocument = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
-		DOMContentBuilderImpl contentBuilder = new DOMContentBuilderImpl(xmlDocument);
-
-		// this 'uglyTempHack' flag is required in order to supress the
-		// creation a default encoding
-		// we'll handle this later in the domWriter.print() method used below
-		//
-		contentBuilder.supressCreationOfDoctypeAndXMLDeclaration = true;
-		contentBuilder.setBuildPolicy(buildPolicy);
-		contentBuilder.setExternalCMDocumentSupport(new MyExternalCMDocumentSupport(namespaceInfoList, xmlFileName));
-		contentBuilder.createDefaultRootContent(cmDocument, cmElementDeclaration, namespaceInfoList);
-
-		ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-		OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, charset);
-
-		DOMWriter domWriter = new DOMWriter(outputStreamWriter);
-
-		// TODO... instead of relying on file extensions, we need to keep
-		// track of the grammar type
-		// better yet we should reate an SSE document so that we can format it
-		// nicely before saving
-		// then we won't need the DOMWriter at all
-		//
-		domWriter.print(xmlDocument, charset, cmDocument.getNodeName(), getNonWhitespaceString(getPublicId()), getNonWhitespaceString(getSystemId()));
-		outputStream.flush();
-		outputStream.close();
-
-		return outputStream;
-	}
-
-
-	public void createNamespaceInfoList() {
-		List result = new Vector();
-		if (cmDocument != null) {
-			result = (List) cmDocument.getProperty("http://org.eclipse.wst/cm/properties/completeNamespaceInfo"); //$NON-NLS-1$
-			if (result != null) {
-				int size = result.size();
-				for (int i = 0; i < size; i++) {
-					NamespaceInfo info = (NamespaceInfo) result.get(i);
-					if (i == 0) {
-						String locationInfo = null;
-						if (xmlCatalogEntry != null) {
-							if (xmlCatalogEntry.getEntryType() == ICatalogEntry.ENTRY_TYPE_PUBLIC) {
-								locationInfo = xmlCatalogEntry.getAttributeValue(ICatalogEntry.ATTR_WEB_URL);
-							}
-							else {
-								locationInfo = xmlCatalogEntry.getKey();
-							}
-						}
-						if (locationInfo == null) {
-							locationInfo = defaultSystemId;
-						}
-						info.locationHint = locationInfo;
-						info.setProperty("locationHint-readOnly", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-						info.setProperty("uri-readOnly", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-						info.setProperty("unremovable", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-					} else {
-						info.locationHint = null;
-					}
-				}
-			}
-
-			NamespaceInfoContentBuilder builder = new NamespaceInfoContentBuilder();
-			builder.setBuildPolicy(ContentBuilder.BUILD_ONLY_REQUIRED_CONTENT);
-			builder.visitCMNode(cmDocument);
-			result.addAll(builder.list);
-		}
-		namespaceInfoList = result;
-	}
-
-
-	public boolean isMissingNamespaceLocation() {
-		boolean result = false;
-		for (Iterator i = namespaceInfoList.iterator(); i.hasNext();) {
-			NamespaceInfo info = (NamespaceInfo) i.next();
-			if (info.locationHint == null) {
-				result = true;
-				break;
-			}
-		}
-		return result;
-	}
-
-
-	public String[] getNamespaceInfoErrors() {
-		String[] errorList = null;
-
-// No warnings should be given when namespaces entries have missing location hints
-// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=105128		
-//		if ((namespaceInfoList != null) && isMissingNamespaceLocation()) {
-//			String title = XMLWizardsMessages._UI_LABEL_NO_LOCATION_HINT;
-//			String message = XMLWizardsMessages._UI_WARNING_MSG_NO_LOCATION_HINT_1 + " " + XMLWizardsMessages._UI_WARNING_MSG_NO_LOCATION_HINT_2 + "\n\n" + XMLWizardsMessages._UI_WARNING_MSG_NO_LOCATION_HINT_3; //$NON-NLS-1$ //$NON-NLS-2$
-//
-//			errorList = new String[2];
-//			errorList[0] = title;
-//			errorList[1] = message;
-//		}
-		return errorList;
-	}
-
-
-	public void setXMLCatalogEntry(ICatalogEntry catalogEntry) {
-		xmlCatalogEntry = catalogEntry;
-	}
-
-	public ICatalogEntry getXMLCatalogEntry() {
-		return xmlCatalogEntry;
-	}
-
-
-	public void setBuildPolicy(int policy) {
-		buildPolicy = policy;
-	}
-
-
-	public void setDefaultSystemId(String sysId) {
-		defaultSystemId = sysId;
-	}
-
-	public String getDefaultSystemId() {
-		return defaultSystemId;
-	}
-
-	public void setSystemId(String sysId) {
-		systemId = sysId;
-	}
-
-	public String getSystemId() {
-		return systemId;
-	}
-
-	public void setPublicId(String pubId) {
-		publicId = pubId;
-	}
-
-	public String getPublicId() {
-		return publicId;
-	}
-
-	public void setGrammarURI(String gramURI) {
-		grammarURI = gramURI;
-	}
-
-	public String getGrammarURI() {
-		return grammarURI;
-	}
-
-	public void setCMDocument(CMDocument cmDoc) {
-		cmDocument = cmDoc;
-	}
-
-	public CMDocument getCMDocument() {
-		return cmDocument;
-	}
-
-	public void setRootElementName(String rootName) {
-		rootElementName = rootName;
-	}
-
-	public String getRootElementName() {
-		return rootElementName;
-	}
-
-
-	protected class MyExternalCMDocumentSupport implements DOMContentBuilderImpl.ExternalCMDocumentSupport {
-		protected List namespaceInfoList1;
-		protected URIResolver idResolver;
-		protected String resourceLocation;
-
-		protected MyExternalCMDocumentSupport(List namespaceInfoListParam, String resourceLocation) {
-			this.namespaceInfoList1 = namespaceInfoListParam;
-			this.resourceLocation = resourceLocation;
-			idResolver = URIResolverPlugin.createResolver();
-		}
-
-		public CMDocument getCMDocument(Element element, String namespaceURI) {
-			CMDocument result = null;
-			if ((namespaceURI != null) && (namespaceURI.trim().length() > 0)) {
-				String locationHint = null;
-				for (Iterator i = namespaceInfoList1.iterator(); i.hasNext();) {
-					NamespaceInfo info = (NamespaceInfo) i.next();
-					if (namespaceURI.equals(info.uri)) {
-						locationHint = info.locationHint;
-						break;
-					}
-				}
-				if (locationHint != null) {
-					grammarURI = idResolver.resolve(resourceLocation, locationHint, locationHint);
-					result = ContentModelManager.getInstance().createCMDocument(getGrammarURI(), null);
-				}
-			}
-			else {
-				result = cmDocument;
-			}
-			return result;
-		}
-	}
-
-	public static String getNonWhitespaceString(String string) {
-		String result = null;
-		if (string != null) {
-			if (string.trim().length() > 0) {
-				result = string;
-			}
-		}
-		return result;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLHandler.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLHandler.java
deleted file mode 100644
index 38c2669..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLHandler.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation, bug 212330
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import java.util.Iterator;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class NewXMLHandler extends AbstractHandler implements IHandler {
-
-	/**
-	 * 
-	 */
-	public NewXMLHandler() {
-		super();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-	 */
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		IWorkbenchWindow workbenchWindow = 	HandlerUtil.getActiveWorkbenchWindow(event);
-		ISelection selection = workbenchWindow.getSelectionService().getSelection();
-		Object selectedObject = getSelection(selection);
-
-		if ((selectedObject instanceof IFile) && (selection instanceof IStructuredSelection)) {
-			IFile file = (IFile) selectedObject;
-			IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-			try {
-				NewXMLWizard.showDialog(workbenchWindow.getShell(), file, structuredSelection);
-			}
-			catch (Exception e) {
-				// XMLCorePlugin.getDefault().getLog().log();
-			}
-		}
-		return null;
-	}
-	
-	public static Object getSelection(ISelection selection) {
-		if (selection == null) {
-			return null;
-		} 
-
-		Object result = null;
-		if (selection instanceof IStructuredSelection) {
-			IStructuredSelection es = (IStructuredSelection) selection;
-			Iterator i = es.iterator();
-			if (i.hasNext()) {
-				result = i.next();
-			}
-		}
-		return result;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLTemplatesWizardPage.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLTemplatesWizardPage.java
deleted file mode 100644
index 929a01f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLTemplatesWizardPage.java
+++ /dev/null
@@ -1,508 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.text.templates.DocumentTemplateContext;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateBuffer;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.ui.StructuredTextViewerConfigurationXML;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLUIPreferenceNames;
-import org.eclipse.wst.xml.ui.internal.templates.TemplateContextTypeIdsXML;
-
-/**
- * Templates page in new file wizard. Allows users to select a new file
- * template to be applied in new file.
- * 
- */
-public class NewXMLTemplatesWizardPage extends WizardPage {
-
-	/**
-	 * Content provider for templates
-	 */
-	private class TemplateContentProvider implements IStructuredContentProvider {
-		/** The template store. */
-		private TemplateStore fStore;
-
-		/*
-		 * @see IContentProvider#dispose()
-		 */
-		public void dispose() {
-			fStore = null;
-		}
-
-		/*
-		 * @see IStructuredContentProvider#getElements(Object)
-		 */
-		public Object[] getElements(Object input) {
-			return fStore.getTemplates(TemplateContextTypeIdsXML.NEW);
-		}
-
-		/*
-		 * @see IContentProvider#inputChanged(Viewer, Object, Object)
-		 */
-		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-			fStore = (TemplateStore) newInput;
-		}
-	}
-
-	/**
-	 * Label provider for templates.
-	 */
-	private class TemplateLabelProvider extends LabelProvider implements ITableLabelProvider {
-
-		/*
-		 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object,
-		 *      int)
-		 */
-		public Image getColumnImage(Object element, int columnIndex) {
-			return null;
-		}
-
-		/*
-		 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object,
-		 *      int)
-		 */
-		public String getColumnText(Object element, int columnIndex) {
-			Template template = (Template) element;
-
-			switch (columnIndex) {
-				case 0 :
-					return template.getName();
-				case 1 :
-					return template.getDescription();
-				default :
-					return ""; //$NON-NLS-1$
-			}
-		}
-	}
-
-	/** Last selected template name */
-	private String fLastSelectedTemplateName;
-	/** The viewer displays the pattern of selected template. */
-	private SourceViewer fPatternViewer;
-	/** The table presenting the templates. */
-	private TableViewer fTableViewer;
-	/** Template store used by this wizard page */
-	private TemplateStore fTemplateStore;
-	/** Checkbox for using templates. */
-	private Button fUseTemplateButton;
-
-	public NewXMLTemplatesWizardPage() {
-		super("NewXMLTemplatesWizardPage", XMLWizardsMessages.NewXMLTemplatesWizardPage_0, null); //$NON-NLS-1$
-		setDescription(XMLWizardsMessages.NewXMLTemplatesWizardPage_1);
-	}
-
-	/**
-	 * Correctly resizes the table so no phantom columns appear
-	 * 
-	 * @param parent
-	 *            the parent control
-	 * @param buttons
-	 *            the buttons
-	 * @param table
-	 *            the table
-	 * @param column1
-	 *            the first column
-	 * @param column2
-	 *            the second column
-	 * @param column3
-	 *            the third column
-	 */
-	private void configureTableResizing(final Composite parent, final Table table, final TableColumn column1, final TableColumn column2) {
-		parent.addControlListener(new ControlAdapter() {
-			public void controlResized(ControlEvent e) {
-				Rectangle area = parent.getClientArea();
-				Point preferredSize = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-				int width = area.width - 2 * table.getBorderWidth();
-				if (preferredSize.y > area.height) {
-					// Subtract the scrollbar width from the total column
-					// width
-					// if a vertical scrollbar will be required
-					Point vBarSize = table.getVerticalBar().getSize();
-					width -= vBarSize.x;
-				}
-
-				Point oldSize = table.getSize();
-				if (oldSize.x > width) {
-					// table is getting smaller so make the columns
-					// smaller first and then resize the table to
-					// match the client area width
-					column1.setWidth(width / 2);
-					column2.setWidth(width / 2);
-					table.setSize(width, area.height);
-				}
-				else {
-					// table is getting bigger so make the table
-					// bigger first and then make the columns wider
-					// to match the client area width
-					table.setSize(width, area.height);
-					column1.setWidth(width / 2);
-					column2.setWidth(width / 2);
-				}
-			}
-		});
-	}
-
-	public void createControl(Composite ancestor) {
-		Composite parent = new Composite(ancestor, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
-		parent.setLayout(layout);
-
-		// create checkbox for user to use XML Template
-		fUseTemplateButton = new Button(parent, SWT.CHECK);
-		fUseTemplateButton.setText(XMLWizardsMessages.NewXMLTemplatesWizardPage_4);
-		GridData data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
-		fUseTemplateButton.setLayoutData(data);
-		fUseTemplateButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				enableTemplates();
-			}
-		});
-
-		// create composite for Templates table
-		Composite innerParent = new Composite(parent, SWT.NONE);
-		GridLayout innerLayout = new GridLayout();
-		innerLayout.numColumns = 2;
-		innerLayout.marginHeight = 0;
-		innerLayout.marginWidth = 0;
-		innerParent.setLayout(innerLayout);
-		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
-		innerParent.setLayoutData(gd);
-
-		// Create linked text to just to templates preference page
-		Link link = new Link(innerParent, SWT.NONE);
-		link.setText(XMLWizardsMessages.NewXMLTemplatesWizardPage_6);
-		data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
-		link.setLayoutData(data);
-		link.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				linkClicked();
-			}
-		});
-
-		// create table that displays templates
-		Table table = new Table(innerParent, SWT.BORDER | SWT.FULL_SELECTION);
-
-		data = new GridData(GridData.FILL_BOTH);
-		data.widthHint = convertWidthInCharsToPixels(2);
-		data.heightHint = convertHeightInCharsToPixels(10);
-		data.horizontalSpan = 2;
-		table.setLayoutData(data);
-		table.setHeaderVisible(true);
-		table.setLinesVisible(true);
-		TableLayout tableLayout = new TableLayout();
-		table.setLayout(tableLayout);
-
-		TableColumn column1 = new TableColumn(table, SWT.NONE);
-		column1.setText(XMLWizardsMessages.NewXMLTemplatesWizardPage_2);
-
-		TableColumn column2 = new TableColumn(table, SWT.NONE);
-		column2.setText(XMLWizardsMessages.NewXMLTemplatesWizardPage_3);
-
-		fTableViewer = new TableViewer(table);
-		fTableViewer.setLabelProvider(new TemplateLabelProvider());
-		fTableViewer.setContentProvider(new TemplateContentProvider());
-
-		fTableViewer.setSorter(new ViewerSorter() {
-			public int compare(Viewer viewer, Object object1, Object object2) {
-				if ((object1 instanceof Template) && (object2 instanceof Template)) {
-					Template left = (Template) object1;
-					Template right = (Template) object2;
-					int result = left.getName().compareToIgnoreCase(right.getName());
-					if (result != 0) {
-						return result;
-					}
-					return left.getDescription().compareToIgnoreCase(right.getDescription());
-				}
-				return super.compare(viewer, object1, object2);
-			}
-
-			public boolean isSorterProperty(Object element, String property) {
-				return true;
-			}
-		});
-
-		fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent e) {
-				updateViewerInput();
-			}
-		});
-
-		// create viewer that displays currently selected template's contents
-		fPatternViewer = doCreateViewer(parent);
-
-		fTemplateStore = XMLUIPlugin.getDefault().getTemplateStore();
-		fTableViewer.setInput(fTemplateStore);
-
-		configureTableResizing(innerParent, table, column1, column2);
-		loadLastSavedPreferences();
-
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.XML_NEWWIZARD_TEMPLATE_HELPID);
-		Dialog.applyDialogFont(parent);
-		setControl(parent);
-	}
-
-	/**
-	 * Creates, configures and returns a source viewer to present the template
-	 * pattern on the preference page. Clients may override to provide a
-	 * custom source viewer featuring e.g. syntax coloring.
-	 * 
-	 * @param parent
-	 *            the parent control
-	 * @return a configured source viewer
-	 */
-	private SourceViewer createViewer(Composite parent) {
-		SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
-			StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationXML();
-
-			public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
-				return baseConfiguration.getConfiguredContentTypes(sourceViewer);
-			}
-
-			public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
-				return baseConfiguration.getLineStyleProviders(sourceViewer, partitionType);
-			}
-		};
-		SourceViewer viewer = new StructuredTextViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
-		((StructuredTextViewer) viewer).getTextWidget().setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$
-		IStructuredModel scratchModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(ContentTypeIdForXML.ContentTypeID_XML);
-		IDocument document = scratchModel.getStructuredDocument();
-		viewer.configure(sourceViewerConfiguration);
-		viewer.setDocument(document);
-		return viewer;
-	}
-
-	private SourceViewer doCreateViewer(Composite parent) {
-		Label label = new Label(parent, SWT.NONE);
-		label.setText(XMLWizardsMessages.NewXMLTemplatesWizardPage_5);
-		GridData data = new GridData();
-		data.horizontalSpan = 2;
-		label.setLayoutData(data);
-
-		SourceViewer viewer = createViewer(parent);
-		viewer.setEditable(false);
-
-		Control control = viewer.getControl();
-		data = new GridData(GridData.FILL_BOTH);
-		data.horizontalSpan = 2;
-		data.heightHint = convertHeightInCharsToPixels(5);
-		control.setLayoutData(data);
-
-		return viewer;
-	}
-
-	/**
-	 * Enable/disable controls in page based on fUseTemplateButton's current
-	 * state.
-	 */
-	void enableTemplates() {
-		boolean enabled = fUseTemplateButton.getSelection();
-
-		if (!enabled) {
-			// save last selected template
-			Template template = getSelectedTemplate();
-			if (template != null) {
-				fLastSelectedTemplateName = template.getName();
-			}
-			else {
-				fLastSelectedTemplateName = ""; //$NON-NLS-1$
-			}
-
-			fTableViewer.setSelection(null);
-		}
-		else {
-			setSelectedTemplate(fLastSelectedTemplateName);
-		}
-
-		fTableViewer.getControl().setEnabled(enabled);
-		fPatternViewer.getControl().setEnabled(enabled);
-	}
-
-	/**
-	 * Return the template preference page id
-	 * 
-	 * @return
-	 */
-	private String getPreferencePageId() {
-		return "org.eclipse.wst.sse.ui.preferences.xml.templates"; //$NON-NLS-1$
-	}
-
-	/**
-	 * Get the currently selected template.
-	 * 
-	 * @return
-	 */
-	private Template getSelectedTemplate() {
-		Template template = null;
-		IStructuredSelection selection = (IStructuredSelection) fTableViewer.getSelection();
-
-		if (selection.size() == 1) {
-			template = (Template) selection.getFirstElement();
-		}
-		return template;
-	}
-
-	/**
-	 * Returns template string to insert.
-	 * 
-	 * @return String to insert or null if none is to be inserted
-	 */
-	String getTemplateString() {
-		String templateString = null;
-
-		Template template = getSelectedTemplate();
-		if (template != null) {
-			TemplateContextType contextType = XMLUIPlugin.getDefault().getTemplateContextRegistry().getContextType(TemplateContextTypeIdsXML.NEW);
-			IDocument document = new Document();
-			TemplateContext context = new DocumentTemplateContext(contextType, document, 0, 0);
-			try {
-				TemplateBuffer buffer = context.evaluate(template);
-				templateString = buffer.getString();
-			}
-			catch (Exception e) {
-				Logger.log(Logger.WARNING_DEBUG, "Could not create template for new xml", e); //$NON-NLS-1$
-			}
-		}
-
-		return templateString;
-	}
-
-	void linkClicked() {
-		String pageId = getPreferencePageId();
-		PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), pageId, new String[]{pageId}, null);
-		dialog.open();
-		fTableViewer.refresh();
-	}
-
-	/**
-	 * Load the last template name used in New XML File wizard.
-	 */
-	private void loadLastSavedPreferences() {
-		String templateName = XMLUIPlugin.getDefault().getPreferenceStore().getString(XMLUIPreferenceNames.NEW_FILE_TEMPLATE_NAME);
-		if ((templateName == null) || (templateName.length() == 0)) {
-			fLastSelectedTemplateName = ""; //$NON-NLS-1$
-			fUseTemplateButton.setSelection(false);
-		}
-		else {
-			fLastSelectedTemplateName = templateName;
-			fUseTemplateButton.setSelection(true);
-		}
-		enableTemplates();
-	}
-
-	/**
-	 * Save template name used for next call to New XML File wizard.
-	 */
-	void saveLastSavedPreferences() {
-		String templateName = ""; //$NON-NLS-1$
-
-		Template template = getSelectedTemplate();
-		if (template != null) {
-			templateName = template.getName();
-		}
-
-		XMLUIPlugin.getDefault().getPreferenceStore().setValue(XMLUIPreferenceNames.NEW_FILE_TEMPLATE_NAME, templateName);
-		XMLUIPlugin.getDefault().savePluginPreferences();
-	}
-
-	/**
-	 * Select a template in the table viewer given the template name. If
-	 * template name cannot be found or templateName is null, just select
-	 * first item in table. If no items in table select nothing.
-	 * 
-	 * @param templateName
-	 */
-	private void setSelectedTemplate(String templateName) {
-		Object template = null;
-
-		if ((templateName != null) && (templateName.length() > 0)) {
-			// pick the last used template
-			template = fTemplateStore.findTemplate(templateName, TemplateContextTypeIdsXML.NEW);
-		}
-
-		// no record of last used template so just pick first element
-		if (template == null) {
-			// just pick first element
-			template = fTableViewer.getElementAt(0);
-		}
-
-		if (template != null) {
-			IStructuredSelection selection = new StructuredSelection(template);
-			fTableViewer.setSelection(selection, true);
-		}
-	}
-
-	/**
-	 * Updates the pattern viewer.
-	 */
-	void updateViewerInput() {
-		Template template = getSelectedTemplate();
-		if (template != null) {
-			fPatternViewer.getDocument().set(template.getPattern());
-		}
-		else {
-			fPatternViewer.getDocument().set(""); //$NON-NLS-1$
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
deleted file mode 100644
index da1f814..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
+++ /dev/null
@@ -1,879 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *	   David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IWorkbenchPage;
-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.part.PageBook;
-import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilder;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.core.internal.preferences.XMLCorePreferenceNames;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.dialogs.NamespaceInfoErrorHelper;
-import org.eclipse.wst.xml.ui.internal.dialogs.SelectFileOrXMLCatalogIdPanel;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.internal.nsedit.CommonEditNamespacesDialog;
-
-import com.ibm.icu.text.Collator;
-
-public class NewXMLWizard extends NewModelWizard {
-	protected static final int CREATE_FROM_DTD = 0;
-	protected static final int CREATE_FROM_XSD = 1;
-	protected static final int CREATE_FROM_SCRATCH = 2;
-
-	protected static final String[] createFromRadioButtonLabel = {XMLWizardsMessages._UI_RADIO_XML_FROM_DTD, XMLWizardsMessages._UI_RADIO_XML_FROM_SCHEMA, XMLWizardsMessages._UI_RADIO_XML_FROM_SCRATCH};
-
-	protected static final String[] filePageFilterExtensions = {".xml"}; //$NON-NLS-1$
-	protected static final String[] browseXSDFilterExtensions = {".xsd"}; //$NON-NLS-1$
-	protected static final String[] browseDTDFilterExtensions = {".dtd"}; //$NON-NLS-1$
-
-	protected NewFilePage newFilePage;
-	/**
-	 * @deprecated clients should not be allowed to change start page
-	 */
-	protected StartPage startPage;
-	private StartPage fCreateXMLFromWizardPage;
-	protected SelectGrammarFilePage selectGrammarFilePage;
-	protected SelectRootElementPage selectRootElementPage;
-
-	protected String cmDocumentErrorMessage;
-
-	protected NewXMLGenerator generator;
-	private NewXMLTemplatesWizardPage fNewXMLTemplatesWizardPage;
-
-
-	public NewXMLWizard() {
-		setWindowTitle(XMLWizardsMessages._UI_WIZARD_CREATE_NEW_TITLE);
-		ImageDescriptor descriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_WIZBAN_GENERATEXML);
-		setDefaultPageImageDescriptor(descriptor);
-		generator = new NewXMLGenerator();
-	}
-
-
-	public NewXMLWizard(IFile file, CMDocument cmDocument) {
-		this();
-
-		generator.setGrammarURI(URIHelper.getPlatformURI(file));
-		generator.setCMDocument(cmDocument);
-	}
-
-
-	public static void showDialog(Shell shell, IFile file, IStructuredSelection structuredSelection) {
-		String[] errorInfo = new String[2];
-		// (cs) the URI argument to createCMDocument needs to be a fully
-		// qualified URI
-		//
-		CMDocument cmDocument = NewXMLGenerator.createCMDocument(URIHelper.getPlatformURI(file), errorInfo);
-		if (errorInfo[0] == null) {
-			NewXMLWizard wizard = new NewXMLWizard(file, cmDocument);
-			wizard.init(PlatformUI.getWorkbench(), structuredSelection);
-			wizard.setNeedsProgressMonitor(true);
-			WizardDialog dialog = new WizardDialog(shell, wizard);
-			dialog.create();
-			dialog.getShell().setText(XMLWizardsMessages._UI_DIALOG_NEW_TITLE);
-			dialog.setBlockOnOpen(true);
-			dialog.open();
-		}
-		else {
-			MessageDialog.openInformation(shell, errorInfo[0], errorInfo[1]);
-		}
-	}
-
-	public void addPages() {
-		String grammarURI = generator.getGrammarURI();
-		
-		// new file page
-		newFilePage = new NewFilePage(fSelection);
-		newFilePage.setTitle(XMLWizardsMessages._UI_WIZARD_CREATE_XML_FILE_HEADING);
-		newFilePage.setDescription(XMLWizardsMessages._UI_WIZARD_CREATE_XML_FILE_EXPL);
-		newFilePage.defaultName = (grammarURI != null) ? URIHelper.removeFileExtension(URIHelper.getLastSegment(grammarURI)) : "NewFile"; //$NON-NLS-1$
-		Preferences preference = XMLCorePlugin.getDefault().getPluginPreferences();
-		String ext = preference.getString(XMLCorePreferenceNames.DEFAULT_EXTENSION);
-		newFilePage.defaultFileExtension = "." + ext; //$NON-NLS-1$
-		newFilePage.filterExtensions = filePageFilterExtensions;
-		addPage(newFilePage);
-
-		if (grammarURI == null) {
-			// create xml from page
-			fCreateXMLFromWizardPage = new StartPage("StartPage", createFromRadioButtonLabel) //$NON-NLS-1$
-			{
-				public void createControl(Composite parent) {
-					super.createControl(parent);
-				}
-
-				public void setVisible(boolean visible) {
-					super.setVisible(visible);
-					getRadioButtonAtIndex(getCreateMode()).setSelection(true);
-					getRadioButtonAtIndex(getCreateMode()).setFocus();
-
-					// Set the help context for each button
-					PlatformUI.getWorkbench().getHelpSystem().setHelp(fCreateXMLFromWizardPage.getRadioButtonAtIndex(0), IXMLWizardHelpContextIds.XML_NEWWIZARD_CREATEXML1_HELPID);
-					PlatformUI.getWorkbench().getHelpSystem().setHelp(fCreateXMLFromWizardPage.getRadioButtonAtIndex(1), IXMLWizardHelpContextIds.XML_NEWWIZARD_CREATEXML2_HELPID);
-					PlatformUI.getWorkbench().getHelpSystem().setHelp(fCreateXMLFromWizardPage.getRadioButtonAtIndex(2), IXMLWizardHelpContextIds.XML_NEWWIZARD_CREATEXML3_HELPID);
-				}
-			};
-
-
-			fCreateXMLFromWizardPage.setTitle(XMLWizardsMessages._UI_WIZARD_CREATE_XML_HEADING);
-			fCreateXMLFromWizardPage.setDescription(XMLWizardsMessages._UI_WIZARD_CREATE_XML_EXPL);
-			addPage(fCreateXMLFromWizardPage);
-		}
-
-		// selectGrammarFilePage
-		selectGrammarFilePage = new SelectGrammarFilePage();
-		addPage(selectGrammarFilePage);
-
-		// select root element page
-		selectRootElementPage = new SelectRootElementPage();
-		selectRootElementPage.setTitle(XMLWizardsMessages._UI_WIZARD_SELECT_ROOT_HEADING);
-		selectRootElementPage.setDescription(XMLWizardsMessages._UI_WIZARD_SELECT_ROOT_EXPL);
-		addPage(selectRootElementPage);
-
-		// from "scratch"
-		fNewXMLTemplatesWizardPage = new NewXMLTemplatesWizardPage();
-		addPage(fNewXMLTemplatesWizardPage);
-	}
-
-
-	public IWizardPage getStartingPage() {
-		WizardPage result = null;
-		if (startPage != null) {
-			result = startPage;
-		}
-		else {
-			result = newFilePage;
-		}
-		return result;
-	}
-
-
-	public int getCreateMode() {
-		String grammarURI = generator.getGrammarURI();
-
-		int result = CREATE_FROM_SCRATCH;
-		if (grammarURI != null) {
-			if (grammarURI.endsWith(".dtd")) //$NON-NLS-1$
-			{
-				result = CREATE_FROM_DTD;
-			}
-			else if (grammarURI.endsWith(".xsd")) //$NON-NLS-1$
-			{
-				result = CREATE_FROM_XSD;
-			}
-		}
-		else if (fCreateXMLFromWizardPage != null) {
-			int selectedIndex = fCreateXMLFromWizardPage.getSelectedRadioButtonIndex();
-			if (selectedIndex != -1) {
-				result = selectedIndex;
-			}
-		}
-		return result;
-	}
-
-
-	public IWizardPage getNextPage(IWizardPage currentPage) {
-		WizardPage nextPage = null;
-		if (currentPage == startPage) {
-			nextPage = newFilePage;
-		}
-		else if (currentPage == newFilePage) {
-			if (generator.getGrammarURI() == null)
-				nextPage = fCreateXMLFromWizardPage;
-			else
-				nextPage = selectRootElementPage;
-		}
-		else if (currentPage == fCreateXMLFromWizardPage) {
-			if (getCreateMode() == CREATE_FROM_SCRATCH) {
-				nextPage = fNewXMLTemplatesWizardPage;
-			}
-			else if (generator.getGrammarURI() == null) {
-				nextPage = selectGrammarFilePage;
-			}
-			else {
-				nextPage = selectRootElementPage;
-			}
-		}
-		else if (currentPage == selectGrammarFilePage) {
-			nextPage = selectRootElementPage;
-		}
-		return nextPage;
-	}
-
-
-	public boolean canFinish() {
-		boolean result = false;
-
-		IWizardPage currentPage = getContainer().getCurrentPage();
-		// can finish on: new file page, create from & template page if creating from scratch, select root element page
-		if ((currentPage == newFilePage && generator.getGrammarURI() == null) || (fCreateXMLFromWizardPage != null && fCreateXMLFromWizardPage.getSelectedRadioButtonIndex() == CREATE_FROM_SCRATCH) || (currentPage == selectRootElementPage)) {
-			result = currentPage.isPageComplete();
-		}
-		return result;
-	}
-
-
-	public boolean performFinish() {
-		boolean result = super.performFinish();
-		// save user options for next use
-		fNewXMLTemplatesWizardPage.saveLastSavedPreferences();
-		
-		String fileName = null;
-		try {
-
-			String[] namespaceErrors = generator.getNamespaceInfoErrors();
-			if (namespaceErrors != null) {
-				String title = namespaceErrors[0];
-				String message = namespaceErrors[1];
-				result = MessageDialog.openQuestion(getShell(), title, message);
-			}
-
-			if (result) {
-				fileName = newFilePage.getFileName();
-				if ((new Path(fileName)).getFileExtension() == null) {
-					newFilePage.setFileName(fileName.concat(newFilePage.defaultFileExtension));
-				}
-
-				IFile newFile = newFilePage.createNewFile();
-				String xmlFileName = newFile.getLocation().toOSString();
-
-				if (getContainer().getCurrentPage() == selectRootElementPage) {
-
-					generator.createXMLDocument(newFile, xmlFileName);
-				}
-				else {
-					// put template contents into file
-					String templateString = fNewXMLTemplatesWizardPage.getTemplateString();
-					generator.createTemplateXMLDocument(newFile, templateString);
-				}
-
-				newFile.refreshLocal(IResource.DEPTH_ONE, null);
-
-				IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-				BasicNewResourceWizard.selectAndReveal(newFile, workbenchWindow);
-				openEditor(newFile);
-			}
-		}
-		catch (Exception e) {
-			Logger.logException("Exception completing New XML wizard " + fileName, e); //$NON-NLS-1$
-		}
-		return result;
-	}
-
-	public void openEditor(IFile file) {
-		// Open editor on new file.
-		String editorId = null;
-		try {
-			IEditorDescriptor editor = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(file.getLocation().toOSString(), file.getContentDescription().getContentType());
-			if (editor != null) {
-				editorId = editor.getId();
-			}
-		}
-		catch (CoreException e1) {
-			// editor id could not be retrieved, so we can not open editor
-			return;
-		}
-		IWorkbenchWindow dw = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-		try {
-			if (dw != null) {
-				IWorkbenchPage page = dw.getActivePage();
-				if (page != null) {
-					page.openEditor(new FileEditorInput(file), editorId, true);
-				}
-			}
-		}
-		catch (PartInitException e) {
-			// editor can not open for some reason
-			return;
-		}
-
-	}
-
-
-	protected String getDefaultSystemId() {
-		String relativePath = "platform:/resource/" + newFilePage.getContainerFullPath().toString() + "/dummy"; //$NON-NLS-1$ //$NON-NLS-2$
-		return URIHelper.getRelativeURI(generator.getGrammarURI(), relativePath);
-	}
-
-
-	/**
-	 * SelectGrammarFilePage
-	 */
-	class SelectGrammarFilePage extends WizardPage {
-		protected SelectFileOrXMLCatalogIdPanel panel;
-
-		SelectGrammarFilePage() {
-			super("SelectGrammarFilePage"); //$NON-NLS-1$
-		}
-
-		public void createControl(Composite parent) {
-			Composite composite = new Composite(parent, SWT.NONE);
-			PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IXMLWizardHelpContextIds.XML_NEWWIZARD_SELECTSOURCE_HELPID);
-			composite.setLayout(new GridLayout());
-			composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-			setControl(composite);
-
-			panel = new SelectFileOrXMLCatalogIdPanel(composite);
-			panel.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-			SelectFileOrXMLCatalogIdPanel.Listener listener = new SelectFileOrXMLCatalogIdPanel.Listener() {
-				public void completionStateChanged() {
-					updateErrorMessage();
-				}
-			};
-			panel.setListener(listener);
-			Dialog.applyDialogFont(parent);
-		}
-
-		public void setVisible(boolean visible) {
-			super.setVisible(visible);
-			if (visible) {
-				if (getCreateMode() == CREATE_FROM_DTD) {
-					setTitle(XMLWizardsMessages._UI_WIZARD_SELECT_DTD_FILE_TITLE);
-					setDescription(XMLWizardsMessages._UI_WIZARD_SELECT_DTD_FILE_DESC);
-					panel.setFilterExtensions(browseDTDFilterExtensions);
-				}
-				else {
-					setTitle(XMLWizardsMessages._UI_WIZARD_SELECT_XSD_FILE_TITLE);
-					setDescription(XMLWizardsMessages._UI_WIZARD_SELECT_XSD_FILE_DESC);
-					panel.setFilterExtensions(browseXSDFilterExtensions);
-				}
-				generator.setGrammarURI(null);
-				generator.setCMDocument(null);
-				cmDocumentErrorMessage = null;
-			}
-			panel.setVisibleHelper(visible);
-		}
-
-		public String getURI() {
-			String uri = panel.getXMLCatalogURI();
-			if (uri == null) {
-				IFile file = panel.getFile();
-				if (file != null) {
-					uri = URIHelper.getPlatformURI(file);
-				}
-			}
-			return uri;
-		}
-
-		public boolean isPageComplete() {
-			return (getURI() != null) && (getErrorMessage() == null);
-		}
-
-		public String getXMLCatalogId() {
-			return panel.getXMLCatalogId();
-		}
-
-		public ICatalogEntry getXMLCatalogEntry() {
-			return panel.getXMLCatalogEntry();
-		}
-
-		public String computeErrorMessage() {
-			String errorMessage = null;
-			String uri = getURI();
-			if (uri != null) {
-				if (!URIHelper.isReadableURI(uri, false)) {
-					errorMessage = XMLWizardsMessages._UI_LABEL_ERROR_CATALOG_ENTRY_INVALID;
-				}
-			}
-			return errorMessage;
-		}
-
-
-		public void updateErrorMessage() {
-			String errorMessage = computeErrorMessage();
-			setErrorMessage(errorMessage);
-			setPageComplete(isPageComplete());
-		}
-	}
-
-
-	/**
-	 * SelectRootElementPage
-	 */
-	class SelectRootElementPage extends WizardPage implements SelectionListener {
-		protected Combo combo;
-		protected Button[] radioButton;
-		protected PageBook pageBook;
-		protected XSDOptionsPanel xsdOptionsPanel;
-		protected DTDOptionsPanel dtdOptionsPanel;
-
-
-		SelectRootElementPage() {
-			super("SelectRootElementPage"); //$NON-NLS-1$
-		}
-
-		public void createControl(Composite parent) {
-			// container group
-			Composite containerGroup = new Composite(parent, SWT.NONE);
-			PlatformUI.getWorkbench().getHelpSystem().setHelp(containerGroup, IXMLWizardHelpContextIds.XML_NEWWIZARD_SELECTROOTELEMENT_HELPID);
-			containerGroup.setLayout(new GridLayout());
-			containerGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			setControl(containerGroup);
-
-			// select root element
-			Label containerLabel = new Label(containerGroup, SWT.NONE);
-			containerLabel.setText(XMLWizardsMessages._UI_LABEL_ROOT_ELEMENT);
-			combo = new Combo(containerGroup, SWT.DROP_DOWN | SWT.READ_ONLY);
-			combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			combo.addSelectionListener(this);
-
-			// Options
-			{
-				Group group = new Group(containerGroup, SWT.NONE);
-				group.setText(XMLWizardsMessages._UI_WIZARD_CONTENT_OPTIONS);
-
-				GridLayout layout = new GridLayout();
-				layout.numColumns = 1;
-				layout.makeColumnsEqualWidth = true;
-				layout.marginWidth = 0;
-				group.setLayout(layout);
-				group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-				radioButton = new Button[4];
-
-				radioButton[0] = new Button(group, SWT.CHECK);
-				radioButton[0].setText(XMLWizardsMessages._UI_WIZARD_CREATE_OPTIONAL_ATTRIBUTES);
-				radioButton[0].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-				radioButton[0].setSelection(false);
-				PlatformUI.getWorkbench().getHelpSystem().setHelp(radioButton[0], IXMLWizardHelpContextIds.XML_NEWWIZARD_SELECTROOTELEMENT1_HELPID);
-
-				radioButton[1] = new Button(group, SWT.CHECK);
-				radioButton[1].setText(XMLWizardsMessages._UI_WIZARD_CREATE_OPTIONAL_ELEMENTS);
-				radioButton[1].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-				radioButton[1].setSelection(false);
-				PlatformUI.getWorkbench().getHelpSystem().setHelp(radioButton[1], IXMLWizardHelpContextIds.XML_NEWWIZARD_SELECTROOTELEMENT2_HELPID);
-
-				radioButton[2] = new Button(group, SWT.CHECK);
-				radioButton[2].setText(XMLWizardsMessages._UI_WIZARD_CREATE_FIRST_CHOICE);
-				radioButton[2].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-				radioButton[2].setSelection(true);
-				PlatformUI.getWorkbench().getHelpSystem().setHelp(radioButton[2], IXMLWizardHelpContextIds.XML_NEWWIZARD_SELECTROOTELEMENT3_HELPID);
-
-				radioButton[3] = new Button(group, SWT.CHECK);
-				radioButton[3].setText(XMLWizardsMessages._UI_WIZARD_FILL_ELEMENTS_AND_ATTRIBUTES);
-				radioButton[3].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-				radioButton[3].setSelection(true);
-				PlatformUI.getWorkbench().getHelpSystem().setHelp(radioButton[3], IXMLWizardHelpContextIds.XML_NEWWIZARD_SELECTROOTELEMENT4_HELPID);
-				/*
-				 * radioButton = new Button[2];
-				 * 
-				 * radioButton[0] = new Button(group, SWT.RADIO);
-				 * radioButton[0].setText(XMLWizardsMessages.getString("_UI_WIZARD_CREATE_REQUIRED"));
-				 * radioButton[0].setLayoutData(new
-				 * GridData(GridData.FILL_HORIZONTAL));
-				 * radioButton[0].setSelection(true);
-				 * WorkbenchHelp.setHelp(radioButton[0],
-				 * XMLBuilderContextIds.XMLC_CREATE_REQUIRED_ONLY);
-				 * 
-				 * radioButton[1] = new Button(group, SWT.RADIO);
-				 * radioButton[1].setText(XMLWizardsMessages.getString("_UI_WIZARD_CREATE_OPTIONAL"));
-				 * radioButton[1].setLayoutData(new
-				 * GridData(GridData.FILL_HORIZONTAL));
-				 * WorkbenchHelp.setHelp(radioButton[1],
-				 * XMLBuilderContextIds.XMLC_CREATE_REQUIRED_AND_OPTION);
-				 */
-			}
-
-			// add the grammar specific generation options
-			//
-			{
-				pageBook = new PageBook(containerGroup, SWT.NONE);
-				pageBook.setLayoutData(new GridData(GridData.FILL_BOTH));
-				xsdOptionsPanel = new XSDOptionsPanel(this, pageBook);
-				dtdOptionsPanel = new DTDOptionsPanel(this, pageBook);
-				pageBook.showPage(xsdOptionsPanel);
-			}
-		}
-
-		public void widgetSelected(SelectionEvent event) {
-			int index = combo.getSelectionIndex();
-			String rootElementName = (index != -1) ? combo.getItem(index) : null;
-			generator.setRootElementName(rootElementName);
-		}
-
-		public void widgetDefaultSelected(SelectionEvent event) {
-			// do nothing
-		}
-
-		public void setVisible(boolean visible) {
-			super.setVisible(visible);
-
-			if (visible) {
-				try {
-					if (generator.getGrammarURI() == null) {
-						generator.setGrammarURI(selectGrammarFilePage.getURI());
-						generator.setXMLCatalogEntry(selectGrammarFilePage.getXMLCatalogEntry());
-					}
-					Assert.isNotNull(generator.getGrammarURI());
-
-					if (generator.getCMDocument() == null) {
-						final String[] errorInfo = new String[2];
-						final CMDocument[] cmdocs = new CMDocument[1];
-						Runnable r = new Runnable() {
-							public void run() {
-								cmdocs[0] = NewXMLGenerator.createCMDocument(generator.getGrammarURI(), errorInfo);
-							}
-						};
-						org.eclipse.swt.custom.BusyIndicator.showWhile(Display.getCurrent(), r);
-
-						generator.setCMDocument(cmdocs[0]);
-						cmDocumentErrorMessage = errorInfo[1];
-					}
-
-					combo.removeAll();
-					if ((generator.getCMDocument() != null) && (cmDocumentErrorMessage == null)) {
-						CMNamedNodeMap nameNodeMap = generator.getCMDocument().getElements();
-						Vector nameNodeVector = new Vector();
-
-						for (int i = 0; i < nameNodeMap.getLength(); i++) {
-							CMElementDeclaration cmElementDeclaration = (CMElementDeclaration) nameNodeMap.item(i);
-							Object value = cmElementDeclaration.getProperty("Abstract"); //$NON-NLS-1$
-							if (value != Boolean.TRUE) {
-								nameNodeVector.add(cmElementDeclaration.getElementName());
-							}
-						}
-
-						Object[] nameNodeArray = nameNodeVector.toArray();
-						if (nameNodeArray.length > 0) {
-							Arrays.sort(nameNodeArray, Collator.getInstance());
-						}
-
-						String defaultRootName = (String) (generator.getCMDocument()).getProperty("http://org.eclipse.wst/cm/properties/defaultRootName"); //$NON-NLS-1$
-						int defaultRootIndex = -1;
-						for (int i = 0; i < nameNodeArray.length; i++) {
-							String elementName = (String) nameNodeArray[i];
-
-							combo.add(elementName);
-							if ((defaultRootName != null) && defaultRootName.equals(elementName)) {
-								defaultRootIndex = i;
-							}
-						}
-
-						if (nameNodeArray.length > 0) {
-							defaultRootIndex = defaultRootIndex != -1 ? defaultRootIndex : 0;
-							combo.select(defaultRootIndex);
-							generator.setRootElementName(combo.getItem(defaultRootIndex));
-						}
-					}
-
-					if (generator.getGrammarURI().endsWith("xsd")) //$NON-NLS-1$
-					{
-						pageBook.showPage(xsdOptionsPanel);
-						generator.setDefaultSystemId(getDefaultSystemId());
-						generator.createNamespaceInfoList();
-
-						// Provide default namespace prefix if none
-						for (int i = 0; i < generator.namespaceInfoList.size(); i++) {
-							NamespaceInfo nsinfo = (NamespaceInfo) generator.namespaceInfoList.get(i);
-							if (((nsinfo.prefix == null) || (nsinfo.prefix.trim().length() == 0)) && ((nsinfo.uri != null) && (nsinfo.uri.trim().length() != 0))) {
-								nsinfo.prefix = getDefaultPrefix(generator.namespaceInfoList);
-							}
-						}
-						xsdOptionsPanel.setNamespaceInfoList(generator.namespaceInfoList);
-					}
-					else if (generator.getGrammarURI().endsWith("dtd")) //$NON-NLS-1$
-					{
-						pageBook.showPage(dtdOptionsPanel);
-						dtdOptionsPanel.update();
-					}
-				}
-				catch (Exception e) {
-					// XMLBuilderPlugin.getPlugin().getMsgLogger().writeCurrentThread();
-				}
-
-				/*
-				 * String errorMessage = computeErrorMessage(); if
-				 * (errorMessage == null) super.setVisible(visible);
-				 */
-
-				updateErrorMessage();
-			}
-		}
-
-		private String getDefaultPrefix(List nsInfoList) {
-			String defaultPrefix = "p"; //$NON-NLS-1$
-			if (nsInfoList == null) {
-				return defaultPrefix;
-			}
-
-			Vector v = new Vector();
-			for (int i = 0; i < nsInfoList.size(); i++) {
-				NamespaceInfo nsinfo = (NamespaceInfo) nsInfoList.get(i);
-				if (nsinfo.prefix != null) {
-					v.addElement(nsinfo.prefix);
-				}
-			}
-
-			if (v.contains(defaultPrefix)) {
-				String s = defaultPrefix;
-				for (int j = 0; v.contains(s); j++) {
-					s = defaultPrefix + Integer.toString(j);
-				}
-				return s;
-			}
-			return defaultPrefix;
-		}
-
-		public boolean isPageComplete() {
-			boolean complete = ((generator.getRootElementName() != null) && (generator.getRootElementName().length() > 0)) && (getErrorMessage() == null);
-
-			if (complete) {
-				/*
-				 * int buildPolicy = radioButton[0].getSelection() ?
-				 * DOMContentBuilder.BUILD_ONLY_REQUIRED_CONTENT :
-				 * DOMContentBuilder.BUILD_ALL_CONTENT;
-				 */
-				int buildPolicy = 0;
-				if (radioButton[0].getSelection()) {
-					buildPolicy = buildPolicy | DOMContentBuilder.BUILD_OPTIONAL_ATTRIBUTES;
-				}
-				if (radioButton[1].getSelection()) {
-					buildPolicy = buildPolicy | DOMContentBuilder.BUILD_OPTIONAL_ELEMENTS;
-				}
-				if (radioButton[2].getSelection()) {
-					buildPolicy = buildPolicy | DOMContentBuilder.BUILD_FIRST_CHOICE | DOMContentBuilder.BUILD_FIRST_SUBSTITUTION;
-				}
-				if (radioButton[3].getSelection()) {
-					buildPolicy = buildPolicy | DOMContentBuilder.BUILD_TEXT_NODES;
-				}
-
-				generator.setBuildPolicy(buildPolicy);
-			}
-
-			return complete;
-		}
-
-		public String computeErrorMessage() {
-			String errorMessage = null;
-
-			if (cmDocumentErrorMessage != null) {
-				errorMessage = cmDocumentErrorMessage;
-			}
-			else if ((generator.getRootElementName() == null) || (generator.getRootElementName().length() == 0)) {
-				errorMessage = XMLWizardsMessages._ERROR_ROOT_ELEMENT_MUST_BE_SPECIFIED;
-			}
-
-			return errorMessage;
-		}
-
-
-		public void updateErrorMessage() {
-			String errorMessage = computeErrorMessage();
-			if (errorMessage == null) {
-				if (xsdOptionsPanel.isVisible()) {
-
-					errorMessage = xsdOptionsPanel.computeErrorMessage();
-				}
-				else if (dtdOptionsPanel.isVisible()) {
-					errorMessage = dtdOptionsPanel.computeErrorMessage();
-				}
-			}
-			setErrorMessage(errorMessage);
-			setPageComplete(isPageComplete());
-		}
-	}
-
-	// //////////////End SelectRootElementPage
-
-
-
-	public static GridLayout createOptionsPanelLayout() {
-		GridLayout gridLayout = new GridLayout();
-		gridLayout.marginWidth = 0;
-		gridLayout.horizontalSpacing = 0;
-		return gridLayout;
-	}
-
-
-
-	/**
-	 * 
-	 */
-	class XSDOptionsPanel extends Composite {
-		protected String errorMessage = null;
-		protected SelectRootElementPage parentPage;
-		protected CommonEditNamespacesDialog editNamespaces;
-		private IPath currentPath = null;
-
-		public XSDOptionsPanel(SelectRootElementPage parentPage, Composite parent) {
-			super(parent, SWT.NONE);
-			this.parentPage = parentPage;
-
-			setLayout(createOptionsPanelLayout());
-			setLayoutData(new GridData(GridData.FILL_BOTH));
-		}
-		
-		private CommonEditNamespacesDialog getEditNamespaces() {
-			if (editNamespaces == null) {
-				Composite co = new Composite(this, SWT.NONE);
-				co.setLayout(new GridLayout());
-				String tableTitle = XMLWizardsMessages._UI_LABEL_NAMESPACE_INFORMATION;
-				editNamespaces = new CommonEditNamespacesDialog(co, null, tableTitle, true, true);
-				this.layout();
-			}
-			return editNamespaces;
-		}
-
-		public void setNamespaceInfoList(List list) {
-			CommonEditNamespacesDialog editDialog = getEditNamespaces();
-			
-		    if (newFilePage != null) {
-		      IPath newPath = newFilePage.getContainerFullPath();
-		      if (newPath != null) {
-		        if (!newPath.equals(currentPath)) {
-	                String resourceURI = "platform:/resource" + newPath.toString() + "/dummy"; //$NON-NLS-1$ //$NON-NLS-2$
-	                String resolvedPath = URIHelper.normalize(resourceURI, null, null);
-	                resolvedPath = URIHelper.removeProtocol(resolvedPath);
-	                
-	                currentPath = new Path(resolvedPath);
-	                editDialog.setResourcePath(currentPath);
-		        }
-		      }
-		    }
-		    editDialog.setNamespaceInfoList(list);
-		    editDialog.updateErrorMessage(list);
-		}
-
-		public void updateErrorMessage(List namespaceInfoList) {
-			NamespaceInfoErrorHelper helper = new NamespaceInfoErrorHelper();
-			errorMessage = helper.computeErrorMessage(namespaceInfoList, null);
-			parentPage.updateErrorMessage();
-		}
-
-
-		public String computeErrorMessage() {
-			return errorMessage;
-		}
-	}
-
-
-	/**
-	 * 
-	 */
-	public class DTDOptionsPanel extends Composite implements ModifyListener {
-		protected Group group;
-		protected Text systemIdField;
-		protected Text publicIdField;
-		protected SelectRootElementPage parentPage;
-
-		public DTDOptionsPanel(SelectRootElementPage parentPage, Composite parent) {
-			super(parent, SWT.NONE);
-			this.parentPage = parentPage;
-			setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-			setLayout(createOptionsPanelLayout());
-			Group group = new Group(this, SWT.NONE);
-			group.setText(XMLWizardsMessages._UI_LABEL_DOCTYPE_INFORMATION);
-
-			GridLayout layout = new GridLayout();
-			layout.numColumns = 2;
-			group.setLayout(layout);
-			group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-			Label publicIdLabel = new Label(group, SWT.NONE);
-			publicIdLabel.setText(XMLWizardsMessages._UI_LABEL_PUBLIC_ID);
-			publicIdField = new Text(group, SWT.SINGLE | SWT.BORDER);
-			publicIdField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			publicIdField.addModifyListener(this);
-			PlatformUI.getWorkbench().getHelpSystem().setHelp(publicIdField, IXMLWizardHelpContextIds.XML_NEWWIZARD_SELECTROOTELEMENT5_HELPID);
-
-			Label systemIdLabel = new Label(group, SWT.NONE);
-			systemIdLabel.setText(XMLWizardsMessages._UI_LABEL_SYSTEM_ID);
-			systemIdField = new Text(group, SWT.SINGLE | SWT.BORDER);
-			systemIdField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			systemIdField.addModifyListener(this);
-			PlatformUI.getWorkbench().getHelpSystem().setHelp(systemIdField, IXMLWizardHelpContextIds.XML_NEWWIZARD_SELECTROOTELEMENT6_HELPID);
-		}
-
-		public void update() {
-			String thePublicId = null;
-			String theSystemId = null;
-			ICatalogEntry xmlCatalogEntry = generator.getXMLCatalogEntry();
-
-			if (xmlCatalogEntry != null) {
-				if (xmlCatalogEntry.getEntryType() == ICatalogEntry.ENTRY_TYPE_PUBLIC) {
-					thePublicId = xmlCatalogEntry.getKey();
-					theSystemId = xmlCatalogEntry.getAttributeValue(ICatalogEntry.ATTR_WEB_URL);
-					if (theSystemId == null) {
-						theSystemId = generator.getGrammarURI().startsWith("http:") ? generator.getGrammarURI() : URIHelper.getLastSegment(generator.getGrammarURI()); //$NON-NLS-1$
-					}
-				}
-				else {
-					theSystemId = xmlCatalogEntry.getKey();
-				}
-			}
-			else {
-				theSystemId = getDefaultSystemId();
-			}
-
-			publicIdField.setText(thePublicId != null ? thePublicId : ""); //$NON-NLS-1$
-			systemIdField.setText(theSystemId != null ? theSystemId : ""); //$NON-NLS-1$
-		}
-
-		public void modifyText(ModifyEvent e) {
-			generator.setSystemId(systemIdField.getText());
-			generator.setPublicId(publicIdField.getText());
-			parentPage.updateErrorMessage();
-		}
-
-		public String computeErrorMessage() {
-			return null;
-		}
-	}
-
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLImportActionDelegate.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLImportActionDelegate.java
deleted file mode 100644
index 4b923c4..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLImportActionDelegate.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.xml.ui.internal.wizards;
-
-import java.util.Iterator;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-// TODO cs... rename this class NewXMLActionDelegate
-// we need to re-add pre-validation using the validation framework API's
-// since we also need to add validation to the 'New XML' case, this
-// prevalidation
-// function should really go into the NewWizard somewhere
-//
-public class XMLImportActionDelegate implements IActionDelegate {
-	/**
-	 * Checks the current selection and runs the separate browser to show the
-	 * content of the Readme file. This code shows how to launch separate
-	 * browsers that are not VA/Base desktop parts.
-	 * 
-	 * @param action
-	 *            the action that was performed
-	 */
-	public void run(IAction action) {
-		IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-		ISelection selection = workbenchWindow.getSelectionService().getSelection();
-		Object selectedObject = getSelection(selection);
-
-		if ((selectedObject instanceof IFile) && (selection instanceof IStructuredSelection)) {
-			IFile file = (IFile) selectedObject;
-			IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-			try {
-				NewXMLWizard.showDialog(workbenchWindow.getShell(), file, structuredSelection);
-			}
-			catch (Exception e) {
-				// XMLCorePlugin.getDefault().getLog().log();
-			}
-		}
-	}
-
-	/**
-	 * unused
-	 */
-	public void selectionChanged(IAction action, ISelection selection) {
-		// unused
-	}
-
-	// scammed from WindowUtility
-	//
-	public static Object getSelection(ISelection selection) {
-		if (selection == null) {
-			return null;
-		} // end of if ()
-
-		Object result = null;
-		if (selection instanceof IStructuredSelection) {
-			IStructuredSelection es = (IStructuredSelection) selection;
-			Iterator i = es.iterator();
-			if (i.hasNext()) {
-				result = i.next();
-			}
-		}
-		return result;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLSchemaValidationChecker.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLSchemaValidationChecker.java
deleted file mode 100644
index e56a3d3..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLSchemaValidationChecker.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * 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.xml.ui.internal.wizards;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-public class XMLSchemaValidationChecker {
-	public boolean isValid(IFile ifile) {
-		String xsdFileName = ifile.getLocation().toString();
-		return isValid(xsdFileName);
-	}
-
-	/**
-	 * Should this be implemented as a Validator and simply called as such
-	 * with a reporter that only checks the results for severity = error? Or
-	 * should the Xerces requirement be broken using a plug-in extension?
-	 */
-
-	public boolean isValid(String xsdFileName) {
-		// DOMASBuilderImpl builder = new DOMASBuilderImpl();
-		// DOMErrorHandler errorHandler = new DOMErrorHandler();
-		// builder.setErrorHandler(errorHandler);
-		try {
-			// String uri =
-			URIHelper.getURIForFilePath(xsdFileName);
-			// ASModel model = builder.parseASURI(uri);
-			// if (errorHandler.hasError())
-			// return false;
-		}
-		catch (Exception e) // invalid schema
-		{
-			return false;
-		}
-
-		return true;
-	}
-
-	// inner class
-	class DOMErrorHandler implements ErrorHandler {
-		private boolean hasError = false;
-
-		public boolean hasError() {
-			return hasError;
-		}
-
-		public void error(SAXParseException err) {
-			hasError = true;
-		}
-
-		public void fatalError(SAXParseException exception) throws SAXException {
-			hasError = true;
-		}
-
-		public void warning(SAXParseException exception) throws SAXException {
-			// not an error
-		}
-	} // end DOMErrorHandlerImpl
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizard.java
deleted file mode 100644
index ffea5d4..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizard.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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.xml.ui.internal.wizards;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-public class XMLWizard {
-	protected static XMLWizard instance = new XMLWizard();
-
-	public synchronized static XMLWizard getInstance() {
-		return instance;
-	}
-
-	public XMLWizard() {
-		instance = this;
-
-	}
-
-	public ImageDescriptor getImageDescriptor(String name) {
-		try {
-			URL url = new URL(Platform.getBundle("org.eclipse.wst.xml.ui").getEntry("/"), name); //$NON-NLS-1$ //$NON-NLS-2$
-			return ImageDescriptor.createFromURL(url);
-		}
-		catch (MalformedURLException e) {
-			return ImageDescriptor.getMissingImageDescriptor();
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizardsMessages.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizardsMessages.java
deleted file mode 100644
index a1e01bb..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizardsMessages.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005, 2007 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 - Initial API and implementation
- * David Carver/STAR Standard - d_a_carver@yahoo.com - bug 192568
- **********************************************************************/
-package org.eclipse.wst.xml.ui.internal.wizards;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by XML Wizards
- * 
- * @plannedfor 1.0
- */
-public class XMLWizardsMessages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.wst.xml.ui.internal.wizards.wizardResource";//$NON-NLS-1$
-
-	public static String _UI_DIALOG_NEW_TITLE;
-	public static String _UI_DIALOG_TITLE_INVALID_GRAMMAR;
-	public static String _UI_DIALOG_MESSAGE_INVALID_GRAMMAR;
-	public static String _UI_WIZARD_CREATE_NEW_TITLE;
-	public static String _UI_RADIO_XML_FROM_DTD;
-	public static String _UI_RADIO_XML_FROM_SCHEMA;
-	public static String _UI_RADIO_XML_FROM_SCRATCH;
-	public static String _UI_WIZARD_CREATE_XML_HEADING;
-	public static String _UI_WIZARD_CREATE_XML_EXPL;
-	public static String _UI_WIZARD_CREATE_XML_FILE_HEADING;
-	public static String _UI_WIZARD_CREATE_XML_FILE_EXPL;
-	public static String _UI_WIZARD_SELECT_DTD_FILE_DESC;
-	public static String _UI_WIZARD_SELECT_DTD_FILE_TITLE;
-	public static String _UI_WIZARD_SELECT_XSD_FILE_DESC;
-	public static String _UI_WIZARD_SELECT_XSD_FILE_TITLE;
-	public static String _UI_WIZARD_SELECT_ROOT_HEADING;
-	public static String _UI_WIZARD_SELECT_ROOT_EXPL;
-	public static String _UI_LABEL_ROOT_ELEMENT;
-	public static String _UI_WARNING_TITLE_NO_ROOT_ELEMENTS;
-	public static String _UI_WARNING_MSG_NO_ROOT_ELEMENTS;
-	public static String _UI_LABEL_NO_LOCATION_HINT;
-	public static String _UI_WARNING_MSG_NO_LOCATION_HINT_1;
-	public static String _UI_WARNING_MSG_NO_LOCATION_HINT_2;
-	public static String _UI_WARNING_MSG_NO_LOCATION_HINT_3;
-	public static String _UI_WIZARD_CONTENT_OPTIONS;
-	public static String _UI_WIZARD_CREATE_REQUIRED;// commented out
-	public static String _UI_WIZARD_CREATE_OPTIONAL;// commented out
-	public static String _UI_WIZARD_CREATE_OPTIONAL_ATTRIBUTES;
-	public static String _UI_WIZARD_CREATE_OPTIONAL_ELEMENTS;
-	public static String _UI_WIZARD_CREATE_FIRST_CHOICE;
-	public static String _UI_WIZARD_FILL_ELEMENTS_AND_ATTRIBUTES;
-	public static String _UI_LABEL_DOCTYPE_INFORMATION;
-	public static String _UI_LABEL_SYSTEM_ID;
-	public static String _UI_LABEL_PUBLIC_ID;
-	public static String _UI_WARNING_URI_NOT_FOUND_COLON;
-	public static String _UI_INVALID_GRAMMAR_ERROR;
-	public static String _ERROR_BAD_FILENAME_EXTENSION;
-	public static String _ERROR_FILE_ALREADY_EXISTS;
-	public static String _ERROR_ROOT_ELEMENT_MUST_BE_SPECIFIED;
-	public static String _UI_LABEL_ERROR_SCHEMA_INVALID_INFO;
-	public static String _UI_LABEL_ERROR_DTD_INVALID_INFO;
-	public static String _UI_LABEL_ERROR_CATALOG_ENTRY_INVALID;
-	public static String _UI_LABEL_NAMESPACE_INFORMATION;
-	public static String Validation_Plugins_Unavailable;
-	public static String Validation_cannot_be_performed;
-	public static String ExampleProjectCreationOperation_op_desc;
-	public static String ExampleProjectCreationOperation_op_desc_proj;
-	public static String ExampleProjectCreationWizard_title;
-	public static String ExampleProjectCreationWizard_op_error_title;
-	public static String ExampleProjectCreationWizard_op_error_message;
-	public static String ExampleProjectCreationWizard_overwritequery_title;
-	public static String ExampleProjectCreationWizard_overwritequery_message;
-	public static String ExampleProjectCreationWizardPage_error_alreadyexists;
-
-	public static String NewXMLTemplatesWizardPage_0;
-	public static String NewXMLTemplatesWizardPage_1;
-	public static String NewXMLTemplatesWizardPage_2;
-	public static String NewXMLTemplatesWizardPage_3;
-	public static String NewXMLTemplatesWizardPage_4;
-	public static String NewXMLTemplatesWizardPage_5;
-	public static String NewXMLTemplatesWizardPage_6;
-	
-	public static String _UI_DIALOG_XMLCATALOG_IMPORT_TITLE;
-	public static String _UI_DIALOG_XMLCATALOG_EXPORT_TITLE;
-	public static String _UI_DIALOG_XMLCATALOG_EXPORT_DESCRIPTION;
-    public static String _UI_DIALOG_XMLCATALOG_IMPORT_DESCRIPTION;
-	static {
-		// load message values from bundle file
-		NLS.initializeMessages(BUNDLE_NAME, XMLWizardsMessages.class);
-	}
-
-	private XMLWizardsMessages() {
-		// cannot create new instance
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties
deleted file mode 100644
index 0bd7bac..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties
+++ /dev/null
@@ -1,99 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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
-#     David Carver/STAR Standard - d_a_carver@yahoo.com - bug 192568
-###############################################################################
-! Properties file for component: XML Tools -  New XML Wizard
-! Packaged for translation in:  xml.zip
-
-!XMLImportActionDelegate
-_UI_DIALOG_NEW_TITLE        = New XML File
-_UI_DIALOG_TITLE_INVALID_GRAMMAR = Invalid Grammar
-_UI_DIALOG_MESSAGE_INVALID_GRAMMAR = The grammar file contains errors. If you proceed, an incorrect result file will be generated. Do you want to continue?
-
-!NewXMLBWizard
-_UI_WIZARD_CREATE_NEW_TITLE           = New XML File
-_UI_RADIO_XML_FROM_DTD                = Create XML file from a &DTD file
-_UI_RADIO_XML_FROM_SCHEMA             = Create XML file from an &XML schema file
-_UI_RADIO_XML_FROM_SCRATCH            = Create XML file from an XML &template
-_UI_WIZARD_CREATE_XML_HEADING         = Create XML File From
-_UI_WIZARD_CREATE_XML_EXPL            = Select how you would like to create your XML file.
-_UI_WIZARD_CREATE_XML_FILE_HEADING    = XML File
-_UI_WIZARD_CREATE_XML_FILE_EXPL       = Create a new XML file.
-_UI_WIZARD_SELECT_DTD_FILE_DESC       = Select the DTD file to create the XML file.
-_UI_WIZARD_SELECT_DTD_FILE_TITLE      = Select DTD File
-_UI_WIZARD_SELECT_XSD_FILE_DESC       = Select the schema file to create the XML file.
-_UI_WIZARD_SELECT_XSD_FILE_TITLE      = Select XML Schema File
-_UI_WIZARD_SELECT_ROOT_HEADING        = Select Root Element
-_UI_WIZARD_SELECT_ROOT_EXPL           = Select the root element of the XML file.
-_UI_LABEL_ROOT_ELEMENT                = Root element:
-_UI_WARNING_TITLE_NO_ROOT_ELEMENTS    = No Root Elements
-_UI_WARNING_MSG_NO_ROOT_ELEMENTS      = No root element exists since the schema provided has no global elements.
-_UI_LABEL_NO_LOCATION_HINT            = Unspecified Namespace Location
-_UI_WARNING_MSG_NO_LOCATION_HINT_1    = You have not specified a location hint for one or more namespace entries.
-_UI_WARNING_MSG_NO_LOCATION_HINT_2    = Elements from these namespaces will not be generated. This may lead to an invalid generated document.
-_UI_WARNING_MSG_NO_LOCATION_HINT_3    = Click Yes to continue, Click No to go back and specify the location hints.
-_UI_WIZARD_CONTENT_OPTIONS            = Content options
-
-_UI_WIZARD_CREATE_REQUIRED            = &Create required content only
-_UI_WIZARD_CREATE_OPTIONAL            = Create required and &optional content
-
-_UI_WIZARD_CREATE_OPTIONAL_ATTRIBUTES = Create optional &attributes
-_UI_WIZARD_CREATE_OPTIONAL_ELEMENTS   = Create optional e&lements
-_UI_WIZARD_CREATE_FIRST_CHOICE        = Create first choice of required &choice
-_UI_WIZARD_FILL_ELEMENTS_AND_ATTRIBUTES = Fill elements and attributes with &data
-
-_UI_LABEL_DOCTYPE_INFORMATION         = Document type information
-_UI_LABEL_SYSTEM_ID                   = &System ID:
-_UI_LABEL_PUBLIC_ID                   = &Public ID:
-
-_UI_WARNING_URI_NOT_FOUND_COLON       = The specified resource cannot be located :
-
-!NewModelWizard
-_UI_INVALID_GRAMMAR_ERROR             = Invalid Grammar
-
-!NewModelWizard
-_ERROR_BAD_FILENAME_EXTENSION         = The file name must end in one of the following extensions {0}.
-_ERROR_FILE_ALREADY_EXISTS            = The same file already exists.
-_ERROR_ROOT_ELEMENT_MUST_BE_SPECIFIED = A root element must be specified.
-_UI_LABEL_ERROR_SCHEMA_INVALID_INFO   = The schema file contains errors. Open it in the XML schema editor for details.
-_UI_LABEL_ERROR_DTD_INVALID_INFO      = The DTD file contains errors. Open it in the DTD editor for details.
-
-_UI_LABEL_ERROR_CATALOG_ENTRY_INVALID = The selected catalog entry specifies a URI that can not be located.
-
-_UI_LABEL_NAMESPACE_INFORMATION=Namespace Information
-
-Validation_Plugins_Unavailable=Validation Plugins Unavailable
-Validation_cannot_be_performed=Validation cannot be performed because the validation plugins were disabled or not found.  The generated file may be invalid.  Do you wish to continue?
-
-!ImportXMLCatalogWizard
-_UI_DIALOG_XMLCATALOG_IMPORT_TITLE    = Import XML Catalog
-_UI_DIALOG_XMLCATALOG_IMPORT_DESCRIPTION = Import all entries from an existing XML Catalog into the User Catalog.
-
-!ExportXMLCatalogWizard
-_UI_DIALOG_XMLCATALOG_EXPORT_TITLE    = Export Existing XML Catalog
-_UI_DIALOG_XMLCATALOG_EXPORT_DESCRIPTION = Export all existing User Catalog entries.
-#
-# ExampleProject
-ExampleProjectCreationOperation_op_desc=Creating example projects...
-ExampleProjectCreationOperation_op_desc_proj=Configuring project...
-ExampleProjectCreationWizard_title=New Example Project
-ExampleProjectCreationWizard_op_error_title=Project Creation Failed
-ExampleProjectCreationWizard_op_error_message=Project could not be created.
-ExampleProjectCreationWizard_overwritequery_title=Overwrite
-ExampleProjectCreationWizard_overwritequery_message=Do you want to overwrite {0}?
-ExampleProjectCreationWizardPage_error_alreadyexists=Project already exists.
-
-NewXMLTemplatesWizardPage_0=Select XML Template
-NewXMLTemplatesWizardPage_1=Select a template as initial content in the XML page.
-NewXMLTemplatesWizardPage_2=Name
-NewXMLTemplatesWizardPage_3=Description
-NewXMLTemplatesWizardPage_4=Use XML Template
-NewXMLTemplatesWizardPage_5=Preview:
-NewXMLTemplatesWizardPage_6=Templates are 'New XML' templates found in the <a>XML Templates</a> preference page.
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextViewerConfigurationXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextViewerConfigurationXML.java
deleted file mode 100644
index b3dd5a7..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextViewerConfigurationXML.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.IAutoEditStrategy;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.formatter.IContentFormatter;
-import org.eclipse.jface.text.formatter.MultiPassContentFormatter;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.wst.sse.core.text.IStructuredPartitions;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.preferences.XMLCorePreferenceNames;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.internal.text.rules.StructuredTextPartitionerForXML;
-import org.eclipse.wst.xml.core.text.IXMLPartitions;
-import org.eclipse.wst.xml.ui.internal.XMLFormattingStrategy;
-import org.eclipse.wst.xml.ui.internal.autoedit.AutoEditStrategyForTabs;
-import org.eclipse.wst.xml.ui.internal.contentassist.NoRegionContentAssistProcessor;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentAssistProcessor;
-import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeLabelProvider;
-import org.eclipse.wst.xml.ui.internal.style.LineStyleProviderForXML;
-import org.w3c.dom.Node;
-
-/**
- * Configuration for a source viewer which shows XML content.
- * <p>
- * Clients can subclass and override just those methods which must be specific
- * to their needs.
- * </p>
- * 
- * @see org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration
- * @since 1.0
- */
-public class StructuredTextViewerConfigurationXML extends StructuredTextViewerConfiguration {
-	/*
-	 * One instance per configuration because not sourceviewer-specific and
-	 * it's a String array
-	 */
-	private String[] fConfiguredContentTypes;
-	/*
-	 * One instance per configuration
-	 */
-	private LineStyleProvider fLineStyleProviderForXML;
-	private ILabelProvider fStatusLineLabelProvider;
-
-	/**
-	 * Create new instance of StructuredTextViewerConfigurationXML
-	 */
-	public StructuredTextViewerConfigurationXML() {
-		// Must have empty constructor to createExecutableExtension
-		super();
-	}
-
-	public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {
-		List allStrategies = new ArrayList(0);
-
-		IAutoEditStrategy[] superStrategies = super.getAutoEditStrategies(sourceViewer, contentType);
-		for (int i = 0; i < superStrategies.length; i++) {
-			allStrategies.add(superStrategies[i]);
-		}
-
-		// be sure this is last, so it can modify any results form previous
-		// commands that might on on same partiion type.
-		// add auto edit strategy that handles when tab key is pressed
-		allStrategies.add(new AutoEditStrategyForTabs());
-
-		return (IAutoEditStrategy[]) allStrategies.toArray(new IAutoEditStrategy[allStrategies.size()]);
-	}
-
-	public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
-
-		if (fConfiguredContentTypes == null) {
-			String[] xmlTypes = StructuredTextPartitionerForXML.getConfiguredContentTypes();
-			fConfiguredContentTypes = new String[xmlTypes.length + 2];
-			fConfiguredContentTypes[0] = IStructuredPartitions.DEFAULT_PARTITION;
-			fConfiguredContentTypes[1] = IStructuredPartitions.UNKNOWN_PARTITION;
-			int index = 0;
-			System.arraycopy(xmlTypes, 0, fConfiguredContentTypes, index += 2, xmlTypes.length);
-		}
-		return fConfiguredContentTypes;
-	}
-
-	protected IContentAssistProcessor[] getContentAssistProcessors(ISourceViewer sourceViewer, String partitionType) {
-		IContentAssistProcessor[] processors = null;
-
-		if ((partitionType == IStructuredPartitions.DEFAULT_PARTITION) || (partitionType == IXMLPartitions.XML_DEFAULT)) {
-			processors = new IContentAssistProcessor[]{new XMLContentAssistProcessor()};
-		}
-		else if (partitionType == IStructuredPartitions.UNKNOWN_PARTITION) {
-			processors = new IContentAssistProcessor[]{new NoRegionContentAssistProcessor()};
-		}
-
-		return processors;
-	}
-
-	public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
-		IContentFormatter formatter = super.getContentFormatter(sourceViewer);
-		// super was unable to create a formatter, probably because
-		// sourceViewer does not have document set yet, so just create a
-		// generic one
-		if (!(formatter instanceof MultiPassContentFormatter))
-			formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), IXMLPartitions.XML_DEFAULT);
-		((MultiPassContentFormatter) formatter).setMasterStrategy(new XMLFormattingStrategy());		
-//		((MultiPassContentFormatter) formatter).setMasterStrategy(new StructuredFormattingStrategy(new FormatProcessorXML()));
-
-		return formatter;
-	}
-
-	public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType) {
-		Vector vector = new Vector();
-
-		// prefix[0] is either '\t' or ' ' x tabWidth, depending on preference
-		Preferences preferences = XMLCorePlugin.getDefault().getPluginPreferences();
-		int indentationWidth = preferences.getInt(XMLCorePreferenceNames.INDENTATION_SIZE);
-		String indentCharPref = preferences.getString(XMLCorePreferenceNames.INDENTATION_CHAR);
-		boolean useSpaces = XMLCorePreferenceNames.SPACE.equals(indentCharPref);
-
-		for (int i = 0; i <= indentationWidth; i++) {
-			StringBuffer prefix = new StringBuffer();
-			boolean appendTab = false;
-
-			if (useSpaces) {
-				for (int j = 0; j + i < indentationWidth; j++) {
-					prefix.append(' ');
-				}
-
-				if (i != 0) {
-					appendTab = true;
-				}
-			}
-			else {
-				for (int j = 0; j < i; j++) {
-					prefix.append(' ');
-				}
-
-				if (i != indentationWidth) {
-					appendTab = true;
-				}
-			}
-
-			if (appendTab) {
-				prefix.append('\t');
-				vector.add(prefix.toString());
-				// remove the tab so that indentation - tab is also an indent
-				// prefix
-				prefix.deleteCharAt(prefix.length() - 1);
-			}
-			vector.add(prefix.toString());
-		}
-
-		vector.add(""); //$NON-NLS-1$
-
-		return (String[]) vector.toArray(new String[vector.size()]);
-	}
-
-	public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
-		LineStyleProvider[] providers = null;
-
-		if ((partitionType == IXMLPartitions.XML_DEFAULT) || (partitionType == IXMLPartitions.XML_CDATA) || (partitionType == IXMLPartitions.XML_COMMENT) || (partitionType == IXMLPartitions.XML_DECLARATION) || (partitionType == IXMLPartitions.XML_PI)) {
-			providers = new LineStyleProvider[]{getLineStyleProviderForXML()};
-		}
-
-		return providers;
-	}
-
-	private LineStyleProvider getLineStyleProviderForXML() {
-		if (fLineStyleProviderForXML == null) {
-			fLineStyleProviderForXML = new LineStyleProviderForXML();
-		}
-		return fLineStyleProviderForXML;
-	}
-
-	public ILabelProvider getStatusLineLabelProvider(ISourceViewer sourceViewer) {
-		if (fStatusLineLabelProvider == null) {
-			fStatusLineLabelProvider = new JFaceNodeLabelProvider() {
-				public String getText(Object element) {
-					if (element == null)
-						return null;
-
-					StringBuffer s = new StringBuffer();
-					Node node = (Node) element;
-					while (node != null) {
-						if (node.getNodeType() != Node.DOCUMENT_NODE) {
-							s.insert(0, super.getText(node));
-						}
-						node = node.getParentNode();
-						if (node != null && node.getNodeType() != Node.DOCUMENT_NODE) {
-							s.insert(0, IPath.SEPARATOR);
-						}
-					}
-					return s.toString();
-				}
-
-			};
-		}
-		return fStatusLineLabelProvider;
-	}
-
-	protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer) {
-		Map targets = super.getHyperlinkDetectorTargets(sourceViewer);
-		targets.put(ContentTypeIdForXML.ContentTypeID_XML, null);
-		return targets;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/DOMObserver.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/DOMObserver.java
deleted file mode 100644
index f799a6a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/DOMObserver.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.CMDocumentLoader;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.InferredGrammarBuildingCMDocumentLoader;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * This class is used to observe changes in the DOM and perform
- * occasional'scans' to deduce information. We use a delay timer mechanism to
- * ensure scans are made every couple of seconds to avoid performance
- * problems. Currently this class is used to keep track of referenced grammar
- * uri's within the document ensure that they are loaded by the
- * CMDocumentManager. We might want to generalize this class to perform other
- * suplimental information gathering that is suitable for 'time delayed'
- * computation (error hints etc.).
- */
-// TODO: Where should this class go?
-public class DOMObserver {
-
-
-	// An abstract adapter that ensures that the children of a new Node are
-	// also adapted
-	//
-	abstract class DocumentAdapter implements INodeAdapter {
-		public DocumentAdapter() {
-		}
-
-		public void connect(Document document) {
-			((INodeNotifier) document).addAdapter(this);
-			adapt(document.getDocumentElement());
-		}
-
-		public void dicconnect(Document document) {
-			((INodeNotifier) document).removeAdapter(this);
-		}
-
-		public void adapt(Element element) {
-			if (element != null) {
-				if (((INodeNotifier) element).getExistingAdapter(this) == null) {
-					((INodeNotifier) element).addAdapter(this);
-
-					for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) {
-						if (child.getNodeType() == Node.ELEMENT_NODE) {
-							adapt((Element) child);
-						}
-					}
-				}
-			}
-		}
-
-		public boolean isAdapterForType(Object type) {
-			return type == this;
-		}
-
-		abstract public void notifyChanged(INodeNotifier notifier, int eventType, Object feature, Object oldValue, Object newValue, int index);
-	}
-
-	/**
-	 * This class listens to the changes in the CMDocument and triggers a
-	 * CMDocument load
-	 */
-	class MyDocumentAdapter extends DocumentAdapter {
-
-		public void notifyChanged(INodeNotifier notifier, int eventType, Object feature, Object oldValue, Object newValue, int index) {
-			switch (eventType) {
-				case INodeNotifier.ADD : {
-					if (newValue instanceof Element) {
-						// System.out.println("ADD (to " +
-						// ((Node)notifier).getNodeName() + ") " +
-						// ((Element)newValue).getNodeName() + " old " +
-						// oldValue);
-						adapt((Element) newValue);
-					}
-					break;
-				}
-					// case INodeNotifier.REMOVE:
-				case INodeNotifier.CHANGE :
-				case INodeNotifier.STRUCTURE_CHANGED :
-				case INodeNotifier.CONTENT_CHANGED : {
-					Node node = (Node) notifier;
-					if (node.getNodeType() == Node.ELEMENT_NODE) {
-						switch (eventType) {
-							case INodeNotifier.CHANGE :
-							case INodeNotifier.STRUCTURE_CHANGED : {
-								// structure change
-								invokeDelayedCMDocumentLoad();
-								break;
-							}
-							case INodeNotifier.CONTENT_CHANGED : {
-								// some content changed
-								break;
-							}
-						}
-					}
-					else if (node.getNodeType() == Node.DOCUMENT_NODE) {
-						invokeDelayedCMDocumentLoad();
-					}
-					break;
-				}
-			}
-		}
-	}
-
-	/**
-	 * Intentionally left visible to the user
-	 */
-	class TimerJob extends Job {
-		public TimerJob() {
-			super(SSEUIMessages.LoadingReferencedGrammars);
-			setPriority(Job.SHORT);
-		}
-
-		public IStatus run(IProgressMonitor monitor) {
-			monitor.beginTask("", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
-			invokeCMDocumentLoad();
-			monitor.done();
-			return Status.OK_STATUS;
-		}
-	}
-
-	private Job timer = new TimerJob();
-	protected Document fDocument;
-	protected boolean isGrammarInferenceEnabled;
-
-	public DOMObserver(IStructuredModel model) {
-		fDocument = (model instanceof IDOMModel) ? ((IDOMModel) model).getDocument() : null;
-
-		if (fDocument != null) {
-			// here we create and init an adapter that will listen to
-			// changes to the document and contained elements
-			MyDocumentAdapter adapter = new MyDocumentAdapter();
-			adapter.connect(fDocument);
-
-			ModelQuery modelQuery = ModelQueryUtil.getModelQuery(fDocument);
-			if ((modelQuery != null) && (modelQuery.getCMDocumentManager() != null)) {
-				CMDocumentManager cmDocumentManager = modelQuery.getCMDocumentManager();
-				cmDocumentManager.setPropertyEnabled(CMDocumentManager.PROPERTY_AUTO_LOAD, false);
-			}
-		}
-	}
-
-	public void init() {
-		// CS: we seem to expose an XSD initialization problem when we do this
-		// immediately
-		// very nasty... I need to revist this problem with Ed Merks
-		//
-		// invokeCMDocumentLoad();
-		invokeDelayedCMDocumentLoad();
-	}
-
-	public void invokeCMDocumentLoad() {
-		ModelQuery modelQuery = ModelQueryUtil.getModelQuery(fDocument);
-		if ((modelQuery != null) && (modelQuery.getCMDocumentManager() != null)) {
-			CMDocumentLoader loader = isGrammarInferenceEnabled ? new InferredGrammarBuildingCMDocumentLoader(fDocument, modelQuery) : new CMDocumentLoader(fDocument, modelQuery);
-			loader.loadCMDocuments();
-		}
-	}
-
-	public void invokeDelayedCMDocumentLoad() {
-		timer.schedule(2000);
-	}
-
-	public void setGrammarInferenceEnabled(boolean isEnabled) {
-		isGrammarInferenceEnabled = isEnabled;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java
deleted file mode 100644
index b460f6d..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005, 2008 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 - Initial API and implementation
- * Benjamin Muskalla, b.muskalla@gmx.net - [158660] character entities should have their own syntax highlighting preference
- * David Carver - STAR - [205989] - [validation] validate XML after XInclude resolution
- **********************************************************************/
-package org.eclipse.wst.xml.ui.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by XML UI
- * 
- * @plannedfor 1.0
- */
-public class XMLUIMessages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.wst.xml.ui.internal.XMLUIPluginResources";//$NON-NLS-1$
-	private static ResourceBundle fResourceBundle;
-
-	public static String Sample_XML_doc;
-	public static String Comment_Delimiters_UI_;
-	public static String Comment_Content_UI_;
-	public static String Tag_Delimiters_UI_;
-	public static String Tag_Names_UI_;
-	public static String Attribute_Names_UI_;
-	public static String Attribute_Values_UI_;
-	public static String Declaration_Delimiters_UI_;
-	public static String Content_UI_;
-	public static String CDATA_Delimiters_UI_;
-	public static String CDATA_Content_UI_;
-	public static String Processing_Instruction_Del_UI_;
-	public static String Processing_Instruction_Con_UI__UI_;
-	public static String DOCTYPE_Name_UI_;
-	public static String DOCTYPE_SYSTEM_PUBLIC_Keyw_UI_;
-	public static String DOCTYPE_Public_Reference_UI_;
-	public static String DOCTYPE_System_Reference_UI_;
-	public static String Entity_Reference_UI_;
-	public static String DELETE;
-	public static String ADD_PROCESSING_INSTRUCTION;
-	public static String _UI_MENU_ADD_AFTER;
-	public static String _UI_MENU_ADD_ATTRIBUTE;
-	public static String _UI_MENU_ADD_BEFORE;
-	public static String _UI_MENU_ADD_CHILD;
-	public static String _UI_MENU_REMOVE;
-	public static String _UI_MENU_REPLACE_WITH;
-	public static String _UI_MENU_EDIT_DOCTYPE;
-	public static String _UI_LABEL_UNDO_REPLACE_DESCRIPTION;
-	public static String _UI_LABEL_EDIT_DOCTYPE;
-	public static String _UI_INFO_EXPAND_ALL;
-	public static String _UI_INFO_COLLAPSE_ALL;
-	public static String _UI_MENU_ADD_DTD_INFORMATION;
-	public static String _UI_MENU_ADD_SCHEMA_INFORMATION;
-	public static String _UI_MENU_EDIT_PROCESSING_INSTRUCTION;
-	public static String _UI_MENU_EDIT_NAMESPACES;
-	public static String _UI_MENU_ADD_DTD_INFORMATION_TITLE;
-	public static String _UI_MENU_EDIT_PROCESSING_INSTRUCTION_TITLE;
-	public static String _UI_MENU_EDIT_SCHEMA_INFORMATION_TITLE;
-	public static String _UI_MENU_NEW_ATTRIBUTE;
-	public static String _UI_MENU_NEW_ATTRIBUTE_TITLE;
-	public static String _UI_MENU_EDIT_ATTRIBUTE;
-	public static String _UI_MENU_EDIT_ATTRIBUTE_TITLE;
-	public static String _UI_MENU_NEW_ELEMENT;
-	public static String _UI_MENU_NEW_ELEMENT_TITLE;
-	public static String _UI_MENU_RENAME;
-	public static String _UI_MENU_RENAME_TITLE;
-	public static String _UI_LABEL_ELEMENT_NAME;
-	public static String _UI_MENU_ADD_COMMENT;
-	public static String _UI_MENU_ADD_PROCESSING_INSTRUCTION;
-	public static String _UI_MENU_ADD_CDATA_SECTION;
-	public static String _UI_MENU_ADD_PCDATA;
-	public static String _UI_MENU_COMMENT;
-	public static String _UI_MENU_PROCESSING_INSTRUCTION;
-	public static String _UI_MENU_CDATA_SECTION;
-	public static String _UI_MENU_PCDATA;
-	public static String _UI_MENU_ADD;
-	public static String _UI_COMMENT_VALUE;
-	public static String _UI_PI_TARGET_VALUE;
-	public static String _UI_PI_DATA_VALUE;
-	public static String _UI_LABEL_ROOT_ELEMENT_VALUE;
-	public static String _UI_LABEL_TARGET_COLON;
-	public static String _UI_LABEL_DATA_COLON;
-	public static String _UI_LABEL_ROOT_ELEMENT_NAME_COLON;
-	public static String _UI_LABEL_PUBLIC_ID_COLON;
-	public static String _UI_LABEL_SYSTEM_ID_COLON;
-	public static String _UI_LABEL_BROWSE;
-	public static String _UI_LABEL_SELECT_XML_CATALOG_ENTRY;
-	public static String _UI_LABEL_SPECIFY_SYSTEM_ID;
-	public static String _UI_LABEL_SELECT_FILE;
-	public static String _UI_LABEL_KEY;
-	public static String _UI_LABEL_URI;
-	public static String _UI_LABEL_XML_CATALOG_COLON;
-	public static String _UI_LABEL_NAMESPACE_NAME;
-	public static String _UI_LABEL_LOCATION_HINT;
-	public static String _UI_LABEL_PREFIX;
-	public static String _UI_LABEL_NAMESPACE_NAME_COLON;
-	public static String _UI_LABEL_LOCATION_HINT_COLON;
-	public static String _UI_LABEL_PREFIX_COLON;
-	public static String _UI_NO_NAMESPACE_NAME;
-	public static String _UI_NO_PREFIX;
-	public static String _UI_LABEL_XML_SCHEMA_INFORMATION;
-	public static String _UI_LABEL_NAME_COLON;
-	public static String _UI_LABEL_VALUE_COLON;
-	public static String _UI_BUTTON_DELETE;
-	public static String _UI_BUTTON_NEW;
-	public static String _UI_BUTTON_EDIT;
-	public static String _UI_LABEL_NEW_NAMESPACE_INFORMATION;
-	public static String _UI_RADIO_BUTTON_SELECT_FROM_WORKSPACE;
-	public static String _UI_RADIO_BUTTON_SELECT_FROM_CATALOG;
-	public static String _UI_WARNING_MORE_THAN_ONE_NS_WITH_NAME;
-	public static String _UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_NAME;
-	public static String _UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_PREFIX;
-	public static String _UI_WARNING_MORE_THAN_ONE_NS_WITH_PREFIX;
-	public static String _UI_WARNING_SCHEMA_CAN_NOT_BE_LOCATED;
-	public static String _UI_WARNING_LOCATION_HINT_NOT_SPECIFIED;
-	public static String _UI_WARNING_NAMESPACE_NAME_NOT_SPECIFIED;
-	public static String _UI_WARNING_PREFIX_NOT_SPECIFIED;
-	public static String _UI_WARNING_ROOT_ELEMENT_MUST_BE_SPECIFIED;
-	public static String _UI_WARNING_SYSTEM_ID_MUST_BE_SPECIFIED;
-	public static String _UI_INVALID_NAME;
-	public static String _UI_ENTER_REQ_PREFIX_AND_NAMESPACE;
-	public static String _UI_SELECT_REGISTERED_NAMESPACES;
-	public static String _UI_SPECIFY_NEW_NAMESPACE;
-	public static String _UI_SELECT_NAMESPACE_TO_ADD;
-	public static String _UI_ADD_NAMESPACE_DECLARATIONS;
-	public static String _UI_NAMESPACE_DECLARATIONS;
-	public static String _UI_TARGET_NAMESPACE;
-	public static String _ERROR_XML_ATTRIBUTE_ALREADY_EXISTS;
-	public static String error_message_goes_here;
-	public static String SurroundWithNewElementQuickAssistProposal_0;
-	public static String SurroundWithNewElementQuickAssistProposal_1;
-	public static String RenameInFileQuickAssistProposal_0;
-	public static String RenameInFileQuickAssistProposal_1;
-	public static String InsertRequiredAttrsQuickAssistProposal_0;
-	public static String InsertRequiredAttrsQuickAssistProposal_1;
-	public static String EncodingSettings_0;
-	public static String EncodingSettings_1;
-	public static String DragNodeCommand_0;
-	public static String DragNodeCommand_1;
-	public static String CommonEditNamespacesDialog_0;
-	public static String JFaceNodeAdapter_1;
-	public static String QuickFixProcessorXML_0;
-	public static String QuickFixProcessorXML_1;
-	public static String QuickFixProcessorXML_2;
-	public static String QuickFixProcessorXML_3;
-	public static String QuickFixProcessorXML_4;
-	public static String QuickFixProcessorXML_5;
-	public static String QuickFixProcessorXML_6;
-	public static String QuickFixProcessorXML_7;
-	public static String QuickFixProcessorXML_8;
-	public static String QuickFixProcessorXML_9;
-	public static String QuickFixProcessorXML_10;
-	public static String QuickFixProcessorXML_11;
-	public static String QuickFixProcessorXML_12;
-	public static String QuickFixProcessorXML_13;
-	public static String QuickFixProcessorXML_14;
-	public static String QuickFixProcessorXML_15;
-	public static String XMLPropertySourceAdapter_0;
-	public static String WorkbenchDefaultEncodingSettings_0;
-	public static String refreshoutline_0;
-	public static String Creating_files_encoding;
-	public static String End_tag_has_attributes;
-	public static String Attribute__is_missing_a_value;
-	public static String Attribute__has_no_value;
-	public static String Missing_end_tag_;
-	public static String ReconcileStepForMarkup_0;
-	public static String ReconcileStepForMarkup_1;
-	public static String ReconcileStepForMarkup_2;
-	public static String ReconcileStepForMarkup_3;
-	public static String ReconcileStepForMarkup_4;
-	public static String ReconcileStepForMarkup_5;
-	public static String ReconcileStepForMarkup_6;
-	public static String End_with_;
-	public static String SEVERE_internal_error_occu_UI_;
-	public static String No_known_attribute__UI_;
-	public static String Content_Assist_not_availab_UI_;
-	public static String Element__is_unknown;
-	public static String Comment__;
-	public static String Close_with__;
-	public static String End_with__;
-	public static String Close_with___;
-	public static String Close_with____;
-	public static String _Has_no_available_child;
-	public static String No_known_child_tag;
-	public static String __Has_no_known_child;
-	public static String No_known_child_tag_names;
-	public static String The_document_element__;
-	public static String No_definition_for_in;
-	public static String No_definition_for;
-	public static String No_content_model_for;
-	public static String No_content_model_found_UI_;
-	public static String Cleanup_UI_;
-	public static String Compress_empty_element_tags_UI_;
-	public static String Insert_required_attributes_UI_;
-	public static String Insert_missing_tags_UI_;
-	public static String Quote_attribute_values_UI_;
-	public static String Format_source_UI_;
-	public static String Convert_EOL_codes_UI_;
-	public static String EOL_Windows_UI;
-	public static String EOL_Unix_UI;
-	public static String EOL_Mac_UI;
-	public static String Creating_files;
-	public static String Encoding_desc;
-	public static String Encoding;
-	public static String Creating_or_saving_files;
-	public static String End_of_line_code_desc;
-	public static String End_of_line_code;
-	public static String EOL_Windows;
-	public static String EOL_Unix;
-	public static String EOL_Mac;
-	public static String EOL_NoTranslation;
-	public static String XMLFilesPreferencePage_ExtensionLabel;
-	public static String XMLFilesPreferencePage_ExtensionError;
-	public static String Content_assist_UI_;
-	public static String Automatically_make_suggest_UI_;
-	public static String Prompt_when_these_characte_UI_;
-	public static String Formatting_UI_;
-	public static String Line_width__UI_;
-	public static String Split_multiple_attributes;
-	public static String Align_final_bracket;
-	public static String Preserve_PCDATA_Content;
-	public static String Space_before_empty_close_tag;
-	public static String Indent_using_tabs;
-	public static String Indent_using_spaces;
-	public static String Indentation_size;
-	public static String Indentation_size_tip;
-	public static String Clear_all_blank_lines_UI_;
-	public static String Grammar_Constraints;
-	public static String Use_inferred_grammar_in_absence_of;
-	public static String Suggestion_Strategy;
-	public static String Suggestion_Strategy_Lax;
-	public static String Suggestion_Strategy_Strict;
-	public static String Element____1;
-	public static String Content_Model____2;
-	public static String Attribute____3;
-	public static String Data_Type____4;
-	public static String Enumerated_Values____5;
-	public static String SourceMenu_label;
-	public static String Comment_label; // Resource bundle
-	public static String Comment_tooltip; // Resource bundle
-	public static String Comment_description; // Resource bundle
-	public static String Uncomment_label; // Resource bundle
-	public static String Uncomment_tooltip; // Resource bundle
-	public static String Uncomment_description; // Resource bundle
-	public static String ToggleComment_label; // Resource bundle
-	public static String ToggleComment_tooltip; // Resource bundle
-	public static String ToggleComment_description; // Resource bundle
-	public static String AddBlockComment_label; // Resource bundle
-	public static String AddBlockComment_tooltip; // Resource bundle
-	public static String AddBlockComment_description; // Resource bundle
-	public static String RemoveBlockComment_label; // Resource bundle
-	public static String RemoveBlockComment_tooltip; // Resource bundle
-	public static String RemoveBlockComment_description; // Resource bundle
-	public static String CleanupDocument_label; // Resource bundle
-	public static String CleanupDocument_tooltip; // Resource bundle
-	public static String CleanupDocument_description; // Resource bundle
-	public static String FindOccurrences_label; // Resource bundle
-	public static String OpenFileFromSource_label; // Resource bundle
-	public static String OpenFileFromSource_tooltip; // Resource bundle
-	public static String OpenFileFromSource_description; // Resource bundle
-	public static String XMLContentOutlineConfiguration_0;
-	public static String XMLTyping_Auto_Complete;
-	public static String XMLTyping_Auto_Remove;
-	public static String XMLTyping_Complete_Comments;
-	public static String XMLTyping_Complete_End_Tags;
-	public static String XMLTyping_Remove_End_Tags;
-	public static String StructureSelectEnclosing_label;
-	public static String StructureSelectEnclosing_tooltip;
-	public static String StructureSelectEnclosing_description;
-	public static String StructureSelectNext_label;
-	public static String StructureSelectNext_tooltip;
-	public static String StructureSelectNext_description;
-	public static String StructureSelectPrevious_label;
-	public static String StructureSelectPrevious_tooltip;
-	public static String StructureSelectPrevious_description;
-	public static String MESSAGE_XML_VALIDATION_MESSAGE_UI_;
-	public static String Indicate_no_grammar_specified;
-	public static String Indicate_no_grammar_specified_severities;
-	public static String Validating_files;
-	public static String SyntaxColoringPage_0;
-	public static String SyntaxColoringPage_2;
-	public static String SyntaxColoringPage_3;
-	public static String SyntaxColoringPage_4;
-	public static String SyntaxColoringPage_5;
-	public static String SyntaxColoringPage_6;
-	public static String EmptyFilePreferencePage_0;
-	public static String _UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK;
-	public static String gotoMatchingTag_label;
-	public static String gotoMatchingTag_description;
-	public static String nextSibling_label;
-	public static String nextSibling_description;
-	public static String previousSibling_label;
-	public static String previousSibling_description;
-	public static String Use_XInclude;
-
-
-	static {
-		// load message values from bundle file
-		NLS.initializeMessages(BUNDLE_NAME, XMLUIMessages.class);
-	}
-
-	private XMLUIMessages() {
-		// cannot create new instance
-	}
-
-	public static ResourceBundle getResourceBundle() {
-		try {
-			if (fResourceBundle == null) {
-				fResourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
-			}
-		}
-		catch (MissingResourceException x) {
-			fResourceBundle = null;
-		}
-		return fResourceBundle;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java
deleted file mode 100644
index fe8f171..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal;
-
-import java.io.IOException;
-
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
-import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistry;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistryImpl;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLUIPreferenceNames;
-import org.eclipse.wst.xml.ui.internal.templates.TemplateContextTypeIdsXML;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class XMLUIPlugin extends AbstractUIPlugin {
-	public final static String ID = "org.eclipse.wst.xml.ui"; //$NON-NLS-1$
-
-	protected static XMLUIPlugin instance = null;
-
-	public static XMLUIPlugin getDefault() {
-		return instance;
-	}
-
-	public synchronized static XMLUIPlugin getInstance() {
-		return instance;
-	}
-
-	/**
-	 * The template context type registry for the xml editor.
-	 */
-	private ContextTypeRegistry fContextTypeRegistry;
-
-	/**
-	 * The template store for the xml editor.
-	 * 
-	 */
-	private TemplateStore fTemplateStore;
-
-	public XMLUIPlugin() {
-		super();
-		instance = this;
-	}
-
-	public AdapterFactoryRegistry getAdapterFactoryRegistry() {
-		return AdapterFactoryRegistryImpl.getInstance();
-
-	}
-
-	/**
-	 * Returns the template store for the xml editor templates.
-	 * 
-	 * @return the template store for the xml editor templates
-	 */
-	public TemplateStore getTemplateStore() {
-		if (fTemplateStore == null) {
-			fTemplateStore = new ContributionTemplateStore(getTemplateContextRegistry(), getPreferenceStore(), XMLUIPreferenceNames.TEMPLATES_KEY);
-
-			try {
-				fTemplateStore.load();
-			}
-			catch (IOException e) {
-				Logger.logException(e);
-			}
-		}
-		return fTemplateStore;
-	}
-
-	/**
-	 * Returns the template context type registry for the xml plugin.
-	 * 
-	 * @return the template context type registry for the xml plugin
-	 */
-	public ContextTypeRegistry getTemplateContextRegistry() {
-		if (fContextTypeRegistry == null) {
-			ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
-			registry.addContextType(TemplateContextTypeIdsXML.ALL);
-			registry.addContextType(TemplateContextTypeIdsXML.NEW);
-			registry.addContextType(TemplateContextTypeIdsXML.TAG);
-			registry.addContextType(TemplateContextTypeIdsXML.ATTRIBUTE);
-			registry.addContextType(TemplateContextTypeIdsXML.ATTRIBUTE_VALUE);
-
-			fContextTypeRegistry = registry;
-		}
-
-		return fContextTypeRegistry;
-	}
-
-	/**
-	 * Get an image from the registry.
-	 * 
-	 * *This method is used by the referencingfile dialog and should be
-	 * removed when the dialog is moved to anothercomponent.
-	 * 
-	 * @param imageName
-	 *            The name of the image.
-	 * @return The image registered for the given name.
-	 */
-	public Image getImage(String imageName) {
-		return getWorkbench().getSharedImages().getImage(imageName);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
deleted file mode 100644
index e44d9aa..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
+++ /dev/null
@@ -1,331 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2008 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
-#     Jens Lukowski/Innoopract - initial renaming/restructuring
-#     Benjamin Muskalla, b.muskalla@gmx.net - [158660] character entities should have their own syntax highlighting preference
-#     David Carver - STAR - [205989] - [validation] validate XML after XInclude resolution
-###############################################################################
-## The following line is a sample XML document.  Please translate only the following parts:
-## begin color definitions
-## Normal text content.
-Sample_XML_doc=<?xml version=\"1.0\"?>\n<?customProcessingInstruction\n\tXML processor specific\n\tcontent ?>\n<!DOCTYPE colors\n\tPUBLIC \"//IBM/XML/COLORS/\" \"colors.dtd\">\n<colors>\n\t<!-- begin color definitions -->\n\t<color name=\"plaintext\" foreground=\"#000000\"\n\t\tbackground=\"#D4D0C8\" />\n\t<color name=\"bold\" foreground=\"#000000\"\n\t\tbackground=\"#B3ACA0\" />\n\t<![CDATA[<123456789>]]>\n\tNormal text content.\n\t===&gt;look at me!&lt;===\n\t<color name=\"inverse\" foreground=\"#F0F0F0\"\n\t\tbackground=\"#D4D0C8\" />\n\n</colors>\n
-Comment_Delimiters_UI_=Comment Delimiters
-Comment_Content_UI_=Comment Content
-Tag_Delimiters_UI_=Tag Delimiters
-Tag_Names_UI_=Tag Names
-Attribute_Names_UI_=Attribute Names
-Attribute_Values_UI_=Attribute Values
-Declaration_Delimiters_UI_=Declaration Delimiters
-Content_UI_=Content
-Entity_Reference_UI_=Entity References
-## on the following 2 lines, do not translate CDATA
-CDATA_Delimiters_UI_=CDATA Delimiters
-CDATA_Content_UI_=CDATA Content
-Processing_Instruction_Del_UI_=Processing Instruction Delimiters
-Processing_Instruction_Con_UI__UI_=Processing Instruction Content
-## on the following line solely translate:  Name
-DOCTYPE_Name_UI_=DOCTYPE Name
-## on the following line solely translate:  Keyword
-DOCTYPE_SYSTEM_PUBLIC_Keyw_UI_=DOCTYPE SYSTEM/PUBLIC Keyword
-## on the following line solely translate:  Public Reference
-DOCTYPE_Public_Reference_UI_=DOCTYPE Public Reference
-## on the following line solely translate:  System Reference
-DOCTYPE_System_Reference_UI_=DOCTYPE System Reference
-# XML Common UI
-# Constants for strings
-
-DELETE=Remove
-ADD_PROCESSING_INSTRUCTION=Add Processing Instruction
-
-_UI_MENU_ADD_AFTER=Add &After
-_UI_MENU_ADD_ATTRIBUTE=Add A&ttribute
-_UI_MENU_ADD_BEFORE=Add &Before
-_UI_MENU_ADD_CHILD=Add &Child
-_UI_MENU_REMOVE=Re&move
-_UI_MENU_REPLACE_WITH=Re&place With
-_UI_MENU_EDIT_DOCTYPE=Edit DOCTYPE...
-_UI_LABEL_UNDO_REPLACE_DESCRIPTION=Replace
-_UI_LABEL_EDIT_DOCTYPE=Edit DOCTYPE
-_UI_INFO_EXPAND_ALL=Expand All
-_UI_INFO_COLLAPSE_ALL=Collapse All
-
-_UI_MENU_ADD_DTD_INFORMATION=Add DTD Information...
-_UI_MENU_ADD_SCHEMA_INFORMATION=Add Schema Information...
-_UI_MENU_EDIT_PROCESSING_INSTRUCTION=Edit Process&ing Instruction...
-_UI_MENU_EDIT_NAMESPACES=Edit &Namespaces...
-
-_UI_MENU_ADD_DTD_INFORMATION_TITLE=Add DTD Information
-_UI_MENU_EDIT_PROCESSING_INSTRUCTION_TITLE=Edit Processing Instruction
-_UI_MENU_EDIT_SCHEMA_INFORMATION_TITLE=Edit Schema Information
-
-_UI_MENU_NEW_ATTRIBUTE=&New Attribute...
-_UI_MENU_NEW_ATTRIBUTE_TITLE=New Attribute
-_UI_MENU_EDIT_ATTRIBUTE=Edit Attribute...
-_UI_MENU_EDIT_ATTRIBUTE_TITLE=Edit Attribute
-_UI_MENU_NEW_ELEMENT=New &Element...
-_UI_MENU_NEW_ELEMENT_TITLE=New Element
-_UI_MENU_RENAME=R&ename
-_UI_MENU_RENAME_TITLE=Rename
-_UI_LABEL_ELEMENT_NAME=Element name:
-
-_UI_MENU_ADD_COMMENT=Add Comment
-_UI_MENU_ADD_PROCESSING_INSTRUCTION=Add Processing Instruction
-_UI_MENU_ADD_CDATA_SECTION=Add CDATA Section
-_UI_MENU_ADD_PCDATA=Add #PCDATA;
-
-_UI_MENU_COMMENT=C&omment
-_UI_MENU_PROCESSING_INSTRUCTION=P&rocessing Instruction
-_UI_MENU_CDATA_SECTION=CDATA Section
-_UI_MENU_PCDATA=#PC&DATA;
-
-_UI_MENU_ADD=Add
-
-_UI_COMMENT_VALUE=comment
-_UI_PI_TARGET_VALUE=target
-_UI_PI_DATA_VALUE=data
-_UI_LABEL_ROOT_ELEMENT_VALUE=RootElement
-
-_UI_LABEL_TARGET_COLON=Target:
-_UI_LABEL_DATA_COLON=Data:
-_UI_LABEL_ROOT_ELEMENT_NAME_COLON=Root element name:
-_UI_LABEL_PUBLIC_ID_COLON=Public ID:
-_UI_LABEL_SYSTEM_ID_COLON=System ID:
-_UI_LABEL_BROWSE=Browse...
-_UI_LABEL_SELECT_XML_CATALOG_ENTRY=Select XML Catalog Entry
-_UI_LABEL_SPECIFY_SYSTEM_ID=Specify System ID
-_UI_LABEL_SELECT_FILE=Select File
-
-_UI_LABEL_KEY=Key
-_UI_LABEL_URI=URI:
-_UI_LABEL_XML_CATALOG_COLON=XML Catalog
-_UI_LABEL_NAMESPACE_NAME=Namespace Name
-_UI_LABEL_LOCATION_HINT=Location Hint
-_UI_LABEL_PREFIX=Prefix
-_UI_LABEL_NAMESPACE_NAME_COLON=Namespace Name:
-_UI_LABEL_LOCATION_HINT_COLON=Location Hint:
-_UI_LABEL_PREFIX_COLON=Prefix:
-_UI_NO_NAMESPACE_NAME=<no namespace name>
-_UI_NO_PREFIX=<no prefix>
-
-_UI_LABEL_XML_SCHEMA_INFORMATION=XML Schema Information
-
-_UI_LABEL_NAME_COLON=Name:
-_UI_LABEL_VALUE_COLON=Value:
-
-_UI_BUTTON_DELETE=Delete
-_UI_BUTTON_NEW=New...
-_UI_BUTTON_EDIT=Edit...
-
-_UI_LABEL_NEW_NAMESPACE_INFORMATION=New Namespace Information
-
-# SelectFileOrXMLCatalogIdPanel.java
-
-_UI_RADIO_BUTTON_SELECT_FROM_WORKSPACE=Select file from Workspace
-_UI_RADIO_BUTTON_SELECT_FROM_CATALOG=Select XML Catalog entry
-
-_UI_WARNING_MORE_THAN_ONE_NS_WITH_NAME=More than one namespace has been specified with the namespace name :
-_UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_NAME=More than one schema has been specified without a namespace name
-_UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_PREFIX=More than one namespace has been specificed without a prefix
-_UI_WARNING_MORE_THAN_ONE_NS_WITH_PREFIX=More than one namespace has been specified with the prefix :
-_UI_WARNING_SCHEMA_CAN_NOT_BE_LOCATED=The specified schema can not be located :
-_UI_WARNING_LOCATION_HINT_NOT_SPECIFIED=A location hint has not been specified for the namespace with name
-_UI_WARNING_NAMESPACE_NAME_NOT_SPECIFIED=A name must be specified for the namespace with prefix :
-_UI_WARNING_PREFIX_NOT_SPECIFIED=A prefix must be specified for the namespace named :
-_UI_WARNING_ROOT_ELEMENT_MUST_BE_SPECIFIED=A root element name must be specified.
-_UI_WARNING_SYSTEM_ID_MUST_BE_SPECIFIED=A system ID must be specified.
-
-_UI_INVALID_NAME=Invalid name
-
-# String used for editing namespaces (org.eclipse.wst.xml.ui.nsedit)
-_UI_ENTER_REQ_PREFIX_AND_NAMESPACE=Enter the required prefix and namespace URI for the namespace declaration.
-_UI_SELECT_REGISTERED_NAMESPACES=Select From Registered Namespaces
-_UI_SPECIFY_NEW_NAMESPACE=Specify New Namespace
-_UI_SELECT_NAMESPACE_TO_ADD=Select the namespace declarations to add.
-_UI_ADD_NAMESPACE_DECLARATIONS=Add Namespace Declarations
-_UI_NAMESPACE_DECLARATIONS=Namespace Declarations
-_UI_TARGET_NAMESPACE=Target Namespace
-
-_ERROR_XML_ATTRIBUTE_ALREADY_EXISTS=The element already has an attribute with this name.
-
-#
-error_message_goes_here=error message goes here
-SurroundWithNewElementQuickAssistProposal_0=Surround with new element
-SurroundWithNewElementQuickAssistProposal_1=Surround with new element
-RenameInFileQuickAssistProposal_0=Link all references for a rename in file (does not change references in other files)
-RenameInFileQuickAssistProposal_1=Rename in file
-InsertRequiredAttrsQuickAssistProposal_0=Insert required attributes
-InsertRequiredAttrsQuickAssistProposal_1=Insert required attributes
-EncodingSettings_0=IANA:
-EncodingSettings_1=Encoding:
-DragNodeCommand_0=Move
-DragNodeCommand_1=Copy
-CommonEditNamespacesDialog_0=Add...
-JFaceNodeAdapter_1=Refresh Property Sheet
-QuickFixProcessorXML_0=Remove empty tag
-QuickFixProcessorXML_1=Change to empty-element tag
-QuickFixProcessorXML_2=Remove this tag
-QuickFixProcessorXML_3=Insert end tag before first child element
-QuickFixProcessorXML_4=Insert end tag at end of element
-QuickFixProcessorXML_5=Remove attributes in end tag
-QuickFixProcessorXML_6=Insert default attribute value
-QuickFixProcessorXML_7=Remove this attribute
-QuickFixProcessorXML_8=Remove spaces before tag name
-QuickFixProcessorXML_9=Remove spaces before processing instruction
-QuickFixProcessorXML_10=Remove namespace in processing instruction
-QuickFixProcessorXML_11=Remove this element
-QuickFixProcessorXML_12=Remove this attribute value
-QuickFixProcessorXML_13=Insert required attribute
-QuickFixProcessorXML_14=Quote attribute value
-QuickFixProcessorXML_15=Insert closing bracket
-XMLPropertySourceAdapter_0=Attributes
-
-WorkbenchDefaultEncodingSettings_0=Use workspace encoding
-refreshoutline_0=Refreshing Outline
-Creating_files_encoding=Creating files encoding preference
-# ReconcileStepForMarkup
-End_tag_has_attributes=End tag has attributes
-Attribute__is_missing_a_value=Attribute \"{0}\" is missing a value
-Attribute__has_no_value=Attribute \"{0}\"  has no value
-Missing_end_tag_=Missing end tag \"{0}\"
-ReconcileStepForMarkup_0=Missing closing quote
-ReconcileStepForMarkup_1=Missing quotes for attribute value
-ReconcileStepForMarkup_2=A tagname cannot start with a space
-ReconcileStepForMarkup_3=Empty tags are not allowed
-ReconcileStepForMarkup_4=Namespaces are not allowed in a Processing Instruction target
-ReconcileStepForMarkup_5=Spaces are not allowed before a Processing Instruction
-ReconcileStepForMarkup_6=Tag missing closing bracket '>'
-# Content Assist
-End_with_=End with {0}>
-SEVERE_internal_error_occu_UI_=SEVERE internal error occurred
-No_known_attribute__UI_=No known attribute
-Content_Assist_not_availab_UI_=Content Assist not available at the current location
-Element__is_unknown=Element <{0}> is unknown.
-Comment__=comment {0}
-Close_with__=Close with {0}
-End_with__=End with \"</{0}>\"
-Close_with___=Close with \"{0}\"
-Close_with____=Close with \"></{0}>\"
-_Has_no_available_child={0} has no available child tags.
-No_known_child_tag=No known child tag names of <{0}> begin with \"{1}\".
-__Has_no_known_child=<{0}> has no known child tags.
-No_known_child_tag_names=No known child tag names of <{0}> begin with \"{1}\"
-The_document_element__=The document element <{0}> is already present.
-No_definition_for_in=No definition was found for element <{0}> in {1}
-No_definition_for=No definition was found for element <{0}>
-No_content_model_for=No content model found for {0}.
-No_content_model_found_UI_=No content model found
-## The following strings are for the XML Cleanup dialog
-Cleanup_UI_=Cleanup
-Compress_empty_element_tags_UI_=&Compress empty element tags
-Insert_required_attributes_UI_=Insert &required attributes
-Insert_missing_tags_UI_=&Insert missing tags
-Quote_attribute_values_UI_=&Quote attribute values
-Format_source_UI_=&Format source
-Convert_EOL_codes_UI_=Convert line &delimiters to
-EOL_Windows_UI=&Windows
-EOL_Unix_UI=U&NIX
-EOL_Mac_UI=&Mac
-## XML Files preference page
-Creating_files=Creating files
-Encoding_desc=The following encoding will apply:
-Encoding=En&coding:
-Creating_or_saving_files=Creating or saving files
-End_of_line_code_desc=The following line delimiter will apply:
-End_of_line_code=&Line delimiter:
-EOL_Windows=Windows
-EOL_Unix=UNIX
-EOL_Mac=Mac
-EOL_NoTranslation=No translation
-Validating_files=Validating files
-Indicate_no_grammar_specified=Indicate when no grammar is specified:
-Indicate_no_grammar_specified_severities=Error,Warning,Ignore
-XMLFilesPreferencePage_ExtensionLabel=Add this suffix (if not specified):
-XMLFilesPreferencePage_ExtensionError=Suffix must be one of the following {0}.
-## XML Source preference page
-Content_assist_UI_=Content assist
-Automatically_make_suggest_UI_=Automatically ma&ke suggestions
-Prompt_when_these_characte_UI_=P&rompt when these characters are inserted:
-Formatting_UI_=Formatting
-Line_width__UI_=Line &width:
-Split_multiple_attributes=Split &multiple attributes each on a new line
-Align_final_bracket=&Align final bracket in multi-line element tags
-Preserve_PCDATA_Content=&Preserve whitespace in tags with PCDATA content
-Space_before_empty_close_tag=Ins&ert whitespace before closing empty end-tags
-Indent_using_tabs=&Indent using tabs
-Indent_using_spaces=I&ndent using spaces
-Indentation_size=In&dentation size:
-Indentation_size_tip=Indentation size
-Clear_all_blank_lines_UI_=Clear all &blank lines
-Grammar_Constraints=Grammar Constraints
-Use_inferred_grammar_in_absence_of=&Use inferred grammar in absence of DTD/Schema
-Suggestion_Strategy=&Suggestion strategy:
-Suggestion_Strategy_Lax=Lax
-Suggestion_Strategy_Strict=Strict
-## tag info
-Element____1=Element :
-Content_Model____2=Content Model :
-Attribute____3=Attribute :
-Data_Type____4=Data Type :
-Enumerated_Values____5=Enumerated Values :
-## copied from sse.ui
-SourceMenu_label=&Source
-Comment_label=Co&mment
-Comment_tooltip=Comment
-Comment_description=Comment
-Uncomment_label=&Uncomment
-Uncomment_tooltip=Uncomment
-Uncomment_description=Uncomment
-ToggleComment_label=Toggle Comment
-ToggleComment_tooltip=Toggle Comment
-ToggleComment_description=Toggle Comment
-AddBlockComment_label=Add Block Comment
-AddBlockComment_tooltip=Add Block Comment
-AddBlockComment_description=Add Block Comment
-RemoveBlockComment_label=Remove Block Comment
-RemoveBlockComment_tooltip=Remove Block Comment
-RemoveBlockComment_description=Remove Block Comment
-CleanupDocument_label=Cleanup Document...
-CleanupDocument_tooltip=Cleanup Document
-CleanupDocument_description=Cleanup Document
-FindOccurrences_label=Occurrences in File
-OpenFileFromSource_label=Op&en Selection
-OpenFileFromSource_tooltip=Open an editor on the selected link
-OpenFileFromSource_description=Open an editor on the selected link
-XMLContentOutlineConfiguration_0=Show Attributes
-XMLTyping_Auto_Complete=Automatically close
-XMLTyping_Auto_Remove=Automatically remove
-XMLTyping_Complete_Comments=&Comments
-XMLTyping_Complete_End_Tags=&End tags
-XMLTyping_Remove_End_Tags=E&nd tags when creating empty self-closing tags
-StructureSelectEnclosing_label=Enclosing Element
-StructureSelectEnclosing_tooltip=Expand selection to include enclosing element
-StructureSelectEnclosing_description=Expand selection to include enclosing element
-StructureSelectNext_label=Next Element
-StructureSelectNext_tooltip=Expand selection to include next sibling
-StructureSelectNext_description=Expand selection to include next sibling
-StructureSelectPrevious_label=Previous Element
-StructureSelectPrevious_tooltip=Expand selection to include previous sibling
-StructureSelectPrevious_description=Expand selection to include previous sibling
-MESSAGE_XML_VALIDATION_MESSAGE_UI_=XML Validator validating {0}
-SyntaxColoringPage_0=Syntax Element:
-SyntaxColoringPage_2=Enable
-SyntaxColoringPage_3=&Bold
-SyntaxColoringPage_4=&Italic
-SyntaxColoringPage_5=&Strike-through
-SyntaxColoringPage_6=&Underline
-EmptyFilePreferencePage_0=Expand the tree to edit preferences for a specific feature.
-_UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK=XML editing preferences.  Note that some preferences may be set on the <a>{0}</a> preference page.
-Use_XInclude=Process XML Inclusions
-nextSibling_label=Next Sibling
-nextSibling_description=Go to Next Sibling
-previousSibling_label=Previous Sibling
-previousSibling_description=Go to Previous Sibling
-gotoMatchingTag_label=Matching Tag
-gotoMatchingTag_description=Go To Matching Tag
-
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AbstractCommentActionXMLDelegate.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AbstractCommentActionXMLDelegate.java
deleted file mode 100644
index e00b29d..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AbstractCommentActionXMLDelegate.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.xml.ui.internal.Logger;
-
-/**
- * Abstract comment action delegate for XML editors
- */
-abstract public class AbstractCommentActionXMLDelegate implements IEditorActionDelegate, IActionDelegate2, IViewActionDelegate {
-	static final String CLOSE_COMMENT = "-->"; //$NON-NLS-1$
-	static final String OPEN_COMMENT = "<!--"; //$NON-NLS-1$
-
-	IEditorPart fEditor;
-
-	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
-		fEditor = targetEditor;
-	}
-
-	public void dispose() {
-		// nulling out just in case
-		fEditor = null;
-	}
-
-	public void runWithEvent(IAction action, Event event) {
-		run(action);
-	}
-
-	public void run(IAction action) {
-		if (fEditor instanceof ITextEditor) {
-			ITextEditor textEditor = (ITextEditor) fEditor;
-			IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
-			if (document != null) {
-				// get current text selection
-				ITextSelection textSelection = getCurrentSelection();
-				if (textSelection.isEmpty()) {
-					return;
-				}
-
-				processAction(document, textSelection);
-			}
-		}
-	}
-
-	public void init(IViewPart view) {
-		// do nothing
-	}
-
-	public void selectionChanged(IAction action, ISelection selection) {
-		// do nothing
-	}
-
-	private ITextSelection getCurrentSelection() {
-		if (fEditor instanceof ITextEditor) {
-			ISelectionProvider provider = ((ITextEditor) fEditor).getSelectionProvider();
-			if (provider != null) {
-				ISelection selection = provider.getSelection();
-				if (selection instanceof ITextSelection) {
-					return (ITextSelection) selection;
-				}
-			}
-		}
-		return TextSelection.emptySelection();
-	}
-
-	abstract void processAction(IDocument document, ITextSelection textSelection);
-
-	void removeOpenCloseComments(IDocument document, int offset, int length) {
-		try {
-			int adjusted_length = length;
-
-			// remove open comments
-			String string = document.get(offset, length);
-			int index = string.lastIndexOf(OPEN_COMMENT);
-			while (index != -1) {
-				document.replace(offset + index, OPEN_COMMENT.length(), ""); //$NON-NLS-1$
-				index = string.lastIndexOf(OPEN_COMMENT, index - 1);
-				adjusted_length -= OPEN_COMMENT.length();
-			}
-
-			// remove close comments
-			string = document.get(offset, adjusted_length);
-			index = string.lastIndexOf(CLOSE_COMMENT);
-			while (index != -1) {
-				document.replace(offset + index, CLOSE_COMMENT.length(), ""); //$NON-NLS-1$
-				index = string.lastIndexOf(CLOSE_COMMENT, index - 1);
-			}
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AbstractNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AbstractNodeActionManager.java
deleted file mode 100644
index 028d579..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AbstractNodeActionManager.java
+++ /dev/null
@@ -1,684 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDescriptionBuilder;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilder;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilderImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceHelper;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.editor.CMImageUtil;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-
-public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
-
-
-	/**
-	 * AddNodeAction
-	 */
-	public class AddNodeAction extends NodeAction {
-		protected CMNode cmnode;
-		protected String description;
-		protected int index;
-		protected int nodeType;
-		protected Node parent;
-		protected String undoDescription;
-
-
-		public AddNodeAction(CMNode cmnode, Node parent, int index) {
-			this.cmnode = cmnode;
-			this.parent = parent;
-			this.index = index;
-
-			String text = getLabel(parent, cmnode);
-			setText(text);
-			description = text;
-			undoDescription = XMLUIMessages._UI_MENU_ADD + " " + text; //$NON-NLS-1$ 
-			ImageDescriptor descriptor = CMImageUtil.getImageDescriptor(cmnode);
-			if (descriptor == null) {
-				descriptor = imageDescriptorCache.getImageDescriptor(cmnode);
-			}
-			setImageDescriptor(descriptor);
-		}
-
-
-		public AddNodeAction(int nodeType, Node parent, int index) {
-			this.nodeType = nodeType;
-			this.index = index;
-			this.parent = parent;
-
-			switch (nodeType) {
-				case Node.COMMENT_NODE : {
-					description = XMLUIMessages._UI_MENU_COMMENT;
-					undoDescription = XMLUIMessages._UI_MENU_ADD_COMMENT;
-					break;
-				}
-				case Node.PROCESSING_INSTRUCTION_NODE : {
-					description = XMLUIMessages._UI_MENU_PROCESSING_INSTRUCTION;
-					undoDescription = XMLUIMessages._UI_MENU_ADD_PROCESSING_INSTRUCTION;
-					break;
-				}
-				case Node.CDATA_SECTION_NODE : {
-					description = XMLUIMessages._UI_MENU_CDATA_SECTION;
-					undoDescription = XMLUIMessages._UI_MENU_ADD_CDATA_SECTION;
-					break;
-				}
-				case Node.TEXT_NODE : {
-					description = XMLUIMessages._UI_MENU_PCDATA;
-					undoDescription = XMLUIMessages._UI_MENU_ADD_PCDATA;
-					break;
-				}
-			}
-			setText(description);
-			setImageDescriptor(imageDescriptorCache.getImageDescriptor(new Integer(nodeType)));
-		}
-
-
-		protected void addNodeForCMNode() {
-			if (parent != null) {
-				insert(parent, cmnode, index);
-			}
-		}
-
-
-		protected void addNodeForNodeType() {
-			Document document = parent.getNodeType() == Node.DOCUMENT_NODE ? (Document) parent : parent.getOwnerDocument();
-			Node newChildNode = null;
-			boolean format = true;
-			switch (nodeType) {
-				case Node.COMMENT_NODE : {
-					newChildNode = document.createComment(XMLUIMessages._UI_COMMENT_VALUE);
-					break;
-				}
-				case Node.PROCESSING_INSTRUCTION_NODE : {
-					newChildNode = document.createProcessingInstruction(XMLUIMessages._UI_PI_TARGET_VALUE, XMLUIMessages._UI_PI_DATA_VALUE);
-					break;
-				}
-				case Node.CDATA_SECTION_NODE : {
-					newChildNode = document.createCDATASection(""); //$NON-NLS-1$
-					break;
-				}
-				case Node.TEXT_NODE : {
-					format = false;
-					newChildNode = document.createTextNode(parent.getNodeName());
-					break;
-				}
-			}
-
-			if (newChildNode != null) {
-				List list = new Vector(1);
-				list.add(newChildNode);
-				insertNodesAtIndex(parent, list, index, format);
-			}
-		}
-
-
-		public String getUndoDescription() {
-			return undoDescription;
-		}
-
-
-		public void run() {
-			beginNodeAction(this);
-			if (cmnode != null) {
-				addNodeForCMNode();
-			}
-			else {
-				addNodeForNodeType();
-			}
-			endNodeAction(this);
-		}
-	}
-
-
-	/**
-	 * DeleteAction
-	 */
-	public class DeleteAction extends NodeAction {
-		protected List list;
-
-		public DeleteAction(List list) {
-			setText(XMLUIMessages._UI_MENU_REMOVE);
-			this.list = list;
-		}
-
-		public DeleteAction(Node node) {
-			setText(XMLUIMessages._UI_MENU_REMOVE);
-			list = new Vector();
-			list.add(node);
-		}
-
-		public String getUndoDescription() {
-			return XMLUIMessages.DELETE;
-		}
-
-		public void run() {
-			beginNodeAction(this);
-
-			for (Iterator i = list.iterator(); i.hasNext();) {
-				Node node = (Node) i.next();
-				if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
-					Attr attr = (Attr) node;
-					attr.getOwnerElement().removeAttributeNode(attr);
-				}
-				else {
-					Node parent = node.getParentNode();
-					if (parent != null) {
-						Node previousSibling = node.getPreviousSibling();
-						if ((previousSibling != null) && isWhitespaceTextNode(previousSibling)) {
-							parent.removeChild(previousSibling);
-						}
-						parent.removeChild(node);
-					}
-				}
-			}
-
-			endNodeAction(this);
-		}
-	}
-
-
-	class ImageDescriptorCache {
-		protected ImageDescriptor attributeImage = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
-		protected ImageDescriptor attributeReqImage = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_OBJ_ATT_REQ_OBJ);
-		protected ImageDescriptor cdataSectionImage = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_OBJ_CDATASECTION);
-		protected ImageDescriptor commentImage = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_OBJ_COMMENT);
-		protected ImageDescriptor elementImage = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_OBJ_ELEMENT);
-		protected ImageDescriptor piImage = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_OBJ_PROCESSINGINSTRUCTION);
-		protected ImageDescriptor textImage = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_OBJ_TXTEXT);
-
-		public ImageDescriptor getImageDescriptor(Object object) {
-			ImageDescriptor result = null;
-			if (object instanceof CMNode) {
-				CMNode cmnode = (CMNode) object;
-				switch (cmnode.getNodeType()) {
-					case CMNode.ATTRIBUTE_DECLARATION : {
-						result = CMImageUtil.getImageDescriptor(cmnode);
-						if (result == null) {
-							if (((CMAttributeDeclaration) cmnode).getUsage() == CMAttributeDeclaration.REQUIRED) {
-								result = attributeReqImage;
-							}
-							else {
-								result = attributeImage;
-							}
-						}
-						break;
-					}
-					case CMNode.DATA_TYPE : {
-						result = textImage;
-						break;
-					}
-					case CMNode.ELEMENT_DECLARATION : {
-						result = CMImageUtil.getImageDescriptor(cmnode);
-						if (result == null) {
-							result = elementImage;
-						}
-						break;
-					}
-					case CMNode.GROUP : {
-						result = elementImage;
-						break;
-					}
-				}
-			}
-			else if (object instanceof Integer) {
-				Integer integer = (Integer) object;
-				switch (integer.intValue()) {
-					case Node.COMMENT_NODE : {
-						result = commentImage;
-						break;
-					}
-					case Node.PROCESSING_INSTRUCTION_NODE : {
-						result = piImage;
-						break;
-					}
-					case Node.CDATA_SECTION_NODE : {
-						result = cdataSectionImage;
-						break;
-					}
-					case Node.TEXT_NODE : {
-						result = textImage;
-						break;
-					}
-				}
-			}
-			return result;
-		}
-	}
-
-	// TODO... remove this class. I'm pretty sure it is no longer used by
-	// anyone.
-	/**
-	 * @depracated
-	 */
-	public class InsertAction extends NodeAction {
-		protected String description;
-		protected int index;
-		protected int nodeType;
-		protected Node parent;
-
-		public InsertAction(int nodeType, Node parent, int index) {
-			this.nodeType = nodeType;
-			this.index = index;
-			this.parent = parent;
-			switch (nodeType) {
-				case Node.COMMENT_NODE : {
-					description = XMLUIMessages._UI_MENU_COMMENT;
-					break;
-				}
-				case Node.PROCESSING_INSTRUCTION_NODE : {
-					description = XMLUIMessages._UI_MENU_PROCESSING_INSTRUCTION;
-					break;
-				}
-				case Node.CDATA_SECTION_NODE : {
-					description = XMLUIMessages._UI_MENU_CDATA_SECTION;
-					break;
-				}
-				case Node.TEXT_NODE : {
-					description = XMLUIMessages._UI_MENU_PCDATA;
-					break;
-				}
-			}
-			setText(description);
-			setImageDescriptor(imageDescriptorCache.getImageDescriptor(new Integer(nodeType)));
-		}
-
-		public InsertAction(int nodeType, Node parent, int index, String title) {
-			this.nodeType = nodeType;
-			this.index = index;
-			this.parent = parent;
-			description = title;
-			setText(description);
-			setImageDescriptor(imageDescriptorCache.getImageDescriptor(new Integer(nodeType)));
-		}
-
-		public String getUndoDescription() {
-			return XMLUIMessages._UI_MENU_ADD + " " + description; //$NON-NLS-1$ 
-		}
-
-		public void run() {
-			beginNodeAction(this);
-
-			Document document = parent.getNodeType() == Node.DOCUMENT_NODE ? (Document) parent : parent.getOwnerDocument();
-			Node newChildNode = null;
-			boolean format = true;
-			switch (nodeType) {
-				case Node.COMMENT_NODE : {
-					newChildNode = document.createComment(XMLUIMessages._UI_COMMENT_VALUE);
-					break;
-				}
-				case Node.PROCESSING_INSTRUCTION_NODE : {
-					newChildNode = document.createProcessingInstruction(XMLUIMessages._UI_PI_TARGET_VALUE, XMLUIMessages._UI_PI_DATA_VALUE);
-					break;
-				}
-				case Node.CDATA_SECTION_NODE : {
-					newChildNode = document.createCDATASection(""); //$NON-NLS-1$
-					break;
-				}
-				case Node.TEXT_NODE : {
-					format = false;
-					newChildNode = document.createTextNode(parent.getNodeName());
-					break;
-				}
-			}
-
-			if (newChildNode != null) {
-				List list = new Vector(1);
-				list.add(newChildNode);
-				insertNodesAtIndex(parent, list, index, format);
-			}
-
-			endNodeAction(this);
-		}
-	}
-
-
-	/**
-	 * ReplaceNodeAction
-	 */
-	public class ReplaceNodeAction extends NodeAction {
-		protected CMNode cmnode;
-		protected String description;
-		protected int endIndex;
-		protected Node parent;
-		protected int startIndex;
-
-
-		public ReplaceNodeAction(Node parent, CMNode cmnode, int startIndex, int endIndex) {
-			this.parent = parent;
-			this.cmnode = cmnode;
-			this.startIndex = startIndex;
-			this.endIndex = endIndex;
-
-			setText(getLabel(parent, cmnode));
-			setImageDescriptor(imageDescriptorCache.getImageDescriptor(cmnode));
-		}
-
-		public String getUndoDescription() {
-			String result = XMLUIMessages._UI_LABEL_UNDO_REPLACE_DESCRIPTION;
-			result += " " + getLabel(parent, cmnode); //$NON-NLS-1$
-			return result;
-		}
-
-		public void run() {
-			beginNodeAction(this);
-
-			if ((parent != null) && (cmnode != null)) {
-				remove(parent, startIndex, endIndex);
-				insert(parent, cmnode, startIndex);
-			}
-			endNodeAction(this);
-		}
-	}
-
-	protected ImageDescriptorCache imageDescriptorCache = new ImageDescriptorCache();
-	protected Viewer fViewer;
-
-	public AbstractNodeActionManager(IStructuredModel model, ModelQuery modelQuery, Viewer viewer) {
-		super(model, modelQuery);
-		this.fViewer = viewer;
-	}
-
-
-	public void beginNodeAction(NodeAction action) {
-		fModel.beginRecording(action, action.getUndoDescription());
-	}
-
-
-	protected Action createAddAttributeAction(Element parent, CMAttributeDeclaration ad) {
-		Action action = null;
-		if (ad == null) {
-			action = new EditAttributeAction(this, parent, null, XMLUIMessages._UI_MENU_NEW_ATTRIBUTE, XMLUIMessages._UI_MENU_NEW_ATTRIBUTE_TITLE);
-		}
-		else {
-			action = new AddNodeAction(ad, parent, -1);
-		}
-		return action;
-	}
-
-
-	protected Action createAddCDataSectionAction(Node parent, int index) {
-		return new AddNodeAction(Node.CDATA_SECTION_NODE, parent, index);
-	}
-
-
-	protected Action createAddCommentAction(Node parent, int index) {
-		return new AddNodeAction(Node.COMMENT_NODE, parent, index);
-	}
-
-
-	protected Action createAddDoctypeAction(Document document, int index) {
-		return new EditDoctypeAction(fModel, document, fModel.getBaseLocation(), XMLUIMessages._UI_MENU_ADD_DTD_INFORMATION);
-	}
-
-
-	protected Action createAddElementAction(Node parent, CMElementDeclaration ed, int index) {
-		Action action = null;
-		if (ed == null) {
-			action = new EditElementAction(this, parent, index, XMLUIMessages._UI_MENU_NEW_ELEMENT, XMLUIMessages._UI_MENU_NEW_ELEMENT_TITLE);
-		}
-		else {
-			action = new AddNodeAction(ed, parent, index);
-		}
-		return action;
-	}
-
-
-	protected Action createAddPCDataAction(Node parent, CMDataType dataType, int index) {
-		Action action = null;
-		if (dataType == null) {
-			action = new AddNodeAction(Node.TEXT_NODE, parent, index);
-		}
-		else {
-			action = new AddNodeAction(dataType, parent, index);
-		}
-		return action;
-	}
-
-
-	protected Action createAddProcessingInstructionAction(Node parent, int index) {
-		Node refChild = getRefChildNodeAtIndex(parent, index);
-		Action action = new EditProcessingInstructionAction(this, parent, refChild, XMLUIMessages._UI_MENU_ADD_PROCESSING_INSTRUCTION, XMLUIMessages.ADD_PROCESSING_INSTRUCTION);
-		action.setImageDescriptor(imageDescriptorCache.getImageDescriptor(new Integer(Node.PROCESSING_INSTRUCTION_NODE)));
-		return action;
-	}
-
-
-	protected Action createAddSchemaInfoAction(Element element) {
-		return new EditSchemaInfoAction(this, element.getOwnerDocument(), fModel.getBaseLocation(), XMLUIMessages._UI_MENU_ADD_SCHEMA_INFORMATION);
-	}
-
-
-	protected Action createDeleteAction(List selection) {
-		DeleteAction deleteAction = new DeleteAction(selection);
-		deleteAction.setEnabled(selection.size() > 0);
-		return deleteAction;
-	}
-
-
-	public DOMContentBuilder createDOMContentBuilder(Document document) {
-		DOMContentBuilderImpl builder = new DOMContentBuilderImpl(document);
-		return builder;
-	}
-
-
-	protected Action createEditAttributeAction(Attr attr, CMAttributeDeclaration ad) {
-		return new EditAttributeAction(this, attr.getOwnerElement(), attr, XMLUIMessages._UI_MENU_EDIT_ATTRIBUTE, XMLUIMessages._UI_MENU_EDIT_ATTRIBUTE_TITLE);
-	}
-
-
-	protected Action createEditDoctypeAction(DocumentType doctype) {
-		return new EditDoctypeAction(fModel, doctype, fModel.getBaseLocation(), XMLUIMessages._UI_MENU_EDIT_DOCTYPE);
-	}
-
-
-	protected Action createEditProcessingInstructionAction(ProcessingInstruction pi) {
-		return new EditProcessingInstructionAction(this, pi, XMLUIMessages._UI_MENU_EDIT_PROCESSING_INSTRUCTION, XMLUIMessages._UI_MENU_EDIT_PROCESSING_INSTRUCTION_TITLE);
-	}
-
-
-	protected Action createEditSchemaInfoAction(Element element) {
-		return new EditSchemaInfoAction(this, element.getOwnerDocument(), fModel.getBaseLocation(), XMLUIMessages._UI_MENU_EDIT_NAMESPACES);
-	}
-
-
-	protected Action createRenameAction(Node node) {
-		Action result = null;
-		if (node instanceof Element) {
-			result = new EditElementAction(this, (Element) node, XMLUIMessages._UI_MENU_RENAME, XMLUIMessages._UI_MENU_RENAME_TITLE);
-		}
-		return result;
-	}
-
-
-	protected Action createReplaceAction(Node parent, CMNode cmnode, int startIndex, int endIndex) {
-		return new ReplaceNodeAction(parent, cmnode, startIndex, endIndex);
-	}
-
-	public void endNodeAction(NodeAction action) {
-		fModel.endRecording(action);
-	}
-
-
-
-	public void fillContextMenu(IMenuManager menuManager, ISelection selection) {
-		try {
-			List selectionList = new ArrayList();
-			if (selection instanceof IStructuredSelection) {
-				IStructuredSelection es = (IStructuredSelection) selection;
-				for (Iterator i = es.iterator(); i.hasNext();) {
-					selectionList.add(i.next());
-				}
-			}
-
-			contributeActions(menuManager, selectionList);
-		}
-		catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 
-	 */
-	public String getLabel(Node parent, CMNode cmnode) {
-		String result = "?" + cmnode + "?"; //$NON-NLS-1$ //$NON-NLS-2$
-		if (cmnode != null) {
-			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=155800
-			result = cmnode.getNodeName();
-			if(result == null) {
-				result = (String) cmnode.getProperty("description"); //$NON-NLS-1$
-			}
-			if (result == null || result.length() == 0) {
-				if (cmnode.getNodeType() == CMNode.GROUP) {
-					CMDescriptionBuilder descriptionBuilder = new CMDescriptionBuilder();
-					result = descriptionBuilder.buildDescription(cmnode);
-				}
-				else {
-					result = DOMNamespaceHelper.computeName(cmnode, parent, null);
-				}
-			}
-		}
-		return result;
-	}
-
-
-	public IStructuredModel getModel() {
-		return fModel;
-	}
-
-
-	public Shell getWorkbenchWindowShell() {
-		return XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
-	}
-
-
-	public void insert(Node parent, CMNode cmnode, int index) {
-		Document document = parent.getNodeType() == Node.DOCUMENT_NODE ? (Document) parent : parent.getOwnerDocument();
-		DOMContentBuilder builder = createDOMContentBuilder(document);
-		builder.setBuildPolicy(DOMContentBuilder.BUILD_ONLY_REQUIRED_CONTENT);
-		builder.build(parent, cmnode);
-		insertNodesAtIndex(parent, builder.getResult(), index);
-	}
-
-
-	public void insertNodesAtIndex(Node parent, List list, int index) {
-		insertNodesAtIndex(parent, list, index, true);
-	}
-
-
-	public void insertNodesAtIndex(Node parent, List list, int index, boolean format) {
-		NodeList nodeList = parent.getChildNodes();
-		if (index == -1) {
-			index = nodeList.getLength();
-		}
-		Node refChild = (index < nodeList.getLength()) ? nodeList.item(index) : null;
-
-		// here we consider the case where the previous node is a 'white
-		// space' Text node
-		// we should really do the insert before this node
-		//
-		int prevIndex = index - 1;
-		Node prevChild = (prevIndex < nodeList.getLength()) ? nodeList.item(prevIndex) : null;
-		if (isWhitespaceTextNode(prevChild)) {
-			refChild = prevChild;
-		}
-
-		for (Iterator i = list.iterator(); i.hasNext();) {
-			Node newNode = (Node) i.next();
-
-			if (newNode.getNodeType() == Node.ATTRIBUTE_NODE) {
-				Element parentElement = (Element) parent;
-				parentElement.setAttributeNode((Attr) newNode);
-			}
-			else {
-				parent.insertBefore(newNode, refChild);
-			}
-		}
-
-		boolean formatDeep = false;
-		for (Iterator i = list.iterator(); i.hasNext();) {
-			Node newNode = (Node) i.next();
-			if (newNode.getNodeType() == Node.ELEMENT_NODE) {
-				formatDeep = true;
-			}
-
-			if (format) {
-				reformat(newNode, formatDeep);
-			}
-		}
-
-		setViewerSelection(list);
-	}
-
-
-	/**
-	 * This method is abstract since currently, the sed editor is required to
-	 * perform formating and we don't want to create a dependency on the sed
-	 * editor.
-	 */
-	public abstract void reformat(Node parent, boolean deep);
-
-
-	public void remove(Node parent, int startIndex, int endIndex) {
-		NodeList nodeList = parent.getChildNodes();
-		for (int i = endIndex; i >= startIndex; i--) {
-			Node node = nodeList.item(i);
-			if (node != null) {
-				parent.removeChild(node);
-			}
-		}
-	}
-
-
-	public void setViewerSelection(List list) {
-		if (fViewer != null) {
-			fViewer.setSelection(new StructuredSelection(list), true);
-		}
-	}
-
-
-	public void setViewerSelection(Node node) {
-		if (fViewer != null) {
-			fViewer.setSelection(new StructuredSelection(node), true);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ActionContributorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ActionContributorXML.java
deleted file mode 100644
index c4f8285..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ActionContributorXML.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-import org.eclipse.ui.texteditor.RetargetTextEditorAction;
-import org.eclipse.wst.sse.ui.internal.actions.ActionContributor;
-import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;
-import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/**
- * XMLEditorActionContributor
- * 
- * This class should not be used inside multi page editor's
- * ActionBarContributor, since cascaded init() call from the
- * ActionBarContributor will causes exception and it leads to lose whole
- * toolbars.
- * 
- * Instead, use SourcePageActionContributor for source page contributor of
- * multi page editor.
- * 
- * Note that this class is still valid for single page editor.
- */
-public class ActionContributorXML extends ActionContributor {
-	private static final String[] EDITOR_IDS = {"org.eclipse.core.runtime.xml.source", "org.eclipse.core.runtime.xml.source2", "org.eclipse.wst.sse.ui.StructuredTextEditor"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-	private static final String GO_TO_MATCHING_TAG_ID = "org.eclipse.wst.xml.ui.gotoMatchingTag"; //$NON-NLS-1$
-	
-	protected RetargetTextEditorAction fCleanupDocument = null;
-	protected RetargetTextEditorAction fComment = null;
-	protected RetargetTextEditorAction fContentAssist = null;
-	protected RetargetTextEditorAction fFindOccurrences = null;
-	protected RetargetTextEditorAction fFormatActiveElements = null;
-	protected RetargetTextEditorAction fFormatDocument = null;
-	protected RetargetTextEditorAction fOpenFileAction = null; // open file
-
-	protected RetargetTextEditorAction fUncomment = null;
-	private GoToMatchingTagAction fGoToMatchingTagAction;
-
-	public ActionContributorXML() {
-		super();
-
-		ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
-
-		fContentAssist = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
-		fContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
-
-		// source commands
-		fCleanupDocument = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
-		fCleanupDocument.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT);
-
-		fFormatDocument = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
-		fFormatDocument.setActionDefinitionId(ActionDefinitionIds.FORMAT_DOCUMENT);
-
-		fFormatActiveElements = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
-		fFormatActiveElements.setActionDefinitionId(ActionDefinitionIds.FORMAT_ACTIVE_ELEMENTS);
-
-		// navigate commands
-		fOpenFileAction = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
-		fOpenFileAction.setActionDefinitionId(ActionDefinitionIds.OPEN_FILE);
-
-		fFindOccurrences = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
-		fFindOccurrences.setActionDefinitionId(ActionDefinitionIds.FIND_OCCURRENCES);
-
-		fGoToMatchingTagAction = new GoToMatchingTagAction(resourceBundle, "gotoMatchingTag_", null); //$NON-NLS-1$
-		fGoToMatchingTagAction.setActionDefinitionId(GO_TO_MATCHING_TAG_ID);
-		fGoToMatchingTagAction.setId(GO_TO_MATCHING_TAG_ID);
-	}
-	
-	/**
-	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToMenu(IMenuManager)
-	 */
-	public void contributeToMenu(IMenuManager menu) {
-		// navigate commands
-		IMenuManager navigateMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_NAVIGATE);
-		if (navigateMenu != null) {
-			navigateMenu.appendToGroup(IWorkbenchActionConstants.OPEN_EXT, fCommandsSeparator);
-			navigateMenu.appendToGroup(IWorkbenchActionConstants.OPEN_EXT, fOpenFileAction);
-
-			IMenuManager gotoGroup = navigateMenu.findMenuUsingPath(IWorkbenchActionConstants.GO_TO);
-			if (gotoGroup != null) {
-				gotoGroup.appendToGroup("matchingBegin", fGoToMatchingTagAction); //$NON-NLS-1$
-			}
-		}
-		super.contributeToMenu(menu);
-	}
-
-	protected void addToMenu(IMenuManager menu) {
-/*
-		// edit commands
-		IMenuManager editMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
-		if (editMenu != null) {
-			editMenu.add(fCommandsSeparator);
-			editMenu.add(fToggleInsertModeAction);
-			editMenu.add(fCommandsSeparator);
-			editMenu.add(fExpandSelectionToMenu);
-			editMenu.add(fCommandsSeparator);
-			editMenu.add(fContentAssist);
-			editMenu.add(fMenuAdditionsGroupMarker);
-		}
-
-		// source commands
-		String sourceMenuLabel = XMLUIMessages.SourceMenu_label;
-		String sourceMenuId = "sourceMenuId"; //$NON-NLS-1$
-		IMenuManager sourceMenu = new MenuManager(sourceMenuLabel, sourceMenuId);
-		menu.insertAfter(IWorkbenchActionConstants.M_EDIT, sourceMenu);
-		if (sourceMenu != null) {
-			sourceMenu.add(fCommandsSeparator);
-			sourceMenu.add(fToggleComment);
-			sourceMenu.add(fAddBlockComment);
-			sourceMenu.add(fRemoveBlockComment);
-			sourceMenu.add(fShiftRight);
-			sourceMenu.add(fShiftLeft);
-			sourceMenu.add(fCleanupDocument);
-			sourceMenu.add(fFormatDocument);
-			sourceMenu.add(fFormatActiveElements);
-			sourceMenu.add(fCommandsSeparator);
-			sourceMenu.add(fFindOccurrences);
-		}
-
-		// navigate commands
-		IMenuManager navigateMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_NAVIGATE);
-		if (navigateMenu != null) {
-			navigateMenu.appendToGroup(IWorkbenchActionConstants.OPEN_EXT, fCommandsSeparator);
-			navigateMenu.appendToGroup(IWorkbenchActionConstants.OPEN_EXT, fOpenFileAction);
-
-			IMenuManager gotoGroup = navigateMenu.findMenuUsingPath(IWorkbenchActionConstants.GO_TO);
-			if (gotoGroup != null) {
-				gotoGroup.add(fGotoMatchingBracketAction);
-				gotoGroup.add(fGoToMatchingTagAction);
-				gotoGroup.add(new Separator());
-			}
-		}
-*/
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.edit.util.ActionContributor#getExtensionIDs()
-	 */
-	protected String[] getExtensionIDs() {
-		return EDITOR_IDS;
-	}
-
-	/**
-	 * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(IEditorPart)
-	 */
-	public void setActiveEditor(IEditorPart activeEditor) {
-		if (getActiveEditorPart() == activeEditor) {
-			return;
-		}
-		super.setActiveEditor(activeEditor);
-
-		IActionBars actionBars = getActionBars();
-		if (actionBars != null) {
-			IStatusLineManager statusLineManager = actionBars.getStatusLineManager();
-			if (statusLineManager != null) {
-				statusLineManager.setMessage(null);
-				statusLineManager.setErrorMessage(null);
-			}
-		}
-
-		ITextEditor textEditor = getTextEditor(activeEditor);
-
-		fContentAssist.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS));
-
-		fCleanupDocument.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT));
-		fFormatDocument.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT));
-		fFormatActiveElements.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS));
-		fCleanupDocument.setEnabled((textEditor != null) && textEditor.isEditable());
-		fFormatDocument.setEnabled((textEditor != null) && textEditor.isEditable());
-		fFormatActiveElements.setEnabled((textEditor != null) && textEditor.isEditable());
-
-		fOpenFileAction.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_OPEN_FILE));
-
-		fFindOccurrences.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_FIND_OCCURRENCES));
-
-		fGoToMatchingTagAction.setEditor(textEditor);
-		if (textEditor != null) {
-			textEditor.setAction(GO_TO_MATCHING_TAG_ID, fGoToMatchingTagAction);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.ISourceViewerActionBarContributor#setViewerSpecificContributionsEnabled(boolean)
-	 */
-	public void setViewerSpecificContributionsEnabled(boolean enabled) {
-		super.setViewerSpecificContributionsEnabled(enabled);
-
-		fContentAssist.setEnabled(enabled);
-		// cleanup and format document actions do not rely on source viewer
-		// being enabled
-		// fCleanupDocument.setEnabled(enabled);
-		// fFormatDocument.setEnabled(enabled);
-
-		fFormatActiveElements.setEnabled(enabled);
-		fOpenFileAction.setEnabled(enabled);
-		fFindOccurrences.setEnabled(enabled);
-
-		fGoToMatchingTagAction.setEnabled(enabled);
-		fGotoMatchingBracketAction.setEnabled(enabled);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AddBlockCommentActionXMLDelegate.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AddBlockCommentActionXMLDelegate.java
deleted file mode 100644
index a038376..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AddBlockCommentActionXMLDelegate.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.xml.core.internal.document.CommentImpl;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/**
- * Add block comment action delegate for XML editor
- */
-public class AddBlockCommentActionXMLDelegate extends AbstractCommentActionXMLDelegate {
-
-	public void init(IAction action) {
-		if (action != null) {
-			action.setText(XMLUIMessages.AddBlockComment_label);
-			action.setToolTipText(XMLUIMessages.AddBlockComment_tooltip);
-			action.setDescription(XMLUIMessages.AddBlockComment_description);
-		}
-	}
-
-	void processAction(IDocument document, ITextSelection textSelection) {
-		IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForEdit(document);
-		if (model != null) {
-			try {
-				IndexedRegion selectionStartIndexedRegion = model.getIndexedRegion(textSelection.getOffset());
-				IndexedRegion selectionEndIndexedRegion = model.getIndexedRegion(textSelection.getOffset() + textSelection.getLength());
-
-				if (selectionStartIndexedRegion == null) {
-					return;
-				}
-				if ((selectionEndIndexedRegion == null) && (textSelection.getLength() > 0)) {
-					selectionEndIndexedRegion = model.getIndexedRegion(textSelection.getOffset() + textSelection.getLength() - 1);
-				}
-				if (selectionEndIndexedRegion == null) {
-					return;
-				}
-
-				int openCommentOffset = selectionStartIndexedRegion.getStartOffset();
-				int closeCommentOffset = selectionEndIndexedRegion.getEndOffset() + OPEN_COMMENT.length();
-
-
-				if ((textSelection.getLength() == 0) && (selectionStartIndexedRegion instanceof CommentImpl)) {
-					return;
-				}
-
-				model.beginRecording(this, XMLUIMessages.AddBlockComment_tooltip);
-				model.aboutToChangeModel();
-
-				try {
-					document.replace(openCommentOffset, 0, OPEN_COMMENT);
-					document.replace(closeCommentOffset, 0, CLOSE_COMMENT);
-					removeOpenCloseComments(document, openCommentOffset + OPEN_COMMENT.length(), closeCommentOffset - openCommentOffset - CLOSE_COMMENT.length());
-				}
-				catch (BadLocationException e) {
-					Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-				}
-				finally {
-					model.changedModel();
-					model.endRecording(this);
-				}
-			}
-			finally {
-				model.releaseFromEdit();
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/BaseNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/BaseNodeActionManager.java
deleted file mode 100644
index 4629a23..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/BaseNodeActionManager.java
+++ /dev/null
@@ -1,519 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryAction;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-
-public abstract class BaseNodeActionManager {
-
-
-	/**
-	 * MyMenuManager
-	 */
-	public static class MyMenuManager extends MenuManager {
-		protected String title;
-
-		public MyMenuManager(String s) {
-			super(s);
-			title = s;
-		}
-
-		public boolean isEnabled() {
-			return !isEmpty();
-		}
-
-		public String toString() {
-			return title;
-		}
-	}
-
-	public static DocumentType getDoctype(Node node) {
-		Document document = (node.getNodeType() == Node.DOCUMENT_NODE) ? (Document) node : node.getOwnerDocument();
-		return document.getDoctype();
-	}
-
-	protected MenuBuilder menuBuilder = new MenuBuilder();
-	protected IStructuredModel fModel;
-	protected ModelQuery modelQuery;
-
-	protected BaseNodeActionManager(IStructuredModel model, ModelQuery modelQuery) {
-		this.fModel = model;
-		this.modelQuery = modelQuery;
-	}
-
-
-	protected void addActionHelper(IMenuManager menu, List modelQueryActionList) {
-		List actionList = new Vector();
-		for (Iterator i = modelQueryActionList.iterator(); i.hasNext();) {
-			ModelQueryAction action = (ModelQueryAction) i.next();
-			if (action.getCMNode() != null) {
-				int cmNodeType = action.getCMNode().getNodeType();
-				if (action.getKind() == ModelQueryAction.INSERT) {
-					switch (cmNodeType) {
-						case CMNode.ATTRIBUTE_DECLARATION : {
-							actionList.add(createAddAttributeAction((Element) action.getParent(), (CMAttributeDeclaration) action.getCMNode()));
-							break;
-						}
-						case CMNode.ELEMENT_DECLARATION : {
-							actionList.add(createAddElementAction(action.getParent(), (CMElementDeclaration) action.getCMNode(), action.getStartIndex()));
-							break;
-						}
-					}
-				}
-				else if (action.getKind() == ModelQueryAction.REPLACE) {
-					if ((action.getParent() != null) && (action.getCMNode() != null)) {
-						actionList.add(createReplaceAction(action.getParent(), action.getCMNode(), action.getStartIndex(), action.getEndIndex()));
-					}
-				}
-			}
-		}
-		menuBuilder.populateMenu(menu, actionList, false);
-	}
-
-	protected void contributeAction(IMenuManager menu, Action action) {
-		if (action != null) {
-			menu.add(action);
-		}
-	}
-
-
-	public void contributeActions(IMenuManager menu, List selection) {
-		int editMode = modelQuery.getEditMode();
-		int ic = ModelQuery.INCLUDE_CHILD_NODES;
-		int vc = (editMode == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) ? ModelQuery.VALIDITY_STRICT : ModelQuery.VALIDITY_NONE;
-
-		List implicitlySelectedNodeList = null;
-
-		if (selection.size() > 0) {
-			implicitlySelectedNodeList = getSelectedNodes(selection, true);
-
-			// contribute delete actions
-			contributeDeleteActions(menu, implicitlySelectedNodeList, ic, vc);
-		}
-
-		if (selection.size() == 1) {
-			Node node = (Node) selection.get(0);
-
-			// contribute edit actions
-			contributeEditActions(menu, node);
-
-			// contribute add child actions
-			contributeAddChildActions(menu, node, ic, vc);
-
-			// contribute add before actions
-			contributeAddSiblingActions(menu, node, ic, vc);
-		}
-
-		if (selection.size() > 0) {
-			// contribute replace actions
-			contributeReplaceActions(menu, implicitlySelectedNodeList, ic, vc);
-		}
-
-		if (selection.size() == 0) {
-			Document document = ((IDOMModel) fModel).getDocument();
-			contributeAddDocumentChildActions(menu, document, ic, vc);
-			contributeEditGrammarInformationActions(menu, document);
-		}
-	}
-
-
-	protected void contributeAddChildActions(IMenuManager menu, Node node, int ic, int vc) {
-		int nodeType = node.getNodeType();
-
-		if (nodeType == Node.ELEMENT_NODE) {
-			// 'Add Child...' and 'Add Attribute...' actions
-			//
-			Element element = (Element) node;
-
-			IMenuManager addAttributeMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_ATTRIBUTE);
-			IMenuManager addChildMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_CHILD);
-			menu.add(addAttributeMenu);
-			menu.add(addChildMenu);
-
-			CMElementDeclaration ed = modelQuery.getCMElementDeclaration(element);
-			if (ed != null) {
-				// add insert attribute actions
-				//
-				List modelQueryActionList = new ArrayList();
-				modelQuery.getInsertActions(element, ed, -1, ModelQuery.INCLUDE_ATTRIBUTES, vc, modelQueryActionList);
-				addActionHelper(addAttributeMenu, modelQueryActionList);
-
-				// add insert child node actions
-				//
-				modelQueryActionList = new ArrayList();
-				modelQuery.getInsertActions(element, ed, -1, ic, vc, modelQueryActionList);
-				addActionHelper(addChildMenu, modelQueryActionList);
-			}
-
-			// add PI and COMMENT
-			contributePIAndCommentActions(addChildMenu, element, ed, -1);
-
-			// add PCDATA, CDATA_SECTION
-			contributeTextNodeActions(addChildMenu, element, ed, -1);
-
-			// add NEW ELEMENT
-			contributeUnconstrainedAddElementAction(addChildMenu, element, ed, -1);
-
-			// add ATTRIBUTE
-			contributeUnconstrainedAttributeActions(addAttributeMenu, element, ed);
-		}
-	}
-
-
-	protected void contributeAddDocumentChildActions(IMenuManager menu, Document document, int ic, int vc) {
-		IMenuManager addChildMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_CHILD);
-		menu.add(addChildMenu);
-
-		// add PI and COMMENT
-		contributePIAndCommentActions(addChildMenu, document, -1);
-
-		// add NEW ELEMENT
-		contributeUnconstrainedAddElementAction(addChildMenu, document, -1);
-	}
-
-
-	protected void contributeAddSiblingActions(IMenuManager menu, Node node, int ic, int vc) {
-		IMenuManager addBeforeMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_BEFORE);
-		IMenuManager addAfterMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_AFTER);
-		menu.add(addBeforeMenu);
-		menu.add(addAfterMenu);
-
-		Node parentNode = node.getParentNode();
-		if (parentNode != null) {
-			int index = getIndex(parentNode, node);
-			if (parentNode.getNodeType() == Node.ELEMENT_NODE) {
-				Element parentElement = (Element) parentNode;
-				CMElementDeclaration parentED = modelQuery.getCMElementDeclaration(parentElement);
-				if (parentED != null) {
-					// 'Add Before...' and 'Add After...' actions
-					//
-					List modelQueryActionList = new ArrayList();
-					modelQuery.getInsertActions(parentElement, parentED, index, ic, vc, modelQueryActionList);
-					addActionHelper(addBeforeMenu, modelQueryActionList);
-
-					modelQueryActionList = new ArrayList();
-					modelQuery.getInsertActions(parentElement, parentED, index + 1, ic, vc, modelQueryActionList);
-					addActionHelper(addAfterMenu, modelQueryActionList);
-				}
-
-				// add COMMENT and PI before and after
-				contributePIAndCommentActions(addBeforeMenu, parentElement, parentED, index);
-				contributePIAndCommentActions(addAfterMenu, parentElement, parentED, index + 1);
-
-				// add PCDATA, CDATA_SECTION before and after
-				contributeTextNodeActions(addBeforeMenu, parentElement, parentED, index);
-				contributeTextNodeActions(addAfterMenu, parentElement, parentED, index + 1);
-
-				// add NEW ELEMENT before and after
-				contributeUnconstrainedAddElementAction(addBeforeMenu, parentElement, parentED, index);
-				contributeUnconstrainedAddElementAction(addAfterMenu, parentElement, parentED, index + 1);
-			}
-			else if (parentNode.getNodeType() == Node.DOCUMENT_NODE) {
-				Document document = (Document) parentNode;
-				CMDocument cmDocument = modelQuery.getCorrespondingCMDocument(parentNode);
-				if (cmDocument != null) {
-					// add possible root element insertions
-					//        
-					List modelQueryActionList = new ArrayList();
-					modelQuery.getInsertActions(document, cmDocument, index, ic, vc, modelQueryActionList);
-					addActionHelper(addAfterMenu, modelQueryActionList);
-
-					modelQueryActionList = new ArrayList();
-					modelQuery.getInsertActions(document, cmDocument, index + 1, ic, vc, modelQueryActionList);
-					addActionHelper(addAfterMenu, modelQueryActionList);
-				}
-
-				// add COMMENT and PI before and after
-				contributePIAndCommentActions(addBeforeMenu, document, index);
-				contributePIAndCommentActions(addAfterMenu, document, index + 1);
-
-				// add ELEMENT before and after
-				contributeUnconstrainedAddElementAction(addBeforeMenu, document, index);
-				contributeUnconstrainedAddElementAction(addAfterMenu, document, index + 1);
-			}
-		}
-	}
-
-	protected void contributeDeleteActions(IMenuManager menu, List list, int ic, int vc) {
-		boolean canRemove = modelQuery.canRemove(list, vc);
-
-
-		// a delete action with an empty list will produce a disabled menu
-		// item
-		//
-		List resultList = canRemove ? list : Collections.EMPTY_LIST;
-		contributeAction(menu, createDeleteAction(resultList));
-	}
-
-
-	protected void contributeEditActions(IMenuManager menu, Node node) {
-		contributeEditGrammarInformationActions(menu, node);
-
-		if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
-			contributeAction(menu, createEditProcessingInstructionAction((ProcessingInstruction) node));
-		}
-		else if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
-			contributeAction(menu, createEditAttributeAction((Attr) node, null));
-		}
-	}
-
-
-	protected void contributeEditGrammarInformationActions(IMenuManager menu, Node node) {
-		Document document = node.getNodeType() == Node.DOCUMENT_NODE ? (Document) node : node.getOwnerDocument();
-
-		DocumentType doctype = getDoctype(node);
-		if (doctype == null) {
-			contributeAction(menu, createAddDoctypeAction(document, -1));
-		}
-
-		if (node.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
-			contributeAction(menu, createEditDoctypeAction((DocumentType) node));
-		}
-
-		if ((doctype == null) && (getRootElement(document) != null)) {
-			contributeAction(menu, createEditSchemaInfoAction(getRootElement(document)));
-		}
-	}
-
-	protected void contributePIAndCommentActions(IMenuManager menu, Document document, int index) {
-		// test to make sure that the index isn't before the XML declaration
-		// 
-		contributeAction(menu, createAddCommentAction(document, index));
-		contributeAction(menu, createAddProcessingInstructionAction(document, index));
-	}
-
-
-	protected void contributePIAndCommentActions(IMenuManager menu, Element parentElement, CMElementDeclaration parentEd, int index) {
-		if ((parentEd == null) || isCommentAllowed(parentEd)) {
-			contributeAction(menu, createAddCommentAction(parentElement, index));
-			contributeAction(menu, createAddProcessingInstructionAction(parentElement, index));
-		}
-	}
-
-
-	protected void contributeReplaceActions(IMenuManager menu, List selectedNodeList, int ic, int vc) {
-		// 'Replace With...' actions
-		//                                                                                                                   
-		IMenuManager replaceWithMenu = new MyMenuManager(XMLUIMessages._UI_MENU_REPLACE_WITH);
-		menu.add(replaceWithMenu);
-
-		if ((modelQuery.getEditMode() == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) && (selectedNodeList.size() > 0)) {
-			Node node = (Node) selectedNodeList.get(0);
-			Node parentNode = node.getParentNode();
-			if ((parentNode != null) && (parentNode.getNodeType() == Node.ELEMENT_NODE)) {
-				Element parentElement = (Element) parentNode;
-				CMElementDeclaration parentED = modelQuery.getCMElementDeclaration(parentElement);
-				if (parentED != null) {
-					List replaceActionList = new Vector();
-					modelQuery.getReplaceActions(parentElement, parentED, selectedNodeList, ic, vc, replaceActionList);
-					addActionHelper(replaceWithMenu, replaceActionList);
-				}
-			}
-		}
-	}
-
-	protected void contributeTextNodeActions(IMenuManager menu, Element parentElement, CMElementDeclaration parentEd, int index) {
-		if ((parentEd == null) || isTextAllowed(parentEd)) {
-			CMDataType dataType = parentEd != null ? parentEd.getDataType() : null;
-			contributeAction(menu, createAddPCDataAction(parentElement, dataType, index));
-			contributeAction(menu, createAddCDataSectionAction(parentElement, index));
-		}
-	}
-
-
-	protected void contributeUnconstrainedAddElementAction(IMenuManager menu, Document document, int index) {
-		if (isUnconstrainedActionAllowed()) {
-			if (getRootElement(document) == null) {
-				int xmlDeclarationIndex = -1;
-				int doctypeIndex = -1;
-				NodeList nodeList = document.getChildNodes();
-				int nodeListLength = nodeList.getLength();
-				for (int i = 0; i < nodeListLength; i++) {
-					Node node = nodeList.item(i);
-					int nodeType = node.getNodeType();
-					if (nodeType == Node.DOCUMENT_TYPE_NODE) {
-						doctypeIndex = i;
-						break;
-					}
-					else if (nodeType == Node.PROCESSING_INSTRUCTION_NODE) {
-						ProcessingInstruction pi = (ProcessingInstruction) node;
-						if (pi.getTarget().equalsIgnoreCase("xml") && (xmlDeclarationIndex == -1)) { //$NON-NLS-1$
-							xmlDeclarationIndex = i;
-						}
-					}
-				}
-
-				if (((xmlDeclarationIndex == -1) || (index > xmlDeclarationIndex)) && ((doctypeIndex == -1) || (index > doctypeIndex))) {
-					contributeAction(menu, createAddElementAction(document, null, index));
-				}
-			}
-		}
-	}
-
-
-	protected void contributeUnconstrainedAddElementAction(IMenuManager menu, Element parentElement, CMElementDeclaration parentEd, int index) {
-		if (isUnconstrainedActionAllowed()) {
-			if ((parentEd == null) || (parentEd.getProperty("isInferred") == Boolean.TRUE) || ((modelQuery.getEditMode() != ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) && isElementAllowed(parentEd))) { //$NON-NLS-1$
-				contributeAction(menu, createAddElementAction(parentElement, null, index));
-			}
-		}
-	}
-
-
-	protected void contributeUnconstrainedAttributeActions(IMenuManager menu, Element parentElement, CMElementDeclaration parentEd) {
-		if (isUnconstrainedActionAllowed()) {
-			if ((parentEd == null) || (parentEd.getProperty("isInferred") == Boolean.TRUE) || (modelQuery.getEditMode() != ModelQuery.EDIT_MODE_CONSTRAINED_STRICT)) { //$NON-NLS-1$
-				contributeAction(menu, createAddAttributeAction(parentElement, null));
-			}
-		}
-	}
-
-	abstract protected Action createAddAttributeAction(Element parent, CMAttributeDeclaration ad);
-
-	abstract protected Action createAddCDataSectionAction(Node parent, int index);
-
-	abstract protected Action createAddCommentAction(Node parent, int index);
-
-	abstract protected Action createAddDoctypeAction(Document parent, int index);
-
-	abstract protected Action createAddElementAction(Node parent, CMElementDeclaration ed, int index);
-
-	abstract protected Action createAddPCDataAction(Node parent, CMDataType dataType, int index);
-
-	abstract protected Action createAddProcessingInstructionAction(Node parent, int index);
-
-	abstract protected Action createAddSchemaInfoAction(Element element);
-
-	abstract protected Action createDeleteAction(List selection);
-
-	abstract protected Action createEditAttributeAction(Attr attribute, CMAttributeDeclaration ad);
-
-	abstract protected Action createEditDoctypeAction(DocumentType doctype);
-
-	abstract protected Action createEditProcessingInstructionAction(ProcessingInstruction pi);
-
-	abstract protected Action createEditSchemaInfoAction(Element element);
-
-	abstract protected Action createRenameAction(Node node);
-
-	abstract protected Action createReplaceAction(Node parent, CMNode cmnode, int startIndex, int endIndex);
-
-
-	public int getIndex(Node parentNode, Node child) {
-		NodeList nodeList = parentNode.getChildNodes();
-		int index = -1;
-		int size = nodeList.getLength();
-		for (int i = 0; i < size; i++) {
-			if (nodeList.item(i) == child) {
-				index = i;
-				break;
-			}
-		}
-		return index;
-	}
-
-
-	public Node getRefChildNodeAtIndex(Node parent, int index) {
-		NodeList nodeList = parent.getChildNodes();
-		Node refChild = ((index >= 0) && (index < nodeList.getLength())) ? nodeList.item(index) : null;
-		return refChild;
-	}
-
-
-	protected Element getRootElement(Document document) {
-		Element result = null;
-		NodeList nodeList = document.getChildNodes();
-		int nodeListLength = nodeList.getLength();
-		for (int i = 0; i < nodeListLength; i++) {
-			Node node = nodeList.item(i);
-			if (node.getNodeType() == Node.ELEMENT_NODE) {
-				result = (Element) node;
-				break;
-			}
-		}
-		return result;
-	}
-
-
-	protected List getSelectedNodes(List list, boolean includeTextNodes) {
-		List result = new ArrayList(0);
-		for (Iterator i = list.iterator(); i.hasNext();) {
-			Object object = i.next();
-			if (object instanceof Node) {
-				Node node = (Node) object;
-				if (node.getNodeType() == Node.TEXT_NODE) {
-					if (includeTextNodes) {
-						result.add(object);
-					}
-				}
-				else {
-					result.add(node);
-				}
-			}
-		}
-		return result;
-	}
-
-
-	protected boolean isCommentAllowed(CMElementDeclaration parentEd) {
-		int contentType = parentEd.getContentType();
-		return (contentType == CMElementDeclaration.ELEMENT) || (contentType == CMElementDeclaration.MIXED) || (contentType == CMElementDeclaration.PCDATA) || (contentType == CMElementDeclaration.ANY);
-	}
-
-
-	protected boolean isElementAllowed(CMElementDeclaration parentEd) {
-		int contentType = parentEd.getContentType();
-		return (contentType == CMElementDeclaration.ELEMENT) || (contentType == CMElementDeclaration.MIXED) || (contentType == CMElementDeclaration.ANY);
-	}
-
-
-	protected boolean isTextAllowed(CMElementDeclaration parentEd) {
-		int contentType = parentEd.getContentType();
-		return (contentType == CMElementDeclaration.MIXED) || (contentType == CMElementDeclaration.PCDATA) || (contentType == CMElementDeclaration.ANY);
-	}
-
-
-	protected boolean isUnconstrainedActionAllowed() {
-		return true;
-	}
-
-
-	protected boolean isWhitespaceTextNode(Node node) {
-		return (node != null) && (node.getNodeType() == Node.TEXT_NODE) && (node.getNodeValue().trim().length() == 0);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/CleanupActionXMLDelegate.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/CleanupActionXMLDelegate.java
deleted file mode 100644
index d91a815..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/CleanupActionXMLDelegate.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupProcessor;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
-import org.eclipse.wst.xml.core.internal.cleanup.CleanupProcessorXML;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/**
- * Cleanup action delegate for CSS editor
- */
-public class CleanupActionXMLDelegate implements IEditorActionDelegate, IActionDelegate2, IViewActionDelegate {
-	private IEditorPart fEditor;
-	private IStructuredCleanupProcessor fCleanupProcessor;
-
-	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
-		fEditor = targetEditor;
-	}
-
-	public void dispose() {
-		// nulling out just in case
-		fEditor = null;
-		fCleanupProcessor = null;
-	}
-
-	public void init(IAction action) {
-		if (action != null) {
-			action.setText(XMLUIMessages.CleanupDocument_label);
-			action.setToolTipText(XMLUIMessages.CleanupDocument_tooltip);
-			action.setDescription(XMLUIMessages.CleanupDocument_description);
-		}
-	}
-
-	public void runWithEvent(IAction action, Event event) {
-		run(action);
-	}
-
-	public void init(IViewPart view) {
-		// do nothing
-	}
-
-	public void run(IAction action) {
-		if (fEditor instanceof ITextEditor) {
-			final ITextEditor editor = (ITextEditor) fEditor;
-			Dialog cleanupDialog = new CleanupDialogXML(editor.getSite().getShell());
-			if (cleanupDialog.open() == Window.OK) {
-				// setup runnable
-				Runnable runnable = new Runnable() {
-					public void run() {
-						IStructuredCleanupProcessor cleanupProcessor = getCleanupProcessor();
-						if (cleanupProcessor != null) {
-							IStructuredModel model = null;
-							try {
-								model = StructuredModelManager.getModelManager().getExistingModelForEdit(editor.getDocumentProvider().getDocument(editor.getEditorInput()));
-								if (model != null) {
-									cleanupProcessor.cleanupModel(model);
-								}
-							}
-							finally {
-								if (model != null) {
-									model.releaseFromEdit();
-								}
-							}
-						}
-					}
-				};
-
-				// TODO: make independent of 'model'.
-				IStructuredModel model = null;
-				try {
-					model = StructuredModelManager.getModelManager().getExistingModelForEdit(editor.getDocumentProvider().getDocument(editor.getEditorInput()));
-					if (model != null) {
-						// begin recording
-						ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
-						model.beginRecording(this, SSEUIMessages.Cleanup_Document_UI_, SSEUIMessages.Cleanup_Document_UI_, selection.getOffset(), selection.getLength());
-
-						// tell the model that we are about to make a big
-						// model change
-						model.aboutToChangeModel();
-
-						// run
-						BusyIndicator.showWhile(fEditor.getEditorSite().getWorkbenchWindow().getShell().getDisplay(), runnable);
-					}
-				}
-				finally {
-					if (model != null) {
-						// tell the model that we are done with the big
-						// model
-						// change
-						model.changedModel();
-
-						// end recording
-						ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
-						model.endRecording(this, selection.getOffset(), selection.getLength());
-						model.releaseFromEdit();
-					}
-				}
-			}
-		}
-	}
-
-	public void selectionChanged(IAction action, ISelection selection) {
-		// do nothing
-	}
-
-	IStructuredCleanupProcessor getCleanupProcessor() {
-		if (fCleanupProcessor == null) {
-			fCleanupProcessor = new CleanupProcessorXML();
-		}
-
-		return fCleanupProcessor;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/CleanupDialogXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/CleanupDialogXML.java
deleted file mode 100644
index 97b718a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/CleanupDialogXML.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.preferences.XMLCorePreferenceNames;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-
-public class CleanupDialogXML extends Dialog implements SelectionListener {
-	protected Button fCheckBoxCompressEmptyElementTags;
-	protected Button fCheckBoxConvertEOLCodes;
-	protected Button fCheckBoxFormatSource;
-	protected Button fCheckBoxInsertMissingTags;
-	protected Button fCheckBoxInsertRequiredAttrs;
-	protected Button fCheckBoxQuoteAttrValues;
-	protected IStructuredModel fModel = null;
-	protected Preferences fPreferences = null;
-	protected Button fRadioButtonAttrNameCaseAsis;
-	protected Button fRadioButtonAttrNameCaseLower;
-	protected Button fRadioButtonAttrNameCaseUpper;
-	protected Button fRadioButtonConvertEOLMac;
-	protected Button fRadioButtonConvertEOLUnix;
-	protected Button fRadioButtonConvertEOLWindows;
-
-	protected Button fRadioButtonTagNameCaseAsis;
-	protected Button fRadioButtonTagNameCaseLower;
-	protected Button fRadioButtonTagNameCaseUpper;
-
-	public CleanupDialogXML(Shell shell) {
-
-		super(shell);
-	}
-
-	public Control createDialogArea(Composite parent) {
-
-		getShell().setText(XMLUIMessages.Cleanup_UI_);
-		Composite composite = new Composite(parent, SWT.NULL);
-		createDialogAreaInComposite(composite);
-		initializeOptions();
-		return composite;
-	}
-
-	protected void createDialogAreaInComposite(Composite composite) {
-
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.CLEANUP_XML_HELPID); // use
-		// XML
-		// specific
-		// help
-
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 1;
-		layout.makeColumnsEqualWidth = true;
-		composite.setLayout(layout);
-
-		// Compress empty element tags
-		fCheckBoxCompressEmptyElementTags = new Button(composite, SWT.CHECK);
-		fCheckBoxCompressEmptyElementTags.setText(XMLUIMessages.Compress_empty_element_tags_UI_);
-		fCheckBoxCompressEmptyElementTags.addSelectionListener(this);
-
-		// Insert missing required attrs
-		fCheckBoxInsertRequiredAttrs = new Button(composite, SWT.CHECK);
-		fCheckBoxInsertRequiredAttrs.setText(XMLUIMessages.Insert_required_attributes_UI_);
-		fCheckBoxInsertRequiredAttrs.addSelectionListener(this);
-
-		// Insert missing begin/end tags
-		fCheckBoxInsertMissingTags = new Button(composite, SWT.CHECK);
-		fCheckBoxInsertMissingTags.setText(XMLUIMessages.Insert_missing_tags_UI_);
-		fCheckBoxInsertMissingTags.addSelectionListener(this);
-
-		// Quote attribute values
-		fCheckBoxQuoteAttrValues = new Button(composite, SWT.CHECK);
-		fCheckBoxQuoteAttrValues.setText(XMLUIMessages.Quote_attribute_values_UI_);
-		fCheckBoxQuoteAttrValues.addSelectionListener(this);
-
-		// Format source
-		fCheckBoxFormatSource = new Button(composite, SWT.CHECK);
-		fCheckBoxFormatSource.setText(XMLUIMessages.Format_source_UI_);
-		fCheckBoxFormatSource.addSelectionListener(this);
-
-		// Convert EOL code
-		fCheckBoxConvertEOLCodes = new Button(composite, SWT.CHECK);
-		fCheckBoxConvertEOLCodes.setText(XMLUIMessages.Convert_EOL_codes_UI_);
-		fCheckBoxConvertEOLCodes.addSelectionListener(this);
-		Composite EOLCodes = new Composite(composite, SWT.NULL);
-		GridLayout hLayout = new GridLayout();
-		hLayout.numColumns = 3;
-		EOLCodes.setLayout(hLayout);
-		fRadioButtonConvertEOLWindows = new Button(EOLCodes, SWT.RADIO);
-		fRadioButtonConvertEOLWindows.setText(XMLUIMessages.EOL_Windows_UI);
-		fRadioButtonConvertEOLWindows.addSelectionListener(this);
-		fRadioButtonConvertEOLUnix = new Button(EOLCodes, SWT.RADIO);
-		fRadioButtonConvertEOLUnix.setText(XMLUIMessages.EOL_Unix_UI);
-		fRadioButtonConvertEOLUnix.addSelectionListener(this);
-		fRadioButtonConvertEOLMac = new Button(EOLCodes, SWT.RADIO);
-		fRadioButtonConvertEOLMac.setText(XMLUIMessages.EOL_Mac_UI);
-		fRadioButtonConvertEOLMac.addSelectionListener(this);
-	}
-
-	protected void enableEOLCodeRadios(boolean enable) {
-
-		if ((fRadioButtonConvertEOLWindows != null) && (fRadioButtonConvertEOLUnix != null) && (fRadioButtonConvertEOLMac != null)) {
-			fRadioButtonConvertEOLWindows.setEnabled(enable);
-			fRadioButtonConvertEOLUnix.setEnabled(enable);
-			fRadioButtonConvertEOLMac.setEnabled(enable);
-			if (!fRadioButtonConvertEOLWindows.getSelection() && !fRadioButtonConvertEOLUnix.getSelection() && !fRadioButtonConvertEOLMac.getSelection()) {
-				fRadioButtonConvertEOLWindows.setSelection(true);
-			}
-		}
-	}
-
-	protected Preferences getModelPreferences() {
-		return XMLCorePlugin.getDefault().getPluginPreferences();
-	}
-
-	protected void initializeOptions() {
-
-		fCheckBoxCompressEmptyElementTags.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.COMPRESS_EMPTY_ELEMENT_TAGS));
-		fCheckBoxInsertRequiredAttrs.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.INSERT_REQUIRED_ATTRS));
-		fCheckBoxInsertMissingTags.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.INSERT_MISSING_TAGS));
-		fCheckBoxQuoteAttrValues.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.QUOTE_ATTR_VALUES));
-		fCheckBoxFormatSource.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.FORMAT_SOURCE));
-		fCheckBoxConvertEOLCodes.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.CONVERT_EOL_CODES));
-		String EOLCode = getModelPreferences().getString(XMLCorePreferenceNames.CLEANUP_EOL_CODE);
-		if (EOLCode.compareTo(CommonEncodingPreferenceNames.LF) == 0) {
-			fRadioButtonConvertEOLUnix.setSelection(true);
-		}
-		else if (EOLCode.compareTo(CommonEncodingPreferenceNames.CR) == 0) {
-			fRadioButtonConvertEOLMac.setSelection(true);
-		}
-		else {
-			fRadioButtonConvertEOLWindows.setSelection(true);
-		}
-		enableEOLCodeRadios(fCheckBoxConvertEOLCodes.getSelection());
-	}
-
-	protected void okPressed() {
-
-		storeOptions();
-		super.okPressed();
-	}
-
-	public void setModel(IStructuredModel model) {
-
-		fModel = model;
-	}
-
-	protected void storeOptions() {
-
-		getModelPreferences().setValue(XMLCorePreferenceNames.COMPRESS_EMPTY_ELEMENT_TAGS, fCheckBoxCompressEmptyElementTags.getSelection());
-		getModelPreferences().setValue(XMLCorePreferenceNames.INSERT_REQUIRED_ATTRS, fCheckBoxInsertRequiredAttrs.getSelection());
-		getModelPreferences().setValue(XMLCorePreferenceNames.INSERT_MISSING_TAGS, fCheckBoxInsertMissingTags.getSelection());
-		getModelPreferences().setValue(XMLCorePreferenceNames.QUOTE_ATTR_VALUES, fCheckBoxQuoteAttrValues.getSelection());
-		getModelPreferences().setValue(XMLCorePreferenceNames.FORMAT_SOURCE, fCheckBoxFormatSource.getSelection());
-		getModelPreferences().setValue(XMLCorePreferenceNames.CONVERT_EOL_CODES, fCheckBoxConvertEOLCodes.getSelection());
-		if (fRadioButtonConvertEOLUnix.getSelection()) {
-			getModelPreferences().setValue(XMLCorePreferenceNames.CLEANUP_EOL_CODE, CommonEncodingPreferenceNames.LF);
-		}
-		else if (fRadioButtonConvertEOLMac.getSelection()) {
-			getModelPreferences().setValue(XMLCorePreferenceNames.CLEANUP_EOL_CODE, CommonEncodingPreferenceNames.CR);
-		}
-		else {
-			getModelPreferences().setValue(XMLCorePreferenceNames.CLEANUP_EOL_CODE, CommonEncodingPreferenceNames.CRLF);
-		}
-		// explicitly save plugin preferences so values are stored
-		XMLCorePlugin.getDefault().savePluginPreferences();
-	}
-
-	public void widgetDefaultSelected(SelectionEvent e) {
-
-		widgetSelected(e);
-	}
-
-	public void widgetSelected(SelectionEvent e) {
-
-		getButton(OK).setEnabled(((fRadioButtonTagNameCaseLower != null) && (fRadioButtonTagNameCaseLower.getSelection() || fRadioButtonTagNameCaseUpper.getSelection())) || ((fRadioButtonAttrNameCaseLower != null) && (fRadioButtonAttrNameCaseLower.getSelection() || fRadioButtonAttrNameCaseUpper.getSelection())) || fCheckBoxInsertMissingTags.getSelection() || fCheckBoxQuoteAttrValues.getSelection() || fCheckBoxFormatSource.getSelection() || fCheckBoxConvertEOLCodes.getSelection() || ((fRadioButtonConvertEOLUnix != null) && (fRadioButtonConvertEOLUnix.getSelection() || fRadioButtonConvertEOLMac.getSelection() || fRadioButtonConvertEOLWindows.getSelection())));
-		if (e.widget == fCheckBoxConvertEOLCodes) {
-			enableEOLCodeRadios(fCheckBoxConvertEOLCodes.getSelection());
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditAttributeAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditAttributeAction.java
deleted file mode 100644
index 3da8aa7..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditAttributeAction.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.dialogs.EditAttributeDialog;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-public class EditAttributeAction extends NodeAction {
-	protected static ImageDescriptor imageDescriptor;
-
-	public static ImageDescriptor createImageDescriptor() {
-		if (imageDescriptor == null) {
-			imageDescriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
-		}
-		return imageDescriptor;
-	}
-
-	protected Attr attr;
-	protected AbstractNodeActionManager manager;
-	protected Element ownerElement;
-	protected String title;
-
-	public EditAttributeAction(AbstractNodeActionManager manager, Element ownerElement, Attr attr, String actionLabel, String title) {
-		this.manager = manager;
-		this.ownerElement = ownerElement;
-		this.attr = attr;
-		this.title = title;
-		setText(actionLabel);
-		// assume if attr is null then this is an 'Add' that requires action
-		// an icons... otherwise this is an edit
-		if (attr == null) {
-			setImageDescriptor(createImageDescriptor());
-		}
-	}
-
-	public String getUndoDescription() {
-		return title;
-	}
-
-	public void run() {
-		manager.beginNodeAction(this);
-		Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
-		EditAttributeDialog dialog = new EditAttributeDialog(shell, ownerElement, attr);
-		dialog.create();
-		dialog.getShell().setText(title);
-		dialog.setBlockOnOpen(true);
-		dialog.open();
-
-		if (dialog.getReturnCode() == Window.OK) {
-			if (attr != null) {
-				ownerElement.removeAttributeNode(attr);
-			}
-			Document document = ownerElement.getOwnerDocument();
-			Attr newAttribute = document.createAttribute(dialog.getAttributeName());
-			newAttribute.setValue(dialog.getAttributeValue());
-			ownerElement.setAttributeNode(newAttribute);
-			manager.setViewerSelection(newAttribute);
-		}
-		manager.endNodeAction(this);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditDoctypeAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditDoctypeAction.java
deleted file mode 100644
index 6330044..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditDoctypeAction.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocumentType;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.dialogs.EditDoctypeDialog;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * EditDoctypeAction
- */
-public class EditDoctypeAction extends Action {
-	protected DocumentType doctype;
-	protected Document document;
-	protected IStructuredModel model;
-	protected String resourceLocation;
-	protected String title;
-
-	/**
-	 * This constructor is used to create a new doctype.
-	 */
-	public EditDoctypeAction(IStructuredModel model, Document document, String resourceLocation, String title) {
-		setText(title);
-		this.model = model;
-		this.document = document;
-		this.resourceLocation = resourceLocation;
-		this.title = title;
-	}
-
-	/**
-	 * This constructor is used to edit an exisitng doctype.
-	 */
-	public EditDoctypeAction(IStructuredModel model, DocumentType doctype, String resourceLocation, String title) {
-		setText(title);
-		this.model = model;
-		this.doctype = doctype;
-		this.resourceLocation = resourceLocation;
-		this.title = title;
-	}
-
-
-	protected DocumentType createDoctype(EditDoctypeDialog dialog, Document document) {
-		DocumentType result = null;
-		if (document instanceof DocumentImpl) {
-			IDOMDocument documentImpl = (IDOMDocument) document;
-			IDOMDocumentType doctypeImpl = (IDOMDocumentType) documentImpl.createDoctype(dialog.getName());
-			doctypeImpl.setPublicId(dialog.getPublicId());
-			doctypeImpl.setSystemId(dialog.getSystemId());
-			result = doctypeImpl;
-		}
-		return result;
-	}
-
-	private Display getDisplay() {
-
-		return PlatformUI.getWorkbench().getDisplay();
-	}
-
-
-	protected String getRootElementName(Document document) {
-		Element rootElement = null;
-		NodeList nodeList = document.getChildNodes();
-		int nodeListLength = nodeList.getLength();
-		for (int i = 0; i < nodeListLength; i++) {
-			Node childNode = nodeList.item(i);
-			if (childNode.getNodeType() == Node.ELEMENT_NODE) {
-				rootElement = (Element) childNode;
-				break;
-			}
-		}
-		return rootElement != null ? rootElement.getNodeName() : XMLUIMessages._UI_LABEL_ROOT_ELEMENT_VALUE;
-	}
-
-	public String getUndoDescription() {
-		return title;
-	}
-
-
-	protected void insertDoctype(DocumentType doctype, Document document) {
-		Node refChild = null;
-		NodeList nodeList = document.getChildNodes();
-		int nodeListLength = nodeList.getLength();
-		for (int i = 0; i < nodeListLength; i++) {
-			Node childNode = nodeList.item(i);
-			if ((childNode.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) || (childNode.getNodeType() == Node.COMMENT_NODE)) {
-				// continue on to the nextNode
-			}
-			else {
-				refChild = childNode;
-				break;
-			}
-		}
-
-		document.insertBefore(doctype, refChild);
-		// manager.reformat(doctype, false);
-	}
-
-	public void run() {
-		model.beginRecording(this, getUndoDescription());
-		// Shell shell =
-		// XMLCommonUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
-		Shell shell = getDisplay().getActiveShell();
-		EditDoctypeDialog dialog = showEditDoctypeDialog(shell);
-
-		if (dialog.getReturnCode() == Window.OK) {
-			if (doctype != null) {
-				updateDoctype(dialog, doctype);
-			}
-			else if (document != null) {
-				DocumentType doctype = createDoctype(dialog, document);
-				if (doctype != null) {
-					insertDoctype(doctype, document);
-				}
-			}
-		}
-		model.endRecording(this);
-	}
-
-	protected EditDoctypeDialog showEditDoctypeDialog(Shell shell) {
-		EditDoctypeDialog dialog = null;
-
-		if (doctype != null) {
-			dialog = new EditDoctypeDialog(shell, doctype);
-			if (title == null) {
-				title = XMLUIMessages._UI_LABEL_EDIT_DOCTYPE;
-			}
-		}
-		else if (document != null) {
-			String rootElementName = getRootElementName(document);
-			dialog = new EditDoctypeDialog(shell, rootElementName, "", rootElementName + ".dtd"); //$NON-NLS-1$ //$NON-NLS-2$
-			if (title == null) {
-				title = XMLUIMessages._UI_MENU_ADD_DTD_INFORMATION_TITLE;
-			}
-		}
-
-		dialog.setComputeSystemId((doctype == null) || (doctype.getSystemId() == null) || (doctype.getSystemId().trim().length() == 0));
-
-		dialog.setErrorChecking(false);// !model.getType().equals(IStructuredModel.HTML));
-		dialog.create();
-		dialog.getShell().setText(title);
-		dialog.setBlockOnOpen(true);
-		dialog.setResourceLocation(new Path(resourceLocation));
-		dialog.open();
-
-		return dialog;
-	}
-
-
-	protected void updateDoctype(EditDoctypeDialog dialog, DocumentType doctype) {
-		if (doctype instanceof IDOMDocumentType) {
-			IDOMDocumentType doctypeImpl = (IDOMDocumentType) doctype;
-			if (doctypeImpl.getName().equals(dialog.getName())) {
-				doctypeImpl.setPublicId(dialog.getPublicId());
-				doctypeImpl.setSystemId(dialog.getSystemId());
-			}
-			else {
-				// we need to create a new one and remove the old
-				//                  
-				Document document = doctype.getOwnerDocument();
-				DocumentType newDoctype = createDoctype(dialog, document);
-				document.insertBefore(newDoctype, doctype);
-				document.removeChild(doctype);
-				// manager.reformat(newDoctype, false);
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditElementAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditElementAction.java
deleted file mode 100644
index b944268..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditElementAction.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.dialogs.EditElementDialog;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public class EditElementAction extends NodeAction {
-
-	protected static ImageDescriptor imageDescriptor;
-
-	public static ImageDescriptor createImageDescriptor() {
-		if (imageDescriptor == null) {
-			imageDescriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_OBJ_ELEMENT);
-		}
-		return imageDescriptor;
-	}
-
-	protected Element element;
-	protected int insertionIndex = -1;
-	protected AbstractNodeActionManager manager;
-	protected Node parent;
-	protected String title;
-
-	public EditElementAction(AbstractNodeActionManager manager, Element element, String actionLabel, String dialogTitle) {
-		this(manager, element.getParentNode(), -1, element, actionLabel, dialogTitle);
-	}
-
-	protected EditElementAction(AbstractNodeActionManager manager, Node parent, int index, Element element, String actionLabel, String title) {
-		this.manager = manager;
-		this.parent = parent;
-		this.insertionIndex = index;
-		this.element = element;
-		this.title = title;
-		setText(actionLabel);
-		if (element == null) {
-			setImageDescriptor(createImageDescriptor());
-		}
-	}
-
-	public EditElementAction(AbstractNodeActionManager manager, Node parent, int index, String actionLabel, String title) {
-		this(manager, parent, index, null, actionLabel, title);
-	}
-
-	public String getUndoDescription() {
-		return title;
-	}
-
-	public void run() {
-		manager.beginNodeAction(this);
-		Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
-		EditElementDialog dialog = new EditElementDialog(shell, element);
-		dialog.create();
-		dialog.getShell().setText(title);
-		dialog.setBlockOnOpen(true);
-		dialog.open();
-
-		if (dialog.getReturnCode() == Window.OK) {
-			Document document = parent.getNodeType() == Node.DOCUMENT_NODE ? (Document) parent : parent.getOwnerDocument();
-			if (element != null) {
-				// here we need to do a rename... which seems to be quite hard
-				// to do :-(
-				if (element instanceof IDOMElement) {
-					IDOMElement elementImpl = (IDOMElement) element;
-					IDOMModel model = elementImpl.getModel();
-					String oldName = elementImpl.getNodeName();
-					String newName = dialog.getElementName();
-					setStructuredDocumentRegionElementName(model, elementImpl.getStartStructuredDocumentRegion(), oldName, newName);
-					setStructuredDocumentRegionElementName(model, elementImpl.getEndStructuredDocumentRegion(), oldName, newName);
-				}
-			}
-			else {
-				Element newElement = document.createElement(dialog.getElementName());
-				NodeList nodeList = parent.getChildNodes();
-				int nodeListLength = nodeList.getLength();
-				Node refChild = (insertionIndex < nodeListLength) && (insertionIndex >= 0) ? nodeList.item(insertionIndex) : null;
-				parent.insertBefore(newElement, refChild);
-				manager.reformat(newElement, false);
-				manager.setViewerSelection(newElement);
-			}
-		}
-		manager.endNodeAction(this);
-	}
-
-	protected void setStructuredDocumentRegionElementName(IDOMModel model, IStructuredDocumentRegion flatNode, String oldName, String newName) {
-		if (flatNode != null) {
-			String string = flatNode.getText();
-			int index = string.indexOf(oldName);
-			if (index != -1) {
-				index += flatNode.getStart();
-				model.getStructuredDocument().replaceText(this, index, oldName.length(), newName);
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditProcessingInstructionAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditProcessingInstructionAction.java
deleted file mode 100644
index 9dec301..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditProcessingInstructionAction.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.dialogs.EditProcessingInstructionDialog;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.ProcessingInstruction;
-
-/**
- * EditProcessingInstructionAction
- */
-public class EditProcessingInstructionAction extends NodeAction {
-	protected Node childRef;
-	protected AbstractNodeActionManager manager;
-	protected Node parent;
-	protected ProcessingInstruction pi;
-	protected String title;
-
-	/**
-	 * This constructor is used to add a new ProcessingInstruction
-	 */
-	public EditProcessingInstructionAction(AbstractNodeActionManager manager, Node parent, Node childRef, String actionLabel, String title) {
-		setText(actionLabel);
-		this.manager = manager;
-		this.parent = parent;
-		this.childRef = childRef;
-		this.title = title;
-	}
-
-	/**
-	 * This constructor is used to edit a ProcessingInstruction
-	 */
-	public EditProcessingInstructionAction(AbstractNodeActionManager manager, ProcessingInstruction pi, String actionLabel, String title) {
-		setText(actionLabel);
-		this.manager = manager;
-		this.pi = pi;
-		this.parent = pi.getParentNode();
-		this.title = title;
-	}
-
-	public String getUndoDescription() {
-		return title;
-	}
-
-	public void run() {
-		manager.beginNodeAction(this);
-		Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
-
-		EditProcessingInstructionDialog dialog = null;
-		if (pi != null) {
-			dialog = new EditProcessingInstructionDialog(shell, pi);
-		}
-		else {
-			dialog = new EditProcessingInstructionDialog(shell, XMLUIMessages._UI_PI_TARGET_VALUE, XMLUIMessages._UI_PI_DATA_VALUE);
-		}
-
-		dialog.create();
-		dialog.getShell().setText(title);
-		dialog.setBlockOnOpen(true);
-		dialog.open();
-
-		if (dialog.getReturnCode() == Window.OK) {
-			if (pi != null) {
-				childRef = pi;
-			}
-
-			Document document = parent.getNodeType() == Node.DOCUMENT_NODE ? (Document) parent : parent.getOwnerDocument();
-			Node newNode = document.createProcessingInstruction(dialog.getTarget(), dialog.getData());
-			parent.insertBefore(newNode, childRef);
-
-			if (pi != null) {
-				parent.removeChild(pi);
-			}
-
-			manager.reformat(newNode, false);
-			manager.setViewerSelection(newNode);
-		}
-		manager.endNodeAction(this);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditSchemaInfoAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditSchemaInfoAction.java
deleted file mode 100644
index 699492c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditSchemaInfoAction.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceInfoManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.dialogs.EditSchemaInfoDialog;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * EditDoctypeAction
- */
-public class EditSchemaInfoAction extends NodeAction {
-	protected AbstractNodeActionManager manager;
-	protected DOMNamespaceInfoManager namespaceInfoManager = new DOMNamespaceInfoManager();
-	protected Node node;
-	protected String resourceLocation;
-	protected String title;
-
-	public EditSchemaInfoAction(AbstractNodeActionManager manager, Node node, String resourceLocation, String title) {
-		this.manager = manager;
-		this.node = node;
-		setText(title);
-		this.resourceLocation = resourceLocation;
-		this.title = title;
-	}
-
-	protected Map createPrefixMapping(List oldList, List newList) {
-		Map map = new Hashtable();
-
-		Hashtable oldURIToPrefixTable = new Hashtable();
-		for (Iterator i = oldList.iterator(); i.hasNext();) {
-			NamespaceInfo oldInfo = (NamespaceInfo) i.next();
-			oldURIToPrefixTable.put(oldInfo.uri, oldInfo);
-		}
-
-		for (Iterator i = newList.iterator(); i.hasNext();) {
-			NamespaceInfo newInfo = (NamespaceInfo) i.next();
-			NamespaceInfo oldInfo = (NamespaceInfo) oldURIToPrefixTable.get(newInfo.uri != null ? newInfo.uri : ""); //$NON-NLS-1$
-
-
-			// if oldInfo is non null ... there's a matching URI in the old
-			// set
-			// we can use its prefix to detemine out mapping
-			//
-			// if oldInfo is null ... we use the 'oldCopy' we stashed away
-			// assuming that the user changed the URI and the prefix
-			if (oldInfo == null) {
-				oldInfo = (NamespaceInfo) newInfo.getProperty("oldCopy"); //$NON-NLS-1$
-			}
-
-			if (oldInfo != null) {
-				String newPrefix = newInfo.prefix != null ? newInfo.prefix : ""; //$NON-NLS-1$
-				String oldPrefix = oldInfo.prefix != null ? oldInfo.prefix : ""; //$NON-NLS-1$
-				if (!oldPrefix.equals(newPrefix)) {
-					map.put(oldPrefix, newPrefix);
-				}
-			}
-		}
-		return map;
-	}
-
-	public Element getElement(Node node) {
-		Element result = null;
-		if (node.getNodeType() == Node.ELEMENT_NODE) {
-			result = (Element) node;
-		}
-		else if (node.getNodeType() == Node.DOCUMENT_NODE) {
-			result = getRootElement((Document) node);
-		}
-		return result;
-	}
-
-
-	public Element getRootElement(Document document) {
-		Element rootElement = null;
-		NodeList nodeList = document.getChildNodes();
-		int nodeListLength = nodeList.getLength();
-		for (int i = 0; i < nodeListLength; i++) {
-			Node childNode = nodeList.item(i);
-			if (childNode.getNodeType() == Node.ELEMENT_NODE) {
-				rootElement = (Element) childNode;
-				break;
-			}
-		}
-		return rootElement;
-	}
-
-	public String getUndoDescription() {
-		return title;
-	}
-
-	public void run() {
-		manager.beginNodeAction(this);
-
-		// todo... change constructor to take an element
-		Element element = getElement(node);
-		if (element != null) {
-			Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
-			EditSchemaInfoDialog dialog = new EditSchemaInfoDialog(shell, new Path(resourceLocation));
-
-			List namespaceInfoList = namespaceInfoManager.getNamespaceInfoList(element);
-			List oldNamespaceInfoList = NamespaceInfo.cloneNamespaceInfoList(namespaceInfoList);
-
-			// here we store a copy of the old info for each NamespaceInfo
-			// this info will be used in createPrefixMapping() to figure out
-			// how to update the document
-			// in response to these changes
-			for (Iterator i = namespaceInfoList.iterator(); i.hasNext();) {
-				NamespaceInfo info = (NamespaceInfo) i.next();
-				NamespaceInfo oldCopy = new NamespaceInfo(info);
-				info.setProperty("oldCopy", oldCopy); //$NON-NLS-1$
-			}
-
-			dialog.setNamespaceInfoList(namespaceInfoList);
-			dialog.create();
-			// dialog.getShell().setSize(500, 300);
-			dialog.getShell().setText(XMLUIMessages._UI_MENU_EDIT_SCHEMA_INFORMATION_TITLE);
-			dialog.setBlockOnOpen(true);
-			dialog.open();
-
-			if (dialog.getReturnCode() == Window.OK) {
-				List newInfoList = dialog.getNamespaceInfoList();
-				namespaceInfoManager.removeNamespaceInfo(element);
-				namespaceInfoManager.addNamespaceInfo(element, newInfoList, true);
-
-				// see if we need to rename any prefixes
-				Map prefixMapping = createPrefixMapping(oldNamespaceInfoList, namespaceInfoList);
-				if (prefixMapping.size() > 0) {
-					try {
-						manager.getModel().aboutToChangeModel();
-						ReplacePrefixAction replacePrefixAction = new ReplacePrefixAction(manager, element, prefixMapping);
-						replacePrefixAction.run();
-					}
-					finally {
-						manager.getModel().changedModel();
-					}
-				}
-			}
-		}
-		manager.endNodeAction(this);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/GoToMatchingTagAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/GoToMatchingTagAction.java
deleted file mode 100644
index 823cd59..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/GoToMatchingTagAction.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.jface.text.source.IAnnotationModelExtension;
-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.swt.widgets.Event;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.TextEditorAction;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-
-/**
- * Moves the cursor to the end tag if it is in a start tag, and vice versa.
- * Also updates the matching tag annotation in the active editor.
- * 
- * @author nitin
- * 
- */
-class GoToMatchingTagAction extends TextEditorAction {
-
-	private class UpdateListener implements ISelectionChangedListener {
-		public void selectionChanged(SelectionChangedEvent event) {
-			updateFor(event.getSelection());
-		}
-	}
-
-	private static final String ANNOTATION_TYPE = "org.eclipse.wst.xml.ui.matching.tag"; //$NON-NLS-1$
-	private ISelectionChangedListener fUpdateListener = null;
-	static final boolean DEBUG = false;
-
-	/**
-	 * @param bundle
-	 * @param prefix
-	 * @param editor
-	 * @param style
-	 */
-	GoToMatchingTagAction(ResourceBundle bundle, String prefix, ITextEditor editor) {
-		super(bundle, prefix, editor);
-		fUpdateListener = new UpdateListener();
-	}
-
-	void removeAnnotation(boolean allMatching) {
-		ITextEditor textEditor = getTextEditor();
-		if (textEditor == null) {
-			if (DEBUG) {
-				System.out.println("no editor"); //$NON-NLS-1$
-			}
-			return;
-		}
-		IDocumentProvider documentProvider = textEditor.getDocumentProvider();
-		if (documentProvider == null) {
-			if (DEBUG) {
-				System.out.println("no document provider"); //$NON-NLS-1$
-			}
-			return;
-		}
-		IAnnotationModel annotationModel = documentProvider.getAnnotationModel(textEditor.getEditorInput());
-		if (annotationModel == null) {
-			if (DEBUG) {
-				System.out.println("no annotation model"); //$NON-NLS-1$
-			}
-			return;
-		}
-
-		Iterator annotationIterator = annotationModel.getAnnotationIterator();
-		List oldAnnotations = new ArrayList();
-		while (annotationIterator.hasNext()) {
-			Annotation annotation = (Annotation) annotationIterator.next();
-			if (ANNOTATION_TYPE.equals(annotation.getType())) {
-				annotation.markDeleted(true);
-				/**
-				 * Sometimes it is supported, sometime's it is not. Confusing.
-				 */
-				try {
-					annotationIterator.remove();
-				}
-				catch (UnsupportedOperationException e) {
-					oldAnnotations.add(annotation);
-				}
-				if (DEBUG) {
-					System.out.println("removed " + annotation); //$NON-NLS-1$
-				}
-				if (!allMatching)
-					break;
-			}
-		}
-		if (!oldAnnotations.isEmpty()) {
-			int size = oldAnnotations.size();
-			for (int i = 0; i < size; i++) {
-				annotationModel.removeAnnotation((Annotation) oldAnnotations.get(i));
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
-	 */
-	public void runWithEvent(Event event) {
-		super.runWithEvent(event);
-		if (getTextEditor() == null)
-			return;
-
-		ISelection selection = getTextEditor().getSelectionProvider().getSelection();
-		if (!selection.isEmpty() && selection instanceof IStructuredSelection && selection instanceof ITextSelection) {
-			Object o = ((IStructuredSelection) selection).getFirstElement();
-			if (o instanceof IDOMNode) {
-				int offset = ((ITextSelection) selection).getOffset();
-				IStructuredDocumentRegion matchRegion = null;
-				if (((Node) o).getNodeType() == Node.ATTRIBUTE_NODE) {
-					o = ((Attr) o).getOwnerElement();
-				}
-
-				int targetOffset = -1;
-				if (o instanceof IDOMNode) {
-					IDOMNode node = (IDOMNode) o;
-					IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
-					if (startStructuredDocumentRegion != null && startStructuredDocumentRegion.containsOffset(offset)) {
-						matchRegion = ((IDOMNode) o).getEndStructuredDocumentRegion();
-						if (matchRegion != null)
-							targetOffset = matchRegion.getStartOffset() + 2;
-					}
-					else {
-						IStructuredDocumentRegion endStructuredDocumentRegion = node.getEndStructuredDocumentRegion();
-						if (endStructuredDocumentRegion != null && endStructuredDocumentRegion.containsOffset(offset)) {
-							matchRegion = ((IDOMNode) o).getStartStructuredDocumentRegion();
-							if (matchRegion != null)
-								targetOffset = matchRegion.getStartOffset() + 1;
-						}
-					}
-				}
-
-				if (targetOffset >= 0) {
-					getTextEditor().getSelectionProvider().setSelection(new TextSelection(targetOffset, 0));
-				}
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.texteditor.TextEditorAction#setEditor(org.eclipse.ui.texteditor.ITextEditor)
-	 */
-	public void setEditor(ITextEditor editor) {
-		ITextEditor textEditor = getTextEditor();
-		if (textEditor != null) {
-			removeAnnotation(true);
-
-			ISelectionProvider selectionProvider = textEditor.getSelectionProvider();
-			if (selectionProvider instanceof IPostSelectionProvider) {
-				((IPostSelectionProvider) selectionProvider).removePostSelectionChangedListener(fUpdateListener);
-			}
-		}
-		super.setEditor(editor);
-		if (editor != null) {
-			ISelectionProvider selectionProvider = editor.getSelectionProvider();
-			if (selectionProvider instanceof IPostSelectionProvider) {
-				((IPostSelectionProvider) selectionProvider).addPostSelectionChangedListener(fUpdateListener);
-			}
-
-			updateFor(selectionProvider.getSelection());
-		}
-	}
-
-	public void update() {
-		setEnabled(true);
-
-	}
-
-	void updateFor(ISelection selection) {
-		ITextEditor textEditor = getTextEditor();
-		if (textEditor == null) {
-			if (DEBUG) {
-				System.out.println("no editor"); //$NON-NLS-1$
-			}
-			return;
-		}
-		IDocumentProvider documentProvider = textEditor.getDocumentProvider();
-		if (documentProvider == null) {
-			if (DEBUG) {
-				System.out.println("no document provider"); //$NON-NLS-1$
-			}
-			return;
-		}
-		IAnnotationModel annotationModel = documentProvider.getAnnotationModel(textEditor.getEditorInput());
-		if (annotationModel == null || !(annotationModel instanceof IAnnotationModelExtension)) {
-			if (DEBUG) {
-				System.out.println("no annotation model"); //$NON-NLS-1$
-			}
-			return;
-		}
-
-		List oldAnnotations = new ArrayList(2);
-		Iterator annotationIterator = annotationModel.getAnnotationIterator();
-		while (annotationIterator.hasNext()) {
-			Annotation annotation = (Annotation) annotationIterator.next();
-			if (ANNOTATION_TYPE.equals(annotation.getType())) {
-				annotation.markDeleted(true);
-				if (DEBUG) {
-					System.out.println("removing " + annotation); //$NON-NLS-1$
-				}
-				oldAnnotations.add(annotation);
-			}
-		}
-
-		Map newAnnotations = new HashMap();
-		if (!selection.isEmpty() && selection instanceof IStructuredSelection && selection instanceof ITextSelection) {
-			Object o = ((IStructuredSelection) selection).getFirstElement();
-			if (o instanceof IDOMNode) {
-				int offset = ((ITextSelection) selection).getOffset();
-				IStructuredDocumentRegion matchRegion = null;
-				if (((Node) o).getNodeType() == Node.ATTRIBUTE_NODE) {
-					o = ((Attr) o).getOwnerElement();
-				}
-
-				Position pStart = null;
-				Position pEnd = null;
-				if (o instanceof IDOMNode) {
-					IDOMNode node = (IDOMNode) o;
-					IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
-					if (startStructuredDocumentRegion != null && startStructuredDocumentRegion.containsOffset(offset)) {
-						if (startStructuredDocumentRegion.getNumberOfRegions() > 1) {
-							ITextRegion nameRegion = startStructuredDocumentRegion.getRegions().get(1);
-							pStart = new Position(startStructuredDocumentRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
-						}
-						matchRegion = ((IDOMNode) o).getEndStructuredDocumentRegion();
-						if (matchRegion != null && matchRegion.getNumberOfRegions() > 1) {
-							ITextRegion nameRegion = matchRegion.getRegions().get(1);
-							pEnd = new Position(matchRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
-						}
-					}
-					else {
-						IStructuredDocumentRegion endStructuredDocumentRegion = node.getEndStructuredDocumentRegion();
-						if (endStructuredDocumentRegion != null && endStructuredDocumentRegion.containsOffset(offset)) {
-							if (endStructuredDocumentRegion.getNumberOfRegions() > 1) {
-								ITextRegion nameRegion = endStructuredDocumentRegion.getRegions().get(1);
-								pEnd = new Position(endStructuredDocumentRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
-							}
-							matchRegion = ((IDOMNode) o).getStartStructuredDocumentRegion();
-							if (matchRegion != null && matchRegion.getNumberOfRegions() > 1) {
-								ITextRegion nameRegion = matchRegion.getRegions().get(1);
-								pStart = new Position(matchRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
-							}
-						}
-					}
-				}
-				if (pStart != null && pEnd != null) {
-					Annotation annotation = new Annotation(false);
-					annotation.setType(ANNOTATION_TYPE);
-					newAnnotations.put(annotation, pStart);
-					if (DEBUG) {
-						System.out.println("adding " + annotation); //$NON-NLS-1$
-					}
-
-					annotation = new Annotation(false);
-					annotation.setType(ANNOTATION_TYPE);
-					newAnnotations.put(annotation, pEnd);
-					if (DEBUG) {
-						System.out.println("adding " + annotation); //$NON-NLS-1$
-					}
-				}
-			}
-		}
-		((IAnnotationModelExtension) annotationModel).replaceAnnotations((Annotation[]) oldAnnotations.toArray(new Annotation[oldAnnotations.size()]), newAnnotations);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/MenuBuilder.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/MenuBuilder.java
deleted file mode 100644
index 78f3ceb..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/MenuBuilder.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-
-
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import com.ibm.icu.text.Collator;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-
-
-public class MenuBuilder {
-
-
-	protected Comparator comparator = new Comparator() {
-
-		public int compare(Object o1, Object o2) {
-			return Collator.getInstance().compare(getSortKey(o1), getSortKey(o2));
-		}
-
-		protected String getSortKey(Object o) {
-			String result = ""; //$NON-NLS-1$
-			if (o instanceof IAction) {
-				IAction action = (IAction) o;
-				result = action.getText();
-			}
-			// else if (o instanceof MenuData)
-			// {
-			// result = "z" + ((MenuData)o).name;
-			// }
-			return result;
-		}
-	};
-
-
-	protected void createAlphebeticalGrouping(IMenuManager menu, List actionList) {
-		Object[] array = actionList.toArray();
-		if (array.length > 0) {
-			Arrays.sort(array, comparator);
-		}
-
-		int groupSize = 15;
-		int minGroupSize = 5;
-		int numberOfGroups = (array.length / groupSize) + ((array.length % groupSize > minGroupSize) ? 1 : 0);
-
-		for (int i = 0; i < numberOfGroups; i++) {
-			boolean isLastGroup = (i == (numberOfGroups - 1));
-			int firstIndex = i * groupSize;
-			int lastIndex = isLastGroup ? array.length - 1 : i * groupSize + groupSize - 1;
-			Action firstAction = (Action) array[firstIndex];
-			Action lastAction = (Action) array[lastIndex];
-			MenuManager submenu = new MenuManager(firstAction.getText() + " - " + lastAction.getText()); //$NON-NLS-1$
-			menu.add(submenu);
-			for (int j = firstIndex; j <= lastIndex; j++) {
-				submenu.add((Action) array[j]);
-			}
-		}
-	}
-
-
-	public void populateMenu(IMenuManager menu, List actionList, boolean createTiered) {
-		// sort the actions
-		if (actionList.size() < 25) {
-			Object[] array = actionList.toArray();
-			if (array.length > 0) {
-				Arrays.sort(array, comparator);
-			}
-			for (int i = 0; i < array.length; i++) {
-				menu.add((Action) array[i]);
-			}
-		}
-		else {
-			createAlphebeticalGrouping(menu, actionList);
-		}
-	}
-
-	/*
-	 * protected void createPropertyGrouping(IMenuManager menu, List
-	 * actionList) { MenuDataTable menuDataTable = new MenuDataTable();
-	 * 
-	 * for (Iterator i = actionList.iterator(); i.hasNext(); ) { String
-	 * groupName = null; Action action = (Action)i.next(); if (action
-	 * instanceof NodeAction) { groupName =
-	 * ((NodeAction)action).getGroupName(); } if (groupName == null) {
-	 * groupName = ""; } MenuData menuData =
-	 * menuDataTable.lookupOrCreate(groupName, "");
-	 * menuData.childList.add(action); } populateMenu(menu,
-	 * menuDataTable.getRoot()); }
-	 * 
-	 * 
-	 * protected void populateMenu(MenuManager menuManager, MenuData menuData) {
-	 * for (Iterator i = menuData.childList.iterator(); i.hasNext(); ) {
-	 * Object o = i.next(); if (o instanceof Action) {
-	 * menuManager.add((Action)o); } else if (o instanceof MenuData) {
-	 * MenuData childMenuData = (MenuData)o; MenuManager childMenuManager =
-	 * new MenuManager(childMenuData.name); menuManager.add(childMenuManager);
-	 * populateMenu(childMenuManager, childMenuData); } } }
-	 * 
-	 * 
-	 * public MenuDataTable { protected Hashtable table = new Hashtable();
-	 * protected MenuData root;
-	 * 
-	 * public MenuDataTable() { root = lookupOrCreateMenuData(null, null); }
-	 * 
-	 * protected MenuData lookupMenuData(String name) { String key = name !=
-	 * null ? name : ""; return (MenuData)menuDataTable.get(key); }
-	 * 
-	 * protected MenuData lookupOrCreateMenuData(String name, String
-	 * parentName) { String key = name != null ? name : ""; MenuData menuData =
-	 * (MenuData)menuDataTable.get(key); if (menuData == null) { menuData =
-	 * new MenuData(name, parentName); menuDataTable.put(key, menuData); }
-	 * return menuData; }
-	 * 
-	 * public MenuData getRoot() { return root; } }
-	 * 
-	 * 
-	 * protected class MenuData { public String name; public String
-	 * parentName; public List childList = new Vector();
-	 * 
-	 * MenuData(String name, String parentName) { this.name = name;
-	 * this.parentName = parentName; }
-	 * 
-	 * protected void sort() { Object[] array = childList.toArray(); if
-	 * (array.length > 0 ) { Arrays.sort(array, comparator); } childList =
-	 * Arrays.asList(array);
-	 * 
-	 * for (Iterator i = childList.iterator(); i.hasNext(); ) { Object o =
-	 * i.next(); if (o instanceof MenuData) { ((MenuData)o).sort(); } } } }
-	 */
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/RemoveBlockCommentActionXMLDelegate.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/RemoveBlockCommentActionXMLDelegate.java
deleted file mode 100644
index 473e5f2..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/RemoveBlockCommentActionXMLDelegate.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.xml.core.internal.document.CommentImpl;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/**
- * Remove block comment action delegate for XML editor
- */
-public class RemoveBlockCommentActionXMLDelegate extends AbstractCommentActionXMLDelegate {
-
-	void processAction(IDocument document, ITextSelection textSelection) {
-		IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForEdit(document);
-		if (model != null) {
-			try {
-				IndexedRegion selectionStartIndexedRegion = model.getIndexedRegion(textSelection.getOffset());
-				IndexedRegion selectionEndIndexedRegion = model.getIndexedRegion(textSelection.getOffset() + textSelection.getLength());
-
-				if ((selectionStartIndexedRegion == null) || (selectionEndIndexedRegion == null)) {
-					return;
-				}
-
-				int openCommentOffset = selectionStartIndexedRegion.getStartOffset();
-				int closeCommentOffset = selectionEndIndexedRegion.getEndOffset() - OPEN_COMMENT.length() - CLOSE_COMMENT.length();
-
-				model.beginRecording(this, XMLUIMessages.RemoveBlockComment_tooltip);
-				model.aboutToChangeModel();
-
-				try {
-					if (textSelection.getLength() == 0) {
-						if (selectionStartIndexedRegion instanceof CommentImpl) {
-							document.replace(openCommentOffset, OPEN_COMMENT.length(), ""); //$NON-NLS-1$
-							document.replace(closeCommentOffset, CLOSE_COMMENT.length(), ""); //$NON-NLS-1$
-						}
-					}
-					else {
-						if (selectionStartIndexedRegion instanceof CommentImpl) {
-							document.replace(openCommentOffset, OPEN_COMMENT.length(), ""); //$NON-NLS-1$
-						}
-
-						if (selectionEndIndexedRegion instanceof CommentImpl) {
-							document.replace(closeCommentOffset, CLOSE_COMMENT.length(), ""); //$NON-NLS-1$
-						}
-					}
-					removeOpenCloseComments(document, openCommentOffset + OPEN_COMMENT.length(), closeCommentOffset - openCommentOffset - CLOSE_COMMENT.length());
-				}
-				catch (BadLocationException e) {
-					Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-				}
-				finally {
-					model.changedModel();
-					model.endRecording(this);
-				}
-			}
-			finally {
-				model.releaseFromEdit();
-			}
-		}
-	}
-
-	public void init(IAction action) {
-		if (action != null) {
-			action.setText(XMLUIMessages.RemoveBlockComment_label);
-			action.setToolTipText(XMLUIMessages.RemoveBlockComment_tooltip);
-			action.setDescription(XMLUIMessages.RemoveBlockComment_description);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ReplacePrefixAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ReplacePrefixAction.java
deleted file mode 100644
index e5719a9..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ReplacePrefixAction.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMVisitor;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-
-public class ReplacePrefixAction extends NodeAction {
-
-	class NodeCollectingDOMVisitor extends DOMVisitor {
-		public List list = new Vector();
-
-		protected boolean isPrefixChangedNeeded(Node node) {
-			String key = node.getPrefix() != null ? node.getPrefix() : ""; //$NON-NLS-1$
-			return prefixMapping.get(key) != null;
-		}
-
-		public void visitAttr(Attr attr) {
-			/*
-			 * if (isPrefixChangedNeeded(element)) { list.add(attr); }
-			 */
-		}
-
-		protected void visitElement(Element element) {
-			super.visitElement(element);
-			if (isPrefixChangedNeeded(element)) {
-				list.add(element);
-			}
-		}
-	}
-
-	protected static ImageDescriptor imageDescriptor;
-	protected Element element;
-	protected AbstractNodeActionManager manager;
-	protected Map prefixMapping;
-
-	public ReplacePrefixAction(AbstractNodeActionManager manager, Element element, Map prefixMapping) {
-		this.manager = manager;
-		this.element = element;
-		this.prefixMapping = prefixMapping;
-	}
-
-	public String getUndoDescription() {
-		return ""; //$NON-NLS-1$
-	}
-
-	public void run() {
-		NodeCollectingDOMVisitor visitor = new NodeCollectingDOMVisitor();
-		visitor.visitNode(element);
-		for (Iterator i = visitor.list.iterator(); i.hasNext();) {
-			Node node = (Node) i.next();
-			String key = node.getPrefix() != null ? node.getPrefix() : ""; //$NON-NLS-1$
-			String newPrefix = (String) prefixMapping.get(key);
-			if (newPrefix != null) {
-				node.setPrefix(newPrefix);
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/SiblingNavigationAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/SiblingNavigationAction.java
deleted file mode 100644
index a08b44f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/SiblingNavigationAction.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.TextEditorAction;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-
-/**
- * Provides navigation to next/previous DOM sibling Nodes
- * 
- * @author nitin
- * 
- */
-class SiblingNavigationAction extends TextEditorAction {
-
-	private boolean fForward;
-
-	/**
-	 * @param bundle
-	 * @param prefix
-	 * @param editor
-	 */
-	SiblingNavigationAction(ResourceBundle bundle, String prefix, ITextEditor editor, boolean forward) {
-		super(bundle, prefix, editor);
-		fForward = forward;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
-	 */
-	public void runWithEvent(Event event) {
-		super.runWithEvent(event);
-		if (getTextEditor() == null)
-			return;
-
-		ISelection selection = getTextEditor().getSelectionProvider().getSelection();
-		if (!selection.isEmpty() && selection instanceof IStructuredSelection) {
-			Object o = ((IStructuredSelection) selection).getFirstElement();
-			if (o instanceof Node) {
-				Node sibling = null;
-
-				if (((Node) o).getNodeType() == Node.ATTRIBUTE_NODE) {
-					o = ((Attr) o).getOwnerElement();
-				}
-				if (fForward) {
-					sibling = ((Node) o).getNextSibling();
-					while (sibling != null && sibling.getNodeType() == Node.TEXT_NODE && sibling.getNodeValue().trim().length() == 0) {
-						sibling = sibling.getNextSibling();
-					}
-					if (sibling == null) {
-						sibling = ((Node) o).getParentNode().getFirstChild();
-						while (sibling != null && sibling.getNodeType() == Node.TEXT_NODE && sibling.getNodeValue().trim().length() == 0) {
-							sibling = sibling.getNextSibling();
-						}
-					}
-				}
-				else {
-					sibling = ((Node) o).getPreviousSibling();
-					while (sibling != null && sibling.getNodeType() == Node.TEXT_NODE && sibling.getNodeValue().trim().length() == 0) {
-						sibling = sibling.getPreviousSibling();
-					}
-					if (sibling == null) {
-						sibling = ((Node) o).getParentNode().getLastChild();
-						while (sibling != null && sibling.getNodeType() == Node.TEXT_NODE && sibling.getNodeValue().trim().length() == 0) {
-							sibling = sibling.getPreviousSibling();
-						}
-					}
-				}
-
-				// The only child is a Text Node, go to the parent Node
-				if (((Node) o).getNodeType() == Node.TEXT_NODE && o.equals(sibling)) {
-					sibling = ((Node) o).getParentNode();
-				}
-
-
-				if (sibling != null) {
-					getTextEditor().getSelectionProvider().setSelection(new StructuredSelection(sibling));
-				}
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.texteditor.TextEditorAction#update()
-	 */
-	public void update() {
-
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ToggleCommentActionXMLDelegate.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ToggleCommentActionXMLDelegate.java
deleted file mode 100644
index 09d81d1..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ToggleCommentActionXMLDelegate.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/**
- * Toggle comment action delegate for XML editor
- */
-public class ToggleCommentActionXMLDelegate extends AbstractCommentActionXMLDelegate {
-	public void init(IAction action) {
-		if (action != null) {
-			action.setText(XMLUIMessages.ToggleComment_label);
-			action.setToolTipText(XMLUIMessages.ToggleComment_tooltip);
-			action.setDescription(XMLUIMessages.ToggleComment_description);
-		}
-	}
-
-	void processAction(IDocument document, ITextSelection textSelection) {
-		// get text selection lines info
-		int selectionStartLine = textSelection.getStartLine();
-		int selectionEndLine = textSelection.getEndLine();
-		try {
-			int selectionEndLineOffset = document.getLineOffset(selectionEndLine);
-			int selectionEndOffset = textSelection.getOffset() + textSelection.getLength();
-
-			// adjust selection end line
-			if ((selectionEndLine > selectionStartLine) && (selectionEndLineOffset == selectionEndOffset)) {
-				selectionEndLine--;
-			}
-
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-
-		// save the selection position since it will be changing
-		Position selectionPosition = null;
-		boolean updateStartOffset = false;
-		try {
-			selectionPosition = new Position(textSelection.getOffset(), textSelection.getLength());
-			document.addPosition(selectionPosition);
-
-			// extra check if commenting from beginning of line
-			int selectionStartLineOffset = document.getLineOffset(selectionStartLine);
-			if ((textSelection.getLength() > 0) && (selectionStartLineOffset == textSelection.getOffset()) && !isCommentLine(document, selectionStartLine)) {
-				updateStartOffset = true;
-			}
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-
-		processAction(document, selectionStartLine, selectionEndLine);
-
-		updateCurrentSelection(selectionPosition, document, updateStartOffset);
-	}
-
-	private void processAction(IDocument document, int selectionStartLine, int selectionEndLine) {
-		IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForEdit(document);
-		if (model != null) {
-			try {
-				model.beginRecording(this, XMLUIMessages.ToggleComment_tooltip);
-				model.aboutToChangeModel();
-
-				for (int i = selectionStartLine; i <= selectionEndLine; i++) {
-					try {
-						if (document.getLineLength(i) > 0) {
-							if (isCommentLine(document, i)) {
-								int lineOffset = document.getLineOffset(i);
-								IRegion region = document.getLineInformation(i);
-								String string = document.get(region.getOffset(), region.getLength());
-								int openCommentOffset = lineOffset + string.indexOf(OPEN_COMMENT);
-								int closeCommentOffset = lineOffset + string.indexOf(CLOSE_COMMENT) - OPEN_COMMENT.length();
-								uncomment(document, openCommentOffset, closeCommentOffset);
-							}
-							else {
-								int openCommentOffset = document.getLineOffset(i);
-								int lineDelimiterLength = document.getLineDelimiter(i) == null ? 0 : document.getLineDelimiter(i).length();
-								int closeCommentOffset = openCommentOffset + document.getLineLength(i) - lineDelimiterLength + OPEN_COMMENT.length();
-								comment(document, openCommentOffset, closeCommentOffset);
-							}
-						}
-					}
-					catch (BadLocationException e) {
-						Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-					}
-				}
-			}
-			finally {
-				model.changedModel();
-				model.endRecording(this);
-				model.releaseFromEdit();
-			}
-		}
-	}
-
-	private boolean isCommentLine(IDocument document, int line) {
-		boolean isComment = false;
-
-		try {
-			IRegion region = document.getLineInformation(line);
-			String string = document.get(region.getOffset(), region.getLength()).trim();
-			isComment = (string.length() >= OPEN_COMMENT.length() + CLOSE_COMMENT.length()) && string.startsWith(OPEN_COMMENT) && string.endsWith(CLOSE_COMMENT);
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-		return isComment;
-	}
-
-	private void comment(IDocument document, int openCommentOffset, int closeCommentOffset) {
-		try {
-			document.replace(openCommentOffset, 0, OPEN_COMMENT);
-			document.replace(closeCommentOffset, 0, CLOSE_COMMENT);
-			removeOpenCloseComments(document, openCommentOffset + OPEN_COMMENT.length(), closeCommentOffset - openCommentOffset - CLOSE_COMMENT.length());
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-	}
-
-	private void uncomment(IDocument document, int openCommentOffset, int closeCommentOffset) {
-		try {
-			document.replace(openCommentOffset, OPEN_COMMENT.length(), ""); //$NON-NLS-1$
-			document.replace(closeCommentOffset, CLOSE_COMMENT.length(), ""); //$NON-NLS-1$
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-	}
-
-	private void updateCurrentSelection(Position selectionPosition, IDocument document, boolean updateStartOffset) {
-		if (fEditor instanceof ITextEditor) {
-			// update the selection if text selection changed
-			if (selectionPosition != null) {
-				ITextSelection selection = null;
-				if (updateStartOffset) {
-					selection = new TextSelection(document, selectionPosition.getOffset() - OPEN_COMMENT.length(), selectionPosition.getLength() + OPEN_COMMENT.length());
-				}
-				else {
-					selection = new TextSelection(document, selectionPosition.getOffset(), selectionPosition.getLength());
-				}
-				ISelectionProvider provider = ((ITextEditor) fEditor).getSelectionProvider();
-				if (provider != null) {
-					provider.setSelection(selection);
-				}
-				document.removePosition(selectionPosition);
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/AutoEditStrategyForTabs.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/AutoEditStrategyForTabs.java
deleted file mode 100644
index 1b416cc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/AutoEditStrategyForTabs.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.autoedit;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ConfigurableLineTracker;
-import org.eclipse.jface.text.DocumentCommand;
-import org.eclipse.jface.text.IAutoEditStrategy;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ILineTracker;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.ITextEditorExtension3;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.preferences.XMLCorePreferenceNames;
-import org.eclipse.wst.xml.ui.internal.Logger;
-
-/**
- * AutoEditStrategy to handle characters inserted when Tab key is pressed
- */
-public class AutoEditStrategyForTabs implements IAutoEditStrategy {
-	private final String TAB_CHARACTER = "\t"; //$NON-NLS-1$
-
-	public void customizeDocumentCommand(IDocument document, DocumentCommand command) {
-		// if not in smart insert mode just ignore
-		if (!isSmartInsertMode()) {
-			return;
-		}
-
-		// spaces for tab character
-		if ((command.length == 0) && (command.text != null) && (command.text.length() > 0) && (command.text.indexOf(TAB_CHARACTER) != -1)) {
-			smartInsertForTab(command, document);
-		}
-	}
-
-	/**
-	 * Insert spaces for tabs
-	 * 
-	 * @param command
-	 */
-	private void smartInsertForTab(DocumentCommand command, IDocument document) {
-		// tab key was pressed. now check preferences to see if need to insert
-		// spaces instead of tab
-		int indentationWidth = getIndentationWidth();
-		if (indentationWidth > -1) {
-			String originalText = command.text;
-			StringBuffer newText = new StringBuffer(originalText);
-
-			// determine where in line this command begins
-			int lineOffset = -1;
-			try {
-				IRegion lineInfo = document.getLineInformationOfOffset(command.offset);
-				lineOffset = command.offset - lineInfo.getOffset();
-			}
-			catch (BadLocationException e) {
-				Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-			}
-
-			ILineTracker lineTracker = getLineTracker(document, originalText);
-
-			int startIndex = 0;
-			int index = newText.indexOf(TAB_CHARACTER);
-			while (index != -1) {
-				String indent = getIndentString(indentationWidth, lineOffset, lineTracker, index);
-
-				// replace \t character with spaces
-				newText.replace(index, index + 1, indent);
-				if (lineTracker != null) {
-					try {
-						lineTracker.replace(index, 1, indent);
-					}
-					catch (BadLocationException e) {
-						// if something goes wrong with replacing text, just
-						// reset to current string
-						lineTracker.set(newText.toString());
-						Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-					}
-				}
-
-				startIndex = index + indent.length();
-				index = newText.indexOf(TAB_CHARACTER, startIndex);
-			}
-			command.text = newText.toString();
-		}
-	}
-
-	/**
-	 * Calculate number of spaces for next tab stop
-	 */
-	private String getIndentString(int indentationWidth, int lineOffset, ILineTracker lineTracker, int index) {
-		int indentSize = indentationWidth;
-		int offsetInLine = -1;
-		if (lineTracker != null) {
-			try {
-				IRegion lineInfo = lineTracker.getLineInformationOfOffset(index);
-				if ((lineInfo.getOffset() == 0) && (lineOffset > -1)) {
-					offsetInLine = lineOffset + index;
-				}
-				else {
-					offsetInLine = index - lineInfo.getOffset();
-				}
-			}
-			catch (BadLocationException e) {
-				Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-			}
-		}
-		else {
-			if (lineOffset > -1) {
-				offsetInLine = lineOffset + index;
-			}
-		}
-		if ((offsetInLine > -1) && (indentationWidth > 0)) {
-			int remainder = offsetInLine % indentationWidth;
-			indentSize = indentationWidth - remainder;
-		}
-
-		StringBuffer indent = new StringBuffer();
-		for (int i = 0; i < indentSize; i++) {
-			indent.append(' ');
-		}
-		return indent.toString();
-	}
-
-	/**
-	 * Set up a line tracker for text within command if text is multi-line
-	 */
-	private ILineTracker getLineTracker(IDocument document, String originalText) {
-		ConfigurableLineTracker lineTracker = null;
-		int[] delims = TextUtilities.indexOf(document.getLegalLineDelimiters(), originalText, 0);
-		if ((delims[0] != -1) || (delims[1] != -1)) {
-			lineTracker = new ConfigurableLineTracker(document.getLegalLineDelimiters());
-			lineTracker.set(originalText);
-		}
-		return lineTracker;
-	}
-
-	/**
-	 * Return true if active editor is in smart insert mode, false otherwise
-	 * 
-	 * @return boolean
-	 */
-	private boolean isSmartInsertMode() {
-		boolean isSmartInsertMode = false;
-
-		ITextEditor textEditor = null;
-		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-		if (window != null) {
-			IWorkbenchPage page = window.getActivePage();
-			if (page != null) {
-				IEditorPart editor = page.getActiveEditor();
-				if (editor != null) {
-					if (editor instanceof ITextEditor) {
-						textEditor = (ITextEditor) editor;
-					}
-					else {
-						textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
-					}
-				}
-			}
-		}
-
-		// check if smart insert mode
-		if ((textEditor instanceof ITextEditorExtension3) && (((ITextEditorExtension3) textEditor).getInsertMode() == ITextEditorExtension3.SMART_INSERT)) {
-			isSmartInsertMode = true;
-		}
-		return isSmartInsertMode;
-	}
-
-	/**
-	 * Returns indentation width if using spaces for indentation, -1 otherwise
-	 * 
-	 * @return int
-	 */
-	private int getIndentationWidth() {
-		int width = -1;
-
-		Preferences preferences = XMLCorePlugin.getDefault().getPluginPreferences();
-		if (XMLCorePreferenceNames.SPACE.equals(preferences.getString(XMLCorePreferenceNames.INDENTATION_CHAR))) {
-			width = preferences.getInt(XMLCorePreferenceNames.INDENTATION_SIZE);
-		}
-
-		return width;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/StructuredAutoEditStrategyXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/StructuredAutoEditStrategyXML.java
deleted file mode 100644
index df619e7..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/StructuredAutoEditStrategyXML.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.autoedit;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentCommand;
-import org.eclipse.jface.text.IAutoEditStrategy;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.ITextEditorExtension3;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLUIPreferenceNames;
-import org.w3c.dom.Node;
-
-/**
- * Automatically inserts closing comment tag or end tag when appropriate.
- */
-public class StructuredAutoEditStrategyXML implements IAutoEditStrategy {
-	/*
-	 * NOTE: copies of this class exists in
-	 * org.eclipse.wst.xml.ui.internal.autoedit
-	 * org.eclipse.wst.html.ui.internal.autoedit
-	 */
-	public void customizeDocumentCommand(IDocument document, DocumentCommand command) {
-		Object textEditor = getActiveTextEditor();
-		if (!((textEditor instanceof ITextEditorExtension3) && (((ITextEditorExtension3) textEditor).getInsertMode() == ITextEditorExtension3.SMART_INSERT))) {
-			return;
-		}
-
-		IStructuredModel model = null;
-		try {
-			model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
-			if (model != null) {
-				if (command.text != null) {
-					smartInsertForComment(command, document, model);
-					smartInsertForEndTag(command, document, model);
-					smartRemoveEndTag(command, document, model);
-				}
-			}
-		}
-		finally {
-			if (model != null) {
-				model.releaseFromRead();
-			}
-		}
-	}
-	
-	private boolean isPreferenceEnabled(String key) {
-		return (key != null && XMLUIPlugin.getDefault().getPreferenceStore().getBoolean(key));
-	}
-
-	private boolean isCommentNode(IDOMNode node) {
-		return ((node != null) && (node instanceof IDOMElement) && ((IDOMElement) node).isCommentTag());
-	}
-
-	private boolean isDocumentNode(IDOMNode node) {
-		return ((node != null) && (node.getNodeType() == Node.DOCUMENT_NODE));
-	}
-
-	/**
-	 * Attempts to clean up an end-tag if a start-tag is converted into an empty-element
-	 * tag (e.g., <node />) and the original element was empty.
-	 * 
-	 * @param command the document command describing the change
-	 * @param document the document that will be changed
-	 * @param model the model based on the document
-	 */
-	private void smartRemoveEndTag(DocumentCommand command, IDocument document, IStructuredModel model) {
-		try {
-			// An opening tag is now a self-terminated end-tag
-			if ("/".equals(command.text) && ">".equals(document.get(command.offset, 1)) && isPreferenceEnabled(XMLUIPreferenceNames.TYPING_REMOVE_END_TAGS)) { //$NON-NLS-1$ //$NON-NLS-2$
-				IDOMNode node = (IDOMNode) model.getIndexedRegion(command.offset);
-				if (node != null && !node.hasChildNodes()) {
-					IStructuredDocumentRegion region = node.getEndStructuredDocumentRegion();
-
-					if (region != null && region.isEnded())
-						document.replace(region.getStartOffset(), region.getLength(), ""); //$NON-NLS-1$
-				}
-			}
-		}
-		catch (BadLocationException e) {
-			Logger.logException(e);
-		}
-	}
-
-	private void smartInsertForComment(DocumentCommand command, IDocument document, IStructuredModel model) {
-		try {
-			if (command.text.equals("-") && (document.getLength() >= 3) && document.get(command.offset - 3, 3).equals("<!-") && isPreferenceEnabled(XMLUIPreferenceNames.TYPING_COMPLETE_COMMENTS)) { //$NON-NLS-1$ //$NON-NLS-2$
-				command.text += "  -->"; //$NON-NLS-1$
-				command.shiftsCaret = false;
-				command.caretOffset = command.offset + 2;
-				command.doit = false;
-			}
-		}
-		catch (BadLocationException e) {
-			Logger.logException(e);
-		}
-
-	}
-
-	private void smartInsertForEndTag(DocumentCommand command, IDocument document, IStructuredModel model) {
-		try {
-			if (command.text.equals("/") && (document.getLength() >= 1) && document.get(command.offset - 1, 1).equals("<") && isPreferenceEnabled(XMLUIPreferenceNames.TYPING_COMPLETE_END_TAGS)) { //$NON-NLS-1$ //$NON-NLS-2$
-				IDOMNode parentNode = (IDOMNode) ((IDOMNode) model.getIndexedRegion(command.offset - 1)).getParentNode();
-				if (isCommentNode(parentNode)) {
-					// loop and find non comment node parent
-					while ((parentNode != null) && isCommentNode(parentNode)) {
-						parentNode = (IDOMNode) parentNode.getParentNode();
-					}
-				}
-
-				if (!isDocumentNode(parentNode)) {
-					// only add end tag if one does not already exist or if
-					// add '/' does not create one already
-					IStructuredDocumentRegion endTagStructuredDocumentRegion = parentNode.getEndStructuredDocumentRegion();
-					if (endTagStructuredDocumentRegion == null) {
-						StringBuffer toAdd = new StringBuffer(parentNode.getNodeName());
-						if (toAdd.length() > 0) {
-							toAdd.append(">"); //$NON-NLS-1$
-							String suffix = toAdd.toString();
-							if ((document.getLength() < command.offset + suffix.length()) || (!suffix.equals(document.get(command.offset, suffix.length())))) {
-								command.text += suffix;
-							}
-						}
-					}
-				}
-			}
-		}
-		catch (BadLocationException e) {
-			Logger.logException(e);
-		}
-	}
-
-	/**
-	 * Return the active text editor if possible, otherwise the active editor
-	 * part.
-	 * 
-	 * @return Object
-	 */
-	private Object getActiveTextEditor() {
-		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-		if (window != null) {
-			IWorkbenchPage page = window.getActivePage();
-			if (page != null) {
-				IEditorPart editor = page.getActiveEditor();
-				if (editor != null) {
-					if (editor instanceof ITextEditor) {
-						return editor;
-					}
-					ITextEditor textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
-					if (textEditor != null) {
-						return textEditor;
-					}
-					return editor;
-				}
-			}
-		}
-		return null;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentAssistProcessor.java
deleted file mode 100644
index 4eaebd7..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentAssistProcessor.java
+++ /dev/null
@@ -1,2496 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Vector;
-
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.encoding.ContentTypeEncodingPreferences;
-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.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.ui.internal.IReleasable;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMEntityDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryAction;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceHelper;
-import org.eclipse.wst.xml.core.internal.document.AttrImpl;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.editor.CMImageUtil;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLUIPreferenceNames;
-import org.eclipse.wst.xml.ui.internal.taginfo.MarkupTagInfoProvider;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-abstract public class AbstractContentAssistProcessor implements IContentAssistProcessor, IReleasable {
-	/**
-	 * 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 class DOMJSPRegionContextsPrivateCopy {
-		private static final String JSP_CLOSE = "JSP_CLOSE"; //$NON-NLS-1$
-		private static final String JSP_COMMENT_CLOSE = "JSP_COMMENT_CLOSE"; //$NON-NLS-1$
-
-		private static final String JSP_COMMENT_OPEN = "JSP_COMMENT_OPEN"; //$NON-NLS-1$
-		private static final String JSP_DECLARATION_OPEN = "JSP_DECLARATION_OPEN"; //$NON-NLS-1$
-		private static final String JSP_DIRECTIVE_CLOSE = "JSP_DIRECTIVE_CLOSE"; //$NON-NLS-1$
-		private static final String JSP_DIRECTIVE_NAME = "JSP_DIRECTIVE_NAME"; //$NON-NLS-1$
-
-		private static final String JSP_DIRECTIVE_OPEN = "JSP_DIRECTIVE_OPEN"; //$NON-NLS-1$
-		private static final String JSP_EXPRESSION_OPEN = "JSP_EXPRESSION_OPEN"; //$NON-NLS-1$
-
-		private static final String JSP_ROOT_TAG_NAME = "JSP_ROOT_TAG_NAME"; //$NON-NLS-1$
-
-		private static final String JSP_SCRIPTLET_OPEN = "JSP_SCRIPTLET_OPEN"; //$NON-NLS-1$
-
-	}
-
-	protected static final String INTERNALERROR = XMLUIMessages.SEVERE_internal_error_occu_UI_;
-	protected static final String UNKNOWN_ATTR = XMLUIMessages.No_known_attribute__UI_;
-	protected static final String UNKNOWN_CONTEXT = XMLUIMessages.Content_Assist_not_availab_UI_;
-	protected char completionProposalAutoActivationCharacters[] = null;
-	protected char contextInformationAutoActivationCharacters[] = null;
-	private AttributeContextInformationProvider fAttributeInfoProvider = null;
-	private AttributeContextInformationPresenter fContextInformationPresenter = null;
-
-	protected String fErrorMessage = null;
-	protected XMLContentModelGenerator fGenerator;
-	// protected IResource resource = null;
-	protected MarkupTagInfoProvider fInfoProvider = null;
-	protected ITextViewer fTextViewer = null;
-
-	private final boolean showValues = true;
-
-	public AbstractContentAssistProcessor() {
-		init();
-	}
-
-	protected void addAttributeNameProposals(ContentAssistRequest contentAssistRequest) {
-		IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-		IStructuredDocumentRegion sdRegion = contentAssistRequest.getDocumentRegion();
-		// retrieve the list of attributes
-		CMElementDeclaration elementDecl = getCMElementDeclaration(node);
-		if (elementDecl != null) {
-			CMNamedNodeMap attributes = elementDecl.getAttributes();
-			
-			CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attributes);
-			if (node.getNodeType() == Node.ELEMENT_NODE) {
-				List nodes = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent((Element) node, elementDecl, ModelQuery.INCLUDE_ATTRIBUTES);
-				for (int k = 0; k < nodes.size(); k++) {
-					CMNode cmnode = (CMNode) nodes.get(k);
-					if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-						allAttributes.put(cmnode);
-					}
-				}
-			}
-			attributes = allAttributes;
-
-			String matchString = contentAssistRequest.getMatchString();
-
-			// check whether an attribute really exists for the replacement
-			// offsets AND if it possesses a value
-			boolean attrAtLocationHasValue = false;
-			NamedNodeMap attrs = node.getAttributes();
-			for (int i = 0; i < attrs.getLength(); i++) {
-				AttrImpl existingAttr = (AttrImpl) attrs.item(i);
-				ITextRegion name = existingAttr.getNameRegion();
-
-				if ((sdRegion.getStartOffset(name) <= contentAssistRequest.getReplacementBeginPosition()) && (sdRegion.getStartOffset(name) + name.getLength() >= contentAssistRequest.getReplacementBeginPosition() + contentAssistRequest.getReplacementLength()) && (existingAttr.getValueRegion() != null)) {
-					attrAtLocationHasValue = true;
-					break;
-				}
-			}
-
-			// only add proposals for the attributes whose names begin with
-			// the matchstring
-			if (attributes != null) {
-				for (int i = 0; i < attributes.getLength(); i++) {
-					CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) attributes.item(i);
-
-					int isRequired = 0;
-					if (attrDecl.getUsage() == CMAttributeDeclaration.REQUIRED) {
-						isRequired = XMLRelevanceConstants.R_REQUIRED;
-					}
-
-					boolean showAttribute = true;
-					showAttribute = showAttribute && beginsWith(getRequiredName(node, attrDecl), matchString.trim());
-					AttrImpl attr = (AttrImpl) node.getAttributes().getNamedItem(getRequiredName(node, attrDecl));
-					ITextRegion nameRegion = attr != null ? attr.getNameRegion() : null;
-					// nameRegion.getEndOffset() + 1 is required to allow for
-					// matches against the full name of an existing Attr
-					showAttribute = showAttribute && ((attr == null) || ((nameRegion != null) && (sdRegion.getStartOffset(nameRegion) <= contentAssistRequest.getReplacementBeginPosition()) && (sdRegion.getStartOffset(nameRegion) + nameRegion.getLength() >= contentAssistRequest.getReplacementBeginPosition() + contentAssistRequest.getReplacementLength())));
-					if (showAttribute) {
-						Image attrImage = CMImageUtil.getImage(attrDecl);
-						if (attrImage == null) {
-							if (isRequired > 0) {
-								attrImage = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATT_REQ_OBJ);
-							}
-							else {
-								attrImage = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
-							}
-						}
-
-						String proposedText = null;
-						String proposedInfo = getAdditionalInfo(elementDecl, attrDecl);
-						CustomCompletionProposal proposal = null;
-						// attribute is at this location and already exists
-						if (attrAtLocationHasValue) {
-							// only propose the name
-							proposedText = getRequiredName(node, attrDecl);
-							proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), proposedText.length(), attrImage, proposedText, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_NAME + isRequired, true);
-						}
-						// no attribute exists or is elsewhere, generate
-						// minimally
-						else {
-							Attr existingAttrNode = (Attr) node.getAttributes().getNamedItem(getRequiredName(node, attrDecl));
-							String value = null;
-							if (existingAttrNode != null) {
-								value = existingAttrNode.getNodeValue();
-							}
-							if ((value != null) && (value.length() > 0)) {
-								proposedText = getRequiredName(node, attrDecl);
-							}
-							else {
-								proposedText = getRequiredText(node, attrDecl);
-							}
-							proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), attrDecl.getNodeName().length() + 2, attrImage,
-							// if the value isn't empty (no empty set of
-										// quotes), show it
-							// BUG 203494, content strings may have "", but not be empty
-							// An empty string is when there's no content between double quotes
-							// and there is no single quote that may be encasing a double quote
-										(showValues && (proposedText.lastIndexOf('\"') - proposedText.indexOf('\"') ==  1 && proposedText.indexOf('\'') == -1)) ? getRequiredName(node, attrDecl) : proposedText,
-										null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_NAME + isRequired);
-						}
-						contentAssistRequest.addProposal(proposal);
-					}
-				}
-			}
-		}
-		else {
-			setErrorMessage(NLS.bind(XMLUIMessages.Element__is_unknown, (new Object[]{node.getNodeName()})));
-		}
-	}
-
-	protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
-
-		IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-
-		// Find the attribute region and name for which this position should
-		// have a value proposed
-		IStructuredDocumentRegion open = node.getFirstStructuredDocumentRegion();
-		ITextRegionList openRegions = open.getRegions();
-		int i = openRegions.indexOf(contentAssistRequest.getRegion());
-		if (i < 0) {
-			return;
-		}
-		ITextRegion nameRegion = null;
-		while (i >= 0) {
-			nameRegion = openRegions.get(i--);
-			if (nameRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-				break;
-			}
-		}
-
-		// the name region is REQUIRED to do anything useful
-		if (nameRegion != null) {
-			// Retrieve the declaration
-			CMElementDeclaration elementDecl = getCMElementDeclaration(node);
-
-			// String attributeName = nameRegion.getText();
-			String attributeName = open.getText(nameRegion);
-
-			CMAttributeDeclaration attrDecl = null;
-
-			// No CMElementDeclaration means no attribute metadata, but
-			// retrieve the
-			// declaration for the attribute otherwise
-			if (elementDecl != null) {
-				CMNamedNodeMap attributes = elementDecl.getAttributes();
-
-				CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attributes) {
-					private Map caseInsensitive;
-					
-					private Map getCaseInsensitiveMap() {
-						if(caseInsensitive == null)
-							caseInsensitive = new HashMap();
-						return caseInsensitive;
-					}
-
-					public CMNode getNamedItem(String name) {
-						CMNode node = super.getNamedItem(name);
-						if (node == null) {
-							node = (CMNode) getCaseInsensitiveMap().get(name.toLowerCase(Locale.US));
-						}
-						return node;
-					}
-
-					public void put(CMNode cmNode) {
-						super.put(cmNode);
-						getCaseInsensitiveMap().put(cmNode.getNodeName().toLowerCase(Locale.US), cmNode);
-					}
-				};
-				if (node.getNodeType() == Node.ELEMENT_NODE) {
-					List nodes = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent((Element) node, elementDecl, ModelQuery.INCLUDE_ATTRIBUTES);
-					for (int k = 0; k < nodes.size(); k++) {
-						CMNode cmnode = (CMNode) nodes.get(k);
-						if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-							allAttributes.put(cmnode);
-						}
-					}
-				}
-				attributes = allAttributes;
-
-				String noprefixName = DOMNamespaceHelper.getUnprefixedName(attributeName);
-				if (attributes != null) {
-					attrDecl = (CMAttributeDeclaration) attributes.getNamedItem(noprefixName);
-					if (attrDecl == null) {
-						attrDecl = (CMAttributeDeclaration) attributes.getNamedItem(attributeName);
-					}
-				}
-				if (attrDecl == null) {
-					setErrorMessage(UNKNOWN_ATTR, attributeName);
-				}
-			}
-
-			String currentValue = node.getAttributes().getNamedItem(attributeName).getNodeValue();
-			String proposedInfo = null;
-			Image image = CMImageUtil.getImage(attrDecl);
-			if (image == null) {
-				if ((attrDecl != null) && (attrDecl.getUsage() == CMAttributeDeclaration.REQUIRED)) {
-					image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATT_REQ_OBJ);
-				}
-				else {
-					image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
-				}
-			}
-
-			if ((attrDecl != null) && (attrDecl.getAttrType() != null)) {
-				// attribute is known, prompt with values from the declaration
-				proposedInfo = getAdditionalInfo(elementDecl, attrDecl);
-				List possibleValues = getPossibleDataTypeValues(node, attrDecl);
-				if (possibleValues.size() > 0) {
-					// ENUMERATED VALUES
-					String matchString = contentAssistRequest.getMatchString();
-					if (matchString == null) {
-						matchString = ""; //$NON-NLS-1$
-					}
-					if ((matchString.length() > 0) && (matchString.startsWith("\"") || matchString.startsWith("'"))) {
-						matchString = matchString.substring(1);
-					}
-					boolean currentValid = false;
-
-					// d210858, if the region's a container, don't suggest the
-					// enumerated values as they probably won't help
-					boolean existingComplicatedValue = (contentAssistRequest.getRegion() != null) && (contentAssistRequest.getRegion() instanceof ITextRegionContainer);
-					if (!existingComplicatedValue) {
-						for (Iterator j = possibleValues.iterator(); j.hasNext();) {
-							String possibleValue = (String) j.next();
-							currentValid = currentValid || possibleValue.equals(currentValue);
-							if ((matchString.length() == 0) || possibleValue.startsWith(matchString)) {
-
-								String rString = "\"" + possibleValue + "\""; //$NON-NLS-2$//$NON-NLS-1$
-								int rOffset = contentAssistRequest.getReplacementBeginPosition();
-								int rLength = contentAssistRequest.getReplacementLength();
-								int cursorAfter = possibleValue.length() + 1;
-								String displayString = "\"" + possibleValue + "\""; //$NON-NLS-2$//$NON-NLS-1$
-
-								CustomCompletionProposal proposal = new CustomCompletionProposal(rString, rOffset, rLength, cursorAfter, image, displayString, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
-								contentAssistRequest.addProposal(proposal);
-							}
-						}
-					}
-				}
-				else if (((attrDecl.getUsage() == CMAttributeDeclaration.FIXED) || (attrDecl.getAttrType().getImpliedValueKind() == CMDataType.IMPLIED_VALUE_FIXED)) && (attrDecl.getAttrType().getImpliedValue() != null)) {
-					// FIXED values
-					String value = attrDecl.getAttrType().getImpliedValue();
-					if ((value != null) && (value.length() > 0)) {
-						String rValue = "\"" + value + "\"";//$NON-NLS-2$//$NON-NLS-1$
-						CustomCompletionProposal proposal = new CustomCompletionProposal(rValue, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), rValue.length() + 1, image, rValue, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
-						contentAssistRequest.addProposal(proposal);
-						if ((currentValue.length() > 0) && !value.equals(currentValue)) {
-							rValue = "\"" + currentValue + "\""; //$NON-NLS-2$//$NON-NLS-1$
-							proposal = new CustomCompletionProposal(rValue, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), rValue.length() + 1, image, rValue, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
-							contentAssistRequest.addProposal(proposal);
-						}
-					}
-				}
-			}
-			else {
-				// unknown attribute, so supply nice empty values
-				proposedInfo = getAdditionalInfo(null, elementDecl);
-				CustomCompletionProposal proposal = null;
-				if ((currentValue != null) && (currentValue.length() > 0)) {
-					String rValue = "\"" + currentValue + "\""; //$NON-NLS-2$//$NON-NLS-1$
-					proposal = new CustomCompletionProposal(rValue, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 1, image, rValue, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
-					contentAssistRequest.addProposal(proposal);
-				}
-			}
-		}
-		else {
-			setErrorMessage(UNKNOWN_CONTEXT);
-		}
-	}
-
-	protected void addCommentProposal(ContentAssistRequest contentAssistRequest) {
-		contentAssistRequest.addProposal(new CustomCompletionProposal("<!--  -->", //$NON-NLS-1$
-					contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 5, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_COMMENT), NLS.bind(XMLUIMessages.Comment__, (new Object[]{" <!--  -->"})), //$NON-NLS-1$
-					null, null, XMLRelevanceConstants.R_COMMENT));
-	}
-
-	/**
-	 * Add all of the element declarations int the CMContent object into one
-	 * big list.
-	 */
-	protected void addContent(List contentList, CMContent content) {
-		if (content == null) {
-			return;
-		}
-		if (content instanceof CMGroup) {
-			CMNodeList children = ((CMGroup) content).getChildNodes();
-			if (children == null) {
-				return;
-			}
-			for (int i = 0; i < children.getLength(); i++) {
-				CMNode child = children.item(i);
-				if (child.getNodeType() == CMNode.ELEMENT_DECLARATION) {
-					contentList.add(child);
-				}
-				else {
-					if (child.getNodeType() == CMNode.GROUP) {
-						addContent(contentList, (CMContent) child);
-					}
-					else {
-						throw new IllegalArgumentException("Unknown content child: " + child); //$NON-NLS-1$
-					}
-				}
-			}
-		}
-		else {
-			contentList.add(content);
-		}
-	}
-
-	protected void addDocTypeProposal(ContentAssistRequest contentAssistRequest) {
-		// if a DocumentElement exists, use that for the root Element name
-		String rootname = "unspecified"; //$NON-NLS-1$
-		if (contentAssistRequest.getNode().getOwnerDocument().getDocumentElement() != null) {
-			rootname = contentAssistRequest.getNode().getOwnerDocument().getDocumentElement().getNodeName();
-		}
-
-		String proposedText = "<!DOCTYPE " + rootname + " PUBLIC \"//UNKNOWN/\" \"unknown.dtd\">"; //$NON-NLS-1$ //$NON-NLS-2$
-		ICompletionProposal proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 10, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_DOCTYPE), "<!DOCTYPE ... >", //$NON-NLS-1$
-					null, null, XMLRelevanceConstants.R_DOCTYPE);
-		// TODO provide special documentation on doc type
-		contentAssistRequest.addProposal(proposal);
-	}
-
-	/**
-	 * Add the proposals for a completely empty document
-	 */
-	protected void addEmptyDocumentProposals(ContentAssistRequest contentAssistRequest) {
-		// nothing
-	}
-
-	/**
-	 * Add the proposals for the name in an end tag
-	 */
-	protected void addEndTagNameProposals(ContentAssistRequest contentAssistRequest) {
-
-		if (contentAssistRequest.getStartOffset() + contentAssistRequest.getRegion().getTextLength() < contentAssistRequest.getReplacementBeginPosition()) {
-			CustomCompletionProposal proposal = new CustomCompletionProposal(">", //$NON-NLS-1$
-						contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), NLS.bind(XMLUIMessages.Close_with__, (new Object[]{" '>'"})), //$NON-NLS-1$
-						null, null, XMLRelevanceConstants.R_END_TAG_NAME);
-			contentAssistRequest.addProposal(proposal);
-		}
-		else {
-			IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-			ModelQuery modelQuery = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
-			Node aNode = contentAssistRequest.getNode();
-			String matchString = contentAssistRequest.getMatchString();
-			if (matchString.startsWith("</")) {
-				matchString = matchString.substring(2);
-			}
-			while (aNode != null) {
-				if (aNode.getNodeType() == Node.ELEMENT_NODE) {
-					if (aNode.getNodeName().startsWith(matchString)) {
-						IDOMNode aXMLNode = (IDOMNode) aNode;
-						CMElementDeclaration ed = modelQuery.getCMElementDeclaration((Element) aNode);
-						if ((aXMLNode.getEndStructuredDocumentRegion() == null) && ((ed == null) || (ed.getContentType() != CMElementDeclaration.EMPTY))) {
-							String proposedText = aNode.getNodeName();
-							String proposedInfo = (ed != null) ? getAdditionalInfo(null, ed) : null;
-							if ((node.getNodeType() == Node.TEXT_NODE) && !contentAssistRequest.getDocumentRegion().isEnded()) {
-								proposedText += ">"; //$NON-NLS-1$
-							}
-							CustomCompletionProposal proposal = null;
-							// double check to see if the region acted upon is
-							// a tag name; replace it if so
-							Image image = CMImageUtil.getImage(ed);
-							if (image == null) {
-								image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
-							}
-							if (contentAssistRequest.getRegion().getType() == DOMRegionContext.XML_TAG_NAME) {
-								proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getStartOffset(), contentAssistRequest.getRegion().getTextLength(), proposedText.length(), image, proposedText, null, proposedInfo, XMLRelevanceConstants.R_END_TAG_NAME);
-							}
-							else {
-								proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), proposedText.length(), image, NLS.bind(XMLUIMessages.Close_with__, (new Object[]{"'" + proposedText + "'"})), //$NON-NLS-1$ //$NON-NLS-2$
-											null, proposedInfo, XMLRelevanceConstants.R_END_TAG_NAME);
-							}
-							contentAssistRequest.addProposal(proposal);
-						}
-					}
-				}
-				aNode = aNode.getParentNode();
-			}
-		}
-	}
-
-	/**
-	 * Prompt for end tags to a non-empty Node that hasn't ended Handles these
-	 * cases: <br>
-	 * <tagOpen>| <br>
-	 * <tagOpen>< |<br>
-	 * <tagOpen></ |
-	 * 
-	 * @param contentAssistRequest
-	 */
-	protected void addEndTagProposals(ContentAssistRequest contentAssistRequest) {
-		IDOMNode node = (IDOMNode) contentAssistRequest.getParent();
-
-		if (isCommentNode(node)) {
-			// loop and find non comment node parent
-			while ((node != null) && isCommentNode(node)) {
-				node = (IDOMNode) node.getParentNode();
-			}
-		}
-
-		// node is already closed
-		if (node.isClosed()) {
-			// loop and find non comment unclose node parent
-			while ((node != null) && node.isClosed()) {
-				node = (IDOMNode) node.getParentNode();
-			}
-		}
-		// there were no unclosed tags
-		if (node == null) {
-			return;
-		}
-
-		// data to create a CustomCompletionProposal
-		String replaceText = node.getNodeName() + ">"; //$NON-NLS-1$
-		int replaceBegin = contentAssistRequest.getReplacementBeginPosition();
-		int replaceLength = contentAssistRequest.getReplacementLength();
-		int cursorOffset = node.getNodeName().length() + 1;
-		String displayString = ""; //$NON-NLS-1$
-		String proposedInfo = ""; //$NON-NLS-1$
-		Image image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
-
-		setErrorMessage(null);
-		boolean addProposal = false;
-
-		if (node.getNodeType() == Node.ELEMENT_NODE) {
-			// ////////////////////////////////////////////////////////////////////////////////////
-			IStructuredDocument sDoc = (IStructuredDocument) fTextViewer.getDocument();
-			IStructuredDocumentRegion xmlEndTagOpen = sDoc.getRegionAtCharacterOffset(contentAssistRequest.getReplacementBeginPosition());
-			// skip backward to "<", "</", or the (unclosed) start tag, null
-			// if not found
-			String type = ""; //$NON-NLS-1$
-			while ((xmlEndTagOpen != null) && ((type = xmlEndTagOpen.getType()) != DOMRegionContext.XML_END_TAG_OPEN) && (type != DOMRegionContext.XML_TAG_CLOSE) && !needsEndTag(xmlEndTagOpen) && (type != DOMRegionContext.XML_TAG_OPEN)) {
-				xmlEndTagOpen = xmlEndTagOpen.getPrevious();
-			}
-
-			if (xmlEndTagOpen == null) {
-				return;
-			}
-
-			node = (IDOMNode) node.getModel().getIndexedRegion(xmlEndTagOpen.getStartOffset());
-			node = (IDOMNode) node.getParentNode();
-
-			if (isStartTag(xmlEndTagOpen)) {
-				// this is the case for a start tag w/out end tag
-				// eg:
-				// <p>
-				// <% String test = "test"; %>
-				// |
-				if (needsEndTag(xmlEndTagOpen)) {
-					String tagName = getTagName(xmlEndTagOpen);
-					xmlEndTagOpen.getTextEndOffset();
-					replaceLength = 0;
-					replaceText = "</" + tagName + ">"; //$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
-					// replaceText = "</" + node.getNodeName() + ">";
-					// //$NON-NLS-1$ $NON-NLS-2$
-					cursorOffset = tagName.length() + 3;
-					displayString = NLS.bind(XMLUIMessages.End_with__, (new Object[]{tagName}));
-					addProposal = true;
-				}
-			}
-			else if (type == DOMRegionContext.XML_END_TAG_OPEN) {
-				// this is the case for: <tag> </ |
-				// possibly <tag> </ |<anotherTag>
-				// should only be replacing white space...
-				replaceLength = (replaceBegin > xmlEndTagOpen.getTextEndOffset()) ? replaceBegin - xmlEndTagOpen.getTextEndOffset() : 0;
-				replaceText = node.getNodeName() + ">"; //$NON-NLS-1$
-				cursorOffset = replaceText.length();
-				replaceBegin = xmlEndTagOpen.getTextEndOffset();
-				displayString = NLS.bind(XMLUIMessages.End_with_, (new Object[]{node.getNodeName()}));
-				addProposal = true;
-			}
-			else if (type == DOMRegionContext.XML_TAG_OPEN) {
-				// this is the case for: <tag> < |
-				replaceText = "/" + node.getNodeName() + ">"; //$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
-				cursorOffset = replaceText.length();
-				// replaceText = "/" + node.getNodeName() + ">"; //$NON-NLS-1$
-				// $NON-NLS-2$
-				// should only be replacing white space...
-				replaceLength = (replaceBegin > xmlEndTagOpen.getTextEndOffset()) ? replaceBegin - xmlEndTagOpen.getTextEndOffset() : 0;
-				replaceBegin = xmlEndTagOpen.getTextEndOffset();
-				displayString = NLS.bind(XMLUIMessages.End_with_, (new Object[]{"/" + node.getNodeName()})); //$NON-NLS-1$
-				addProposal = true;
-			}
-		}
-		// ////////////////////////////////////////////////////////////////////////////////////
-		// sometimes the node is not null, but
-		// getNodeValue() is null, put in a null check
-		else if ((node.getNodeValue() != null) && (node.getNodeValue().indexOf("</") != -1)) { //$NON-NLS-1$
-			// the case where "</" is started, but the nodes comes in as a
-			// text node (instead of element)
-			// like this: <tag> </|
-			Node parent = node.getParentNode();
-			if ((parent != null) && (parent.getNodeType() != Node.DOCUMENT_NODE)) {
-				replaceText = parent.getNodeName() + ">"; //$NON-NLS-1$
-				cursorOffset = replaceText.length();
-				displayString = NLS.bind(XMLUIMessages.End_with__, (new Object[]{parent.getNodeName()}));
-				setErrorMessage(null);
-				addProposal = true;
-			}
-		}
-		// ////////////////////////////////////////////////////////////////////////////////////
-		else if (node.getNodeType() == Node.DOCUMENT_NODE) {
-			setErrorMessage(UNKNOWN_CONTEXT);
-		}
-		if (addProposal == true) {
-			CustomCompletionProposal proposal = new CustomCompletionProposal(replaceText, replaceBegin, replaceLength, cursorOffset, image, displayString, null, proposedInfo, XMLRelevanceConstants.R_END_TAG);
-			contentAssistRequest.addProposal(proposal);
-		}
-	}
-
-	protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, IDOMNode treeNode) {
-		ICompletionProposal[] eps = computeEntityReferenceProposals(documentPosition, completionRegion, treeNode);
-		for (int i = 0; (eps != null) && (i < eps.length); i++) {
-			contentAssistRequest.addProposal(eps[i]);
-		}
-	}
-
-	protected void addEntityProposals(Vector proposals, Properties map, String key, int nodeOffset, IStructuredDocumentRegion sdRegion, ITextRegion completionRegion) {
-		if (map == null) {
-			return;
-		}
-		String entityName = ""; //$NON-NLS-1$
-		String entityValue = ""; //$NON-NLS-1$
-		Image entityIcon = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ENTITY_REFERENCE);
-		String replacementText = ""; //$NON-NLS-1$
-		String displayString = ""; //$NON-NLS-1$
-		Enumeration keys = map.keys();
-
-		while ((keys != null) && keys.hasMoreElements()) {
-			entityName = (String) keys.nextElement();
-			entityValue = map.getProperty(entityName);
-			// filter based on partial entity string...
-			if (entityName.toLowerCase().startsWith(key.toLowerCase()) || key.trim().equals("")) //$NON-NLS-1$
-			{
-				// figure out selection...if text is selected, add it to
-				// selection length
-				int selectionLength = nodeOffset;
-				if (fTextViewer != null) {
-					selectionLength += fTextViewer.getSelectedRange().y;
-				}
-				// create a new proposal for entity string...
-				replacementText = "&" + entityName + ";"; //$NON-NLS-1$ //$NON-NLS-2$ 
-				displayString = "&" + entityName + "; (" + entityValue + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-				ICompletionProposal cp = new CustomCompletionProposal(replacementText, sdRegion.getStartOffset(completionRegion), selectionLength, replacementText.length(), entityIcon, displayString, null, null, XMLRelevanceConstants.R_ENTITY);
-				if (cp != null) {
-					proposals.add(cp);
-				}
-			}
-		}
-	}
-
-	protected void addPCDATAProposal(String nodeName, ContentAssistRequest contentAssistRequest) {
-		CustomCompletionProposal proposal = new CustomCompletionProposal("<![CDATA[]]>", //$NON-NLS-1$
-					contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 9, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_CDATASECTION), "CDATA Section", //$NON-NLS-1$
-					null, null, XMLRelevanceConstants.R_CDATA);
-		contentAssistRequest.addProposal(proposal);
-
-		proposal = new CustomCompletionProposal(nodeName, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), nodeName.length(), XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TXTEXT), "#PCDATA", //$NON-NLS-1$
-					null, null, XMLRelevanceConstants.R_CDATA);
-		contentAssistRequest.addProposal(proposal);
-	}
-
-	protected void addStartDocumentProposals(ContentAssistRequest contentAssistRequest) {
-		Node aNode = contentAssistRequest.getNode();
-		boolean xmlpiFound = false;
-		Document owningDocument = aNode.getOwnerDocument();
-		// ==> // int xmlpiNodePosition = -1;
-
-		// make sure xmlpi is root element
-		// don't want doctype proposal if XMLPI isn't first element...
-		Node first = owningDocument.getFirstChild();
-		boolean xmlpiIsFirstElement = ((first != null) && (first.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE));
-		boolean insertDoctype = xmlpiIsFirstElement;
-
-		for (Node child = owningDocument.getFirstChild(); child != null; child = child.getNextSibling()) {
-			boolean xmlpi = ((child.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) && child.getNodeName().equals("xml")); //$NON-NLS-1$
-			xmlpiFound = xmlpiFound || xmlpi;
-			if (xmlpiFound) {
-				if (child instanceof IDOMNode) {
-					// ==> // int xmlpiNodePosition =
-					// ((XMLNode)child).getEndOffset();
-				}
-				// skip white space and text
-				while (((child = child.getNextSibling()) != null) && (child.getNodeType() == Node.TEXT_NODE)) {
-					// just skipping
-				}
-				// check if theres a node inbetween XMLPI and cursor position
-				if ((child != null) && (child instanceof IDOMNode)) {
-					if ((contentAssistRequest.getReplacementBeginPosition() >= ((IDOMNode) child).getEndOffset()) || !xmlpiIsFirstElement) {
-						insertDoctype = false;
-					}
-				}
-				break;
-			}
-		}
-
-		if (xmlpiFound && (owningDocument.getDoctype() == null) && isCursorAfterXMLPI(contentAssistRequest) && insertDoctype) {
-			addDocTypeProposal(contentAssistRequest);
-		}
-	}
-
-	/**
-	 * Close an unclosed start tag
-	 */
-	protected void addTagCloseProposals(ContentAssistRequest contentAssistRequest) {
-		IDOMNode node = (IDOMNode) contentAssistRequest.getParent();
-		if (node.getNodeType() == Node.ELEMENT_NODE) {
-
-			CMElementDeclaration elementDecl = getCMElementDeclaration(node);
-			String proposedInfo = (elementDecl != null) ? getAdditionalInfo(null, elementDecl) : null;
-			int contentType = (elementDecl != null) ? elementDecl.getContentType() : CMElementDeclaration.ANY;
-			// if it's XML and content doesn't HAVE to be element, add "/>"
-			// proposal.
-			boolean endWithSlashBracket = (getXML(node) && (contentType != CMElementDeclaration.ELEMENT));
-
-			Image image = CMImageUtil.getImage(elementDecl);
-			if (image == null) {
-				image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
-			}
-
-			// is the start tag ended properly?
-			if ((contentAssistRequest.getDocumentRegion() == node.getFirstStructuredDocumentRegion()) && !(node.getFirstStructuredDocumentRegion()).isEnded()) {
-				setErrorMessage(null);
-				// Is this supposed to be an empty tag? Note that if we can't
-				// tell, we assume it's not.
-				if ((elementDecl != null) && (elementDecl.getContentType() == CMElementDeclaration.EMPTY)) {
-					// prompt with a self-closing end character if needed
-					CustomCompletionProposal proposal = new CustomCompletionProposal(getContentGenerator().getStartTagClose(node, elementDecl), contentAssistRequest.getReplacementBeginPosition(),
-					// this is one of the few times to ignore the length --
-								// always insert
-								// contentAssistRequest.getReplacementLength(),
-								0, getContentGenerator().getStartTagClose(node, elementDecl).length(), image, NLS.bind(XMLUIMessages.Close_with___, (new Object[]{getContentGenerator().getStartTagClose(node, elementDecl)})), null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
-					contentAssistRequest.addProposal(proposal);
-				}
-				else {
-					// prompt with a close for the start tag
-					CustomCompletionProposal proposal = new CustomCompletionProposal(">", //$NON-NLS-1$
-								contentAssistRequest.getReplacementBeginPosition(),
-								// this is one of the few times to ignore the
-								// length -- always insert
-								// contentAssistRequest.getReplacementLength(),
-								0, 1, image, NLS.bind(XMLUIMessages.Close_with__, (new Object[]{" '>'"})), //$NON-NLS-1$
-								null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
-					contentAssistRequest.addProposal(proposal);
-
-					// prompt with the closer for the start tag and an end tag
-					// if one is not present
-					if (node.getEndStructuredDocumentRegion() == null) {
-						// make sure tag name is actually what it thinks it
-						// is...(eg. <%@ vs. <jsp:directive)
-						IStructuredDocumentRegion sdr = contentAssistRequest.getDocumentRegion();
-						String openingTagText = (sdr != null) ? sdr.getFullText() : ""; //$NON-NLS-1$
-						if ((openingTagText != null) && (openingTagText.indexOf(node.getNodeName()) != -1)) {
-							proposal = new CustomCompletionProposal("></" + node.getNodeName() + ">", //$NON-NLS-2$//$NON-NLS-1$
-										contentAssistRequest.getReplacementBeginPosition(),
-										// this is one of the few times to
-										// ignore the length -- always insert
-										// contentAssistRequest.getReplacementLength(),
-										0, 1, image, NLS.bind(XMLUIMessages.Close_with____, (new Object[]{node.getNodeName()})), null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
-							contentAssistRequest.addProposal(proposal);
-						}
-					}
-					// prompt with slash bracket "/>" incase if it's a self
-					// ending tag
-					if (endWithSlashBracket) {
-						proposal = new CustomCompletionProposal("/>", //$NON-NLS-1$
-									contentAssistRequest.getReplacementBeginPosition(),
-									// this is one of the few times to ignore
-									// the length -- always insert
-									// contentAssistRequest.getReplacementLength(),
-									0, 2, image, NLS.bind(XMLUIMessages.Close_with__, (new Object[]{" \"/>\""})), //$NON-NLS-1$
-									null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG + 1); // +1
-						// to
-						// bring
-						// to
-						// top
-						// of
-						// list
-						contentAssistRequest.addProposal(proposal);
-					}
-				}
-			}
-			else if ((contentAssistRequest.getDocumentRegion() == node.getLastStructuredDocumentRegion()) && !node.getLastStructuredDocumentRegion().isEnded()) {
-				setErrorMessage(null);
-				// prompt with a closing end character for the end tag
-				CustomCompletionProposal proposal = new CustomCompletionProposal(">", //$NON-NLS-1$
-							contentAssistRequest.getReplacementBeginPosition(),
-							// this is one of the few times to ignore the
-							// length -- always insert
-							// contentAssistRequest.getReplacementLength(),
-							0, 1, image, NLS.bind(XMLUIMessages.Close_with__, (new Object[]{" '>'"})), //$NON-NLS-1$
-							null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
-				contentAssistRequest.addProposal(proposal);
-			}
-		}
-		else if (node.getNodeType() == Node.DOCUMENT_NODE) {
-			setErrorMessage(UNKNOWN_CONTEXT);
-		}
-	}
-
-	protected void addTagInsertionProposals(ContentAssistRequest contentAssistRequest, int childPosition) {
-		List cmnodes = null;
-		Node parent = contentAssistRequest.getParent();
-		String error = null;
-
-		// (nsd) This is only valid at the document element level
-		// only valid if it's XML (check added 2/17/2004)
-		if ((parent != null) && (parent.getNodeType() == Node.DOCUMENT_NODE) && ((IDOMDocument) parent).isXMLType() && !isCursorAfterXMLPI(contentAssistRequest)) {
-			return;
-		}
-		// only want proposals if cursor is after doctype...
-		if (!isCursorAfterDoctype(contentAssistRequest)) {
-			return;
-		}
-
-		// fix for meta-info comment nodes.. they currently "hide" other
-		// proposals because the don't
-		// have a content model (so can't propose any children..)
-		if ((parent != null) && (parent instanceof IDOMNode) && isCommentNode((IDOMNode) parent)) {
-			// loop and find non comment node?
-			while ((parent != null) && isCommentNode((IDOMNode) parent)) {
-				parent = parent.getParentNode();
-			}
-		}
-
-		if (parent.getNodeType() == Node.ELEMENT_NODE) {
-			CMElementDeclaration parentDecl = getCMElementDeclaration(parent);
-			if (parentDecl != null) {
-				// XSD-specific ability - no filtering
-				CMDataType childType = parentDecl.getDataType();
-				if (childType != null) {
-					String[] childStrings = childType.getEnumeratedValues();
-					if (childStrings != null) {
-						// the content string is the sole valid child...so
-						// replace the rest
-						int begin = contentAssistRequest.getReplacementBeginPosition();
-						int length = contentAssistRequest.getReplacementLength();
-						if (parent instanceof IDOMNode) {
-							if (((IDOMNode) parent).getLastStructuredDocumentRegion() != ((IDOMNode) parent).getFirstStructuredDocumentRegion()) {
-								begin = ((IDOMNode) parent).getFirstStructuredDocumentRegion().getEndOffset();
-								length = ((IDOMNode) parent).getLastStructuredDocumentRegion().getStartOffset() - begin;
-							}
-						}
-						String proposedInfo = getAdditionalInfo(parentDecl, childType);
-						for (int i = 0; i < childStrings.length; i++) {
-							CustomCompletionProposal textProposal = new CustomCompletionProposal(childStrings[i], begin, length, childStrings[i].length(), XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ENUM), childStrings[i], null, proposedInfo, XMLRelevanceConstants.R_TAG_INSERTION);
-							contentAssistRequest.addProposal(textProposal);
-						}
-					}
-				}
-			}
-			if ((parentDecl != null) && (parentDecl.getContentType() == CMElementDeclaration.PCDATA)) {
-				addPCDATAProposal(parentDecl.getNodeName(), contentAssistRequest);
-			}
-			else {
-				// retrieve the list of all possible children within this
-				// parent context
-				cmnodes = getAvailableChildElementDeclarations((Element) parent, childPosition, ModelQueryAction.INSERT);
-
-				// retrieve the list of the possible children within this
-				// parent context and at this index
-				List strictCMNodeSuggestions = null;
-				if (XMLUIPreferenceNames.SUGGESTION_STRATEGY_VALUE_STRICT.equals(XMLUIPlugin.getInstance().getPreferenceStore().getString(XMLUIPreferenceNames.SUGGESTION_STRATEGY))) {
-					strictCMNodeSuggestions = getValidChildElementDeclarations((Element) parent, childPosition, ModelQueryAction.INSERT);
-				}
-				Iterator nodeIterator = cmnodes.iterator();
-				if (!nodeIterator.hasNext()) {
-					if (getCMElementDeclaration(parent) != null) {
-						error = NLS.bind(XMLUIMessages._Has_no_available_child, (new Object[]{parent.getNodeName()}));
-					}
-					else {
-						error = NLS.bind(XMLUIMessages.Element__is_unknown, (new Object[]{parent.getNodeName()}));
-					}
-				}
-				String matchString = contentAssistRequest.getMatchString();
-				// chop off any leading <'s and whitespace from the
-				// matchstring
-				while ((matchString.length() > 0) && (Character.isWhitespace(matchString.charAt(0)) || beginsWith(matchString, "<"))) {
-					//$NON-NLS-1$
-					matchString = matchString.substring(1);
-				}
-				while (nodeIterator.hasNext()) {
-					Object o = nodeIterator.next();
-					if (o instanceof CMElementDeclaration) {
-						CMElementDeclaration elementDecl = (CMElementDeclaration) o;
-						// only add proposals for the child element's that
-						// begin with the matchstring
-						String tagname = getRequiredName(parent, elementDecl);
-						boolean isStrictCMNodeSuggestion = strictCMNodeSuggestions != null ? strictCMNodeSuggestions.contains(elementDecl) : false;
-
-						Image image = CMImageUtil.getImage(elementDecl);
-
-						if (image == null) {
-							if (strictCMNodeSuggestions != null) {
-								image = isStrictCMNodeSuggestion ? XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC_EMPHASIZED) : XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC_DEEMPHASIZED);
-							}
-							else {
-								image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
-							}
-
-						}
-
-						// int markupAdjustment =
-						// getContentGenerator().getMinimalStartTagLength(parent,
-						// elementDecl);
-						if (beginsWith(tagname, matchString)) {
-							String proposedText = getRequiredText(parent, elementDecl);
-
-							// https://bugs.eclipse.org/bugs/show_bug.cgi?id=89811
-							// place cursor in first empty quotes
-							int markupAdjustment = getCursorPositionForProposedText(proposedText);
-
-							String proposedInfo = getAdditionalInfo(parentDecl, elementDecl);
-							int relevance = isStrictCMNodeSuggestion ? XMLRelevanceConstants.R_STRICTLY_VALID_TAG_INSERTION : XMLRelevanceConstants.R_TAG_INSERTION;
-							CustomCompletionProposal proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), markupAdjustment, image, tagname, null, proposedInfo, relevance);
-							contentAssistRequest.addProposal(proposal);
-						}
-					}
-				}
-				if (contentAssistRequest.getProposals().size() == 0) {
-					if (error != null) {
-						setErrorMessage(error);
-					}
-					else if ((contentAssistRequest.getMatchString() != null) && (contentAssistRequest.getMatchString().length() > 0)) {
-						setErrorMessage(NLS.bind(XMLUIMessages.No_known_child_tag, (new Object[]{parent.getNodeName(), contentAssistRequest.getMatchString()})));
-						//$NON-NLS-1$ = "No known child tag names of <{0}> begin with \"{1}\"."
-					}
-					else {
-						setErrorMessage(NLS.bind(XMLUIMessages.__Has_no_known_child, (new Object[]{parent.getNodeName()})));
-					}
-				}
-			}
-		}
-		else if (parent.getNodeType() == Node.DOCUMENT_NODE) {
-			// Can only prompt with elements if the cursor position is past
-			// the XML processing
-			// instruction and DOCTYPE declaration
-			boolean xmlpiFound = false;
-			boolean doctypeFound = false;
-			int minimumOffset = -1;
-
-			for (Node child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
-
-				boolean xmlpi = ((child.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) && child.getNodeName().equals("xml")); //$NON-NLS-1$
-				boolean doctype = child.getNodeType() == Node.DOCUMENT_TYPE_NODE;
-				if (xmlpi || (doctype && (minimumOffset < 0))) {
-					minimumOffset = ((IDOMNode) child).getFirstStructuredDocumentRegion().getStartOffset() + ((IDOMNode) child).getFirstStructuredDocumentRegion().getTextLength();
-				}
-				xmlpiFound = xmlpiFound || xmlpi;
-				doctypeFound = doctypeFound || doctype;
-			}
-
-			if (contentAssistRequest.getReplacementBeginPosition() >= minimumOffset) {
-				List childDecls = getAvailableRootChildren((Document) parent, childPosition);
-				for (int i = 0; i < childDecls.size(); i++) {
-					CMElementDeclaration ed = (CMElementDeclaration) childDecls.get(i);
-					if (ed != null) {
-						Image image = CMImageUtil.getImage(ed);
-						if (image == null) {
-							image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
-						}
-						String proposedText = getRequiredText(parent, ed);
-						String tagname = getRequiredName(parent, ed);
-						// account for the &lt; and &gt;
-						int markupAdjustment = getContentGenerator().getMinimalStartTagLength(parent, ed);
-						String proposedInfo = getAdditionalInfo(null, ed);
-						CustomCompletionProposal proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), markupAdjustment, image, tagname, null, proposedInfo, XMLRelevanceConstants.R_TAG_INSERTION);
-						contentAssistRequest.addProposal(proposal);
-					}
-				}
-			}
-		}
-	}
-
-	protected void addTagNameProposals(ContentAssistRequest contentAssistRequest, int childPosition) {
-		List cmnodes = null;
-		Node parent = contentAssistRequest.getParent();
-		IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-		String error = null;
-		String matchString = contentAssistRequest.getMatchString();
-		if (parent.getNodeType() == Node.ELEMENT_NODE) {
-			// retrieve the list of children
-			// validActions = getAvailableChildrenAtIndex((Element) parent,
-			// childPosition);
-			cmnodes = getAvailableChildElementDeclarations((Element) parent, childPosition, ModelQueryAction.INSERT);
-			Iterator nodeIterator = cmnodes.iterator();
-			// chop off any leading <'s and whitespace from the matchstring
-			while ((matchString.length() > 0) && (Character.isWhitespace(matchString.charAt(0)) || beginsWith(matchString, "<"))) {
-				//$NON-NLS-1$
-				matchString = matchString.substring(1);
-			}
-			if (!nodeIterator.hasNext()) {
-				error = NLS.bind(XMLUIMessages.__Has_no_known_child, (new Object[]{parent.getNodeName()}));
-			}
-			while (nodeIterator.hasNext()) {
-				CMNode elementDecl = (CMNode) nodeIterator.next();
-				if (elementDecl != null) {
-					// only add proposals for the child element's that begin
-					// with the matchstring
-					String proposedText = null;
-					int cursorAdjustment = 0;
-
-					// do a check to see if partial attributes of partial tag
-					// names are in list
-					if (((node != null) && (node.getAttributes() != null) && (node.getAttributes().getLength() > 0) && attributeInList(node, parent, elementDecl)) || ((node.getNodeType() != Node.TEXT_NODE) && node.getFirstStructuredDocumentRegion().isEnded())) {
-
-						proposedText = getRequiredName(parent, elementDecl);
-						cursorAdjustment = proposedText.length();
-					}
-					else {
-						proposedText = getRequiredName(parent, elementDecl);
-						cursorAdjustment = proposedText.length();
-						if (elementDecl instanceof CMElementDeclaration) {
-							CMElementDeclaration ed = (CMElementDeclaration) elementDecl;
-							if (ed.getContentType() == CMElementDeclaration.EMPTY) {
-								proposedText += getContentGenerator().getStartTagClose(parent, ed);
-								cursorAdjustment = proposedText.length();
-							}
-							else {
-								// https://bugs.eclipse.org/bugs/show_bug.cgi?id=89811
-								StringBuffer sb = new StringBuffer();
-								getContentGenerator().generateTag(parent, ed, sb);
-								// since it's a name proposal, assume '<' is
-								// already there
-								// only return the rest of the tag
-								proposedText = sb.toString().substring(1);
-								cursorAdjustment = getCursorPositionForProposedText(proposedText);
-
-								// cursorAdjustment = proposedText.length() +
-								// 1;
-								// proposedText += "></" +
-								// getRequiredName(parent, elementDecl) + ">";
-								// //$NON-NLS-2$//$NON-NLS-1$
-							}
-						}
-					}
-					if (beginsWith(proposedText, matchString)) {
-						Image image = CMImageUtil.getImage(elementDecl);
-						if (image == null) {
-							image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
-						}
-						String proposedInfo = getAdditionalInfo(getCMElementDeclaration(parent), elementDecl);
-						CustomCompletionProposal proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), cursorAdjustment, image, getRequiredName(parent, elementDecl), null, proposedInfo, XMLRelevanceConstants.R_TAG_NAME);
-						contentAssistRequest.addProposal(proposal);
-					}
-				}
-			}
-			if (contentAssistRequest.getProposals().size() == 0) {
-				if (error != null) {
-					setErrorMessage(error);
-				}
-				else if ((contentAssistRequest.getMatchString() != null) && (contentAssistRequest.getMatchString().length() > 0)) {
-					setErrorMessage(NLS.bind(XMLUIMessages.No_known_child_tag_names, (new Object[]{parent.getNodeName(), contentAssistRequest.getMatchString()})));
-					//$NON-NLS-1$ = "No known child tag names of <{0}> begin with \"{1}\""
-				}
-				else {
-					setErrorMessage(NLS.bind(XMLUIMessages.__Has_no_known_child, (new Object[]{parent.getNodeName()})));
-				}
-			}
-		}
-		else if (parent.getNodeType() == Node.DOCUMENT_NODE) {
-			List childElements = getAvailableRootChildren((Document) parent, childPosition);
-			for (int i = 0; i < childElements.size(); i++) {
-				CMNode ed = (CMNode) childElements.get(i);
-				if (ed == null) {
-					continue;
-				}
-				String proposedText = null;
-				int cursorAdjustment = 0;
-				if (ed instanceof CMElementDeclaration) {
-					// proposedText = getRequiredName(parent, ed);
-					StringBuffer sb = new StringBuffer();
-					getContentGenerator().generateTag(parent, (CMElementDeclaration) ed, sb);
-					// tag starts w/ '<', but we want to compare to name
-					proposedText = sb.toString().substring(1);
-
-					if (!beginsWith(proposedText, matchString)) {
-						continue;
-					}
-
-					cursorAdjustment = getCursorPositionForProposedText(proposedText);
-
-					if (ed instanceof CMElementDeclaration) {
-						CMElementDeclaration elementDecl = (CMElementDeclaration) ed;
-						if (elementDecl.getContentType() == CMElementDeclaration.EMPTY) {
-							proposedText += getContentGenerator().getStartTagClose(parent, elementDecl);
-							cursorAdjustment = proposedText.length();
-						}
-					}
-
-					String proposedInfo = getAdditionalInfo(null, ed);
-					Image image = CMImageUtil.getImage(ed);
-					if (image == null) {
-						image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
-					}
-					CustomCompletionProposal proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), cursorAdjustment, image, getRequiredName(parent, ed), null, proposedInfo, XMLRelevanceConstants.R_TAG_NAME);
-					contentAssistRequest.addProposal(proposal);
-				}
-			}
-		}
-	}
-
-	/**
-	 * this is the position the cursor should be in after the proposal is
-	 * applied
-	 * 
-	 * @param proposedText
-	 * @return the position the cursor should be in after the proposal is
-	 *         applied
-	 */
-	private int getCursorPositionForProposedText(String proposedText) {
-		int cursorAdjustment;
-		cursorAdjustment = proposedText.indexOf("\"\"") + 1; //$NON-NLS-1$
-		// otherwise, after the first tag
-		if (cursorAdjustment == 0) {
-			cursorAdjustment = proposedText.indexOf('>') + 1;
-		}
-		if (cursorAdjustment == 0) {
-			cursorAdjustment = proposedText.length() + 1;
-		}
-
-		return cursorAdjustment;
-	}
-
-	/**
-	 * @deprecated XML proposal is added via xml declaration template instead
-	 */
-	protected void addXMLProposal(ContentAssistRequest contentAssistRequest) {
-		String proposedText = "<?xml version=\"1.0\" encoding=\"" + ContentTypeEncodingPreferences.getUserPreferredCharsetName(ContentTypeIdForXML.ContentTypeID_XML) + "\"?>"; //$NON-NLS-2$//$NON-NLS-1$
-		ICompletionProposal proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), proposedText.length(), XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_PROCESSINGINSTRUCTION), proposedText, null, null, XMLRelevanceConstants.R_XML_DECLARATION);
-		// TODO add special XML proposal info
-		contentAssistRequest.addProposal(proposal);
-	}
-
-	/**
-	 * This method determines if any of the attributes in the proposed XMLNode
-	 * node, are possible values of attributes from possible Elements at this
-	 * point in the document according to the Content Model.
-	 * 
-	 * @param node
-	 *            the element with attributes that you would like to test if
-	 *            are possible for possible Elements at this point
-	 * @param cmnode
-	 *            possible element at this point in the document (depending on
-	 *            what 'node' is) true if any attributes of 'node' match any
-	 *            possible attributes from 'cmnodes' list.
-	 */
-	protected boolean attributeInList(IDOMNode node, Node parent, CMNode cmnode) {
-		if ((node == null) || (parent == null) || (cmnode == null)) {
-			return false;
-		}
-		String elementMatchString = node.getNodeName();
-		String cmnodeName = getRequiredName(parent, cmnode);// cmnode.getNodeName();
-		if (node instanceof Element) {
-			NamedNodeMap map = ((Element) node).getAttributes();
-			String attrMatchString = ""; //$NON-NLS-1$
-			CMNamedNodeMap cmattrMap = null;
-			// iterate attribute possibilities for partially started node
-			for (int i = 0; (map != null) && (i < map.getLength()); i++) {
-				attrMatchString = map.item(i).getNodeName();
-				// filter on whatever user typed for element name already
-				if (beginsWith(cmnodeName, elementMatchString)) {
-					if (cmnode.getNodeType() == CMNode.ELEMENT_DECLARATION) {
-						cmattrMap = ((CMElementDeclaration) cmnode).getAttributes();
-
-						CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(cmattrMap);
-						List nodes = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent((Element) node, (CMElementDeclaration) cmnode, ModelQuery.INCLUDE_ATTRIBUTES);
-						for (int k = 0; k < nodes.size(); k++) {
-							CMNode adnode = (CMNode) nodes.get(k);
-							if (adnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-								allAttributes.put(adnode);
-							}
-						}
-						cmattrMap = allAttributes;
-						
-						// iterate possible attributes from a cmnode in
-						// proposal list
-						for (int k = 0; (cmattrMap != null) && (k < cmattrMap.getLength()); k++) {
-							// check if name matches
-							if (cmattrMap.item(k).getNodeName().equals(attrMatchString)) {
-								return true;
-							}
-						}
-					}
-				}
-			}
-		}
-		return false;
-	}
-
-	protected boolean beginsWith(String aString, String prefix) {
-		if ((aString == null) || (prefix == null)) {
-			return true;
-		}
-		// (pa) matching independent of case to be consistant with Java
-		// editor CA
-		return aString.toLowerCase().startsWith(prefix.toLowerCase());
-	}
-
-	protected ContentAssistRequest computeAttributeProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
-		ContentAssistRequest contentAssistRequest = null;
-		IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
-		if (documentPosition < sdRegion.getStartOffset(completionRegion)) {
-			// setup to insert new attributes
-			contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, sdRegion, completionRegion, documentPosition, 0, matchString);
-		}
-		else {
-			// Setup to replace an existing attribute name
-			contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, sdRegion, completionRegion, sdRegion.getStartOffset(completionRegion), completionRegion.getTextLength(), matchString);
-		}
-		addAttributeNameProposals(contentAssistRequest);
-		contentAssistRequest.setReplacementBeginPosition(documentPosition);
-		contentAssistRequest.setReplacementLength(0);
-		if ((node.getFirstStructuredDocumentRegion() != null) && (!node.getFirstStructuredDocumentRegion().isEnded())) {
-			addTagCloseProposals(contentAssistRequest);
-		}
-		return contentAssistRequest;
-	}
-
-	protected ContentAssistRequest computeAttributeValueProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
-		ContentAssistRequest contentAssistRequest = null;
-		IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
-		if ((documentPosition > sdRegion.getStartOffset(completionRegion) + completionRegion.getTextLength()) && (sdRegion.getStartOffset(completionRegion) + completionRegion.getTextLength() != sdRegion.getStartOffset(completionRegion) + completionRegion.getLength())) {
-			// setup to add a new attribute at the documentPosition
-			IDOMNode actualNode = (IDOMNode) node.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
-			contentAssistRequest = newContentAssistRequest(actualNode, actualNode, sdRegion, completionRegion, documentPosition, 0, matchString);
-			addAttributeNameProposals(contentAssistRequest);
-			if ((actualNode.getFirstStructuredDocumentRegion() != null) && !actualNode.getFirstStructuredDocumentRegion().isEnded()) {
-				addTagCloseProposals(contentAssistRequest);
-			}
-		}
-		else {
-			// setup to replace the existing value
-			if (!nodeAtOffset.getFirstStructuredDocumentRegion().isEnded() && (documentPosition < sdRegion.getStartOffset(completionRegion))) {
-				// if the IStructuredDocumentRegion isn't closed and the
-				// cursor is in front of the value, add
-				contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, sdRegion, completionRegion, documentPosition, 0, matchString);
-				addAttributeNameProposals(contentAssistRequest);
-			}
-			else {
-				contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, sdRegion, completionRegion, sdRegion.getStartOffset(completionRegion), completionRegion.getTextLength(), matchString);
-				addAttributeValueProposals(contentAssistRequest);
-			}
-		}
-		return contentAssistRequest;
-	}
-
-	protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) {
-		ContentAssistRequest contentAssistRequest = null;
-		String regionType = completionRegion.getType();
-		IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
-
-		// Handle the most common and best supported cases
-		if ((xmlnode.getNodeType() == Node.ELEMENT_NODE) || (xmlnode.getNodeType() == Node.DOCUMENT_NODE)) {
-			if (regionType == DOMRegionContext.XML_TAG_OPEN) {
-				contentAssistRequest = computeTagOpenProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-			}
-			else if (regionType == DOMRegionContext.XML_TAG_NAME) {
-				contentAssistRequest = computeTagNameProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-			}
-			else if (regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-				contentAssistRequest = computeAttributeProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-			}
-			else if (regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) {
-				contentAssistRequest = computeEqualsProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-			}
-			else if ((regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) && (documentPosition == sdRegion.getTextEndOffset()) && (sdRegion.getText(completionRegion).endsWith("\"") || sdRegion.getText(completionRegion).endsWith("\'"))) //$NON-NLS-1$ //$NON-NLS-2$
-			{
-				// this is for when the cursor is at the end of the closing
-				// quote for an attribute..
-				IDOMNode actualNode = (IDOMNode) xmlnode.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
-				contentAssistRequest = newContentAssistRequest(actualNode, actualNode, sdRegion, completionRegion, documentPosition, 0, matchString);
-				addTagCloseProposals(contentAssistRequest);
-			}
-			else if (regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-				contentAssistRequest = computeAttributeValueProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-			}
-			else if ((regionType == DOMRegionContext.XML_TAG_CLOSE) || (regionType == DOMRegionContext.XML_EMPTY_TAG_CLOSE) || (regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_DIRECTIVE_CLOSE))) {
-				contentAssistRequest = computeTagCloseProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-			}
-			else if (regionType == DOMRegionContext.XML_END_TAG_OPEN) {
-				contentAssistRequest = computeEndTagOpenProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-			}
-			else if ((regionType == DOMRegionContext.XML_CONTENT) || (regionType == DOMRegionContext.XML_CHAR_REFERENCE) || (regionType == DOMRegionContext.XML_ENTITY_REFERENCE) || (regionType == DOMRegionContext.XML_PE_REFERENCE)) {
-				contentAssistRequest = computeContentProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-			}
-
-			// These ITextRegion types begin DOM Elements as well and although
-			// internally harder to assist,
-			// text insertions directly before them can be made
-			else if ((documentPosition == sdRegion.getStartOffset(completionRegion)) && (regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_COMMENT_OPEN) || regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_DECLARATION_OPEN) || regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_DIRECTIVE_OPEN) || regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_EXPRESSION_OPEN) || regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_SCRIPTLET_OPEN) || (regionType == DOMRegionContext.XML_DECLARATION_OPEN) || (regionType == DOMRegionContext.XML_PI_OPEN) || (regionType == DOMRegionContext.XML_COMMENT_OPEN) || (regionType == DOMRegionContext.XML_CDATA_OPEN))) {
-				contentAssistRequest = newContentAssistRequest(treeNode, xmlnode.getParentNode(), sdRegion, completionRegion, documentPosition, 0, matchString);
-				addTagInsertionProposals(contentAssistRequest, getElementPositionForModelQuery(treeNode));
-				addStartDocumentProposals(contentAssistRequest);
-			}
-		}
-		// Not a Document or Element? (odd cases go here for now)
-		else if (isCloseRegion(completionRegion)) {
-			contentAssistRequest = newContentAssistRequest(treeNode, xmlnode.getParentNode(), sdRegion, completionRegion, sdRegion.getStartOffset(completionRegion) + completionRegion.getLength(), 0, matchString);
-			addStartDocumentProposals(contentAssistRequest);
-			if (documentPosition >= sdRegion.getTextEndOffset(completionRegion)) {
-				addTagInsertionProposals(contentAssistRequest, getElementPositionForModelQuery(treeNode) + 1);
-			}
-		}
-		else if ((documentPosition == sdRegion.getStartOffset(completionRegion)) && (regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_COMMENT_OPEN) || regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_DECLARATION_OPEN) || regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_DIRECTIVE_OPEN) || regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_EXPRESSION_OPEN) || regionType.equals(DOMJSPRegionContextsPrivateCopy.JSP_SCRIPTLET_OPEN) || (regionType == DOMRegionContext.XML_DECLARATION_OPEN) || (regionType == DOMRegionContext.XML_PI_OPEN) || (regionType == DOMRegionContext.XML_COMMENT_OPEN) || (regionType == DOMRegionContext.XML_CDATA_OPEN))) {
-			contentAssistRequest = newContentAssistRequest(treeNode, xmlnode.getParentNode(), sdRegion, completionRegion, documentPosition, 0, matchString);
-			addTagInsertionProposals(contentAssistRequest, getElementPositionForModelQuery(treeNode));
-			addStartDocumentProposals(contentAssistRequest);
-		}
-		return contentAssistRequest;
-	}
-
-	/**
-	 * CONTENT ASSIST STARTS HERE
-	 * 
-	 * Return a list of proposed code completions based on the specified
-	 * location within the document that corresponds to the current cursor
-	 * position within the text-editor control.
-	 * 
-	 * @param textViewer
-	 * @param documentPosition -
-	 *            the cursor location within the document
-	 * 
-	 * an array of ICompletionProposals
-	 */
-	public ICompletionProposal[] computeCompletionProposals(ITextViewer textViewer, int documentPosition) {
-
-		setErrorMessage(null);
-
-		fTextViewer = textViewer;
-
-		IndexedRegion treeNode = ContentAssistUtils.getNodeAt(textViewer, documentPosition);
-
-		Node node = (Node) treeNode;
-		while ((node != null) && (node.getNodeType() == Node.TEXT_NODE) && (node.getParentNode() != null)) {
-			node = node.getParentNode();
-		}
-		IDOMNode xmlnode = (IDOMNode) node;
-
-		ContentAssistRequest contentAssistRequest = null;
-
-		IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
-		ITextRegion completionRegion = getCompletionRegion(documentPosition, node);
-
-		String matchString = getMatchString(sdRegion, completionRegion, documentPosition);
-
-		// Handle empty Documents
-		if (completionRegion == null) {
-			if (((treeNode == null) || (((Node) treeNode).getNodeType() == Node.DOCUMENT_NODE)) && (completionRegion == null) && ((xmlnode == null) || (xmlnode.getChildNodes() == null) || (xmlnode.getChildNodes().getLength() == 0))) {
-				IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(textViewer.getDocument());
-				try {
-					if (sModel != null) {
-						IDOMDocument docNode = ((IDOMModel) sModel).getDocument();
-						contentAssistRequest = newContentAssistRequest(docNode, docNode, sdRegion, completionRegion, documentPosition, 0, null);
-						addEmptyDocumentProposals(contentAssistRequest);
-					}
-				}
-				finally {
-					if (sModel != null) {
-						sModel.releaseFromRead();
-					}
-				}
-				if (contentAssistRequest == null) {
-					Logger.logException(new IllegalStateException("problem getting model")); //$NON-NLS-1$
-					return new ICompletionProposal[0];
-				}
-				return contentAssistRequest.getCompletionProposals();
-			}
-			// MASSIVE ERROR CONDITION
-			Logger.logException(new IllegalStateException("completion region was null")); //$NON-NLS-1$
-			setErrorMessage(INTERNALERROR);
-			contentAssistRequest = newContentAssistRequest((Node) treeNode, node.getParentNode(), sdRegion, completionRegion, documentPosition, 0, ""); //$NON-NLS-1$
-			return contentAssistRequest.getCompletionProposals();
-		}
-
-
-		// catch documents where no region can be determined
-		if ((xmlnode.getNodeType() == Node.DOCUMENT_NODE) && ((completionRegion == null) || (xmlnode.getChildNodes() == null) || (xmlnode.getChildNodes().getLength() == 0))) {
-			contentAssistRequest = computeStartDocumentProposals(documentPosition, matchString, completionRegion, (IDOMNode) treeNode, xmlnode);
-			return contentAssistRequest.getCompletionProposals();
-		}
-
-		// compute normal proposals
-		contentAssistRequest = computeCompletionProposals(documentPosition, matchString, completionRegion, (IDOMNode) treeNode, xmlnode);
-		if (contentAssistRequest == null) {
-			contentAssistRequest = newContentAssistRequest((Node) treeNode, node.getParentNode(), sdRegion, completionRegion, documentPosition, 0, ""); //$NON-NLS-1$
-			if (Debug.displayWarnings) {
-				System.out.println(UNKNOWN_CONTEXT + " " + completionRegion.getType() + "@" + documentPosition); //$NON-NLS-2$//$NON-NLS-1$
-			}
-			setErrorMessage(UNKNOWN_CONTEXT);
-		}
-
-		/* 
-		 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=123892
-		 * Only set this error message if nothing else was already set 
-		 **/
-		if (contentAssistRequest.getProposals().size() == 0 && getErrorMessage() == null) {
-			setErrorMessage(UNKNOWN_CONTEXT);
-		}
-
-		return contentAssistRequest.getCompletionProposals();
-	}
-
-	protected ContentAssistRequest computeContentProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
-		ContentAssistRequest contentAssistRequest = null;
-
-		// setup to add children at the content node's position
-		contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, getStructuredDocumentRegion(documentPosition), completionRegion, documentPosition, 0, matchString);
-		if ((node != null) && (node.getNodeType() == Node.DOCUMENT_NODE) && (((Document) node).getDoctype() == null)) {
-			addStartDocumentProposals(contentAssistRequest);
-		}
-		addTagInsertionProposals(contentAssistRequest, getElementPositionForModelQuery(nodeAtOffset));
-		if (node.getNodeType() != Node.DOCUMENT_NODE) {
-			addEndTagProposals(contentAssistRequest);
-		}
-		// entities?
-		addEntityProposals(contentAssistRequest, documentPosition, completionRegion, node);
-		// addEntityProposals(contentAssistRequest);
-		return contentAssistRequest;
-	}
-
-	/**
-	 * Returns information about possible contexts based on the specified
-	 * location within the document that corresponds to the current cursor
-	 * position within the text viewer.
-	 * 
-	 * @param viewer
-	 *            the viewer whose document is used to compute the possible
-	 *            contexts an array of context information objects or
-	 *            <code>null</code> if no context could be found
-	 */
-	public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
-		if (fAttributeInfoProvider == null) {
-			fAttributeInfoProvider = new AttributeContextInformationProvider((IStructuredDocument) viewer.getDocument(), (AttributeContextInformationPresenter) getContextInformationValidator());
-		}
-		return fAttributeInfoProvider.getAttributeInformation(documentOffset);
-	}
-
-	protected ContentAssistRequest computeEndTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
-		ContentAssistRequest contentAssistRequest = null;
-		IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
-		int completionRegionStart = sdRegion.getStartOffset(completionRegion);
-		int completionRegionLength = completionRegion.getLength();
-		IStructuredDocumentRegion sdRegionAtCompletionOffset = node.getStructuredDocument().getRegionAtCharacterOffset(completionRegionStart + completionRegionLength);
-		ITextRegion regionAtEndOfCompletion = sdRegionAtCompletionOffset.getRegionAtCharacterOffset(completionRegionStart + completionRegionLength);
-
-		if ((documentPosition != completionRegionStart) && (regionAtEndOfCompletion != null) && (regionAtEndOfCompletion.getType() == DOMRegionContext.XML_TAG_NAME)) {
-			ITextRegion nameRegion = regionAtEndOfCompletion;
-			contentAssistRequest = newContentAssistRequest(nodeAtOffset, nodeAtOffset.getParentNode(), sdRegion, completionRegion, sdRegion.getStartOffset(nameRegion), nameRegion.getTextLength(), matchString);
-		}
-		else {
-			if (nodeAtOffset.getFirstStructuredDocumentRegion() == sdRegion) {
-				// abnormal case, this unmatched end tag will be a sibling
-				contentAssistRequest = newContentAssistRequest(nodeAtOffset, nodeAtOffset.getParentNode(), sdRegion, completionRegion, documentPosition, 0, matchString);
-			}
-			else {
-				// normal case, this end tag is the parent
-				contentAssistRequest = newContentAssistRequest(nodeAtOffset, nodeAtOffset, sdRegion, completionRegion, documentPosition, 0, matchString);
-			}
-		}
-		// if (documentPosition >= sdRegion.getStartOffset(completionRegion) +
-		// completionRegion.getTextLength())
-		addEndTagProposals(contentAssistRequest);
-		// else
-		if (completionRegionStart == documentPosition) {
-			// positioned at start of end tag
-			addTagInsertionProposals(contentAssistRequest, node.getChildNodes().getLength());
-		}
-		return contentAssistRequest;
-	}
-
-	/**
-	 * return all possible EntityReferenceProposals (according to current
-	 * position in doc)
-	 */
-	protected ICompletionProposal[] computeEntityReferenceProposals(int documentPosition, ITextRegion completionRegion, IDOMNode treeNode) {
-		// only handle XML content for now
-		Vector proposals = new Vector(); // ICompletionProposals
-		IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
-		if ((completionRegion != null) && (completionRegion.getType() == DOMRegionContext.XML_CONTENT)) {
-			int nodeOffset = documentPosition - sdRegion.getStartOffset(completionRegion);
-			String regionText = sdRegion.getFullText(completionRegion);
-
-			// if directly to the right of a &, region will be null, need to
-			// move to
-			// the previous region...there might be a better way to do this
-			if ((regionText != null) && regionText.trim().equals("") && (documentPosition > 0)) { //$NON-NLS-1$
-				IStructuredDocumentRegion prev = treeNode.getStructuredDocument().getRegionAtCharacterOffset(documentPosition - 1);
-				if ((prev != null) && prev.getText().equals("&")) { //$NON-NLS-1$
-					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=206680
-					// examine previous region
-					sdRegion = prev;
-					completionRegion = prev.getLastRegion();
-					regionText = prev.getFullText();
-					nodeOffset = 1;
-				}
-			}
-
-			// string must start w/ &
-			if ((regionText != null) && regionText.startsWith("&")) { //$NON-NLS-1$						 		
-				String key = (nodeOffset > 0) ? regionText.substring(1, nodeOffset) : ""; //$NON-NLS-1$
-
-				// get entity proposals, passing in the appropriate start
-				// string
-				ModelQuery mq = ModelQueryUtil.getModelQuery(((Node) treeNode).getOwnerDocument());
-				if (mq != null) {
-					CMDocument xmlDoc = mq.getCorrespondingCMDocument(treeNode);
-					CMNamedNodeMap cmmap = null;
-					Properties entities = null;
-					if (xmlDoc != null) {
-						cmmap = xmlDoc.getEntities();
-					}
-					if (cmmap != null) {
-						entities = mapToProperties(cmmap);
-					}
-					else // 224787 in absence of content model, just use
-					// minimal 5 entities
-					{
-						entities = new Properties();
-						entities.put("quot", "\""); //$NON-NLS-1$ //$NON-NLS-2$
-						entities.put("apos", "'"); //$NON-NLS-1$ //$NON-NLS-2$
-						entities.put("amp", "&"); //$NON-NLS-1$ //$NON-NLS-2$
-						entities.put("lt", "<"); //$NON-NLS-1$ //$NON-NLS-2$
-						entities.put("gt", ">"); //$NON-NLS-1$ //$NON-NLS-2$	
-						entities.put("nbsp", " "); //$NON-NLS-1$ //$NON-NLS-2$									
-					}
-					addEntityProposals(proposals, entities, key, nodeOffset, sdRegion, completionRegion);
-				}
-			}
-		}
-		return (ICompletionProposal[]) ((proposals.size() > 0) ? proposals.toArray(new ICompletionProposal[proposals.size()]) : null);
-	}
-
-	protected ContentAssistRequest computeEqualsProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
-		ContentAssistRequest contentAssistRequest = null;
-		IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
-		ITextRegion valueRegion = node.getStartStructuredDocumentRegion().getRegionAtCharacterOffset(sdRegion.getStartOffset(completionRegion) + completionRegion.getLength());
-		if ((valueRegion != null) && (valueRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) && (sdRegion.getStartOffset(valueRegion) <= documentPosition)) {
-			// replace the adjacent attribute value
-			contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, sdRegion, valueRegion, sdRegion.getStartOffset(valueRegion), valueRegion.getTextLength(), matchString);
-		}
-		else {
-			// append an attribute value after the '='
-			contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, sdRegion, completionRegion, documentPosition, 0, matchString);
-		}
-		addAttributeValueProposals(contentAssistRequest);
-		return contentAssistRequest;
-	}
-
-	protected ContentAssistRequest computeStartDocumentProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
-		// setup for a non-empty document, but one that hasn't been formally
-		// started
-		ContentAssistRequest contentAssistRequest = null;
-		contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, getStructuredDocumentRegion(documentPosition), completionRegion, documentPosition, 0, matchString);
-		addStartDocumentProposals(contentAssistRequest);
-		return contentAssistRequest;
-	}
-
-	protected ContentAssistRequest computeTagCloseProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
-		ContentAssistRequest contentAssistRequest = null;
-		IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
-
-		if ((node.getNodeType() == Node.DOCUMENT_NODE) || (documentPosition >= sdRegion.getEndOffset())) {
-			// this is a content request as the documentPosition is AFTER the
-			// end of the closing region
-			if ((node == nodeAtOffset) && (node.getParentNode() != null)) {
-				node = (IDOMNode) node.getParentNode();
-			}
-			contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, sdRegion, completionRegion, documentPosition, 0, matchString);
-			addTagInsertionProposals(contentAssistRequest, getElementPositionForModelQuery(nodeAtOffset));
-			if ((node.getNodeType() != Node.DOCUMENT_NODE) && (node.getEndStructuredDocumentRegion() == null)) {
-				addEndTagProposals(contentAssistRequest);
-			}
-		}
-		else {
-			// at the start of the tag's close or within it
-			ITextRegion closeRegion = sdRegion.getLastRegion();
-			boolean insideTag = !sdRegion.isEnded() || (documentPosition <= sdRegion.getStartOffset(closeRegion));
-			if (insideTag) {
-				// this is a request for completions within a tag
-				contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, sdRegion, completionRegion, documentPosition, 0, matchString);
-				if ((node.getNodeType() != Node.DOCUMENT_NODE) && (node.getEndStructuredDocumentRegion() != null)) {
-					addTagCloseProposals(contentAssistRequest);
-				}
-				if (sdRegion == nodeAtOffset.getFirstStructuredDocumentRegion()) {
-					contentAssistRequest.setReplacementBeginPosition(documentPosition);
-					contentAssistRequest.setReplacementLength(0);
-					addAttributeNameProposals(contentAssistRequest);
-				}
-			}
-		}
-		return contentAssistRequest;
-	}
-
-	protected ContentAssistRequest computeTagNameProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
-		ContentAssistRequest contentAssistRequest = null;
-		IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
-
-		if (sdRegion != nodeAtOffset.getFirstStructuredDocumentRegion()) {
-			// completing the *first* tag in "<tagname1 |<tagname2"
-			IDOMNode actualNode = (IDOMNode) node.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
-			if (actualNode != null) {
-				if (actualNode.getFirstStructuredDocumentRegion() == sdRegion) {
-					// start tag
-					if (documentPosition > sdRegion.getStartOffset(completionRegion) + completionRegion.getLength()) {
-						// it's attributes
-						contentAssistRequest = newContentAssistRequest(actualNode, actualNode, sdRegion, completionRegion, documentPosition - matchString.length(), matchString.length(), matchString);
-						if (node.getStructuredDocument().getRegionAtCharacterOffset(sdRegion.getStartOffset(completionRegion) - 1).getRegionAtCharacterOffset(sdRegion.getStartOffset(completionRegion) - 1).getType() == DOMRegionContext.XML_TAG_OPEN) {
-							addAttributeNameProposals(contentAssistRequest);
-						}
-						addTagCloseProposals(contentAssistRequest);
-					}
-					else {
-						// it's name
-						contentAssistRequest = newContentAssistRequest(actualNode, actualNode.getParentNode(), sdRegion, completionRegion, documentPosition - matchString.length(), matchString.length(), matchString);
-						addTagNameProposals(contentAssistRequest, getElementPositionForModelQuery(actualNode));
-					}
-				}
-				else {
-					if (documentPosition >= sdRegion.getStartOffset(completionRegion) + completionRegion.getLength()) {
-						// insert name
-						contentAssistRequest = newContentAssistRequest(actualNode, actualNode.getParentNode(), sdRegion, completionRegion, documentPosition, 0, matchString);
-					}
-					else {
-						// replace name
-						contentAssistRequest = newContentAssistRequest(actualNode, actualNode.getParentNode(), sdRegion, completionRegion, sdRegion.getStartOffset(completionRegion), completionRegion.getTextLength(), matchString);
-					}
-					addEndTagNameProposals(contentAssistRequest);
-				}
-			}
-		}
-		else {
-			if (documentPosition > sdRegion.getStartOffset(completionRegion) + completionRegion.getTextLength()) {
-				// unclosed tag with only a name; should prompt for attributes
-				// and a close instead
-				contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, sdRegion, completionRegion, documentPosition - matchString.length(), matchString.length(), matchString);
-				addAttributeNameProposals(contentAssistRequest);
-				addTagCloseProposals(contentAssistRequest);
-			}
-			else {
-				if (sdRegion.getRegions().get(0).getType() != DOMRegionContext.XML_END_TAG_OPEN) {
-					int replaceLength = documentPosition - sdRegion.getStartOffset(completionRegion);
-					contentAssistRequest = newContentAssistRequest(node, node.getParentNode(), sdRegion, completionRegion, sdRegion.getStartOffset(completionRegion), replaceLength, matchString);
-					addTagNameProposals(contentAssistRequest, getElementPositionForModelQuery(nodeAtOffset));
-				}
-				else {
-					IDOMNode actualNode = (IDOMNode) node.getModel().getIndexedRegion(documentPosition);
-					if (actualNode != null) {
-						if (documentPosition >= sdRegion.getStartOffset(completionRegion) + completionRegion.getTextLength()) {
-							contentAssistRequest = newContentAssistRequest(actualNode, actualNode.getParentNode(), sdRegion, completionRegion, documentPosition, 0, matchString);
-						}
-						else {
-							contentAssistRequest = newContentAssistRequest(actualNode, actualNode.getParentNode(), sdRegion, completionRegion, sdRegion.getStartOffset(completionRegion), completionRegion.getTextLength(), matchString);
-						}
-						addEndTagNameProposals(contentAssistRequest);
-					}
-				}
-			}
-		}
-		return contentAssistRequest;
-	}
-
-	protected ContentAssistRequest computeTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
-		ContentAssistRequest contentAssistRequest = null;
-		IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
-		if (sdRegion != nodeAtOffset.getFirstStructuredDocumentRegion()) {
-			// completing the *first* XML_TAG_OPEN in "<<tagname"
-			IDOMNode actualNode = (IDOMNode) node.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
-			if (actualNode != null) {
-				contentAssistRequest = newContentAssistRequest(actualNode, actualNode.getParentNode(), sdRegion, completionRegion, documentPosition, 0, matchString);
-				addTagNameProposals(contentAssistRequest, getElementPositionForModelQuery(actualNode));
-				addEndTagProposals(contentAssistRequest); // (pa) 220850
-			}
-		}
-		else {
-			if (documentPosition == sdRegion.getStartOffset(completionRegion)) {
-				if (node.getNodeType() == Node.ELEMENT_NODE) {
-					// at the start of an existing tag, right before the '<'
-					contentAssistRequest = newContentAssistRequest(nodeAtOffset, node.getParentNode(), sdRegion, completionRegion, documentPosition, 0, matchString);
-					addTagInsertionProposals(contentAssistRequest, getElementPositionForModelQuery(nodeAtOffset));
-					addEndTagProposals(contentAssistRequest);
-				}
-				else if (node.getNodeType() == Node.DOCUMENT_NODE) {
-					// at the opening of the VERY first tag with a '<'
-					contentAssistRequest = newContentAssistRequest(nodeAtOffset, node.getParentNode(), sdRegion, completionRegion, sdRegion.getStartOffset(completionRegion), completionRegion.getTextLength(), matchString);
-					addStartDocumentProposals(contentAssistRequest);
-				}
-			}
-			else {
-				// within the white space
-				ITextRegion name = getNameRegion(node.getStartStructuredDocumentRegion());
-				// (pa) ITextRegion refactor
-				// if (name != null && name.containsOffset(documentPosition))
-				// {
-				if ((name != null) && ((sdRegion.getStartOffset(name) <= documentPosition) && (sdRegion.getEndOffset(name) >= documentPosition))) {
-					// replace the existing name
-					contentAssistRequest = newContentAssistRequest(node, node.getParentNode(), sdRegion, completionRegion, sdRegion.getStartOffset(name), name.getTextLength(), matchString);
-				}
-				else {
-					// insert a valid new name, or possibly an end tag
-					contentAssistRequest = newContentAssistRequest(nodeAtOffset, ((Node) nodeAtOffset).getParentNode(), sdRegion, completionRegion, documentPosition, 0, matchString);
-					addEndTagProposals(contentAssistRequest);
-					contentAssistRequest.setReplacementBeginPosition(documentPosition);
-					contentAssistRequest.setReplacementLength(0);
-				}
-				addTagNameProposals(contentAssistRequest, getElementPositionForModelQuery(nodeAtOffset));
-			}
-		}
-		return contentAssistRequest;
-	}
-
-	/**
-	 * Retreives cmnode's documentation to display in the completion
-	 * proposal's additional info. If no documentation exists for cmnode, try
-	 * displaying parentOrOwner's documentation
-	 * 
-	 * String any documentation information to display for cmnode.
-	 * <code>null</code> if there is nothing to display.
-	 */
-	protected String getAdditionalInfo(CMNode parentOrOwner, CMNode cmnode) {
-		String addlInfo = null;
-
-		if (cmnode == null) {
-			if (Debug.displayWarnings) {
-				new IllegalArgumentException("Null declaration!").printStackTrace(); //$NON-NLS-1$
-			}
-			return null;
-		}
-
-		addlInfo = getInfoProvider().getInfo(cmnode);
-		if ((addlInfo == null) && (parentOrOwner != null)) {
-			addlInfo = getInfoProvider().getInfo(parentOrOwner);
-		}
-		return addlInfo;
-	}
-
-	// returns a list of ModelQueryActions
-	protected List getAvailableChildrenAtIndex(Element parent, int index, int validityChecking) {
-		List list = new ArrayList();
-		CMElementDeclaration parentDecl = getCMElementDeclaration(parent);
-		if (parentDecl != null) {
-			ModelQuery modelQuery = ModelQueryUtil.getModelQuery(parent.getOwnerDocument());
-			// taken from ActionManagers
-			// int editMode = modelQuery.getEditMode();
-			int editMode = ModelQuery.EDIT_MODE_UNCONSTRAINED;
-			int ic = (editMode == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) ? ModelQuery.INCLUDE_CHILD_NODES | ModelQuery.INCLUDE_SEQUENCE_GROUPS : ModelQuery.INCLUDE_CHILD_NODES;
-			modelQuery.getInsertActions(parent, parentDecl, index, ic, validityChecking, list);
-		}
-		return list;
-	}
-
-	// returns a list of CMElementDeclarations
-	protected List getAvailableRootChildren(Document document, int childIndex) {
-		List list = null;
-
-		// extract the valid 'root' node name from the DocumentType Node
-		DocumentType docType = document.getDoctype();
-		String rootName = null;
-		if (docType != null) {
-			rootName = docType.getNodeName();
-		}
-		if (rootName == null) {
-			return new ArrayList(0);
-		}
-
-		for (Node child = document.getFirstChild(); child != null; child = child.getNextSibling()) {
-			// make sure the "root" Element isn't already present
-			// is it required to be an Element?
-			if ((child.getNodeType() == Node.ELEMENT_NODE) && stringsEqual(child.getNodeName(), rootName)) {
-				// if the node is missing either the start or end tag, don't
-				// count it as present
-				if ((child instanceof IDOMNode) && ((((IDOMNode) child).getStartStructuredDocumentRegion() == null) || (((IDOMNode) child).getEndStructuredDocumentRegion() == null))) {
-					continue;
-				}
-				if (Debug.displayInfo) {
-					System.out.println(rootName + " already present!"); //$NON-NLS-1$
-				}
-				setErrorMessage(NLS.bind(XMLUIMessages.The_document_element__, (new Object[]{rootName})));
-				return new ArrayList(0);
-			}
-		}
-
-		list = new ArrayList(1);
-		ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
-		if (modelQuery != null) {
-			CMDocument cmdoc = modelQuery.getCorrespondingCMDocument(document);
-			if (cmdoc != null) {
-				if (rootName != null) {
-					CMElementDeclaration rootDecl = (CMElementDeclaration) cmdoc.getElements().getNamedItem(rootName);
-					if (rootDecl != null) {
-						list.add(rootDecl);
-					}
-					else {
-						// supply the given document name anyway, even if it
-						// is an error
-						list.add(new SimpleCMElementDeclaration(rootName));
-						if (Debug.displayInfo || Debug.displayWarnings) {
-							System.out.println("No definition found for " + rootName + " in " + docType.getPublicId() + "/" + docType.getSystemId()); //$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-						}
-						String location = "" + (docType.getPublicId() != null ? docType.getPublicId() + "/" : "") + (docType.getSystemId() != null ? docType.getSystemId() : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-						//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-						//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-						if (location.length() > 0) {
-							setErrorMessage(NLS.bind(XMLUIMessages.No_definition_for_in, (new Object[]{rootName, location})));
-						}
-						else {
-							setErrorMessage(NLS.bind(XMLUIMessages.No_definition_for, (new Object[]{rootName})));
-						}
-					}
-				}
-			}
-			else {
-				if (Debug.displayInfo || Debug.displayWarnings) {
-					System.out.println("No content model found."); //$NON-NLS-1$
-				}
-				//$NON-NLS-1$
-				//$NON-NLS-1$
-				String location = "" + (docType.getPublicId() != null ? docType.getPublicId() + "/" : "") + (docType.getSystemId() != null ? docType.getSystemId() : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-				//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-				//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-				if (location.length() > 0) {
-					setErrorMessage(NLS.bind(XMLUIMessages.No_content_model_for, (new Object[]{location})));
-				}
-				else {
-					setErrorMessage(XMLUIMessages.No_content_model_found_UI_);
-				}
-			}
-		}
-
-		return list;
-	}
-
-	protected CMElementDeclaration getCMElementDeclaration(Node node) {
-		CMElementDeclaration result = null;
-		if (node.getNodeType() == Node.ELEMENT_NODE) {
-			ModelQuery modelQuery = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
-			if (modelQuery != null) {
-				result = modelQuery.getCMElementDeclaration((Element) node);
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * Returns the characters which when entered by the user should
-	 * automatically trigger the presentation of possible completions.
-	 * 
-	 * the auto activation characters for completion proposal or
-	 * <code>null</code> if no auto activation is desired
-	 */
-	public char[] getCompletionProposalAutoActivationCharacters() {
-		return completionProposalAutoActivationCharacters;
-	}
-
-	protected ITextRegion getCompletionRegion(int offset, IStructuredDocumentRegion sdRegion) {
-		ITextRegion region = sdRegion.getRegionAtCharacterOffset(offset);
-		if (region == null) {
-			return null;
-		}
-
-		if (sdRegion.getStartOffset(region) == offset) {
-			// The offset is at the beginning of the region
-			if ((sdRegion.getStartOffset(region) == sdRegion.getStartOffset()) && (sdRegion.getPrevious() != null) && (!sdRegion.getPrevious().isEnded())) {
-				// Is the region also the start of the node? If so, the
-				// previous IStructuredDocumentRegion is
-				// where to look for a useful region.
-				region = sdRegion.getPrevious().getRegionAtCharacterOffset(offset - 1);
-			}
-			else {
-				// Is there no separating whitespace from the previous region?
-				// If not,
-				// then that region is the important one
-				ITextRegion previousRegion = sdRegion.getRegionAtCharacterOffset(offset - 1);
-				if ((previousRegion != null) && (previousRegion != region) && (previousRegion.getTextLength() == previousRegion.getLength())) {
-					region = previousRegion;
-				}
-			}
-		}
-		else {
-			// The offset is NOT at the beginning of the region
-			if (offset > sdRegion.getStartOffset(region) + region.getTextLength()) {
-				// Is the offset within the whitespace after the text in this
-				// region?
-				// If so, use the next region
-				ITextRegion nextRegion = sdRegion.getRegionAtCharacterOffset(sdRegion.getStartOffset(region) + region.getLength());
-				if (nextRegion != null) {
-					region = nextRegion;
-				}
-			}
-			else {
-				// Is the offset within the important text for this region?
-				// If so, then we've already got the right one.
-			}
-		}
-
-		// valid WHITE_SPACE region handler (#179924)
-		if ((region != null) && (region.getType() == DOMRegionContext.WHITE_SPACE)) {
-			ITextRegion previousRegion = sdRegion.getRegionAtCharacterOffset(sdRegion.getStartOffset(region) - 1);
-			if (previousRegion != null) {
-				region = previousRegion;
-			}
-		}
-
-		return region;
-	}
-
-	/**
-	 * Return the region whose content's require completion. This is something
-	 * of a misnomer as sometimes the user wants to be prompted for contents
-	 * of a non-existant ITextRegion, such as for enumerated attribute values
-	 * following an '=' sign.
-	 */
-	protected ITextRegion getCompletionRegion(int documentPosition, Node domnode) {
-		if (domnode == null) {
-			return null;
-		}
-
-		ITextRegion region = null;
-		int offset = documentPosition;
-		IStructuredDocumentRegion flatNode = null;
-		IDOMNode node = (IDOMNode) domnode;
-
-		if (node.getNodeType() == Node.DOCUMENT_NODE) {
-			if (node.getStructuredDocument().getLength() == 0) {
-				return null;
-			}
-			ITextRegion result = node.getStructuredDocument().getRegionAtCharacterOffset(offset).getRegionAtCharacterOffset(offset);
-			while (result == null) {
-				offset--;
-				result = node.getStructuredDocument().getRegionAtCharacterOffset(offset).getRegionAtCharacterOffset(offset);
-			}
-			return result;
-		}
-
-		IStructuredDocumentRegion startTag = node.getStartStructuredDocumentRegion();
-		IStructuredDocumentRegion endTag = node.getEndStructuredDocumentRegion();
-
-		// Determine if the offset is within the start
-		// IStructuredDocumentRegion, end IStructuredDocumentRegion, or
-		// somewhere within the Node's XML content.
-		if ((startTag != null) && (startTag.getStartOffset() <= offset) && (offset < startTag.getStartOffset() + startTag.getLength())) {
-			flatNode = startTag;
-		}
-		else if ((endTag != null) && (endTag.getStartOffset() <= offset) && (offset < endTag.getStartOffset() + endTag.getLength())) {
-			flatNode = endTag;
-		}
-
-		if (flatNode != null) {
-			// the offset is definitely within the start or end tag, continue
-			// on and find the region
-			region = getCompletionRegion(offset, flatNode);
-		}
-		else {
-			// the docPosition is neither within the start nor the end, so it
-			// must be content
-			flatNode = node.getStructuredDocument().getRegionAtCharacterOffset(offset);
-			// (pa) ITextRegion refactor
-			// if (flatNode.contains(documentPosition)) {
-			if ((flatNode.getStartOffset() <= documentPosition) && (flatNode.getEndOffset() >= documentPosition)) {
-				// we're interesting in completing/extending the previous
-				// IStructuredDocumentRegion if the current
-				// IStructuredDocumentRegion isn't plain content or if it's
-				// preceded by an orphan '<'
-				if ((offset == flatNode.getStartOffset()) && (flatNode.getPrevious() != null) && (((flatNode.getRegionAtCharacterOffset(documentPosition) != null) && (flatNode.getRegionAtCharacterOffset(documentPosition).getType() != DOMRegionContext.XML_CONTENT)) || (flatNode.getPrevious().getLastRegion().getType() == DOMRegionContext.XML_TAG_OPEN) || (flatNode.getPrevious().getLastRegion().getType() == DOMRegionContext.XML_END_TAG_OPEN))) {
-					// Is the region also the start of the node? If so, the
-					// previous IStructuredDocumentRegion is
-					// where to look for a useful region.
-					region = flatNode.getPrevious().getLastRegion();
-				}
-				else if (flatNode.getEndOffset() == documentPosition) {
-					region = flatNode.getLastRegion();
-				}
-				else {
-					region = flatNode.getFirstRegion();
-				}
-			}
-			else {
-				// catch end of document positions where the docPosition isn't
-				// in a IStructuredDocumentRegion
-				region = flatNode.getLastRegion();
-			}
-		}
-
-		return region;
-	}
-
-	/**
-	 * Provided by default. Subclasses may override with their own
-	 * implementations.
-	 * 
-	 * @see AbstractContentAssistProcessor#getContentGenerator()
-	 */
-	public XMLContentModelGenerator getContentGenerator() {
-		if (fGenerator == null) {
-			fGenerator = new XMLContentModelGenerator();
-		}
-		return fGenerator;
-	}
-
-	/**
-	 * Returns the characters which when entered by the user should
-	 * automatically trigger the presentation of context information.
-	 * 
-	 * the auto activation characters for presenting context information or
-	 * <code>null</code> if no auto activation is desired
-	 */
-	public char[] getContextInformationAutoActivationCharacters() {
-		return contextInformationAutoActivationCharacters;
-	}
-
-	/**
-	 * Returns a validator used to determine when displayed context
-	 * information should be dismissed. May only return <code>null</code> if
-	 * the processor is incapable of computing context information.
-	 * 
-	 * a context information validator, or <code>null</code> if the
-	 * processor is incapable of computing context information
-	 */
-	public IContextInformationValidator getContextInformationValidator() {
-		if (fContextInformationPresenter == null) {
-			fContextInformationPresenter = new AttributeContextInformationPresenter();
-		}
-		return fContextInformationPresenter;
-	}
-
-	protected int getElementPosition(Node child) {
-		Node parent = child.getParentNode();
-		if (parent == null) {
-			return 0;
-		}
-
-		NodeList children = parent.getChildNodes();
-		if (children == null) {
-			return 0;
-		}
-		int count = 0;
-
-		for (int i = 0; i < children.getLength(); i++) {
-			if (children.item(i) == child) {
-				return count;
-			}
-			else {
-				// if (children.item(i).getNodeType() == Node.ELEMENT_NODE)
-				count++;
-			}
-		}
-		return 0;
-	}
-
-	private int getElementPositionForModelQuery(Node child) {
-		return getElementPosition(child);
-		// return -1;
-	}
-
-	/**
-	 * Return the reason why computeProposals was not able to find any
-	 * completions.
-	 * 
-	 * an error message or null if no error occurred
-	 */
-	public String getErrorMessage() {
-		return fErrorMessage;
-	}
-
-	/**
-	 * @param iResource
-	 */
-	// public void initialize(IResource iResource) {
-	// this.resource = iResource;
-	// }
-	/**
-	 * Gets the infoProvider.
-	 * 
-	 * fInfoProvider and if fInfoProvider was <code>null</code> create a new
-	 * instance
-	 */
-	public MarkupTagInfoProvider getInfoProvider() {
-		if (fInfoProvider == null) {
-			fInfoProvider = new MarkupTagInfoProvider();
-		}
-		return fInfoProvider;
-	}
-
-	protected String getMatchString(IStructuredDocumentRegion parent, ITextRegion aRegion, int offset) {
-		if ((aRegion == null) || isCloseRegion(aRegion)) {
-			return ""; //$NON-NLS-1$
-		}
-		String matchString = null;
-		String regionType = aRegion.getType();
-		if ((regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) || (regionType == DOMRegionContext.XML_TAG_OPEN) || (offset > parent.getStartOffset(aRegion) + aRegion.getTextLength())) {
-			matchString = ""; //$NON-NLS-1$
-		}
-		else if (regionType == DOMRegionContext.XML_CONTENT) {
-			matchString = ""; //$NON-NLS-1$
-		}
-		else {
-			if ((parent.getText(aRegion).length() > 0) && (parent.getStartOffset(aRegion) < offset)) {
-				matchString = parent.getText(aRegion).substring(0, offset - parent.getStartOffset(aRegion));
-			}
-			else {
-				matchString = ""; //$NON-NLS-1$
-			}
-		}
-		return matchString;
-	}
-
-	protected ITextRegion getNameRegion(IStructuredDocumentRegion flatNode) {
-		if (flatNode == null) {
-			return null;
-		}
-		Iterator regionList = flatNode.getRegions().iterator();
-		while (regionList.hasNext()) {
-			ITextRegion region = (ITextRegion) regionList.next();
-			if (isNameRegion(region)) {
-				return region;
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * Retrieves all of the possible valid values for this attribute
-	 * declaration
-	 */
-	protected List getPossibleDataTypeValues(Node node, CMAttributeDeclaration ad) {
-		List list = null;
-		if (node.getNodeType() == Node.ELEMENT_NODE) {
-			Element element = (Element) node;
-			String[] dataTypeValues = null;
-			// The ModelQuery may not be available if the corresponding
-			// adapter
-			// is absent
-			ModelQuery modelQuery = ModelQueryUtil.getModelQuery(element.getOwnerDocument());
-			if (modelQuery != null) {
-				dataTypeValues = modelQuery.getPossibleDataTypeValues(element, ad);
-			}
-			else {
-				if (ad.getAttrType() != null) {
-					dataTypeValues = ad.getAttrType().getEnumeratedValues();
-				}
-			}
-			if (dataTypeValues != null) {
-				list = new ArrayList(dataTypeValues.length);
-				for (int i = 0; i < dataTypeValues.length; i++) {
-					list.add(dataTypeValues[i]);
-				}
-			}
-		}
-		if (list == null) {
-			list = new ArrayList(0);
-		}
-		return list;
-	}
-
-	protected String getRequiredName(Node parentOrOwner, CMNode cmnode) {
-		if ((cmnode == null) || (parentOrOwner == null)) {
-			if (Debug.displayWarnings) {
-				new IllegalArgumentException("Null declaration!").printStackTrace(); //$NON-NLS-1$
-			}
-			return ""; //$NON-NLS-1$
-		}
-		return getContentGenerator().getRequiredName(parentOrOwner, cmnode);
-	}
-
-	protected String getRequiredText(Node parentOrOwner, CMAttributeDeclaration attrDecl) {
-		if (attrDecl == null) {
-			if (Debug.displayWarnings) {
-				new IllegalArgumentException("Null attribute declaration!").printStackTrace(); //$NON-NLS-1$
-			}
-			return ""; //$NON-NLS-1$
-		}
-		StringBuffer buff = new StringBuffer();
-		getContentGenerator().generateRequiredAttribute(parentOrOwner, attrDecl, buff);
-		return buff.toString();
-	}
-
-	protected String getRequiredText(Node parentOrOwner, CMElementDeclaration elementDecl) {
-		if (elementDecl == null) {
-			if (Debug.displayWarnings) {
-				new IllegalArgumentException("Null attribute declaration!").printStackTrace(); //$NON-NLS-1$
-			}
-			return ""; //$NON-NLS-1$
-		}
-		StringBuffer buff = new StringBuffer();
-		getContentGenerator().generateTag(parentOrOwner, elementDecl, buff);
-		return buff.toString();
-	}
-
-	/**
-	 * StructuredTextViewer must be set before using this.
-	 */
-	public IStructuredDocumentRegion getStructuredDocumentRegion(int pos) {
-		// (pa) ITextRegion refactor defect 245190
-		// return
-		// (IStructuredDocumentRegion)ContentAssistUtils.getNodeAt((StructuredTextViewer)fTextViewer,
-		// pos);
-		return ContentAssistUtils.getStructuredDocumentRegion(fTextViewer, pos);
-	}
-
-	private String getTagName(IStructuredDocumentRegion sdRegion) {
-		ITextRegionList regions = sdRegion.getRegions();
-		ITextRegion region = null;
-		String name = ""; //$NON-NLS-1$
-		for (int i = 0; i < regions.size(); i++) {
-			region = regions.get(i);
-			if (region.getType() == DOMRegionContext.XML_TAG_NAME) {
-				name = sdRegion.getText(region);
-				break;
-			}
-		}
-		return name;
-	}
-
-	// returns a list of CMNodes that are available within this parent context
-	// Given the grammar shown below and a snippet of XML code (where the '|'
-	// indicated the cursor position)
-	// the list would return all of the element declarations that are
-	// potential child elements of Foo.
-	//
-	// grammar : Foo -> (A, B, C)
-	// snippet : <Foo><A>|
-	// result : {A, B, C}
-	// 
-	// TODO cs... do we need to pass in the 'kindOfAction'? Seems to me we
-	// could assume it's always an insert.
-	protected List getAvailableChildElementDeclarations(Element parent, int childPosition, int kindOfAction) {
-		List modelQueryActions = getAvailableChildrenAtIndex(parent, childPosition, ModelQuery.VALIDITY_NONE);
-		Iterator iterator = modelQueryActions.iterator();
-		List cmnodes = new Vector();
-		while (iterator.hasNext()) {
-			ModelQueryAction action = (ModelQueryAction) iterator.next();
-			if ((childPosition < 0) || (((action.getStartIndex() <= childPosition) && (childPosition <= action.getEndIndex())) && (action.getKind() == kindOfAction))) {
-				CMNode actionCMNode = action.getCMNode();
-				if ((actionCMNode != null) && !cmnodes.contains(actionCMNode)) {
-					cmnodes.add(actionCMNode);
-				}
-			}
-		}
-		return cmnodes;
-	}
-
-	// returns a list of CMNodes that can be validly inserted at this
-	// childPosition
-	// Given the grammar shown below and a snippet of XML code (where the '|'
-	// indicated the cursor position)
-	// the list would return only the element declarations can be inserted
-	// while maintaing validity of the content.
-	//
-	// grammar : Foo -> (A, B, C)
-	// snippet : <Foo><A>|
-	// result : {B}
-	//    
-	protected List getValidChildElementDeclarations(Element parent, int childPosition, int kindOfAction) {
-		List modelQueryActions = getAvailableChildrenAtIndex(parent, childPosition, ModelQuery.VALIDITY_STRICT);
-		Iterator iterator = modelQueryActions.iterator();
-		List cmnodes = new Vector();
-		while (iterator.hasNext()) {
-			ModelQueryAction action = (ModelQueryAction) iterator.next();
-			if ((childPosition < 0) || (((action.getStartIndex() <= childPosition) && (childPosition <= action.getEndIndex())) && (action.getKind() == kindOfAction))) {
-				CMNode actionCMNode = action.getCMNode();
-				if ((actionCMNode != null) && !cmnodes.contains(actionCMNode)) {
-					cmnodes.add(actionCMNode);
-				}
-			}
-		}
-		return cmnodes;
-	}
-
-	/**
-	 * Similar to the call in HTMLContentAssistProcessor. Pass in a node, it
-	 * tells you if the document is XML type.
-	 * 
-	 * @param node
-	 * 
-	 */
-	protected boolean getXML(Node node) {
-		if (node == null) {
-			return false;
-		}
-
-		Document doc = null;
-		doc = (node.getNodeType() != Node.DOCUMENT_NODE) ? node.getOwnerDocument() : ((Document) node);
-
-		return (doc instanceof IDOMDocument) && ((IDOMDocument) doc).isXMLType();
-	}
-
-	// Initialize local settings
-	protected void init() {
-		// implement in subclasses
-	}
-
-	protected boolean isCloseRegion(ITextRegion region) {
-		String type = region.getType();
-		return ((type == DOMRegionContext.XML_PI_CLOSE) || (type == DOMRegionContext.XML_TAG_CLOSE) || (type == DOMRegionContext.XML_EMPTY_TAG_CLOSE) || (type == DOMRegionContext.XML_CDATA_CLOSE) || (type == DOMRegionContext.XML_COMMENT_CLOSE) || (type == DOMRegionContext.XML_ATTLIST_DECL_CLOSE) || (type == DOMRegionContext.XML_ELEMENT_DECL_CLOSE) || (type == DOMRegionContext.XML_DOCTYPE_DECLARATION_CLOSE) || (type == DOMJSPRegionContextsPrivateCopy.JSP_CLOSE) || (type == DOMJSPRegionContextsPrivateCopy.JSP_COMMENT_CLOSE) || (type.equals(DOMJSPRegionContextsPrivateCopy.JSP_DIRECTIVE_CLOSE)) || (type == DOMRegionContext.XML_DECLARATION_CLOSE));
-	}
-
-	/*
-	 * This is to determine if a tag is a special meta-info comment tag that
-	 * shows up as an ELEMENT
-	 */
-	private boolean isCommentNode(IDOMNode node) {
-		return ((node != null) && (node instanceof IDOMElement) && ((IDOMElement) node).isCommentTag());
-	}
-
-	/**
-	 * Checks if cursor position is after doctype tag...
-	 * 
-	 * @param car
-	 * 
-	 */
-	protected boolean isCursorAfterDoctype(ContentAssistRequest car) {
-		Node aNode = car.getNode();
-		Document parent = aNode.getOwnerDocument();
-		int xmldoctypeNodePosition = -1;
-		boolean isAfterDoctype = true;
-
-		if (parent == null) {
-			return true; // blank document case
-		}
-
-		for (Node child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
-			if (child instanceof IDOMNode) {
-				if (child.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
-					xmldoctypeNodePosition = ((IDOMNode) child).getEndOffset();
-					isAfterDoctype = (car.getReplacementBeginPosition() >= xmldoctypeNodePosition);
-					break;
-				}
-			}
-		}
-		return isAfterDoctype;
-	}
-
-	/**
-	 * This method can check if the cursor is after the XMLPI
-	 * 
-	 * @param car
-	 * 
-	 */
-	protected boolean isCursorAfterXMLPI(ContentAssistRequest car) {
-		Node aNode = car.getNode();
-		boolean xmlpiFound = false;
-		Document parent = aNode.getOwnerDocument();
-		int xmlpiNodePosition = -1;
-		boolean isAfterXMLPI = false;
-
-		if (parent == null) {
-			return true; // blank document case
-		}
-
-		for (Node child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
-			boolean xmlpi = ((child.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) && child.getNodeName().equals("xml")); //$NON-NLS-1$
-			xmlpiFound = xmlpiFound || xmlpi;
-			if (xmlpiFound) {
-				if (child instanceof IDOMNode) {
-					xmlpiNodePosition = ((IDOMNode) child).getEndOffset();
-					isAfterXMLPI = (car.getReplacementBeginPosition() >= xmlpiNodePosition);
-				}
-				break;
-			}
-		}
-		return isAfterXMLPI;
-	}
-
-	protected boolean isNameRegion(ITextRegion region) {
-		String type = region.getType();
-		return ((type == DOMRegionContext.XML_TAG_NAME) || (type == DOMJSPRegionContextsPrivateCopy.JSP_DIRECTIVE_NAME) || (type == DOMRegionContext.XML_ELEMENT_DECL_NAME) || (type == DOMRegionContext.XML_DOCTYPE_NAME) || (type == DOMRegionContext.XML_ATTLIST_DECL_NAME) || (type == DOMJSPRegionContextsPrivateCopy.JSP_ROOT_TAG_NAME) || type.equals(DOMJSPRegionContextsPrivateCopy.JSP_DIRECTIVE_NAME));
-	}
-
-	protected boolean isQuote(String string) {
-		String trimmed = string.trim();
-		if (trimmed.length() > 0) {
-			return (trimmed.charAt(0) == '\'') || (trimmed.charAt(0) == '"');
-		}
-		return false;
-	}
-
-	private boolean isSelfClosed(IStructuredDocumentRegion startTag) {
-		ITextRegionList regions = startTag.getRegions();
-		return regions.get(regions.size() - 1).getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE;
-	}
-
-	private boolean isStartTag(IStructuredDocumentRegion sdRegion) {
-		boolean result = false;
-		if (sdRegion.getRegions().size() > 0) {
-			ITextRegion r = sdRegion.getRegions().get(0);
-			result = (r.getType() == DOMRegionContext.XML_TAG_OPEN) && sdRegion.isEnded();
-		}
-		return result;
-	}
-
-	protected Properties mapToProperties(CMNamedNodeMap map) {
-		Properties p = new Properties();
-		for (int i = 0; i < map.getLength(); i++) {
-			CMEntityDeclaration decl = (CMEntityDeclaration) map.item(i);
-			p.put(decl.getName(), decl.getValue());
-		}
-		return p;
-	}
-
-	/**
-	 * Gets the corresponding XMLNode, and checks if it's closed.
-	 * 
-	 * @param startTag
-	 * 
-	 */
-	private boolean needsEndTag(IStructuredDocumentRegion startTag) {
-		boolean result = false;
-		IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fTextViewer.getDocument());
-		try {
-			if (sModel != null) {
-				IDOMNode xmlNode = (IDOMNode) sModel.getIndexedRegion(startTag.getStart());
-				if (!isStartTag(startTag)) {
-					result = false;
-				}
-				else if (isSelfClosed(startTag)) {
-					result = false;
-				}
-				else if (!xmlNode.isContainer()) {
-					result = false;
-				}
-				else {
-					result = xmlNode.getEndStructuredDocumentRegion() == null;
-				}
-			}
-		}
-		finally {
-			if (sModel != null) {
-				sModel.releaseFromRead();
-			}
-		}
-		return result;
-	}
-
-	protected ContentAssistRequest newContentAssistRequest(Node node, Node possibleParent, IStructuredDocumentRegion documentRegion, ITextRegion completionRegion, int begin, int length, String filter) {
-		return new ContentAssistRequest(node, possibleParent, documentRegion, completionRegion, begin, length, filter);
-	}
-
-	public void release() {
-		fGenerator = null;
-	}
-
-	/**
-	 * Set the reason why computeProposals was not able to find any
-	 * completions.
-	 */
-	public void setErrorMessage(String errorMessage) {
-		fErrorMessage = errorMessage;
-	}
-
-	/**
-	 * Set the reason why computeProposals was not able to find any
-	 * completions.
-	 */
-	protected void setErrorMessage(String errorMessage, String append) {
-		setErrorMessage(errorMessage + append);
-	}
-
-	/**
-	 * Set the reason why computeProposals was not able to find any
-	 * completions.
-	 */
-	protected void setErrorMessage(String errorMessage, String prepend, String append) {
-		setErrorMessage(prepend + errorMessage + append);
-	}
-
-	protected boolean stringsEqual(String a, String b) {
-		// (pa) 221190 matching independent of case to be consistant with Java
-		// editor CA
-		return a.equalsIgnoreCase(b);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentModelGenerator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentModelGenerator.java
deleted file mode 100644
index 7884482..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentModelGenerator.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceHelper;
-import org.w3c.dom.Node;
-
-
-public abstract class AbstractContentModelGenerator {
-
-	public static boolean generateChildren = false;
-
-	public AbstractContentModelGenerator() {
-		super();
-	}
-
-	public abstract void generateAttribute(CMAttributeDeclaration attrDecl, StringBuffer buffer);
-
-	protected void generateAttributes(CMElementDeclaration elementDecl, StringBuffer buffer) {
-		CMNamedNodeMap attributes = elementDecl.getAttributes();
-		if (attributes == null) {
-			return;
-		}
-		for (int i = 0; i < attributes.getLength(); i++) {
-			generateAttribute((CMAttributeDeclaration) attributes.item(i), buffer);
-		}
-		return;
-	}
-
-	protected abstract void generateEndTag(String tagName, Node parentNode, CMElementDeclaration elementDecl, StringBuffer buffer);
-
-	public void generateRequiredChildren(Node parentNode, CMElementDeclaration elementDecl, StringBuffer buffer) {
-		if (generateChildren) {
-		}
-		return;
-	}
-
-	protected abstract void generateStartTag(String tagName, Node parentNode, CMElementDeclaration elementDecl, StringBuffer buffer);
-
-	public void generateTag(Node parent, CMElementDeclaration elementDecl, StringBuffer buffer) {
-		if ((elementDecl == null) || (buffer == null)) {
-			return;
-		}
-
-		String tagName = getRequiredName(parent, elementDecl);
-
-		generateStartTag(tagName, parent, elementDecl, buffer);
-		generateRequiredChildren(parent, elementDecl, buffer);
-		generateEndTag(tagName, parent, elementDecl, buffer);
-		return;
-	}
-
-	public abstract int getMinimalStartTagLength(Node node, CMElementDeclaration elementDecl);
-
-	public String getRequiredName(Node ownerNode, CMNode cmnode) {
-		if (ownerNode != null) {
-			return DOMNamespaceHelper.computeName(cmnode, ownerNode, null);
-		}
-		return cmnode.getNodeName();
-	}
-
-	public abstract String getStartTagClose(Node parentNode, CMElementDeclaration elementDecl);
-
-	protected boolean requiresAttributes(CMElementDeclaration ed) {
-		CMNamedNodeMap attributes = ed.getAttributes();
-		if (attributes == null) {
-			return false;
-		}
-		for (int i = 0; i < attributes.getLength(); i++) {
-			if (((CMAttributeDeclaration) attributes.item(i)).getUsage() == CMAttributeDeclaration.REQUIRED) {
-				return true;
-			}
-		}
-		return false;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformation.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformation.java
deleted file mode 100644
index 66e514a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformation.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import java.util.HashMap;
-
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationExtension;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.ui.internal.util.Assert;
-
-
-/**
- * Implementation of IContextInformation. Adds knowledge about the information
- * display string such as required attributes for this context.
- * 
- * @author pavery
- */
-public class AttributeContextInformation implements IContextInformation, IContextInformationExtension {
-	private HashMap fAttr2RangeMap;
-	/** The name of the context */
-	private String fContextDisplayString;
-	/** The image to be displayed */
-	private Image fImage;
-	/** The information to be displayed */
-	private String fInformationDisplayString;
-	private int fPosition = -1;
-
-	/**
-	 * Creates a new context information with an image.
-	 * 
-	 * @param image
-	 *            the image to display when presenting the context information
-	 * @param contextDisplayString
-	 *            the string to be used when presenting the context
-	 * @param informationDisplayString
-	 *            the string to be displayed when presenting the context
-	 *            information, may not be <code>null</code>
-	 */
-	public AttributeContextInformation(Image image, String contextDisplayString, String informationDisplayString, HashMap attr2RangeMap) {
-		Assert.isNotNull(informationDisplayString, "illegal argument: informationDisplayString can not be null"); //$NON-NLS-1$
-
-		fImage = image;
-		fContextDisplayString = contextDisplayString;
-		fInformationDisplayString = informationDisplayString;
-		fAttr2RangeMap = attr2RangeMap;
-	}
-
-	/**
-	 * Creates a new context information without an image.
-	 * 
-	 * @param contextDisplayString
-	 *            the string to be used when presenting the context
-	 * @param informationDisplayString
-	 *            the string to be displayed when presenting the context
-	 *            information
-	 */
-	public AttributeContextInformation(String contextDisplayString, String informationDisplayString, HashMap attr2RangeMap) {
-		this(null, contextDisplayString, informationDisplayString, attr2RangeMap);
-	}
-
-	/**
-	 * Maps (String -> Position). The attribute name to the Text position.
-	 * 
-	 * 
-	 */
-	public HashMap getAttr2RangeMap() {
-		return fAttr2RangeMap;
-	}
-
-	/**
-	 * @see org.eclipse.jface.text.contentassist.IContextInformation#getContextDisplayString()
-	 */
-	public String getContextDisplayString() {
-		if (fContextDisplayString != null) {
-			return fContextDisplayString;
-		}
-		return fInformationDisplayString;
-	}
-
-	/**
-	 * @see org.eclipse.jface.text.contentassist.IContextInformationExtension#getContextInformationPosition()
-	 */
-	public int getContextInformationPosition() {
-		return fPosition;
-	}
-
-	/**
-	 * @see org.eclipse.jface.text.contentassist.IContextInformation#getImage()
-	 */
-	public Image getImage() {
-		return fImage;
-	}
-
-	/**
-	 * @see org.eclipse.jface.text.contentassist.IContextInformation#getInformationDisplayString()
-	 */
-	public String getInformationDisplayString() {
-		return fInformationDisplayString;
-	}
-
-	public void setContextInformationPosition(int position) {
-		fPosition = position;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformationPresenter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformationPresenter.java
deleted file mode 100644
index acd660b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformationPresenter.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import java.util.HashMap;
-
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.TextPresentation;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationPresenter;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-
-/**
- * Responsible for the presentation of the context info popup. This includes
- * text style, and when the window should close.
- * 
- * @author pavery
- */
-public class AttributeContextInformationPresenter implements IContextInformationPresenter, IContextInformationValidator {
-	private int fDocumentPosition = -1;
-
-	private IContextInformation fInfo = null;
-	private ContextInfoModelUtil fModelUtil = null;
-	private ITextViewer fViewer = null;
-
-	public AttributeContextInformationPresenter() {
-		super();
-	}
-
-	/**
-	 * @see org.eclipse.jface.text.contentassist.IContextInformationValidator#install(org.eclipse.jface.text.contentassist.IContextInformation,
-	 *      org.eclipse.jface.text.ITextViewer, int)
-	 */
-	public void install(IContextInformation info, ITextViewer viewer, int documentPosition) {
-		fInfo = info;
-		fViewer = viewer;
-		fDocumentPosition = documentPosition;
-		fModelUtil = new ContextInfoModelUtil((IStructuredDocument) fViewer.getDocument());
-	}
-
-	/**
-	 * @see org.eclipse.jface.text.contentassist.IContextInformationValidator#isContextInformationValid(int)
-	 */
-	public boolean isContextInformationValid(int documentPosition) {
-		// determine whether or not this context info should still be
-		// showing...
-		// if cursor still within the element it's valid...
-		boolean result = false;
-		if (fModelUtil != null) {
-			IStructuredDocumentRegion startRegion = fModelUtil.getXMLNode(fDocumentPosition).getStartStructuredDocumentRegion();
-			int start = startRegion.getStartOffset();
-			int end = startRegion.getEndOffset();
-			result = (documentPosition < end) && (documentPosition > start + 1);
-		}
-		return result;
-	}
-
-	/**
-	 * @see org.eclipse.jface.text.contentassist.IContextInformationPresenter#updatePresentation(int,
-	 *      org.eclipse.jface.text.TextPresentation)
-	 */
-	public boolean updatePresentation(int documentPosition, TextPresentation presentation) {
-		presentation.clear();
-
-		if (!(fInfo instanceof AttributeContextInformation)) {
-			return false;
-		}
-
-		// iterate existing attributes from current node
-		IDOMNode xmlNode = fModelUtil.getXMLNode(documentPosition);
-		IStructuredDocumentRegion sdRegion = xmlNode.getFirstStructuredDocumentRegion();
-		ITextRegionList regions = sdRegion.getRegions();
-		ITextRegion r = null;
-		String attrName = ""; //$NON-NLS-1$
-		Object temp = null;
-		Position p = null;
-		HashMap map = ((AttributeContextInformation) fInfo).getAttr2RangeMap();
-
-		// so we can add ranges in order
-		StyleRange[] sorted = new StyleRange[fInfo.getInformationDisplayString().length()];
-		for (int i = 0; i < regions.size(); i++) {
-			r = regions.get(i);
-			if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-				attrName = sdRegion.getText(r);
-				temp = map.get(attrName);
-				if (temp != null) {
-					p = (Position) temp;
-					sorted[p.offset] = new StyleRange(p.offset, p.length, null, null, SWT.BOLD);
-				}
-			}
-		}
-		// style ranges need to be added in order
-		StyleRange sr = null;
-		for (int i = 0; i < sorted.length; i++) {
-			sr = sorted[i];
-			if (sr != null) {
-				presentation.addStyleRange(sr);
-			}
-		}
-		return true;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformationProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformationProvider.java
deleted file mode 100644
index f0e9052..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformationProvider.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.contentassist.ContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- * Calculates attribute context information based on a StructuedDocument and
- * document position.
- * 
- * @author pavery
- */
-class AttributeContextInformationProvider {
-	private final IContextInformation[] EMPTY_CONTEXT_INFO = new IContextInformation[0];
-	private Comparator fComparator;
-
-	private IStructuredDocument fDocument = null;
-	private ContextInfoModelUtil fModelUtil = null;
-
-	public AttributeContextInformationProvider(IStructuredDocument doc, AttributeContextInformationPresenter presenter) {
-		fDocument = doc;
-		fModelUtil = new ContextInfoModelUtil(fDocument);
-	}
-
-	/**
-	 * @param sdRegion
-	 * 
-	 */
-	private boolean canProposeInfo(IStructuredDocumentRegion sdRegion) {
-		if ((sdRegion != null) && isEndTag(sdRegion)) {
-			return false;
-		}
-		else {
-			return true;
-		}
-	}
-
-	public IContextInformation[] getAttributeInformation(int offset) {
-		/*
-		 * need to take care of special cases w/ ambiguous regions <tag>|
-		 * </tag> also end tags..
-		 */
-		IContextInformation[] results = EMPTY_CONTEXT_INFO;
-
-		IStructuredDocumentRegion sdRegion = fModelUtil.getDocument().getRegionAtCharacterOffset(offset);
-		if (!canProposeInfo(sdRegion)) {
-			return EMPTY_CONTEXT_INFO;
-		}
-
-		IDOMNode node = fModelUtil.getXMLNode(offset);
-		if (node != null) {
-			switch (node.getNodeType()) {
-				case Node.ELEMENT_NODE :
-					results = getInfoForElement(node);
-					break;
-				// future...
-				// case Node.TEXT_NODE :
-				// results = getInfoForText(node);
-				// break;
-			}
-		}
-		return results;
-	}
-
-	/**
-	 * Returns a comparator that compares CMAttributeDeclaration names.
-	 * 
-	 * the comparator
-	 */
-	private Comparator getCMAttributeComparator() {
-		if (fComparator == null) {
-			fComparator = new Comparator() {
-				public int compare(Object o1, Object o2) {
-					return ((CMAttributeDeclaration) o1).getAttrName().compareTo(((CMAttributeDeclaration) o2).getAttrName());
-				}
-			};
-		}
-		return fComparator;
-	}
-
-	/**
-	 * @param node
-	 * 
-	 */
-	private IContextInformation[] getInfoForElement(IDOMNode node) {
-		IContextInformation[] results = EMPTY_CONTEXT_INFO;
-		CMElementDeclaration decl = fModelUtil.getModelQuery().getCMElementDeclaration((Element) node);
-		if (decl != null) {
-			CMNamedNodeMap attributes = decl.getAttributes();
-
-			CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attributes);
-			List nodes = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent((Element) node, decl, ModelQuery.INCLUDE_ATTRIBUTES);
-			for (int k = 0; k < nodes.size(); k++) {
-				CMNode cmnode = (CMNode) nodes.get(k);
-				if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-					allAttributes.put(cmnode);
-				}
-			}
-			attributes = allAttributes;
-			
-			String attrContextString = node.getNodeName();
-			StringBuffer attrInfo = new StringBuffer(" "); //$NON-NLS-1$
-			String name = ""; //$NON-NLS-1$
-			HashMap attrPosMap = new HashMap();
-			int pos = 0;
-			int length = 0;
-			int numPerLine = 8;
-
-			CMAttributeDeclaration[] sortedAttrs = getSortedAttributes(attributes);
-
-			for (int i = 0; i < sortedAttrs.length; i++) {
-				name = sortedAttrs[i].getAttrName();
-				length = name.length();
-				pos = attrInfo.length();
-
-				attrInfo.append(name);
-
-				if (sortedAttrs[i].getUsage() == CMAttributeDeclaration.REQUIRED) {
-					attrInfo.append("*"); //$NON-NLS-1$
-					length++;
-				}
-				if (i < attributes.getLength() - 1) {
-					attrInfo.append(" "); //$NON-NLS-1$
-					if ((i != 0) && (i % numPerLine == 0)) {
-						attrInfo.append("\n "); //$NON-NLS-1$
-					}
-				}
-				attrPosMap.put(name, new Position(pos, length));
-			}
-			if (!attrInfo.toString().trim().equals("")) {
-				return new IContextInformation[]{new AttributeContextInformation(attrContextString, attrInfo.toString(), attrPosMap)};
-			}
-		}
-		return results;
-	}
-
-	/**
-	 * @param node
-	 * 
-	 */
-	IContextInformation[] getInfoForText(IDOMNode node) {
-		Node parent = node.getParentNode();
-		String contextString = node.getNodeName();
-		StringBuffer info = new StringBuffer(" "); //$NON-NLS-1$
-		if ((parent != null) && (parent.getNodeType() == Node.ELEMENT_NODE)) {
-			CMElementDeclaration decl = fModelUtil.getModelQuery().getCMElementDeclaration((Element) parent);
-			CMContent content = decl.getContent();
-			if (content instanceof CMGroup) {
-				CMGroup cmGroup = (CMGroup) content;
-				CMNodeList children = cmGroup.getChildNodes();
-				CMNode cmNode = null;
-				for (int i = 0; i < children.getLength(); i++) {
-					cmNode = children.item(i);
-					contextString = cmNode.getNodeName();
-					if (contextString != null) {
-						info.append("<" + cmNode.getNodeName() + ">"); //$NON-NLS-1$ //$NON-NLS-2$
-						if (i < children.getLength() - 1) {
-							info.append(" "); //$NON-NLS-1$
-						}
-					}
-				}
-			}
-		}
-		if (!info.toString().trim().equals("")) {
-			return new IContextInformation[]{new ContextInformation(contextString, info.toString())};
-		}
-		else {
-			return EMPTY_CONTEXT_INFO;
-		}
-	}
-
-	/**
-	 * Returns sorted array of CMAttributeDeclarations.
-	 * 
-	 * @param attributes
-	 * 
-	 */
-	private CMAttributeDeclaration[] getSortedAttributes(CMNamedNodeMap attributes) {
-		List sorted = new ArrayList();
-		for (int i = 0; i < attributes.getLength(); i++) {
-			sorted.add(attributes.item(i));
-		}
-		Collections.sort(sorted, getCMAttributeComparator());
-		return (CMAttributeDeclaration[]) sorted.toArray(new CMAttributeDeclaration[sorted.size()]);
-	}
-
-	/**
-	 * @param sdRegion
-	 * 
-	 */
-	private boolean isEndTag(IStructuredDocumentRegion sdRegion) {
-		ITextRegionList regions = sdRegion.getRegions();
-		return regions.get(0).getType() == DOMRegionContext.XML_END_TAG_OPEN;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ContentAssistRequest.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ContentAssistRequest.java
deleted file mode 100644
index 6a1d3af..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ContentAssistRequest.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.w3c.dom.Node;
-
-
-public class ContentAssistRequest {
-	protected IStructuredDocumentRegion documentRegion = null;
-	protected List macros = new ArrayList();
-	protected String matchString;
-	protected Node node = null;
-	protected Node parent = null;
-	protected List proposals = new ArrayList();
-	protected ITextRegion region = null;
-	protected int replacementBeginPosition;
-	protected int replacementLength;
-
-	// private Boolean separate = null; // (pa) not used
-	// private Boolean sort = null; // (pa) not used
-	/**
-	 * XMLContentAssistRequest constructor comment.
-	 */
-	public ContentAssistRequest(Node node, Node parent, IStructuredDocumentRegion documentRegion, ITextRegion completionRegion, int begin, int length, String filter) {
-		super();
-		setNode(node);
-		setParent(parent);
-		setDocumentRegion(documentRegion);
-		setRegion(completionRegion);
-		setMatchString(filter);
-		setReplacementBeginPosition(begin);
-		setReplacementLength(length);
-	}
-
-	public void addMacro(ICompletionProposal newProposal) {
-		macros.add(newProposal);
-	}
-
-	public void addProposal(ICompletionProposal newProposal) {
-		proposals.add(newProposal);
-	}
-
-	public ICompletionProposal[] getCompletionProposals() {
-		ICompletionProposal results[] = null;
-		if ((getProposals().size() > 0) || (getMacros().size() > 0)) {
-			List allProposals = new ArrayList();
-			if (!shouldSeparate()) {
-				allProposals.addAll(getProposals());
-				// should be empty, as all macros should have gone into the
-				// proposal list
-				allProposals.addAll(getMacros());
-				allProposals = sortProposals(allProposals);
-			}
-			else {
-				allProposals.addAll(sortProposals(getProposals()));
-				allProposals.addAll(sortProposals(getMacros()));
-			}
-
-			results = new ICompletionProposal[allProposals.size()];
-			for (int i = 0; i < allProposals.size(); i++) {
-				results[i] = (ICompletionProposal) allProposals.get(i);
-			}
-		}
-		return results;
-	}
-
-
-	public IStructuredDocumentRegion getDocumentRegion() {
-		return documentRegion;
-	}
-
-	/**
-	 * 
-	 * @return java.util.List
-	 */
-	public java.util.List getMacros() {
-		return macros;
-	}
-
-	/**
-	 * 
-	 * @return java.lang.String
-	 */
-	public java.lang.String getMatchString() {
-		return matchString;
-	}
-
-	/**
-	 * 
-	 * @return org.w3c.dom.Node
-	 */
-	public org.w3c.dom.Node getNode() {
-		return node;
-	}
-
-	/**
-	 * 
-	 * @return org.w3c.dom.Node
-	 */
-	public org.w3c.dom.Node getParent() {
-		return parent;
-	}
-
-	/**
-	 * 
-	 * @return java.util.List
-	 */
-	public java.util.List getProposals() {
-		return proposals;
-	}
-
-	public ITextRegion getRegion() {
-		return region;
-	}
-
-	/**
-	 * 
-	 * @return int
-	 */
-	public int getReplacementBeginPosition() {
-		return replacementBeginPosition;
-	}
-
-	/**
-	 * @return int
-	 */
-	public int getReplacementLength() {
-		return replacementLength;
-	}
-
-	public int getStartOffset() {
-		if ((getDocumentRegion() != null) && (getRegion() != null)) {
-			return ((ITextRegionCollection) getDocumentRegion()).getStartOffset(getRegion());
-		}
-		return -1;
-	}
-
-	public String getText() {
-		if ((getDocumentRegion() != null) && (getRegion() != null)) {
-			return ((ITextRegionCollection) getDocumentRegion()).getText(getRegion());
-		}
-		return ""; //$NON-NLS-1$
-	}
-
-	public int getTextEndOffset() {
-		if ((getDocumentRegion() != null) && (getRegion() != null)) {
-			return ((ITextRegionCollection) getDocumentRegion()).getTextEndOffset(getRegion());
-		}
-		return -1;
-	}
-
-	/**
-	 * @param region
-	 */
-	public void setDocumentRegion(IStructuredDocumentRegion region) {
-		documentRegion = region;
-	}
-
-	/**
-	 * 
-	 * @param newMatchString
-	 *            java.lang.String
-	 */
-	public void setMatchString(java.lang.String newMatchString) {
-		matchString = newMatchString;
-	}
-
-	/**
-	 * 
-	 * @param newNode
-	 *            org.w3c.dom.Node
-	 */
-	public void setNode(org.w3c.dom.Node newNode) {
-		node = newNode;
-	}
-
-	/**
-	 * 
-	 * @param newParent
-	 *            org.w3c.dom.Node
-	 */
-	public void setParent(org.w3c.dom.Node newParent) {
-		parent = newParent;
-	}
-
-	/**
-	 * 
-	 * @param newRegion
-	 */
-	public void setRegion(ITextRegion newRegion) {
-		region = newRegion;
-	}
-
-	/**
-	 * 
-	 * @param newReplacementBeginPosition
-	 *            int
-	 */
-	public void setReplacementBeginPosition(int newReplacementBeginPosition) {
-		replacementBeginPosition = newReplacementBeginPosition;
-	}
-
-
-	public void setReplacementLength(int newReplacementLength) {
-		replacementLength = newReplacementLength;
-	}
-
-	public boolean shouldSeparate() {
-		/*
-		 * if (separate == null) { PreferenceManager manager =
-		 * getPreferenceManager(); if(manager == null) { separate =
-		 * Boolean.FALSE; } else { Element caSettings =
-		 * manager.getElement(PreferenceNames.CONTENT_ASSIST); separate = new
-		 * Boolean(caSettings.getAttribute(PreferenceNames.SEPARATE).equals(PreferenceNames.TRUE)); } }
-		 * return separate.booleanValue();
-		 */
-		return false;
-	}
-
-	protected List sortProposals(List proposalsIn) {
-		Collections.sort(proposalsIn, new ProposalComparator());
-		return proposalsIn;
-
-	}
-
-	/**
-	 * 
-	 * @return java.lang.String
-	 */
-	public java.lang.String toString() {
-		return "Node: " + getNode() //$NON-NLS-1$
-					+ "\nParent: " + getParent() //$NON-NLS-1$
-					+ "\nStructuredDocumentRegion: " + StringUtils.escape(getDocumentRegion().toString()) //$NON-NLS-1$
-					+ "\nRegion: " + getRegion() //$NON-NLS-1$
-					+ "\nMatch string: '" + StringUtils.escape(getMatchString()) + "'" //$NON-NLS-2$//$NON-NLS-1$
-					+ "\nOffsets: [" + getReplacementBeginPosition() + "-" + (getReplacementBeginPosition() + getReplacementLength()) + "]\n"; //$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ContextInfoModelUtil.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ContextInfoModelUtil.java
deleted file mode 100644
index a48e753..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ContextInfoModelUtil.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-
-/**
- * @author pavery
- */
-public class ContextInfoModelUtil {
-	IStructuredDocument fDocument = null;
-
-	ContextInfoModelUtil(IStructuredDocument doc) {
-		fDocument = doc;
-	}
-
-	public IStructuredDocument getDocument() {
-		return fDocument;
-	}
-
-	public ModelQuery getModelQuery() {
-		ModelQuery mq = null;
-
-		IStructuredModel xmlModel = null;
-		try {
-			xmlModel = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
-			mq = ModelQueryUtil.getModelQuery(xmlModel);
-		}
-		finally {
-			if (xmlModel != null) {
-				xmlModel.releaseFromRead();
-			}
-		}
-		return mq;
-	}
-
-	public IDOMNode getXMLNode(int offset) {
-		IStructuredModel xmlModel = null;
-		IDOMNode xmlNode = null;
-		try {
-			xmlModel = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
-			xmlNode = (IDOMNode) xmlModel.getIndexedRegion(offset);
-		}
-		finally {
-			if (xmlModel != null)
-				xmlModel.releaseFromRead();
-		}
-		return xmlNode;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/CustomTemplateProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/CustomTemplateProposal.java
deleted file mode 100644
index f19dd90..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/CustomTemplateProposal.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateProposal;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceCompletionProposal;
-
-/**
- * Purpose of this class is to make the additional proposal info into content
- * fit for an HTML viewer (by escaping characters)
- */
-class CustomTemplateProposal extends TemplateProposal implements IRelevanceCompletionProposal {
-	// copies of this class exist in:
-	// org.eclipse.jst.jsp.ui.internal.contentassist
-	// org.eclipse.wst.html.ui.internal.contentassist
-	// org.eclipse.wst.xml.ui.internal.contentassist
-
-	public CustomTemplateProposal(Template template, TemplateContext context, IRegion region, Image image, int relevance) {
-		super(template, context, region, image, relevance);
-	}
-
-	public String getAdditionalProposalInfo() {
-		String additionalInfo = super.getAdditionalProposalInfo();
-		return StringUtils.convertToHTMLContent(additionalInfo);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NoRegionContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NoRegionContentAssistProcessor.java
deleted file mode 100644
index 57744f3..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NoRegionContentAssistProcessor.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.ui.internal.IReleasable;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.core.text.IXMLPartitions;
-
-
-/**
- * ContentAssistProcessor to handle special cases in content assist where the
- * partitioner cannot determine a partition type at the current cursor
- * position (usually at EOF).
- * 
- * @author pavery
- */
-public class NoRegionContentAssistProcessor implements IContentAssistProcessor, IReleasable {
-
-	private static final boolean DEBUG = false;
-	protected char completionProposalAutoActivationCharacters[] = null;
-	protected char contextInformationAutoActivationCharacters[] = null;
-
-	private final ICompletionProposal[] EMPTY_PROPOSAL_SET = new ICompletionProposal[0];
-	protected String fErrorMessage = null;
-	private HashMap fNameToProcessorMap = null;
-	private HashMap fPartitionToProcessorMap = null;
-
-	public NoRegionContentAssistProcessor() {
-		super();
-	}
-
-	protected void addPartitionProcessor(String key, IContentAssistProcessor processor) {
-		addProcessor(getPartitionToProcessorMap(), key, processor);
-	}
-
-	protected void addNameProcessor(String key, IContentAssistProcessor processor) {
-		addProcessor(getNameToProcessorMap(), key, processor);
-	}
-
-	protected IContentAssistProcessor getPartitionProcessor(String key) {
-		return (IContentAssistProcessor) getPartitionToProcessorMap().get(key);
-	}
-
-	/**
-	 * Ensures release if it's a duplicate partition type.
-	 * 
-	 * @param map
-	 * @param key
-	 * @param processor
-	 */
-	private void addProcessor(HashMap map, String key, IContentAssistProcessor processor) {
-		Object o = map.remove(key);
-		if (o != null) {
-			if (o instanceof IReleasable) {
-				((IReleasable) o).release();
-			}
-		}
-		map.put(key, processor);
-	}
-
-	/**
-	 * Figures out what the correct ICompletionProposalProcessor is and
-	 * computesCompletionProposals on that.
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer,
-	 *      int)
-	 */
-	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
-		IContentAssistProcessor p = null;
-		ICompletionProposal[] results = EMPTY_PROPOSAL_SET;
-
-		p = guessContentAssistProcessor(viewer, documentOffset);
-		if (p != null) {
-			results = p.computeCompletionProposals(viewer, documentOffset);
-		}
-
-		return (results != null) ? results : EMPTY_PROPOSAL_SET;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer,
-	 *      int)
-	 */
-	public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
-		// get context info from processor that we end up using...
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
-	 */
-	public char[] getCompletionProposalAutoActivationCharacters() {
-		return completionProposalAutoActivationCharacters;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
-	 */
-	public char[] getContextInformationAutoActivationCharacters() {
-		return contextInformationAutoActivationCharacters;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
-	 */
-	public IContextInformationValidator getContextInformationValidator() {
-		// return the validator for the content assist processor that we
-		// used...
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
-	 */
-	public String getErrorMessage() {
-		return fErrorMessage;
-	}
-	
-	private HashMap getNameToProcessorMap() {
-		if (fNameToProcessorMap == null) {
-			fNameToProcessorMap = new HashMap();
-			initNameToProcessorMap();
-		}
-		return fNameToProcessorMap;
-	}
-	
-	private HashMap getPartitionToProcessorMap() {
-		if (fPartitionToProcessorMap == null) {
-			fPartitionToProcessorMap = new HashMap();
-			initPartitionToProcessorMap();
-		}
-		return fPartitionToProcessorMap;
-	}
-
-	/**
-	 * Gives you the document partition type (String) for the given
-	 * StructuredTextViewer and documentPosition.
-	 * 
-	 * @param viewer
-	 * @param documentPosition
-	 * @return String
-	 */
-	protected String getPartitionType(StructuredTextViewer viewer, int documentPosition) {
-		IDocument document = viewer.getDocument();
-		String partitionType = null;
-		ITypedRegion partition = null;
-		try {
-			partition = document.getPartition(documentPosition);
-			partitionType = partition.getType();
-		}
-		catch (BadLocationException e) {
-			partitionType = null;
-		}
-		return partitionType;
-	}
-
-	/**
-	 * Guesses a ContentAssistProcessor based on the TextViewer and
-	 * documentOffset.
-	 * 
-	 * @param viewer
-	 * @param documentOffset
-	 */
-	protected IContentAssistProcessor guessContentAssistProcessor(ITextViewer viewer, int documentOffset) {
-		// mapping logic here...
-		// look @ previous region
-		// look @ previous doc partition type
-		// look @ page language
-		IContentAssistProcessor p = null;
-		IStructuredDocumentRegion sdRegion = ContentAssistUtils.getStructuredDocumentRegion(viewer, documentOffset);
-		if (sdRegion != null) {
-			String currentRegionType = sdRegion.getType();
-			// System.out.println("current region type is >> " +
-			// currentRegionType);
-			if (currentRegionType == DOMRegionContext.UNDEFINED) {
-				IStructuredDocumentRegion sdPrev = sdRegion.getPrevious();
-				if (sdPrev != null) {
-					if (DEBUG) {
-						String prevRegionType = sdPrev.getType();
-						System.out.println("previous region type is >> " + prevRegionType); //$NON-NLS-1$
-					}
-				}
-			}
-		}
-		// working w/ viewer & document partition
-		if ((p == null) && (viewer.getDocument().getLength() > 0)) {
-			String prevPartitionType = getPartitionType((StructuredTextViewer) viewer, documentOffset - 1);
-			// System.out.println("previous partition type is > " +
-			// prevPartitionType);
-			p = (IContentAssistProcessor) getPartitionToProcessorMap().get(prevPartitionType);
-		}
-		return p;
-	}
-
-	/**
-	 * Inits map for extra ContentAssistProcessors (useBean, get/setProperty)
-	 */
-	protected void initNameToProcessorMap() {
-		// nothing to do in this case
-	}
-
-	/**
-	 * Adds all relevent ContentAssistProcessors to the partition to processor
-	 * map (just XML here)
-	 */
-	protected void initPartitionToProcessorMap() {
-		XMLContentAssistProcessor xmlProcessor = new XMLContentAssistProcessor();
-		addProcessor(getPartitionToProcessorMap(), IXMLPartitions.XML_DEFAULT, xmlProcessor);
-	}
-
-	public void release() {
-		releasePartitionToProcessorMap();
-		releaseNameToProcessorMap();
-	}
-
-	protected void releaseMap(HashMap map) {
-		if ((map != null) && !map.isEmpty()) {
-			Iterator it = map.keySet().iterator();
-			Object key = null;
-			while (it.hasNext()) {
-				key = it.next();
-				if (map.get(key) instanceof IReleasable) {
-					((IReleasable) map.get(key)).release();
-				}
-			}
-			map.clear();
-			map = null;
-		}
-	}
-
-	protected void releaseNameToProcessorMap() {
-		releaseMap(fNameToProcessorMap);
-	}
-
-	protected void releasePartitionToProcessorMap() {
-		releaseMap(fPartitionToProcessorMap);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NonValidatingModelQueryAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NonValidatingModelQueryAction.java
deleted file mode 100644
index 24a397d..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NonValidatingModelQueryAction.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-public class NonValidatingModelQueryAction implements org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryAction {
-
-	protected CMNode cmnode = null;
-	protected int endIndex = 0;
-	protected int kind = INSERT;
-	protected int startIndex = 0;
-	protected Object userData = null;
-
-	/**
-	 * NonValidatingModelQueryAction constructor comment.
-	 */
-	protected NonValidatingModelQueryAction() {
-		super();
-	}
-
-	/**
-	 * NonValidatingModelQueryAction constructor comment.
-	 */
-	public NonValidatingModelQueryAction(CMNode newChild, int newKind, int newStart, int newEnd, Object newUserData) {
-		super();
-		cmnode = newChild;
-		kind = newKind;
-		startIndex = newStart;
-		endIndex = newEnd;
-		userData = newUserData;
-	}
-
-	/**
-	 * getCMNode method comment.
-	 */
-	public org.eclipse.wst.xml.core.internal.contentmodel.CMNode getCMNode() {
-		return cmnode;
-	}
-
-	/**
-	 * 
-	 * @return int
-	 */
-	public int getEndIndex() {
-		return endIndex;
-	}
-
-	/**
-	 * 
-	 * @return int
-	 */
-	public int getKind() {
-		return kind;
-	}
-
-	/**
-	 * getParent method comment.
-	 */
-	public org.w3c.dom.Node getParent() {
-		return null;
-	}
-
-	/**
-	 * 
-	 * @return int
-	 */
-	public int getStartIndex() {
-		return startIndex;
-	}
-
-	/**
-	 * getUserData method comment.
-	 */
-	public Object getUserData() {
-		return null;
-	}
-
-	/**
-	 * performAction method comment.
-	 */
-	public void performAction() {
-	}
-
-	/**
-	 * setCMNode method comment.
-	 */
-	protected void setCMNode(org.eclipse.wst.xml.core.internal.contentmodel.CMNode newNode) {
-		cmnode = newNode;
-	}
-
-	/**
-	 * 
-	 * @param newEndIndex
-	 *            int
-	 */
-	protected void setEndIndex(int newEndIndex) {
-		endIndex = newEndIndex;
-	}
-
-	/**
-	 * 
-	 * @param newKind
-	 *            int
-	 */
-	protected void setKind(int newKind) {
-		kind = newKind;
-	}
-
-	/**
-	 * 
-	 * @param newStartIndex
-	 *            int
-	 */
-	protected void setStartIndex(int newStartIndex) {
-		startIndex = newStartIndex;
-	}
-
-	/**
-	 * setUserData method comment.
-	 */
-	public void setUserData(Object object) {
-	}
-
-	/**
-	 * 
-	 * @return java.lang.String
-	 */
-	public String toString() {
-		String actionName = null;
-		switch (kind) {
-			case INSERT :
-				actionName = "INSERT";//$NON-NLS-1$
-				break;
-			case REMOVE :
-				actionName = "REMOVE";//$NON-NLS-1$
-				break;
-			case REPLACE :
-				actionName = "REPLACE";//$NON-NLS-1$
-				break;
-			default :
-				actionName = "UNKNOWN ACTION ";//$NON-NLS-1$
-		}
-		String nodeName = (cmnode != null) ? getCMNode().getNodeName() : "(unknown)";//$NON-NLS-1$
-		return actionName + "=" + nodeName + "(" + startIndex + "..." + endIndex + ")";//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ProposalComparator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ProposalComparator.java
deleted file mode 100644
index ee6e8e8..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ProposalComparator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-
-
-import java.util.Comparator;
-
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceCompletionProposal;
-
-
-public class ProposalComparator implements Comparator {
-
-
-	public int compare(Object o1, Object o2) {
-		int relevance = 0;
-		if ((o1 instanceof IRelevanceCompletionProposal) && (o2 instanceof IRelevanceCompletionProposal)) {
-			// sort based on relevance
-			IRelevanceCompletionProposal cp1 = (IRelevanceCompletionProposal) o1;
-			IRelevanceCompletionProposal cp2 = (IRelevanceCompletionProposal) o2;
-
-			relevance = cp2.getRelevance() - cp1.getRelevance();
-
-			// if same relevance, secondary sort (lexigraphically)
-			if ((relevance == 0) && (o1 instanceof ICompletionProposal) && (o2 instanceof ICompletionProposal)) {
-				String displayString1 = ((ICompletionProposal) o1).getDisplayString();
-				String displayString2 = ((ICompletionProposal) o2).getDisplayString();
-				if ((displayString1 != null) && (displayString2 != null)) {
-					// relevance = displayString1.compareTo(displayString2);
-					// // this didn't mix caps w/ lowercase
-					relevance = com.ibm.icu.text.Collator.getInstance().compare(displayString1, displayString2);
-				}
-			}
-		}
-		// otherwise if it's not ISEDRelevanceCompletionProposal, don't sort
-		return relevance;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java
deleted file mode 100644
index c371494..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.templates.DocumentTemplateContext;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateBuffer;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.jface.text.templates.TemplateException;
-
-/**
- * Just like DocumentTemplateContext except if an insert offset is passed in,
- * during evaluation, the "prefix" before the template will be checked to see
- * if it matches the template name. If so, overwrite the template name.
- * Otherwise, just insert the template at the insert offset location (by not
- * overwriting the prefix text)
- */
-public class ReplaceNameTemplateContext extends DocumentTemplateContext {
-	private int fInsertOffset = -1;
-
-	/**
-	 * Creates a document template context.
-	 * 
-	 * @param type
-	 *            the context type
-	 * @param document
-	 *            the document this context applies to
-	 * @param offset
-	 *            the offset of the document region
-	 * @param length
-	 *            the length of the document region
-	 */
-	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length) {
-		this(type, document, new Position(offset, length));
-	}
-
-	/**
-	 * Creates a document template context. The supplied <code>Position</code>
-	 * will be queried to compute the <code>getStart</code> and
-	 * <code>getEnd</code> methods, which will therefore answer updated
-	 * position data if it is registered with the document.
-	 * 
-	 * @param type
-	 *            the context type
-	 * @param document
-	 *            the document this context applies to
-	 * @param position
-	 *            the position describing the area of the document which forms
-	 *            the template context
-	 * @since 3.1
-	 */
-	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, Position position) {
-		super(type, document, position);
-	}
-
-	/**
-	 * Creates a document template context.
-	 * 
-	 * @param type
-	 *            the context type
-	 * @param document
-	 *            the document this context applies to
-	 * @param offset
-	 *            the offset of the document region
-	 * @param length
-	 *            the length of the document region
-	 * @param insertOffset
-	 *            the offset of the document region where insert was
-	 *            originally requested
-	 */
-	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length, int insertOffset) {
-		this(type, document, new Position(offset, length));
-		fInsertOffset = insertOffset;
-	}
-
-	/*
-	 * @see org.eclipse.jface.text.templates.TemplateContext#evaluate(org.eclipse.jface.text.templates.Template)
-	 */
-	public TemplateBuffer evaluate(Template template) throws BadLocationException, TemplateException {
-		TemplateBuffer buffer = super.evaluate(template);
-		if (buffer != null) {
-			if ((fInsertOffset > -1) && (fInsertOffset > getStart())) {
-				String prefix = getDocument().get(getStart(), fInsertOffset - getStart());
-				if (!template.getName().startsWith(prefix)) {
-					// generate a new buffer that actually contains the
-					// text that was going to be overwritten
-					buffer = new TemplateBuffer(prefix + buffer.getString(), buffer.getVariables());
-				}
-			}
-		}
-		return buffer;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/SimpleCMElementDeclaration.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/SimpleCMElementDeclaration.java
deleted file mode 100644
index 41a607a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/SimpleCMElementDeclaration.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-
-
-public class SimpleCMElementDeclaration implements org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration {
-
-	String fNodeName;
-
-	/**
-	 * SimpleCMELementDeclaration constructor comment.
-	 */
-	public SimpleCMElementDeclaration() {
-		super();
-	}
-
-	public SimpleCMElementDeclaration(String nodeName) {
-		super();
-		setNodeName(nodeName);
-	}
-
-	/**
-	 * getAttributes method
-	 * 
-	 * @return CMNamedNodeMap
-	 * 
-	 * Returns CMNamedNodeMap of AttributeDeclaration
-	 */
-	public org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap getAttributes() {
-		return null;
-	}
-
-	/**
-	 * getCMContent method
-	 * 
-	 * @return CMContent
-	 * 
-	 * Returns the root node of this element's content model. This can be an
-	 * CMElementDeclaration or a CMGroup
-	 */
-	public org.eclipse.wst.xml.core.internal.contentmodel.CMContent getContent() {
-		return null;
-	}
-
-	/**
-	 * getContentType method
-	 * 
-	 * @return int
-	 * 
-	 * Returns one of : ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA.
-	 */
-	public int getContentType() {
-		return 0;
-	}
-
-	/**
-	 * getDataType method
-	 * 
-	 * @return java.lang.String
-	 */
-	public org.eclipse.wst.xml.core.internal.contentmodel.CMDataType getDataType() {
-		return null;
-	}
-
-	/**
-	 * getElementName method
-	 * 
-	 * @return java.lang.String
-	 */
-	public String getElementName() {
-		return null;
-	}
-
-	/**
-	 * getLocalElements method
-	 * 
-	 * @return CMNamedNodeMap
-	 * 
-	 * Returns a list of locally defined elements.
-	 */
-	public org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap getLocalElements() {
-		return null;
-	}
-
-	/**
-	 * getMaxOccur method
-	 * 
-	 * @return int
-	 * 
-	 * If -1, it's UNBOUNDED.
-	 */
-	public int getMaxOccur() {
-		return 0;
-	}
-
-	/**
-	 * getMinOccur method
-	 * 
-	 * @return int
-	 * 
-	 * If 0, it's OPTIONAL. If 1, it's REQUIRED.
-	 */
-	public int getMinOccur() {
-		return 0;
-	}
-
-	/**
-	 * 
-	 * @return java.lang.String
-	 */
-	public java.lang.String getNodeName() {
-		return fNodeName;
-	}
-
-	/**
-	 * getNodeType method
-	 * 
-	 * @return int
-	 * 
-	 * Returns one of :
-	 * 
-	 */
-	public int getNodeType() {
-		return 0;
-	}
-
-	/**
-	 * getProperty method
-	 * 
-	 * @return java.lang.Object
-	 * 
-	 * Returns the object property desciped by the propertyName
-	 * 
-	 */
-	public Object getProperty(String propertyName) {
-		return null;
-	}
-
-	/**
-	 * 
-	 * @param newNodeName
-	 *            java.lang.String
-	 */
-	public void setNodeName(java.lang.String newNodeName) {
-		fNodeName = newNodeName;
-	}
-
-	/**
-	 * supports method
-	 * 
-	 * @return boolean
-	 * 
-	 * Returns true if the CMNode supports a specified property
-	 * 
-	 */
-	public boolean supports(String propertyName) {
-		return false;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/SourceEditorImageHelper.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/SourceEditorImageHelper.java
deleted file mode 100644
index fe16777..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/SourceEditorImageHelper.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-
-/**
- * @deprecated use internal XMLEditorPluginImageHelper or external
- *             SharedXMLEditorPluginImageHelper instead
- */
-public class SourceEditorImageHelper {
-
-	public SourceEditorImageHelper() {
-		super();
-	}
-
-	public Image createImage(String resource) {
-		ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(XMLUIPlugin.ID, resource);
-		Image image = desc.createImage();
-		JFaceResources.getImageRegistry().put(resource, image);
-		return image;
-	}
-
-	public Image getImage(String resource) {
-		Image image = JFaceResources.getImageRegistry().get(resource);
-		if (image == null) {
-			image = createImage(resource);
-		}
-		return image;
-	}
-
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java
deleted file mode 100644
index 252c04c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLUIPreferenceNames;
-import org.eclipse.wst.xml.ui.internal.templates.TemplateContextTypeIdsXML;
-
-public class XMLContentAssistProcessor extends AbstractContentAssistProcessor implements IPropertyChangeListener {
-
-	protected IPreferenceStore fPreferenceStore = null;
-	protected IResource fResource = null;
-	private XMLTemplateCompletionProcessor fTemplateProcessor = null;
-	private List fTemplateContexts = new ArrayList();
-
-	public XMLContentAssistProcessor() {
-		super();
-	}
-
-	protected void addAttributeNameProposals(ContentAssistRequest contentAssistRequest) {
-		addTemplates(contentAssistRequest, TemplateContextTypeIdsXML.ATTRIBUTE);
-		super.addAttributeNameProposals(contentAssistRequest);
-	}
-
-	protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
-		addTemplates(contentAssistRequest, TemplateContextTypeIdsXML.ATTRIBUTE_VALUE);
-		super.addAttributeValueProposals(contentAssistRequest);
-	}
-
-	protected void addEmptyDocumentProposals(ContentAssistRequest contentAssistRequest) {
-		addTemplates(contentAssistRequest, TemplateContextTypeIdsXML.NEW);
-		super.addEmptyDocumentProposals(contentAssistRequest);
-	}
-
-	protected void addTagInsertionProposals(ContentAssistRequest contentAssistRequest, int childPosition) {
-		addTemplates(contentAssistRequest, TemplateContextTypeIdsXML.TAG);
-		super.addTagInsertionProposals(contentAssistRequest, childPosition);
-	}
-
-	/**
-	 * Adds templates to the list of proposals
-	 * 
-	 * @param contentAssistRequest
-	 * @param context
-	 */
-	private void addTemplates(ContentAssistRequest contentAssistRequest, String context) {
-		addTemplates(contentAssistRequest, context, contentAssistRequest.getReplacementBeginPosition());
-	}
-
-	/**
-	 * Adds templates to the list of proposals
-	 * 
-	 * @param contentAssistRequest
-	 * @param context
-	 * @param startOffset
-	 */
-	private void addTemplates(ContentAssistRequest contentAssistRequest, String context, int startOffset) {
-		if (contentAssistRequest == null) {
-			return;
-		}
-
-		// if already adding template proposals for a certain context type, do
-		// not add again
-		if (!fTemplateContexts.contains(context)) {
-			fTemplateContexts.add(context);
-			boolean useProposalList = !contentAssistRequest.shouldSeparate();
-
-			if (getTemplateCompletionProcessor() != null) {
-				getTemplateCompletionProcessor().setContextType(context);
-				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, startOffset);
-				for (int i = 0; i < proposals.length; ++i) {
-					if (useProposalList) {
-						contentAssistRequest.addProposal(proposals[i]);
-					}
-					else {
-						contentAssistRequest.addMacro(proposals[i]);
-					}
-				}
-			}
-		}
-	}
-
-	protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) {
-		ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-		// bug115927 use original document position for all/any region
-		// templates
-		addTemplates(request, TemplateContextTypeIdsXML.ALL, documentPosition);
-		return request;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.xml.ui.contentassist.AbstractContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer,
-	 *      int)
-	 */
-	public ICompletionProposal[] computeCompletionProposals(ITextViewer textViewer, int documentPosition) {
-		fTemplateContexts.clear();
-		return super.computeCompletionProposals(textViewer, documentPosition);
-	}
-
-	protected IPreferenceStore getPreferenceStore() {
-		if (fPreferenceStore == null) {
-			fPreferenceStore = XMLUIPlugin.getDefault().getPreferenceStore();
-		}
-		return fPreferenceStore;
-	}
-
-	private XMLTemplateCompletionProcessor getTemplateCompletionProcessor() {
-		if (fTemplateProcessor == null) {
-			fTemplateProcessor = new XMLTemplateCompletionProcessor();
-		}
-		return fTemplateProcessor;
-	}
-
-	protected void init() {
-		getPreferenceStore().addPropertyChangeListener(this);
-		reinit();
-	}
-
-	public void propertyChange(PropertyChangeEvent event) {
-		String property = event.getProperty();
-
-		if ((property.compareTo(XMLUIPreferenceNames.AUTO_PROPOSE) == 0) || (property.compareTo(XMLUIPreferenceNames.AUTO_PROPOSE_CODE) == 0)) {
-			reinit();
-		}
-	}
-
-	protected void reinit() {
-		String key = XMLUIPreferenceNames.AUTO_PROPOSE;
-		boolean doAuto = getPreferenceStore().getBoolean(key);
-		if (doAuto) {
-			key = XMLUIPreferenceNames.AUTO_PROPOSE_CODE;
-			completionProposalAutoActivationCharacters = getPreferenceStore().getString(key).toCharArray();
-		}
-		else {
-			completionProposalAutoActivationCharacters = null;
-		}
-	}
-
-	public void release() {
-		super.release();
-		getPreferenceStore().removePropertyChangeListener(this);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistUtilities.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistUtilities.java
deleted file mode 100644
index 4aa4b34..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistUtilities.java
+++ /dev/null
@@ -1,516 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.util.ScriptLanguageKeys;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * @author pavery
- */
-public class XMLContentAssistUtilities extends ContentAssistUtils {
-
-	/**
-	 * 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 class DOMJSPRegionContextsPrivateCopy {
-		private static final String JSP_CLOSE = "JSP_CLOSE"; //$NON-NLS-1$
-		private static final String JSP_DECLARATION_OPEN = "JSP_DECLARATION_OPEN"; //$NON-NLS-1$
-		private static final String JSP_SCRIPTLET_OPEN = "JSP_SCRIPTLET_OPEN"; //$NON-NLS-1$
-		private static final String JSP_EXPRESSION_OPEN = "JSP_EXPRESSION_OPEN"; //$NON-NLS-1$
-
-	}
-
-
-	public static final String CONTENT = "Content"; //$NON-NLS-1$
-	public static final String CONTENT_SCRIPT_TYPE = "Content-Script-Type"; //$NON-NLS-1$
-	public static final String HEAD = "HEAD"; //$NON-NLS-1$
-	public static final String HTML = "HTML"; //$NON-NLS-1$
-	public static final String HTTP_EQUIV = "HTTP-EQUIV"; //$NON-NLS-1$
-	public static final String META = "META"; //$NON-NLS-1$
-
-	/**
-	 * A convenience method for getting the closing proposal given the
-	 * contents (IndexedRegion) of a tag that is started, but possibly not
-	 * ended
-	 * 
-	 * @param viewer
-	 *            the text viewer
-	 * @param documentPosition
-	 *            the cursor position in the viewer
-	 * @param indexedNode
-	 *            the contents of the tag that is started but possibly not
-	 *            ended
-	 * @param parentTagName
-	 *            the tag on which you are checkin for an ending tag
-	 * @param imagePath
-	 *            content assist image relative path
-	 * @return ICompletionProposal
-	 */
-	public static ICompletionProposal computeJSPEndTagProposal(ITextViewer viewer, int documentPosition, IndexedRegion indexedNode, String parentTagName, String imagePath) {
-		ICompletionProposal p = null;
-
-		// check if tag is closed
-		boolean hasEndTag = true;
-		boolean isJSPTag = false;
-		IDOMNode xnode = null;
-		String tagName = ""; //$NON-NLS-1$
-		if (indexedNode instanceof IDOMNode) {
-			xnode = ((IDOMNode) indexedNode);
-			// it's ended already...
-			if (xnode.getEndStructuredDocumentRegion() != null) {
-				return null;
-			}
-			IDOMNode openNode = null;
-			if (!xnode.getNodeName().equalsIgnoreCase(parentTagName)) {
-				openNode = (IDOMNode) xnode.getParentNode();
-			}
-			if (openNode != null) {
-				if (openNode instanceof IDOMElement) {
-					isJSPTag = ((IDOMElement) openNode).isJSPTag();
-				}
-				tagName = openNode.getNodeName();
-				hasEndTag = (openNode.getEndStructuredDocumentRegion() != null);
-			}
-		}
-
-		// it's closed, don't add close tag proposal
-		if (!hasEndTag && !isJSPTag) {
-
-			// create appropriate close tag text
-			String proposedText = "</" + tagName; //$NON-NLS-1$
-			String viewerText = viewer.getTextWidget().getText();
-			if ((viewerText.length() >= documentPosition) && (viewerText.length() >= 2) && (documentPosition >= 2)) {
-				String last2chars = viewerText.substring(documentPosition - 2, documentPosition);
-				if (last2chars.endsWith("</")) {
-					proposedText = tagName;
-				}
-				else if (last2chars.endsWith("<")) {
-					proposedText = "/" + tagName; //$NON-NLS-1$
-				}
-			}
-
-			// create proposal
-			p = new CustomCompletionProposal(proposedText + ">", //$NON-NLS-1$
-						documentPosition, 0, proposedText.length() + 1, XMLEditorPluginImageHelper.getInstance().getImage(imagePath), NLS.bind(XMLUIMessages.End_with_, (new Object[]{proposedText})), null, null, XMLRelevanceConstants.R_END_TAG);
-		}
-		else if (!hasEndTag && isJSPTag) {
-
-			// create appropriate close tag text
-			String proposedText = "%"; //$NON-NLS-1$
-			String viewerText = viewer.getTextWidget().getText();
-
-			// TODO (pa) make it smarter to add "%>" or just ">" if % is
-			// already there...
-			if ((viewerText.length() >= documentPosition) && (viewerText.length() >= 2)) {
-				String last2chars = viewerText.substring(documentPosition - 2, documentPosition);
-				String lastchar = viewerText.substring(documentPosition - 1, documentPosition);
-				if (lastchar.equals("%")) //$NON-NLS-1$
-				{
-					if (last2chars.endsWith("<%")) {
-						proposedText = "%"; //$NON-NLS-1$
-					}
-					else {
-						proposedText = ""; //$NON-NLS-1$
-					}
-				}
-			}
-
-			// create proposal
-			p = new CustomCompletionProposal(proposedText + ">", //$NON-NLS-1$
-						documentPosition, 0, proposedText.length() + 1, XMLEditorPluginImageHelper.getInstance().getImage(imagePath), NLS.bind(XMLUIMessages.End_with_, (new Object[]{proposedText})), null, null, XMLRelevanceConstants.R_END_TAG);
-		}
-
-		return p;
-	}
-
-
-	/**
-	 * A convenience method for getting the closing proposal given the
-	 * contents (IndexedRegion) of a tag that is started, but possibly not
-	 * ended
-	 * 
-	 * @param viewer
-	 *            the text viewer
-	 * @param documentPosition
-	 *            the cursor position in the viewer
-	 * @param indexedNode
-	 *            the contents of the tag that is started but possibly not
-	 *            ended
-	 * @param parentTagName
-	 *            the tag on which you are checkin for an ending tag
-	 * @param imagePath
-	 *            content assist relative image path
-	 * @return ICompletionProposal
-	 */
-	public static ICompletionProposal computeXMLEndTagProposal(ITextViewer viewer, int documentPosition, IndexedRegion indexedNode, String parentTagName, String imagePath) {
-		ICompletionProposal p = null;
-
-		// check if tag is closed
-		boolean hasEndTag = true;
-		IDOMNode xnode = null;
-		String tagName = ""; //$NON-NLS-1$
-		if (indexedNode instanceof IDOMNode) {
-			xnode = ((IDOMNode) indexedNode);
-			// it's ended already...
-			if (xnode.getEndStructuredDocumentRegion() != null) {
-				return null;
-			}
-			IDOMNode styleNode = null;
-			if (!xnode.getNodeName().equalsIgnoreCase(parentTagName)) {
-				styleNode = (IDOMNode) xnode.getParentNode();
-			}
-			if (styleNode != null) {
-				tagName = styleNode.getNodeName();
-				hasEndTag = (styleNode.getEndStructuredDocumentRegion() != null);
-			}
-		}
-
-		// it's closed, don't add close tag proposal
-		if (!hasEndTag) {
-
-			// create appropriate close tag text
-			String proposedText = "</" + tagName; //$NON-NLS-1$
-			String viewerText = viewer.getTextWidget().getText();
-			if ((viewerText.length() >= documentPosition) && (viewerText.length() >= 2) && (documentPosition >= 2)) {
-				String last2chars = viewerText.substring(documentPosition - 2, documentPosition);
-				if (last2chars.endsWith("</")) {
-					proposedText = tagName;
-				}
-				else if (last2chars.endsWith("<")) {
-					proposedText = "/" + tagName; //$NON-NLS-1$
-				}
-			}
-
-			// create proposal
-			p = new CustomCompletionProposal(proposedText + ">", //$NON-NLS-1$
-						documentPosition, 0, proposedText.length() + 1, XMLEditorPluginImageHelper.getInstance().getImage(imagePath), NLS.bind(XMLUIMessages.End_with_, (new Object[]{proposedText})), null, null, XMLRelevanceConstants.R_END_TAG);
-		}
-		return p;
-	}
-
-	private static String getMetaScriptType(Document doc) {
-		// Can not just do a Document.getElementsByTagName(String) as this
-		// needs
-		// to be relatively fast.
-		List metas = new ArrayList();
-		// check for META tags under the Document
-		Node html = null;
-		Node head = null;
-		Node child = null;
-		// ----------------------------------------------------------------------
-		// (pa) 20021217
-		// cmvc defect 235554
-		// performance enhancement: using child.getNextSibling() rather than
-		// nodeList(item) for O(n) vs. O(n*n)
-		// ----------------------------------------------------------------------
-
-		for (child = doc.getFirstChild(); child != null; child = child.getNextSibling()) {
-			if (child.getNodeType() != Node.ELEMENT_NODE) {
-				continue;
-			}
-			if (child.getNodeName().equalsIgnoreCase(META)) {
-				metas.add(child);
-			}
-			else if (child.getNodeName().equalsIgnoreCase(HTML)) {
-				html = child;
-			}
-		}
-		// NodeList children = doc.getChildNodes();
-		// for(int i = 0; i < children.getLength(); i++) {
-		// child = children.item(i);
-		// if(child.getNodeType() != Node.ELEMENT_NODE)
-		// continue;
-		// if(child.getNodeName().equalsIgnoreCase(META))
-		// metas.add(child);
-		// else if(child.getNodeName().equalsIgnoreCase(HTML))
-		// html = child;
-		// }
-
-		// check for META tags under HEAD
-		if (html != null) {
-			for (child = html.getFirstChild(); (child != null) && (head == null); child = child.getNextSibling()) {
-				if (child.getNodeType() != Node.ELEMENT_NODE) {
-					continue;
-				}
-				if (child.getNodeName().equalsIgnoreCase(HEAD)) {
-					head = child;
-				}
-			}
-			// children = html.getChildNodes();
-			// for(int i = 0; i < children.getLength() && head == null; i++) {
-			// child = children.item(i);
-			// if(child.getNodeType() != Node.ELEMENT_NODE)
-			// continue;
-			// if(child.getNodeName().equalsIgnoreCase(HEAD))
-			// head = child;
-			// }
-		}
-
-		if (head != null) {
-			for (head.getFirstChild(); child != null; child = child.getNextSibling()) {
-				if (child.getNodeType() != Node.ELEMENT_NODE) {
-					continue;
-				}
-				if (child.getNodeName().equalsIgnoreCase(META)) {
-					metas.add(child);
-				}
-			}
-			// children = head.getChildNodes();
-			// for(int i = 0 ; i < children.getLength(); i++) {
-			// child = children.item(i);
-			// if(child.getNodeType() != Node.ELEMENT_NODE)
-			// continue;
-			// if(child.getNodeName().equalsIgnoreCase(META))
-			// metas.add(child);
-			// }
-		}
-
-		return getMetaScriptType(metas);
-	}
-
-	private static String getMetaScriptType(List metaNodeList) {
-		Node meta = null;
-		NamedNodeMap attributes = null;
-		boolean httpEquiv = false;
-		String contentScriptType = null;
-
-		for (int i = metaNodeList.size() - 1; i >= 0; i--) {
-			meta = (Node) metaNodeList.get(i);
-			attributes = meta.getAttributes();
-			httpEquiv = false;
-			contentScriptType = null;
-			for (int j = 0; j < attributes.getLength(); j++) {
-				if (attributes.item(j).getNodeName().equalsIgnoreCase(HTTP_EQUIV)) {
-					httpEquiv = attributes.item(j).getNodeValue().equalsIgnoreCase(CONTENT_SCRIPT_TYPE);
-				}
-				else if (attributes.item(j).getNodeName().equalsIgnoreCase(CONTENT)) {
-					contentScriptType = attributes.item(j).getNodeValue();
-				}
-			}
-			if (httpEquiv && (contentScriptType != null)) {
-				return contentScriptType;
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * Returns the scripting language the scriptNode is in Currently returns
-	 * javascript unless some unknown type or language is specified. Then the
-	 * unknown type/language is returned
-	 * 
-	 * @param scriptNode
-	 */
-	public static String getScriptLanguage(Node scriptNode) {
-		Node attr = null;
-
-		boolean specified = false;
-		// try to find a scripting adapter for 'type'
-		if ((scriptNode == null) || (scriptNode.getAttributes() == null)) {
-			return null;
-		}
-
-		attr = scriptNode.getAttributes().getNamedItem("type");//$NON-NLS-1$
-		if (attr != null) {
-			specified = true;
-			String type = attr.getNodeValue();
-			return lookupScriptType(type);
-		}
-		// now try to find a scripting adapter for 'language' (deprecated by
-		// HTML specifications)
-		attr = scriptNode.getAttributes().getNamedItem("language");//$NON-NLS-1$
-		if (attr != null) {
-			specified = true;
-			String language = attr.getNodeValue();
-			return lookupScriptLanguage(language);
-		}
-		// check if one is specified by a META tag at the root level or inside
-		// of HEAD
-		String type = null;
-		if (!specified) {
-			type = getMetaScriptType(scriptNode.getOwnerDocument());
-		}
-		if (type != null) {
-			specified = true;
-			return lookupScriptType(type);
-		}
-		// return default
-		if (!specified) {
-			return ScriptLanguageKeys.JAVASCRIPT;
-		}
-		return null;
-	}
-
-	/**
-	 * Tells you if the flatnode is the %> delimiter
-	 * 
-	 * 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".
-	 */
-	public static boolean isJSPCloseDelimiter(IStructuredDocumentRegion fn) {
-		if (fn == null) {
-			return false;
-		}
-		return isJSPCloseDelimiter(fn.getType());
-	}
-
-	/**
-	 * 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".
-	 */
-	public static boolean isJSPCloseDelimiter(String type) {
-		if (type == null) {
-			return false;
-		}
-		return (type.equals(DOMJSPRegionContextsPrivateCopy.JSP_CLOSE) || type.equals(DOMRegionContext.XML_TAG_CLOSE));
-	}
-
-	/**
-	 * Tells you if the flatnode is the JSP region <%%>, <%=%>, <%!%>
-	 * 
-	 * 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".
-	 */
-	public static boolean isJSPDelimiter(IStructuredDocumentRegion fn) {
-		boolean isDelimiter = false;
-		String type = fn.getType();
-		if (type != null) {
-			isDelimiter = isJSPDelimiter(type);
-		}
-		return isDelimiter;
-	}
-
-	/**
-	 * 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".
-	 */
-	public static boolean isJSPDelimiter(String type) {
-		if (type == null) {
-			return false;
-		}
-		return (isJSPOpenDelimiter(type) || isJSPCloseDelimiter(type));
-	}
-
-	/**
-	 * Tells you if the flatnode is <%, <%=, or <%! 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".
-	 */
-	public static boolean isJSPOpenDelimiter(IStructuredDocumentRegion fn) {
-		if (fn == null) {
-			return false;
-		}
-		return isJSPOpenDelimiter(fn.getType());
-	}
-
-	/**
-	 * 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".
-	 */
-	public static boolean isJSPOpenDelimiter(String type) {
-		if (type == null) {
-			return false;
-		}
-		return (type.equals(DOMJSPRegionContextsPrivateCopy.JSP_SCRIPTLET_OPEN) || type.equals(DOMJSPRegionContextsPrivateCopy.JSP_DECLARATION_OPEN) || type.equals(DOMJSPRegionContextsPrivateCopy.JSP_EXPRESSION_OPEN));
-	}
-
-	/**
-	 * Tells you if the flatnode is the <jsp:scriptlet>, <jsp:expression>, or
-	 * <jsp:declaration>tag
-	 * 
-	 * 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".
-	 */
-	public static boolean isXMLJSPDelimiter(IStructuredDocumentRegion fn) {
-		boolean isDelimiter = false;
-		if ((fn != null) && (fn instanceof ITextRegionContainer)) {
-			Object[] regions = ((ITextRegionContainer) fn).getRegions().toArray();
-			ITextRegion temp = null;
-			String regionText = ""; //$NON-NLS-1$
-			for (int i = 0; i < regions.length; i++) {
-				temp = (ITextRegion) regions[i];
-				if (temp.getType() == DOMRegionContext.XML_TAG_NAME) {
-					regionText = fn.getText(temp);
-					if (regionText.equalsIgnoreCase("jsp:scriptlet") || regionText.equalsIgnoreCase("jsp:expression") || regionText.equalsIgnoreCase("jsp:declaration")) {
-						isDelimiter = true;
-					}
-				}
-			}
-		}
-		return isDelimiter;
-	}
-
-	/**
-	 * Returns "javascript" if language attribute is some form of javascript,
-	 * "java" if language attribute is some form of java. Otherwise, just
-	 * returns type.
-	 * 
-	 * @param language
-	 */
-	public static String lookupScriptLanguage(String language) {
-		for (int i = 0; i < ScriptLanguageKeys.JAVASCRIPT_LANGUAGE_KEYS.length; i++) {
-			if (ScriptLanguageKeys.JAVASCRIPT_LANGUAGE_KEYS[i].equalsIgnoreCase(language)) {
-				return ScriptLanguageKeys.JAVASCRIPT;
-			}
-		}
-		for (int i = 0; i < ScriptLanguageKeys.JAVA_LANGUAGE_KEYS.length; i++) {
-			if (ScriptLanguageKeys.JAVA_LANGUAGE_KEYS[i].equalsIgnoreCase(language)) {
-				return ScriptLanguageKeys.JAVA;
-			}
-		}
-		return language;
-	}
-
-	/**
-	 * Returns "javascript" if type (used in <script type="xxx"> is actually
-	 * javascript type. Otherwise, just returns type
-	 * 
-	 * @param type
-	 */
-	public static String lookupScriptType(String type) {
-		for (int i = 0; i < ScriptLanguageKeys.JAVASCRIPT_MIME_TYPE_KEYS.length; i++) {
-			if (ScriptLanguageKeys.JAVASCRIPT_MIME_TYPE_KEYS[i].equalsIgnoreCase(type)) {
-				return ScriptLanguageKeys.JAVASCRIPT;
-			}
-		}
-		return type;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentModelGenerator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentModelGenerator.java
deleted file mode 100644
index 2896432..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentModelGenerator.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Node;
-
-
-public class XMLContentModelGenerator extends AbstractContentModelGenerator {
-
-	/**
-	 * 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 class DOMJSPRegionContextsPrivateCopy {
-		private static final String JSP_DIRECTIVE_OPEN = "JSP_DIRECTIVE_OPEN"; //$NON-NLS-1$
-	}
-
-	/**
-	 * XMLContentModelGenerator constructor comment.
-	 */
-	public XMLContentModelGenerator() {
-		super();
-	}
-
-	public void generateAttribute(CMAttributeDeclaration attrDecl, StringBuffer buffer) {
-		if ((attrDecl == null) || (buffer == null)) {
-			return;
-		}
-		int usage = attrDecl.getUsage();
-		if (usage == CMAttributeDeclaration.REQUIRED) {
-			buffer.append(" "); //$NON-NLS-1$
-			generateRequiredAttribute(null, attrDecl, buffer); // todo pass
-			// ownerNode as
-			// 1st param
-		}
-		return;
-	}
-
-	protected void generateEndTag(String tagName, Node parentNode, CMElementDeclaration elementDecl, StringBuffer buffer) {
-		if (elementDecl == null) {
-			return;
-		}
-		if (elementDecl.getContentType() != CMElementDeclaration.EMPTY) {
-			buffer.append("</" + tagName + ">");//$NON-NLS-2$//$NON-NLS-1$
-		}
-		return;
-	}
-
-	public void generateRequiredAttribute(Node ownerNode, CMAttributeDeclaration attrDecl, StringBuffer buffer) {
-		if ((attrDecl == null) || (buffer == null)) {
-			return;
-		}
-
-		// attribute name
-		String attributeName = getRequiredName(ownerNode, attrDecl);
-		CMDataType attrType = attrDecl.getAttrType();
-		String defaultValue = null;
-		// = sign
-		buffer.append(attributeName + "="); //$NON-NLS-1$
-		// attribute value
-		if (attrType != null) {
-			// insert any value that is implied
-			if ((attrType.getImpliedValueKind() != CMDataType.IMPLIED_VALUE_NONE) && (attrType.getImpliedValue() != null)) {
-				defaultValue = attrType.getImpliedValue();
-			}
-			// otherwise, if an enumerated list of values exists, use the
-			// first value
-			else if ((attrType.getEnumeratedValues() != null) && (attrType.getEnumeratedValues().length > 0)) {
-				defaultValue = attrType.getEnumeratedValues()[0];
-			}
-		}
-		
-		char attrQuote = '\"';
-		// Found a double quote, wrap the attribute in single quotes
-		if(defaultValue != null && defaultValue.indexOf(attrQuote) >= 0) {
-			attrQuote = '\'';
-		}
-		
-		buffer.append(attrQuote);
-		buffer.append(((defaultValue != null) ? defaultValue : "")); //$NON-NLS-1$
-		buffer.append(attrQuote);
-		return;
-	}
-
-	protected void generateStartTag(String tagName, Node parentNode, CMElementDeclaration elementDecl, StringBuffer buffer) {
-		if ((elementDecl == null) || (buffer == null)) {
-			return;
-		}
-		buffer.append("<" + tagName);//$NON-NLS-1$
-		generateAttributes(elementDecl, buffer);
-		buffer.append(getStartTagClose(parentNode, elementDecl));
-		return;
-	}
-
-	public int getMinimalStartTagLength(Node node, CMElementDeclaration elementDecl) {
-		if (elementDecl == null) {
-			return 0;
-		}
-		if (requiresAttributes(elementDecl)) {
-			return getRequiredName(node, elementDecl).length() + 2; // < +
-			// name +
-			// space
-		}
-		else {
-			return 1 + getRequiredName(node, elementDecl).length() + getStartTagClose(node, elementDecl).length(); // < +
-			// name
-			// +
-			// appropriate
-			// close
-		}
-	}
-
-	protected String getOtherClose(Node notATagNode) {
-		if (notATagNode instanceof IDOMNode) {
-			IStructuredDocumentRegion node = ((IDOMNode) notATagNode).getStartStructuredDocumentRegion();
-			if ((node != null) && (node.getNumberOfRegions() > 1) && node.getRegions().get(0).getType().equals(DOMJSPRegionContextsPrivateCopy.JSP_DIRECTIVE_OPEN)) {
-				return "%>"; //$NON-NLS-1$
-			}
-		}
-		return null;
-	}
-
-	public String getStartTagClose(Node parentNode, CMElementDeclaration elementDecl) {
-		String other = getOtherClose(parentNode);
-		if (other != null) {
-			return other;
-		}
-		if (elementDecl == null) {
-			return ">";//$NON-NLS-1$
-		}
-		if (elementDecl.getContentType() == CMElementDeclaration.EMPTY) {
-			return "/>"; //$NON-NLS-1$
-		}
-		return ">"; //$NON-NLS-1$
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLRelevanceConstants.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLRelevanceConstants.java
deleted file mode 100644
index 4a99070..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLRelevanceConstants.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceConstants;
-
-
-
-/**
- * some relevance constants for content assist higher relevance means it shows
- * up higher on the list
- */
-public interface XMLRelevanceConstants extends IRelevanceConstants {
-
-	int R_CDATA = 400;
-	int R_CLOSE_TAG = 1500;
-
-	int R_COMMENT = 100;
-
-	// moved this above macros
-	int R_DOCTYPE = 600;
-	int R_END_TAG = 1400;
-	int R_END_TAG_NAME = 1100;
-	int R_ENTITY = 1000;
-	int R_JSP = 500;
-
-	int R_JSP_ATTRIBUTE_VALUE = 700;
-
-	// (pa) make these the same relevance so proposals are same order for V501
-	int R_MACRO = 500;
-
-	// add this onto "required" attrs, elements, etc to bubble them up on
-	// sorting...
-	// CMVC 246618
-	int R_REQUIRED = 10;
-	int R_TAG_INSERTION = 500;
-	int R_STRICTLY_VALID_TAG_INSERTION = 600;
-	int R_TAG_NAME = 1200;
-	int R_XML_ATTRIBUTE_NAME = 900;
-	int R_XML_ATTRIBUTE_VALUE = 800;
-	int R_XML_DECLARATION = 1300;
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java
deleted file mode 100644
index 29f9ad2..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.jface.text.templates.TemplateException;
-import org.eclipse.jface.text.templates.TemplateProposal;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-
-
-/**
- * Completion processor for XML Templates. Most of the work is already done by
- * the XML Content Assist processor, so by the time the
- * XMLTemplateCompletionProcessor is asked for content assist proposals, the
- * XML content assist processor has already set the context type for
- * templates.
- */
-class XMLTemplateCompletionProcessor extends TemplateCompletionProcessor {
-	private static final class ProposalComparator implements Comparator {
-		public int compare(Object o1, Object o2) {
-			return ((TemplateProposal) o2).getRelevance() - ((TemplateProposal) o1).getRelevance();
-		}
-	}
-
-	private static final Comparator fgProposalComparator = new ProposalComparator();
-	private String fContextTypeId = null;
-
-	/*
-	 * Copied from super class except instead of calling createContext(viewer,
-	 * region) call createContext(viewer, region, offset) instead
-	 */
-	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
-
-		ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection();
-
-		// adjust offset to end of normalized selection
-		if (selection.getOffset() == offset) {
-			offset = selection.getOffset() + selection.getLength();
-		}
-
-		String prefix = extractPrefix(viewer, offset);
-		Region region = new Region(offset - prefix.length(), prefix.length());
-		TemplateContext context = createContext(viewer, region, offset);
-		if (context == null) {
-			return new ICompletionProposal[0];
-		}
-
-		// name of the selection variables {line, word}_selection
-		context.setVariable("selection", selection.getText()); //$NON-NLS-1$
-
-		Template[] templates = getTemplates(context.getContextType().getId());
-
-		List matches = new ArrayList();
-		for (int i = 0; i < templates.length; i++) {
-			Template template = templates[i];
-			try {
-				context.getContextType().validate(template.getPattern());
-			}
-			catch (TemplateException e) {
-				continue;
-			}
-			if (template.matches(prefix, context.getContextType().getId())) {
-				matches.add(createProposal(template, context, (IRegion) region, getRelevance(template, prefix)));
-			}
-		}
-
-		Collections.sort(matches, fgProposalComparator);
-
-		return (ICompletionProposal[]) matches.toArray(new ICompletionProposal[matches.size()]);
-	}
-
-	/**
-	 * Creates a concrete template context for the given region in the
-	 * document. This involves finding out which context type is valid at the
-	 * given location, and then creating a context of this type. The default
-	 * implementation returns a <code>SmartReplaceTemplateContext</code> for
-	 * the context type at the given location. This takes the offset at which
-	 * content assist was invoked into consideration.
-	 * 
-	 * @param viewer
-	 *            the viewer for which the context is created
-	 * @param region
-	 *            the region into <code>document</code> for which the
-	 *            context is created
-	 * @param offset
-	 *            the original offset where content assist was invoked
-	 * @return a template context that can handle template insertion at the
-	 *         given location, or <code>null</code>
-	 */
-	private TemplateContext createContext(ITextViewer viewer, IRegion region, int offset) {
-		// pretty much same code as super.createContext except create
-		// SmartReplaceTemplateContext
-		TemplateContextType contextType = getContextType(viewer, region);
-		if (contextType != null) {
-			IDocument document = viewer.getDocument();
-			return new ReplaceNameTemplateContext(contextType, document, region.getOffset(), region.getLength(), offset);
-		}
-		return null;
-	}
-
-	protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) {
-		return new CustomTemplateProposal(template, context, region, getImage(template), relevance);
-	}
-
-	protected TemplateContextType getContextType(ITextViewer viewer, IRegion region) {
-		TemplateContextType type = null;
-
-		ContextTypeRegistry registry = getTemplateContextRegistry();
-		if (registry != null) {
-			type = registry.getContextType(fContextTypeId);
-		}
-
-		return type;
-	}
-
-	protected Image getImage(Template template) {
-		// just return the same image for now
-		return XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_MACRO);
-	}
-
-	private ContextTypeRegistry getTemplateContextRegistry() {
-		return XMLUIPlugin.getDefault().getTemplateContextRegistry();
-	}
-
-	protected Template[] getTemplates(String contextTypeId) {
-		Template templates[] = null;
-
-		TemplateStore store = getTemplateStore();
-		if (store != null) {
-			templates = store.getTemplates(contextTypeId);
-		}
-
-		return templates;
-	}
-
-	private TemplateStore getTemplateStore() {
-		return XMLUIPlugin.getDefault().getTemplateStore();
-	}
-
-	void setContextType(String contextTypeId) {
-		fContextTypeId = contextTypeId;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapter.java
deleted file mode 100644
index 321c447..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapter.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentoutline;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.xml.ui.internal.editor.CMImageUtil;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.w3c.dom.Node;
-
-/**
- * Adapts a DOM node to a JFace viewer.
- */
-public class JFaceNodeAdapter implements IJFaceNodeAdapter {
-
-	final static Class ADAPTER_KEY = IJFaceNodeAdapter.class;
-
-	/**
-	 * debug .option
-	 */
-	private static final boolean DEBUG = getDebugValue();
-
-	private static boolean getDebugValue() {
-		String value = Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/outline"); //$NON-NLS-1$
-		boolean result = (value != null) && value.equalsIgnoreCase("true"); //$NON-NLS-1$
-		return result;
-	}
-
-	JFaceNodeAdapterFactory fAdapterFactory;
-	private RefreshStructureJob fRefreshJob = null;
-
-	public JFaceNodeAdapter(JFaceNodeAdapterFactory adapterFactory) {
-		super();
-		this.fAdapterFactory = adapterFactory;
-	}
-
-	protected Image createImage(Object object) {
-		Image image = null;
-		Node node = (Node) object;
-		switch (node.getNodeType()) {
-			case Node.ELEMENT_NODE : {
-				image = createXMLImageDescriptor(XMLEditorPluginImages.IMG_OBJ_ELEMENT);
-				break;
-			}
-			case Node.ATTRIBUTE_NODE : {
-				image = createXMLImageDescriptor(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
-				break;
-			}
-			case Node.TEXT_NODE : { // actually, TEXT should never be seen in
-				// the tree
-				image = createXMLImageDescriptor(XMLEditorPluginImages.IMG_OBJ_TXTEXT);
-				break;
-			}
-			case Node.CDATA_SECTION_NODE : {
-				image = createXMLImageDescriptor(XMLEditorPluginImages.IMG_OBJ_CDATASECTION);
-				break;
-			}
-			case Node.ENTITY_REFERENCE_NODE :
-			case Node.ENTITY_NODE : {
-				image = createXMLImageDescriptor(XMLEditorPluginImages.IMG_OBJ_ENTITY);
-				break;
-			}
-			case Node.PROCESSING_INSTRUCTION_NODE : {
-				image = createXMLImageDescriptor(XMLEditorPluginImages.IMG_OBJ_PROCESSINGINSTRUCTION);
-				break;
-			}
-			case Node.COMMENT_NODE : {
-				image = createXMLImageDescriptor(XMLEditorPluginImages.IMG_OBJ_COMMENT);
-				break;
-			}
-			case Node.DOCUMENT_TYPE_NODE : {
-				image = createXMLImageDescriptor(XMLEditorPluginImages.IMG_OBJ_DOCTYPE);
-				break;
-			}
-			case Node.NOTATION_NODE : {
-				image = createXMLImageDescriptor(XMLEditorPluginImages.IMG_OBJ_NOTATION);
-				break;
-			}
-			default : {
-				image = createXMLImageDescriptor(XMLEditorPluginImages.IMG_OBJ_ELEMENT);
-				break;
-			}
-		}
-		return image;
-	}
-
-	protected Image createXMLImageDescriptor(String imageResourceName) {
-		return XMLEditorPluginImageHelper.getInstance().getImage(imageResourceName);
-	}
-
-	public Object[] getChildren(Object object) {
-
-		// (pa) 20021217
-		// cmvc defect 235554
-		// performance enhancement: using child.getNextSibling() rather than
-		// nodeList(item) for O(n) vs. O(n*n)
-		//
-		ArrayList v = new ArrayList();
-		if (object instanceof Node) {
-			Node node = (Node) object;
-			for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) {
-				Node n = child;
-				if (n.getNodeType() != Node.TEXT_NODE) {
-					v.add(n);
-				}
-			}
-		}
-		return v.toArray();
-	}
-
-	/**
-	 * Returns an enumeration with the elements belonging to the passed
-	 * element. These are the top level items in a list, tree, table, etc...
-	 */
-	public Object[] getElements(Object node) {
-		return getChildren(node);
-	}
-
-	/**
-	 * Fetches the label image specific to this object instance.
-	 */
-	public Image getLabelImage(Object node) {
-		Image image = null;
-		if (node instanceof Node) {
-			image = CMImageUtil.getImage(CMImageUtil.getDeclaration((Node) node));
-			if ((image == null) && (JFaceResources.getImageRegistry() != null)) {
-				ImageRegistry imageRegistry = JFaceResources.getImageRegistry();
-				String nodeName = getNodeName(node);
-				image = imageRegistry.get(nodeName);
-				if (image == null) {
-					image = createImage(node);
-					if (image != null) {
-						imageRegistry.put(nodeName, image);
-					}
-				}
-			}
-		}
-		return image;
-	}
-
-	/**
-	 * Fetches the label text specific to this object instance.
-	 */
-	public String getLabelText(Object node) {
-		return getNodeName(node);
-	}
-
-	private String getNodeName(Object object) {
-		StringBuffer nodeName = new StringBuffer();
-		if (object instanceof Node) {
-			Node node = (Node) object;
-			nodeName.append(node.getNodeName());
-
-			if (node.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
-				nodeName.insert(0, "DOCTYPE:"); //$NON-NLS-1$
-			}
-
-		}
-		return nodeName.toString();
-	}
-
-
-	public Object getParent(Object object) {
-		if (object instanceof Node) {
-			Node node = (Node) object;
-			return node.getParentNode();
-		}
-		return null;
-	}
-
-	private synchronized RefreshStructureJob getRefreshJob() {
-		if (fRefreshJob == null) {
-			fRefreshJob = new RefreshStructureJob();
-		}
-		return fRefreshJob;
-	}
-
-
-	public boolean hasChildren(Object object) {
-		// (pa) 20021217
-		// cmvc defect 235554 > use child.getNextSibling() instead of
-		// nodeList(item) for O(n) vs. O(n*n)
-		Node node = (Node) object;
-		for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) {
-			if (child.getNodeType() != Node.TEXT_NODE) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Allowing the INodeAdapter to compare itself against the type allows it
-	 * to return true in more than one case.
-	 */
-	public boolean isAdapterForType(Object type) {
-		if (type == null) {
-			return false;
-		}
-		return type.equals(ADAPTER_KEY);
-	}
-
-	/**
-	 * Called by the object being adapter (the notifier) when something has
-	 * changed.
-	 */
-	public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
-		// future_TODO: the 'uijobs' used in this method were added to solve
-		// threading problems when the dom
-		// is updated in the background while the editor is open. They may be
-		// a bit overkill and not that useful.
-		// (That is, may be be worthy of job manager management). If they are
-		// found to be important enough to leave in,
-		// there's probably some optimization that can be done.
-		if (notifier instanceof Node) {
-			Collection listeners = fAdapterFactory.getListeners();
-			Iterator iterator = listeners.iterator();
-
-			while (iterator.hasNext()) {
-				Object listener = iterator.next();
-				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=90637
-				// if (notifier instanceof Node && (listener instanceof
-				// StructuredViewer) && (eventType ==
-				// INodeNotifier.STRUCTURE_CHANGED || (eventType ==
-				// INodeNotifier.CHANGE && changedFeature == null))) {
-				if ((listener instanceof StructuredViewer) && ((eventType == INodeNotifier.STRUCTURE_CHANGED) || (eventType == INodeNotifier.CONTENT_CHANGED) || (eventType == INodeNotifier.CHANGE))) {
-					if (DEBUG) {
-						System.out.println("JFaceNodeAdapter notified on event type > " + eventType); //$NON-NLS-1$
-					}
-
-					// refresh on structural and "unknown" changes
-					StructuredViewer structuredViewer = (StructuredViewer) listener;
-					// https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=5230
-					if (structuredViewer.getControl() != null) {
-						getRefreshJob().refresh(structuredViewer, (Node) notifier);
-					}
-				}
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapterFactory.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapterFactory.java
deleted file mode 100644
index 7977ca5..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapterFactory.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentoutline;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.progress.UIJob;
-import org.eclipse.wst.sse.core.internal.provisional.AbstractAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapterFactory;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManagerListener;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-
-/**
- * An adapter factory to create JFaceNodeAdapters. Use this adapter factory
- * with a JFaceAdapterContentProvider to display DOM nodes in a tree.
- */
-public class JFaceNodeAdapterFactory extends AbstractAdapterFactory implements IJFaceNodeAdapterFactory {
-	public class CMDocumentManagerListenerImpl implements CMDocumentManagerListener {
-		private static final int UPDATE_DELAY = 200;
-
-		public void cacheCleared(CMDocumentCache cache) {
-			// nothing to do
-		}
-
-		public void cacheUpdated(CMDocumentCache cache, final String uri, int oldStatus, int newStatus, CMDocument cmDocument) {
-			if ((newStatus == CMDocumentCache.STATUS_LOADED) || (newStatus == CMDocumentCache.STATUS_ERROR)) {
-				refreshViewers();
-			}
-		}
-
-		public void propertyChanged(CMDocumentManager cmDocumentManager, String propertyName) {
-			if (cmDocumentManager.getPropertyEnabled(CMDocumentManager.PROPERTY_AUTO_LOAD)) {
-				refreshViewers();
-			}
-		}
-
-		private void refreshViewers() {
-			Object[] listeners = getListeners().toArray();
-			for (int i = 0; i < listeners.length; i++) {
-				if (listeners[i] instanceof StructuredViewer) {
-					final StructuredViewer viewer = (StructuredViewer) listeners[i];
-					Job refresh = new UIJob(XMLUIMessages.refreshoutline_0) {
-						public IStatus runInUIThread(IProgressMonitor monitor) {
-							Control refreshControl = viewer.getControl();
-							if ((refreshControl != null) && !refreshControl.isDisposed()) {
-								viewer.refresh(true);
-							}
-							return Status.OK_STATUS;
-						}
-					};
-					refresh.setSystem(true);
-					refresh.setPriority(Job.SHORT);
-					refresh.schedule(UPDATE_DELAY);
-				}
-				else if (listeners[i] instanceof Viewer) {
-					final Viewer viewer = (Viewer) listeners[i];
-					Job refresh = new UIJob(XMLUIMessages.refreshoutline_0) {
-						public IStatus runInUIThread(IProgressMonitor monitor) {
-							Control refreshControl = viewer.getControl();
-							if ((refreshControl != null) && !refreshControl.isDisposed()) {
-								viewer.refresh();
-							}
-							return Status.OK_STATUS;
-						}
-					};
-					refresh.setSystem(true);
-					refresh.setPriority(Job.SHORT);
-					refresh.schedule(UPDATE_DELAY);
-				}
-			}
-		}
-	}
-
-	private CMDocumentManager cmDocumentManager;
-	private CMDocumentManagerListenerImpl fCMDocumentManagerListener = null;
-	/**
-	 * This keeps track of all the listeners.
-	 */
-	private Set fListeners = new HashSet();
-
-	protected INodeAdapter singletonAdapter;
-
-	public JFaceNodeAdapterFactory() {
-		this(IJFaceNodeAdapter.class, true);
-	}
-
-	public JFaceNodeAdapterFactory(Object adapterKey, boolean registerAdapters) {
-		super(adapterKey, registerAdapters);
-	}
-
-	public synchronized void addListener(Object listener) {
-		fListeners.add(listener);
-	}
-
-	public INodeAdapterFactory copy() {
-		return new JFaceNodeAdapterFactory(getAdapterKey(), isShouldRegisterAdapter());
-	}
-
-	/**
-	 * Create a new JFace adapter for the DOM node passed in
-	 */
-	protected INodeAdapter createAdapter(INodeNotifier node) {
-		if (singletonAdapter == null) {
-			// create the JFaceNodeAdapter
-			singletonAdapter = new JFaceNodeAdapter(this);
-			initAdapter(singletonAdapter, node);
-		}
-		return singletonAdapter;
-	}
-
-
-	/**
-	 * returns "copy" so no one can modify our list. It is a shallow copy.
-	 */
-	public synchronized Collection getListeners() {
-		return new ArrayList(fListeners);
-	}
-
-	protected void initAdapter(INodeAdapter adapter, INodeNotifier node) {
-		// register for CMDocumentManager events
-		ModelQueryAdapter mqadapter = (ModelQueryAdapter) node.getAdapterFor(ModelQueryAdapter.class);
-		if (mqadapter != null) {
-			ModelQuery mquery = mqadapter.getModelQuery();
-			if ((mquery != null) && (mquery.getCMDocumentManager() != null)) {
-				cmDocumentManager = mquery.getCMDocumentManager();
-				fCMDocumentManagerListener = new CMDocumentManagerListenerImpl();
-				cmDocumentManager.addListener(fCMDocumentManagerListener);
-			}
-		}
-	}
-
-	public void release() {
-		// deregister from CMDocumentManager events
-		if ((cmDocumentManager != null) && (fCMDocumentManagerListener != null)) {
-			cmDocumentManager.removeListener(fCMDocumentManagerListener);
-		}
-		fListeners.clear();
-	}
-
-	public synchronized void removeListener(Object listener) {
-		fListeners.remove(listener);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeContentProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeContentProvider.java
deleted file mode 100644
index f3c5452..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeContentProvider.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentoutline;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapterFactory;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-
-/**
- * An ITreeContentProvider for a TreeViewers used to display DOM nodes. This
- * content provider takes an adapter factory to create JFace adapters for the
- * nodes in the tree.
- */
-public class JFaceNodeContentProvider implements ITreeContentProvider {
-
-	public JFaceNodeContentProvider() {
-		super();
-	}
-
-	/**
-	 * The visual part that is using this content provider is about to be
-	 * disposed. Deallocate all allocated SWT resources.
-	 */
-	public void dispose() {
-	}
-
-	/**
-	 * Returns the JFace adapter for the specified object.
-	 * 
-	 * @param adaptable
-	 *            java.lang.Object The object to get the adapter for
-	 */
-	protected IJFaceNodeAdapter getAdapter(Object adaptable) {
-		if (adaptable instanceof INodeNotifier) {
-			INodeAdapter adapter = ((INodeNotifier) adaptable).getAdapterFor(IJFaceNodeAdapter.class);
-			if (adapter instanceof IJFaceNodeAdapter) {
-				return (IJFaceNodeAdapter) adapter;
-			}
-		}
-		return null;
-	}
-
-	public Object[] getChildren(Object object) {
-		IJFaceNodeAdapter adapter = getAdapter(object);
-
-		if (adapter != null) {
-			return adapter.getChildren(object);
-		}
-
-		return new Object[0];
-	}
-
-	public Object[] getElements(Object object) {
-		// The root is usually an instance of an XMLStructuredModel in
-		// which case we want to extract the document.
-		Object topNode = object;
-		if (object instanceof IDOMModel) {
-			topNode = ((IDOMModel) object).getDocument();
-		}
-
-		IJFaceNodeAdapter adapter = getAdapter(topNode);
-
-		if (adapter != null) {
-			return adapter.getElements(topNode);
-		}
-
-		return new Object[0];
-	}
-
-	public Object getParent(Object object) {
-		IJFaceNodeAdapter adapter = getAdapter(object);
-
-		if (adapter != null) {
-			return adapter.getParent(object);
-		}
-
-		return null;
-	}
-
-	public boolean hasChildren(Object object) {
-		IJFaceNodeAdapter adapter = getAdapter(object);
-
-		if (adapter != null) {
-			return adapter.hasChildren(object);
-		}
-
-		return false;
-	}
-
-	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-		if ((oldInput != null) && (oldInput instanceof IStructuredModel)) {
-			IJFaceNodeAdapterFactory factory = (IJFaceNodeAdapterFactory) ((IStructuredModel) oldInput).getFactoryRegistry().getFactoryFor(IJFaceNodeAdapter.class);
-			if (factory != null) {
-				factory.removeListener(viewer);
-			}
-		}
-		if ((newInput != null) && (newInput instanceof IStructuredModel)) {
-			IJFaceNodeAdapterFactory factory = (IJFaceNodeAdapterFactory) ((IStructuredModel) newInput).getFactoryRegistry().getFactoryFor(IJFaceNodeAdapter.class);
-			if (factory != null) {
-				factory.addListener(viewer);
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeLabelProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeLabelProvider.java
deleted file mode 100644
index 8e3b504..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeLabelProvider.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentoutline;
-
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-
-/**
- * A label provider backed by JFaceNodeAdapters.
- */
-public class JFaceNodeLabelProvider extends LabelProvider {
-	/**
-	 * JFaceNodeLabelProvider constructor comment.
-	 */
-	public JFaceNodeLabelProvider() {
-		super();
-	}
-
-	/**
-	 * Returns the JFace adapter for the specified object.
-	 * 
-	 * @param adaptable
-	 *            java.lang.Object The object to get the adapter for
-	 */
-	protected IJFaceNodeAdapter getAdapter(Object adaptable) {
-		if (adaptable instanceof INodeNotifier) {
-			INodeAdapter adapter = ((INodeNotifier) adaptable).getAdapterFor(IJFaceNodeAdapter.class);
-			if (adapter instanceof IJFaceNodeAdapter) {
-				return (IJFaceNodeAdapter) adapter;
-			}
-		}
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
-	 */
-	public Image getImage(Object element) {
-		IJFaceNodeAdapter adapter = getAdapter(element);
-		if (adapter != null)
-			return adapter.getLabelImage(element);
-		return super.getImage(element);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
-	 */
-	public String getText(Object element) {
-		IJFaceNodeAdapter adapter = getAdapter(element);
-		if (adapter != null)
-			return adapter.getLabelText(element);
-		return super.getText(element);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
-	 *      java.lang.String)
-	 */
-	public boolean isLabelProperty(Object element, String property) {
-		return false;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/RefreshStructureJob.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/RefreshStructureJob.java
deleted file mode 100644
index 6960dbd..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/RefreshStructureJob.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentoutline;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- * This job holds a queue of updates (affected nodes) for multiple structured
- * viewers. When a new request comes in, the current run is cancelled, the new
- * request is added to the queue, then the job is re-scheduled. Support for
- * multiple structured viewers is required because refresh updates are usually
- * triggered by model changes, and the model may be visible in more than one
- * viewer.
- * 
- * @author pavery
- */
-class RefreshStructureJob extends Job {
-
-	/** debug flag */
-	static final boolean DEBUG;
-	private static final long UPDATE_DELAY = 250;
-	static {
-		String value = Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/refreshStructure"); //$NON-NLS-1$
-		DEBUG = (value != null) && value.equalsIgnoreCase("true"); //$NON-NLS-1$
-	}
-	/** List of refresh requests (Nodes) */
-	private final List fRequests;
-	/** the structured viewers */
-	List fViewers = new ArrayList(3);
-
-	public RefreshStructureJob() {
-		super(XMLUIMessages.refreshoutline_0);
-		setPriority(Job.LONG);
-		setSystem(true);
-		fRequests = new ArrayList(2);
-	}
-
-	private synchronized void addRequest(Node newNodeRequest) {
-		/*
-		 * note: the caller must NOT pass in null node request (which, since
-		 * private method, we do not need to gaurd against here, as long as we
-		 * gaurd against it in calling method.
-		 */
-		int size = fRequests.size();
-		for (int i = 0; i < size; i++) {
-			Node existingNodeRequest = (Node) fRequests.get(i);
-			/*
-			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=157427 If we
-			 * already have a request which equals the new request, discard
-			 * the new request
-			 */
-			if (existingNodeRequest.equals(newNodeRequest)) {
-				return;
-			}
-			/*
-			 * If we already have a request which contains the new request,
-			 * discard the new request
-			 */
-			if (contains(existingNodeRequest, newNodeRequest)) {
-				return;
-			}
-			/*
-			 * If new request contains any existing requests, replace it with
-			 * new request. ISSUE: technically, we should replace ALL
-			 * contained, existing requests (such as if many siblings already
-			 * que'd up when their common parent is then requested, but, I'm
-			 * not sure if that occurs much, in practice, or if there's an
-			 * algorithm to quickly find them all. Actually, I guess we could
-			 * just go through the _rest_ of the list (i+1 to size) and remove
-			 * any that are contained by new request ... in future :) .
-			 */
-			if (contains(newNodeRequest, existingNodeRequest)) {
-				fRequests.set(i, newNodeRequest);
-				return;
-			}
-		}
-		/*
-		 * If we get to here, either from existing request list being zero
-		 * length, or no exisitng requests "matched" new request, then add the
-		 * new request.
-		 */
-		fRequests.add(newNodeRequest);
-	}
-
-	private synchronized void addViewer(StructuredViewer viewer) {
-		if (!fViewers.contains(viewer)) {
-			fViewers.add(viewer);
-		}
-	}
-
-	/**
-	 * Simple hierarchical containment relationship. Note, this method returns
-	 * "false" if the two nodes are equal!
-	 * 
-	 * @param root
-	 * @param possible
-	 * @return if the root is parent of possible, return true, otherwise
-	 *         return false
-	 */
-	private boolean contains(Node root, Node possible) {
-		if (DEBUG) {
-			System.out.println("=============================================================================================================="); //$NON-NLS-1$
-			System.out.println("recursive call w/ root: " + root.getNodeName() + " and possible: " + possible); //$NON-NLS-1$ //$NON-NLS-2$
-			System.out.println("--------------------------------------------------------------------------------------------------------------"); //$NON-NLS-1$
-		}
-
-		// the following checks are important
-		// #document node will break the algorithm otherwise
-
-		// can't contain the child if it's null
-		if (root == null) {
-			if (DEBUG) {
-				System.out.println("returning false: root is null"); //$NON-NLS-1$
-			}
-			return false;
-		}
-		// nothing can be parent of Document node
-		if (possible instanceof Document) {
-			if (DEBUG) {
-				System.out.println("returning false: possible is Document node"); //$NON-NLS-1$
-			}
-			return false;
-		}
-		// document contains everything
-		if (root instanceof Document) {
-			if (DEBUG) {
-				System.out.println("returning true: root is Document node"); //$NON-NLS-1$
-			}
-			return true;
-		}
-
-		// check parentage
-		Node current = possible;
-		// loop parents
-		while ((current != null) && (current.getNodeType() != Node.DOCUMENT_NODE)) {
-			// found it
-			if (root.equals(current)) {
-				if (DEBUG) {
-					System.out.println("   !!! found: " + possible.getNodeName() + " in subelement of: " + root.getNodeName()); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-				return true;
-			}
-			current = current.getParentNode();
-		}
-		// never found it
-		return false;
-	}
-
-	/**
-	 * Refresh must be on UI thread because it's on a SWT widget.
-	 * 
-	 * @param node
-	 */
-	private void doRefresh(final Node node, final StructuredViewer[] viewers) {
-		final Display display = PlatformUI.getWorkbench().getDisplay();
-		display.asyncExec(new Runnable() {
-			public void run() {
-				if (DEBUG) {
-					System.out.println("refresh on: [" + node.getNodeName() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-
-				for (int i = 0; i < viewers.length; i++) {
-					if (!viewers[i].getControl().isDisposed()) {
-						if (node.getNodeType() == Node.DOCUMENT_NODE) {
-							viewers[i].refresh(true);
-						}
-						else {
-							viewers[i].refresh(node, true);
-						}
-					}
-					else {
-						if (DEBUG) {
-							System.out.println("   !!! skipped refreshing disposed viewer: " + viewers[i]); //$NON-NLS-1$
-						}
-					}
-				}
-			}
-		});
-	}
-
-	/**
-	 * This method also synchronized because it accesses the fRequests queue
-	 * and fViewers list
-	 * 
-	 * @return an array containing and array of the currently requested Nodes
-	 *         to refresh and the viewers in which to refresh them
-	 */
-	private synchronized Object[] getRequests() {
-		Node[] toRefresh = (Node[]) fRequests.toArray(new Node[fRequests.size()]);
-		fRequests.clear();
-
-		StructuredViewer[] viewers = (StructuredViewer[]) fViewers.toArray(new StructuredViewer[fViewers.size()]);
-		fViewers.clear();
-
-		return new Object[]{toRefresh, viewers};
-	}
-
-	/**
-	 * Invoke a refresh on the viewer on the given node.
-	 * 
-	 * @param node
-	 */
-	public void refresh(StructuredViewer viewer, Node node) {
-		if (node == null) {
-			return;
-		}
-
-		addViewer(viewer);
-		addRequest(node);
-		schedule(UPDATE_DELAY);
-	}
-
-	protected IStatus run(IProgressMonitor monitor) {
-		IStatus status = Status.OK_STATUS;
-		try {
-			// Retrieve BOTH viewers and Nodes on one block
-			Object[] requests = getRequests();
-			Node[] nodes = (Node[]) requests[0];
-			StructuredViewer[] viewers = (StructuredViewer[]) requests[1];
-
-			for (int i = 0; i < nodes.length; i++) {
-				if (monitor.isCanceled()) {
-					throw new OperationCanceledException();
-				}
-				doRefresh(nodes[i], viewers);
-			}
-		}
-		finally {
-			monitor.done();
-		}
-		return status;
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/XMLNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/XMLNodeActionManager.java
deleted file mode 100644
index f858071..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/XMLNodeActionManager.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.contentoutline;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.format.FormatProcessorXML;
-import org.eclipse.wst.xml.ui.internal.actions.AbstractNodeActionManager;
-import org.w3c.dom.Node;
-
-
-public class XMLNodeActionManager extends AbstractNodeActionManager {
-	public XMLNodeActionManager(IStructuredModel model, Viewer viewer) {
-		super(model, ModelQueryUtil.getModelQuery(model), viewer);
-	}
-
-	public void reformat(Node newElement, boolean deep) {
-		try {
-			// tell the model that we are about to make a big model change
-			fModel.aboutToChangeModel();
-
-			// format selected node
-			IStructuredFormatProcessor formatProcessor = new FormatProcessorXML();
-			formatProcessor.formatNode(newElement);
-		}
-		finally {
-			// tell the model that we are done with the big model change
-			fModel.changedModel();
-		}
-	}
-
-	public void setModel(IStructuredModel newModel) {
-		fModel = newModel;
-		setModelQuery(ModelQueryUtil.getModelQuery(newModel));
-	}
-
-	protected void setModelQuery(ModelQuery newModelQuery) {
-		modelQuery = newModelQuery;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/CorrectionAssistantProviderXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/CorrectionAssistantProviderXML.java
deleted file mode 100644
index 2c11048..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/CorrectionAssistantProviderXML.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.correction;
-
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.wst.sse.ui.internal.correction.CorrectionAssistantProvider;
-import org.eclipse.wst.xml.core.text.IXMLPartitions;
-
-/**
- * Correction assistant for XML
- * 
- * @deprecated since 2.0 RC0 Use
- *             org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
- */
-public class CorrectionAssistantProviderXML extends CorrectionAssistantProvider {
-
-	public IContentAssistant getCorrectionAssistant(ISourceViewer sourceViewer) {
-		IContentAssistant ca = null;
-
-		if (sourceViewer != null) {
-			ContentAssistant assistant = new ContentAssistant();
-
-			if (sourceViewer != null) {
-				IContentAssistProcessor correctionProcessor = new CorrectionProcessorXML(sourceViewer);
-				assistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.XML_DEFAULT);
-				assistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.XML_CDATA);
-				assistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.XML_COMMENT);
-				assistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.XML_DECLARATION);
-				assistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.XML_PI);
-				assistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.DTD_SUBSET);
-			}
-			ca = assistant;
-		}
-
-		return ca;
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/CorrectionProcessorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/CorrectionProcessorXML.java
deleted file mode 100644
index 97e73e7..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/CorrectionProcessorXML.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.correction;
-
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.wst.sse.ui.internal.correction.IQuickAssistProcessor;
-import org.eclipse.wst.sse.ui.internal.correction.IQuickFixProcessor;
-import org.eclipse.wst.sse.ui.internal.correction.StructuredCorrectionProcessor;
-
-/**
- * @deprecated since 2.0 RC0 Use
- *             org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
- */
-public class CorrectionProcessorXML extends StructuredCorrectionProcessor {
-	protected IQuickAssistProcessor fQuickAssistProcessor;
-	protected IQuickFixProcessor fQuickFixProcessor;
-
-	public CorrectionProcessorXML(ISourceViewer sourceViewer) {
-		super(sourceViewer);
-	}
-
-	protected IQuickAssistProcessor getQuickAssistProcessor() {
-		if (fQuickAssistProcessor == null) {
-			fQuickAssistProcessor = new QuickAssistProcessorXML();
-		}
-
-		return fQuickAssistProcessor;
-	}
-
-	protected IQuickFixProcessor getQuickFixProcessor() {
-		if (fQuickFixProcessor == null) {
-			fQuickFixProcessor = new QuickFixProcessorXML();
-		}
-
-		return fQuickFixProcessor;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
deleted file mode 100644
index 74947ed..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.correction;
-
-import java.util.List;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposalExtension2;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.text.edits.InsertEdit;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-
-public class InsertRequiredAttrsQuickAssistProposal implements ICompletionProposal, ICompletionProposalExtension2 {
-	private final List fRequiredAttrs;
-
-	/**
-	 * @param requiredAttrs
-	 */
-	public InsertRequiredAttrsQuickAssistProposal(List requiredAttrs) {
-		fRequiredAttrs = requiredAttrs;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)
-	 */
-	public void apply(IDocument document) {
-		// not implemented?
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#apply(org.eclipse.jface.text.ITextViewer,
-	 *      char, int, int)
-	 */
-	public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
-		IDOMNode node = (IDOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
-		IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
-		int index = startStructuredDocumentRegion.getEndOffset();
-		ITextRegion lastRegion = startStructuredDocumentRegion.getLastRegion();
-		if (lastRegion.getType() == DOMRegionContext.XML_TAG_CLOSE) {
-			index--;
-			lastRegion = startStructuredDocumentRegion.getRegionAtCharacterOffset(index - 1);
-		}
-		else if (lastRegion.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE) {
-			index = index - 2;
-			lastRegion = startStructuredDocumentRegion.getRegionAtCharacterOffset(index - 1);
-		}
-		MultiTextEdit multiTextEdit = new MultiTextEdit();
-		try {
-			for (int i = 0; i < fRequiredAttrs.size(); i++) {
-				CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) fRequiredAttrs.get(i);
-				String requiredAttributeName = attrDecl.getAttrName();
-				String defaultValue = attrDecl.getDefaultValue();
-				if (defaultValue == null) {
-					defaultValue = ""; //$NON-NLS-1$
-				}
-				String nameAndDefaultValue = " "; //$NON-NLS-1$
-				if ((i == 0) && (lastRegion.getLength() > lastRegion.getTextLength())) {
-					nameAndDefaultValue = ""; //$NON-NLS-1$
-				}
-				nameAndDefaultValue += requiredAttributeName + "=\"" + defaultValue + "\""; //$NON-NLS-1$//$NON-NLS-2$
-				multiTextEdit.addChild(new InsertEdit(index, nameAndDefaultValue));
-				// BUG3381: MultiTextEdit applies all child TextEdit's basing
-				// on offsets
-				// in the document before the first TextEdit, not after each
-				// child TextEdit. Therefore, do not need to advance the
-				// index.
-				// index += nameAndDefaultValue.length();
-			}
-			multiTextEdit.apply(viewer.getDocument());
-		}
-		catch (BadLocationException e) {
-			// log, for now, unless we find there's reasons why we get some
-			// here.
-			Logger.log(Logger.INFO, e.getMessage());
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
-	 */
-	public String getAdditionalProposalInfo() {
-		return XMLUIMessages.InsertRequiredAttrsQuickAssistProposal_0;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation()
-	 */
-	public IContextInformation getContextInformation() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
-	 */
-	public String getDisplayString() {
-		return XMLUIMessages.InsertRequiredAttrsQuickAssistProposal_1;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
-	 */
-	public Image getImage() {
-		// return JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_LOCAL);
-		return XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ADD_CORRECTION);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
-	 */
-	public Point getSelection(IDocument document) {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#selected(org.eclipse.jface.text.ITextViewer,
-	 *      boolean)
-	 */
-	public void selected(ITextViewer viewer, boolean smartToggle) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#unselected(org.eclipse.jface.text.ITextViewer)
-	 */
-	public void unselected(ITextViewer viewer) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#validate(org.eclipse.jface.text.IDocument,
-	 *      int, org.eclipse.jface.text.DocumentEvent)
-	 */
-	public boolean validate(IDocument document, int offset, DocumentEvent event) {
-		return false;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/ProblemIDsXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/ProblemIDsXML.java
deleted file mode 100644
index 4d0008b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/ProblemIDsXML.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.correction;
-
-public interface ProblemIDsXML {
-	int AttrsInEndTag = 3;
-	int AttrValueNotQuoted = 13;
-	int EmptyTag = 1;
-	int InvalidAttrValue = 11;
-	int MissingAttrValue = 4;
-	int MissingClosingBracket = 14;
-	int MissingEndTag = 2;
-	int MissingRequiredAttr = 12;
-	int NamespaceInPI = 8;
-	int NoAttrValue = 5;
-	int SpacesBeforePI = 7;
-	int SpacesBeforeTagName = 6;
-	int Unclassified = 0;
-	int UnknownAttr = 10;
-	int UnknownElement = 9;
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java
deleted file mode 100644
index 328db8d..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.correction;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.correction.IQuickAssistProcessor;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * @deprecated since 2.0 RC0 Use
- *             org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
- */
-public class QuickAssistProcessorXML implements IQuickAssistProcessor {
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.correction.IQuickAssistProcessor#canAssist(org.eclipse.wst.sse.core.text.IStructuredDocument,
-	 *      int)
-	 */
-	public boolean canAssist(StructuredTextViewer viewer, int offset) {
-		return true;
-	}
-
-	/**
-	 * @param proposals
-	 * @param viewer
-	 * @param offset
-	 */
-	protected void getInsertRequiredAttrs(ArrayList proposals, StructuredTextViewer viewer, int offset) {
-		IDOMNode node = (IDOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
-		if ((node != null) && (node.getNodeType() == Node.ELEMENT_NODE)) {
-			IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
-			if ((startStructuredDocumentRegion != null) && startStructuredDocumentRegion.containsOffset(offset)) {
-				IDOMNode cursorNode = (IDOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
-				List requiredAttrs = getRequiredAttrs(cursorNode);
-				if (requiredAttrs.size() > 0) {
-					NamedNodeMap currentAttrs = node.getAttributes();
-					List insertAttrs = new ArrayList();
-					if (currentAttrs.getLength() == 0) {
-						insertAttrs.addAll(requiredAttrs);
-					}
-					else {
-						for (int i = 0; i < requiredAttrs.size(); i++) {
-							String requiredAttrName = ((CMAttributeDeclaration) requiredAttrs.get(i)).getAttrName();
-							boolean found = false;
-							for (int j = 0; j < currentAttrs.getLength(); j++) {
-								String currentAttrName = currentAttrs.item(j).getNodeName();
-								if (requiredAttrName.compareToIgnoreCase(currentAttrName) == 0) {
-									found = true;
-									break;
-								}
-							}
-							if (!found) {
-								insertAttrs.add(requiredAttrs.get(i));
-							}
-						}
-					}
-					if (insertAttrs.size() > 0) {
-						proposals.add(new InsertRequiredAttrsQuickAssistProposal(insertAttrs));
-					}
-				}
-			}
-		}
-	}
-
-	/**
-	 * @param proposals
-	 * @param viewer
-	 * @param offset
-	 */
-	protected void getLocalRenameQuickAssistProposal(ArrayList proposals, StructuredTextViewer viewer, int offset) {
-		IDOMNode node = (IDOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
-		IStructuredDocumentRegion startStructuredDocumentRegion = node == null ? null : node.getStartStructuredDocumentRegion();
-		IStructuredDocumentRegion endStructuredDocumentRegion = node == null ? null : node.getEndStructuredDocumentRegion();
-
-		ITextRegion region = null;
-		int regionTextEndOffset = 0;
-		if ((startStructuredDocumentRegion != null) && startStructuredDocumentRegion.containsOffset(offset)) {
-			region = startStructuredDocumentRegion.getRegionAtCharacterOffset(offset);
-			regionTextEndOffset = startStructuredDocumentRegion.getTextEndOffset(region);
-		}
-		else if ((endStructuredDocumentRegion != null) && endStructuredDocumentRegion.containsOffset(offset)) {
-			region = endStructuredDocumentRegion.getRegionAtCharacterOffset(offset);
-			regionTextEndOffset = endStructuredDocumentRegion.getTextEndOffset(region);
-		}
-
-		if ((region != null) && ((region.getType() == DOMRegionContext.XML_TAG_NAME) || (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) && (offset <= regionTextEndOffset)) {
-			proposals.add(new RenameInFileQuickAssistProposal());
-		}
-	}
-
-	protected ModelQuery getModelQuery(Node node) {
-		if (node.getNodeType() == Node.DOCUMENT_NODE) {
-			return ModelQueryUtil.getModelQuery((Document) node);
-		}
-		else {
-			return ModelQueryUtil.getModelQuery(node.getOwnerDocument());
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.correction.IQuickAssistProcessor#getProposals(org.eclipse.wst.sse.core.text.IStructuredDocument,
-	 *      int)
-	 */
-	public ICompletionProposal[] getProposals(StructuredTextViewer viewer, int offset) throws CoreException {
-		ArrayList proposals = new ArrayList();
-
-		getLocalRenameQuickAssistProposal(proposals, viewer, offset);
-		getSurroundWithNewElementQuickAssistProposal(proposals, viewer, offset);
-		getInsertRequiredAttrs(proposals, viewer, offset);
-
-		return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
-	}
-
-	protected List getRequiredAttrs(Node node) {
-		List result = new ArrayList();
-
-		ModelQuery modelQuery = getModelQuery(node);
-		if (modelQuery != null) {
-			CMElementDeclaration elementDecl = modelQuery.getCMElementDeclaration((Element) node);
-			if (elementDecl != null) {
-				CMNamedNodeMap attrMap = elementDecl.getAttributes();
-
-				CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attrMap);
-				List nodes = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent((Element)node, elementDecl, ModelQuery.INCLUDE_ATTRIBUTES);
-				for (int k = 0; k < nodes.size(); k++) {
-					CMNode cmnode = (CMNode) nodes.get(k);
-					if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-						allAttributes.put(cmnode);
-					}
-				}
-				attrMap = allAttributes;
-				
-				Iterator it = attrMap.iterator();
-				CMAttributeDeclaration attr = null;
-				while (it.hasNext()) {
-					attr = (CMAttributeDeclaration) it.next();
-					if (attr.getUsage() == CMAttributeDeclaration.REQUIRED) {
-						result.add(attr);
-					}
-				}
-			}
-		}
-
-		return result;
-	}
-
-	/**
-	 * @param proposals
-	 * @param viewer
-	 * @param offset
-	 */
-	protected void getSurroundWithNewElementQuickAssistProposal(ArrayList proposals, StructuredTextViewer viewer, int offset) {
-		IDOMNode node = (IDOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
-		if (node != null) {
-			proposals.add(new SurroundWithNewElementQuickAssistProposal());
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java
deleted file mode 100644
index 28eaea1..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.correction;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.ui.internal.correction.IQuickFixProcessor;
-import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-
-/**
- * @deprecated since 2.0 RC0 Use
- *             org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
- */
-public class QuickFixProcessorXML implements IQuickFixProcessor {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.correction.IQuickFixProcessor#canFix(int)
-	 */
-	public boolean canFix(Annotation annotation) {
-		boolean result = false;
-
-		if (annotation instanceof TemporaryAnnotation) {
-			TemporaryAnnotation tempAnnotation = (TemporaryAnnotation) annotation;
-			int problemID = tempAnnotation.getProblemID();
-			switch (problemID) {
-				case ProblemIDsXML.EmptyTag :
-				case ProblemIDsXML.MissingEndTag :
-				case ProblemIDsXML.AttrsInEndTag :
-				case ProblemIDsXML.MissingAttrValue :
-				case ProblemIDsXML.NoAttrValue :
-				case ProblemIDsXML.SpacesBeforeTagName :
-				case ProblemIDsXML.SpacesBeforePI :
-				case ProblemIDsXML.NamespaceInPI :
-				case ProblemIDsXML.UnknownElement :
-				case ProblemIDsXML.UnknownAttr :
-				case ProblemIDsXML.InvalidAttrValue :
-				case ProblemIDsXML.MissingRequiredAttr :
-				case ProblemIDsXML.AttrValueNotQuoted :
-				case ProblemIDsXML.MissingClosingBracket :
-					result = true;
-			}
-		}
-
-		return result;
-	}
-
-	public Image getImage() {
-		// return
-		// JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
-		return XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_CORRECTION_CHANGE);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.correction.IQuickFixProcessor#getProposals(org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation)
-	 */
-	public ICompletionProposal[] getProposals(Annotation annotation) throws CoreException {
-		ArrayList proposals = new ArrayList();
-
-		if (annotation instanceof TemporaryAnnotation) {
-			TemporaryAnnotation tempAnnotation = (TemporaryAnnotation) annotation;
-			int problemID = tempAnnotation.getProblemID();
-			switch (problemID) {
-				case ProblemIDsXML.EmptyTag :
-					proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_0, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				case ProblemIDsXML.MissingEndTag :
-					String tagName = (String) ((Object[]) tempAnnotation.getAdditionalFixInfo())[0];
-					String tagClose = (String) ((Object[]) tempAnnotation.getAdditionalFixInfo())[1];
-					int tagCloseOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[2]).intValue();
-					int startTagEndOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[3]).intValue();
-					int firstChildStartOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[4]).intValue();
-					int endOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[5]).intValue();
-					proposals.add(new CompletionProposal(tagClose, tagCloseOffset, 0, 0, getImage(), XMLUIMessages.QuickFixProcessorXML_1, null, "")); //$NON-NLS-1$ 
-					proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), startTagEndOffset - tempAnnotation.getPosition().getOffset(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_2, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					proposals.add(new CompletionProposal("</" + tagName + ">", firstChildStartOffset, 0, 0, getImage(), XMLUIMessages.QuickFixProcessorXML_3, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-					proposals.add(new CompletionProposal("</" + tagName + ">", endOffset, 0, 0, getImage(), XMLUIMessages.QuickFixProcessorXML_4, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-					break;
-				case ProblemIDsXML.AttrsInEndTag :
-					proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_5, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				case ProblemIDsXML.MissingAttrValue :
-					String defaultAttrValue = (String) ((Object[]) tempAnnotation.getAdditionalFixInfo())[0];
-					int insertOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[1]).intValue();
-					proposals.add(new CompletionProposal("\"" + defaultAttrValue + "\"", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength() + insertOffset, 0, defaultAttrValue.length() + 2, getImage(), XMLUIMessages.QuickFixProcessorXML_6, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-					proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_7, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				case ProblemIDsXML.NoAttrValue :
-					defaultAttrValue = (String) tempAnnotation.getAdditionalFixInfo();
-					proposals.add(new CompletionProposal("=\"" + defaultAttrValue + "\"", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength(), 0, defaultAttrValue.length() + 3, getImage(), XMLUIMessages.QuickFixProcessorXML_6, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-					proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_7, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				case ProblemIDsXML.SpacesBeforeTagName :
-					proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_8, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				case ProblemIDsXML.SpacesBeforePI :
-					proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_9, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				case ProblemIDsXML.NamespaceInPI :
-					proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_10, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				case ProblemIDsXML.UnknownElement :
-					proposals.add(new RemoveUnknownElementQuickFixProposal(tempAnnotation.getAdditionalFixInfo(), getImage(), XMLUIMessages.QuickFixProcessorXML_11));
-					proposals.add(new RenameInFileQuickAssistProposal());
-					break;
-				case ProblemIDsXML.UnknownAttr :
-					proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_7, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					proposals.add(new RenameInFileQuickAssistProposal());
-					break;
-				case ProblemIDsXML.InvalidAttrValue :
-					proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_12, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				case ProblemIDsXML.MissingRequiredAttr :
-					String requiredAttr = (String) ((Object[]) tempAnnotation.getAdditionalFixInfo())[0];
-					insertOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[1]).intValue();
-					proposals.add(new CompletionProposal(requiredAttr, tempAnnotation.getPosition().getOffset() + insertOffset, 0, requiredAttr.length(), getImage(), XMLUIMessages.QuickFixProcessorXML_13, null, "")); //$NON-NLS-1$ 
-					break;
-				case ProblemIDsXML.AttrValueNotQuoted :
-					String attrValue = (String) tempAnnotation.getAdditionalFixInfo();
-					proposals.add(new CompletionProposal("\"" + attrValue + "\"", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), attrValue.length() + 2, getImage(), XMLUIMessages.QuickFixProcessorXML_14, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-					break;
-				case ProblemIDsXML.MissingClosingBracket :
-					proposals.add(new CompletionProposal(">", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength(), 0, 1, getImage(), XMLUIMessages.QuickFixProcessorXML_15, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-			}
-		}
-
-		return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java
deleted file mode 100644
index b87a2c9..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.correction;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposalExtension2;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-public class RemoveUnknownElementQuickFixProposal implements ICompletionProposal, ICompletionProposalExtension2 {
-	private Object fAdditionalFixInfo = null;
-	private String fDisplayString;
-	private Image fImage;
-	private Point fSelection; // initialized by apply()
-
-	public RemoveUnknownElementQuickFixProposal(Object additionalFixInfo, Image image, String displayString) {
-		fAdditionalFixInfo = additionalFixInfo;
-		fImage = image;
-		fDisplayString = displayString;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)
-	 */
-	public void apply(IDocument document) {
-		// not implemented?
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#apply(org.eclipse.jface.text.ITextViewer,
-	 *      char, int, int)
-	 */
-	public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
-		int startTagOffset = ((Integer) ((Object[]) fAdditionalFixInfo)[0]).intValue();
-		int startTagLength = ((Integer) ((Object[]) fAdditionalFixInfo)[1]).intValue();
-		int endTagOffset = ((Integer) ((Object[]) fAdditionalFixInfo)[2]).intValue();
-		int endTagLength = ((Integer) ((Object[]) fAdditionalFixInfo)[3]).intValue();
-
-		MultiTextEdit multiTextEdit = new MultiTextEdit();
-		if (endTagOffset != -1) {
-			multiTextEdit.addChild(new DeleteEdit(endTagOffset, endTagLength));
-			fSelection = new Point(endTagOffset, 0);
-		}
-		if (startTagOffset != -1) {
-			multiTextEdit.addChild(new DeleteEdit(startTagOffset, startTagLength));
-			fSelection = new Point(startTagOffset, 0);
-		}
-
-		try {
-			multiTextEdit.apply(viewer.getDocument());
-		}
-		catch (MalformedTreeException e) {
-			// log for now, unless find reasons not to.
-			Logger.log(Logger.INFO, e.getMessage());
-		}
-		catch (BadLocationException e) {
-			// log for now, unless find reasons not to.
-			Logger.log(Logger.INFO, e.getMessage());
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
-	 */
-	public String getAdditionalProposalInfo() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation()
-	 */
-	public IContextInformation getContextInformation() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
-	 */
-	public String getDisplayString() {
-		if (fDisplayString == null) {
-			fDisplayString = XMLUIMessages.QuickFixProcessorXML_11;
-		}
-
-		return fDisplayString;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
-	 */
-	public Image getImage() {
-		return fImage;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
-	 */
-	public Point getSelection(IDocument document) {
-		return fSelection;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#selected(org.eclipse.jface.text.ITextViewer,
-	 *      boolean)
-	 */
-	public void selected(ITextViewer viewer, boolean smartToggle) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#unselected(org.eclipse.jface.text.ITextViewer)
-	 */
-	public void unselected(ITextViewer viewer) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#validate(org.eclipse.jface.text.IDocument,
-	 *      int, org.eclipse.jface.text.DocumentEvent)
-	 */
-	public boolean validate(IDocument document, int offset, DocumentEvent event) {
-		return false;
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
deleted file mode 100644
index ac95b31..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.correction;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposalExtension2;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.link.LinkedModeModel;
-import org.eclipse.jface.text.link.LinkedModeUI;
-import org.eclipse.jface.text.link.LinkedPosition;
-import org.eclipse.jface.text.link.LinkedPositionGroup;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.texteditor.link.EditorLinkedModeUI;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-
-public class RenameInFileQuickAssistProposal implements ICompletionProposal, ICompletionProposalExtension2 {
-	protected IRegion fSelectedRegion; // initialized by apply()
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)
-	 */
-	public void apply(IDocument document) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#apply(org.eclipse.jface.text.ITextViewer,
-	 *      char, int, int)
-	 */
-	public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
-		IDocument document = viewer.getDocument();
-		LinkedPositionGroup group = new LinkedPositionGroup();
-		try {
-			if (viewer instanceof StructuredTextViewer) {
-				IDOMNode node = (IDOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
-				IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
-				ITextRegion region = (startStructuredDocumentRegion == null) ? null : startStructuredDocumentRegion.getRegionAtCharacterOffset(offset);
-				if (region != null) {
-					group.addPosition(new LinkedPosition(document, startStructuredDocumentRegion.getStartOffset() + region.getStart(), region.getTextLength(), 0));
-
-					if ((region.getType() == DOMRegionContext.XML_TAG_NAME) && (node.getEndStructuredDocumentRegion() != null)) {
-						region = node.getEndStructuredDocumentRegion().getRegions().get(1);
-						if (region != null) {
-							group.addPosition(new LinkedPosition(document, node.getEndStructuredDocumentRegion().getStartOffset() + region.getStart(), region.getTextLength(), 1));
-						}
-					}
-				}
-				else {
-					IStructuredDocumentRegion endStructuredDocumentRegion = node.getEndStructuredDocumentRegion();
-					region = (endStructuredDocumentRegion == null) ? null : endStructuredDocumentRegion.getRegionAtCharacterOffset(offset);
-					if (region != null) {
-						if ((region.getType() == DOMRegionContext.XML_TAG_NAME) && (node.getStartStructuredDocumentRegion() != null)) {
-							ITextRegion startTagNameRegion = node.getStartStructuredDocumentRegion().getRegions().get(1);
-							if (region != null) {
-								group.addPosition(new LinkedPosition(document, node.getStartStructuredDocumentRegion().getStartOffset() + startTagNameRegion.getStart(), startTagNameRegion.getTextLength(), 0));
-								group.addPosition(new LinkedPosition(document, endStructuredDocumentRegion.getStartOffset() + region.getStart(), region.getTextLength(), 1));
-							}
-						}
-						else {
-							group.addPosition(new LinkedPosition(document, endStructuredDocumentRegion.getStartOffset() + region.getStart(), region.getTextLength(), 0));
-						}
-					}
-				}
-
-				// TODO CompletionProposalPopup#insertProposal() calls
-				// IRewriteTarget.beginCompoundChange()
-				// which disables redraw in ITextViewer. Workaround for now.
-				((StructuredTextViewer) viewer).setRedraw(true);
-			}
-
-			LinkedModeModel linkedModeModel = new LinkedModeModel();
-			linkedModeModel.addGroup(group);
-			linkedModeModel.forceInstall();
-
-			LinkedModeUI ui = new EditorLinkedModeUI(linkedModeModel, viewer);
-			ui.setExitPosition(viewer, offset, 0, LinkedPositionGroup.NO_STOP);
-			ui.enter();
-
-			fSelectedRegion = ui.getSelectedRegion();
-		}
-		catch (BadLocationException e) {
-			// log for now, unless find reason not to
-			Logger.log(Logger.INFO, e.getMessage());
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
-	 */
-	public String getAdditionalProposalInfo() {
-		return XMLUIMessages.RenameInFileQuickAssistProposal_0;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation()
-	 */
-	public IContextInformation getContextInformation() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
-	 */
-	public String getDisplayString() {
-		return XMLUIMessages.RenameInFileQuickAssistProposal_1;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
-	 */
-	public Image getImage() {
-		// return JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_LOCAL);
-		return XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_LOCAL_VARIABLE);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
-	 */
-	public Point getSelection(IDocument document) {
-		return new Point(fSelectedRegion.getOffset(), fSelectedRegion.getLength());
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#selected(org.eclipse.jface.text.ITextViewer,
-	 *      boolean)
-	 */
-	public void selected(ITextViewer viewer, boolean smartToggle) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#unselected(org.eclipse.jface.text.ITextViewer)
-	 */
-	public void unselected(ITextViewer viewer) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#validate(org.eclipse.jface.text.IDocument,
-	 *      int, org.eclipse.jface.text.DocumentEvent)
-	 */
-	public boolean validate(IDocument document, int offset, DocumentEvent event) {
-		return false;
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
deleted file mode 100644
index 7baffc8..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.correction;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.text.edits.InsertEdit;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.provisional.format.FormatProcessorXML;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.w3c.dom.Node;
-
-public class SurroundWithNewElementQuickAssistProposal extends RenameInFileQuickAssistProposal {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#apply(org.eclipse.jface.text.ITextViewer,
-	 *      char, int, int)
-	 */
-	public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
-		try {
-			int startTagOffset = offset;
-			int endTagOffset = offset + viewer.getSelectedRange().y;
-
-			// surround the node if no selection
-			if (startTagOffset == endTagOffset) {
-				IDOMNode cursorNode = (IDOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
-				// use parent node if text node is empty
-				if ((cursorNode.getNodeType() == Node.TEXT_NODE) && (cursorNode.getNodeValue().trim().length() == 0)) {
-					cursorNode = (IDOMNode) cursorNode.getParentNode();
-				}
-
-				startTagOffset = cursorNode.getStartOffset();
-				endTagOffset = cursorNode.getEndOffset();
-			}
-
-			// insert new element
-			MultiTextEdit multiTextEdit = new MultiTextEdit();
-			// element tag name cannot be DBCS, do not translate "<element>"
-			// and "</element>"
-			multiTextEdit.addChild(new InsertEdit(startTagOffset, "<element>")); //$NON-NLS-1$
-			multiTextEdit.addChild(new InsertEdit(endTagOffset, "</element>")); //$NON-NLS-1$
-			multiTextEdit.apply(viewer.getDocument());
-
-			// get new element node
-			IDOMNode newElementNode = (IDOMNode) ContentAssistUtils.getNodeAt(viewer, startTagOffset);
-
-			// format new element
-			IStructuredFormatProcessor formatProcessor = new FormatProcessorXML();
-			formatProcessor.formatNode(newElementNode);
-
-			// rename new element
-			super.apply(viewer, trigger, stateMask, newElementNode.getStartOffset() + 1);
-		}
-		catch (MalformedTreeException e) {
-			// log for now, unless find reason not to
-			Logger.log(Logger.INFO, e.getMessage());
-		}
-		catch (BadLocationException e) {
-			// log for now, unless find reason not to
-			Logger.log(Logger.INFO, e.getMessage());
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
-	 */
-	public String getAdditionalProposalInfo() {
-		return XMLUIMessages.SurroundWithNewElementQuickAssistProposal_0;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
-	 */
-	public String getDisplayString() {
-		return XMLUIMessages.SurroundWithNewElementQuickAssistProposal_1;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
-	 */
-	public Image getImage() {
-		// return JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_LOCAL);
-		return XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ADD_CORRECTION);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/XMLQuickAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/XMLQuickAssistProcessor.java
deleted file mode 100644
index 4649e94..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/XMLQuickAssistProcessor.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.correction;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
-import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-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.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-public class XMLQuickAssistProcessor implements IQuickAssistProcessor {
-
-	public boolean canAssist(IQuickAssistInvocationContext invocationContext) {
-		return true;
-	}
-
-	public boolean canFix(Annotation annotation) {
-		return false;
-	}
-
-	public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
-		List proposals = new ArrayList();
-
-		getLocalRenameQuickAssistProposal(proposals, invocationContext.getSourceViewer(), invocationContext.getOffset());
-		getSurroundWithNewElementQuickAssistProposal(proposals, invocationContext.getSourceViewer(), invocationContext.getOffset());
-		getInsertRequiredAttrs(proposals, invocationContext.getSourceViewer(), invocationContext.getOffset());
-
-		return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
-	}
-
-	public String getErrorMessage() {
-		return null;
-	}
-
-	private void getInsertRequiredAttrs(List proposals, ISourceViewer viewer, int offset) {
-		IDOMNode node = (IDOMNode) getNodeAt(viewer, offset);
-		if ((node != null) && (node.getNodeType() == Node.ELEMENT_NODE)) {
-			IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
-			if ((startStructuredDocumentRegion != null) && startStructuredDocumentRegion.containsOffset(offset)) {
-				IDOMNode cursorNode = (IDOMNode) getNodeAt(viewer, offset);
-				List requiredAttrs = getRequiredAttrs(cursorNode);
-				if (requiredAttrs.size() > 0) {
-					NamedNodeMap currentAttrs = node.getAttributes();
-					List insertAttrs = new ArrayList();
-					if (currentAttrs.getLength() == 0) {
-						insertAttrs.addAll(requiredAttrs);
-					}
-					else {
-						for (int i = 0; i < requiredAttrs.size(); i++) {
-							String requiredAttrName = ((CMAttributeDeclaration) requiredAttrs.get(i)).getAttrName();
-							boolean found = false;
-							for (int j = 0; j < currentAttrs.getLength(); j++) {
-								String currentAttrName = currentAttrs.item(j).getNodeName();
-								if (requiredAttrName.compareToIgnoreCase(currentAttrName) == 0) {
-									found = true;
-									break;
-								}
-							}
-							if (!found) {
-								insertAttrs.add(requiredAttrs.get(i));
-							}
-						}
-					}
-					if (insertAttrs.size() > 0) {
-						proposals.add(new InsertRequiredAttrsQuickAssistProposal(insertAttrs));
-					}
-				}
-			}
-		}
-	}
-
-	private void getLocalRenameQuickAssistProposal(List proposals, ISourceViewer viewer, int offset) {
-		IDOMNode node = (IDOMNode) getNodeAt(viewer, offset);
-		IStructuredDocumentRegion startStructuredDocumentRegion = node == null ? null : node.getStartStructuredDocumentRegion();
-		IStructuredDocumentRegion endStructuredDocumentRegion = node == null ? null : node.getEndStructuredDocumentRegion();
-
-		ITextRegion region = null;
-		int regionTextEndOffset = 0;
-		if ((startStructuredDocumentRegion != null) && startStructuredDocumentRegion.containsOffset(offset)) {
-			region = startStructuredDocumentRegion.getRegionAtCharacterOffset(offset);
-			regionTextEndOffset = startStructuredDocumentRegion.getTextEndOffset(region);
-		}
-		else if ((endStructuredDocumentRegion != null) && endStructuredDocumentRegion.containsOffset(offset)) {
-			region = endStructuredDocumentRegion.getRegionAtCharacterOffset(offset);
-			regionTextEndOffset = endStructuredDocumentRegion.getTextEndOffset(region);
-		}
-
-		if ((region != null) && ((region.getType() == DOMRegionContext.XML_TAG_NAME) || (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) && (offset <= regionTextEndOffset)) {
-			proposals.add(new RenameInFileQuickAssistProposal());
-		}
-	}
-
-	private ModelQuery getModelQuery(Node node) {
-		if (node.getNodeType() == Node.DOCUMENT_NODE) {
-			return ModelQueryUtil.getModelQuery((Document) node);
-		}
-		else {
-			return ModelQueryUtil.getModelQuery(node.getOwnerDocument());
-		}
-	}
-
-	private List getRequiredAttrs(Node node) {
-		List result = new ArrayList();
-
-		ModelQuery modelQuery = getModelQuery(node);
-		if (modelQuery != null) {
-			CMElementDeclaration elementDecl = modelQuery.getCMElementDeclaration((Element) node);
-			if (elementDecl != null) {
-				CMNamedNodeMap attrMap = elementDecl.getAttributes();
-
-				CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attrMap);
-				List nodes = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent((Element) node, elementDecl, ModelQuery.INCLUDE_ATTRIBUTES);
-				for (int k = 0; k < nodes.size(); k++) {
-					CMNode cmnode = (CMNode) nodes.get(k);
-					if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-						allAttributes.put(cmnode);
-					}
-				}
-				attrMap = allAttributes;
-				
-				Iterator it = attrMap.iterator();
-				CMAttributeDeclaration attr = null;
-				while (it.hasNext()) {
-					attr = (CMAttributeDeclaration) it.next();
-					if (attr.getUsage() == CMAttributeDeclaration.REQUIRED) {
-						result.add(attr);
-					}
-				}
-			}
-		}
-
-		return result;
-	}
-
-	private void getSurroundWithNewElementQuickAssistProposal(List proposals, ISourceViewer viewer, int offset) {
-		IDOMNode node = (IDOMNode) getNodeAt(viewer, offset);
-		if (node != null) {
-			proposals.add(new SurroundWithNewElementQuickAssistProposal());
-		}
-	}
-
-	/**
-	 * Returns the closest IndexedRegion for the offset and viewer allowing
-	 * for differences between viewer offsets and model positions. note: this
-	 * method returns an IndexedRegion for read only
-	 * 
-	 * @param viewer
-	 *            the viewer whose document is used to compute the proposals
-	 * @param documentOffset
-	 *            an offset within the document for which completions should
-	 *            be computed
-	 * @return an IndexedRegion
-	 */
-	private IndexedRegion getNodeAt(ITextViewer viewer, int documentOffset) {
-		// copied from ContentAssistUtils.getNodeAt()
-		if (viewer == null)
-			return null;
-
-		IndexedRegion node = null;
-		IModelManager mm = StructuredModelManager.getModelManager();
-		IStructuredModel model = null;
-		if (mm != null)
-			model = mm.getExistingModelForRead(viewer.getDocument());
-		try {
-			if (model != null) {
-				int lastOffset = documentOffset;
-				node = model.getIndexedRegion(documentOffset);
-				while (node == null && lastOffset >= 0) {
-					lastOffset--;
-					node = model.getIndexedRegion(lastOffset);
-				}
-			}
-		}
-		finally {
-			if (model != null)
-				model.releaseFromRead();
-		}
-		return node;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditAttributeDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditAttributeDialog.java
deleted file mode 100644
index e95af80..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditAttributeDialog.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.util.XMLCommonUIContextIds;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-
-public class EditAttributeDialog extends Dialog implements ModifyListener {
-	protected Attr attribute;
-	protected String attributeName;
-	protected Text attributeNameField;
-	protected String attributeValue;
-	protected Text attributeValueField;
-	protected Label errorMessageLabel;
-	protected Button okButton;
-	protected Element ownerElement;
-
-	public EditAttributeDialog(Shell parentShell, Element ownerElement, Attr attribute) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.ownerElement = ownerElement;
-		this.attribute = attribute;
-	}
-
-	protected void buttonPressed(int buttonId) {
-		if (buttonId == IDialogConstants.OK_ID) {
-			attributeName = getModelValue(attributeNameField.getText());
-			attributeValue = attributeValueField.getText();
-		}
-		super.buttonPressed(buttonId);
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-	}
-
-	protected Control createContents(Composite parent) {
-		Control control = super.createContents(parent);
-		attributeNameField.forceFocus();
-		attributeNameField.selectAll();
-		updateErrorMessage();
-		return control;
-	}
-
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogArea = (Composite) super.createDialogArea(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialogArea, XMLCommonUIContextIds.XCUI_ATTRIBUTE_DIALOG);
-
-		Composite composite = new Composite(dialogArea, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
-		layout.marginWidth = 0;
-		composite.setLayout(layout);
-
-		//
-		// Style convenience constants
-		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-		Label attributeNameLabel = new Label(composite, SWT.NONE);
-		attributeNameLabel.setText(XMLUIMessages._UI_LABEL_NAME_COLON);
-
-		attributeNameField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.widthHint = 300;
-		attributeNameField.setLayoutData(gd);
-		attributeNameField.setText(getDisplayValue(attribute != null ? attribute.getName() : "")); //$NON-NLS-1$
-		attributeNameField.addModifyListener(this);
-
-		Label attributeValueLabel = new Label(composite, SWT.NONE);
-		attributeValueLabel.setText(XMLUIMessages._UI_LABEL_VALUE_COLON);
-
-		String value = attribute != null ? attribute.getValue() : ""; //$NON-NLS-1$
-		int style = SWT.SINGLE | SWT.BORDER;
-		if (value.indexOf("\n") != -1) { //$NON-NLS-1$
-			style = SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL;
-		}
-
-		attributeValueField = new Text(composite, style);
-		gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.widthHint = 300;
-		attributeValueField.setLayoutData(gd);
-		attributeValueField.setText(getDisplayValue(attribute != null ? attribute.getValue() : "")); //$NON-NLS-1$
-
-		// error message
-		errorMessageLabel = new Label(composite, SWT.WRAP);
-		errorMessageLabel.setText(XMLUIMessages.error_message_goes_here);
-		gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.widthHint = 200;
-		gd.heightHint = Math.max(30, errorMessageLabel.computeSize(0, 0, false).y * 2);
-		gd.horizontalSpan = 2;
-		errorMessageLabel.setLayoutData(gd);
-		Color color = new Color(errorMessageLabel.getDisplay(), 200, 0, 0);
-		errorMessageLabel.setForeground(color);
-
-		return dialogArea;
-	}
-
-	public String getAttributeName() {
-		return attributeName;
-	}
-
-	public String getAttributeValue() {
-		return attributeValue;
-	}
-
-	protected String getDisplayValue(String string) {
-		return string != null ? string : ""; //$NON-NLS-1$
-	}
-
-	protected String getModelValue(String string) {
-		String result = null;
-		if ((string != null) && (string.trim().length() > 0)) {
-			result = string;
-		}
-		return result;
-	}
-
-	public void modifyText(ModifyEvent e) {
-		updateErrorMessage();
-	}
-
-	protected void updateErrorMessage() {
-		String errorMessage = null;
-		String name = attributeNameField.getText().trim();
-		if (name.length() > 0) {
-			Attr matchingAttribute = ownerElement.getAttributeNode(name);
-			if ((matchingAttribute != null) && (matchingAttribute != attribute)) {
-				errorMessage = XMLUIMessages._ERROR_XML_ATTRIBUTE_ALREADY_EXISTS;
-			}
-			else {
-				// TODO get checkName from Model
-				// errorMessage = ValidateHelper.checkXMLName(name);
-			}
-		}
-		else {
-			errorMessage = ""; //$NON-NLS-1$
-		}
-
-		errorMessageLabel.setText(errorMessage != null ? errorMessage : ""); //$NON-NLS-1$
-		errorMessageLabel.getParent().layout();
-		okButton.setEnabled(errorMessage == null);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditDoctypeDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditDoctypeDialog.java
deleted file mode 100644
index 6e071ba..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditDoctypeDialog.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *	   David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.util.XMLCommonUIContextIds;
-import org.w3c.dom.DocumentType;
-
-public class EditDoctypeDialog extends Dialog {
-	protected boolean computeSystemId;
-	protected String[] doctypeData;
-	protected boolean errorChecking;
-	protected Label errorMessageLabel;
-	protected Button okButton;
-	protected Button publicIdBrowseButton;
-	protected Text publicIdField;
-	protected IPath resourceLocation;
-	protected Text rootElementNameField;
-	protected Button systemIdBrowseButton;
-	protected Text systemIdField;
-
-	public EditDoctypeDialog(Shell parentShell, DocumentType doctype) {
-		this(parentShell, doctype.getName(), doctype.getPublicId(), doctype.getSystemId());
-	}
-
-	public EditDoctypeDialog(Shell parentShell, String name, String publicId, String systemId) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		doctypeData = new String[3];
-		doctypeData[0] = name;
-		doctypeData[1] = publicId;
-		doctypeData[2] = systemId;
-	}
-
-	protected void buttonPressed(int buttonId) {
-		doctypeData[0] = getModelValue(rootElementNameField.getText());
-		doctypeData[1] = getModelValue(publicIdField.getText());
-		doctypeData[2] = getModelValue(systemIdField.getText());
-		super.buttonPressed(buttonId);
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-	}
-
-
-	protected Control createContents(Composite parent) {
-		Control control = super.createContents(parent);
-		updateErrorMessage();
-		return control;
-	}
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogControl = (Composite) super.createDialogArea(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialogControl, XMLCommonUIContextIds.XCUI_DOCTYPE_DIALOG);
-
-		Composite composite = new Composite(dialogControl, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 3;
-		layout.marginWidth = 0;
-		composite.setLayout(layout);
-		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-
-		ModifyListener modifyListener = new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				if (e.widget == systemIdField) {
-					computeSystemId = false;
-				}
-				updateErrorMessage();
-			}
-		};
-
-		// row 1
-		//
-		Label rootElementNameLabel = new Label(composite, SWT.NONE);
-		rootElementNameLabel.setText(XMLUIMessages._UI_LABEL_ROOT_ELEMENT_NAME_COLON);
-
-		rootElementNameField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(rootElementNameField, XMLCommonUIContextIds.XCUI_DOCTYPE_ROOT);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.widthHint = 200;
-		rootElementNameField.setLayoutData(gd);
-		rootElementNameField.setText(getDisplayValue(doctypeData[0]));
-		rootElementNameField.addModifyListener(modifyListener);
-
-		Label placeHolder = new Label(composite, SWT.NONE);
-		placeHolder.setLayoutData(new GridData());
-
-		// row 2
-		//
-		Label publicIdLabel = new Label(composite, SWT.NONE);
-		publicIdLabel.setText(XMLUIMessages._UI_LABEL_PUBLIC_ID_COLON);
-
-		publicIdField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(publicIdField, XMLCommonUIContextIds.XCUI_DOCTYPE_PUBLIC);
-		publicIdField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		publicIdField.setText(getDisplayValue(doctypeData[1]));
-
-		SelectionListener selectionListener = new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				EditEntityHelper helper = new EditEntityHelper();
-				if (e.widget == publicIdBrowseButton) {
-					helper.performBrowseForPublicId(getShell(), publicIdField, computeSystemId ? systemIdField : null);
-				}
-				else if (e.widget == systemIdBrowseButton) {
-					helper.performBrowseForSystemId(getShell(), systemIdField, resourceLocation);
-				}
-			}
-		};
-
-		publicIdBrowseButton = new Button(composite, SWT.NONE);
-		publicIdBrowseButton.setText(XMLUIMessages._UI_LABEL_BROWSE);
-		publicIdBrowseButton.addSelectionListener(selectionListener);
-
-		// row 3
-		Label systemIdLabel = new Label(composite, SWT.NONE);
-		systemIdLabel.setText(XMLUIMessages._UI_LABEL_SYSTEM_ID_COLON);
-
-		systemIdField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(systemIdField, XMLCommonUIContextIds.XCUI_DOCTYPE_SYSTEM);
-		systemIdField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		systemIdField.setText(getDisplayValue(doctypeData[2]));
-		systemIdField.addModifyListener(modifyListener);
-
-
-		systemIdBrowseButton = new Button(composite, SWT.NONE);
-		systemIdBrowseButton.setText(XMLUIMessages._UI_LABEL_BROWSE);
-		systemIdBrowseButton.addSelectionListener(selectionListener);
-
-		// error message
-		errorMessageLabel = new Label(dialogControl, SWT.NONE);
-		errorMessageLabel.setText(""); //$NON-NLS-1$
-		errorMessageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		Color color = new Color(errorMessageLabel.getDisplay(), 200, 0, 0);
-		errorMessageLabel.setForeground(color);
-
-		Dialog.applyDialogFont(parent);
-		return dialogControl;
-	}
-
-
-	protected Label createMessageArea(Composite composite) {
-		Label label = new Label(composite, SWT.NONE);
-		// label.setText(message);
-		return label;
-	}
-
-
-	protected String getDisplayValue(String string) {
-		return string != null ? string : ""; //$NON-NLS-1$
-	}
-
-	public boolean getErrorChecking() {
-		return errorChecking;
-	}
-
-
-	protected String getModelValue(String string) {
-		String result = null;
-		if ((string != null) && (string.trim().length() > 0)) {
-			result = string;
-		}
-		return result;
-	}
-
-	public String getName() {
-		return doctypeData[0];
-	}
-
-	public String getPublicId() {
-		return doctypeData[1];
-	}
-
-	public String getSystemId() {
-		return doctypeData[2];
-	}
-
-	public void setComputeSystemId(boolean computeSystemId) {
-		this.computeSystemId = computeSystemId;
-	}
-
-	public void setErrorChecking(boolean errorChecking) {
-		this.errorChecking = errorChecking;
-	}
-
-	public void setResourceLocation(IPath path) {
-		resourceLocation = path;
-	}
-
-	public void updateErrorMessage() {
-		if (errorChecking) {
-			String errorMessage = null;
-			if (getModelValue(systemIdField.getText()) == null) {
-				errorMessage = XMLUIMessages._UI_WARNING_SYSTEM_ID_MUST_BE_SPECIFIED;
-			}
-			else if (getModelValue(rootElementNameField.getText()) == null) {
-				errorMessage = XMLUIMessages._UI_WARNING_ROOT_ELEMENT_MUST_BE_SPECIFIED;
-			}
-
-			errorMessageLabel.setText(errorMessage != null ? errorMessage : ""); //$NON-NLS-1$
-			okButton.setEnabled(errorMessage == null);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditElementDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditElementDialog.java
deleted file mode 100644
index adad381..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditElementDialog.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.core.internal.provisional.NameValidator;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.util.XMLCommonUIContextIds;
-import org.w3c.dom.Element;
-
-public class EditElementDialog extends Dialog implements ModifyListener {
-	protected Element element;
-	protected String elementName;
-	protected Text elementNameField;
-	protected Label errorMessageLabel;
-	protected Button okButton;
-
-	public EditElementDialog(Shell parentShell, Element element) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.element = element;
-	}
-
-	protected void buttonPressed(int buttonId) {
-		if (buttonId == IDialogConstants.OK_ID) {
-			elementName = getModelValue(elementNameField.getText());
-		}
-		super.buttonPressed(buttonId);
-	}
-
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-	}
-
-	protected Control createContents(Composite parent) {
-		Control control = super.createContents(parent);
-		elementNameField.forceFocus();
-		elementNameField.selectAll();
-		updateErrorMessage();
-		return control;
-	}
-
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogArea = (Composite) super.createDialogArea(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialogArea, XMLCommonUIContextIds.XCUI_ELEMENT_DIALOG);
-
-		Composite composite = new Composite(dialogArea, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
-		layout.marginWidth = 0;
-		composite.setLayout(layout);
-		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-		Label elementNameLabel = new Label(composite, SWT.NONE);
-		elementNameLabel.setText(XMLUIMessages._UI_LABEL_ELEMENT_NAME);
-
-		elementNameField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.widthHint = 200;
-		elementNameField.setLayoutData(gd);
-		elementNameField.setText(getDisplayValue(element != null ? element.getNodeName() : "")); //$NON-NLS-1$
-		elementNameField.addModifyListener(this);
-
-		// error message
-		errorMessageLabel = new Label(composite, SWT.NONE);
-		errorMessageLabel.setText(XMLUIMessages.error_message_goes_here);
-		gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.horizontalSpan = 2;
-		errorMessageLabel.setLayoutData(gd);
-		Color color = new Color(errorMessageLabel.getDisplay(), 200, 0, 0);
-		errorMessageLabel.setForeground(color);
-
-		return dialogArea;
-	}
-
-	protected String getDisplayValue(String string) {
-		return string != null ? string : ""; //$NON-NLS-1$
-	}
-
-	public String getElementName() {
-		return elementName;
-	}
-
-	protected String getModelValue(String string) {
-		String result = null;
-		if ((string != null) && (string.trim().length() > 0)) {
-			result = string;
-		}
-		return result;
-	}
-
-	public void modifyText(ModifyEvent e) {
-		updateErrorMessage();
-	}
-
-	protected void updateErrorMessage() {
-		String errorMessage = null;
-		String name = elementNameField.getText();
-		// String name = elementNameField.getText().trim();
-		if (name.length() > 0) {
-			// TODO use checkName from model level
-			// errorMessage = ValidateHelper.checkXMLName(name);
-			if (!NameValidator.isValid(name)) {
-				errorMessage = XMLUIMessages._UI_INVALID_NAME;
-			}
-		}
-		else {
-			errorMessage = ""; //$NON-NLS-1$
-		}
-
-		errorMessageLabel.setText(errorMessage != null ? errorMessage : ""); //$NON-NLS-1$
-		okButton.setEnabled(errorMessage == null);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditEntityHelper.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditEntityHelper.java
deleted file mode 100644
index 25eb64d..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditEntityHelper.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-public class EditEntityHelper {
-
-	public void performBrowseForPublicId(Shell parentShell, Text publicIdField) {
-		performBrowseForPublicId(parentShell, publicIdField, null);
-	}
-
-	public void performBrowseForPublicId(Shell parentShell, Text publicIdField, Text systemIdField) {
-		String[] extensions = {"dtd", "txt"}; //$NON-NLS-1$ //$NON-NLS-2$
-		SelectXMLCatalogIdDialog dialog = new SelectXMLCatalogIdDialog(parentShell, extensions);
-		dialog.create();
-		dialog.getShell().setText(XMLUIMessages._UI_LABEL_SELECT_XML_CATALOG_ENTRY);
-		dialog.setBlockOnOpen(true);
-		dialog.open();
-		if (dialog.getReturnCode() == Window.OK) {
-			String id = dialog.getId();
-			if (id != null) {
-				publicIdField.setText(id);
-				if ((systemIdField != null) && (dialog.getSystemId() != null)) {
-					systemIdField.setText(dialog.getSystemId());
-				}
-			}
-		}
-	}
-
-	public void performBrowseForSystemId(Shell parentShell, Text systemIdField, IPath resourceLocation) {
-		String[] extensions = {"dtd"}; //$NON-NLS-1$
-		SelectFileOrXMLCatalogIdDialog dialog = new SelectFileOrXMLCatalogIdDialog(parentShell, extensions, ICatalogEntry.ENTRY_TYPE_SYSTEM);
-		dialog.create();
-		dialog.getShell().setText(XMLUIMessages._UI_LABEL_SPECIFY_SYSTEM_ID);
-		dialog.setBlockOnOpen(true);
-		dialog.open();
-		if (dialog.getReturnCode() == Window.OK) {
-			String id = dialog.getId();
-			IFile file = dialog.getFile();
-			if (id != null) {
-				systemIdField.setText(id);
-			}
-			else if (file != null) {
-				String uri = null;
-				if (resourceLocation != null) {
-					uri = URIHelper.getRelativeURI(file.getLocation(), resourceLocation);
-				}
-				else {
-					uri = file.getLocation().toOSString();
-				}
-				systemIdField.setText(uri);
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditNamespaceInfoDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditNamespaceInfoDialog.java
deleted file mode 100644
index 14e832d..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditNamespaceInfoDialog.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.util.XMLCommonUIContextIds;
-
-public class EditNamespaceInfoDialog extends Dialog {
-
-	public static EditNamespaceInfoDialog invokeDialog(Shell shell, String title, NamespaceInfo info, IPath resourceLocation) {
-		EditNamespaceInfoDialog dialog = new EditNamespaceInfoDialog(shell, info);
-		dialog.create();
-		dialog.getShell().setText(title);
-		dialog.setBlockOnOpen(true);
-		dialog.setResourceLocation(resourceLocation);
-		dialog.open();
-		return dialog;
-	}
-
-	protected Button browseButton;
-	protected String errorMessage;
-
-	protected Label errorMessageLabel;
-	protected NamespaceInfo fInfo;
-	protected Text locationHintField;
-
-	protected Button okButton;
-	protected Text prefixField;
-	protected IPath resourceLocation;
-	protected Text uriField;
-
-	public EditNamespaceInfoDialog(Shell parentShell, NamespaceInfo info) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.fInfo = info;
-	}
-
-	protected void buttonPressed(int buttonId) {
-		if (buttonId == IDialogConstants.OK_ID) {
-			fInfo.uri = uriField.getText();
-			fInfo.prefix = prefixField.getText();
-			fInfo.locationHint = locationHintField.getText();
-		}
-		super.buttonPressed(buttonId);
-	}
-
-	protected void computeErrorMessage() {
-		errorMessage = null;
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		okButton.setEnabled(false);
-		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-		updateWidgets();
-	}
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogsubArea = (Composite) super.createDialogArea(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialogsubArea, XMLCommonUIContextIds.XCUI_NAMESPACE_DIALOG);
-
-		Composite composite = new Composite(dialogsubArea, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 3;
-		layout.marginWidth = 0;
-		composite.setLayout(layout);
-
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.widthHint = 350;
-		composite.setLayoutData(gd);
-
-		ModifyListener modifyListener = new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				updateWidgets();
-			}
-		};
-
-
-		// row 1
-		//
-		Label uriLabel = new Label(composite, SWT.NONE);
-		uriLabel.setText(XMLUIMessages._UI_LABEL_NAMESPACE_NAME_COLON);
-
-		uriField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-		gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.grabExcessHorizontalSpace = true;
-		uriField.setLayoutData(gd);
-		uriField.setText(getDisplayValue(fInfo.uri));
-		uriField.addModifyListener(modifyListener);
-		uriField.setEnabled(fInfo.getProperty("uri-readOnly") == null); //$NON-NLS-1$
-
-		// never read
-		Label placeHolder1 = new Label(composite, SWT.NONE);
-		placeHolder1.setText(""); //$NON-NLS-1$
-
-		// row 2
-		//
-		Label prefixLabel = new Label(composite, SWT.NONE);
-		prefixLabel.setText(XMLUIMessages._UI_LABEL_PREFIX_COLON);
-
-		prefixField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-		gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.grabExcessHorizontalSpace = true;
-		prefixField.setLayoutData(gd);
-		prefixField.setText(getDisplayValue(fInfo.prefix));
-		prefixField.addModifyListener(modifyListener);
-		prefixField.setEnabled(fInfo.getProperty("prefix-readOnly") == null); //$NON-NLS-1$
-
-		// never read
-		Label placeHolder2 = new Label(composite, SWT.NONE);
-		placeHolder2.setText(""); //$NON-NLS-1$
-
-		// row 3
-		//
-		Label locationHintLabel = new Label(composite, SWT.NONE);
-		locationHintLabel.setText(XMLUIMessages._UI_LABEL_LOCATION_HINT_COLON);
-
-		locationHintField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-		gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.grabExcessHorizontalSpace = true;
-		locationHintField.setLayoutData(gd);
-		locationHintField.setText(getDisplayValue(fInfo.locationHint));
-		locationHintField.addModifyListener(modifyListener);
-		locationHintField.setEnabled(fInfo.getProperty("locationHint-readOnly") == null); //$NON-NLS-1$
-
-		SelectionListener selectionListener = new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				performBrowse();
-			}
-		};
-
-		browseButton = new Button(composite, SWT.NONE);
-		browseButton.setText(XMLUIMessages._UI_LABEL_BROWSE);
-		browseButton.addSelectionListener(selectionListener);
-		browseButton.setEnabled(locationHintField.getEnabled());
-
-		// error message
-		errorMessageLabel = new Label(dialogsubArea, SWT.NONE);
-		errorMessageLabel.setText(XMLUIMessages.error_message_goes_here);
-		errorMessageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		Color color = new Color(errorMessageLabel.getDisplay(), 200, 0, 0);
-		errorMessageLabel.setForeground(color);
-
-		return dialogsubArea;
-	}
-
-	protected String getDisplayValue(String string) {
-		return string != null ? string : ""; //$NON-NLS-1$
-	}
-
-	protected void performBrowse() {
-		String[] extensions = {".xsd"}; //$NON-NLS-1$
-		SelectFileOrXMLCatalogIdDialog dialog = new SelectFileOrXMLCatalogIdDialog(getShell(), extensions);
-		dialog.create();
-		dialog.getShell().setText(XMLUIMessages._UI_LABEL_SELECT_FILE);
-		dialog.setBlockOnOpen(true);
-		dialog.open();
-
-		if (dialog.getReturnCode() == Window.OK) {
-			String grammarURI = null;
-			IFile file = dialog.getFile();
-			String id = dialog.getId();
-			if (file != null) {
-				String uri = null;
-				if (resourceLocation != null) {
-					IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(resourceLocation);
-					if (resource != null) {
-						IPath location = resource.getLocation();
-						if (location != null) {
-							uri = URIHelper.getRelativeURI(file.getLocation(), location);
-						}
-					}
-					grammarURI = file.getLocation().toOSString();
-				}
-				else {
-					uri = file.getLocation().toOSString();
-					grammarURI = uri;
-				}
-				locationHintField.setText(uri);
-			}
-			else if (id != null) {
-				locationHintField.setText(id);
-				URIResolver resolver = URIResolverPlugin.createResolver();
-				grammarURI = resolver.resolve(null, id, id);
-			}
-
-
-			CMDocument document = ContentModelManager.getInstance().createCMDocument(URIHelper.getURIForFilePath(grammarURI), "xsd"); //$NON-NLS-1$
-			if(document != null) {
-				List namespaceInfoList = (List) document.getProperty("http://org.eclipse.wst/cm/properties/namespaceInfo"); //$NON-NLS-1$
-				if(namespaceInfoList != null) {
-					NamespaceInfo info = (NamespaceInfo) namespaceInfoList.get(0);
-					if(info != null) {
-						if ((uriField.getText().trim().length() == 0) && (info.uri != null)) {
-							uriField.setText(info.uri);
-						}
-						if ((prefixField.getText().trim().length() == 0) && (info.prefix != null)) {
-							prefixField.setText(info.prefix);
-						}
-					}
-				}
-			}
-		}
-	}
-
-	public void setResourceLocation(IPath path) {
-		resourceLocation = path;
-	}
-
-	protected void updateErrorMessageLabel() {
-		errorMessageLabel.setText(errorMessage != null ? errorMessage : ""); //$NON-NLS-1$
-	}
-
-	protected void updateOKButtonState() {
-		if (okButton != null) {
-			if ((uriField.getText().trim().length() == 0) && (prefixField.getText().trim().length() == 0) && (locationHintField.getText().trim().length() == 0)) {
-				okButton.setEnabled(false);
-			}
-			else {
-				okButton.setEnabled(errorMessage == null);
-			}
-		}
-	}
-
-	protected void updateWidgets() {
-		computeErrorMessage();
-		updateErrorMessageLabel();
-		updateOKButtonState();
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditProcessingInstructionDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditProcessingInstructionDialog.java
deleted file mode 100644
index 6742855..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditProcessingInstructionDialog.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.util.XMLCommonUIContextIds;
-import org.w3c.dom.ProcessingInstruction;
-
-public class EditProcessingInstructionDialog extends Dialog {
-	protected String data;
-	protected Text dataField;
-	protected String target;
-	protected Text targetField;
-
-	public EditProcessingInstructionDialog(Shell parentShell, ProcessingInstruction pi) {
-		this(parentShell, pi.getTarget(), pi.getData());
-	}
-
-	public EditProcessingInstructionDialog(Shell parentShell, String target, String data) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.target = target;
-		this.data = data;
-	}
-
-	protected void buttonPressed(int buttonId) {
-		target = getModelValue(targetField.getText());
-		data = getModelValue(dataField.getText());
-		super.buttonPressed(buttonId);
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-	}
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogArea1 = (Composite) super.createDialogArea(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialogArea1, XMLCommonUIContextIds.XCUI_PROCESSING_DIALOG);
-
-		Composite composite = new Composite(dialogArea1, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
-		layout.marginWidth = 0;
-		composite.setLayout(layout);
-		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.widthHint = 250;
-
-		Label targetLabel = new Label(composite, SWT.NONE);
-		targetLabel.setText(XMLUIMessages._UI_LABEL_TARGET_COLON);
-
-		targetField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-		targetField.setLayoutData(gd);
-		targetField.setText(getDisplayValue(target));
-
-		Label dataLabel = new Label(composite, SWT.NONE);
-		dataLabel.setText(XMLUIMessages._UI_LABEL_DATA_COLON);
-
-		dataField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-		dataField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		dataField.setText(getDisplayValue(data));
-
-		return dialogArea1;
-	}
-
-	protected Label createMessageArea(Composite composite) {
-		Label label = new Label(composite, SWT.NONE);
-		// label.setText(message);
-		return label;
-	}
-
-	public String getData() {
-		return data;
-	}
-
-	protected String getDisplayValue(String string) {
-		return string != null ? string : ""; //$NON-NLS-1$
-	}
-
-	protected String getModelValue(String string) {
-		String result = null;
-		if ((string != null) && (string.trim().length() > 0)) {
-			result = string;
-		}
-		return result;
-	}
-
-
-	public String getTarget() {
-		return target;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditSchemaInfoDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditSchemaInfoDialog.java
deleted file mode 100644
index d445809..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditSchemaInfoDialog.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.nsedit.CommonEditNamespacesDialog;
-import org.eclipse.wst.xml.ui.internal.util.XMLCommonUIContextIds;
-
-public class EditSchemaInfoDialog extends Dialog implements UpdateListener {
-	// protected NamespaceInfoTable namespaceInfoTable;
-	protected Label errorMessageLabel;
-	protected List namespaceInfoList;
-	protected IPath resourceLocation;
-
-	public EditSchemaInfoDialog(Shell parentShell, IPath resourceLocation) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.resourceLocation = resourceLocation;
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-	}
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogArea = (Composite) super.createDialogArea(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialogArea, XMLCommonUIContextIds.XCUI_SCHEMA_INFO_DIALOG);
-
-		CommonEditNamespacesDialog editNamespacesControl = new CommonEditNamespacesDialog(dialogArea, resourceLocation, XMLUIMessages._UI_NAMESPACE_DECLARATIONS, false, true);
-		editNamespacesControl.setNamespaceInfoList(namespaceInfoList);
-
-		editNamespacesControl.updateErrorMessage(namespaceInfoList);
-
-		return dialogArea;
-	}
-
-	protected Control getDialogArea(Composite parent) {
-		return super.createDialogArea(parent);
-	}
-
-	public List getNamespaceInfoList() {
-		return namespaceInfoList;
-	}
-
-	public void setNamespaceInfoList(List list) {
-		namespaceInfoList = list;
-	}
-
-	public void updateErrorMessage(List namespaceInfoList) {
-		NamespaceInfoErrorHelper helper = new NamespaceInfoErrorHelper();
-		String errorMessage = helper.computeErrorMessage(namespaceInfoList, null);
-		errorMessageLabel.setText(errorMessage != null ? errorMessage : ""); //$NON-NLS-1$
-	}
-
-	public void updateOccured(Object object, Object arg) {
-		updateErrorMessage((List) arg);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/NamespaceInfoErrorHelper.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/NamespaceInfoErrorHelper.java
deleted file mode 100644
index 540df93..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/NamespaceInfoErrorHelper.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceInfoManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-public class NamespaceInfoErrorHelper {
-
-	protected List errorList;
-
-	public NamespaceInfoErrorHelper() {
-	}
-
-	public String computeErrorMessage(List namespaceInfoList, URIResolver idResolver) {
-		String result = null;
-		Hashtable prefixTable = new Hashtable();
-		Hashtable uriTable = new Hashtable();
-		for (Iterator iterator = namespaceInfoList.iterator(); iterator.hasNext();) {
-			NamespaceInfo nsInfo = (NamespaceInfo) iterator.next();
-			nsInfo.normalize();
-
-			String urikey = nsInfo.uri != null ? nsInfo.uri : ""; //$NON-NLS-1$
-			NamespaceInfo nsInfo2 = null;
-			if ((nsInfo2 = (NamespaceInfo) uriTable.get(urikey)) != null) {
-				if ((nsInfo.uri != null) && nsInfo.uri.equals(nsInfo2.uri)) {
-					result = XMLUIMessages._UI_WARNING_MORE_THAN_ONE_NS_WITH_NAME + "'" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ 
-				}
-				else {
-					result = XMLUIMessages._UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_NAME;
-				}
-				break;
-			}
-			else {
-				uriTable.put(urikey, nsInfo);
-			}
-
-			if (nsInfo.uri != null) {
-				String key = nsInfo.prefix != null ? nsInfo.prefix : ""; //$NON-NLS-1$
-				if (prefixTable.get(key) != null) {
-					if (nsInfo.prefix != null) {
-						result = XMLUIMessages._UI_WARNING_MORE_THAN_ONE_NS_WITH_PREFIX + "'" + nsInfo.prefix + "'"; //$NON-NLS-1$ //$NON-NLS-2$ 
-						break;
-					}
-					else {
-						result = XMLUIMessages._UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_PREFIX;
-						break;
-					}
-				}
-				else {
-					prefixTable.put(key, nsInfo);
-				}
-
-				if ((nsInfo.locationHint != null) && (idResolver != null)) {
-					String grammarURI = idResolver.resolve(null, nsInfo.locationHint, nsInfo.locationHint);
-					if (!URIHelper.isReadableURI(grammarURI, false)) {
-						result = XMLUIMessages._UI_WARNING_SCHEMA_CAN_NOT_BE_LOCATED + " '" + nsInfo.locationHint + "'"; //$NON-NLS-1$ //$NON-NLS-2$ 
-						break;
-					}
-				}
-				if ((idResolver != null) && (nsInfo.locationHint == null) && !nsInfo.uri.equals(DOMNamespaceInfoManager.XSI_URI)) {
-					result = XMLUIMessages._UI_WARNING_LOCATION_HINT_NOT_SPECIFIED + " '" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				}
-			}
-			else {
-				if (nsInfo.prefix != null) {
-					result = XMLUIMessages._UI_WARNING_NAMESPACE_NAME_NOT_SPECIFIED + " '" + nsInfo.prefix + "'"; //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				}
-			}
-		}
-		// additional tests
-		if (result == null) {
-			for (Iterator iterator = namespaceInfoList.iterator(); iterator.hasNext();) {
-				NamespaceInfo nsInfo = (NamespaceInfo) iterator.next();
-				nsInfo.normalize();
-				if ((nsInfo.uri != null) && nsInfo.isPrefixRequired && (nsInfo.prefix == null)) {
-					result = XMLUIMessages._UI_WARNING_PREFIX_NOT_SPECIFIED + " '" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ 
-					break;
-				}
-			}
-		}
-
-		return result;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/NamespaceInfoTable.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/NamespaceInfoTable.java
deleted file mode 100644
index 8a438dc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/NamespaceInfoTable.java
+++ /dev/null
@@ -1,398 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-public class NamespaceInfoTable extends Composite {
-
-	/**
-	 * NamespaceInfoTableLabelProvider
-	 */
-	protected class NamespaceInfoTableLabelProvider implements ITableLabelProvider, IStructuredContentProvider {
-
-		public void addListener(ILabelProviderListener listener) {
-		}
-
-		public void dispose() {
-		}
-
-		public Image getColumnImage(Object object, int columnIndex) {
-			return null;
-		}
-
-		public String getColumnText(Object object, int column) {
-			NamespaceInfo info = (NamespaceInfo) object;
-			String result = null;
-			switch (column) {
-				case 0 : {
-					result = info.uri;
-					break;
-				}
-				case 1 : {
-					result = info.prefix;
-					break;
-				}
-				case 2 : {
-					result = info.locationHint;
-					break;
-				}
-			}
-			result = result != null ? result : ""; //$NON-NLS-1$
-			if (result.equals("")) { //$NON-NLS-1$
-				switch (column) {
-					case 0 : {
-						result = XMLUIMessages._UI_NO_NAMESPACE_NAME;
-						break;
-					}
-					case 1 : {
-						result = XMLUIMessages._UI_NO_PREFIX;
-						break;
-					}
-				}
-			}
-			return result;
-		}
-
-		String getDefaultPrefix() {
-			String defaultPrefix = "p"; //$NON-NLS-1$
-			if (namespaceInfoList == null) {
-				return defaultPrefix;
-			}
-			Vector v = new Vector();
-			for (int i = 0; i < namespaceInfoList.size(); i++) {
-				NamespaceInfo nsinfo = (NamespaceInfo) namespaceInfoList.get(i);
-				if (nsinfo.prefix != null) {
-					v.addElement(nsinfo.prefix);
-				}
-			}
-			if (v.contains(defaultPrefix)) {
-				String s = defaultPrefix;
-				for (int j = 0; v.contains(s); j++) {
-					s = defaultPrefix + Integer.toString(j);
-				}
-				return s;
-			}
-			else {
-				return defaultPrefix;
-			}
-		}
-
-		public Object[] getElements(Object inputElement) {
-			return namespaceInfoList.toArray();
-		}
-
-		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-		}
-
-		public boolean isDeleted(Object element) {
-			return false;
-		}
-
-		public boolean isLabelProperty(Object object, Object property) {
-			return false;
-		}
-
-		public boolean isLabelProperty(Object element, String property) {
-			return false;
-		}
-
-		public void removeListener(ILabelProviderListener listener) {
-		}
-	}
-
-	protected static final String LOCATION_HINT = XMLUIMessages._UI_LABEL_LOCATION_HINT;
-	protected static final String NAMESPACE_URI = XMLUIMessages._UI_LABEL_NAMESPACE_NAME;
-	protected static final String PREFIX = XMLUIMessages._UI_LABEL_PREFIX;
-	protected Button deleteButton;
-	protected boolean dummyRowsRemoved = false;
-	protected Button editButton;
-	protected List namespaceInfoList = new Vector();
-	protected Button newButton;
-	protected NamespaceInfoTableLabelProvider provider;
-	protected IPath resourceLocation;
-	protected TableViewer tableViewer;
-	protected UpdateListener updateListener;
-	protected int visibleRows = -1;
-
-	public NamespaceInfoTable(Composite parent) {
-		this(parent, -1, -1, -1);
-	}
-
-	public NamespaceInfoTable(Composite parent, int visibleRows) {
-		this(parent, -1, -1, visibleRows);
-	}
-
-	public NamespaceInfoTable(Composite parent, int widthHint, int heightHint) {
-		this(parent, widthHint, heightHint, -1);
-	}
-
-	public NamespaceInfoTable(Composite parent, int widthHint, int heightHint, int visibleRows) {
-		super(parent, SWT.NONE);
-		setLayout(createGridLayout());
-		setLayoutData(new GridData(GridData.FILL_BOTH));
-		Group namespaceInfoGroup = new Group(this, SWT.NONE);
-		namespaceInfoGroup.setText(XMLUIMessages._UI_LABEL_XML_SCHEMA_INFORMATION);
-		namespaceInfoGroup.setLayout(new GridLayout());
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		if (widthHint != -1) {
-			gd.widthHint = widthHint;
-		}
-		if (heightHint != -1) {
-			gd.heightHint = heightHint;
-		}
-		namespaceInfoGroup.setLayoutData(gd);
-		// WorkbenchHelp.setHelp(namespaceInfoGroup, new
-		// ControlContextComputer(namespaceInfoGroup,
-		// XMLBuilderContextIds.XMLC_NAMESPACE_GROUP));
-		String[] titleArray = {NAMESPACE_URI, PREFIX, LOCATION_HINT};
-		tableViewer = new TableViewer(namespaceInfoGroup, SWT.FULL_SELECTION);
-		provider = new NamespaceInfoTableLabelProvider();
-		tableViewer.setContentProvider(provider);
-		tableViewer.setLabelProvider(provider);
-		tableViewer.setColumnProperties(titleArray);
-		Table table = tableViewer.getTable();
-		table.setHeaderVisible(true);
-		table.setLayoutData(new GridData(GridData.FILL_BOTH));
-		int[] widthArray = {50, 20, 30};
-		TableLayout layout = new TableLayout();
-		for (int i = 0; i < titleArray.length; i++) {
-			TableColumn column = new TableColumn(table, i);
-			column.setText(titleArray[i]);
-			column.setAlignment(SWT.LEFT);
-			layout.addColumnData(new ColumnWeightData(widthArray[i], true));
-		}
-		this.visibleRows = visibleRows;
-		for (int i = 0; i < visibleRows; i++) {
-			TableItem item = new TableItem(table, SWT.NONE);
-			item.setText("#######"); //$NON-NLS-1$
-		}
-		table.setLayout(layout);
-		CellEditor[] cellEditors = new CellEditor[titleArray.length];
-		cellEditors[1] = new TextCellEditor(table);
-		cellEditors[2] = new TextCellEditor(table);
-		tableViewer.setCellEditors(cellEditors);
-		MouseAdapter mouseAdapter = new MouseAdapter() {
-			public void mouseDoubleClick(MouseEvent e) {
-				if (tableViewer.getTable().getItem(new Point(e.x, e.y)) != null) {
-					performEdit();
-				}
-			}
-		};
-		table.addMouseListener(mouseAdapter);
-		createButtons(namespaceInfoGroup);
-		ISelectionChangedListener selectionChangedListener = new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				updateButtonEnabledState();
-			}
-		};
-		tableViewer.addSelectionChangedListener(selectionChangedListener);
-	}
-
-	protected void createButtons(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		GridLayout gridLayout = new GridLayout();
-		gridLayout.numColumns = 2;
-		gridLayout.marginHeight = 0;
-		gridLayout.marginWidth = 0;
-		composite.setLayout(gridLayout);
-		Button hiddenButton = new Button(composite, SWT.NONE);
-		hiddenButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		hiddenButton.setVisible(false);
-		hiddenButton.setEnabled(false);
-		SelectionListener selectionListener = new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				if (e.widget == newButton) {
-					performNew();
-				}
-				else if (e.widget == editButton) {
-					performEdit();
-				}
-				else if (e.widget == deleteButton) {
-					performDelete();
-				}
-			}
-		};
-		// create a composite to hold the three buttons
-		Composite buttonComposite = new Composite(composite, SWT.NONE);
-		buttonComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		GridLayout buttonGridLayout = new GridLayout();
-		buttonGridLayout.numColumns = 3;
-		buttonGridLayout.makeColumnsEqualWidth = true;
-		buttonComposite.setLayout(buttonGridLayout);
-		// add the New button
-		//
-		newButton = new Button(buttonComposite, SWT.NONE);
-		newButton.setText(XMLUIMessages._UI_BUTTON_NEW);
-		newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		newButton.addSelectionListener(selectionListener);
-		// add the Edit button
-		//
-		editButton = new Button(buttonComposite, SWT.NONE);
-		editButton.setText(XMLUIMessages._UI_BUTTON_EDIT);
-		editButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		editButton.addSelectionListener(selectionListener);
-		// add the Delete button
-		//
-		deleteButton = new Button(buttonComposite, SWT.NONE);
-		deleteButton.setText(XMLUIMessages._UI_BUTTON_DELETE);
-		deleteButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		deleteButton.addSelectionListener(selectionListener);
-	}
-
-	public GridLayout createGridLayout() {
-		GridLayout gridLayout = new GridLayout();
-		gridLayout.marginWidth = 0;
-		gridLayout.horizontalSpacing = 0;
-		return gridLayout;
-	}
-
-	public List getNamespaceInfoList() {
-		return namespaceInfoList;
-	}
-
-	protected NamespaceInfo getTargetNamespaceInfo() {
-		return ((namespaceInfoList != null) && (namespaceInfoList.size() > 0)) ? (NamespaceInfo) namespaceInfoList.get(0) : null;
-	}
-
-	protected EditNamespaceInfoDialog invokeDialog(String title, NamespaceInfo info) {
-		Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
-		EditNamespaceInfoDialog dialog = new EditNamespaceInfoDialog(shell, info);
-		dialog.create();
-		dialog.getShell().setText(title);
-		dialog.setBlockOnOpen(true);
-		dialog.setResourceLocation(resourceLocation);
-		dialog.open();
-		return dialog;
-	}
-
-	protected void performDelayedUpdate() {
-		Runnable delayedUpdate = new Runnable() {
-			public void run() {
-				update();
-			}
-		};
-		getDisplay().asyncExec(delayedUpdate);
-		if (updateListener != null) {
-			updateListener.updateOccured(this, namespaceInfoList);
-		}
-	}
-
-	public void performDelete() {
-		ISelection selection = tableViewer.getSelection();
-		Object selectedObject = (selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;
-		if (selectedObject != null) {
-			namespaceInfoList.remove(selectedObject);
-			performDelayedUpdate();
-		}
-	}
-
-	public void performEdit() {
-		ISelection selection = tableViewer.getSelection();
-		Object selectedObject = (selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;
-		if (selectedObject instanceof NamespaceInfo) {
-			invokeDialog(XMLUIMessages._UI_LABEL_NEW_NAMESPACE_INFORMATION, (NamespaceInfo) selectedObject);
-			performDelayedUpdate();
-		}
-	}
-
-	public void performNew() {
-		NamespaceInfo info = new NamespaceInfo();
-		EditNamespaceInfoDialog dialog = invokeDialog(XMLUIMessages._UI_LABEL_NEW_NAMESPACE_INFORMATION, info);
-		if (dialog.getReturnCode() == Window.OK) {
-			namespaceInfoList.add(info);
-			performDelayedUpdate();
-		}
-	}
-
-	public void setNamespaceInfoList(List namespaceInfoList) {
-		this.namespaceInfoList = namespaceInfoList;
-		update();
-	}
-
-	public void setResourceLocation(IPath resourceLocation) {
-		this.resourceLocation = resourceLocation;
-	}
-
-	public void setUpdateListener(UpdateListener updateListener) {
-		this.updateListener = updateListener;
-	}
-
-	public void update() {
-		updateHelper(namespaceInfoList);
-	}
-
-	public void updateButtonEnabledState() {
-		ISelection selection = tableViewer.getSelection();
-		Object selectedObject = (selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;
-		NamespaceInfo info = (NamespaceInfo) selectedObject;
-		editButton.setEnabled(info != null);
-		deleteButton.setEnabled((info != null) && (info.getProperty("unremovable") == null)); //$NON-NLS-1$
-	}
-
-	public void updateHelper(List namespaceInfoList) {
-		if ((visibleRows != -1) && !dummyRowsRemoved) {
-			dummyRowsRemoved = true;
-			tableViewer.getTable().removeAll();
-		}
-		ISelection selection = tableViewer.getSelection();
-		tableViewer.setInput(namespaceInfoList);
-		if (selection.isEmpty()) {
-			if (namespaceInfoList.size() > 0) {
-				tableViewer.setSelection(new StructuredSelection(namespaceInfoList.get(0)));
-			}
-		}
-		else {
-			tableViewer.setSelection(selection);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectFileOrXMLCatalogIdDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectFileOrXMLCatalogIdDialog.java
deleted file mode 100644
index d36cf7b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectFileOrXMLCatalogIdDialog.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SelectFileOrXMLCatalogIdDialog extends Dialog {
-	protected int catalogEntryType;
-	protected String[] extensions;
-	protected IFile file;
-	protected String id;
-	protected Button okButton;
-	protected SelectFileOrXMLCatalogIdPanel panel;
-
-	public SelectFileOrXMLCatalogIdDialog(Shell parentShell, String[] extensions) {
-		this(parentShell, extensions, 0);
-	}
-
-	public SelectFileOrXMLCatalogIdDialog(Shell parentShell, String[] extensions, int catalogEntryType) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.extensions = extensions;
-		this.catalogEntryType = catalogEntryType;
-	}
-
-
-	protected void buttonPressed(int buttonId) {
-		if (buttonId == IDialogConstants.OK_ID) {
-			file = panel.getFile();
-			id = panel.getXMLCatalogId();
-		}
-		super.buttonPressed(buttonId);
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		okButton.setEnabled(false);
-		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-	}
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogArea = (Composite) super.createDialogArea(parent);
-
-		panel = new SelectFileOrXMLCatalogIdPanel(dialogArea);
-		panel.setCatalogEntryType(catalogEntryType);
-		panel.setFilterExtensions(extensions);
-		panel.setVisibleHelper(true);
-		SelectFileOrXMLCatalogIdPanel.Listener listener = new SelectFileOrXMLCatalogIdPanel.Listener() {
-			public void completionStateChanged() {
-				updateButtonState();
-			}
-		};
-		panel.setListener(listener);
-
-		return dialogArea;
-	}
-
-	public IFile getFile() {
-		return file;
-	}
-
-	public String getId() {
-		return id;
-	}
-
-	protected void updateButtonState() {
-		okButton.setEnabled((panel.getFile() != null) || (panel.getXMLCatalogId() != null));
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectFileOrXMLCatalogIdPanel.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectFileOrXMLCatalogIdPanel.java
deleted file mode 100644
index 2987b04..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectFileOrXMLCatalogIdPanel.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *	   David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.wst.common.ui.internal.viewers.SelectSingleFileView;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-
-public class SelectFileOrXMLCatalogIdPanel extends Composite implements SelectionListener {
-
-	/**
-	 * TODO: Change the name of this interface; "Listener" is used by SWT.
-	 */
-	public interface Listener {
-		void completionStateChanged();
-	}
-
-	protected class MySelectSingleFileView extends SelectSingleFileView implements SelectSingleFileView.Listener {
-		protected Control control;
-
-		public MySelectSingleFileView(Composite parent) {
-			super(null, true);
-			// String[] ext = {".dtd"};
-			// addFilterExtensions(ext);
-			control = createControl(parent);
-			control.setLayoutData(new GridData(GridData.FILL_BOTH));
-			MySelectSingleFileView.this.setListener(this);
-		}
-
-		public Control getControl() {
-			return control;
-		}
-
-		public void setControlComplete(boolean isComplete) {
-			updateCompletionStateChange();
-		}
-
-		public void setVisibleHelper(boolean isVisible) {
-			super.setVisibleHelper(isVisible);
-		}
-	}
-
-	protected Listener listener;
-	protected PageBook pageBook;
-
-	protected Button[] radioButton;
-	protected MySelectSingleFileView selectSingleFileView;
-	protected SelectXMLCatalogIdPanel selectXMLCatalogIdPanel;
-
-	public SelectFileOrXMLCatalogIdPanel(Composite parent) {
-		super(parent, SWT.NONE);
-
-		// container group
-		setLayout(new GridLayout());
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		gd.heightHint = 400;
-		gd.widthHint = 400;
-		setLayoutData(gd);
-
-		radioButton = new Button[2];
-		radioButton[0] = new Button(this, SWT.RADIO);
-		radioButton[0].setText(XMLUIMessages._UI_RADIO_BUTTON_SELECT_FROM_WORKSPACE);
-		radioButton[0].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		radioButton[0].setSelection(true);
-		radioButton[0].addSelectionListener(this);
-
-		radioButton[1] = new Button(this, SWT.RADIO);
-		radioButton[1].setText(XMLUIMessages._UI_RADIO_BUTTON_SELECT_FROM_CATALOG);
-		radioButton[1].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		radioButton[1].addSelectionListener(this);
-
-		pageBook = new PageBook(this, SWT.NONE);
-		pageBook.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-		selectSingleFileView = new MySelectSingleFileView(pageBook);
-
-		ICatalog xmlCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
-		selectXMLCatalogIdPanel = new SelectXMLCatalogIdPanel(pageBook, xmlCatalog);
-		selectXMLCatalogIdPanel.getTableViewer().addSelectionChangedListener(new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				updateCompletionStateChange();
-			}
-		});
-		Dialog.applyDialogFont(parent);
-		pageBook.showPage(selectSingleFileView.getControl());
-
-	}
-
-	public IFile getFile() {
-		IFile result = null;
-		if (radioButton[0].getSelection()) {
-			result = selectSingleFileView.getFile();
-		}
-		return result;
-	}
-
-	public ICatalogEntry getXMLCatalogEntry() {
-		ICatalogEntry result = null;
-		if (radioButton[1].getSelection()) {
-			result = selectXMLCatalogIdPanel.getXMLCatalogEntry();
-		}
-		return result;
-	}
-
-	public String getXMLCatalogId() {
-		String result = null;
-		if (radioButton[1].getSelection()) {
-			result = selectXMLCatalogIdPanel.getId();
-		}
-		return result;
-	}
-
-	public String getXMLCatalogURI() {
-		String result = null;
-		if (radioButton[1].getSelection()) {
-			result = selectXMLCatalogIdPanel.getURI();
-		}
-		return result;
-	}
-
-	public void setCatalogEntryType(int catalogEntryType) {
-		selectXMLCatalogIdPanel.setCatalogEntryType(catalogEntryType);
-	}
-
-	public void setFilterExtensions(String[] filterExtensions) {
-		selectSingleFileView.resetFilters();
-		selectSingleFileView.addFilterExtensions(filterExtensions);
-
-		selectXMLCatalogIdPanel.getTableViewer().setFilterExtensions(filterExtensions);
-	}
-
-	public void setListener(Listener listener) {
-		this.listener = listener;
-	}
-
-	public void setVisibleHelper(boolean isVisible) {
-		selectSingleFileView.setVisibleHelper(isVisible);
-	}
-
-	public void updateCompletionStateChange() {
-		if (listener != null) {
-			listener.completionStateChanged();
-		}
-	}
-
-	public void widgetDefaultSelected(SelectionEvent e) {
-	}
-
-	public void widgetSelected(SelectionEvent e) {
-		if (e.widget == radioButton[0]) {
-			pageBook.showPage(selectSingleFileView.getControl());
-		}
-		else {
-			pageBook.showPage(selectXMLCatalogIdPanel);
-		}
-		updateCompletionStateChange();
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectXMLCatalogIdDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectXMLCatalogIdDialog.java
deleted file mode 100644
index 624c96a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectXMLCatalogIdDialog.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-
-
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.ui.internal.util.XMLCommonUIContextIds;
-
-
-
-public class SelectXMLCatalogIdDialog extends Dialog {
-	protected String[] extensions;
-	protected Button okButton;
-	protected SelectXMLCatalogIdPanel panel;
-	protected String publicId;
-	protected String systemId;
-
-	public SelectXMLCatalogIdDialog(Shell parentShell, String[] extensions) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.extensions = extensions;
-	}
-
-
-	protected void buttonPressed(int buttonId) {
-		if (buttonId == IDialogConstants.OK_ID) {
-			ISelection selection = panel.getTableViewer().getSelection();
-			Object selectedObject = (selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;
-
-			if (selectedObject instanceof ICatalogEntry) {
-				ICatalogEntry mappingInfo = (ICatalogEntry) selectedObject;
-				publicId = mappingInfo.getKey();
-				systemId = computeDefaultSystemId(mappingInfo);
-			}
-		}
-		super.buttonPressed(buttonId);
-	}
-
-	protected String computeDefaultSystemId(ICatalogEntry mappingInfo) {
-		String result = mappingInfo.getAttributeValue(ICatalogEntry.ATTR_WEB_URL);
-		if ((result == null) && (mappingInfo.getURI() != null)) {
-			int index = mappingInfo.getURI().lastIndexOf("/"); //$NON-NLS-1$
-			String lastSegment = index != -1 ? mappingInfo.getURI().substring(index + 1) : mappingInfo.getURI();
-			result = lastSegment;
-		}
-		return result;
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		okButton.setEnabled(false);
-		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-	}
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogArea = (Composite) super.createDialogArea(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialogArea, XMLCommonUIContextIds.XCUI_CATALOG_DIALOG);
-
-		ICatalog xmlCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
-		panel = new SelectXMLCatalogIdPanel(dialogArea, xmlCatalog);
-
-		ISelectionChangedListener listener = new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				updateButtonState();
-			}
-		};
-		panel.getTableViewer().setFilterExtensions(extensions);
-		panel.getTableViewer().addSelectionChangedListener(listener);
-		return dialogArea;
-	}
-
-
-
-	public String getId() {
-		return publicId;
-	}
-
-	public String getSystemId() {
-		return systemId;
-	}
-
-	protected void updateButtonState() {
-		ISelection selection = panel.getTableViewer().getSelection();
-		okButton.setEnabled(!selection.isEmpty());
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectXMLCatalogIdPanel.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectXMLCatalogIdPanel.java
deleted file mode 100644
index 01a9e8b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectXMLCatalogIdPanel.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-
-public class SelectXMLCatalogIdPanel extends Composite {
-	protected int catalogEntryType;
-	protected boolean doTableSizeHack = false;
-
-	protected XMLCatalogTableViewer tableViewer;
-	protected ICatalog fXmlCatalog;
-
-	public SelectXMLCatalogIdPanel(Composite parent, ICatalog xmlCatalog) {
-		super(parent, SWT.NONE);
-		this.fXmlCatalog = xmlCatalog;
-
-		GridLayout gridLayout = new GridLayout();
-		this.setLayout(gridLayout);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.heightHint = 200;
-		gd.widthHint = 700;
-		this.setLayoutData(gd);
-
-		Label label = new Label(this, SWT.NONE);
-		label.setText(XMLUIMessages._UI_LABEL_XML_CATALOG_COLON);
-
-		tableViewer = createTableViewer(this);
-		tableViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
-		tableViewer.setInput("dummy"); //$NON-NLS-1$
-	}
-
-	protected XMLCatalogTableViewer createTableViewer(Composite parent) {
-		String headings[] = new String[2];
-		headings[0] = XMLUIMessages._UI_LABEL_KEY;
-		headings[1] = XMLUIMessages._UI_LABEL_URI;
-
-		XMLCatalogTableViewer theTableViewer = new XMLCatalogTableViewer(parent, headings) {
-
-			protected void addXMLCatalogEntries(List list, ICatalogEntry[] entries) {
-				for (int i = 0; i < entries.length; i++) {
-					ICatalogEntry entry = entries[i];
-					if (catalogEntryType == 0) {
-						list.add(entry);
-					}
-					else if (catalogEntryType == entry.getEntryType()) {
-						list.add(entry);
-					}
-				}
-			}
-
-			public Collection getXMLCatalogEntries() {
-				List result = null;
-
-				if ((fXmlCatalog == null) || doTableSizeHack) {
-					// this lets us create a table with an initial height of
-					// 10 rows
-					// otherwise we get stuck with 0 row heigh table... that's
-					// too small
-					doTableSizeHack = false;
-					result = new Vector();
-					for (int i = 0; i < 6; i++) {
-						result.add(""); //$NON-NLS-1$
-					}
-				}
-				else {
-					result = new Vector();
-					INextCatalog[] nextCatalogs = fXmlCatalog.getNextCatalogs();
-					for (int i = 0; i < nextCatalogs.length; i++) {
-						INextCatalog catalog = nextCatalogs[i];
-						ICatalog referencedCatalog = catalog.getReferencedCatalog();
-						if (referencedCatalog != null) {
-							if (XMLCorePlugin.SYSTEM_CATALOG_ID.equals(referencedCatalog.getId())) {
-								ICatalog systemCatalog = referencedCatalog;
-								addXMLCatalogEntries(result, systemCatalog.getCatalogEntries());
-
-							}
-							else if (XMLCorePlugin.USER_CATALOG_ID.equals(referencedCatalog.getId())) {
-								ICatalog userCatalog = referencedCatalog;
-								addXMLCatalogEntries(result, userCatalog.getCatalogEntries());
-
-							}
-						}
-					}
-				}
-				return result;
-			}
-		};
-		return theTableViewer;
-	}
-
-
-	public String getId() {
-		ICatalogEntry entry = getXMLCatalogEntry();
-		return entry != null ? entry.getKey() : null;
-	}
-
-	public XMLCatalogTableViewer getTableViewer() {
-		return tableViewer;
-	}
-
-	public String getURI() {
-		ICatalogEntry entry = getXMLCatalogEntry();
-		return entry != null ? entry.getURI() : null;
-	}
-
-	public ICatalogEntry getXMLCatalogEntry() {
-		ICatalogEntry result = null;
-		ISelection selection = tableViewer.getSelection();
-		Object selectedObject = (selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;
-		if (selectedObject instanceof ICatalogEntry) {
-			result = (ICatalogEntry) selectedObject;
-		}
-		return result;
-	}
-
-	public void setCatalogEntryType(int catalogEntryType) {
-		this.catalogEntryType = catalogEntryType;
-		tableViewer.refresh();
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/XMLCatalogTableViewer.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/XMLCatalogTableViewer.java
deleted file mode 100644
index ada8759..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/XMLCatalogTableViewer.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-
-
-package org.eclipse.wst.xml.ui.internal.dialogs;
-
-import com.ibm.icu.text.Collator;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Comparator;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-
-
-public class XMLCatalogTableViewer extends TableViewer {
-
-
-	public class CatalogEntryContentProvider implements IStructuredContentProvider {
-
-		public void dispose() {
-		}
-
-		public Object[] getElements(Object element) {
-			Object[] array = getXMLCatalogEntries().toArray();
-			Comparator comparator = new Comparator() {
-				public int compare(Object o1, Object o2) {
-					int result = 0;
-					if ((o1 instanceof ICatalogEntry) && (o2 instanceof ICatalogEntry)) {
-						ICatalogEntry mappingInfo1 = (ICatalogEntry) o1;
-						ICatalogEntry mappingInfo2 = (ICatalogEntry) o2;
-						result = Collator.getInstance().compare(mappingInfo1.getKey(), mappingInfo2.getKey());
-					}
-					return result;
-				}
-			};
-			Arrays.sort(array, comparator);
-			return array;
-		}
-
-		public void inputChanged(Viewer viewer, Object old, Object newobj) {
-		}
-
-		public boolean isDeleted(Object object) {
-			return false;
-		}
-	}
-
-	public class CatalogEntryLabelProvider extends LabelProvider implements ITableLabelProvider {
-
-		public Image getColumnImage(Object object, int columnIndex) {
-			Image result = null;
-			if (columnIndex == 0) {
-				Image base = null;
-				if (object instanceof ICatalogEntry) {
-					ICatalogEntry catalogEntry = (ICatalogEntry) object;
-					String uri = catalogEntry.getURI();
-					if (uri.endsWith("dtd")) { //$NON-NLS-1$
-						base = dtdFileImage;
-					}
-					else if (uri.endsWith("xsd")) { //$NON-NLS-1$
-						base = xsdFileImage;
-					}
-					else {
-						base = unknownFileImage;
-					}
-
-					if (base != null) {
-						if (URIHelper.isReadableURI(uri, false)) {
-							result = base;
-						}
-						else {
-							// TODO... SSE port
-							result = base;// imageFactory.createCompositeImage(base,
-							// errorImage,
-							// ImageFactory.BOTTOM_LEFT);
-						}
-					}
-				}
-			}
-			return result;
-		}
-
-		public String getColumnText(Object object, int columnIndex) {
-			String result = null;
-			if (object instanceof ICatalogEntry) {
-				ICatalogEntry catalogEntry = (ICatalogEntry) object;
-				result = columnIndex == 0 ? catalogEntry.getKey() : catalogEntry.getURI();
-				result = URIHelper.removePlatformResourceProtocol(result);
-			}
-			return result != null ? result : ""; //$NON-NLS-1$
-		}
-	}
-
-
-	class XMLCatalogTableViewerFilter extends ViewerFilter {
-		protected String[] extensions;
-
-		public XMLCatalogTableViewerFilter(String[] extensions) {
-			this.extensions = extensions;
-		}
-
-		public boolean isFilterProperty(Object element, Object property) {
-			return false;
-		}
-
-		public boolean select(Viewer viewer, Object parent, Object element) {
-			boolean result = false;
-			if (element instanceof ICatalogEntry) {
-				ICatalogEntry catalogEntry = (ICatalogEntry) element;
-				for (int i = 0; i < extensions.length; i++) {
-					if (catalogEntry.getURI().endsWith(extensions[i])) {
-						result = true;
-						break;
-					}
-				}
-			}
-			return result;
-		}
-	}
-
-	protected static Image dtdFileImage = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_DTDFILE);
-
-	protected static String ERROR_STATE_KEY = "errorstatekey"; //$NON-NLS-1$
-	protected static Image errorImage = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OVR_ERROR);
-
-	protected static Image unknownFileImage = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TXTEXT);
-	protected static Image xsdFileImage = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_XSDFILE);
-
-	// protected ImageFactory imageFactory = new ImageFactory();
-
-	public XMLCatalogTableViewer(Composite parent, String[] columnProperties) {
-		super(parent, SWT.FULL_SELECTION);
-
-		Table table = getTable();
-		table.setLinesVisible(true);
-		table.setHeaderVisible(true);
-		table.setLinesVisible(true);
-
-		TableLayout layout = new TableLayout();
-		for (int i = 0; i < columnProperties.length; i++) {
-			TableColumn column = new TableColumn(table, i);
-			column.setText(columnProperties[i]);
-			column.setAlignment(SWT.LEFT);
-			layout.addColumnData(new ColumnWeightData(50, true));
-		}
-		table.setLayout(layout);
-		table.setLinesVisible(false);
-
-		setColumnProperties(columnProperties);
-
-		setContentProvider(new CatalogEntryContentProvider());
-		setLabelProvider(new CatalogEntryLabelProvider());
-	}
-
-	public Collection getXMLCatalogEntries() {
-		return null;
-	}
-
-
-	public void menuAboutToShow(IMenuManager menuManager) {
-		Action action = new Action("hello") { //$NON-NLS-1$
-			public void run() {
-				System.out.println("run!"); //$NON-NLS-1$
-			}
-		};
-		menuManager.add(action);
-	}
-
-	public void setFilterExtensions(String[] extensions) {
-		resetFilters();
-		addFilter(new XMLCatalogTableViewerFilter(extensions));
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dnd/DragNodeCommand.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dnd/DragNodeCommand.java
deleted file mode 100644
index 3f5c66f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dnd/DragNodeCommand.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.dnd;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.wst.common.ui.internal.dnd.DefaultDragAndDropCommand;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-public class DragNodeCommand extends DefaultDragAndDropCommand {
-	private List fSelections;
-	private TreeViewer fTreeViewer;
-
-	public DragNodeCommand(Object target, float location, int operations, int operation, Collection sources, TreeViewer treeViewer) {
-		super(target, location, operations, operation, sources);
-		fTreeViewer = treeViewer;
-		fSelections = new ArrayList();
-	}
-
-	private void beginModelChange(Node node, boolean batchUpdate) {
-		IStructuredModel structuredModel = getStructuredModel(node);
-		if (structuredModel != null) {
-			String undoDesc = new String();
-			if (getOperation() == DND.DROP_MOVE) {
-				undoDesc = XMLUIMessages.DragNodeCommand_0;
-			}
-			else if (getOperation() == DND.DROP_COPY) {
-				undoDesc = XMLUIMessages.DragNodeCommand_1;
-			}
-
-			structuredModel.beginRecording(this, undoDesc);
-			if (batchUpdate) {
-				// structuredModel.aboutToChangeModel();
-			}
-		}
-	}
-
-	public boolean canExecute() {
-		return executeHelper(true);
-	}
-
-	private boolean doModify(Node source, Node parentNode, Node refChild, boolean testOnly) {
-		boolean result = false;
-		if (source.getNodeType() == Node.ATTRIBUTE_NODE) {
-			Attr sourceAttribute = (Attr) source;
-			Element sourceAttributeOwnerElement = sourceAttribute.getOwnerElement();
-			if ((parentNode.getNodeType() == Node.ELEMENT_NODE) && (sourceAttributeOwnerElement != parentNode)) {
-				result = true;
-				if (!testOnly) {
-					try {
-						if (getOperation() == DND.DROP_MOVE) {
-							Element targetElement = (Element) parentNode;
-							sourceAttributeOwnerElement.removeAttributeNode(sourceAttribute);
-							targetElement.getAttributes().setNamedItem(sourceAttribute);
-							fSelections.add(sourceAttribute);
-							}
-						else if (getOperation() == DND.DROP_COPY) {
-							Attr cloneAttribute = (Attr) sourceAttribute.cloneNode(false);
-							Element targetElement = (Element) parentNode;
-							targetElement.getAttributes().setNamedItem(cloneAttribute);
-							fSelections.add(cloneAttribute);
-						}
-					}
-					catch (Exception e) {
-						Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-					}
-				}
-			}
-		}
-		else {
-			if (((parentNode.getNodeType() == Node.ELEMENT_NODE) || (parentNode.getNodeType() == Node.DOCUMENT_NODE)) && !(refChild instanceof Attr)) {
-				result = true;
-
-				if (!testOnly) {
-					try {
-						if (isAncestor(source, parentNode)) {
-							// System.out.println("can not perform this drag drop
-							// operation.... todo... pop up dialog");
-						}
-						else {
-							// defect 221055 this test is required or else the
-							// node will
-							// be removed from the tree and the insert will fail
-							if (source != refChild) {
-								if (getOperation() == DND.DROP_MOVE) {
-									Node oldParent = source.getParentNode();
-									Node oldSibling = source.getNextSibling();
-									oldParent.removeChild(source);
-									try {
-										parentNode.insertBefore(source, refChild);
-									} catch (DOMException e) {
-										// bug151692 - if unable to move node to new location, reinsert back to old location
-										oldParent.insertBefore(source, oldSibling);
-									}
-									fSelections.add(source);
-								}
-								else if (getOperation() == DND.DROP_COPY) {
-									Node nodeClone = source.cloneNode(true);
-									parentNode.insertBefore(nodeClone, refChild);
-									fSelections.add(nodeClone);
-								}
-							}
-						}
-					}
-					catch (Exception e) {
-						Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-					}
-				}
-			}
-		}
-		return result;
-	}
-
-	private void endModelChange(Node node, boolean batchUpdate) {
-		IStructuredModel structuredModel = getStructuredModel(node);
-		if (structuredModel != null) {
-			structuredModel.endRecording(this);
-			if (batchUpdate) {
-				// structuredModel.changedModel();
-			}
-		}
-	}
-
-	public void execute() {
-		executeHelper(false);
-
-		// Make our selection if the treeViewer != null
-		if (fTreeViewer != null) {
-			StructuredSelection structuredSelection = new StructuredSelection(fSelections);
-			fTreeViewer.setSelection(structuredSelection);
-		}
-	}
-
-	private boolean executeHelper(boolean testOnly) {
-		boolean result = true;
-		if (target instanceof Node) {
-			Node targetNode = (Node) target;
-			Node parentNode = getParentForDropPosition(targetNode);
-			Node refChild = getRefChild(targetNode);
-
-			Vector sourcesList = new Vector();
-			sourcesList.addAll(sources);
-
-			removeMemberDescendants(sourcesList);
-			boolean performBatchUpdate = sourcesList.size() > 5;
-
-			if (!testOnly) {
-				beginModelChange(targetNode, performBatchUpdate);
-			}
-			for (Iterator i = sourcesList.iterator(); i.hasNext();) {
-				Object source = i.next();
-				if (source instanceof Node) {
-					if (!((refChild == null) && (targetNode instanceof Attr))) {
-						result = doModify((Node) source, parentNode, refChild, testOnly);
-					}
-					else {
-						result = false;
-					}
-					if (!result) {
-						break;
-					}
-				}
-			}
-			if (!testOnly) {
-				endModelChange(targetNode, performBatchUpdate);
-			}
-		}
-		else {
-			result = false;
-		}
-		return result;
-	}
-
-
-	public int getFeedback() {
-		int result = DND.FEEDBACK_SELECT;
-		if (location > 0.75) {
-			result = DND.FEEDBACK_INSERT_AFTER;
-		}
-		else if (location < 0.25) {
-			result = DND.FEEDBACK_INSERT_BEFORE;
-		}
-		return result;
-	}
-
-	private Node getParentForDropPosition(Node node) {
-		Node result = null;
-
-		int feedback = getFeedback();
-		if (feedback == DND.FEEDBACK_SELECT) {
-			result = node;
-		}
-		else {
-			result = getParentOrOwner(node);
-		}
-		return result;
-	}
-
-
-	private Node getParentOrOwner(Node node) {
-		return (node.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) node).getOwnerElement() : node.getParentNode();
-	}
-
-
-	private Node getRefChild(Node node) {
-		Node result = null;
-
-		int feedback = getFeedback();
-
-		if (feedback == DND.FEEDBACK_INSERT_BEFORE) {
-			result = node;
-		}
-		else if (feedback == DND.FEEDBACK_INSERT_AFTER) {
-			result = node.getNextSibling();
-		}
-		return result;
-	}
-
-	private IStructuredModel getStructuredModel(Node node) {
-		IStructuredModel result = null;
-		if (node instanceof IDOMNode) {
-			result = ((IDOMNode) node).getModel();
-		}
-		return result;
-	}
-
-	// returns true if a is an ancestore of b
-	//
-	private boolean isAncestor(Node a, Node b) {
-		boolean result = false;
-		for (Node parent = b; parent != null; parent = parent.getParentNode()) {
-			if (parent == a) {
-				result = true;
-				break;
-			}
-		}
-		return result;
-	}
-
-
-	/**
-	 * This method removes members of the list that have ancestors that are
-	 * also members of the list.
-	 */
-	private void removeMemberDescendants(List list) {
-		Hashtable table = new Hashtable();
-		for (Iterator i = list.iterator(); i.hasNext();) {
-			Object node = i.next();
-			table.put(node, node);
-		}
-
-		for (int i = list.size() - 1; i >= 0; i--) {
-			Node node = (Node) list.get(i);
-			for (Node parent = getParentOrOwner(node); parent != null; parent = getParentOrOwner(parent)) {
-				if (table.get(parent) != null) {
-					list.remove(i);
-					break;
-				}
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dnd/XMLDragAndDropManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dnd/XMLDragAndDropManager.java
deleted file mode 100644
index 48097a8..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dnd/XMLDragAndDropManager.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-
-
-package org.eclipse.wst.xml.ui.internal.dnd;
-
-import java.util.Collection;
-
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.wst.common.ui.internal.dnd.DragAndDropCommand;
-import org.eclipse.wst.common.ui.internal.dnd.DragAndDropManager;
-import org.eclipse.wst.common.ui.internal.dnd.ObjectTransfer;
-import org.eclipse.wst.common.ui.internal.dnd.ViewerDragAdapter;
-import org.eclipse.wst.common.ui.internal.dnd.ViewerDropAdapter;
-import org.w3c.dom.Node;
-
-public class XMLDragAndDropManager implements DragAndDropManager {
-	private TreeViewer fViewer;
-
-	public static void addDragAndDropSupport(TreeViewer viewer) {
-		int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
-		Transfer[] transfers = new Transfer[]{ObjectTransfer.getInstance()};
-		viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
-		viewer.addDropSupport(dndOperations, transfers, new ViewerDropAdapter(viewer, new XMLDragAndDropManager(viewer)));
-	}
-
-	public XMLDragAndDropManager() {
-		super();
-	}
-
-	public XMLDragAndDropManager(TreeViewer viewer) {
-		fViewer = viewer;
-	}
-
-	public DragAndDropCommand createCommand(Object target, float location, int operations, int operation, Collection source) {
-		DragAndDropCommand result = null;
-		if (target instanceof Node) {
-			result = new DragNodeCommand(target, location, operations, operation, source, fViewer);
-		}
-		return result;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/doubleclick/XMLDoubleClickStrategy.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/doubleclick/XMLDoubleClickStrategy.java
deleted file mode 100644
index b23097e..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/doubleclick/XMLDoubleClickStrategy.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.doubleclick;
-
-import org.eclipse.jface.text.DefaultTextDoubleClickStrategy;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.w3c.dom.Node;
-
-
-public class XMLDoubleClickStrategy extends DefaultTextDoubleClickStrategy {
-	protected static final char DOUBLE_QUOTE = '\"';
-	protected static final char SINGLE_QUOTE = '\'';
-	protected static final char SPACE = ' ';
-	protected int fCaretPosition = -1;
-	protected int fDoubleClickCount = 0;
-	protected Node fNode = null;
-	protected IStructuredDocumentRegion fStructuredDocumentRegion = null;
-	protected String fStructuredDocumentRegionText = ""; //$NON-NLS-1$
-	protected IStructuredModel fStructuredModel = null;
-	protected StructuredTextViewer fStructuredTextViewer;
-	protected ITextRegion fTextRegion = null;
-
-	public void doubleClicked(ITextViewer textViewer) {
-		if (textViewer instanceof StructuredTextViewer) {
-			fStructuredTextViewer = (StructuredTextViewer) textViewer;
-			try {
-				fStructuredModel = StructuredModelManager.getModelManager().getExistingModelForRead(fStructuredTextViewer.getDocument());
-
-				if (fStructuredModel != null) {
-					int caretPosition = textViewer.getSelectedRange().x;
-					if (caretPosition < 0) {
-						return;
-					}
-
-					fNode = (Node) fStructuredModel.getIndexedRegion(caretPosition);
-					if (fNode == null) {
-						return;
-					}
-
-					updateDoubleClickCount(caretPosition);
-					updateStructuredDocumentRegion();
-					updateTextRegion();
-
-					if (fNode.getNodeType() == Node.TEXT_NODE) {
-						processTextDoubleClicked();
-					}
-					else {
-						processElementDoubleClicked();
-					}
-				}
-			}
-			finally {
-				if (fStructuredModel != null) {
-					fStructuredModel.releaseFromRead();
-				}
-			}
-		}
-	}
-
-	protected Point getWord(String string, int cursor) {
-		if (string == null) {
-			return null;
-		}
-
-		int wordStart = 0;
-		int wordEnd = string.length();
-
-		wordStart = string.lastIndexOf(SPACE, cursor - 1);
-		int temp = string.lastIndexOf(SINGLE_QUOTE, cursor - 1);
-		wordStart = Math.max(wordStart, temp);
-		temp = string.lastIndexOf(DOUBLE_QUOTE, cursor - 1);
-		wordStart = Math.max(wordStart, temp);
-		if (wordStart == -1) {
-			wordStart = cursor;
-		}
-		else {
-			wordStart++;
-		}
-
-		wordEnd = string.indexOf(SPACE, cursor);
-		if (wordEnd == -1) {
-			wordEnd = string.length();
-		}
-		temp = string.indexOf(SINGLE_QUOTE, cursor);
-		if (temp == -1) {
-			temp = string.length();
-		}
-		wordEnd = Math.min(wordEnd, temp);
-		temp = string.indexOf(DOUBLE_QUOTE, cursor);
-		if (temp == -1) {
-			temp = string.length();
-		}
-		wordEnd = Math.min(wordEnd, temp);
-		if (wordEnd == string.length()) {
-			wordEnd = cursor;
-		}
-
-		if ((wordStart == wordEnd) && !isQuoted(string)) {
-			wordStart = 0;
-			wordEnd = string.length();
-		}
-
-		return new Point(wordStart, wordEnd);
-	}
-
-	protected boolean isQuoted(String string) {
-		if ((string == null) || (string.length() < 2)) {
-			return false;
-		}
-
-		int lastIndex = string.length() - 1;
-		char firstChar = string.charAt(0);
-		char lastChar = string.charAt(lastIndex);
-
-		return (((firstChar == SINGLE_QUOTE) && (lastChar == SINGLE_QUOTE)) || ((firstChar == DOUBLE_QUOTE) && (lastChar == DOUBLE_QUOTE)));
-	}
-
-	protected void processElementAttrEqualsDoubleClicked2Times() {
-		int prevRegionOffset = fStructuredDocumentRegion.getStartOffset(fTextRegion) - 1;
-		ITextRegion prevRegion = fStructuredDocumentRegion.getRegionAtCharacterOffset(prevRegionOffset);
-		int nextRegionOffset = fStructuredDocumentRegion.getEndOffset(fTextRegion);
-		ITextRegion nextRegion = fStructuredDocumentRegion.getRegionAtCharacterOffset(nextRegionOffset);
-
-		if ((prevRegion != null) && (prevRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) && (nextRegion != null) && (nextRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)) {
-			fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStartOffset(prevRegion), nextRegion.getTextEnd() - prevRegion.getStart());
-		}
-	}
-
-	protected void processElementAttrNameDoubleClicked2Times() {
-		int nextRegionOffset = fStructuredDocumentRegion.getEndOffset(fTextRegion);
-		ITextRegion nextRegion = fStructuredDocumentRegion.getRegionAtCharacterOffset(nextRegionOffset);
-
-		if (nextRegion != null) {
-			nextRegionOffset = fStructuredDocumentRegion.getEndOffset(nextRegion);
-			nextRegion = fStructuredDocumentRegion.getRegionAtCharacterOffset(nextRegionOffset);
-			if ((nextRegion != null) && (nextRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)) {
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStartOffset(fTextRegion), nextRegion.getTextEnd() - fTextRegion.getStart());
-			}
-			else {
-				// attribute has no value
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStart(), fStructuredDocumentRegion.getLength());
-				fDoubleClickCount = 0;
-			}
-		}
-	}
-
-	protected void processElementAttrValueDoubleClicked() {
-		String regionText = fStructuredDocumentRegion.getText(fTextRegion);
-
-		if (fDoubleClickCount == 1) {
-			Point word = getWord(regionText, fCaretPosition - fStructuredDocumentRegion.getStartOffset(fTextRegion));
-			if (word.x == word.y) { // no word found; select whole region
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStartOffset(fTextRegion), regionText.length());
-				fDoubleClickCount++;
-			}
-			else {
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStartOffset(fTextRegion) + word.x, word.y - word.x);
-			}
-		}
-		else if (fDoubleClickCount == 2) {
-			if (isQuoted(regionText)) {
-				// ==> // Point word = getWord(regionText, fCaretPosition -
-				// fStructuredDocumentRegion.getStartOffset(fTextRegion));
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStartOffset(fTextRegion), regionText.length());
-			}
-			else {
-				processElementAttrValueDoubleClicked2Times();
-			}
-		}
-		else if (fDoubleClickCount == 3) {
-			if (isQuoted(regionText)) {
-				processElementAttrValueDoubleClicked2Times();
-			}
-			else {
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStart(), fStructuredDocumentRegion.getLength());
-				fDoubleClickCount = 0;
-			}
-		}
-		else { // fDoubleClickCount == 4
-			fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStart(), fStructuredDocumentRegion.getLength());
-			fDoubleClickCount = 0;
-		}
-	}
-
-	protected void processElementAttrValueDoubleClicked2Times() {
-		int prevRegionOffset = fStructuredDocumentRegion.getStartOffset(fTextRegion) - 1;
-		ITextRegion prevRegion = fStructuredDocumentRegion.getRegionAtCharacterOffset(prevRegionOffset);
-
-		if (prevRegion != null) {
-			prevRegionOffset = fStructuredDocumentRegion.getStartOffset(prevRegion) - 1;
-			prevRegion = fStructuredDocumentRegion.getRegionAtCharacterOffset(prevRegionOffset);
-			if ((prevRegion != null) && (prevRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) {
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStartOffset(prevRegion), fTextRegion.getTextEnd() - prevRegion.getStart());
-			}
-		}
-	}
-
-	protected void processElementDoubleClicked() {
-		if (fTextRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-			processElementAttrValueDoubleClicked(); // special handling for
-		}
-		else {
-			if (fDoubleClickCount == 1) {
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStart() + fTextRegion.getStart(), fTextRegion.getTextLength());
-			}
-			else if (fDoubleClickCount == 2) {
-				if (fTextRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-					processElementAttrNameDoubleClicked2Times();
-				}
-				else if (fTextRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) {
-					processElementAttrEqualsDoubleClicked2Times();
-				}
-				else {
-					fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStart(), fStructuredDocumentRegion.getLength());
-					fDoubleClickCount = 0;
-				}
-			}
-			else { // fDoubleClickCount == 3
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStart(), fStructuredDocumentRegion.getLength());
-				fDoubleClickCount = 0;
-			}
-		}
-	}
-
-	protected void processTextDoubleClicked() {
-		if (fDoubleClickCount == 1) {
-			super.doubleClicked(fStructuredTextViewer);
-
-			Point selectedRange = fStructuredTextViewer.getSelectedRange();
-			if ((selectedRange.x == fStructuredDocumentRegion.getStartOffset(fTextRegion)) && (selectedRange.y == fTextRegion.getTextLength())) {
-				// only one word in region, skip one level of double click
-				// selection
-				fDoubleClickCount++;
-			}
-		}
-		else if (fDoubleClickCount == 2) {
-			if (fTextRegion.getType() == DOMRegionContext.UNDEFINED) {
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStart(), fStructuredDocumentRegion.getLength());
-				fDoubleClickCount = 0;
-			}
-			else {
-				if (isQuoted(fStructuredDocumentRegion.getFullText(fTextRegion))) {
-					fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStartOffset(fTextRegion) + 1, fTextRegion.getTextLength() - 2);
-				}
-				else {
-					fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStartOffset(fTextRegion), fTextRegion.getTextLength());
-				}
-			}
-		}
-		else {
-			if ((fDoubleClickCount == 3) && isQuoted(fStructuredDocumentRegion.getFullText(fTextRegion))) {
-				fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStartOffset(fTextRegion), fTextRegion.getTextLength());
-			}
-			else {
-				if ((fDoubleClickCount == 3) && isQuoted(fStructuredDocumentRegionText)) {
-					fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStart() + 1, fStructuredDocumentRegion.getLength() - 2);
-				}
-				else {
-					fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStart(), fStructuredDocumentRegion.getLength());
-					fDoubleClickCount = 0;
-				}
-			}
-		}
-	}
-
-	public void setModel(IStructuredModel structuredModel) {
-		fStructuredModel = structuredModel;
-	}
-
-	protected void updateDoubleClickCount(int caretPosition) {
-		if (fCaretPosition == caretPosition) {
-			if (fStructuredDocumentRegion != null) {
-				fDoubleClickCount++;
-			}
-			else {
-				fDoubleClickCount = 1;
-			}
-		}
-		else {
-			fCaretPosition = caretPosition;
-			fDoubleClickCount = 1;
-		}
-	}
-
-	protected void updateStructuredDocumentRegion() {
-		fStructuredDocumentRegion = fStructuredModel.getStructuredDocument().getRegionAtCharacterOffset(fCaretPosition);
-		if (fStructuredDocumentRegion != null) {
-			fStructuredDocumentRegionText = fStructuredDocumentRegion.getText();
-		}
-		else {
-			fStructuredDocumentRegionText = ""; //$NON-NLS-1$
-		}
-	}
-
-	protected void updateTextRegion() {
-		if (fStructuredDocumentRegion != null) {
-			fTextRegion = fStructuredDocumentRegion.getRegionAtCharacterOffset(fCaretPosition);
-			// if fTextRegion is null, it means we are at just past the last
-			// fStructuredDocumentRegion,
-			// at the very end of the document, so we'll use the last text
-			// region in the document
-			if (fTextRegion == null) {
-				fTextRegion = fStructuredDocumentRegion.getRegionAtCharacterOffset(fCaretPosition - 1);
-			}
-		}
-		else {
-			fTextRegion = null;
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java
deleted file mode 100644
index 64320ec..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.editor;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * @author nsd
- */
-public class CMImageUtil {
-
-	public static String SMALL_ICON_URL = "small-icon"; //$NON-NLS-1$
-
-	public static CMNode getDeclaration(Node node) {
-		CMNode decl = null;
-		ModelQuery mq = null;
-		switch (node.getNodeType()) {
-			case Node.ATTRIBUTE_NODE : {
-				mq = ModelQueryUtil.getModelQuery(((Attr) node).getOwnerDocument());
-				decl = mq.getCMAttributeDeclaration((Attr) node);
-			}
-				break;
-			case Node.ELEMENT_NODE : {
-				mq = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
-				decl = mq.getCMElementDeclaration((Element) node);
-			}
-				break;
-		}
-		return decl;
-	}
-
-	public static Image getImage(CMNode cmnode) {
-		if (cmnode == null) {
-			return null;
-		}
-		Image image = null;
-		ImageDescriptor descriptor = getImageDescriptor(cmnode);
-		if (descriptor != null) {
-			image = descriptor.createImage(false);
-		}
-		return image;
-	}
-
-	public static ImageDescriptor getImageDescriptor(CMNode cmnode) {
-		if (cmnode == null) {
-			return null;
-		}
-		// cache CM-specified images with the XML UI plugin
-		String imageURLString = (String) cmnode.getProperty(SMALL_ICON_URL);
-		ImageDescriptor descriptor = null;
-		if ((imageURLString != null) && (imageURLString.length() > 0)) {
-			descriptor = XMLUIPlugin.getInstance().getImageRegistry().getDescriptor(imageURLString);
-			if (descriptor == null) {
-				try {
-					URL imageURL = new URL(imageURLString);
-					URLConnection connection = imageURL.openConnection();
-					connection.setUseCaches(false);
-					InputStream inputStream = connection.getInputStream();
-					try {
-						ImageData data = new ImageData(inputStream);
-						descriptor = ImageDescriptor.createFromImageData(data);
-						XMLUIPlugin.getInstance().getImageRegistry().put(imageURLString, descriptor);
-					}
-					catch (SWTException e) {
-						/*
-						 * There was a problem loading image from stream
-						 * (corrupt, missing, etc.)
-						 */
-						if (inputStream != null)
-							inputStream.close();
-					}
-				}
-				catch (MalformedURLException e) {
-					descriptor = null;
-				}
-				catch (IOException e) {
-					descriptor = null;
-				}
-			}
-		}
-		return descriptor;
-	}
-
-	/**
-	 * 
-	 */
-	private CMImageUtil() {
-		super();
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/IHelpContextIds.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/IHelpContextIds.java
deleted file mode 100644
index d64004f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/IHelpContextIds.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.editor;
-
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-/**
- * Help context ids for the XML Source Editor.
- * <p>
- * This interface contains constants only; it is not intended to be
- * implemented.
- * </p>
- * 
- */
-public interface IHelpContextIds {
-	// org.eclipse.wst.xml.ui.
-	public static final String PREFIX = XMLUIPlugin.ID + "."; //$NON-NLS-1$
-
-	// figured out on the fly
-	// // XML Source page editor
-	// public static final String XML_SOURCEVIEW_HELPID =
-	// ContentTypeIdForXML.ContentTypeID_XML +"_source_HelpId"; //$NON-NLS-1$
-
-	// XML Files Preference page
-	public static final String XML_PREFWEBX_FILES_HELPID = PREFIX + "webx0060"; //$NON-NLS-1$
-	// XML Source Preference page
-	public static final String XML_PREFWEBX_SOURCE_HELPID = PREFIX + "webx0061"; //$NON-NLS-1$
-	// XML Styles Preference page
-	public static final String XML_PREFWEBX_STYLES_HELPID = PREFIX + "webx0062"; //$NON-NLS-1$
-	// XML Templates Preference page
-	public static final String XML_PREFWEBX_TEMPLATES_HELPID = PREFIX + "webx0063"; //$NON-NLS-1$
-
-	// XML Cleanup dialog
-	public static final String CLEANUP_XML_HELPID = PREFIX + "xmlm1200"; //$NON-NLS-1$
-
-	// XML New File Wizard - Template Page
-	public static final String XML_NEWWIZARD_TEMPLATE_HELPID = PREFIX + "xmlw0010"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/XMLEditorPluginImages.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/XMLEditorPluginImages.java
deleted file mode 100644
index 3e2a63e..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/XMLEditorPluginImages.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.editor;
-
-/**
- * Bundle of most images used by the XML Source Editor plug-in.
- */
-public class XMLEditorPluginImages {
-
-	public static final String IMG_DTOOL_CONSTRAINOFF = "icons/full/dtool16/constrainoff.gif"; //$NON-NLS-1$
-	public static final String IMG_DTOOL_CONSTRAINON = "icons/full/dtool16/constrainon.gif"; //$NON-NLS-1$
-	public static final String IMG_DTOOL_RLDGRMR = "icons/full/dtool16/rldgrmr.gif"; //$NON-NLS-1$
-	public static final String IMG_DTOOL_VALIDATE = "icons/full/dtool16/validate.gif"; //$NON-NLS-1$
-	public static final String IMG_ETOOL_CONSTRAINOFF = "icons/full/etool16/constrainoff.gif"; //$NON-NLS-1$
-	public static final String IMG_ETOOL_CONSTRAINON = "icons/full/etool16/constrainon.gif"; //$NON-NLS-1$
-	public static final String IMG_ETOOL_RLDGRMR = "icons/full/etool16/rldgrmr.gif"; //$NON-NLS-1$
-	public static final String IMG_ETOOL_VALIDATE = "icons/full/etool16/validate.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_ADD_CORRECTION = "icons/full/obj16/add_correction.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_ATT_REQ_OBJ = "icons/full/obj16/att_req_obj.gif"; //$NON-NLS-1$
-
-	public static final String IMG_OBJ_ATTRIBUTE = "icons/full/obj16/attribute_obj.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_CDATASECTION = "icons/full/obj16/cdatasection.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_COMMENT = "icons/full/obj16/comment_obj.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_CORRECTION_CHANGE = "icons/full/obj16/correction_change.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_DOCTYPE = "icons/full/obj16/doctype.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_DTDFILE = "icons/full/obj16/dtdfile.gif"; //$NON-NLS-1$	
-	public static final String IMG_OBJ_ELEMENT = "icons/full/obj16/element_obj.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_ENTITY = "icons/full/obj16/entity.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_ENTITY_REFERENCE = "icons/full/obj16/entity_reference.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_ENUM = "icons/full/obj16/enum.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_LOCAL_VARIABLE = "icons/full/obj16/localvariable_obj.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_NOTATION = "icons/full/obj16/notation.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_PROCESSINGINSTRUCTION = "icons/full/obj16/proinst_obj.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_TAG_GENERIC = "icons/full/obj16/tag-generic.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_TAG_GENERIC_DEEMPHASIZED = "icons/full/obj16/tag_generic_deemphasized_obj.gif"; //$NON-NLS-1$    
-	public static final String IMG_OBJ_TAG_GENERIC_EMPHASIZED = "icons/full/obj16/tag_generic_emphasized_obj.gif"; //$NON-NLS-1$        
-	public static final String IMG_OBJ_TAG_MACRO = "icons/full/obj16/tag-macro.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_TXTEXT = "icons/full/obj16/text.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_WARNING_OBJ = "icons/full/obj16/warning_obj.gif"; //$NON-NLS-1$
-	public static final String IMG_OBJ_XSDFILE = "icons/full/obj16/XSDFile.gif"; //$NON-NLS-1$
-
-	public static final String IMG_OVR_ERROR = "icons/full/ovr16/error_ovr.gif"; //$NON-NLS-1$
-	public static final String IMG_OVR_STALE_ERROR = "icons/full/ovr16/stale_error_ovr.gif"; //$NON-NLS-1$
-	public static final String IMG_OVR_WARN = "icons/full/ovr16/warn_ovr.gif"; //$NON-NLS-1$
-
-	public static final String IMG_WIZBAN_GENERATEXML = "icons/full/wizban/generatexml_wiz.png"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/AbstractSiblingNavigationHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/AbstractSiblingNavigationHandler.java
deleted file mode 100644
index 4e0565b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/AbstractSiblingNavigationHandler.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-
-/**
- * Provides navigation to next/previous DOM sibling Nodes
- */
-abstract public class AbstractSiblingNavigationHandler extends AbstractHandler {
-
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		IEditorPart editor = HandlerUtil.getActiveEditor(event);
-		ITextEditor textEditor = null;
-		if (editor instanceof ITextEditor)
-			textEditor = (ITextEditor) editor;
-		else {
-			Object o = editor.getAdapter(ITextEditor.class);
-			if (o != null)
-				textEditor = (ITextEditor) o;
-		}
-		if (textEditor != null) {
-
-			ISelection selection = textEditor.getSelectionProvider().getSelection();
-			if (!selection.isEmpty() && selection instanceof IStructuredSelection) {
-				Object o = ((IStructuredSelection) selection).getFirstElement();
-				if (o instanceof Node) {
-					Node sibling = null;
-
-					if (((Node) o).getNodeType() == Node.ATTRIBUTE_NODE) {
-						o = ((Attr) o).getOwnerElement();
-					}
-					if (moveForward()) {
-						sibling = ((Node) o).getNextSibling();
-						while (sibling != null && sibling.getNodeType() == Node.TEXT_NODE && sibling.getNodeValue().trim().length() == 0) {
-							sibling = sibling.getNextSibling();
-						}
-						if (sibling == null) {
-							sibling = ((Node) o).getParentNode().getFirstChild();
-							while (sibling != null && sibling.getNodeType() == Node.TEXT_NODE && sibling.getNodeValue().trim().length() == 0) {
-								sibling = sibling.getNextSibling();
-							}
-						}
-					}
-					else {
-						sibling = ((Node) o).getPreviousSibling();
-						while (sibling != null && sibling.getNodeType() == Node.TEXT_NODE && sibling.getNodeValue().trim().length() == 0) {
-							sibling = sibling.getPreviousSibling();
-						}
-						if (sibling == null) {
-							sibling = ((Node) o).getParentNode().getLastChild();
-							while (sibling != null && sibling.getNodeType() == Node.TEXT_NODE && sibling.getNodeValue().trim().length() == 0) {
-								sibling = sibling.getPreviousSibling();
-							}
-						}
-					}
-
-					// The only child is a Text Node, go to the parent Node
-					if (((Node) o).getNodeType() == Node.TEXT_NODE && o.equals(sibling)) {
-						sibling = ((Node) o).getParentNode();
-					}
-
-
-					if (sibling != null) {
-						textEditor.getSelectionProvider().setSelection(new StructuredSelection(sibling));
-					}
-				}
-			}
-		}
-		return null;
-	}
-
-	abstract protected boolean moveForward();
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/AddBlockCommentHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/AddBlockCommentHandler.java
deleted file mode 100644
index 475f37a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/AddBlockCommentHandler.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation, bug 212330
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.xml.core.internal.document.CommentImpl;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-public class AddBlockCommentHandler extends CommentHandler implements IHandler {
-
-	public AddBlockCommentHandler() {
-		super();
-	}
-
-	void processAction(ITextEditor textEditor, IDocument document, ITextSelection textSelection) {
-		IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForEdit(document);
-		if (model != null) {
-			try {
-				IndexedRegion selectionStartIndexedRegion = model.getIndexedRegion(textSelection.getOffset());
-				IndexedRegion selectionEndIndexedRegion = model.getIndexedRegion(textSelection.getOffset() + textSelection.getLength());
-
-				if (selectionStartIndexedRegion == null) {
-					return;
-				}
-				if ((selectionEndIndexedRegion == null) && (textSelection.getLength() > 0)) {
-					selectionEndIndexedRegion = model.getIndexedRegion(textSelection.getOffset() + textSelection.getLength() - 1);
-				}
-				if (selectionEndIndexedRegion == null) {
-					return;
-				}
-
-				int openCommentOffset = selectionStartIndexedRegion.getStartOffset();
-				int closeCommentOffset = selectionEndIndexedRegion.getEndOffset() + OPEN_COMMENT.length();
-
-				if ((textSelection.getLength() == 0) && (selectionStartIndexedRegion instanceof CommentImpl)) {
-					return;
-				}
-
-				model.beginRecording(this, XMLUIMessages.AddBlockComment_tooltip);
-				model.aboutToChangeModel();
-
-				try {
-					document.replace(openCommentOffset, 0, OPEN_COMMENT);
-					document.replace(closeCommentOffset, 0, CLOSE_COMMENT);
-					super.removeOpenCloseComments(document, openCommentOffset + OPEN_COMMENT.length(), closeCommentOffset - openCommentOffset - CLOSE_COMMENT.length());
-				}
-				catch (BadLocationException e) {
-					Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-				}
-				finally {
-					model.changedModel();
-					model.endRecording(this);
-				}
-			}
-			finally {
-				model.releaseFromEdit();
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CleanupdocumentHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CleanupdocumentHandler.java
deleted file mode 100644
index 0d46a0e..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CleanupdocumentHandler.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation - bug 212330 -
- *                    Based off CleanupActionXMLDelegate
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupProcessor;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
-import org.eclipse.wst.xml.core.internal.cleanup.CleanupProcessorXML;
-import org.eclipse.wst.xml.ui.internal.actions.CleanupDialogXML;
-
-public class CleanupdocumentHandler extends AbstractHandler implements IHandler {
-	private IStructuredCleanupProcessor fCleanupProcessor;
-
-	public void dispose() {
-		// nulling out just in case
-		fCleanupProcessor = null;
-	}
-
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		IEditorPart editor = HandlerUtil.getActiveEditor(event);
-		ITextEditor textEditor = null;
-		if (editor instanceof ITextEditor)
-			textEditor = (ITextEditor) editor;
-		else {
-			Object o = editor.getAdapter(ITextEditor.class);
-			if (o != null)
-				textEditor = (ITextEditor) o;
-		}
-		if (textEditor != null) {
-			final ITextEditor finalTextEditor = textEditor;
-			Dialog cleanupDialog = new CleanupDialogXML(editor.getSite().getShell());
-			if (cleanupDialog.open() == Window.OK) {
-				// setup runnable
-				Runnable runnable = new Runnable() {
-					public void run() {
-						IStructuredCleanupProcessor cleanupProcessor = getCleanupProcessor();
-						if (cleanupProcessor != null) {
-							IStructuredModel model = null;
-							try {
-								model = StructuredModelManager.getModelManager().getExistingModelForEdit(finalTextEditor.getDocumentProvider().getDocument(finalTextEditor.getEditorInput()));
-								if (model != null) {
-									cleanupProcessor.cleanupModel(model);
-								}
-							}
-							finally {
-								if (model != null) {
-									model.releaseFromEdit();
-								}
-							}
-						}
-					}
-				};
-
-				// TODO: make independent of 'model'.
-				IStructuredModel model = null;
-				try {
-					model = StructuredModelManager.getModelManager().getExistingModelForEdit(textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput()));
-					if (model != null) {
-						// begin recording
-						ITextSelection selection = (ITextSelection) textEditor.getSelectionProvider().getSelection();
-						model.beginRecording(this, SSEUIMessages.Cleanup_Document_UI_, SSEUIMessages.Cleanup_Document_UI_, selection.getOffset(), selection.getLength());
-
-						// tell the model that we are about to make a big
-						// model change
-						model.aboutToChangeModel();
-
-						// run
-						BusyIndicator.showWhile(textEditor.getEditorSite().getWorkbenchWindow().getShell().getDisplay(), runnable);
-					}
-				}
-				finally {
-					if (model != null) {
-						// tell the model that we are done with the big
-						// model
-						// change
-						model.changedModel();
-
-						// end recording
-						ITextSelection selection = (ITextSelection) textEditor.getSelectionProvider().getSelection();
-						model.endRecording(this, selection.getOffset(), selection.getLength());
-						model.releaseFromEdit();
-					}
-				}
-			}
-		}
-
-		return null;
-	}
-
-	IStructuredCleanupProcessor getCleanupProcessor() {
-		if (fCleanupProcessor == null) {
-			fCleanupProcessor = new CleanupProcessorXML();
-		}
-
-		return fCleanupProcessor;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CollapseAllHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CollapseAllHandler.java
deleted file mode 100644
index 60c644b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CollapseAllHandler.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation, bug 212330
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class CollapseAllHandler extends ExpandCollapseAllHandler implements IHandler {
-
-	/**
-	 * 
-	 */
-	public CollapseAllHandler() {
-		super();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-	 */
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		IEditorPart editorPart = HandlerUtil.getActiveEditor(event);
-		
-		viewer = getTableTreeViewerForEditorPart(editorPart);
-		
-		if (viewer != null) {
-			// temporarily set the visibility to false
-			// this has a HUGE performance benefit
-			boolean isVisible = viewer.getControl().getVisible();
-			viewer.getControl().setVisible(false);
-			viewer.collapseAll();
-
-			// restore the previous visibility state
-			// 
-			viewer.getControl().setVisible(isVisible);
-		}		
-		
-		return null;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CommentHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CommentHandler.java
deleted file mode 100644
index 6188db2..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CommentHandler.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation, bug 212330
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.xml.ui.internal.Logger;
-
-public class CommentHandler extends AbstractHandler implements IHandler {
-	static final String CLOSE_COMMENT = "-->"; //$NON-NLS-1$
-	static final String OPEN_COMMENT = "<!--"; //$NON-NLS-1$
-
-	public CommentHandler() {
-		super();
-	}
-
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		IEditorPart editor = HandlerUtil.getActiveEditor(event);
-		ITextEditor textEditor = null;
-		if (editor instanceof ITextEditor)
-			textEditor = (ITextEditor) editor;
-		else {
-			Object o = editor.getAdapter(ITextEditor.class);
-			if (o != null)
-				textEditor = (ITextEditor) o;
-		}
-		if (textEditor != null) {
-			IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
-			if (document != null) {
-				// get current text selection
-				ITextSelection textSelection = getCurrentSelection(textEditor);
-				if (textSelection.isEmpty()) {
-					return null;
-				}
-
-				processAction(textEditor, document, textSelection);
-			}
-		}
-
-		return null;
-	}
-
-	protected ITextSelection getCurrentSelection(ITextEditor textEditor) {
-		ISelectionProvider provider = textEditor.getSelectionProvider();
-		if (provider != null) {
-			ISelection selection = provider.getSelection();
-			if (selection instanceof ITextSelection) {
-				return (ITextSelection) selection;
-			}
-		}
-		return TextSelection.emptySelection();
-	}
-
-	void processAction(ITextEditor textEditor, IDocument document, ITextSelection textSelection) {
-		// Implementations to over ride.
-	}
-
-	protected void removeOpenCloseComments(IDocument document, int offset, int length) {
-		try {
-			int adjusted_length = length;
-
-			// remove open comments
-			String string = document.get(offset, length);
-			int index = string.lastIndexOf(OPEN_COMMENT);
-			while (index != -1) {
-				document.replace(offset + index, OPEN_COMMENT.length(), ""); //$NON-NLS-1$
-				index = string.lastIndexOf(OPEN_COMMENT, index - 1);
-				adjusted_length -= OPEN_COMMENT.length();
-			}
-
-			// remove close comments
-			string = document.get(offset, adjusted_length);
-			index = string.lastIndexOf(CLOSE_COMMENT);
-			while (index != -1) {
-				document.replace(offset + index, CLOSE_COMMENT.length(), ""); //$NON-NLS-1$
-				index = string.lastIndexOf(CLOSE_COMMENT, index - 1);
-			}
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ExpandAllHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ExpandAllHandler.java
deleted file mode 100644
index 9091399..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ExpandAllHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation, bug 212330
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.wst.xml.ui.internal.tabletree.XMLTableTreeViewer;
-
-public class ExpandAllHandler extends ExpandCollapseAllHandler {
-
-	protected XMLTableTreeViewer viewer = null;
-
-	/**
-	 * 
-	 */
-	public ExpandAllHandler() {
-		super();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-	 */
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		
-		IEditorPart editorPart = HandlerUtil.getActiveEditor(event);
-		
-		viewer = getTableTreeViewerForEditorPart(editorPart);
-		
-		if (viewer != null) {
-			// temporarily set the visibility to false
-			// this has a HUGE performance benefit
-			boolean isVisible = viewer.getControl().getVisible();
-			viewer.getControl().setVisible(false);
-			viewer.expandAll();
-
-			// restore the previous visibility state
-			// 
-			viewer.getControl().setVisible(isVisible);
-		}		
-		
-		return null;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ExpandCollapseAllHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ExpandCollapseAllHandler.java
deleted file mode 100644
index 52d40f4..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ExpandCollapseAllHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation, bug 212330
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import java.util.Map;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.commands.IElementUpdater;
-import org.eclipse.ui.menus.UIElement;
-import org.eclipse.wst.xml.ui.internal.tabletree.IDesignViewer;
-import org.eclipse.wst.xml.ui.internal.tabletree.XMLTableTreeViewer;
-
-public class ExpandCollapseAllHandler extends AbstractHandler implements IElementUpdater {
-
-	protected XMLTableTreeViewer viewer = null;
-
-	/**
-	 * Command handler for handling Expand and Collapse for Tree Viewer 
-	 */
-	public ExpandCollapseAllHandler() {
-		super();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-	 */
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		// Implementors to put their code here.
-		
-		return null;
-	}
-	
-	protected XMLTableTreeViewer getTableTreeViewerForEditorPart(IEditorPart targetEditor) {
-		XMLTableTreeViewer result = null;
-		Object object = targetEditor.getAdapter(IDesignViewer.class);
-		if (object instanceof XMLTableTreeViewer) {
-			result = (XMLTableTreeViewer) object;
-		}
-		return result;
-	}
-	
-	public void updateElement(UIElement element, Map parameters) {
-		// TODO Auto-generated method stub
-		
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/NextSiblingNavigationHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/NextSiblingNavigationHandler.java
deleted file mode 100644
index c25951c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/NextSiblingNavigationHandler.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-public class NextSiblingNavigationHandler extends AbstractSiblingNavigationHandler {
-
-	protected boolean moveForward() {
-		return true;
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/PreviousSiblingNavigationHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/PreviousSiblingNavigationHandler.java
deleted file mode 100644
index 3442a8b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/PreviousSiblingNavigationHandler.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-public class PreviousSiblingNavigationHandler extends AbstractSiblingNavigationHandler {
-
-	protected boolean moveForward() {
-		return false;
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ReloadDependenciesHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ReloadDependenciesHandler.java
deleted file mode 100644
index c371a18..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ReloadDependenciesHandler.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation, bug 212330
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.CMDocumentLoader;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.InferredGrammarBuildingCMDocumentLoader;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Document;
-
-public class ReloadDependenciesHandler extends AbstractHandler implements IHandler {
-	protected IStructuredModel model;
-
-	/**
-	 * 
-	 */
-	public ReloadDependenciesHandler() {
-		// TODO Auto-generated constructor stub
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-	 */
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		IEditorPart editor = HandlerUtil.getActiveEditor(event);
-		ITextEditor textEditor = null;
-		if (editor instanceof ITextEditor)
-			textEditor = (ITextEditor) editor;
-		else {
-			Object o = editor.getAdapter(ITextEditor.class);
-			if (o != null)
-				textEditor = (ITextEditor) o;
-		}
-		if (textEditor != null) {
-			IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
-			IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
-			if (model != null) {
-				ModelQuery modelQuery = null;
-				try {
-					modelQuery = ModelQueryUtil.getModelQuery(model);
-				}
-				finally {
-					model.releaseFromRead();
-				}
-				Document domDocument = ((IDOMModel) model).getDocument();
-				if ((modelQuery != null) && (modelQuery.getCMDocumentManager() != null)) {
-					modelQuery.getCMDocumentManager().getCMDocumentCache().clear();
-					// TODO... need to figure out how to access the
-					// DOMObserver via ModelQuery
-					// ...why?
-					CMDocumentLoader loader = new InferredGrammarBuildingCMDocumentLoader(domDocument, modelQuery);
-					loader.loadCMDocuments();
-				}
-			}
-		}
-		return null;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/RemoveBlockCommentHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/RemoveBlockCommentHandler.java
deleted file mode 100644
index b4080bf..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/RemoveBlockCommentHandler.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation, bug 212330
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.xml.core.internal.document.CommentImpl;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/**
- * @author dcarver
- * 
- */
-public class RemoveBlockCommentHandler extends CommentHandler implements IHandler {
-
-	public RemoveBlockCommentHandler() {
-		super();
-	}
-
-	void processAction(ITextEditor textEditor, IDocument document, ITextSelection textSelection) {
-		IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForEdit(document);
-		if (model != null) {
-			try {
-				IndexedRegion selectionStartIndexedRegion = model.getIndexedRegion(textSelection.getOffset());
-				IndexedRegion selectionEndIndexedRegion = model.getIndexedRegion(textSelection.getOffset() + textSelection.getLength());
-
-				if ((selectionStartIndexedRegion == null) || (selectionEndIndexedRegion == null)) {
-					return;
-				}
-
-				int openCommentOffset = selectionStartIndexedRegion.getStartOffset();
-				int closeCommentOffset = selectionEndIndexedRegion.getEndOffset() - OPEN_COMMENT.length() - CLOSE_COMMENT.length();
-
-				model.beginRecording(this, XMLUIMessages.RemoveBlockComment_tooltip);
-				model.aboutToChangeModel();
-
-				try {
-					if (textSelection.getLength() == 0) {
-						if (selectionStartIndexedRegion instanceof CommentImpl) {
-							document.replace(openCommentOffset, OPEN_COMMENT.length(), ""); //$NON-NLS-1$
-							document.replace(closeCommentOffset, CLOSE_COMMENT.length(), ""); //$NON-NLS-1$
-						}
-					}
-					else {
-						if (selectionStartIndexedRegion instanceof CommentImpl) {
-							document.replace(openCommentOffset, OPEN_COMMENT.length(), ""); //$NON-NLS-1$
-						}
-
-						if (selectionEndIndexedRegion instanceof CommentImpl) {
-							document.replace(closeCommentOffset, CLOSE_COMMENT.length(), ""); //$NON-NLS-1$
-						}
-					}
-					removeOpenCloseComments(document, openCommentOffset + OPEN_COMMENT.length(), closeCommentOffset - openCommentOffset - CLOSE_COMMENT.length());
-				}
-				catch (BadLocationException e) {
-					Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-				}
-				finally {
-					model.changedModel();
-					model.endRecording(this);
-				}
-			}
-			finally {
-				model.releaseFromEdit();
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectEnclosingXMLHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectEnclosingXMLHandler.java
deleted file mode 100644
index f043b6e..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectEnclosingXMLHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.handlers.AbstractStructuredSelectHandler;
-import org.w3c.dom.Node;
-
-public class StructuredSelectEnclosingXMLHandler extends AbstractStructuredSelectHandler {
-	protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
-		IndexedRegion indexedRegion = null;
-
-		indexedRegion = getIndexedRegion(document, textSelection.getOffset());
-
-		return indexedRegion;
-	}
-
-	protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
-		Region newRegion = null;
-		if (indexedRegion instanceof Node) {
-			Node cursorNode = (Node) indexedRegion;
-
-			// use parent node for empty text node
-			if ((cursorNode.getNodeType() == Node.TEXT_NODE) && (cursorNode.getNodeValue().trim().length() == 0)) {
-				cursorNode = cursorNode.getParentNode();
-
-				if (cursorNode instanceof IndexedRegion) {
-					indexedRegion = (IndexedRegion) cursorNode;
-				}
-			}
-
-			Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
-
-			if ((cursorNodeRegion.getOffset() >= textSelection.getOffset()) && (cursorNodeRegion.getOffset() <= textSelection.getOffset() + textSelection.getLength()) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= textSelection.getOffset()) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= textSelection.getOffset() + textSelection.getLength())) {
-				Node newNode = cursorNode.getParentNode();
-
-				if (newNode instanceof IndexedRegion) {
-					IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
-					newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
-				}
-			}
-			else {
-				newRegion = cursorNodeRegion;
-			}
-		}
-		return newRegion;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectNextXMLHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectNextXMLHandler.java
deleted file mode 100644
index 366789f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectNextXMLHandler.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.handlers.AbstractStructuredSelectHandler;
-import org.w3c.dom.Node;
-
-public class StructuredSelectNextXMLHandler extends AbstractStructuredSelectHandler {
-
-	protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
-		int offset = textSelection.getOffset() + textSelection.getLength() - 1;
-		if (offset < 0) {
-			offset = 0;
-		}
-
-		IndexedRegion indexedRegion = null;
-
-		indexedRegion = getIndexedRegion(document, offset);
-
-		return indexedRegion;
-	}
-
-	protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
-		Region newRegion = null;
-		if (indexedRegion instanceof Node) {
-			Node cursorNode = (Node) indexedRegion;
-
-			// use parent node for empty text node
-			if ((cursorNode.getNodeType() == Node.TEXT_NODE) && (cursorNode.getNodeValue().trim().length() == 0)) {
-				cursorNode = cursorNode.getParentNode();
-
-				if (cursorNode instanceof IndexedRegion) {
-					indexedRegion = (IndexedRegion) cursorNode;
-				}
-			}
-
-			Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
-			int currentOffset = textSelection.getOffset();
-			int currentEndOffset = currentOffset + textSelection.getLength();
-			if ((cursorNodeRegion.getOffset() >= currentOffset) && (cursorNodeRegion.getOffset() <= currentEndOffset) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= currentOffset) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= currentEndOffset)) {
-				newRegion = getNewSelectionRegion2(indexedRegion, textSelection);
-			}
-			else {
-				newRegion = cursorNodeRegion;
-			}
-		}
-		return newRegion;
-	}
-
-	/**
-	 * This method was separated out from getNewSelectionRegion2 because the
-	 * code in here is allowed to be called recursively.
-	 * 
-	 * @param indexedRegion
-	 * @param textSelection
-	 * @return new region to select or null if none
-	 */
-	private Region getNewSelectionRegion2(IndexedRegion indexedRegion, ITextSelection textSelection) {
-		Region newRegion = null;
-		if (indexedRegion instanceof Node) {
-			Node node = (Node) indexedRegion;
-			Node newNode = node.getNextSibling();
-			if (newNode == null) {
-				newNode = node.getParentNode();
-
-				if (newNode instanceof IndexedRegion) {
-					IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
-					newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
-				}
-			}
-			else {
-				if (newNode instanceof IndexedRegion) {
-					IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
-					newRegion = new Region(textSelection.getOffset(), newIndexedRegion.getEndOffset() - textSelection.getOffset());
-
-					if (newNode.getNodeType() == Node.TEXT_NODE) {
-						newRegion = getNewSelectionRegion2(newIndexedRegion, new TextSelection(newRegion.getOffset(), newRegion.getLength()));
-					}
-				}
-			}
-		}
-		return newRegion;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectPreviousXMLHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectPreviousXMLHandler.java
deleted file mode 100644
index ab57447..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectPreviousXMLHandler.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.handlers.AbstractStructuredSelectHandler;
-import org.w3c.dom.Node;
-
-public class StructuredSelectPreviousXMLHandler extends AbstractStructuredSelectHandler {
-
-	protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
-		IndexedRegion indexedRegion = null;
-
-		indexedRegion = getIndexedRegion(document, textSelection.getOffset());
-
-		return indexedRegion;
-	}
-
-	protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
-		Region newRegion = null;
-		if (indexedRegion instanceof Node) {
-			Node cursorNode = (Node) indexedRegion;
-
-			// use parent node for empty text node
-			if ((cursorNode.getNodeType() == Node.TEXT_NODE) && (cursorNode.getNodeValue().trim().length() == 0)) {
-				cursorNode = cursorNode.getParentNode();
-
-				if (cursorNode instanceof IndexedRegion) {
-					indexedRegion = (IndexedRegion) cursorNode;
-				}
-			}
-
-			Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
-
-			if ((cursorNodeRegion.getOffset() >= textSelection.getOffset()) && (cursorNodeRegion.getOffset() <= textSelection.getOffset() + textSelection.getLength()) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= textSelection.getOffset()) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= textSelection.getOffset() + textSelection.getLength())) {
-				Node newNode = cursorNode.getPreviousSibling();
-				if (newNode == null) {
-					newNode = cursorNode.getParentNode();
-
-					if (newNode instanceof IndexedRegion) {
-						IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
-						newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
-					}
-				}
-				else {
-					if (newNode instanceof IndexedRegion) {
-						IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
-						newRegion = new Region(newIndexedRegion.getStartOffset(), textSelection.getOffset() + textSelection.getLength() - newIndexedRegion.getStartOffset());
-
-						if (newNode.getNodeType() == Node.TEXT_NODE) {
-							newRegion = getNewSelectionRegion(newIndexedRegion, new TextSelection(newRegion.getOffset(), newRegion.getLength()));
-						}
-					}
-				}
-
-			}
-			else {
-				newRegion = cursorNodeRegion;
-			}
-		}
-		return newRegion;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ToggleCommentHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ToggleCommentHandler.java
deleted file mode 100644
index 174f680..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ToggleCommentHandler.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation, bug 212330
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-public class ToggleCommentHandler extends CommentHandler implements IHandler {
-	public ToggleCommentHandler() {
-		super();
-	}
-
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		IEditorPart editor = HandlerUtil.getActiveEditor(event);
-		ITextEditor textEditor = null;
-		if (editor instanceof ITextEditor)
-			textEditor = (ITextEditor) editor;
-		else {
-			Object o = editor.getAdapter(ITextEditor.class);
-			if (o != null)
-				textEditor = (ITextEditor) o;
-		}
-		if (textEditor != null) {
-			IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
-			if (document != null) {
-				// get current text selection
-				ITextSelection textSelection = getCurrentSelection(textEditor);
-				if (textSelection.isEmpty()) {
-					return null;
-				}
-
-				processAction(textEditor, document, textSelection);
-			}
-		}
-		return null;
-	}
-
-	void processAction(ITextEditor textEditor, IDocument document, ITextSelection textSelection) {
-		// get text selection lines info
-		int selectionStartLine = textSelection.getStartLine();
-		int selectionEndLine = textSelection.getEndLine();
-		try {
-			int selectionEndLineOffset = document.getLineOffset(selectionEndLine);
-			int selectionEndOffset = textSelection.getOffset() + textSelection.getLength();
-
-			// adjust selection end line
-			if ((selectionEndLine > selectionStartLine) && (selectionEndLineOffset == selectionEndOffset)) {
-				selectionEndLine--;
-			}
-
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-
-		// save the selection position since it will be changing
-		Position selectionPosition = null;
-		boolean updateStartOffset = false;
-		try {
-			selectionPosition = new Position(textSelection.getOffset(), textSelection.getLength());
-			document.addPosition(selectionPosition);
-
-			// extra check if commenting from beginning of line
-			int selectionStartLineOffset = document.getLineOffset(selectionStartLine);
-			if ((textSelection.getLength() > 0) && (selectionStartLineOffset == textSelection.getOffset()) && !isCommentLine(document, selectionStartLine)) {
-				updateStartOffset = true;
-			}
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-
-		processAction(document, selectionStartLine, selectionEndLine);
-
-		updateCurrentSelection(textEditor, selectionPosition, document, updateStartOffset);
-	}
-
-	private void processAction(IDocument document, int selectionStartLine, int selectionEndLine) {
-		IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForEdit(document);
-		if (model != null) {
-			try {
-				model.beginRecording(this, XMLUIMessages.ToggleComment_tooltip);
-				model.aboutToChangeModel();
-
-				for (int i = selectionStartLine; i <= selectionEndLine; i++) {
-					try {
-						if (document.getLineLength(i) > 0) {
-							if (isCommentLine(document, i)) {
-								int lineOffset = document.getLineOffset(i);
-								IRegion region = document.getLineInformation(i);
-								String string = document.get(region.getOffset(), region.getLength());
-								int openCommentOffset = lineOffset + string.indexOf(OPEN_COMMENT);
-								int closeCommentOffset = lineOffset + string.indexOf(CLOSE_COMMENT) - OPEN_COMMENT.length();
-								uncomment(document, openCommentOffset, closeCommentOffset);
-							}
-							else {
-								int openCommentOffset = document.getLineOffset(i);
-								int lineDelimiterLength = document.getLineDelimiter(i) == null ? 0 : document.getLineDelimiter(i).length();
-								int closeCommentOffset = openCommentOffset + document.getLineLength(i) - lineDelimiterLength + OPEN_COMMENT.length();
-								comment(document, openCommentOffset, closeCommentOffset);
-							}
-						}
-					}
-					catch (BadLocationException e) {
-						Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-					}
-				}
-			}
-			finally {
-				model.changedModel();
-				model.endRecording(this);
-				model.releaseFromEdit();
-			}
-		}
-	}
-
-	private boolean isCommentLine(IDocument document, int line) {
-		boolean isComment = false;
-
-		try {
-			IRegion region = document.getLineInformation(line);
-			String string = document.get(region.getOffset(), region.getLength()).trim();
-			isComment = (string.length() >= OPEN_COMMENT.length() + CLOSE_COMMENT.length()) && string.startsWith(OPEN_COMMENT) && string.endsWith(CLOSE_COMMENT);
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-		return isComment;
-	}
-
-	private void comment(IDocument document, int openCommentOffset, int closeCommentOffset) {
-		try {
-			document.replace(openCommentOffset, 0, OPEN_COMMENT);
-			document.replace(closeCommentOffset, 0, CLOSE_COMMENT);
-			removeOpenCloseComments(document, openCommentOffset + OPEN_COMMENT.length(), closeCommentOffset - openCommentOffset - CLOSE_COMMENT.length());
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-	}
-
-	private void uncomment(IDocument document, int openCommentOffset, int closeCommentOffset) {
-		try {
-			document.replace(openCommentOffset, OPEN_COMMENT.length(), ""); //$NON-NLS-1$
-			document.replace(closeCommentOffset, CLOSE_COMMENT.length(), ""); //$NON-NLS-1$
-		}
-		catch (BadLocationException e) {
-			Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-		}
-	}
-
-	private void updateCurrentSelection(ITextEditor textEditor, Position selectionPosition, IDocument document, boolean updateStartOffset) {
-		// update the selection if text selection changed
-		if (selectionPosition != null) {
-			ITextSelection selection = null;
-			if (updateStartOffset) {
-				selection = new TextSelection(document, selectionPosition.getOffset() - OPEN_COMMENT.length(), selectionPosition.getLength() + OPEN_COMMENT.length());
-			}
-			else {
-				selection = new TextSelection(document, selectionPosition.getOffset(), selectionPosition.getLength());
-			}
-			ISelectionProvider provider = textEditor.getSelectionProvider();
-			if (provider != null) {
-				provider.setSelection(selection);
-			}
-			document.removePosition(selectionPosition);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ToggleEditModeHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ToggleEditModeHandler.java
deleted file mode 100644
index 85e4f59..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ToggleEditModeHandler.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail 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:
- *     David Carver - initial API and implementation, bug 212330
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.handlers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.commands.IElementUpdater;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.menus.UIElement;
-import org.eclipse.ui.services.IServiceScopes;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.tabletree.XMLEditorMessages;
-import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
-
-public class ToggleEditModeHandler extends AbstractHandler implements IElementUpdater {
-	protected ImageDescriptor onImage = SharedXMLEditorPluginImageHelper.getImageDescriptor(SharedXMLEditorPluginImageHelper.IMG_ETOOL_CONSTRAINON);
-	protected ImageDescriptor offImage = SharedXMLEditorPluginImageHelper.getImageDescriptor(SharedXMLEditorPluginImageHelper.IMG_ETOOL_CONSTRAINOFF);
-	protected ModelQuery modelQuery;
-
-	public ToggleEditModeHandler() {
-		super();
-	}
-
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		IEditorPart editor = HandlerUtil.getActiveEditor(event);
-		ITextEditor textEditor = null;
-		if (editor instanceof ITextEditor)
-			textEditor = (ITextEditor) editor;
-		else {
-			Object o = editor.getAdapter(ITextEditor.class);
-			if (o != null)
-				textEditor = (ITextEditor) o;
-		}
-		if (textEditor != null) {
-			IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
-			IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
-			if (model != null) {
-				try {
-					modelQuery = ModelQueryUtil.getModelQuery(model);
-				}
-				finally {
-					model.releaseFromRead();
-				}
-				if (modelQuery != null) {
-					int newState = getNextState(modelQuery.getEditMode());
-					modelQuery.setEditMode(newState);
-
-					// Force a Refresh on this command so that the image can
-					// be
-					// updated.
-					ICommandService commandService = (ICommandService) HandlerUtil.getActiveWorkbenchWindow(event).getService(ICommandService.class);
-					Map filter = new HashMap();
-					filter.put(IServiceScopes.WINDOW_SCOPE, HandlerUtil.getActiveWorkbenchWindow(event));
-					commandService.refreshElements(event.getCommand().getId(), filter);
-				}
-			}
-		}
-
-		return null;
-	}
-
-	public int getNextState(int editMode) {
-		int result = -1;
-		if (editMode == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) {
-			result = ModelQuery.EDIT_MODE_UNCONSTRAINED;
-		}
-		else {
-			result = ModelQuery.EDIT_MODE_CONSTRAINED_STRICT;
-		}
-		return result;
-	}
-
-
-	// Handlers that need to interact with the ui that the command came from
-	// need to use implement this method.
-	public void updateElement(UIElement element, Map parameters) {
-		IEditorPart editor = XMLUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
-		ITextEditor textEditor = null;
-		if (editor instanceof ITextEditor)
-			textEditor = (ITextEditor) editor;
-		else {
-			Object o = editor.getAdapter(ITextEditor.class);
-			if (o != null)
-				textEditor = (ITextEditor) o;
-		}
-		if (textEditor != null) {
-			IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
-			IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
-			if (model != null) {
-				try {
-					modelQuery = ModelQueryUtil.getModelQuery(model);
-				}
-				finally {
-					model.releaseFromRead();
-				}
-				if (modelQuery != null) {
-					setAppearanceForEditMode(modelQuery.getEditMode(), element);
-				}
-			}
-		}
-	}
-
-	public void setAppearanceForEditMode(int editMode, UIElement element) {
-		if (editMode == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) {
-			element.setTooltip(XMLEditorMessages.XMLTableTreeActionBarContributor_3);
-			element.setText(XMLEditorMessages.XMLTableTreeActionBarContributor_3);
-			element.setIcon(onImage);
-		}
-		else {
-			element.setTooltip(XMLEditorMessages.XMLTableTreeActionBarContributor_5);
-			element.setText(XMLEditorMessages.XMLTableTreeActionBarContributor_5);
-			element.setIcon(offImage);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/ExternalFileEditorInput.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/ExternalFileEditorInput.java
deleted file mode 100644
index 86e85d0..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/ExternalFileEditorInput.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.hyperlink;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPathEditorInput;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.editors.text.ILocationProvider;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * EditorInput for external files. Copied from
- * org.eclipse.ui.internal.editors.text.JavaFileEditorInput
- */
-class ExternalFileEditorInput implements IEditorInput, ILocationProvider {
-	// copies of this class exist in:
-	// org.eclipse.wst.xml.ui.internal.hyperlink
-	// org.eclipse.wst.html.ui.internal.hyperlink
-	// org.eclipse.jst.jsp.ui.internal.hyperlink
-
-	/**
-	 * The workbench adapter which simply provides the label.
-	 */
-	private class WorkbenchAdapter implements IWorkbenchAdapter {
-		/*
-		 * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
-		 */
-		public Object[] getChildren(Object o) {
-			return null;
-		}
-
-		/*
-		 * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
-		 */
-		public ImageDescriptor getImageDescriptor(Object object) {
-			return null;
-		}
-
-		/*
-		 * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
-		 */
-		public String getLabel(Object o) {
-			return ((ExternalFileEditorInput) o).getName();
-		}
-
-		/*
-		 * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
-		 */
-		public Object getParent(Object o) {
-			return null;
-		}
-	}
-
-	private File fFile;
-	private WorkbenchAdapter fWorkbenchAdapter = new WorkbenchAdapter();
-
-	public ExternalFileEditorInput(File file) {
-		super();
-		fFile = file;
-		fWorkbenchAdapter = new WorkbenchAdapter();
-	}
-
-	/*
-	 * @see org.eclipse.ui.IEditorInput#exists()
-	 */
-	public boolean exists() {
-		return fFile.exists();
-	}
-
-	/*
-	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
-	 */
-	public ImageDescriptor getImageDescriptor() {
-		return null;
-	}
-
-	/*
-	 * @see org.eclipse.ui.IEditorInput#getName()
-	 */
-	public String getName() {
-		return fFile.getName();
-	}
-
-	/*
-	 * @see org.eclipse.ui.IEditorInput#getPersistable()
-	 */
-	public IPersistableElement getPersistable() {
-		return null;
-	}
-
-	/*
-	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
-	 */
-	public String getToolTipText() {
-		return fFile.getAbsolutePath();
-	}
-
-	/*
-	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-	 */
-	public Object getAdapter(Class adapter) {
-		if (ILocationProvider.class.equals(adapter)) {
-			return this;
-		}
-		if (IWorkbenchAdapter.class.equals(adapter)) {
-			return fWorkbenchAdapter;
-		}
-		return Platform.getAdapterManager().getAdapter(this, adapter);
-	}
-
-	/*
-	 * @see org.eclipse.ui.editors.text.ILocationProvider#getPath(java.lang.Object)
-	 */
-	public IPath getPath(Object element) {
-		if (element instanceof ExternalFileEditorInput) {
-			ExternalFileEditorInput input = (ExternalFileEditorInput) element;
-			return Path.fromOSString(input.fFile.getAbsolutePath());
-		}
-		return null;
-	}
-
-	/*
-	 * @see org.eclipse.ui.IPathEditorInput#getPath()
-	 * @since 3.1
-	 */
-	public IPath getPath() {
-		return Path.fromOSString(fFile.getAbsolutePath());
-	}
-
-	/*
-	 * @see java.lang.Object#equals(java.lang.Object)
-	 */
-	public boolean equals(Object o) {
-		if (o == this) {
-			return true;
-		}
-
-		if (o instanceof ExternalFileEditorInput) {
-			ExternalFileEditorInput input = (ExternalFileEditorInput) o;
-			return fFile.equals(input.fFile);
-		}
-
-		if (o instanceof IPathEditorInput) {
-			IPathEditorInput input = (IPathEditorInput) o;
-			return getPath().equals(input.getPath());
-		}
-
-		return false;
-	}
-
-	/*
-	 * @see java.lang.Object#hashCode()
-	 */
-	public int hashCode() {
-		return fFile.hashCode();
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/ExternalFileHyperlink.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/ExternalFileHyperlink.java
deleted file mode 100644
index 1dbf66a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/ExternalFileHyperlink.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.hyperlink;
-
-import java.io.File;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.xml.ui.internal.Logger;
-
-/**
- * Hyperlink for external files.
- */
-class ExternalFileHyperlink implements IHyperlink {
-	// copies of this class exist in:
-	// org.eclipse.wst.xml.ui.internal.hyperlink
-	// org.eclipse.wst.html.ui.internal.hyperlink
-	// org.eclipse.jst.jsp.ui.internal.hyperlink
-
-	private IRegion fHyperlinkRegion;
-	private File fHyperlinkFile;
-
-	public ExternalFileHyperlink(IRegion region, File file) {
-		fHyperlinkFile = file;
-		fHyperlinkRegion = region;
-	}
-
-	public IRegion getHyperlinkRegion() {
-		return fHyperlinkRegion;
-	}
-
-	public String getTypeLabel() {
-		return fHyperlinkFile.getAbsolutePath();
-	}
-
-	public String getHyperlinkText() {
-		return fHyperlinkFile.getName();
-	}
-
-	public void open() {
-		if (fHyperlinkFile != null) {
-			IEditorInput input = new ExternalFileEditorInput(fHyperlinkFile);
-			IEditorDescriptor descriptor;
-			try {
-				descriptor = IDE.getEditorDescriptor(input.getName(), true);
-				if (descriptor != null) {
-					IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-					IDE.openEditor(page, input, descriptor.getId(), true);
-				}
-			}
-			catch (PartInitException e) {
-				Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/WorkspaceFileHyperlink.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/WorkspaceFileHyperlink.java
deleted file mode 100644
index 56de343..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/WorkspaceFileHyperlink.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.hyperlink;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.xml.ui.internal.Logger;
-
-/**
- * Hyperlink for files within the workspace. (As long as there is an IFile,
- * this can be used) Opens the default editor for the file.
- */
-class WorkspaceFileHyperlink implements IHyperlink {
-	// copies of this class exist in:
-	// org.eclipse.wst.xml.ui.internal.hyperlink
-	// org.eclipse.wst.html.ui.internal.hyperlink
-	// org.eclipse.jst.jsp.ui.internal.hyperlink
-
-	private IRegion fRegion;
-	private IFile fFile;
-	private IRegion fHighlightRange;
-
-	public WorkspaceFileHyperlink(IRegion region, IFile file) {
-		fRegion = region;
-		fFile = file;
-	}
-
-	public WorkspaceFileHyperlink(IRegion region, IFile file, IRegion range) {
-		fRegion = region;
-		fFile = file;
-		fHighlightRange = range;
-	}
-
-	public IRegion getHyperlinkRegion() {
-		return fRegion;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
-	 */
-	public String getTypeLabel() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
-	 */
-	public String getHyperlinkText() {
-		return fFile.getFullPath().toString();
-	}
-
-	public void open() {
-		if ((fFile != null) && fFile.exists()) {
-			try {
-				IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-				IEditorPart editor = IDE.openEditor(page, fFile, true);
-				// highlight range in editor if possible
-				if ((fHighlightRange != null) && (editor instanceof ITextEditor)) {
-					((ITextEditor) editor).setHighlightRange(fHighlightRange.getOffset(), fHighlightRange.getLength(), true);
-				}
-			}
-			catch (PartInitException pie) {
-				Logger.log(Logger.WARNING_DEBUG, pie.getMessage(), pie);
-			}
-		}
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java
deleted file mode 100644
index 3b00c0c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java
+++ /dev/null
@@ -1,554 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.hyperlink;
-
-import java.io.File;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.text.hyperlink.URLHyperlink;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-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.text.ITextRegion;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceHelper;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-import com.ibm.icu.util.StringTokenizer;
-
-/**
- * Detects hyperlinks in XML tags. Includes detection in DOCTYPE and attribute
- * values. Resolves references to schemas, dtds, etc using the Common URI
- * Resolver.
- * 
- */
-public class XMLHyperlinkDetector extends AbstractHyperlinkDetector {
-	private final String HTTP_PROTOCOL = "http://";//$NON-NLS-1$
-	private final String NO_NAMESPACE_SCHEMA_LOCATION = "noNamespaceSchemaLocation"; //$NON-NLS-1$
-	private final String SCHEMA_LOCATION = "schemaLocation"; //$NON-NLS-1$
-	private final String XMLNS = "xmlns"; //$NON-NLS-1$
-	private final String XSI_NAMESPACE_URI = "http://www.w3.org/2001/XMLSchema-instance"; //$NON-NLS-1$
-
-	/**
-	 * Create the appropriate hyperlink
-	 * 
-	 * @param uriString
-	 * @param hyperlinkRegion
-	 * @return IHyperlink
-	 */
-	private IHyperlink createHyperlink(String uriString, IRegion hyperlinkRegion, IDocument document, Node node) {
-		IHyperlink link = null;
-
-		if (isHttp(uriString)) {
-			link = new URLHyperlink(hyperlinkRegion, uriString);
-		}
-		else {
-			// try to locate the file in the workspace
-			File systemFile = getFileFromUriString(uriString);
-			if (systemFile != null) {
-				String systemPath = systemFile.getPath();
-				IFile file = getFile(systemPath);
-				if (file != null) {
-					// this is a WorkspaceFileHyperlink since file exists in
-					// workspace
-					link = new WorkspaceFileHyperlink(hyperlinkRegion, file);
-				}
-				else {
-					// this is an ExternalFileHyperlink since file does not
-					// exist in workspace
-					link = new ExternalFileHyperlink(hyperlinkRegion, systemFile);
-				}
-			}
-		}
-		return link;
-	}
-
-	public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
-		// for now, only capable of creating 1 hyperlink
-		List hyperlinks = new ArrayList(0);
-
-		if ((region != null) && (textViewer != null)) {
-			IDocument document = textViewer.getDocument();
-			Node currentNode = getCurrentNode(document, region.getOffset());
-			if (currentNode != null) {
-				String uriString = null;
-				if (currentNode.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
-					// doctype nodes
-					uriString = getURIString(currentNode, document);
-				}
-				else if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
-					// element nodes
-					Attr currentAttr = getCurrentAttrNode(currentNode, region.getOffset());
-					if (currentAttr != null) {
-						// try to find link for current attribute
-						// resolve attribute value
-						uriString = getURIString(currentAttr, document);
-						// verify validity of uri string
-						if ((uriString == null) || !isValidURI(uriString)) {
-							// reset current attribute
-							currentAttr = null;
-						}
-					}
-					if (currentAttr == null) {
-						// try to find a linkable attribute within element
-						currentAttr = getLinkableAttr((Element) currentNode);
-						if (currentAttr != null) {
-							uriString = getURIString(currentAttr, document);
-						}
-					}
-					currentNode = currentAttr;
-				}
-				// try to create hyperlink from information gathered
-				if ((uriString != null) && (currentNode != null) && isValidURI(uriString)) {
-					IRegion hyperlinkRegion = getHyperlinkRegion(currentNode);
-					IHyperlink hyperlink = createHyperlink(uriString, hyperlinkRegion, document, currentNode);
-					if (hyperlink != null) {
-						hyperlinks.add(hyperlink);
-					}
-				}
-			}
-		}
-		if (hyperlinks.size() == 0) {
-			return null;
-		}
-		return (IHyperlink[]) hyperlinks.toArray(new IHyperlink[0]);
-	}
-
-	/**
-	 * Get the base location from the current model (local file system)
-	 */
-	private String getBaseLocation(IDocument document) {
-		String result = null;
-
-		// get the base location from the current model
-		IStructuredModel sModel = null;
-		try {
-			sModel = StructuredModelManager.getModelManager().getExistingModelForRead(document);
-			if (sModel != null) {
-				result = sModel.getBaseLocation();
-				
-				IPath path = new Path(result);
-				if (path.segmentCount() > 1) {
-					IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-					if (file.exists()) {
-						String baseLocation = null;
-						if (file.getLocation() != null) {
-							baseLocation = file.getLocation().toString();
-						}
-						if (baseLocation == null && file.getLocationURI() != null) {
-							baseLocation = file.getLocationURI().toString();
-						}
-						if (baseLocation == null) {
-							baseLocation = file.getFullPath().toString();
-						}
-						result = baseLocation;
-					}
-				}
-			}
-		}
-		finally {
-			if (sModel != null) {
-				sModel.releaseFromRead();
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * Get the CMElementDeclaration for an element
-	 * 
-	 * @param element
-	 * @return CMElementDeclaration
-	 */
-	private CMElementDeclaration getCMElementDeclaration(Element element) {
-		CMElementDeclaration ed = null;
-
-		ModelQuery mq = ModelQueryUtil.getModelQuery(element.getOwnerDocument());
-		if (mq != null) {
-			ed = mq.getCMElementDeclaration(element);
-		}
-		return ed;
-	}
-
-	/**
-	 * Returns the attribute node within node at offset
-	 * 
-	 * @param node
-	 * @param offset
-	 * @return Attr
-	 */
-	private Attr getCurrentAttrNode(Node node, int offset) {
-		if ((node instanceof IndexedRegion) && ((IndexedRegion) node).contains(offset) && (node.hasAttributes())) {
-			NamedNodeMap attrs = node.getAttributes();
-			// go through each attribute in node and if attribute contains
-			// offset, return that attribute
-			for (int i = 0; i < attrs.getLength(); ++i) {
-				// assumption that if parent node is of type IndexedRegion,
-				// then its attributes will also be of type IndexedRegion
-				IndexedRegion attRegion = (IndexedRegion) attrs.item(i);
-				if (attRegion.contains(offset)) {
-					return (Attr) attrs.item(i);
-				}
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * Returns the node the cursor is currently on in the document. null if no
-	 * node is selected
-	 * 
-	 * @param offset
-	 * @return Node either element, doctype, text, or null
-	 */
-	private Node getCurrentNode(IDocument document, int offset) {
-		// get the current node at the offset (returns either: element,
-		// doctype, text)
-		IndexedRegion inode = null;
-		IStructuredModel sModel = null;
-		try {
-			sModel = StructuredModelManager.getModelManager().getExistingModelForRead(document);
-			if (sModel != null) {
-				inode = sModel.getIndexedRegion(offset);
-				if (inode == null) {
-					inode = sModel.getIndexedRegion(offset - 1);
-				}
-			}
-		}
-		finally {
-			if (sModel != null) {
-				sModel.releaseFromRead();
-			}
-		}
-
-		if (inode instanceof Node) {
-			return (Node) inode;
-		}
-		return null;
-	}
-
-	/**
-	 * Returns an IFile from the given uri if possible, null if cannot find
-	 * file from uri.
-	 * 
-	 * @param fileString
-	 *            file system path
-	 * @return returns IFile if fileString exists in the workspace
-	 */
-	private IFile getFile(String fileString) {
-		IFile file = null;
-
-		if (fileString != null) {
-			Path filePath = new Path(fileString);
-			if (filePath.segmentCount() > 1 && ResourcesPlugin.getWorkspace().getRoot().getFile(filePath).exists()) {
-				return ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
-			}
-			IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(filePath);
-			for (int i = 0; (i < files.length) && (file == null); i++) {
-				if (files[i].exists()) {
-					file = files[i];
-				}
-			}
-		}
-
-		return file;
-	}
-
-	/**
-	 * Create a file from the given uri string
-	 * 
-	 * @param uriString -
-	 *            assumes uriString is not http://
-	 * @return File created from uriString if possible, null otherwise
-	 */
-	private File getFileFromUriString(String uriString) {
-		File file = null;
-		try {
-			// first just try to create a file directly from uriString as
-			// default in case create file from uri does not work
-			file = new File(uriString);
-
-			// try to create file from uri
-			URI uri = new URI(uriString);
-			file = new File(uri);
-		}
-		catch (Exception e) {
-			// if exception is thrown while trying to create File just ignore
-			// and file will be null
-		}
-		return file;
-	}
-
-	private IRegion getHyperlinkRegion(Node node) {
-		IRegion hyperRegion = null;
-
-		if (node != null) {
-			short nodeType = node.getNodeType();
-			if (nodeType == Node.DOCUMENT_TYPE_NODE) {
-				// handle doc type node
-				IDOMNode docNode = (IDOMNode) node;
-				hyperRegion = new Region(docNode.getStartOffset(), docNode.getEndOffset() - docNode.getStartOffset());
-			}
-			else if (nodeType == Node.ATTRIBUTE_NODE) {
-				// handle attribute nodes
-				IDOMAttr att = (IDOMAttr) node;
-				// do not include quotes in attribute value region
-				int regOffset = att.getValueRegionStartOffset();
-				ITextRegion valueRegion = att.getValueRegion();
-				if (valueRegion != null) {
-					int regLength = valueRegion.getTextLength();
-					String attValue = att.getValueRegionText();
-					if (StringUtils.isQuoted(attValue)) {
-						++regOffset;
-						regLength = regLength - 2;
-					}
-					hyperRegion = new Region(regOffset, regLength);
-				}
-			}
-		}
-		return hyperRegion;
-	}
-
-	/**
-	 * Attempts to find an attribute within element that is openable.
-	 * 
-	 * @param element -
-	 *            cannot be null
-	 * @return Attr attribute that can be used for open on, null if no
-	 *         attribute could be found
-	 */
-	private Attr getLinkableAttr(Element element) {
-		CMElementDeclaration ed = getCMElementDeclaration(element);
-		// get the list of attributes for this node
-		NamedNodeMap attrs = element.getAttributes();
-		for (int i = 0; i < attrs.getLength(); ++i) {
-			// check if this attribute is "openOn-able"
-			Attr att = (Attr) attrs.item(i);
-			if (isLinkableAttr(att, ed)) {
-				return att;
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * Find the location hint for the given namespaceURI if it exists
-	 * 
-	 * @param elementNode -
-	 *            cannot be null
-	 * @param namespaceURI -
-	 *            cannot be null
-	 * @return location hint (systemId) if it was found, null otherwise
-	 */
-	private String getLocationHint(Element elementNode, String namespaceURI) {
-		Attr schemaLocNode = elementNode.getAttributeNodeNS(XSI_NAMESPACE_URI, SCHEMA_LOCATION);
-		if (schemaLocNode != null) {
-			StringTokenizer st = new StringTokenizer(schemaLocNode.getValue());
-			while (st.hasMoreTokens()) {
-				String publicId = st.hasMoreTokens() ? st.nextToken() : null;
-				String systemId = st.hasMoreTokens() ? st.nextToken() : null;
-				// found location hint
-				if (namespaceURI.equalsIgnoreCase(publicId)) {
-					return systemId;
-				}
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * Returns the URI string
-	 * 
-	 * @param node -
-	 *            assumes not null
-	 */
-	private String getURIString(Node node, IDocument document) {
-		String resolvedURI = null;
-		// need the base location, publicId, and systemId for URIResolver
-		String baseLoc = null;
-		String publicId = null;
-		String systemId = null;
-
-		short nodeType = node.getNodeType();
-		// handle doc type node
-		if (nodeType == Node.DOCUMENT_TYPE_NODE) {
-			baseLoc = getBaseLocation(document);
-			publicId = ((DocumentType) node).getPublicId();
-			systemId = ((DocumentType) node).getSystemId();
-		}
-		else if (nodeType == Node.ATTRIBUTE_NODE) {
-			// handle attribute node
-			Attr attrNode = (Attr) node;
-			String attrName = attrNode.getName();
-			String attrValue = attrNode.getValue();
-			attrValue = StringUtils.strip(attrValue);
-			if ((attrValue != null) && (attrValue.length() > 0)) {
-				baseLoc = getBaseLocation(document);
-
-				// handle schemaLocation attribute
-				String prefix = DOMNamespaceHelper.getPrefix(attrName);
-				String unprefixedName = DOMNamespaceHelper.getUnprefixedName(attrName);
-				if ((XMLNS.equals(prefix)) || (XMLNS.equals(unprefixedName))) {
-					publicId = attrValue;
-					systemId = getLocationHint(attrNode.getOwnerElement(), publicId);
-					if (systemId == null) {
-						systemId = attrValue;
-					}
-				}
-				else if ((XSI_NAMESPACE_URI.equals(DOMNamespaceHelper.getNamespaceURI(attrNode))) && (SCHEMA_LOCATION.equals(unprefixedName))) {
-					// for now just use the first pair
-					// need to look into being more precise
-					StringTokenizer st = new StringTokenizer(attrValue);
-					publicId = st.hasMoreTokens() ? st.nextToken() : null;
-					systemId = st.hasMoreTokens() ? st.nextToken() : null;
-					// else check if xmlns publicId = value
-				}
-				else {
-					systemId = attrValue;
-				}
-			}
-		}
-
-		resolvedURI = resolveURI(baseLoc, publicId, systemId);
-		return resolvedURI;
-	}
-
-	/**
-	 * Returns true if this uriString is an http string
-	 * 
-	 * @param uriString
-	 * @return true if uriString is http string, false otherwise
-	 */
-	private boolean isHttp(String uriString) {
-		boolean isHttp = false;
-		if (uriString != null) {
-			String tempString = uriString.toLowerCase();
-			if (tempString.startsWith(HTTP_PROTOCOL)) {
-				isHttp = true;
-			}
-		}
-		return isHttp;
-	}
-
-	/**
-	 * Checks to see if the given attribute is openable. Attribute is openable
-	 * if it is a namespace declaration attribute or if the attribute value is
-	 * of type URI.
-	 * 
-	 * @param attr
-	 *            cannot be null
-	 * @param cmElement
-	 *            CMElementDeclaration associated with the attribute (can be
-	 *            null)
-	 * @return true if this attribute is "openOn-able" false otherwise
-	 */
-	private boolean isLinkableAttr(Attr attr, CMElementDeclaration cmElement) {
-		String attrName = attr.getName();
-		String prefix = DOMNamespaceHelper.getPrefix(attrName);
-		String unprefixedName = DOMNamespaceHelper.getUnprefixedName(attrName);
-		// determine if attribute is namespace declaration
-		if ((XMLNS.equals(prefix)) || (XMLNS.equals(unprefixedName))) {
-			return true;
-		}
-
-		// determine if attribute contains schema location
-		if ((XSI_NAMESPACE_URI.equals(DOMNamespaceHelper.getNamespaceURI(attr))) && ((SCHEMA_LOCATION.equals(unprefixedName)) || (NO_NAMESPACE_SCHEMA_LOCATION.equals(unprefixedName)))) {
-			return true;
-		}
-
-		// determine if attribute value is of type URI
-		if (cmElement != null) {
-			CMNamedNodeMap attrDecls = cmElement.getAttributes();
-			CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attrDecls);
-			List nodes = ModelQueryUtil.getModelQuery(attr.getOwnerDocument()).getAvailableContent(attr.getOwnerElement(), cmElement, ModelQuery.INCLUDE_ATTRIBUTES);
-			for (int k = 0; k < nodes.size(); k++) {
-				CMNode cmnode = (CMNode) nodes.get(k);
-				if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-					allAttributes.put(cmnode);
-				}
-			}
-			attrDecls = allAttributes;
-
-			CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) attrDecls.getNamedItem(attrName);
-			if ((attrDecl != null) && (attrDecl.getAttrType() != null) && (CMDataType.URI.equals(attrDecl.getAttrType().getDataTypeName()))) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Checks whether the given uriString is really pointing to a file
-	 * 
-	 * @param uriString
-	 * @return boolean
-	 */
-	private boolean isValidURI(String uriString) {
-		boolean isValid = false;
-
-		if (isHttp(uriString)) {
-			isValid = true;
-		}
-		else {
-			File file = getFileFromUriString(uriString);
-			if (file != null) {
-				isValid = file.isFile();
-			}
-			if(!isValid) {
-			}
-			
-		}
-		return isValid;
-	}
-
-	/**
-	 * Resolves the given URI information
-	 * 
-	 * @param baseLocation
-	 * @param publicId
-	 * @param systemId
-	 * @return String resolved uri.
-	 */
-	private String resolveURI(String baseLocation, String publicId, String systemId) {
-		// dont resolve if there's nothing to resolve
-		if ((baseLocation == null) && (publicId == null) && (systemId == null)) {
-			return null;
-		}
-		return URIResolverPlugin.createResolver().resolve(baseLocation, publicId, systemId);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonAddNamespacesControl.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonAddNamespacesControl.java
deleted file mode 100644
index 346225b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonAddNamespacesControl.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.nsedit;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.dialogs.SelectFileOrXMLCatalogIdDialog;
-
-public class CommonAddNamespacesControl extends Composite implements SelectionListener {
-
-	class EditNamespaceControl extends Composite {
-		protected Button browseButton;
-		Text locationHintField;
-		Text prefixField;
-		Text uriField;
-
-		// protected NamespaceInfo info;
-
-		public EditNamespaceControl(Composite parent) {
-			super(parent, SWT.NONE); // BORDER);
-			setLayout(new GridLayout());
-			setLayoutData(new GridData(GridData.FILL_BOTH));
-
-			Label label = new Label(this, SWT.NONE);
-			label.setText(XMLUIMessages._UI_ENTER_REQ_PREFIX_AND_NAMESPACE);
-
-			Composite composite = new Composite(this, SWT.NONE);
-			GridLayout layout = new GridLayout();
-			layout.numColumns = 3;
-			layout.marginWidth = 0;
-			layout.verticalSpacing = 1;
-			composite.setLayout(layout);
-
-			GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-			gd.widthHint = 350;
-			composite.setLayoutData(gd);
-
-			// row 1
-			//
-			Label prefixLabel = new Label(composite, SWT.NONE);
-			prefixLabel.setText(XMLUIMessages._UI_LABEL_PREFIX_COLON);
-
-			prefixField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-			prefixField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			// prefixField.setText(getDisplayValue(info.prefix));
-			// prefixField.addModifyListener(modifyListener);
-			// prefixField.setEnabled(info.getProperty("prefix-readOnly") ==
-			// null);
-			new Label(composite, SWT.NONE);
-
-			// row 2
-			//
-			Label uriLabel = new Label(composite, SWT.NONE);
-			uriLabel.setText(XMLUIMessages._UI_LABEL_NAMESPACE_NAME_COLON);
-
-			uriField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-			uriField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			// uriField.setText(getDisplayValue(info.uri));
-			// uriField.addModifyListener(modifyListener);
-			// uriField.setEnabled(info.getProperty("uri-readOnly") == null);
-
-			new Label(composite, SWT.NONE);
-
-			// row 3
-			//
-			Label locationHintLabel = new Label(composite, SWT.NONE);
-			locationHintLabel.setText(XMLUIMessages._UI_LABEL_LOCATION_HINT_COLON);
-
-			locationHintField = new Text(composite, SWT.SINGLE | SWT.BORDER);
-			locationHintField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			// locationHintField.setText(getDisplayValue(info.locationHint));
-			// locationHintField.addModifyListener(modifyListener);
-			// locationHintField.setEnabled(info.getProperty("locationHint-readOnly")
-			// == null);
-
-			SelectionListener selectionListener = new SelectionAdapter() {
-				public void widgetSelected(SelectionEvent e) {
-					performBrowse();
-				}
-			};
-
-			browseButton = new Button(composite, SWT.NONE);
-			browseButton.setText(XMLUIMessages._UI_LABEL_BROWSE);
-			browseButton.addSelectionListener(selectionListener);
-			browseButton.setEnabled(locationHintField.getEnabled());
-		}
-
-		protected void performBrowse() {
-			String[] extensions = {".xsd"}; //$NON-NLS-1$
-			SelectFileOrXMLCatalogIdDialog dialog = new SelectFileOrXMLCatalogIdDialog(getShell(), extensions);
-			dialog.create();
-			dialog.getShell().setText(XMLUIMessages._UI_LABEL_SELECT_FILE);
-			dialog.setBlockOnOpen(true);
-			dialog.open();
-
-			if (dialog.getReturnCode() == Window.OK) {
-				// String grammarURI = null;
-				IFile file = dialog.getFile();
-				String id = dialog.getId();
-				if (file != null) {
-					String uri = null;
-					if (resourceLocation != null) {
-						IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(resourceLocation);
-						if (resource != null) {
-							IPath location = resource.getLocation();
-							if (location != null) {
-								uri = URIHelper.getRelativeURI(file.getLocation(), location);
-							}
-						}
-						// grammarURI = file.getLocation().toOSString();
-					}
-					else {
-						uri = file.getLocation().toOSString();
-						// grammarURI = uri;
-					}
-					locationHintField.setText(uri);
-				}
-				else if (id != null) {
-					locationHintField.setText(id);
-					// URIResolver resolver =
-					URIResolverPlugin.createResolver();
-					// grammarURI = resolver.resolve(null, id, id);
-				}
-
-				try {
-					// TODO CMDocument document =
-					// CMDocumentBuilderRegistry.getInstance().buildCMDocument(grammarURI);
-					// List namespaceInfoList =
-					// (List)document.getProperty("http://org.eclipse.wst/cm/properties/namespaceInfo");
-					// NamespaceInfo info =
-					// (NamespaceInfo)namespaceInfoList.get(0);
-					// if (uriField.getText().trim().length() == 0 && info.uri
-					// != null)
-					// {
-					// uriField.setText(info.uri);
-					// }
-					// if (prefixField.getText().trim().length() == 0 &&
-					// info.prefix != null)
-					// {
-					// prefixField.setText(info.prefix);
-					// }
-				}
-				catch (Exception e) {
-				}
-			}
-		}
-	}
-
-	protected Button deleteButton;
-	protected Button editButton;
-	protected EditNamespaceControl editNamespaceControl;
-	protected int heightHint = 250;
-	protected List namespaceInfoList = new ArrayList();
-	protected Button newButton;
-	protected PageBook pageBook;
-	protected Button radio1;
-	protected Button radio2;
-	protected IPath resourceLocation;
-	protected Composite tableSection;
-	protected CommonNamespaceInfoTable tableViewer;
-	protected int widthHint = 500;
-
-
-	public CommonAddNamespacesControl(Composite parent, int style, IPath resourceLocation) {
-		super(parent, style);
-		this.resourceLocation = resourceLocation;
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		if (widthHint != -1) {
-			gd.widthHint = widthHint;
-		}
-		if (heightHint != -1) {
-			gd.heightHint = heightHint;
-		}
-		setLayoutData(gd);
-		setLayout(new GridLayout());
-
-		radio1 = new Button(this, SWT.RADIO);
-		radio1.setText(XMLUIMessages._UI_SELECT_REGISTERED_NAMESPACES);
-		radio1.addSelectionListener(this);
-
-		radio2 = new Button(this, SWT.RADIO);
-		radio2.setText(XMLUIMessages._UI_SPECIFY_NEW_NAMESPACE);
-		radio2.addSelectionListener(this);
-
-		Label separator = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
-		separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		// Group namespaceInfoGroup = new Group(this, SWT.NONE);
-		// namespaceInfoGroup.setText("Namespace Declarations");
-		// //XMLCommonUIPlugin.getInstance().getString("_UI_LABEL_XML_SCHEMA_INFORMATION"));
-		// namespaceInfoGroup.setLayout(new GridLayout(2, false));
-		// namespaceInfoGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
-		pageBook = new PageBook(this, SWT.NONE);
-		pageBook.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-		tableSection = new Composite(pageBook, SWT.NONE);
-		tableSection.setLayout(new GridLayout());
-		Label label = new Label(tableSection, SWT.NONE);
-		label.setText(XMLUIMessages._UI_SELECT_NAMESPACE_TO_ADD);
-
-		tableViewer = new CommonNamespaceInfoTable(tableSection, SWT.CHECK, 6);
-		editNamespaceControl = new EditNamespaceControl(pageBook);
-		pageBook.showPage(tableSection);
-
-		tableViewer.setInput(namespaceInfoList);
-	}
-
-
-
-	public List getNamespaceInfoList() {
-		List list = new ArrayList();
-		if (radio1.getSelection()) {
-			TableItem[] items = tableViewer.getTable().getItems();
-			for (int i = 0; i < items.length; i++) {
-				TableItem item = items[i];
-				if (item.getChecked()) {
-					list.add(item.getData());
-				}
-			}
-		}
-		else {
-			NamespaceInfo info = new NamespaceInfo();
-			info.prefix = editNamespaceControl.prefixField.getText();
-			info.uri = editNamespaceControl.uriField.getText();
-			info.locationHint = editNamespaceControl.locationHintField.getText();
-			list.add(info);
-		}
-		return list;
-	}
-
-	public void setNamespaceInfoList(List list) {
-		namespaceInfoList = list;
-		tableViewer.setInput(namespaceInfoList);
-	}
-
-	public void widgetDefaultSelected(SelectionEvent e) {
-	}
-
-	public void widgetSelected(SelectionEvent e) {
-		if (e.widget == radio1) {
-			pageBook.showPage(tableSection);
-		}
-		else if (e.widget == radio2) {
-			pageBook.showPage(editNamespaceControl);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonAddNamespacesDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonAddNamespacesDialog.java
deleted file mode 100644
index 269113f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonAddNamespacesDialog.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.nsedit;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-
-
-
-public class CommonAddNamespacesDialog extends Dialog {
-	protected CommonAddNamespacesControl addNamespacesControl;
-	protected List existingNamespaces;
-	protected List namespaceInfoList;
-	protected Button okButton;
-	protected HashMap preferredPrefixTable = new HashMap();
-	protected IPath resourceLocation;
-	protected String title;
-
-	public CommonAddNamespacesDialog(Shell parentShell, String title, IPath resourceLocation, List existingNamespaces) {
-		super(parentShell);
-		this.resourceLocation = resourceLocation;
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.title = title;
-		this.existingNamespaces = existingNamespaces;
-		preferredPrefixTable.put("http://schemas.xmlsoap.org/wsdl/", "wsdl"); //$NON-NLS-1$ //$NON-NLS-2$
-		preferredPrefixTable.put("http://schemas.xmlsoap.org/wsdl/soap/", "soap"); //$NON-NLS-1$ //$NON-NLS-2$
-		preferredPrefixTable.put("http://schemas.xmlsoap.org/wsdl/http/", "http"); //$NON-NLS-1$ //$NON-NLS-2$
-		preferredPrefixTable.put("http://schemas.xmlsoap.org/wsdl/mime/", "mime"); //$NON-NLS-1$ //$NON-NLS-2$
-		preferredPrefixTable.put("http://schemas.xmlsoap.org/soap/encoding/", "soapenc"); //$NON-NLS-1$ //$NON-NLS-2$
-		preferredPrefixTable.put("http://schemas.xmlsoap.org/soap/envelope/", "soapenv"); //$NON-NLS-1$ //$NON-NLS-2$
-		preferredPrefixTable.put("http://www.w3.org/2001/XMLSchema-instance", "xsi"); //$NON-NLS-1$ //$NON-NLS-2$
-		preferredPrefixTable.put("http://www.w3.org/2001/XMLSchema", "xsd"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-
-	protected void addBuiltInNamespaces(List list) {
-		String xsiNamespace = "http://www.w3.org/2001/XMLSchema-instance"; //$NON-NLS-1$
-		String xsdNamespace = "http://www.w3.org/2001/XMLSchema"; //$NON-NLS-1$
-		if (!isAlreadyDeclared(xsiNamespace)) {
-			list.add(new NamespaceInfo("http://www.w3.org/2001/XMLSchema-instance", "xsi", null)); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		if (!isAlreadyDeclared(xsdNamespace)) {
-			list.add(new NamespaceInfo("http://www.w3.org/2001/XMLSchema", "xsd", null)); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-	}
-
-	protected void addCatalogMapToList(ICatalog catalog, List list) {
-		ICatalogEntry[] entries = catalog.getCatalogEntries();
-		for (int i = 0; i < entries.length; i++) {
-			ICatalogEntry entry = entries[i];
-			if ((entry.getEntryType() == ICatalogEntry.ENTRY_TYPE_PUBLIC) && entry.getURI().endsWith(".xsd")) { //$NON-NLS-1$
-				if (!isAlreadyDeclared(entry.getKey())) {
-					NamespaceInfo namespaceInfo = new NamespaceInfo(entry.getKey(), "xx", null); //$NON-NLS-1$
-					list.add(namespaceInfo);
-				}
-			}
-		}
-	}
-
-	protected void buttonPressed(int buttonId) {
-		if (buttonId == IDialogConstants.OK_ID) {
-			namespaceInfoList = addNamespacesControl.getNamespaceInfoList();
-		}
-		super.buttonPressed(buttonId);
-	}
-
-	public void computeAddablePrefixes(List addableList, List exisitingList) {
-		HashMap map = new HashMap();
-		for (Iterator i = exisitingList.iterator(); i.hasNext();) {
-			NamespaceInfo info = (NamespaceInfo) i.next();
-			if (info.prefix != null) {
-				map.put(info.prefix, info);
-			}
-		}
-		for (Iterator i = addableList.iterator(); i.hasNext();) {
-			NamespaceInfo info = (NamespaceInfo) i.next();
-			if (info.uri != null) {
-				String prefix = (String) preferredPrefixTable.get(info.uri);
-				info.prefix = getUniquePrefix(map, prefix, info.uri);
-				map.put(info.prefix, info);
-			}
-		}
-	}
-
-	public int createAndOpen() {
-		create();
-		getShell().setText(title);
-		Rectangle r = getShell().getBounds();
-		getShell().setBounds(r.x + 80, r.y + 80, r.width, r.height);
-		setBlockOnOpen(true);
-		return open();
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-	}
-
-	protected Control createContents(Composite parent) {
-		Control control = super.createContents(parent);
-		return control;
-	}
-
-
-
-	protected Control createDialogArea(Composite parent) {
-		Composite dialogArea = (Composite) super.createDialogArea(parent);
-		addNamespacesControl = new CommonAddNamespacesControl(dialogArea, SWT.NONE, resourceLocation);
-		List list = new ArrayList();
-
-		addBuiltInNamespaces(list);
-		ICatalog defaultCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
-		INextCatalog[] nextCatalogs = defaultCatalog.getNextCatalogs();
-		for (int i = 0; i < nextCatalogs.length; i++) {
-			INextCatalog catalog = nextCatalogs[i];
-			ICatalog referencedCatalog = catalog.getReferencedCatalog();
-			if (referencedCatalog != null) {
-				if (XMLCorePlugin.USER_CATALOG_ID.equals(referencedCatalog.getId())) {
-					ICatalog userCatalog = referencedCatalog;
-					addCatalogMapToList(userCatalog, list);
-
-				}
-				else if (XMLCorePlugin.SYSTEM_CATALOG_ID.equals(referencedCatalog.getId())) {
-					ICatalog systemCatalog = referencedCatalog;
-					addCatalogMapToList(systemCatalog, list);
-				}
-			}
-		}
-
-		computeAddablePrefixes(list, existingNamespaces);
-
-		addNamespacesControl.setNamespaceInfoList(list);
-		return dialogArea;
-	}
-
-	public List getNamespaceInfoList() {
-		return namespaceInfoList;
-	}
-
-	protected String getPreferredPrefix(String namespaceURI) {
-		return (String) preferredPrefixTable.get(namespaceURI);
-	}
-
-	private String getUniquePrefix(HashMap prefixMap, String prefix, String uri) {
-		if (prefix == null) {
-			int lastIndex = uri.lastIndexOf('/');
-			if (lastIndex == uri.length() - 1) {
-				uri = uri.substring(0, lastIndex);
-				lastIndex = uri.lastIndexOf('/');
-			}
-			prefix = uri.substring(lastIndex + 1);
-			if ((prefix.length() > 20) || (prefix.indexOf(':') != -1)) {
-				prefix = null;
-			}
-		}
-		if (prefix == null) {
-			prefix = "p"; //$NON-NLS-1$
-		}
-		if (prefixMap.get(prefix) != null) {
-			String base = prefix;
-			for (int count = 0; prefixMap.get(prefix) != null; count++) {
-				prefix = base + count;
-			}
-		}
-		return prefix;
-	}
-
-	protected boolean isAlreadyDeclared(String namespaceURI) {
-		boolean result = false;
-		for (Iterator i = existingNamespaces.iterator(); i.hasNext();) {
-			NamespaceInfo namespaceInfo = (NamespaceInfo) i.next();
-			if (namespaceURI.equals(namespaceInfo.uri)) {
-				result = true;
-				break;
-			}
-		}
-		return result;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonEditNamespacesDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonEditNamespacesDialog.java
deleted file mode 100644
index 3a358cd..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonEditNamespacesDialog.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.nsedit;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.dialogs.EditNamespaceInfoDialog;
-import org.eclipse.wst.xml.ui.internal.dialogs.NamespaceInfoErrorHelper;
-
-public class CommonEditNamespacesDialog {
-	protected Composite commonComposite;
-	protected Button deleteButton;
-	protected Button editButton;
-
-	protected Label errorMessageLabel;
-	protected int heightHint = 250;
-	protected List namespaceInfoList = new ArrayList();
-
-	protected Button newButton;
-	protected IPath resourceLocation;
-
-	private boolean showLocationText = false;
-	protected String tableLabel = ""; //$NON-NLS-1$
-	protected CommonNamespaceInfoTable tableViewer;
-
-	protected Composite topComposite;
-	protected boolean useGroup;
-	protected int widthHint = 500;
-
-	public CommonEditNamespacesDialog(Composite parent, IPath resourceLocation, String stringTableLabel) {
-		this(parent, resourceLocation, stringTableLabel, false, false);
-	}
-
-	public CommonEditNamespacesDialog(Composite parent, IPath resourceLocation, String stringTableLabel, boolean useGroup, boolean showLocText) {
-		this.resourceLocation = resourceLocation;
-		tableLabel = stringTableLabel;
-		this.useGroup = useGroup;
-		showLocationText = showLocText;
-
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		if (widthHint != -1) {
-			gd.widthHint = widthHint;
-		}
-		if (heightHint != -1) {
-			gd.heightHint = heightHint;
-		}
-
-		// Set GridData and GridLayout for the parent Composite
-		parent.setLayoutData(gd);
-		parent.setLayout(new GridLayout());
-
-		// Create the top Composite
-		topComposite = new Composite(parent, SWT.NONE);
-		GridData topData = new GridData(GridData.FILL_HORIZONTAL);
-		topData.heightHint = 0;
-		topComposite.setLayoutData(topData);
-		topComposite.setLayout(new GridLayout());
-
-		// Create the 'common'/middle Composite
-		if (useGroup) {
-			commonComposite = new Group(parent, SWT.NONE);
-		}
-		else {
-			commonComposite = new Composite(parent, SWT.NONE);
-		}
-		commonComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-		commonComposite.setLayout(new GridLayout(3, false));
-
-		// Add the error Message Label
-		errorMessageLabel = new Label(parent, SWT.NONE);
-		errorMessageLabel.setLayoutData(createHorizontalFill());
-		Color color = new Color(errorMessageLabel.getDisplay(), 200, 0, 0);
-		errorMessageLabel.setForeground(color);
-
-		createControlArea();
-	}
-
-
-	protected void createButtons(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		composite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
-		GridLayout gridLayout = new GridLayout();
-		gridLayout.numColumns = 1;
-		gridLayout.marginHeight = 0;
-		gridLayout.marginWidth = 0;
-		composite.setLayout(gridLayout);
-
-		SelectionListener selectionListener = new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				if (e.widget == newButton) {
-					performNew();
-				}
-				else if (e.widget == editButton) {
-					performEdit();
-				}
-				else if (e.widget == deleteButton) {
-					performDelete();
-				}
-			}
-		};
-
-		// create a composite to hold the three buttons
-		Composite buttonComposite = new Composite(composite, SWT.NONE);
-		buttonComposite.setLayoutData(createHorizontalFill());
-		GridLayout buttonGridLayout = new GridLayout();
-		// buttonGridLayout.numColumns = 3;
-		// buttonGridLayout.makeColumnsEqualWidth = true;
-		buttonComposite.setLayout(buttonGridLayout);
-
-		// add the New button
-		//
-		newButton = new Button(buttonComposite, SWT.NONE);
-		// newButton.setText(" " +
-		// XMLCommonUIPlugin.getInstance().getString("_UI_BUTTON_NEW") + " ");
-		newButton.setText("   " + XMLUIMessages.CommonEditNamespacesDialog_0 + "   "); //$NON-NLS-1$ //$NON-NLS-2$ 
-		newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // ViewUtility.createHorizontalFill());
-		newButton.addSelectionListener(selectionListener);
-
-		// add the Edit button
-		//
-		// gd = new GridData();
-		// gd.horizontalAlignment = gd.FILL;
-		// gd.grabExcessHorizontalSpace = true;
-
-		editButton = new Button(buttonComposite, SWT.NONE);
-		editButton.setText(XMLUIMessages._UI_BUTTON_EDIT);
-		editButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // ViewUtility.createHorizontalFill());
-		editButton.addSelectionListener(selectionListener);
-
-		// add the Delete button
-		//
-		// gd = new GridData();
-		// gd.horizontalAlignment = gd.FILL;
-		// gd.grabExcessHorizontalSpace = true;
-
-		deleteButton = new Button(buttonComposite, SWT.NONE);
-		deleteButton.setText(XMLUIMessages._UI_BUTTON_DELETE);
-		deleteButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // ViewUtility.createHorizontalFill());
-		deleteButton.addSelectionListener(selectionListener);
-	}
-
-	private void createControlArea() {
-		if (useGroup) {
-			((Group) commonComposite).setText(tableLabel);
-		}
-		else {
-			Label label = new Label(commonComposite, SWT.NONE);
-			label.setText(tableLabel);
-			label.setLayoutData(createGridData(false, 3));
-		}
-
-		tableViewer = new CommonNamespaceInfoTable(commonComposite, 6, showLocationText);
-		tableViewer.getControl().setLayoutData(createGridData(true, 2));
-		createButtons(commonComposite);
-
-		tableViewer.setInput(namespaceInfoList);
-		updateButtonEnabledState();
-		ISelectionChangedListener selectionChangedListener = new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				updateButtonEnabledState();
-			}
-		};
-		tableViewer.addSelectionChangedListener(selectionChangedListener);
-	}
-
-	protected GridData createGridData(boolean both, int span) {
-		GridData gd = new GridData(both ? GridData.FILL_BOTH : GridData.FILL_HORIZONTAL);
-		gd.horizontalSpan = 2;
-		return gd;
-	}
-
-	private GridData createHorizontalFill() {
-		GridData gd = new GridData();
-		gd.horizontalAlignment = GridData.FILL;
-		gd.grabExcessHorizontalSpace = true;
-		return gd;
-	}
-
-
-
-	public NamespaceInfo getNamespaceInfo(String namespace) {
-		NamespaceInfo result = null;
-		for (Iterator i = namespaceInfoList.iterator(); i.hasNext();) {
-			NamespaceInfo info = (NamespaceInfo) i.next();
-			if ((info.uri != null) && info.uri.equals(namespace)) {
-				result = info;
-				break;
-			}
-		}
-		return result;
-	}
-
-	protected Object getSelection(ISelection selection) {
-		if (selection == null) {
-			return null;
-		} // end of if ()
-
-		Object result = null;
-		if (selection instanceof IStructuredSelection) {
-			IStructuredSelection es = (IStructuredSelection) selection;
-			Iterator i = es.iterator();
-			if (i.hasNext()) {
-				result = i.next();
-			}
-		}
-		return result;
-	}
-
-	/*
-	 * Use the returned Composite to add content above the 'common contents'.
-	 * Note: The GridData for the returned Composite has a heightHint = 0.
-	 * This means when using the returned Composite, the GridData must be
-	 * reset, else the Composite and it's contents will not appear.
-	 */
-	protected Composite getTopComposite() {
-		return topComposite;
-	}
-
-	protected EditNamespaceInfoDialog invokeDialog(String title, NamespaceInfo info) {
-		Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
-		EditNamespaceInfoDialog dialog = new EditNamespaceInfoDialog(shell, info);
-		dialog.create();
-		dialog.getShell().setText(title);
-		dialog.setBlockOnOpen(true);
-		dialog.setResourceLocation(resourceLocation);
-		dialog.open();
-		return dialog;
-	}
-
-	protected void performDelayedUpdate() {
-		tableViewer.refresh();
-		/*
-		 * Runnable delayedUpdate = new Runnable() { public void run() {
-		 * tableViewer.refresh(); } };
-		 * Display.getCurrent().asyncExec(delayedUpdate);
-		 */
-		// if (updateListener != null)
-		// {
-		// updateListener.updateOccured(this, namespaceInfoList);
-		// }
-	}
-
-	public void performDelete() {
-		ISelection selection = tableViewer.getSelection();
-		if (selection instanceof IStructuredSelection) {
-			IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-			namespaceInfoList.removeAll(structuredSelection.toList());
-			updateErrorMessage(namespaceInfoList);
-			performDelayedUpdate();
-		}
-	}
-
-	public void performEdit() {
-		Object selection = getSelection(tableViewer.getSelection());
-		if (selection != null) {
-			invokeDialog(XMLUIMessages._UI_LABEL_NEW_NAMESPACE_INFORMATION, (NamespaceInfo) selection);
-			updateErrorMessage(namespaceInfoList);
-			performDelayedUpdate();
-		}
-	}
-
-	public void performNew() {
-		Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
-		CommonAddNamespacesDialog dialog = new CommonAddNamespacesDialog(shell, XMLUIMessages._UI_ADD_NAMESPACE_DECLARATIONS, resourceLocation, namespaceInfoList);
-		dialog.createAndOpen();
-		if (dialog.getReturnCode() == Window.OK) {
-			namespaceInfoList.addAll(dialog.getNamespaceInfoList());
-			updateErrorMessage(namespaceInfoList);
-			performDelayedUpdate();
-		}
-	}
-
-	public void setNamespaceInfoList(List list) {
-		namespaceInfoList = list;
-		tableViewer.setInput(namespaceInfoList);
-	}
-
-	public void updateButtonEnabledState() {
-		Object selection = getSelection(tableViewer.getSelection());
-		NamespaceInfo info = (NamespaceInfo) selection;
-		editButton.setEnabled(info != null);
-		deleteButton.setEnabled((info != null) && (info.getProperty("unremovable") == null)); //$NON-NLS-1$
-	}
-
-	public void updateErrorMessage(List namespaceInfoList) {
-		NamespaceInfoErrorHelper helper = new NamespaceInfoErrorHelper();
-		String errorMessage = helper.computeErrorMessage(namespaceInfoList, null);
-		errorMessageLabel.setText(errorMessage != null ? errorMessage : ""); //$NON-NLS-1$
-	}
-	
-	public void setResourcePath(IPath path) {
-	  resourceLocation = path;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonEditNamespacesTargetFieldDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonEditNamespacesTargetFieldDialog.java
deleted file mode 100644
index 1f6d85a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonEditNamespacesTargetFieldDialog.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.nsedit;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/*
- * This class is an extension of CommonEditNamespacesDialog. This class adds
- * the target namespaces dialog field.
- */
-public class CommonEditNamespacesTargetFieldDialog extends CommonEditNamespacesDialog {
-
-	class TargetNamespaceModifyListener implements ModifyListener {
-		public void modifyText(ModifyEvent e) {
-			String oldTargetNamespace = targetNamespace;
-			targetNamespace = targetNamespaceField.getText();
-			updateTargetNamespaceAndNamespaceInfo(oldTargetNamespace, targetNamespace);
-		}
-	}
-
-	protected String targetNamespace;
-	protected Text targetNamespaceField;
-
-	public CommonEditNamespacesTargetFieldDialog(Composite parent, IPath resourceLocation1) {
-		super(parent, resourceLocation1, XMLUIMessages._UI_NAMESPACE_DECLARATIONS);
-
-		Composite targetComp = getTopComposite();
-		targetComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		Label targetNamespaceLabel = new Label(targetComp, SWT.NONE);
-		targetNamespaceLabel.setLayoutData(gd);
-		targetNamespaceLabel.setText(XMLUIMessages._UI_TARGET_NAMESPACE);
-
-		targetNamespaceField = new Text(targetComp, SWT.BORDER);
-		targetNamespaceField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		targetNamespaceField.addModifyListener(new TargetNamespaceModifyListener());
-
-		// createControlArea();
-	}
-
-	public String getTargetNamespace() {
-		return targetNamespace;
-	}
-
-	public void performEdit() {
-		Object selection = getSelection(tableViewer.getSelection());
-		if (selection != null) {
-			boolean editTargetNamespace = false;
-			NamespaceInfo nsInfo = (NamespaceInfo) selection;
-			if (getTargetNamespace().equals(nsInfo.uri)) {
-				editTargetNamespace = true;
-			}
-
-			invokeDialog(XMLUIMessages._UI_LABEL_NEW_NAMESPACE_INFORMATION, nsInfo);
-			updateErrorMessage(namespaceInfoList);
-			performDelayedUpdate();
-
-			if (editTargetNamespace) {
-				targetNamespaceField.setText(nsInfo.uri);
-			}
-		}
-	}
-
-	public void setTargetNamespace(String theTargetNamespace) {
-		targetNamespace = theTargetNamespace != null ? theTargetNamespace : ""; //$NON-NLS-1$
-		targetNamespaceField.setText(targetNamespace);
-		// updateTargetNamespaceAndNamespaceInfo(targetNamespace);
-	}
-
-	void updateTargetNamespaceAndNamespaceInfo(String oldTargetNamespace, String newTargetNamespace) {
-		NamespaceInfo info = getNamespaceInfo(newTargetNamespace);
-		if (info == null) {
-			info = getNamespaceInfo(oldTargetNamespace);
-			if (info == null) {
-				info = new NamespaceInfo(newTargetNamespace, "tns", null); //$NON-NLS-1$
-				namespaceInfoList.add(info);
-			}
-			else {
-				info.uri = targetNamespace;
-			}
-		}
-		tableViewer.refresh();
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonNamespaceInfoTable.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonNamespaceInfoTable.java
deleted file mode 100644
index 44162e4..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonNamespaceInfoTable.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.nsedit;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-public class CommonNamespaceInfoTable extends TableViewer {
-
-	/**
-	 * NamespaceInfoTableLabelProvider
-	 */
-	protected class Provider extends LabelProvider implements ITableLabelProvider, IStructuredContentProvider {
-		Viewer viewer;
-
-		public Image getColumnImage(Object object, int columnIndex) {
-			Image result = null;
-			int columnCode = getColumnCode(columnIndex);
-			if (columnCode == COLUMN_LOCATION_HINT) {
-				NamespaceInfo info = (NamespaceInfo) object;
-				if ((info.locationHint == null) || info.locationHint.trim().equals("")) { //$NON-NLS-1$
-					// Comment this out until we solve the alignment/(space
-					// for image being allocated
-					// to prefix column) ......
-					// result =
-					// XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_WARNING_OBJ);
-				}
-			}
-
-			return result;
-		}
-
-		public String getColumnText(Object object, int column) {
-			NamespaceInfo info = (NamespaceInfo) object;
-			String result = null;
-			int columnCode = getColumnCode(column);
-			switch (columnCode) {
-				case COLUMN_PREFIX : {
-					result = info.prefix;
-					break;
-				}
-				case COLUMN_NAMESPACE_URI : {
-					result = info.uri;
-					break;
-				}
-				case COLUMN_CHECKBOX : {
-					result = ""; // info.locationHint; //$NON-NLS-1$
-					break;
-				}
-				case COLUMN_LOCATION_HINT : {
-					result = info.locationHint;
-					break;
-				}
-			}
-			result = result != null ? result : ""; //$NON-NLS-1$
-			if (result.equals("")) { //$NON-NLS-1$
-				switch (columnCode) {
-					case COLUMN_PREFIX : {
-						result = XMLUIMessages._UI_NO_PREFIX;
-						break;
-					}
-					case COLUMN_NAMESPACE_URI : {
-						result = XMLUIMessages._UI_NO_NAMESPACE_NAME;
-						break;
-					}
-				}
-			}
-			return result;
-		}
-
-		public Object[] getElements(Object inputElement) {
-			List list = (List) viewer.getInput();
-			return list != null ? list.toArray() : null;
-		}
-
-		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-			this.viewer = viewer;
-		}
-	}
-
-	class TableItemChecker extends MouseAdapter {
-		public void mouseDown(MouseEvent e) {
-			TableItem item = getTable().getItem(new Point(e.x, e.y));
-			if (item != null) {
-				Object obj = item.getData();
-				if (obj != null) {
-					NamespaceInfo info = (NamespaceInfo) obj;
-					TableColumn col = getTable().getColumn(0);
-					if (e.x < col.getWidth()) // if the point falls within
-												// the
-					// Select column then perform
-					// check/uncheck
-					{
-						String currentState = (String) info.getProperty("checked"); //$NON-NLS-1$
-						System.out.println("currentState" + currentState); //$NON-NLS-1$
-						if ((currentState == null) || currentState.equals("false")) //$NON-NLS-1$
-						{
-							info.setProperty("checked", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-						}
-						else {
-							info.setProperty("checked", "false"); //$NON-NLS-1$ //$NON-NLS-2$
-						}
-						refresh();
-					}
-				}
-			}
-		}
-	}
-
-	protected static final int COLUMN_CHECKBOX = 1;
-	protected static final int COLUMN_LOCATION_HINT = 4;
-	protected static final int COLUMN_NAMESPACE_URI = 2;
-	protected static final int COLUMN_PREFIX = 3;
-
-	protected static final String LABEL_CHECKBOX = ""; //$NON-NLS-1$
-	protected static final String LABEL_LOCATION_HINT = XMLUIMessages._UI_LABEL_LOCATION_HINT;
-	protected static final String LABEL_NAMESPACE_URI = XMLUIMessages._UI_LABEL_NAMESPACE_NAME;
-	protected static final String LABEL_PREFIX = XMLUIMessages._UI_LABEL_PREFIX;
-	protected List checkedList = new ArrayList();
-
-	// protected List namespaceInfoList = new ArrayList();
-	protected int[] columnIndexMap;
-	protected boolean showCheckBoxes = true;
-	private boolean showLocationText = false;
-
-	private Table table;
-	protected int visibleRows = -1;
-
-	public CommonNamespaceInfoTable(Composite parent, int visibleRows) {
-		this(parent, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER, visibleRows, false);
-	}
-
-	// protected CellEditor getCellEditor(int column)
-	// {
-	// return (column == COLUMN_CHECKBOX) ? checkBoxCellEditor :
-	// textCellEditor;
-	// }
-
-	public CommonNamespaceInfoTable(Composite parent, int visibleRows, boolean showLocationText) {
-		this(parent, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER, visibleRows, showLocationText);
-	}
-
-	public CommonNamespaceInfoTable(Composite parent, int style, int visibleRows) {
-		this(parent, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER | style, visibleRows, false);
-	}
-
-	public CommonNamespaceInfoTable(Composite parent, int style, int visibleRows, boolean showLocationText) {
-		super(new Table(parent, style));
-		getTable().setLinesVisible(true);
-		this.showCheckBoxes = (style & SWT.CHECK) != 0;
-		columnIndexMap = createColumnIndexMap();
-		this.showLocationText = showLocationText;
-
-		Provider provider = new Provider();
-		setContentProvider(provider);
-		setLabelProvider(provider);
-
-		String[] columnPropertiesArray = createColumnPropertiesArray();
-		setColumnProperties(columnPropertiesArray);
-
-		table = getTable();
-		table.setHeaderVisible(true);
-		table.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-		TableLayout layout = new TableLayout();
-
-		for (int i = 0; i < columnPropertiesArray.length; i++) {
-			TableColumn column = new TableColumn(table, i);
-			if ((columnPropertiesArray[i]).equals(LABEL_LOCATION_HINT)) {
-				if (showLocationText) {
-					column.setText(columnPropertiesArray[i]);
-				}
-				else {
-					// Comment this out until we solve the alignment/(space
-					// for image being allocated
-					// to prefix column) ......
-					// column.setImage(XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TXTEXT));
-				}
-			}
-			else {
-				column.setText(columnPropertiesArray[i]);
-			}
-			column.setAlignment(SWT.LEFT);
-			layout.addColumnData(new ColumnWeightData(getColumnWidth(i), true));
-		}
-		table.setLayout(layout);
-
-		this.visibleRows = visibleRows;
-		// for (int i = 0; i < visibleRows; i++)
-		// {
-		// TableItem item = new TableItem(table, SWT.NONE);
-		// item.setText("#######");
-		// }
-		// checkBoxCellEditor = new NamespaceInfoCheckboxCellEditor(table);
-		// textCellEditor = new TextCellEditor(table);
-
-		/*
-		 * CellEditor[] cellEditors = new
-		 * CellEditor[columnPropertiesArray.length]; for (int i = 0; i <
-		 * columnPropertiesArray.length; i++) { cellEditors[i] =
-		 * getCellEditor(i); } setCellEditors(cellEditors);
-		 */
-		// if (showCheckBoxes)
-		// {
-		// getTable().addMouseListener(new TableItemChecker());
-		// }
-	}
-
-	// protected CellEditor checkBoxCellEditor;
-	// protected CellEditor textCellEditor;
-
-	protected int[] createColumnIndexMap() {
-		int[] result = new int[showCheckBoxes ? 4 : 3];
-		int i = 0;
-		if (showCheckBoxes) {
-			result[i++] = COLUMN_CHECKBOX;
-		}
-		result[i++] = COLUMN_PREFIX;
-		result[i++] = COLUMN_NAMESPACE_URI;
-		if (!showCheckBoxes) {
-			result[i++] = COLUMN_LOCATION_HINT;
-		}
-		return result;
-	}
-
-	protected String[] createColumnPropertiesArray() {
-		String[] result = new String[3];
-		int i = 0;
-		if (showCheckBoxes) {
-			result[i++] = LABEL_CHECKBOX;
-		}
-		result[i++] = LABEL_PREFIX;
-		result[i++] = LABEL_NAMESPACE_URI;
-		if (!showCheckBoxes) {
-			result[i++] = LABEL_LOCATION_HINT;
-		}
-		return result;
-	}
-
-	protected int getColumnCode(int column) {
-		int result = 0;
-		if (column < columnIndexMap.length) {
-			result = columnIndexMap[column];
-		}
-		return result;
-	}
-
-	protected int getColumnWidth(int column) {
-		int result = 0;
-		switch (getColumnCode(column)) {
-			case COLUMN_PREFIX : {
-				result = 5;
-				break;
-			}
-			case COLUMN_NAMESPACE_URI : {
-				// Size columns differently when location hint text label is
-				// displayed
-				if (showLocationText) {
-					result = 10;
-				}
-				else {
-					result = 20;
-				}
-				break;
-			}
-			case COLUMN_CHECKBOX : {
-				result = 1; // info.locationHint;
-				break;
-			}
-			case COLUMN_LOCATION_HINT : {
-				// Size columns differently when location hint text label is
-				// displayed
-				if (showLocationText) {
-					result = 10;
-				}
-				else {
-					result = 2;
-				}
-				break;
-			}
-		}
-		return result;
-	}
-	/*
-	 * protected class NamespaceInfoCellModifier implements ICellModifier {
-	 * public NamespaceInfoCellModifier() { }
-	 * 
-	 * public boolean canModify(Object element, String property) { if
-	 * (property.equals(LABEL_CHECKBOX)) { return true; } else if
-	 * (property.equals(LABEL_PREFIX)) { return true; } return false; }
-	 * 
-	 * public Object getValue(Object element, String property) { int column =
-	 * 0; if (property.equals(LABEL_CHECKBOX)) { column = 0; } else if
-	 * (property.equals(LABEL_PREFIX)) { column = 1; } else if
-	 * (property.equals(LABEL_NAMESPACE_URI)) { column = 2; }
-	 * 
-	 * //if (element instanceof TableElement) //{ // return
-	 * provider.getColumnText(element, column); //} //else //{ // return null; // }
-	 * return "hello"; }
-	 * 
-	 * public void modify(Object element, String property, Object value) { } }
-	 * 
-	 * protected class NamespaceInfoCheckboxCellEditor extends
-	 * CheckboxCellEditor implements MouseListener { public
-	 * NamespaceInfoCheckboxCellEditor(Composite parent) { super(parent); }
-	 * 
-	 * protected void doSetValue(Object value) { }
-	 * 
-	 * public void activate() { super.activate(); deactivate();
-	 * Display.getCurrent().getFocusControl().redraw(); }
-	 * 
-	 * public void mouseDown(MouseEvent e) { if (getTable().getItem(new
-	 * Point(e.x, e.y)) != null) { } } public void mouseDoubleClick(MouseEvent
-	 * e) { } public void mouseUp(MouseEvent e) { } }
-	 */
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/EncodingSettings.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/EncodingSettings.java
deleted file mode 100644
index e2bbd57..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/EncodingSettings.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
-
-import java.util.Vector;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.sse.core.internal.encoding.CommonCharsetNames;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/**
- * EncodingSettings is a composite that can be used to display the set of
- * encoding values that are available to the user. The list of encoding values
- * is based off the SupportedJavaEncoding class. As the user selects an
- * encoding from the combo box, the readonly field below it changes to show
- * the IANA tag for that particular encoding description. The labels for the
- * widgets are configurable and the initial value to display to the user can
- * be set using the setIANATag(). The currently selected entry's IANA tag can
- * be retrieved with getIANATag(). Entries displayed to the user can be added
- * and removed.
- */
-public class EncodingSettings extends Composite {
-
-	private class ComboListener implements ModifyListener {
-		public void modifyText(ModifyEvent e) {
-			int i = encodingCombo.getSelectionIndex();
-			if ((i >= 0) && (i < ianaVector.size())) {
-				ianaText.setText((String) (ianaVector.elementAt(encodingCombo.getSelectionIndex())));
-			}
-		}
-	}
-
-	private static String ENCODING_LABEL = XMLUIMessages.EncodingSettings_1;
-
-	private static String IANA_LABEL = XMLUIMessages.EncodingSettings_0;
-
-	private ModifyListener comboListener = new ComboListener();
-	protected Combo encodingCombo;
-	protected Label encodingLabel, ianaLabel;
-	protected Text ianaText;
-	protected Vector ianaVector;
-
-	/**
-	 * Method EncodingSettings.
-	 * 
-	 * @param parent
-	 */
-	public EncodingSettings(Composite parent) {
-		super(parent, SWT.NONE);
-		init(IANA_LABEL, ENCODING_LABEL);
-	}
-
-	/**
-	 * Method EncodingSettings.
-	 * 
-	 * @param parent
-	 * @param encodingLabel -
-	 *            text label to use beside the locale sensitive description of
-	 *            the currently selected encoding
-	 */
-	public EncodingSettings(Composite parent, String encodingLabel) {
-		super(parent, SWT.NONE);
-		init(IANA_LABEL, encodingLabel);
-	}
-
-	/**
-	 * Method EncodingSettings.
-	 * 
-	 * @param parent
-	 * @param ianaLabel =
-	 *            text label to use beside the display only IANA field
-	 * @param encodingLabel -
-	 *            text label to use beside the locale sensitive description of
-	 *            the currently selected encoding
-	 */
-	public EncodingSettings(Composite parent, String ianaLabel, String encodingLabel) {
-		super(parent, SWT.NONE);
-		init(ianaLabel, encodingLabel);
-	}
-
-	/**
-	 * Method addEntry. Add an entry to the end of the Encoding Combobox
-	 * 
-	 * @param description -
-	 *            encoding description to display
-	 * @param ianaTag -
-	 *            IANA tag for the description
-	 */
-	public void addEntry(String description, String ianaTag) {
-		encodingCombo.add(description);
-		ianaVector.add(ianaTag);
-	}
-
-	/**
-	 * Method addEntry. Add an entry to the Encoding Combobox at index index
-	 * 
-	 * @param description -
-	 *            encoding description to display
-	 * @param ianaTag -
-	 *            IANA tag for the description
-	 * @param index -
-	 *            index into the combo to add to
-	 */
-	public void addEntry(String description, String ianaTag, int index) {
-		if (index == ianaVector.size()) {
-			// just add to the end
-			addEntry(description, ianaTag);
-			return;
-		}
-
-		if ((0 <= index) && (index < ianaVector.size())) {
-			encodingCombo.add(description, index);
-			ianaVector.add(index, ianaTag);
-		}
-	}
-
-	protected Combo createComboBox(Composite parent, boolean isReadOnly) {
-		int style = isReadOnly == true ? SWT.READ_ONLY : SWT.DROP_DOWN;
-
-		Combo combo = new Combo(parent, style);
-
-		GridData data = new GridData();
-		data.horizontalAlignment = GridData.FILL;
-		data.grabExcessHorizontalSpace = true;
-		combo.setLayoutData(data);
-		return combo;
-	}
-
-	/**
-	 * Helper method for creating labels.
-	 */
-	protected Label createLabel(Composite parent, String text) {
-		Label label = new Label(parent, SWT.LEFT);
-		label.setText(text);
-
-		GridData data = new GridData();
-		data.horizontalAlignment = GridData.FILL;
-		label.setLayoutData(data);
-		return label;
-	}
-
-	protected Text createTextField(Composite parent, int width) {
-		Text text = new Text(parent, SWT.SINGLE | SWT.READ_ONLY);
-
-		GridData data = new GridData();
-		data.horizontalAlignment = GridData.FILL;
-		data.grabExcessHorizontalSpace = true;
-		data.widthHint = width;
-		text.setLayoutData(data);
-
-		return text;
-	}
-
-	/**
-	 * @see org.eclipse.swt.widgets.Widget#dispose()
-	 */
-	public void dispose() {
-		encodingCombo.removeModifyListener(comboListener);
-		super.dispose();
-	}
-
-	private void fillCombo() {
-		try {
-			String[] ianaTags = CommonCharsetNames.getCommonCharsetNames();
-			int totalNum = ianaTags.length;
-			for (int i = 0; i < totalNum; i++) {
-				String iana = ianaTags[i];
-				String enc = CommonCharsetNames.getDisplayString(iana);
-
-				if (enc != null) {
-					encodingCombo.add(enc);
-				}
-				else {
-					Logger.log(Logger.WARNING, "CommonCharsetNames.getDisplayString(" + iana + ") returned null"); //$NON-NLS-1$ //$NON-NLS-2$
-					encodingCombo.add(iana);
-				}
-				ianaVector.add(iana);
-			}
-		}
-		catch (Exception e) {
-			// e.printStackTrace();
-			// MessageDialog.openError(getShell(), "Resource exception",
-			// "Unable to obtain encoding strings. Check resource file");
-			// XMLEncodingPlugin.getPlugin().getMsgLogger().write(e.toString());
-			// XMLEncodingPlugin.getPlugin().getMsgLogger().writeCurrentThread();
-			Logger.log(Logger.ERROR, "Exception", e); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * <code>getEncoding</code> Get the descriptive encoding name that was
-	 * selected.
-	 * 
-	 * @return a <code>String</code> value
-	 */
-	public String getEncoding() {
-		return encodingCombo.getText();
-	}
-
-	/**
-	 * Method getEncodingCombo. Returns the combo used to display the encoding
-	 * descriptions.
-	 * 
-	 * @return Combo
-	 */
-	public Combo getEncodingCombo() {
-		return encodingCombo;
-	}
-
-	/**
-	 * <code>getIANATag</code> Get the IANA tag equivalent of the selected
-	 * descriptive encoding name
-	 * 
-	 * @return a <code>String</code> value
-	 */
-	public String getIANATag() {
-		int i = encodingCombo.getSelectionIndex();
-		if (i >= 0) {
-			return (String) (ianaVector.elementAt(i));
-		}
-		return ""; //$NON-NLS-1$
-	}
-
-	protected void init(String ianaLabelStr, String encodingLabelStr) {
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
-		setLayout(layout);
-		GridData data = new GridData();
-		data.verticalAlignment = GridData.FILL;
-		data.horizontalAlignment = GridData.FILL;
-		data.grabExcessHorizontalSpace = true;
-		setLayoutData(data);
-
-		encodingLabel = createLabel(this, encodingLabelStr);
-		encodingCombo = createComboBox(this, true);
-		ianaLabel = createLabel(this, ianaLabelStr);
-		ianaText = createTextField(this, 20);
-		ianaVector = new Vector();
-
-		fillCombo();
-		resetToDefaultEncoding();
-		encodingCombo.addModifyListener(comboListener);
-	}
-
-	/**
-	 * <code>isEncodingInList</code> Checks whether the encoding name is in
-	 * the combo
-	 * 
-	 * @param enc
-	 *            a <code>string</code> value. The encoding name.
-	 * @return a <code>boolean</code> value. TRUE if encoding is in list.
-	 *         FALSE if encoding is not in list.
-	 */
-	public boolean isEncodingInList(String enc) {
-		int i = encodingCombo.indexOf(enc);
-		if (i >= 0) {
-			return true;
-		}
-		return false;
-	}
-
-	/**
-	 * <code>isIANATagInList</code> Checks whether the IANA tag is in the
-	 * combo
-	 * 
-	 * @param ianaTag
-	 *            a <code>string</code> value. The IANA tag.
-	 * @return a <code>boolean</code> value. TRUE if tag is in list. FALSE
-	 *         if tag is not in list.
-	 */
-	public boolean isIANATagInList(String ianaTag) {
-		int i = ianaVector.indexOf(ianaTag);
-		if (i >= 0) {
-			return true;
-		}
-		return false;
-	}
-
-	/**
-	 * Method removeEntry. Removes both the description and the IANA tag at
-	 * the specified index
-	 * 
-	 * @param index
-	 */
-	public void removeEntry(int index) {
-		if ((0 <= index) && (index < ianaVector.size())) {
-			encodingCombo.remove(index);
-			ianaVector.remove(index);
-		}
-	}
-
-	/**
-	 * Method resetToDefaultEncoding. Reset the control to the default
-	 * encoding. Currently UTF-8
-	 */
-	public void resetToDefaultEncoding() {
-		String defaultIANATag = "UTF-8"; //$NON-NLS-1$
-		ianaText.setText(defaultIANATag);
-		setIANATag(defaultIANATag);
-	}
-
-	/**
-	 * Method setEnabled. Enable/disable the EncodingSettings composite.
-	 * 
-	 * @param enabled
-	 */
-	public void setEnabled(boolean enabled) {
-		encodingCombo.setEnabled(enabled);
-		encodingLabel.setEnabled(enabled);
-		ianaLabel.setEnabled(enabled);
-		ianaText.setEnabled(enabled);
-	}
-
-	/**
-	 * <code>setEncoding</code> Set the selection in the combo to the
-	 * descriptive encoding name.
-	 * 
-	 * @param enc
-	 *            a <code>string</code> value. Note this is not the IANA
-	 *            tag.
-	 */
-	public void setEncoding(String enc) {
-		encodingCombo.setText(enc);
-		encodingCombo.select(encodingCombo.indexOf(enc));
-	}
-
-	/**
-	 * <code>setIANATag</code> Set the IANA tag for the combo
-	 * 
-	 * @param ianaTag
-	 *            a <code>string</code> value. The IANA tag.
-	 */
-	public void setIANATag(String ianaTag) {
-		int i = ianaVector.indexOf(ianaTag);
-		if (i >= 0) {
-			encodingCombo.select(i);
-		}
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/WorkbenchDefaultEncodingSettings.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/WorkbenchDefaultEncodingSettings.java
deleted file mode 100644
index e7930ed..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/WorkbenchDefaultEncodingSettings.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.sse.core.internal.encoding.CommonCharsetNames;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/**
- * WorkbenchDefaultEncodingSettings is an extension of EncodingSettings. This
- * composite contains EncodingSettings for users to select the encoding they
- * desire as well as a checkbox for users to select to use the default
- * workbench encoding instead.
- * 
- * @see org.eclipse.wst.xml.ui.internal.preferences.EncodingSettings
- */
-public class WorkbenchDefaultEncodingSettings extends Composite {
-
-	private final static int INDENT = 15;
-	private static final String WORKBENCH_DEFAULT = ""; //$NON-NLS-1$
-	private EncodingSettings fEncodingSettings;
-	private String fNonDefaultIANA = null;
-	private Button fUseDefaultButton;
-
-	public WorkbenchDefaultEncodingSettings(Composite parent) {
-		super(parent, SWT.NONE);
-		createControls();
-	}
-
-	private void createControls() {
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 1;
-		layout.marginWidth = 0;
-		setLayout(layout);
-		GridData data = new GridData();
-		data.verticalAlignment = GridData.FILL;
-		data.horizontalAlignment = GridData.FILL;
-		data.grabExcessHorizontalSpace = true;
-		setLayoutData(data);
-
-		Composite defaultEncodingComposite = new Composite(this, SWT.NONE);
-		layout = new GridLayout();
-		layout.marginWidth = 0;
-		layout.marginHeight = 0;
-		data = new GridData(GridData.FILL_BOTH);
-		defaultEncodingComposite.setLayout(layout);
-		defaultEncodingComposite.setLayoutData(data);
-
-		fUseDefaultButton = new Button(defaultEncodingComposite, SWT.CHECK);
-		fUseDefaultButton.setText(XMLUIMessages.WorkbenchDefaultEncodingSettings_0);
-
-		fUseDefaultButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				handleUseDefaultButtonSelected();
-			}
-		});
-
-		fEncodingSettings = new EncodingSettings(this);
-		((GridLayout) fEncodingSettings.getLayout()).marginWidth = 0;
-		((GridData) fEncodingSettings.getLayoutData()).horizontalIndent = INDENT;
-
-	}
-
-	private Combo getEncodingCombo() {
-		return fEncodingSettings.getEncodingCombo();
-	}
-
-	/**
-	 * <code>getIANATag</code> Get the IANA tag equivalent of the selected
-	 * descriptive encoding name. Returns empty string if using workbench
-	 * encoding.
-	 * 
-	 * @return a <code>String</code> value
-	 */
-	public String getIANATag() {
-		if (!isDefault()) {
-			return fEncodingSettings.getIANATag();
-		}
-		return WORKBENCH_DEFAULT;
-	}
-
-	private String getWorkbenchEncoding() {
-		return ResourcesPlugin.getEncoding();
-	}
-
-	void handleUseDefaultButtonSelected() {
-		if (fUseDefaultButton.getSelection()) {
-			fNonDefaultIANA = fEncodingSettings.getIANATag();
-			String workbenchValue = getWorkbenchEncoding();
-			workbenchValue = CommonCharsetNames.getIanaPreferredCharsetName(workbenchValue);
-			fEncodingSettings.setIANATag(workbenchValue);
-		}
-		else if (fNonDefaultIANA != null) {
-			fEncodingSettings.setIANATag(fNonDefaultIANA);
-		}
-		getEncodingCombo().setEnabled(!fUseDefaultButton.getSelection());
-		fEncodingSettings.setEnabled(!fUseDefaultButton.getSelection());
-	}
-
-	private boolean isDefault() {
-		return fUseDefaultButton.getSelection();
-	}
-
-	/**
-	 * <code>setEncoding</code> Set the selection in the combo to the
-	 * descriptive encoding name. Selects use workbench encoding if ianaTag is
-	 * null or empty string.
-	 * 
-	 */
-	public void setIANATag(String ianaTag) {
-		if ((ianaTag == null) || ianaTag.equals(WORKBENCH_DEFAULT)) {
-			fUseDefaultButton.setSelection(true);
-			handleUseDefaultButtonSelected();
-		}
-		else {
-			fUseDefaultButton.setSelection(false);
-			handleUseDefaultButtonSelected();
-			if (!isDefault()) {
-				fEncodingSettings.setIANATag(ianaTag);
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLColorPage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLColorPage.java
deleted file mode 100644
index 4f29d75..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLColorPage.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     Benjamin Muskalla, b.muskalla@gmx.net - [158660] character entities should have their own syntax highlighting preference 
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
-
-import java.util.ArrayList;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore.OverlayKey;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractColorPage;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.StyledTextColorPicker;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-/**
- * @deprecated
- */
-public class XMLColorPage extends AbstractColorPage {
-
-	protected Control createContents(Composite parent) {
-		Composite pageComponent = createComposite(parent, 1);
-		((GridData) pageComponent.getLayoutData()).horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
-
-		super.createContents(pageComponent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(pageComponent, IHelpContextIds.XML_PREFWEBX_STYLES_HELPID);
-		return pageComponent;
-	}
-
-	/**
-	 * Set up all the style preference keys in the overlay store
-	 */
-	protected OverlayKey[] createOverlayStoreKeys() {
-		ArrayList overlayKeys = new ArrayList();
-
-		ArrayList styleList = new ArrayList();
-		initStyleList(styleList);
-		Iterator i = styleList.iterator();
-		while (i.hasNext()) {
-			overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, (String) i.next()));
-		}
-
-		OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
-		overlayKeys.toArray(keys);
-		return keys;
-	}
-
-	protected IPreferenceStore doGetPreferenceStore() {
-		return XMLUIPlugin.getDefault().getPreferenceStore();
-	}
-
-	public String getSampleText() {
-		return XMLUIMessages.Sample_XML_doc; // = "<?xml
-		// version=\"1.0\"?>\n<?customProcessingInstruction\n\tXML
-		// processor
-		// specific\n\tcontent
-		// ?>\n<!DOCTYPE
-		// colors\n\tPUBLIC
-		// \"//IBM/XML/COLORS/\"
-		// \"colors.dtd\">\n<colors>\n\t<!--
-		// begin color definitions
-		// -->\n\t<color
-		// name=\"plaintext\"
-		// foreground=\"#000000\"\n\t\tbackground=\"#D4D0C8\"/>\n\t<color
-		// name=\"bold\"
-		// foreground=\"#000000\"\n\t\tbackground=\"#B3ACA0\">\n\t<![CDATA[<123456789>]]>\n\tNormal
-		// text content.\n\t<color
-		// name=\"inverse\"
-		// foreground=\"#F0F0F0\"\n\t\tbackground=\"#D4D0C8\"/>\n\n</colors>\n";
-	}
-
-	protected void initCommonContextStyleMap(Dictionary contextStyleMap) {
-
-		contextStyleMap.put(DOMRegionContext.XML_COMMENT_OPEN, IStyleConstantsXML.COMMENT_BORDER);
-		contextStyleMap.put(DOMRegionContext.XML_COMMENT_TEXT, IStyleConstantsXML.COMMENT_TEXT);
-		contextStyleMap.put(DOMRegionContext.XML_COMMENT_CLOSE, IStyleConstantsXML.COMMENT_BORDER);
-
-		contextStyleMap.put(DOMRegionContext.XML_TAG_OPEN, IStyleConstantsXML.TAG_BORDER);
-		contextStyleMap.put(DOMRegionContext.XML_END_TAG_OPEN, IStyleConstantsXML.TAG_BORDER);
-		contextStyleMap.put(DOMRegionContext.XML_TAG_NAME, IStyleConstantsXML.TAG_NAME);
-		contextStyleMap.put(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME, IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
-		contextStyleMap.put(DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE, IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
-		contextStyleMap.put(DOMRegionContext.XML_TAG_CLOSE, IStyleConstantsXML.TAG_BORDER);
-		contextStyleMap.put(DOMRegionContext.XML_EMPTY_TAG_CLOSE, IStyleConstantsXML.TAG_BORDER);
-
-		contextStyleMap.put(DOMRegionContext.XML_DECLARATION_OPEN, IStyleConstantsXML.DECL_BORDER);
-		contextStyleMap.put(DOMRegionContext.XML_DECLARATION_CLOSE, IStyleConstantsXML.DECL_BORDER);
-		contextStyleMap.put(DOMRegionContext.XML_ELEMENT_DECLARATION, IStyleConstantsXML.DECL_BORDER);
-		contextStyleMap.put(DOMRegionContext.XML_ELEMENT_DECL_CLOSE, IStyleConstantsXML.DECL_BORDER);
-
-		contextStyleMap.put(DOMRegionContext.XML_CHAR_REFERENCE, IStyleConstantsXML.ENTITY_REFERENCE);
-		contextStyleMap.put(DOMRegionContext.XML_ENTITY_REFERENCE, IStyleConstantsXML.ENTITY_REFERENCE);
-		contextStyleMap.put(DOMRegionContext.XML_PE_REFERENCE, IStyleConstantsXML.ENTITY_REFERENCE);
-
-		contextStyleMap.put(DOMRegionContext.XML_CONTENT, IStyleConstantsXML.XML_CONTENT);
-	}
-
-	protected void initCommonDescriptions(Dictionary descriptions) {
-
-		// create descriptions for hilighting types
-		descriptions.put(IStyleConstantsXML.COMMENT_BORDER, XMLUIMessages.Comment_Delimiters_UI_); // =
-		// "Comment
-		// Delimiters"
-		descriptions.put(IStyleConstantsXML.COMMENT_TEXT, XMLUIMessages.Comment_Content_UI_); // =
-		// "Comment
-		// Content"
-		descriptions.put(IStyleConstantsXML.TAG_BORDER, XMLUIMessages.Tag_Delimiters_UI_); // =
-		// "Tag
-		// Delimiters"
-		descriptions.put(IStyleConstantsXML.TAG_NAME, XMLUIMessages.Tag_Names_UI_); // =
-		// "Tag
-		// Names"
-		descriptions.put(IStyleConstantsXML.TAG_ATTRIBUTE_NAME, XMLUIMessages.Attribute_Names_UI_); // =
-		// "Attribute
-		// Names"
-		descriptions.put(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, XMLUIMessages.Attribute_Values_UI_); // =
-		// "Attribute
-		// Values"
-		descriptions.put(IStyleConstantsXML.DECL_BORDER, XMLUIMessages.Declaration_Delimiters_UI_); // =
-		// "Declaration
-		// Delimiters"
-		descriptions.put(IStyleConstantsXML.XML_CONTENT, XMLUIMessages.Content_UI_); // =
-		// "Content"
-		descriptions.put(IStyleConstantsXML.ENTITY_REFERENCE, XMLUIMessages.Entity_Reference_UI_); //$NON-NLS-1$ = "Entity References"
-	}
-
-	protected void initCommonStyleList(ArrayList list) {
-
-		// list.add(IStyleConstantsXML.CDATA_BORDER);
-		// list.add(IStyleConstantsXML.CDATA_TEXT);
-		// list.add(IStyleConstantsXML.PI_BORDER);
-		// list.add(IStyleConstantsXML.PI_CONTENT);
-
-		list.add(IStyleConstantsXML.TAG_BORDER);
-		list.add(IStyleConstantsXML.TAG_NAME);
-		list.add(IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
-		list.add(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
-		list.add(IStyleConstantsXML.COMMENT_BORDER);
-		list.add(IStyleConstantsXML.COMMENT_TEXT);
-		list.add(IStyleConstantsXML.DECL_BORDER);
-		list.add(IStyleConstantsXML.XML_CONTENT);
-		list.add(IStyleConstantsXML.ENTITY_REFERENCE);
-	}
-
-	protected void initContextStyleMap(Dictionary contextStyleMap) {
-
-		initCommonContextStyleMap(contextStyleMap);
-		initDocTypeContextStyleMap(contextStyleMap);
-		contextStyleMap.put(DOMRegionContext.XML_CDATA_OPEN, IStyleConstantsXML.CDATA_BORDER);
-		contextStyleMap.put(DOMRegionContext.XML_CDATA_TEXT, IStyleConstantsXML.CDATA_TEXT);
-		contextStyleMap.put(DOMRegionContext.XML_CDATA_CLOSE, IStyleConstantsXML.CDATA_BORDER);
-
-		contextStyleMap.put(DOMRegionContext.XML_PI_OPEN, IStyleConstantsXML.PI_BORDER);
-		contextStyleMap.put(DOMRegionContext.XML_PI_CONTENT, IStyleConstantsXML.PI_CONTENT);
-		contextStyleMap.put(DOMRegionContext.XML_PI_CLOSE, IStyleConstantsXML.PI_BORDER);
-
-	}
-
-	protected void initDescriptions(Dictionary descriptions) {
-
-		initCommonDescriptions(descriptions);
-		initDocTypeDescriptions(descriptions);
-		descriptions.put(IStyleConstantsXML.CDATA_BORDER, XMLUIMessages.CDATA_Delimiters_UI_); // =
-		// "CDATA
-		// Delimiters"
-		descriptions.put(IStyleConstantsXML.CDATA_TEXT, XMLUIMessages.CDATA_Content_UI_); // =
-		// "CDATA
-		// Content"
-		descriptions.put(IStyleConstantsXML.PI_BORDER, XMLUIMessages.Processing_Instruction_Del_UI_); // =
-		// "Processing
-		// Instruction
-		// Delimiters"
-		descriptions.put(IStyleConstantsXML.PI_CONTENT, XMLUIMessages.Processing_Instruction_Con_UI__UI_); // =
-		// "Processing
-		// Instruction
-		// Content"
-	}
-
-	protected void initDocTypeContextStyleMap(Dictionary contextStyleMap) {
-
-		contextStyleMap.put(DOMRegionContext.XML_ELEMENT_DECL_NAME, IStyleConstantsXML.DOCTYPE_NAME);
-		contextStyleMap.put(DOMRegionContext.XML_DOCTYPE_DECLARATION, IStyleConstantsXML.TAG_NAME);
-		contextStyleMap.put(DOMRegionContext.XML_DOCTYPE_DECLARATION_CLOSE, IStyleConstantsXML.DECL_BORDER);
-
-		contextStyleMap.put(DOMRegionContext.XML_DOCTYPE_NAME, IStyleConstantsXML.DOCTYPE_NAME);
-		contextStyleMap.put(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBLIC, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID);
-		contextStyleMap.put(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBREF, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF);
-		contextStyleMap.put(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSTEM, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID);
-		contextStyleMap.put(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSREF, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF);
-	}
-
-	protected void initDocTypeDescriptions(Dictionary descriptions) {
-
-		// create descriptions for hilighting types for DOCTYPE related items
-		descriptions.put(IStyleConstantsXML.DOCTYPE_NAME, XMLUIMessages.DOCTYPE_Name_UI_); // =
-		// "DOCTYPE
-		// Name"
-		descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, XMLUIMessages.DOCTYPE_SYSTEM_PUBLIC_Keyw_UI_); // =
-		// "DOCTYPE
-		// SYSTEM/PUBLIC
-		// Keyword"
-		descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF, XMLUIMessages.DOCTYPE_Public_Reference_UI_); // =
-		// "DOCTYPE
-		// Public
-		// Reference"
-		descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF, XMLUIMessages.DOCTYPE_System_Reference_UI_); // =
-		// "DOCTYPE
-		// System
-		// Reference"
-	}
-
-	protected void initDocTypeStyleList(ArrayList list) {
-
-		list.add(IStyleConstantsXML.DOCTYPE_NAME);
-		list.add(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID);
-		list.add(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF);
-		list.add(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF);
-	}
-
-	protected void initStyleList(ArrayList list) {
-		initCommonStyleList(list);
-		initDocTypeStyleList(list);
-		list.add(IStyleConstantsXML.CDATA_BORDER);
-		list.add(IStyleConstantsXML.CDATA_TEXT);
-		list.add(IStyleConstantsXML.PI_BORDER);
-		list.add(IStyleConstantsXML.PI_CONTENT);
-	}
-
-	public boolean performOk() {
-		// required since the superclass *removes* existing preferences before
-		// saving its own
-		super.performOk();
-
-		SSEUIPlugin.getDefault().savePluginPreferences();
-		return true;
-	}
-
-	protected void setupPicker(StyledTextColorPicker picker) {
-		IModelManager mmanager = StructuredModelManager.getModelManager();
-		picker.setParser(mmanager.createStructuredDocumentFor(ContentTypeIdForXML.ContentTypeID_XML).getParser());
-
-		Dictionary descriptions = new Hashtable();
-		initDescriptions(descriptions);
-
-		Dictionary contextStyleMap = new Hashtable();
-		initContextStyleMap(contextStyleMap);
-
-		ArrayList styleList = new ArrayList();
-		initStyleList(styleList);
-
-		picker.setContextStyleMap(contextStyleMap);
-		picker.setDescriptions(descriptions);
-		picker.setStyleList(styleList);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.preferences.ui.AbstractColorPage#savePreferences()
-	 */
-	protected void savePreferences() {
-		XMLUIPlugin.getDefault().savePluginPreferences();
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLFilesPreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLFilesPreferencePage.java
deleted file mode 100644
index 0f3cc0e..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLFilesPreferencePage.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     David Carver - STAR - [205989] - [validation] validate XML after XInclude resolution
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.preferences.XMLCorePreferenceNames;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-
-public class XMLFilesPreferencePage extends AbstractPreferencePage {
-	protected EncodingSettings fEncodingSettings = null;
-
-	private Combo fDefaultSuffix = null;
-	private List fValidExtensions = null;
-	private Combo fIndicateNoGrammar = null;
-	private Button fUseXinclude = null;
-
-	/**
-	 * @param parent 
-	 * @return
-	 */
-	private Combo createCombo(Composite parent, String[] items) {
-		Combo combo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
-		combo.setItems(items);
-
-		//GridData
-		GridData data = new GridData(SWT.FILL, SWT.CENTER, true, true);
-		combo.setLayoutData(data);
-
-		return combo;
-	}
-
-	protected Control createContents(Composite parent) {
-		Composite composite = (Composite) super.createContents(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.XML_PREFWEBX_FILES_HELPID);
-		createContentsForCreatingGroup(composite);
-		createContentsForValidatingGroup(composite);
-
-		setSize(composite);
-		loadPreferences();
-
-		return composite;
-	}
-
-	protected void createContentsForCreatingGroup(Composite parent) {
-		Group creatingGroup = createGroup(parent, 2);
-		creatingGroup.setText(XMLUIMessages.Creating_files);
-
-		// Default extension for New file Wizard
-		createLabel(creatingGroup, XMLUIMessages.XMLFilesPreferencePage_ExtensionLabel);
-		fDefaultSuffix = createDropDownBox(creatingGroup);
-		String[] validExtensions = (String[]) getValidExtensions().toArray(new String[0]);
-		Arrays.sort(validExtensions);
-		fDefaultSuffix.setItems(validExtensions);
-		fDefaultSuffix.addSelectionListener(this);
-
-		Label label = createLabel(creatingGroup, XMLUIMessages.Encoding_desc);
-		((GridData) label.getLayoutData()).horizontalSpan = 2;
-		fEncodingSettings = new EncodingSettings(creatingGroup, XMLUIMessages.Encoding);
-		((GridData) fEncodingSettings.getLayoutData()).horizontalSpan = 2;
-	}
-
-	protected void createContentsForValidatingGroup(Composite parent) {
-		Group validatingGroup = createGroup(parent, 2);
-		((GridLayout) validatingGroup.getLayout()).makeColumnsEqualWidth = false;
-		validatingGroup.setText(XMLUIMessages.Validating_files);
-
-		if (fIndicateNoGrammar == null) {
-			createLabel(validatingGroup, XMLUIMessages.Indicate_no_grammar_specified);
-			fIndicateNoGrammar = createCombo(validatingGroup, StringUtils.unpack(XMLUIMessages.Indicate_no_grammar_specified_severities));
-		}
-		if (fUseXinclude == null) {
-			fUseXinclude = createCheckBox(validatingGroup, XMLUIMessages.Use_XInclude);
-		}
-		
-		new Label(validatingGroup, SWT.NONE).setLayoutData(new GridData());
-	}
-
-	public void dispose() {
-		fDefaultSuffix.removeModifyListener(this);
-		super.dispose();
-	}
-
-	protected void doSavePreferenceStore() {
-		XMLCorePlugin.getDefault().savePluginPreferences(); // model
-	}
-
-	/**
-	 * Get content type associated with this new file wizard
-	 * 
-	 * @return IContentType
-	 */
-	protected IContentType getContentType() {
-		return Platform.getContentTypeManager().getContentType(ContentTypeIdForXML.ContentTypeID_XML);
-	}
-
-	/**
-	 * Get list of valid extensions
-	 * 
-	 * @return List
-	 */
-	private List getValidExtensions() {
-		if (fValidExtensions == null) {
-			IContentType type = getContentType();
-			fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
-		}
-		return fValidExtensions;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.preferences.ui.AbstractPreferencePage#getModelPreferences()
-	 */
-	protected Preferences getModelPreferences() {
-		return XMLCorePlugin.getDefault().getPluginPreferences();
-	}
-
-	protected void initializeValues() {
-		initializeValuesForCreatingGroup();
-		initializeValuesForValidatingGroup();
-	}
-
-	protected void initializeValuesForCreatingGroup() {
-		String suffix = getModelPreferences().getString(XMLCorePreferenceNames.DEFAULT_EXTENSION);
-		fDefaultSuffix.setText(suffix);
-
-		String encoding = getModelPreferences().getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
-
-		fEncodingSettings.setIANATag(encoding);
-	}
-
-	protected void initializeValuesForValidatingGroup() {
-		int indicateNoGrammarButtonSelected = getModelPreferences().getInt(XMLCorePreferenceNames.INDICATE_NO_GRAMMAR);
-		boolean useXIncludeButtonSelected = getModelPreferences().getBoolean(XMLCorePreferenceNames.USE_XINCLUDE);
-
-		if (fIndicateNoGrammar != null) {
-			fIndicateNoGrammar.select(2 - indicateNoGrammarButtonSelected);
-			fIndicateNoGrammar.setText(StringUtils.unpack(XMLUIMessages.Indicate_no_grammar_specified_severities)[2-indicateNoGrammarButtonSelected]);
-		}
-		if (fUseXinclude != null) {
-			fUseXinclude.setSelection(useXIncludeButtonSelected);
-		}
-	}
-
-	protected void performDefaults() {
-		performDefaultsForCreatingGroup();
-		performDefaultsForValidatingGroup();
-
-		super.performDefaults();
-	}
-
-	protected void performDefaultsForCreatingGroup() {
-		String suffix = getModelPreferences().getDefaultString(XMLCorePreferenceNames.DEFAULT_EXTENSION);
-		fDefaultSuffix.setText(suffix);
-
-		String encoding = getModelPreferences().getDefaultString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
-
-		fEncodingSettings.setIANATag(encoding);
-		// fEncodingSettings.resetToDefaultEncoding();
-	}
-
-	protected void performDefaultsForValidatingGroup() {
-		int indicateNoGrammarButtonSelected = getModelPreferences().getDefaultInt(XMLCorePreferenceNames.INDICATE_NO_GRAMMAR);
-		boolean useXIncludeButtonSelected = getModelPreferences().getDefaultBoolean(XMLCorePreferenceNames.USE_XINCLUDE);
-		
-		if (fIndicateNoGrammar != null) {
-			fIndicateNoGrammar.setSelection(new Point(indicateNoGrammarButtonSelected, 2 - indicateNoGrammarButtonSelected));
-			fIndicateNoGrammar.setText(StringUtils.unpack(XMLUIMessages.Indicate_no_grammar_specified_severities)[indicateNoGrammarButtonSelected]);
-		}
-		if (fUseXinclude != null) {
-			fUseXinclude.setSelection(useXIncludeButtonSelected);
-		}
-	}
-
-	public boolean performOk() {
-		boolean result = super.performOk();
-
-		doSavePreferenceStore();
-
-		return result;
-	}
-
-	protected void storeValues() {
-		storeValuesForCreatingGroup();
-		storeValuesForValidatingGroup();
-	}
-
-	protected void storeValuesForCreatingGroup() {
-		String suffix = fDefaultSuffix.getText();
-		getModelPreferences().setValue(XMLCorePreferenceNames.DEFAULT_EXTENSION, suffix);
-
-		getModelPreferences().setValue(CommonEncodingPreferenceNames.OUTPUT_CODESET, fEncodingSettings.getIANATag());
-	}
-
-	protected void storeValuesForValidatingGroup() {
-		if (fIndicateNoGrammar != null) {
-			int warnNoGrammarButtonSelected = 2 - fIndicateNoGrammar.getSelectionIndex();
-			getModelPreferences().setValue(XMLCorePreferenceNames.INDICATE_NO_GRAMMAR, warnNoGrammarButtonSelected);
-		}
-		if (fUseXinclude != null) {
-			boolean useXIncludeButtonSelected = fUseXinclude.getSelection();
-			getModelPreferences().setValue(XMLCorePreferenceNames.USE_XINCLUDE, useXIncludeButtonSelected);
-		}
-	}
-
-	protected void validateValues() {
-		boolean isValid = false;
-		Iterator i = getValidExtensions().iterator();
-		while (i.hasNext() && !isValid) {
-			String extension = (String) i.next();
-			isValid = extension.equalsIgnoreCase(fDefaultSuffix.getText());
-		}
-
-		if (!isValid) {
-			setErrorMessage(NLS.bind(XMLUIMessages.XMLFilesPreferencePage_ExtensionError, getValidExtensions().toString()));
-			setValid(false);
-		}
-		else {
-			setErrorMessage(null);
-			setValid(true);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSourcePreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSourcePreferencePage.java
deleted file mode 100644
index db51310..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSourcePreferencePage.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
-
-import java.util.Vector;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferenceLinkArea;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.preferences.XMLCorePreferenceNames;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-
-public class XMLSourcePreferencePage extends AbstractPreferencePage implements ModifyListener, SelectionListener, IWorkbenchPreferencePage {
-	private final int MIN_INDENTATION_SIZE = 0;
-	private final int MAX_INDENTATION_SIZE = 16;
-
-	// Content Assist
-	protected Button fAutoPropose;
-	protected Label fAutoProposeLabel;
-	protected Text fAutoProposeText;
-	private Combo fSuggestionStrategyCombo;
-	private Vector fSuggestionStrategies = null;
-	protected Button fClearAllBlankLines;
-
-	// Formatting
-	protected Label fLineWidthLabel;
-	protected Text fLineWidthText;
-	protected Button fSplitMultiAttrs;
-	private Button fIndentUsingTabs;
-	private Button fIndentUsingSpaces;
-	private Spinner fIndentationSize;
-	private Button fPreservePCDATAContent;
-	private Button fAlignEndBracket;
-	// BUG195264 - Support for removing/adding a space before empty close tags
-	private Button fSpaceBeforeEmptyCloseTag;
-
-	// grammar constraints
-	protected Button fUseInferredGrammar;
-
-	protected Control createContents(Composite parent) {
-		final Composite composite = super.createComposite(parent, 1);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.XML_PREFWEBX_SOURCE_HELPID);
-
-		new PreferenceLinkArea(composite, SWT.WRAP | SWT.MULTI, "org.eclipse.wst.sse.ui.preferences.editor", XMLUIMessages._UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK,//$NON-NLS-1$
-					(IWorkbenchPreferenceContainer) getContainer(), null).getControl().setLayoutData(GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).create());
-		new Label(composite, SWT.NONE).setLayoutData(GridDataFactory.swtDefaults().create());
-
-		createContentsForFormattingGroup(composite);
-		createContentsForContentAssistGroup(composite);
-		createContentsForGrammarConstraintsGroup(composite);
-		setSize(composite);
-		loadPreferences();
-
-		return composite;
-	}
-
-	protected void createContentsForContentAssistGroup(Composite parent) {
-		Group contentAssistGroup = createGroup(parent, 2);
-		contentAssistGroup.setText(XMLUIMessages.Content_assist_UI_);
-
-		fAutoPropose = createCheckBox(contentAssistGroup, XMLUIMessages.Automatically_make_suggest_UI_);
-		((GridData) fAutoPropose.getLayoutData()).horizontalSpan = 2;
-		fAutoPropose.addSelectionListener(this);
-
-		fAutoProposeLabel = createLabel(contentAssistGroup, XMLUIMessages.Prompt_when_these_characte_UI_);
-		fAutoProposeText = createTextField(contentAssistGroup);
-
-		createLabel(contentAssistGroup, XMLUIMessages.Suggestion_Strategy);
-		fSuggestionStrategyCombo = new Combo(contentAssistGroup, SWT.READ_ONLY);
-		fSuggestionStrategies = new Vector();
-		fSuggestionStrategyCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		fSuggestionStrategyCombo.add(XMLUIMessages.Suggestion_Strategy_Lax);
-		fSuggestionStrategies.add(XMLUIPreferenceNames.SUGGESTION_STRATEGY_VALUE_LAX);
-		fSuggestionStrategyCombo.add(XMLUIMessages.Suggestion_Strategy_Strict);
-		fSuggestionStrategies.add(XMLUIPreferenceNames.SUGGESTION_STRATEGY_VALUE_STRICT);
-	}
-
-	protected void createContentsForFormattingGroup(Composite parent) {
-		Group formattingGroup = createGroup(parent, 2);
-		formattingGroup.setText(XMLUIMessages.Formatting_UI_);
-
-		fLineWidthLabel = createLabel(formattingGroup, XMLUIMessages.Line_width__UI_);
-		fLineWidthText = new Text(formattingGroup, SWT.SINGLE | SWT.BORDER);
-		GridData gData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.BEGINNING);
-		gData.widthHint = 25;
-		fLineWidthText.setLayoutData(gData);
-		fLineWidthText.addModifyListener(this);
-
-		fSplitMultiAttrs = createCheckBox(formattingGroup, XMLUIMessages.Split_multiple_attributes);
-		((GridData) fSplitMultiAttrs.getLayoutData()).horizontalSpan = 2;
-		fAlignEndBracket = createCheckBox(formattingGroup, XMLUIMessages.Align_final_bracket);
-		((GridData) fAlignEndBracket.getLayoutData()).horizontalSpan = 2;
-		fPreservePCDATAContent = createCheckBox(formattingGroup, XMLUIMessages.Preserve_PCDATA_Content);
-		((GridData) fPreservePCDATAContent.getLayoutData()).horizontalSpan = 2;
-		fClearAllBlankLines = createCheckBox(formattingGroup, XMLUIMessages.Clear_all_blank_lines_UI_);
-		((GridData) fClearAllBlankLines.getLayoutData()).horizontalSpan = 2;
-		fSpaceBeforeEmptyCloseTag = createCheckBox(formattingGroup, XMLUIMessages.Space_before_empty_close_tag);
-		((GridData) fSpaceBeforeEmptyCloseTag.getLayoutData()).horizontalSpan = 2;
-		
-		fIndentUsingTabs = createRadioButton(formattingGroup, XMLUIMessages.Indent_using_tabs);
-		((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 2;
-
-		fIndentUsingSpaces = createRadioButton(formattingGroup, XMLUIMessages.Indent_using_spaces);
-		((GridData) fIndentUsingSpaces.getLayoutData()).horizontalSpan = 2;
-
-		createLabel(formattingGroup, XMLUIMessages.Indentation_size);
-		fIndentationSize = new Spinner(formattingGroup, SWT.READ_ONLY | SWT.BORDER);
-		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
-		fIndentationSize.setLayoutData(gd);
-		fIndentationSize.setToolTipText(XMLUIMessages.Indentation_size_tip);
-		fIndentationSize.setMinimum(MIN_INDENTATION_SIZE);
-		fIndentationSize.setMaximum(MAX_INDENTATION_SIZE);
-		fIndentationSize.setIncrement(1);
-		fIndentationSize.setPageIncrement(4);
-		fIndentationSize.addModifyListener(this);
-	}
-
-	protected void createContentsForGrammarConstraintsGroup(Composite parent) {
-		Group grammarConstraintsGroup = createGroup(parent, 1);
-		grammarConstraintsGroup.setText(XMLUIMessages.Grammar_Constraints);
-		grammarConstraintsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
-
-		fUseInferredGrammar = createCheckBox(grammarConstraintsGroup, XMLUIMessages.Use_inferred_grammar_in_absence_of);
-	}
-
-	protected IPreferenceStore doGetPreferenceStore() {
-		return XMLUIPlugin.getDefault().getPreferenceStore();
-	}
-
-	protected void doSavePreferenceStore() {
-		XMLUIPlugin.getDefault().savePluginPreferences(); // editor
-		XMLCorePlugin.getDefault().savePluginPreferences(); // model
-	}
-
-	protected void enableValues() {
-		if (fAutoPropose != null) {
-			if (fAutoPropose.getSelection()) {
-				fAutoProposeLabel.setEnabled(true);
-				fAutoProposeText.setEnabled(true);
-			}
-			else {
-				fAutoProposeLabel.setEnabled(false);
-				fAutoProposeText.setEnabled(false);
-			}
-		}
-	}
-
-	protected Preferences getModelPreferences() {
-		return XMLCorePlugin.getDefault().getPluginPreferences();
-	}
-
-	/**
-	 * Return the currently selected suggestion strategy preference
-	 * 
-	 * @return a suggestion strategy constant from XMLUIPreferenceNames
-	 */
-	private String getCurrentSuggestionStrategy() {
-		int i = fSuggestionStrategyCombo.getSelectionIndex();
-		if (i >= 0) {
-			return (String) (fSuggestionStrategies.elementAt(i));
-		}
-		return ""; //$NON-NLS-1$
-	}
-
-	protected void initializeValues() {
-		initializeValuesForFormattingGroup();
-		initializeValuesForContentAssistGroup();
-		initializeValuesForGrammarConstraintsGroup();
-	}
-
-	protected void initializeValuesForContentAssistGroup() {
-		// Content Assist
-		fAutoPropose.setSelection(getPreferenceStore().getBoolean(XMLUIPreferenceNames.AUTO_PROPOSE));
-		fAutoProposeText.setText(getPreferenceStore().getString(XMLUIPreferenceNames.AUTO_PROPOSE_CODE));
-		String suggestionStrategy = getPreferenceStore().getString(XMLUIPreferenceNames.SUGGESTION_STRATEGY);
-		if (suggestionStrategy.length() > 0) {
-			setCurrentSuggestionStrategy(suggestionStrategy);
-		}
-		else {
-			setCurrentSuggestionStrategy(XMLUIPreferenceNames.SUGGESTION_STRATEGY_VALUE_LAX);
-		}
-	}
-
-	protected void initializeValuesForFormattingGroup() {
-		// Formatting
-		fLineWidthText.setText(getModelPreferences().getString(XMLCorePreferenceNames.LINE_WIDTH));
-		fSplitMultiAttrs.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.SPLIT_MULTI_ATTRS));
-		fAlignEndBracket.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.ALIGN_END_BRACKET));
-		fClearAllBlankLines.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES));
-		fPreservePCDATAContent.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.PRESERVE_CDATACONTENT));
-		fSpaceBeforeEmptyCloseTag.setSelection(getModelPreferences().getBoolean(XMLCorePreferenceNames.SPACE_BEFORE_EMPTY_CLOSE_TAG));
-		
-		if (XMLCorePreferenceNames.TAB.equals(getModelPreferences().getString(XMLCorePreferenceNames.INDENTATION_CHAR))) {
-			fIndentUsingTabs.setSelection(true);
-			fIndentUsingSpaces.setSelection(false);
-		}
-		else {
-			fIndentUsingSpaces.setSelection(true);
-			fIndentUsingTabs.setSelection(false);
-		}
-
-		fIndentationSize.setSelection(getModelPreferences().getInt(XMLCorePreferenceNames.INDENTATION_SIZE));
-	}
-
-	protected void initializeValuesForGrammarConstraintsGroup() {
-		fUseInferredGrammar.setSelection(getPreferenceStore().getBoolean(XMLUIPreferenceNames.USE_INFERRED_GRAMMAR));
-	}
-
-	protected void performDefaults() {
-		performDefaultsForFormattingGroup();
-		performDefaultsForContentAssistGroup();
-		performDefaultsForGrammarConstraintsGroup();
-
-		validateValues();
-		enableValues();
-
-		super.performDefaults();
-	}
-
-	protected void performDefaultsForContentAssistGroup() {
-		// Content Assist
-		fAutoPropose.setSelection(getPreferenceStore().getDefaultBoolean(XMLUIPreferenceNames.AUTO_PROPOSE));
-		fAutoProposeText.setText(getPreferenceStore().getDefaultString(XMLUIPreferenceNames.AUTO_PROPOSE_CODE));
-		String suggestionStrategy = getPreferenceStore().getDefaultString(XMLUIPreferenceNames.SUGGESTION_STRATEGY);
-		if (suggestionStrategy.length() > 0) {
-			setCurrentSuggestionStrategy(suggestionStrategy);
-		}
-		else {
-			setCurrentSuggestionStrategy(XMLUIPreferenceNames.SUGGESTION_STRATEGY_VALUE_LAX);
-		}
-	}
-
-	protected void performDefaultsForFormattingGroup() {
-		// Formatting
-		fLineWidthText.setText(getModelPreferences().getDefaultString(XMLCorePreferenceNames.LINE_WIDTH));
-		fSplitMultiAttrs.setSelection(getModelPreferences().getDefaultBoolean(XMLCorePreferenceNames.SPLIT_MULTI_ATTRS));
-		fAlignEndBracket.setSelection(getModelPreferences().getDefaultBoolean(XMLCorePreferenceNames.ALIGN_END_BRACKET));
-		fClearAllBlankLines.setSelection(getModelPreferences().getDefaultBoolean(XMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES));
-		fPreservePCDATAContent.setSelection(getModelPreferences().getDefaultBoolean(XMLCorePreferenceNames.PRESERVE_CDATACONTENT));
-		// BUG195264 - Support for removing/adding a space before empty close tags
-		fSpaceBeforeEmptyCloseTag.setSelection(getModelPreferences().getDefaultBoolean(XMLCorePreferenceNames.SPACE_BEFORE_EMPTY_CLOSE_TAG));
-		
-		if (XMLCorePreferenceNames.TAB.equals(getModelPreferences().getDefaultString(XMLCorePreferenceNames.INDENTATION_CHAR))) {
-			fIndentUsingTabs.setSelection(true);
-			fIndentUsingSpaces.setSelection(false);
-		}
-		else {
-			fIndentUsingSpaces.setSelection(true);
-			fIndentUsingTabs.setSelection(false);
-		}
-		fIndentationSize.setSelection(getModelPreferences().getDefaultInt(XMLCorePreferenceNames.INDENTATION_SIZE));
-	}
-
-	protected void performDefaultsForGrammarConstraintsGroup() {
-		fUseInferredGrammar.setSelection(getPreferenceStore().getDefaultBoolean(XMLUIPreferenceNames.USE_INFERRED_GRAMMAR));
-	}
-
-	public boolean performOk() {
-		boolean result = super.performOk();
-
-		doSavePreferenceStore();
-
-		return result;
-	}
-
-	/**
-	 * Set a suggestion strategy in suggestion strategy combo box
-	 * 
-	 * @param strategy
-	 */
-	private void setCurrentSuggestionStrategy(String strategy) {
-		// Clear the current selection.
-		fSuggestionStrategyCombo.clearSelection();
-		fSuggestionStrategyCombo.deselectAll();
-
-		int i = fSuggestionStrategies.indexOf(strategy);
-		if (i >= 0) {
-			fSuggestionStrategyCombo.select(i);
-		}
-	}
-
-	protected void storeValues() {
-		storeValuesForFormattingGroup();
-		storeValuesForContentAssistGroup();
-		storeValuesForGrammarConstraintsGroup();
-	}
-
-	protected void storeValuesForContentAssistGroup() {
-		// Content Assist
-		getPreferenceStore().setValue(XMLUIPreferenceNames.AUTO_PROPOSE, fAutoPropose.getSelection());
-		getPreferenceStore().setValue(XMLUIPreferenceNames.AUTO_PROPOSE_CODE, fAutoProposeText.getText());
-		getPreferenceStore().setValue(XMLUIPreferenceNames.SUGGESTION_STRATEGY, getCurrentSuggestionStrategy());
-	}
-
-	protected void storeValuesForFormattingGroup() {
-		// Formatting
-		getModelPreferences().setValue(XMLCorePreferenceNames.LINE_WIDTH, fLineWidthText.getText());
-		getModelPreferences().setValue(XMLCorePreferenceNames.SPLIT_MULTI_ATTRS, fSplitMultiAttrs.getSelection());
-		getModelPreferences().setValue(XMLCorePreferenceNames.ALIGN_END_BRACKET, fAlignEndBracket.getSelection());
-		getModelPreferences().setValue(XMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES, fClearAllBlankLines.getSelection());
-		getModelPreferences().setValue(XMLCorePreferenceNames.PRESERVE_CDATACONTENT, fPreservePCDATAContent.getSelection());
-		// BUG195264 - Support for removing/adding a space before empty close tags
-		getModelPreferences().setValue(XMLCorePreferenceNames.SPACE_BEFORE_EMPTY_CLOSE_TAG, fSpaceBeforeEmptyCloseTag.getSelection());
-		
-		if (fIndentUsingTabs.getSelection()) {
-			getModelPreferences().setValue(XMLCorePreferenceNames.INDENTATION_CHAR, XMLCorePreferenceNames.TAB);
-		}
-		else {
-			getModelPreferences().setValue(XMLCorePreferenceNames.INDENTATION_CHAR, XMLCorePreferenceNames.SPACE);
-		}
-		getModelPreferences().setValue(XMLCorePreferenceNames.INDENTATION_SIZE, fIndentationSize.getSelection());
-	}
-
-	protected void storeValuesForGrammarConstraintsGroup() {
-		getPreferenceStore().setValue(XMLUIPreferenceNames.USE_INFERRED_GRAMMAR, fUseInferredGrammar.getSelection());
-	}
-
-	protected void validateValues() {
-		boolean isError = false;
-		String widthText = null;
-
-		if (fLineWidthText != null) {
-			try {
-				widthText = fLineWidthText.getText();
-				int formattingLineWidth = Integer.parseInt(widthText);
-				if ((formattingLineWidth < WIDTH_VALIDATION_LOWER_LIMIT) || (formattingLineWidth > WIDTH_VALIDATION_UPPER_LIMIT)) {
-					throw new NumberFormatException();
-				}
-			}
-			catch (NumberFormatException nfexc) {
-				setInvalidInputMessage(widthText);
-				setValid(false);
-				isError = true;
-			}
-		}
-
-		int indentSize = 0;
-		if (fIndentationSize != null) {
-			try {
-				indentSize = fIndentationSize.getSelection();
-				if ((indentSize < MIN_INDENTATION_SIZE) || (indentSize > MAX_INDENTATION_SIZE)) {
-					throw new NumberFormatException();
-				}
-			}
-			catch (NumberFormatException nfexc) {
-				setInvalidInputMessage(Integer.toString(indentSize));
-				setValid(false);
-				isError = true;
-			}
-		}
-
-		if (!isError) {
-			setErrorMessage(null);
-			setValid(true);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSyntaxColoringPage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSyntaxColoringPage.java
deleted file mode 100644
index 644fef2..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSyntaxColoringPage.java
+++ /dev/null
@@ -1,870 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jface.preference.ColorSelector;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.ACC;
-import org.eclipse.swt.accessibility.AccessibleAdapter;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore.OverlayKey;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
-import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-import com.ibm.icu.text.Collator;
-
-/**
- * A preference page to configure our XML syntax color. It resembles the JDT
- * and CDT pages far more than our original color page while retaining the
- * extra "click-to-find" functionality.
- */
-public final class XMLSyntaxColoringPage extends PreferencePage implements IWorkbenchPreferencePage {
-
-	private Button fBold;
-	private Label fForegroundLabel;
-	private Label fBackgroundLabel;
-	private Button fClearStyle;
-	private Map fContextToStyleMap;
-	private Color fDefaultForeground = null;
-	private Color fDefaultBackground = null;
-	private IStructuredDocument fDocument;
-	private ColorSelector fForegroundColorEditor;
-	private ColorSelector fBackgroundColorEditor;
-	private Button fItalic;
-	private OverlayPreferenceStore fOverlayStore;
-	private Button fStrike;
-	private Collection fStylePreferenceKeys;
-	private StructuredViewer fStylesViewer = null;
-	private Map fStyleToDescriptionMap;
-	private StyledText fText;
-	private Button fUnderline;
-
-	// activate controls based on the given local color type
-	private void activate(String namedStyle) {
-		Color foreground = fDefaultForeground;
-		Color background = fDefaultBackground;
-		if (namedStyle == null) {
-			fClearStyle.setEnabled(false);
-			fBold.setEnabled(false);
-			fItalic.setEnabled(false);
-			fStrike.setEnabled(false);
-			fUnderline.setEnabled(false);
-			fForegroundLabel.setEnabled(false);
-			fBackgroundLabel.setEnabled(false);
-			fForegroundColorEditor.setEnabled(false);
-			fBackgroundColorEditor.setEnabled(false);
-			fBold.setSelection(false);
-			fItalic.setSelection(false);
-			fStrike.setSelection(false);
-			fUnderline.setSelection(false);
-		}
-		else {
-			TextAttribute attribute = getAttributeFor(namedStyle);
-			fClearStyle.setEnabled(true);
-			fBold.setEnabled(true);
-			fItalic.setEnabled(true);
-			fStrike.setEnabled(true);
-			fUnderline.setEnabled(true);
-			fForegroundLabel.setEnabled(true);
-			fBackgroundLabel.setEnabled(true);
-			fForegroundColorEditor.setEnabled(true);
-			fBackgroundColorEditor.setEnabled(true);
-			fBold.setSelection((attribute.getStyle() & SWT.BOLD) != 0);
-			fItalic.setSelection((attribute.getStyle() & SWT.ITALIC) != 0);
-			fStrike.setSelection((attribute.getStyle() & TextAttribute.STRIKETHROUGH) != 0);
-			fUnderline.setSelection((attribute.getStyle() & TextAttribute.UNDERLINE) != 0);
-			if (attribute.getForeground() != null) {
-				foreground = attribute.getForeground();
-			}
-			if (attribute.getBackground() != null) {
-				background = attribute.getBackground();
-			}
-		}
-
-		fForegroundColorEditor.setColorValue(foreground.getRGB());
-		fBackgroundColorEditor.setColorValue(background.getRGB());
-	}
-
-	/**
-	 * Color the text in the sample area according to the current preferences
-	 */
-	void applyStyles() {
-		if (fText == null || fText.isDisposed())
-			return;
-		IStructuredDocumentRegion documentRegion = fDocument.getFirstStructuredDocumentRegion();
-		while (documentRegion != null) {
-			ITextRegionList regions = documentRegion.getRegions();
-			for (int i = 0; i < regions.size(); i++) {
-				ITextRegion currentRegion = regions.get(i);
-				// lookup the local coloring type and apply it
-				String namedStyle = (String) fContextToStyleMap.get(currentRegion.getType());
-				if (namedStyle == null)
-					continue;
-				TextAttribute attribute = getAttributeFor(namedStyle);
-				if (attribute == null)
-					continue;
-				StyleRange style = new StyleRange(documentRegion.getStartOffset(currentRegion), currentRegion.getTextLength(), attribute.getForeground(), attribute.getBackground(), attribute.getStyle());
-				style.strikeout = (attribute.getStyle() & TextAttribute.STRIKETHROUGH) != 0;
-				style.underline = (attribute.getStyle() & TextAttribute.UNDERLINE) != 0;
-				fText.setStyleRange(style);
-			}
-			documentRegion = documentRegion.getNext();
-		}
-	}
-
-	Button createCheckbox(Composite parent, String label) {
-		Button button = new Button(parent, SWT.CHECK);
-		button.setText(label);
-		button.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-		return button;
-	}
-
-	/**
-	 * Creates composite control and sets the default layout data.
-	 */
-	private Composite createComposite(Composite parent, int numColumns) {
-		Composite composite = new Composite(parent, SWT.NULL);
-
-		// GridLayout
-		GridLayout layout = new GridLayout();
-		layout.numColumns = numColumns;
-		layout.makeColumnsEqualWidth = false;
-		layout.marginHeight = 0;
-		layout.marginWidth = 0;
-		composite.setLayout(layout);
-
-		// GridData
-		GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
-		composite.setLayoutData(data);
-		return composite;
-	}
-
-	protected Control createContents(final Composite parent) {
-		initializeDialogUnits(parent);
-
-		fDefaultForeground = parent.getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
-		fDefaultBackground = parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
-		Composite pageComponent = createComposite(parent, 2);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(pageComponent, IHelpContextIds.XML_PREFWEBX_STYLES_HELPID);
-
-		Link link = new Link(pageComponent, SWT.WRAP);
-		link.setText(SSEUIMessages.SyntaxColoring_Link);
-		link.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null, null);
-			}
-		});
-
-		GridData linkData= new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1);
-		linkData.widthHint= 150; // only expand further if anyone else requires it
-		link.setLayoutData(linkData);
-
-		new Label(pageComponent, SWT.NONE).setLayoutData(new GridData());
-		new Label(pageComponent, SWT.NONE).setLayoutData(new GridData());
-
-		SashForm editor = new SashForm(pageComponent, SWT.VERTICAL);
-		GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, true);
-		gridData2.horizontalSpan = 2;
-		editor.setLayoutData(gridData2);
-		SashForm top = new SashForm(editor, SWT.HORIZONTAL);
-		Composite styleEditor = createComposite(top, 1);
-		((GridLayout) styleEditor.getLayout()).marginRight = 5;
-		((GridLayout) styleEditor.getLayout()).marginLeft = 0;
-		createLabel(styleEditor, XMLUIMessages.SyntaxColoringPage_0);
-		fStylesViewer = createStylesViewer(styleEditor);
-		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
-		gridData.horizontalIndent = 0;
-		Iterator iterator = fStyleToDescriptionMap.values().iterator();
-		while (iterator.hasNext()) {
-			gridData.widthHint = Math.max(gridData.widthHint, convertWidthInCharsToPixels(iterator.next().toString().length()));
-		}
-		gridData.heightHint = convertHeightInCharsToPixels(5);
-		fStylesViewer.getControl().setLayoutData(gridData);
-
-		Composite editingComposite = createComposite(top, 1);
-		((GridLayout) styleEditor.getLayout()).marginLeft = 5;
-		createLabel(editingComposite, ""); //$NON-NLS-1$
-		Button enabler = createCheckbox(editingComposite, XMLUIMessages.SyntaxColoringPage_2);
-		enabler.setEnabled(false);
-		enabler.setSelection(true);
-		Composite editControls = createComposite(editingComposite, 2);
-		((GridLayout) editControls.getLayout()).marginLeft = 20;
-
-		fForegroundLabel = createLabel(editControls, SSEUIMessages.Foreground_UI_);
-		((GridData) fForegroundLabel.getLayoutData()).verticalAlignment = SWT.CENTER;
-		fForegroundLabel.setEnabled(false);
-
-		fForegroundColorEditor = new ColorSelector(editControls);
-		Button fForegroundColor = fForegroundColorEditor.getButton();
-		GridData gd = new GridData(SWT.BEGINNING, SWT.FILL, false, false);
-		fForegroundColor.setLayoutData(gd);
-		fForegroundColorEditor.setEnabled(false);
-
-		fBackgroundLabel = createLabel(editControls, SSEUIMessages.Background_UI_);
-		((GridData) fBackgroundLabel.getLayoutData()).verticalAlignment = SWT.CENTER;
-		fBackgroundLabel.setEnabled(false);
-
-		fBackgroundColorEditor = new ColorSelector(editControls);
-		Button fBackgroundColor = fBackgroundColorEditor.getButton();
-		gd = new GridData(SWT.BEGINNING, SWT.FILL, false, false);
-		fBackgroundColor.setLayoutData(gd);
-		fBackgroundColorEditor.setEnabled(false);
-
-		fBold = createCheckbox(editControls, XMLUIMessages.SyntaxColoringPage_3);
-		fBold.setEnabled(false);
-		((GridData) fBold.getLayoutData()).horizontalSpan = 2;
-		fItalic = createCheckbox(editControls, XMLUIMessages.SyntaxColoringPage_4);
-		fItalic.setEnabled(false);
-		((GridData) fItalic.getLayoutData()).horizontalSpan = 2;
-		fStrike = createCheckbox(editControls, XMLUIMessages.SyntaxColoringPage_5);
-		fStrike.setEnabled(false);
-		((GridData) fStrike.getLayoutData()).horizontalSpan = 2;
-		fUnderline = createCheckbox(editControls, XMLUIMessages.SyntaxColoringPage_6);
-		fUnderline.setEnabled(false);
-		((GridData) fUnderline.getLayoutData()).horizontalSpan = 2;
-		fClearStyle = new Button(editingComposite, SWT.PUSH);
-		fClearStyle.setText(SSEUIMessages.Restore_Default_UI_); //$NON-NLS-1$ = "Restore Default"
-		fClearStyle.setLayoutData(new GridData(SWT.BEGINNING));
-		((GridData) fClearStyle.getLayoutData()).horizontalIndent = 20;
-		fClearStyle.setEnabled(false);
-
-		Composite sampleArea = createComposite(editor, 1);
-
-		((GridLayout) sampleArea.getLayout()).marginLeft = 5;
-		((GridLayout) sampleArea.getLayout()).marginTop = 5;
-		createLabel(sampleArea, SSEUIMessages.Sample_text__UI_); //$NON-NLS-1$ = "&Sample text:"
-		SourceViewer viewer = new SourceViewer(sampleArea, null, SWT.BORDER | SWT.LEFT_TO_RIGHT | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY);
-		fText = viewer.getTextWidget();
-		GridData gridData3 = new GridData(SWT.FILL, SWT.FILL, true, true);
-		gridData3.widthHint = convertWidthInCharsToPixels(20);
-		gridData3.heightHint = convertHeightInCharsToPixels(5);
-		gridData3.horizontalSpan = 2;
-		fText.setLayoutData(gridData3);
-		fText.setEditable(false);
-		fText.setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$
-		fText.addKeyListener(getTextKeyListener());
-		fText.addSelectionListener(getTextSelectionListener());
-		fText.addMouseListener(getTextMouseListener());
-		fText.addTraverseListener(getTraverseListener());
-		setAccessible(fText, SSEUIMessages.Sample_text__UI_);
-		fDocument = StructuredModelManager.getModelManager().createStructuredDocumentFor(ContentTypeIdForXML.ContentTypeID_XML);
-		fDocument.set(getExampleText());
-		viewer.setDocument(fDocument);
-
-		top.setWeights(new int[]{1, 1});
-		editor.setWeights(new int[]{1, 1});
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(pageComponent, IHelpContextIds.XML_PREFWEBX_STYLES_HELPID);
-
-		fStylesViewer.setInput(getStylePreferenceKeys());
-
-		applyStyles();
-
-		fStylesViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				if (!event.getSelection().isEmpty()) {
-					Object o = ((IStructuredSelection) event.getSelection()).getFirstElement();
-					String namedStyle = o.toString();
-					activate(namedStyle);
-					if (namedStyle == null)
-						return;
-				}
-			}
-		});
-
-		fForegroundColorEditor.addListener(new IPropertyChangeListener() {
-			public void propertyChange(PropertyChangeEvent event) {
-				if (event.getProperty().equals(ColorSelector.PROP_COLORCHANGE)) {
-					Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
-					String namedStyle = o.toString();
-					String prefString = getOverlayStore().getString(namedStyle);
-					String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
-					if (stylePrefs != null) {
-						String oldValue = stylePrefs[0];
-						// open color dialog to get new color
-						String newValue = ColorHelper.toRGBString(fForegroundColorEditor.getColorValue());
-
-						if (!newValue.equals(oldValue)) {
-							stylePrefs[0] = newValue;
-							String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
-							getOverlayStore().setValue(namedStyle, newPrefString);
-							applyStyles();
-							fText.redraw();
-						}
-					}
-				}
-			}
-		});
-
-		fBackgroundColorEditor.addListener(new IPropertyChangeListener() {
-			public void propertyChange(PropertyChangeEvent event) {
-				if (event.getProperty().equals(ColorSelector.PROP_COLORCHANGE)) {
-					Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
-					String namedStyle = o.toString();
-					String prefString = getOverlayStore().getString(namedStyle);
-					String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
-					if (stylePrefs != null) {
-						String oldValue = stylePrefs[1];
-						// open color dialog to get new color
-						String newValue = ColorHelper.toRGBString(fBackgroundColorEditor.getColorValue());
-
-						if (!newValue.equals(oldValue)) {
-							stylePrefs[1] = newValue;
-							String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
-							getOverlayStore().setValue(namedStyle, newPrefString);
-							applyStyles();
-							fText.redraw();
-							activate(namedStyle);
-						}
-					}
-				}
-			}
-		});
-
-		fBold.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				super.widgetSelected(e);
-				// get current (newly old) style
-				Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
-				String namedStyle = o.toString();
-				String prefString = getOverlayStore().getString(namedStyle);
-				String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
-				if (stylePrefs != null) {
-					String oldValue = stylePrefs[2];
-					String newValue = String.valueOf(fBold.getSelection());
-					if (!newValue.equals(oldValue)) {
-						stylePrefs[2] = newValue;
-						String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
-						getOverlayStore().setValue(namedStyle, newPrefString);
-						applyStyles();
-						fText.redraw();
-					}
-				}
-			}
-		});
-
-		fItalic.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				super.widgetSelected(e);
-				// get current (newly old) style
-				Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
-				String namedStyle = o.toString();
-				String prefString = getOverlayStore().getString(namedStyle);
-				String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
-				if (stylePrefs != null) {
-					String oldValue = stylePrefs[3];
-					String newValue = String.valueOf(fItalic.getSelection());
-					if (!newValue.equals(oldValue)) {
-						stylePrefs[3] = newValue;
-						String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
-						getOverlayStore().setValue(namedStyle, newPrefString);
-						applyStyles();
-						fText.redraw();
-					}
-				}
-			}
-		});
-
-		fStrike.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				super.widgetSelected(e);
-				// get current (newly old) style
-				Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
-				String namedStyle = o.toString();
-				String prefString = getOverlayStore().getString(namedStyle);
-				String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
-				if (stylePrefs != null) {
-					String oldValue = stylePrefs[4];
-					String newValue = String.valueOf(fStrike.getSelection());
-					if (!newValue.equals(oldValue)) {
-						stylePrefs[4] = newValue;
-						String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
-						getOverlayStore().setValue(namedStyle, newPrefString);
-						applyStyles();
-						fText.redraw();
-					}
-				}
-			}
-		});
-
-		fUnderline.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				super.widgetSelected(e);
-				// get current (newly old) style
-				Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
-				String namedStyle = o.toString();
-				String prefString = getOverlayStore().getString(namedStyle);
-				String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
-				if (stylePrefs != null) {
-					String oldValue = stylePrefs[5];
-					String newValue = String.valueOf(fUnderline.getSelection());
-					if (!newValue.equals(oldValue)) {
-						stylePrefs[5] = newValue;
-						String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
-						getOverlayStore().setValue(namedStyle, newPrefString);
-						applyStyles();
-						fText.redraw();
-					}
-				}
-			}
-		});
-
-		fClearStyle.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				if (fStylesViewer.getSelection().isEmpty())
-					return;
-				String namedStyle = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement().toString();
-				getOverlayStore().setToDefault(namedStyle);
-				applyStyles();
-				fText.redraw();
-				activate(namedStyle);
-			}
-		});
-
-		return pageComponent;
-	}
-
-	private Label createLabel(Composite parent, String text) {
-		Label label = new Label(parent, SWT.WRAP);
-		label.setText(text);
-		GridData data = new GridData(SWT.FILL, SWT.FILL, false, false);
-		label.setLayoutData(data);
-		label.setBackground(parent.getBackground());
-		return label;
-	}
-
-	// protected Label createDescriptionLabel(Composite parent) {
-	// return null;
-	// }
-
-	/**
-	 * Set up all the style preference keys in the overlay store
-	 */
-	private OverlayKey[] createOverlayStoreKeys() {
-		List overlayKeys = new ArrayList();
-
-		Iterator i = getStylePreferenceKeys().iterator();
-		while (i.hasNext()) {
-			overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, (String) i.next()));
-		}
-
-		OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
-		overlayKeys.toArray(keys);
-		return keys;
-	}
-
-	/**
-	 * Creates the List viewer where we see the various syntax element display
-	 * names--would it ever be a Tree like JDT's?
-	 * 
-	 * @param parent
-	 * @return
-	 */
-	private StructuredViewer createStylesViewer(Composite parent) {
-		StructuredViewer stylesViewer = new ListViewer(parent, SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
-		stylesViewer.setComparator(new ViewerComparator(Collator.getInstance()));
-		stylesViewer.setLabelProvider(new LabelProvider() {
-			public String getText(Object element) {
-				Object description = fStyleToDescriptionMap.get(element);
-				if (description != null)
-					return description.toString();
-				return super.getText(element);
-			}
-		});
-		stylesViewer.setContentProvider(new ITreeContentProvider() {
-			public void dispose() {
-			}
-
-			public Object[] getChildren(Object parentElement) {
-				return getStylePreferenceKeys().toArray();
-			}
-
-			public Object[] getElements(Object inputElement) {
-				return getChildren(inputElement);
-			}
-
-			public Object getParent(Object element) {
-				return getStylePreferenceKeys();
-			}
-
-			public boolean hasChildren(Object element) {
-				return false;
-			}
-
-			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-			}
-		});
-		return stylesViewer;
-	}
-
-	public void dispose() {
-		if (fOverlayStore != null) {
-			fOverlayStore.stop();
-		}
-		super.dispose();
-	}
-
-	protected IPreferenceStore doGetPreferenceStore() {
-		return XMLUIPlugin.getDefault().getPreferenceStore();
-	}
-
-	private TextAttribute getAttributeFor(String namedStyle) {
-		TextAttribute ta = new TextAttribute(fDefaultForeground, fDefaultBackground, SWT.NORMAL);
-
-		if (namedStyle != null && fOverlayStore != null) {
-			// note: "namedStyle" *is* the preference key
-			String prefString = getOverlayStore().getString(namedStyle);
-			String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
-			if (stylePrefs != null) {
-				RGB foreground = ColorHelper.toRGB(stylePrefs[0]);
-				RGB background = ColorHelper.toRGB(stylePrefs[1]);
-
-				int fontModifier = SWT.NORMAL;
-
-				if (stylePrefs.length > 2) {
-					boolean on = Boolean.valueOf(stylePrefs[2]).booleanValue();
-					if (on)
-						fontModifier = fontModifier | SWT.BOLD;
-				}
-				if (stylePrefs.length > 3) {
-					boolean on = Boolean.valueOf(stylePrefs[3]).booleanValue();
-					if (on)
-						fontModifier = fontModifier | SWT.ITALIC;
-				}
-				if (stylePrefs.length > 4) {
-					boolean on = Boolean.valueOf(stylePrefs[4]).booleanValue();
-					if (on)
-						fontModifier = fontModifier | TextAttribute.STRIKETHROUGH;
-				}
-				if (stylePrefs.length > 5) {
-					boolean on = Boolean.valueOf(stylePrefs[5]).booleanValue();
-					if (on)
-						fontModifier = fontModifier | TextAttribute.UNDERLINE;
-				}
-
-				ta = new TextAttribute((foreground != null) ? EditorUtility.getColor(foreground) : null, (background != null) ? EditorUtility.getColor(background) : null, fontModifier);
-			}
-		}
-		return ta;
-	}
-
-	private String getExampleText() {
-		return XMLUIMessages.Sample_XML_doc;
-	}
-
-	private String getNamedStyleAtOffset(int offset) {
-		// ensure the offset is clean
-		if (offset >= fDocument.getLength())
-			return getNamedStyleAtOffset(fDocument.getLength() - 1);
-		else if (offset < 0)
-			return getNamedStyleAtOffset(0);
-		IStructuredDocumentRegion documentRegion = fDocument.getFirstStructuredDocumentRegion();
-		while (documentRegion != null && !documentRegion.containsOffset(offset)) {
-			documentRegion = documentRegion.getNext();
-		}
-		if (documentRegion != null) {
-			// find the ITextRegion's Context at this offset
-			ITextRegion interest = documentRegion.getRegionAtCharacterOffset(offset);
-			if (interest == null)
-				return null;
-			if (offset > documentRegion.getTextEndOffset(interest))
-				return null;
-			String regionContext = interest.getType();
-			if (regionContext == null)
-				return null;
-			// find the named style (internal/selectable name) for that
-			// context
-			String namedStyle = (String) fContextToStyleMap.get(regionContext);
-			if (namedStyle != null) {
-				return namedStyle;
-			}
-		}
-		return null;
-	}
-
-	private OverlayPreferenceStore getOverlayStore() {
-		return fOverlayStore;
-	}
-
-	private Collection getStylePreferenceKeys() {
-		if (fStylePreferenceKeys == null) {
-			List styles = new ArrayList();
-			styles.add(IStyleConstantsXML.DOCTYPE_NAME);
-			styles.add(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID);
-			styles.add(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF);
-			styles.add(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF);
-			styles.add(IStyleConstantsXML.CDATA_BORDER);
-			styles.add(IStyleConstantsXML.CDATA_TEXT);
-			styles.add(IStyleConstantsXML.PI_BORDER);
-			styles.add(IStyleConstantsXML.PI_CONTENT);
-			styles.add(IStyleConstantsXML.TAG_BORDER);
-			styles.add(IStyleConstantsXML.TAG_NAME);
-			styles.add(IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
-			styles.add(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
-			styles.add(IStyleConstantsXML.COMMENT_BORDER);
-			styles.add(IStyleConstantsXML.COMMENT_TEXT);
-			styles.add(IStyleConstantsXML.DECL_BORDER);
-			styles.add(IStyleConstantsXML.XML_CONTENT);
-			styles.add(IStyleConstantsXML.ENTITY_REFERENCE);
-			fStylePreferenceKeys = styles;
-		}
-		return fStylePreferenceKeys;
-	}
-
-	private KeyListener getTextKeyListener() {
-		return new KeyListener() {
-			public void keyPressed(KeyEvent e) {
-				if (e.widget instanceof StyledText) {
-					int x = ((StyledText) e.widget).getCaretOffset();
-					selectColorAtOffset(x);
-				}
-			}
-
-			public void keyReleased(KeyEvent e) {
-				if (e.widget instanceof StyledText) {
-					int x = ((StyledText) e.widget).getCaretOffset();
-					selectColorAtOffset(x);
-				}
-			}
-		};
-	}
-
-	private MouseListener getTextMouseListener() {
-		return new MouseListener() {
-			public void mouseDoubleClick(MouseEvent e) {
-			}
-
-			public void mouseDown(MouseEvent e) {
-			}
-
-			public void mouseUp(MouseEvent e) {
-				if (e.widget instanceof StyledText) {
-					int x = ((StyledText) e.widget).getCaretOffset();
-					selectColorAtOffset(x);
-				}
-			}
-		};
-	}
-
-	private SelectionListener getTextSelectionListener() {
-		return new SelectionListener() {
-			public void widgetDefaultSelected(SelectionEvent e) {
-				selectColorAtOffset(e.x);
-				if (e.widget instanceof StyledText) {
-					((StyledText) e.widget).setSelection(e.x);
-				}
-			}
-
-			public void widgetSelected(SelectionEvent e) {
-				selectColorAtOffset(e.x);
-				if (e.widget instanceof StyledText) {
-					((StyledText) e.widget).setSelection(e.x);
-				}
-			}
-		};
-	}
-
-	private TraverseListener getTraverseListener() {
-		return new TraverseListener() {
-			/**
-			 * @see org.eclipse.swt.events.TraverseListener#keyTraversed(TraverseEvent)
-			 */
-			public void keyTraversed(TraverseEvent e) {
-				if (e.widget instanceof StyledText) {
-					if ((e.detail == SWT.TRAVERSE_TAB_NEXT) || (e.detail == SWT.TRAVERSE_TAB_PREVIOUS))
-						e.doit = true;
-				}
-			}
-		};
-	}
-
-	public void init(IWorkbench workbench) {
-		setDescription(SSEUIMessages.SyntaxColoring_Description);
-
-		fStyleToDescriptionMap = new HashMap();
-		fContextToStyleMap = new HashMap();
-
-		initStyleToDescriptionMap();
-		initRegionContextToStyleMap();
-
-		fOverlayStore = new OverlayPreferenceStore(getPreferenceStore(), createOverlayStoreKeys());
-		fOverlayStore.load();
-		fOverlayStore.start();
-	}
-
-	private void initRegionContextToStyleMap() {
-		fContextToStyleMap.put(DOMRegionContext.XML_COMMENT_OPEN, IStyleConstantsXML.COMMENT_BORDER);
-		fContextToStyleMap.put(DOMRegionContext.XML_COMMENT_TEXT, IStyleConstantsXML.COMMENT_TEXT);
-		fContextToStyleMap.put(DOMRegionContext.XML_COMMENT_CLOSE, IStyleConstantsXML.COMMENT_BORDER);
-
-		fContextToStyleMap.put(DOMRegionContext.XML_TAG_OPEN, IStyleConstantsXML.TAG_BORDER);
-		fContextToStyleMap.put(DOMRegionContext.XML_END_TAG_OPEN, IStyleConstantsXML.TAG_BORDER);
-		fContextToStyleMap.put(DOMRegionContext.XML_TAG_NAME, IStyleConstantsXML.TAG_NAME);
-		fContextToStyleMap.put(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME, IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
-		fContextToStyleMap.put(DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE, IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
-		fContextToStyleMap.put(DOMRegionContext.XML_TAG_CLOSE, IStyleConstantsXML.TAG_BORDER);
-		fContextToStyleMap.put(DOMRegionContext.XML_EMPTY_TAG_CLOSE, IStyleConstantsXML.TAG_BORDER);
-
-		fContextToStyleMap.put(DOMRegionContext.XML_DECLARATION_OPEN, IStyleConstantsXML.DECL_BORDER);
-		fContextToStyleMap.put(DOMRegionContext.XML_DECLARATION_CLOSE, IStyleConstantsXML.DECL_BORDER);
-		fContextToStyleMap.put(DOMRegionContext.XML_ELEMENT_DECLARATION, IStyleConstantsXML.DECL_BORDER);
-		fContextToStyleMap.put(DOMRegionContext.XML_ELEMENT_DECL_CLOSE, IStyleConstantsXML.DECL_BORDER);
-
-		fContextToStyleMap.put(DOMRegionContext.XML_CONTENT, IStyleConstantsXML.XML_CONTENT);
-		fContextToStyleMap.put(DOMRegionContext.XML_CDATA_OPEN, IStyleConstantsXML.CDATA_BORDER);
-		fContextToStyleMap.put(DOMRegionContext.XML_CDATA_TEXT, IStyleConstantsXML.CDATA_TEXT);
-		fContextToStyleMap.put(DOMRegionContext.XML_CDATA_CLOSE, IStyleConstantsXML.CDATA_BORDER);
-
-		fContextToStyleMap.put(DOMRegionContext.XML_PI_OPEN, IStyleConstantsXML.PI_BORDER);
-		fContextToStyleMap.put(DOMRegionContext.XML_PI_CONTENT, IStyleConstantsXML.PI_CONTENT);
-		fContextToStyleMap.put(DOMRegionContext.XML_PI_CLOSE, IStyleConstantsXML.PI_BORDER);
-		fContextToStyleMap.put(DOMRegionContext.XML_ELEMENT_DECL_NAME, IStyleConstantsXML.DOCTYPE_NAME);
-		fContextToStyleMap.put(DOMRegionContext.XML_DOCTYPE_DECLARATION, IStyleConstantsXML.TAG_NAME);
-		fContextToStyleMap.put(DOMRegionContext.XML_DOCTYPE_DECLARATION_CLOSE, IStyleConstantsXML.DECL_BORDER);
-
-		fContextToStyleMap.put(DOMRegionContext.XML_DOCTYPE_NAME, IStyleConstantsXML.DOCTYPE_NAME);
-		fContextToStyleMap.put(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBLIC, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID);
-		fContextToStyleMap.put(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBREF, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF);
-		fContextToStyleMap.put(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSTEM, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID);
-		fContextToStyleMap.put(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSREF, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF);
-
-		fContextToStyleMap.put(DOMRegionContext.XML_CHAR_REFERENCE, IStyleConstantsXML.ENTITY_REFERENCE);
-		fContextToStyleMap.put(DOMRegionContext.XML_ENTITY_REFERENCE, IStyleConstantsXML.ENTITY_REFERENCE);
-		fContextToStyleMap.put(DOMRegionContext.XML_PE_REFERENCE, IStyleConstantsXML.ENTITY_REFERENCE);
-	}
-
-	private void initStyleToDescriptionMap() {
-		fStyleToDescriptionMap.put(IStyleConstantsXML.CDATA_BORDER, XMLUIMessages.CDATA_Delimiters_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.CDATA_TEXT, XMLUIMessages.CDATA_Content_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.PI_BORDER, XMLUIMessages.Processing_Instruction_Del_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.PI_CONTENT, XMLUIMessages.Processing_Instruction_Con_UI__UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.COMMENT_BORDER, XMLUIMessages.Comment_Delimiters_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.COMMENT_TEXT, XMLUIMessages.Comment_Content_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.TAG_BORDER, XMLUIMessages.Tag_Delimiters_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.TAG_NAME, XMLUIMessages.Tag_Names_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.TAG_ATTRIBUTE_NAME, XMLUIMessages.Attribute_Names_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, XMLUIMessages.Attribute_Values_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.DECL_BORDER, XMLUIMessages.Declaration_Delimiters_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.XML_CONTENT, XMLUIMessages.Content_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.DOCTYPE_NAME, XMLUIMessages.DOCTYPE_Name_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, XMLUIMessages.DOCTYPE_SYSTEM_PUBLIC_Keyw_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF, XMLUIMessages.DOCTYPE_Public_Reference_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF, XMLUIMessages.DOCTYPE_System_Reference_UI_);
-		fStyleToDescriptionMap.put(IStyleConstantsXML.ENTITY_REFERENCE, XMLUIMessages.Entity_Reference_UI_);
-	}
-
-	protected void performDefaults() {
-		super.performDefaults();
-		getOverlayStore().loadDefaults();
-		applyStyles();
-		fStylesViewer.setSelection(StructuredSelection.EMPTY);
-		activate(null);
-		fText.redraw();
-	}
-
-	public boolean performOk() {
-		getOverlayStore().propagate();
-
-		XMLUIPlugin.getDefault().savePluginPreferences();
-		SSEUIPlugin.getDefault().savePluginPreferences();
-		return true;
-	}
-
-	private void selectColorAtOffset(int offset) {
-		String namedStyle = getNamedStyleAtOffset(offset);
-		if (namedStyle != null) {
-			fStylesViewer.setSelection(new StructuredSelection(namedStyle));
-			fStylesViewer.reveal(namedStyle);
-		}
-		else {
-			fStylesViewer.setSelection(StructuredSelection.EMPTY);
-		}
-		activate(namedStyle);
-	}
-
-	/**
-	 * Specifically set the reporting name of a control for accessibility
-	 */
-	private void setAccessible(Control control, String name) {
-		if (control == null)
-			return;
-		final String n = name;
-		control.getAccessible().addAccessibleListener(new AccessibleAdapter() {
-			public void getName(AccessibleEvent e) {
-				if (e.childID == ACC.CHILDID_SELF)
-					e.result = n;
-			}
-		});
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLTemplatePreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLTemplatePreferencePage.java
deleted file mode 100644
index 810b599..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLTemplatePreferencePage.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
-
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.ui.StructuredTextViewerConfigurationXML;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-
-
-/**
- * Preference page for XML templates
- */
-public class XMLTemplatePreferencePage extends TemplatePreferencePage {
-
-	class XMLEditTemplateDialog extends EditTemplateDialog {
-		public XMLEditTemplateDialog(Shell parent, Template template, boolean edit, boolean isNameModifiable, ContextTypeRegistry registry) {
-			super(parent, template, edit, isNameModifiable, registry);
-		}
-
-		protected SourceViewer createViewer(Composite parent) {
-			SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
-				StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationXML();
-
-				public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
-					return baseConfiguration.getConfiguredContentTypes(sourceViewer);
-				}
-
-				public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
-					return baseConfiguration.getLineStyleProviders(sourceViewer, partitionType);
-				}
-
-				public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
-					ContentAssistant assistant = new ContentAssistant();
-					assistant.enableAutoActivation(true);
-					assistant.enableAutoInsert(true);
-					assistant.setContentAssistProcessor(getTemplateProcessor(), IDocument.DEFAULT_CONTENT_TYPE);
-					return assistant;
-				}
-			};
-			return doCreateViewer(parent, sourceViewerConfiguration);
-		}
-	}
-
-	public XMLTemplatePreferencePage() {
-		XMLUIPlugin xmlEditorPlugin = XMLUIPlugin.getDefault();
-
-		setPreferenceStore(xmlEditorPlugin.getPreferenceStore());
-		setTemplateStore(xmlEditorPlugin.getTemplateStore());
-		setContextTypeRegistry(xmlEditorPlugin.getTemplateContextRegistry());
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
-	 */
-	protected Control createContents(Composite ancestor) {
-		Control c = super.createContents(ancestor);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(c, IHelpContextIds.XML_PREFWEBX_TEMPLATES_HELPID);
-		return c;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#createViewer(org.eclipse.swt.widgets.Composite)
-	 */
-	protected SourceViewer createViewer(Composite parent) {
-		SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
-			StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationXML();
-
-			public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
-				return baseConfiguration.getConfiguredContentTypes(sourceViewer);
-			}
-
-			public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
-				return baseConfiguration.getLineStyleProviders(sourceViewer, partitionType);
-			}
-		};
-		return doCreateViewer(parent, sourceViewerConfiguration);
-	}
-
-	SourceViewer doCreateViewer(Composite parent, SourceViewerConfiguration viewerConfiguration) {
-		SourceViewer viewer = null;
-		String contentTypeID = ContentTypeIdForXML.ContentTypeID_XML;
-		viewer = new StructuredTextViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
-		((StructuredTextViewer) viewer).getTextWidget().setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$
-		IStructuredModel scratchModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(contentTypeID);
-		IDocument document = scratchModel.getStructuredDocument();
-		viewer.configure(viewerConfiguration);
-		viewer.setDocument(document);
-		return viewer;
-	}
-
-	/**
-	 * Creates the edit dialog. Subclasses may override this method to provide
-	 * a custom dialog.
-	 * 
-	 * @param template
-	 *            the template being edited
-	 * @param edit
-	 *            whether the dialog should be editable
-	 * @param isNameModifiable
-	 *            whether the template name may be modified
-	 * @return the created or modified template, or <code>null</code> if the
-	 *         edition failed
-	 * @since 3.1
-	 */
-	protected Template editTemplate(Template template, boolean edit, boolean isNameModifiable) {
-		EditTemplateDialog dialog = new XMLEditTemplateDialog(getShell(), template, edit, isNameModifiable, getContextTypeRegistry());
-		if (dialog.open() == Window.OK) {
-			return dialog.getTemplate();
-		}
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#isShowFormatterSetting()
-	 */
-	protected boolean isShowFormatterSetting() {
-		// template formatting has not been implemented
-		return false;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.preference.IPreferencePage#performOk()
-	 */
-	public boolean performOk() {
-		boolean ok = super.performOk();
-		XMLUIPlugin.getDefault().savePluginPreferences();
-		return ok;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLTypingPreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLTypingPreferencePage.java
deleted file mode 100644
index a30a7dd..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLTypingPreferencePage.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
- 
-public class XMLTypingPreferencePage extends AbstractPreferencePage {
-
-	private Button fCloseComment;
-	private Button fCloseEndTag;
-	private Button fRemoveEndTag;
-	
-	protected Control createContents(Composite parent) {
-		Composite composite = super.createComposite(parent, 1);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.XML_PREFWEBX_FILES_HELPID);
-		
-		createAutoComplete(composite);
-		createAutoRemove(composite);
-		
-		setSize(composite);
-		loadPreferences();
-		
-		return composite;
-	}
-	
-	private void createAutoComplete(Composite parent) {
-		Group group = createGroup(parent, 2);
-		
-		group.setText(XMLUIMessages.XMLTyping_Auto_Complete);
-		
-		fCloseComment = createCheckBox(group, XMLUIMessages.XMLTyping_Complete_Comments);
-		((GridData) fCloseComment.getLayoutData()).horizontalSpan = 2;
-		
-		fCloseEndTag = createCheckBox(group, XMLUIMessages.XMLTyping_Complete_End_Tags);
-		((GridData) fCloseEndTag.getLayoutData()).horizontalSpan = 2;
-		
-	}
-	
-	private void createAutoRemove(Composite parent) {
-		Group group = createGroup(parent, 2);
-		
-		group.setText(XMLUIMessages.XMLTyping_Auto_Remove);
-		
-		fRemoveEndTag = createCheckBox(group, XMLUIMessages.XMLTyping_Remove_End_Tags);
-		((GridData) fRemoveEndTag.getLayoutData()).horizontalSpan = 2;
-	}
-	
-	public boolean performOk() {
-		boolean result = super.performOk();
-		
-		XMLUIPlugin.getDefault().savePluginPreferences();
-		
-		return result;
-	}
-	
-	protected void initializeValues() {
-		initCheckbox(fCloseComment, XMLUIPreferenceNames.TYPING_COMPLETE_COMMENTS);
-		initCheckbox(fCloseEndTag, XMLUIPreferenceNames.TYPING_COMPLETE_END_TAGS);
-		initCheckbox(fRemoveEndTag, XMLUIPreferenceNames.TYPING_REMOVE_END_TAGS);
-	}
-	
-	protected void performDefaults() {
-		defaultCheckbox(fCloseComment, XMLUIPreferenceNames.TYPING_COMPLETE_COMMENTS);
-		defaultCheckbox(fCloseEndTag, XMLUIPreferenceNames.TYPING_COMPLETE_END_TAGS);
-		defaultCheckbox(fRemoveEndTag, XMLUIPreferenceNames.TYPING_REMOVE_END_TAGS);
-	}
-	
-	private void initCheckbox(Button box, String key) {
-		if(box != null && key != null)
-			box.setSelection(getPreferenceStore().getBoolean(key));
-	}
-	
-	private void defaultCheckbox(Button box, String key) {
-		if(box != null && key != null)
-			box.setSelection(getPreferenceStore().getDefaultBoolean(key));
-	}
-	
-	protected void storeValues() {
-		getPreferenceStore().setValue(XMLUIPreferenceNames.TYPING_COMPLETE_COMMENTS, (fCloseComment != null) ? fCloseComment.getSelection() : false);
-		getPreferenceStore().setValue(XMLUIPreferenceNames.TYPING_COMPLETE_END_TAGS, (fCloseEndTag != null) ? fCloseEndTag.getSelection() : false);
-		getPreferenceStore().setValue(XMLUIPreferenceNames.TYPING_REMOVE_END_TAGS, (fRemoveEndTag != null) ? fRemoveEndTag.getSelection() : false);
-	}
-	
-	protected IPreferenceStore doGetPreferenceStore() {
-		return XMLUIPlugin.getDefault().getPreferenceStore();
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLUIPreferenceInitializer.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLUIPreferenceInitializer.java
deleted file mode 100644
index 8d294b1..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLUIPreferenceInitializer.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- *     Benjamin Muskalla, b.muskalla@gmx.net - [158660] character entities should have their own syntax highlighting preference 
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ColorRegistry;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-/**
- * Sets default values for XML UI preferences
- */
-public class XMLUIPreferenceInitializer extends AbstractPreferenceInitializer {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
-	 */
-	public void initializeDefaultPreferences() {
-		IPreferenceStore store = XMLUIPlugin.getDefault().getPreferenceStore();
-		ColorRegistry registry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
-
-		store.setDefault(XMLUIPreferenceNames.AUTO_PROPOSE, true);
-		store.setDefault(XMLUIPreferenceNames.AUTO_PROPOSE_CODE, "<=:"); //$NON-NLS-1$
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=140946
-		store.setDefault(XMLUIPreferenceNames.SUGGESTION_STRATEGY, XMLUIPreferenceNames.SUGGESTION_STRATEGY_VALUE_STRICT);
-		store.setDefault(XMLUIPreferenceNames.USE_INFERRED_GRAMMAR, true);
-
-		// XML Style Preferences
-		String NOBACKGROUNDBOLD = " | null | false"; //$NON-NLS-1$
-		String JUSTITALIC = " | null | false | true"; //$NON-NLS-1$
-		String styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.TAG_ATTRIBUTE_NAME, 127, 0, 127) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.TAG_ATTRIBUTE_NAME, styleValue);
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, 42, 0, 255) + JUSTITALIC;
-		store.setDefault(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, styleValue);
-
-		styleValue = "null" + NOBACKGROUNDBOLD; //$NON-NLS-1$
-		store.setDefault(IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS, styleValue); // specified
-		// value
-		// is
-		// black;
-		// leaving
-		// as
-		// widget
-		// default
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.COMMENT_BORDER, 63, 95, 191) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.COMMENT_BORDER, styleValue);
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.COMMENT_TEXT, 63, 95, 191) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.COMMENT_TEXT, styleValue);
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.DECL_BORDER, 0, 128, 128) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.DECL_BORDER, styleValue);
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.DOCTYPE_NAME, 0, 0, 128) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.DOCTYPE_NAME, styleValue);
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF, 0, 0, 128) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF, styleValue);
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, 128, 128, 128) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, styleValue);
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF, 63, 127, 95) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF, styleValue);
-
-		styleValue = "null" + NOBACKGROUNDBOLD; //$NON-NLS-1$
-		store.setDefault(IStyleConstantsXML.XML_CONTENT, styleValue); // specified
-		// value
-		// is
-		// black;
-		// leaving
-		// as
-		// widget
-		// default
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.TAG_BORDER, 0, 128, 128) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.TAG_BORDER, styleValue);
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.TAG_NAME, 63, 127, 127) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.TAG_NAME, styleValue);
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.PI_BORDER, 0, 128, 128) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.PI_BORDER, styleValue);
-
-		styleValue = "null" + NOBACKGROUNDBOLD; //$NON-NLS-1$
-		store.setDefault(IStyleConstantsXML.PI_CONTENT, styleValue); // specified
-		// value
-		// is
-		// black;
-		// leaving
-		// as
-		// widget
-		// default
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.CDATA_BORDER, 0, 128, 128) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.CDATA_BORDER, styleValue);
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.CDATA_TEXT, 0, 0, 0) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.CDATA_TEXT, styleValue);
-
-		styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.ENTITY_REFERENCE, 42, 0, 255) + NOBACKGROUNDBOLD;
-		store.setDefault(IStyleConstantsXML.ENTITY_REFERENCE, styleValue);
-		
-		// set default new xml file template to use in new file wizard
-		/*
-		 * Need to find template name that goes with default template id (name
-		 * may change for differnt language)
-		 */
-		String templateName = ""; //$NON-NLS-1$
-		Template template = XMLUIPlugin.getDefault().getTemplateStore().findTemplateById("org.eclipse.wst.xml.ui.internal.templates.xmldeclaration"); //$NON-NLS-1$
-		if (template != null)
-			templateName = template.getName();
-		store.setDefault(XMLUIPreferenceNames.NEW_FILE_TEMPLATE_NAME, templateName);
-		
-		// Defaults for the Typing preference page
-		store.setDefault(XMLUIPreferenceNames.TYPING_COMPLETE_COMMENTS, true);
-		store.setDefault(XMLUIPreferenceNames.TYPING_COMPLETE_END_TAGS, true);
-		store.setDefault(XMLUIPreferenceNames.TYPING_REMOVE_END_TAGS, true);
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLUIPreferenceNames.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLUIPreferenceNames.java
deleted file mode 100644
index d71a7a3..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLUIPreferenceNames.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.preferences;
-
-/**
- * Preference keys for XML UI
- */
-public class XMLUIPreferenceNames {
-
-	public final static String SUGGESTION_STRATEGY_VALUE_LAX = "Lax"; //$NON-NLS-1$
-	public final static String SUGGESTION_STRATEGY_VALUE_STRICT = "Strict"; //$NON-NLS-1$
-	/**
-	 * A named preference that controls if code assist gets auto activated.
-	 * <p>
-	 * Value is of type <code>Boolean</code>.
-	 * </p>
-	 */
-	public static final String AUTO_PROPOSE = getAutoProposeKey();
-
-	private static String getAutoProposeKey() {
-		return "autoPropose";//$NON-NLS-1$
-	}
-
-	/**
-	 * A named preference that holds the characters that auto activate code
-	 * assist.
-	 * <p>
-	 * Value is of type <code>String</code>. All characters that trigger
-	 * auto code assist.
-	 * </p>
-	 */
-	public static final String AUTO_PROPOSE_CODE = getAutoProposeCodeKey();
-
-	private static String getAutoProposeCodeKey() {
-		return "autoProposeCode";//$NON-NLS-1$
-	}
-
-	/**
-	 * The key to store customized templates.
-	 * <p>
-	 * Value is of type <code>String</code>.
-	 * </p>
-	 */
-	public static final String TEMPLATES_KEY = getTemplatesKey();
-
-	private static String getTemplatesKey() {
-		return "org.eclipse.wst.sse.ui.custom_templates"; //$NON-NLS-1$
-	}
-
-	/**
-	 * A named preference that controls whether or grammar should be inferred
-	 * or not.
-	 * <p>
-	 * Value is of type <code>Boolean</code>.
-	 * </p>
-	 */
-	public static final String USE_INFERRED_GRAMMAR = getUseInferredGrammarKey();
-
-	private static String getUseInferredGrammarKey() {
-		return "useInferredGrammar"; //$NON-NLS-1$
-	}
-
-	/**
-	 * A named preference that holds the characters that auto activate code
-	 * assist.
-	 * <p>
-	 * Value is of type <code>String</code>. All characters that trigger
-	 * auto code assist.
-	 * </p>
-	 */
-	public static final String SUGGESTION_STRATEGY = getSuggestionStrategeyKey();
-
-	private static String getSuggestionStrategeyKey() {
-		return "suggestionStrategy";//$NON-NLS-1$
-	}
-
-	/**
-	 * The key to store the last template name used in new DTD file wizard.
-	 * Template name is stored instead of template id because user-created
-	 * templates do not have template ids.
-	 * <p>
-	 * Value is of type <code>String</code>.
-	 * </p>
-	 */
-	public static final String NEW_FILE_TEMPLATE_NAME = "newFileTemplateName"; //$NON-NLS-1$
-	
-	/**
-	 * The key to store the option for auto-completing comments while
-	 * typing.
-	 * <p>
-	 * Value is of type <code>boolean</code>.
-	 * </p>
-	 */
-	public static final String TYPING_COMPLETE_COMMENTS = "completeComments"; //$NON-NLS-1$
-	
-	/**
-	 * The key to store the option for auto-completing end-tags after entering
-	 * <code>&lt;/</code>
-	 * <p>
-	 * Value is of type <code>boolean</code>.
-	 * </p>
-	 */
-	public static final String TYPING_COMPLETE_END_TAGS = "completeEndTags"; //$NON-NLS-1$
-	
-	/**
-	 * The key to store the option for removing an end-tag if the start tag is
-	 * converted to an empty-tag.
-	 * <p>
-	 * Value is of type <code>boolean</code>.
-	 * </p>
-	 */
-	public static final String TYPING_REMOVE_END_TAGS = "removeEndTags"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionAnnotationModelChanges.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionAnnotationModelChanges.java
deleted file mode 100644
index 7d415f9..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionAnnotationModelChanges.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.projection;
-
-import java.util.Map;
-
-import org.eclipse.jface.text.source.Annotation;
-import org.w3c.dom.Node;
-
-/**
- * Contains a set of projection model additions/deletions/modifications
- */
-class ProjectionAnnotationModelChanges {
-	// copies of this class located in:
-	// org.eclipse.wst.xml.ui.internal.projection
-	// org.eclipse.wst.css.ui.internal.projection
-	// org.eclipse.wst.html.ui.internal.projection
-	// org.eclipse.jst.jsp.ui.internal.projection
-	private Node fNode;
-	private Annotation[] fDeletions;
-	private Map fAdditions;
-	private Annotation[] fModifications;
-
-	public ProjectionAnnotationModelChanges(Node node, Annotation[] deletions, Map additions, Annotation[] modifications) {
-		fNode = node;
-		fDeletions = deletions;
-		fAdditions = additions;
-		fModifications = modifications;
-	}
-
-	public Map getAdditions() {
-		return fAdditions;
-	}
-
-	public Annotation[] getDeletions() {
-		return fDeletions;
-	}
-
-	public Annotation[] getModifications() {
-		return fModifications;
-	}
-
-	public Node getNode() {
-		return fNode;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterFactoryXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterFactoryXML.java
deleted file mode 100644
index 8202f4f..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterFactoryXML.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.projection;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.wst.sse.core.internal.provisional.AbstractAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.w3c.dom.Node;
-
-public class ProjectionModelNodeAdapterFactoryXML extends AbstractAdapterFactory {
-	/**
-	 * List of projection viewers currently associated with this projection
-	 * model node adapter factory.
-	 */
-	private HashMap fProjectionViewers;
-
-	public ProjectionModelNodeAdapterFactoryXML() {
-		super(ProjectionModelNodeAdapterXML.class, true);
-	}
-
-	protected INodeAdapter createAdapter(INodeNotifier target) {
-		ProjectionModelNodeAdapterXML adapter = null;
-
-		// create adapter for every element tag
-		if ((isActive()) && (target instanceof Node) && (((Node) target).getNodeType() == Node.ELEMENT_NODE)) {
-			adapter = new ProjectionModelNodeAdapterXML(this);
-			adapter.updateAdapter((Node) target);
-		}
-
-		return adapter;
-	}
-
-	/**
-	 * Return true if this factory is currently actively managing projection
-	 * 
-	 * @return
-	 */
-	boolean isActive() {
-		return ((fProjectionViewers != null) && !fProjectionViewers.isEmpty());
-	}
-
-	/**
-	 * Updates projection annotation model if document is not in flux.
-	 * Otherwise, queues up the changes to be applied when document is ready.
-	 * 
-	 * @param node
-	 * @param deletions
-	 * @param additions
-	 * @param modifications
-	 */
-	void queueAnnotationModelChanges(Node node, Annotation[] deletions, Map additions, Annotation[] modifications) {
-		queueAnnotationModelChanges(node, deletions, additions, modifications, null);
-	}
-
-	/**
-	 * Updates projection annotation model for a specific projection viewer if
-	 * document is not in flux. Otherwise, queues up the changes to be applied
-	 * when document is ready.
-	 * 
-	 * @param node
-	 * @param deletions
-	 * @param additions
-	 * @param modifications
-	 * @param viewer
-	 */
-	void queueAnnotationModelChanges(Node node, Annotation[] deletions, Map additions, Annotation[] modifications, ProjectionViewer viewer) {
-		// create a change object for latest change and add to queue
-		ProjectionAnnotationModelChanges newChange = new ProjectionAnnotationModelChanges(node, deletions, additions, modifications);
-		if (fProjectionViewers != null) {
-			if (viewer != null) {
-				ProjectionViewerInformation info = (ProjectionViewerInformation) fProjectionViewers.get(viewer);
-				if (info != null) {
-					info.queueAnnotationModelChanges(newChange);
-				}
-			}
-			else {
-				Iterator infos = fProjectionViewers.values().iterator();
-				while (infos.hasNext()) {
-					ProjectionViewerInformation info = (ProjectionViewerInformation) infos.next();
-					info.queueAnnotationModelChanges(newChange);
-				}
-			}
-		}
-	}
-
-	public void release() {
-		// go through every projectionviewer and call
-		// removeProjectionViewer(viewer);
-		if (fProjectionViewers != null) {
-			Iterator infos = fProjectionViewers.values().iterator();
-			while (infos.hasNext()) {
-				ProjectionViewerInformation info = (ProjectionViewerInformation) infos.next();
-				info.dispose();
-				infos.remove();
-			}
-			fProjectionViewers = null;
-		}
-		super.release();
-	}
-
-	/**
-	 * Adds viewer to list of projection viewers this factory is associated
-	 * with
-	 * 
-	 * @param viewer -
-	 *            assumes viewer's document and projection annotation model
-	 *            are not null
-	 */
-	void addProjectionViewer(ProjectionViewer viewer) {
-		// remove old entry if it exists
-		removeProjectionViewer(viewer);
-
-		if (fProjectionViewers == null) {
-			fProjectionViewers = new HashMap();
-		}
-
-		// create new object containing projection viewer and its info
-		ProjectionViewerInformation info = new ProjectionViewerInformation(viewer);
-		fProjectionViewers.put(viewer, info);
-		info.initialize();
-	}
-
-	/**
-	 * Removes the given viewer from the list of projection viewers this
-	 * factor is associated with
-	 * 
-	 * @param viewer
-	 */
-	void removeProjectionViewer(ProjectionViewer viewer) {
-		if (fProjectionViewers != null) {
-			// remove entry from list of viewers
-			ProjectionViewerInformation info = (ProjectionViewerInformation) fProjectionViewers.remove(viewer);
-			if (info != null) {
-				info.dispose();
-			}
-			// if removing last projection viewer, clear out everything
-			if (fProjectionViewers.isEmpty()) {
-				fProjectionViewers = null;
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterXML.java
deleted file mode 100644
index fde379a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterXML.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.projection;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.w3c.dom.Node;
-
-/**
- * Updates projection annotation model with projection annotations for this
- * adapter node's children
- */
-public class ProjectionModelNodeAdapterXML implements INodeAdapter {
-	private final static boolean debugProjectionPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.xml.ui/projectionperf")); //$NON-NLS-1$ //$NON-NLS-2$
-
-	private class TagProjectionAnnotation extends ProjectionAnnotation {
-		private boolean fIsVisible = false; /* workaround for BUG85874 */
-		private Node fNode;
-
-		public TagProjectionAnnotation(Node node, boolean isCollapsed) {
-			super(isCollapsed);
-			fNode = node;
-		}
-
-		public Node getNode() {
-			return fNode;
-		}
-
-		public void setNode(Node node) {
-			fNode = node;
-		}
-
-		/**
-		 * Does not paint hidden annotations. Annotations are hidden when they
-		 * only span one line.
-		 * 
-		 * @see ProjectionAnnotation#paint(org.eclipse.swt.graphics.GC,
-		 *      org.eclipse.swt.widgets.Canvas,
-		 *      org.eclipse.swt.graphics.Rectangle)
-		 */
-		public void paint(GC gc, Canvas canvas, Rectangle rectangle) {
-			/* workaround for BUG85874 */
-			/*
-			 * only need to check annotations that are expanded because hidden
-			 * annotations should never have been given the chance to
-			 * collapse.
-			 */
-			if (!isCollapsed()) {
-				// working with rectangle, so line height
-				FontMetrics metrics = gc.getFontMetrics();
-				if (metrics != null) {
-					// do not draw annotations that only span one line and
-					// mark them as not visible
-					if ((rectangle.height / metrics.getHeight()) <= 1) {
-						fIsVisible = false;
-						return;
-					}
-				}
-			}
-			fIsVisible = true;
-			super.paint(gc, canvas, rectangle);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.text.source.projection.ProjectionAnnotation#markCollapsed()
-		 */
-		public void markCollapsed() {
-			/* workaround for BUG85874 */
-			// do not mark collapsed if annotation is not visible
-			if (fIsVisible) {
-				super.markCollapsed();
-			}
-		}
-	}
-
-	ProjectionModelNodeAdapterFactoryXML fAdapterFactory;
-	private Map fTagAnnotations = new HashMap();
-
-	public ProjectionModelNodeAdapterXML(ProjectionModelNodeAdapterFactoryXML factory) {
-		fAdapterFactory = factory;
-	}
-
-	/**
-	 * Create a projection position from the given node. Able to get
-	 * projection position if node isNodeProjectable.
-	 * 
-	 * @param node
-	 * @return null if no projection position possible, a Position otherwise
-	 */
-	private Position createProjectionPosition(Node node) {
-		Position pos = null;
-		if (isNodeProjectable(node) && (node instanceof IndexedRegion)) {
-			// IDocument document =
-			// fAdapterFactory.getProjectionViewer().getDocument();
-			// if (document != null) {
-			IndexedRegion inode = (IndexedRegion) node;
-			int start = inode.getStartOffset();
-			int end = inode.getEndOffset();
-			if ((start >= 0) && (start < end)) {
-				// region-based
-				// extra line when collapsed, but no region increase when add
-				// newline
-				pos = new Position(start, end - start);
-				// try {
-				// // line-based
-				// // extra line when collapsed, but no region increase when
-				// add newline
-				// IRegion startLineRegion =
-				// document.getLineInformationOfOffset(start);
-				// IRegion endLineRegion =
-				// document.getLineInformationOfOffset(end);
-				// int startOffset = startLineRegion.getOffset();
-				// int endOffset = endLineRegion.getOffset() +
-				// endLineRegion.getLength();
-				// if (endOffset > startOffset) {
-				// pos = new Position(startOffset, endOffset - startOffset);
-				// }
-
-				// // line-based
-				// // no extra line when collapsed, but region increase when
-				// add newline
-				// int startLine = document.getLineOfOffset(start);
-				// int endLine = document.getLineOfOffset(end);
-				// if (endLine + 1 < document.getNumberOfLines()) {
-				// int offset = document.getLineOffset(startLine);
-				// int endOffset = document.getLineOffset(endLine + 1);
-				// pos = new Position(offset, endOffset - offset);
-				// }
-				// }
-				// catch (BadLocationException x) {
-				// Logger.log(Logger.WARNING_DEBUG, null, x);
-				// }
-			}
-			// }
-		}
-		return pos;
-	}
-
-	/**
-	 * Find TagProjectionAnnotation for node in the current list of projection
-	 * annotations for this adapter
-	 * 
-	 * @param node
-	 * @return TagProjectionAnnotation
-	 */
-	private TagProjectionAnnotation getExistingAnnotation(Node node) {
-		TagProjectionAnnotation anno = null;
-
-		if ((node != null) && (!fTagAnnotations.isEmpty())) {
-			Iterator it = fTagAnnotations.keySet().iterator();
-			while (it.hasNext() && (anno == null)) {
-				TagProjectionAnnotation a = (TagProjectionAnnotation) it.next();
-				Node n = a.getNode();
-				if (node.equals(n)) {
-					anno = a;
-				}
-			}
-		}
-		return anno;
-	}
-
-	public boolean isAdapterForType(Object type) {
-		return type == ProjectionModelNodeAdapterXML.class;
-	}
-
-	/**
-	 * Returns true if node is a node type able to fold
-	 * 
-	 * @param node
-	 * @return boolean true if node is projectable, false otherwise
-	 */
-	private boolean isNodeProjectable(Node node) {
-		if (node.getNodeType() == Node.ELEMENT_NODE) {
-			return true;
-		}
-		return false;
-	}
-
-	public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
-		// check if folding is even enabled, if not, just ignore notifyChanged
-		// events
-		if (!fAdapterFactory.isActive()) {
-			return;
-		}
-
-		if ((eventType == INodeNotifier.STRUCTURE_CHANGED) && (notifier instanceof Node)) {
-			updateAdapter((Node) notifier);
-		}
-	}
-
-	/**
-	 * Update the projection annotation of all the nodes that are children of
-	 * node
-	 * 
-	 * @param node
-	 */
-	void updateAdapter(Node node) {
-		updateAdapter(node, null);
-	}
-
-	/**
-	 * Update the projection annotation of all the nodes that are children of
-	 * node and adds all projection annotations to viewer (for newly added
-	 * viewers)
-	 * 
-	 * @param node
-	 * @param viewer
-	 */
-	void updateAdapter(Node node, ProjectionViewer viewer) {
-		long start = System.currentTimeMillis();
-
-		Map additions = new HashMap();
-		Map projectionAnnotations = new HashMap();
-
-		// go through immediate child nodes and figure out projection
-		// model annotations
-		if (node != null) {
-			Node childNode = node.getFirstChild();
-			while (childNode != null) {
-				Position newPos = createProjectionPosition(childNode);
-				if (newPos != null) {
-					TagProjectionAnnotation newAnnotation = new TagProjectionAnnotation(childNode, false);
-					TagProjectionAnnotation existing = getExistingAnnotation(childNode);
-					if (existing == null) {
-						// add to map containing all annotations for this
-						// adapter
-						projectionAnnotations.put(newAnnotation, newPos);
-						// add to map containing annotations to add
-						additions.put(newAnnotation, newPos);
-					}
-					else {
-						// add to map containing all annotations for this
-						// adapter
-						projectionAnnotations.put(existing, newPos);
-						// remove from map containing annotations to delete
-						fTagAnnotations.remove(existing);
-					}
-				}
-				childNode = childNode.getNextSibling();
-			}
-
-			// in the end, want to delete anything leftover in old list, add
-			// everything in additions, and update everything in
-			// projectionAnnotations
-			ProjectionAnnotation[] oldList = null;
-			if (!fTagAnnotations.isEmpty()) {
-				oldList = (ProjectionAnnotation[]) fTagAnnotations.keySet().toArray(new ProjectionAnnotation[0]);
-			}
-			ProjectionAnnotation[] modifyList = null;
-			if (!projectionAnnotations.isEmpty()) {
-				modifyList = (ProjectionAnnotation[]) projectionAnnotations.keySet().toArray(new ProjectionAnnotation[0]);
-			}
-
-			// specifically add all annotations to viewer
-			if ((viewer != null) && !projectionAnnotations.isEmpty()) {
-				fAdapterFactory.queueAnnotationModelChanges(node, null, projectionAnnotations, null, viewer);
-			}
-
-			// only update when there is something to update
-			if (((oldList != null) && (oldList.length > 0)) || (!additions.isEmpty()) || ((modifyList != null) && (modifyList.length > 0))) {
-				fAdapterFactory.queueAnnotationModelChanges(node, oldList, additions, modifyList);
-			}
-		}
-
-		// save new list of annotations
-		fTagAnnotations = projectionAnnotations;
-
-		if (debugProjectionPerf) {
-			long end = System.currentTimeMillis();
-			String nodeName = node != null ? node.getNodeName() : "null"; //$NON-NLS-1$
-			System.out.println("ProjectionModelNodeAdapterXML.updateAdapter (" + nodeName + "):" + (end - start)); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionViewerInformation.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionViewerInformation.java
deleted file mode 100644
index 1dccff6..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionViewerInformation.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.projection;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentExtension;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.wst.xml.ui.internal.Logger;
-
-/**
- * Contains information about a projection viewer and also manages updating
- * the viewer's projection annotation model
- */
-class ProjectionViewerInformation {
-	// copies of this class located in:
-	// org.eclipse.wst.xml.ui.internal.projection
-	// org.eclipse.wst.css.ui.internal.projection
-	// org.eclipse.wst.html.ui.internal.projection
-	// org.eclipse.jst.jsp.ui.internal.projection
-
-	/**
-	 * Listens to document to be aware of when to update the projection
-	 * annotation model.
-	 */
-	private class DocumentListener implements IDocumentListener {
-		private ProjectionViewerInformation fInfo;
-
-		public DocumentListener(ProjectionViewerInformation info) {
-			fInfo = info;
-		}
-
-		public void documentAboutToBeChanged(DocumentEvent event) {
-			IDocument document = event.getDocument();
-			if (fInfo.getDocument() == document) {
-				fInfo.setIsDocumentChanging(true);
-			}
-		}
-
-		public void documentChanged(DocumentEvent event) {
-			// register a post notification replace so that projection
-			// annotation model will be updated after all documentChanged
-			// listeners have been notified
-			IDocument document = event.getDocument();
-			if ((document instanceof IDocumentExtension) && (fInfo.getDocument() == document)) {
-				if (fInfo.hasChangesQueued()) {
-					((IDocumentExtension) document).registerPostNotificationReplace(this, new PostDocumentChangedListener(fInfo));
-				}
-			}
-		}
-	}
-
-	/**
-	 * Essentially a post document changed listener because it is called after
-	 * documentchanged has been fired.
-	 */
-	private class PostDocumentChangedListener implements IDocumentExtension.IReplace {
-		private ProjectionViewerInformation fInfo;
-
-		public PostDocumentChangedListener(ProjectionViewerInformation info) {
-			fInfo = info;
-		}
-
-		public void perform(IDocument document, IDocumentListener owner) {
-			fInfo.applyAnnotationModelChanges();
-			fInfo.setIsDocumentChanging(false);
-		}
-	}
-
-	/**
-	 * Projection annotation model current associated with this projection
-	 * viewer
-	 */
-	private ProjectionAnnotationModel fProjectionAnnotationModel;
-	/**
-	 * Document currently associated with this projection viewer
-	 */
-	private IDocument fDocument;
-	/**
-	 * Listener to fProjectionViewer's document
-	 */
-	private IDocumentListener fDocumentListener;
-	/**
-	 * Indicates whether or not document is in the middle of changing
-	 */
-	private boolean fIsDocumentChanging = false;
-	/**
-	 * List of projection annotation model changes that need to be applied
-	 */
-	private List fQueuedAnnotationChanges;
-
-	public ProjectionViewerInformation(ProjectionViewer viewer) {
-		fDocument = viewer.getDocument();
-		fProjectionAnnotationModel = viewer.getProjectionAnnotationModel();
-	}
-
-	IDocument getDocument() {
-		return fDocument;
-	}
-
-	private List getQueuedAnnotationChanges() {
-		if (fQueuedAnnotationChanges == null) {
-			fQueuedAnnotationChanges = new ArrayList();
-		}
-		return fQueuedAnnotationChanges;
-	}
-
-	void setIsDocumentChanging(boolean changing) {
-		fIsDocumentChanging = changing;
-	}
-
-	private boolean isDocumentChanging() {
-		return fIsDocumentChanging;
-	}
-
-	/**
-	 * Applies the pending projection annotation model changes to the
-	 * projection annotation model.
-	 */
-	void applyAnnotationModelChanges() {
-		List queuedChanges = getQueuedAnnotationChanges();
-		// go through all the pending annotation changes and apply
-		// them to
-		// the projection annotation model
-		while (!queuedChanges.isEmpty()) {
-			ProjectionAnnotationModelChanges changes = (ProjectionAnnotationModelChanges) queuedChanges.remove(0);
-			try {
-				fProjectionAnnotationModel.modifyAnnotations(changes.getDeletions(), changes.getAdditions(), changes.getModifications());
-			}
-			catch (Exception e) {
-				// if anything goes wrong, log it be continue
-				Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
-			}
-		}
-	}
-
-	/**
-	 * Returns true if there are annotation changes queued up, false otherwise
-	 * 
-	 * @return boolean
-	 */
-	boolean hasChangesQueued() {
-		return !getQueuedAnnotationChanges().isEmpty();
-	}
-
-	/**
-	 * Updates projection annotation model if document is not in flux.
-	 * Otherwise, queues up the changes to be applied when document is ready.
-	 */
-	public void queueAnnotationModelChanges(ProjectionAnnotationModelChanges newChange) {
-		/*
-		 * future_TODO: maybe improve by checking if annotation projection
-		 * model change already exists for node. if so, throw out old change.
-		 */
-		getQueuedAnnotationChanges().add(newChange);
-
-		// if document isn't changing, go ahead and apply it
-		if (!isDocumentChanging()) {
-			applyAnnotationModelChanges();
-		}
-	}
-
-	public void initialize() {
-		// add document listener
-		if (fDocumentListener == null) {
-			fDocumentListener = new DocumentListener(this);
-		}
-		getDocument().addDocumentListener(fDocumentListener);
-	}
-
-	public void dispose() {
-		// remove document listener
-		if (fDocumentListener != null) {
-			getDocument().removeDocumentListener(fDocumentListener);
-		}
-
-		// clear out list of queued changes since it may no longer
-		// be accurate
-		if (fQueuedAnnotationChanges != null) {
-			fQueuedAnnotationChanges.clear();
-			fQueuedAnnotationChanges = null;
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java
deleted file mode 100644
index b7047bb..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.projection;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextInputListener;
-import org.eclipse.jface.text.source.projection.IProjectionListener;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
-import org.eclipse.wst.sse.core.internal.model.FactoryRegistry;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-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.ui.internal.projection.IStructuredTextFoldingProvider;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- * Updates the projection model of a structured model for XML.
- */
-public class StructuredTextFoldingProviderXML implements IStructuredTextFoldingProvider, IProjectionListener, ITextInputListener {
-	private final static boolean debugProjectionPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.xml.ui/projectionperf")); //$NON-NLS-1$ //$NON-NLS-2$
-
-	private IDocument fDocument;
-	private ProjectionViewer fViewer;
-	private boolean fProjectionNeedsToBeEnabled = false;
-	/**
-	 * Maximum number of child nodes to add adapters to (limit for performance
-	 * sake)
-	 */
-	private final int MAX_CHILDREN = 10;
-	/**
-	 * Maximum number of sibling nodes to add adapters to (limit for
-	 * performance sake)
-	 */
-	private final int MAX_SIBLINGS = 1000;
-
-	/**
-	 * Adds an adapter to node and its children
-	 * 
-	 * @param node
-	 * @param childLevel
-	 */
-	private void addAdapterToNodeAndChildren(Node node, int childLevel) {
-		// stop adding initial adapters MAX_CHILDREN levels deep for
-		// performance sake
-		if ((node instanceof INodeNotifier) && (childLevel < MAX_CHILDREN)) {
-			INodeNotifier notifier = (INodeNotifier) node;
-
-			// try and get the adapter for the current node and update the
-			// adapter with projection information
-			ProjectionModelNodeAdapterXML adapter = (ProjectionModelNodeAdapterXML) notifier.getExistingAdapter(ProjectionModelNodeAdapterXML.class);
-			if (adapter != null) {
-				adapter.updateAdapter(node, fViewer);
-			}
-			else {
-				// just call getadapter so the adapter is created and
-				// automatically initialized
-				notifier.getAdapterFor(ProjectionModelNodeAdapterXML.class);
-			}
-			int siblingLevel = 0;
-			Node nextChild = node.getFirstChild();
-			while ((nextChild != null) && (siblingLevel < MAX_SIBLINGS)) {
-				Node childNode = nextChild;
-				nextChild = childNode.getNextSibling();
-
-				addAdapterToNodeAndChildren(childNode, childLevel + 1);
-			}
-		}
-	}
-
-	/**
-	 * Goes through every node and adds an adapter onto each for tracking
-	 * purposes
-	 */
-	private void addAllAdapters() {
-		long start = System.currentTimeMillis();
-
-		if (fDocument != null) {
-			IStructuredModel sModel = null;
-			try {
-				sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
-				if (sModel != null) {
-					int startOffset = 0;
-					IndexedRegion startNode = sModel.getIndexedRegion(startOffset);
-					if (startNode instanceof Node) {
-						int siblingLevel = 0;
-						Node nextSibling = (Node) startNode;
-						while ((nextSibling != null) && (siblingLevel < MAX_SIBLINGS)) {
-							Node currentNode = nextSibling;
-							nextSibling = currentNode.getNextSibling();
-
-							addAdapterToNodeAndChildren(currentNode, 0);
-							++siblingLevel;
-						}
-					}
-				}
-			}
-			finally {
-				if (sModel != null) {
-					sModel.releaseFromRead();
-				}
-			}
-		}
-		if (debugProjectionPerf) {
-			long end = System.currentTimeMillis();
-			System.out.println("StructuredTextFoldingProviderXML.addAllAdapters: " + (end - start)); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Get the ProjectionModelNodeAdapterFactoryXML to use with this provider.
-	 * 
-	 * @return ProjectionModelNodeAdapterFactoryXML
-	 */
-	private ProjectionModelNodeAdapterFactoryXML getAdapterFactory(boolean createIfNeeded) {
-		long start = System.currentTimeMillis();
-
-		ProjectionModelNodeAdapterFactoryXML factory = null;
-		if (fDocument != null) {
-			IStructuredModel sModel = null;
-			try {
-				sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
-				if (sModel != null) {
-					FactoryRegistry factoryRegistry = sModel.getFactoryRegistry();
-
-					// getting the projectionmodelnodeadapter for the first
-					// time
-					// so do some initializing
-					if (!factoryRegistry.contains(ProjectionModelNodeAdapterXML.class) && createIfNeeded) {
-						ProjectionModelNodeAdapterFactoryXML newFactory = new ProjectionModelNodeAdapterFactoryXML();
-
-						// add factory to factory registry
-						factoryRegistry.addFactory(newFactory);
-
-						// add factory to propogating adapter
-						IDOMModel domModel = (IDOMModel) sModel;
-						Document document = domModel.getDocument();
-						PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
-						if (propagatingAdapter != null) {
-							propagatingAdapter.addAdaptOnCreateFactory(newFactory);
-						}
-					}
-
-					// try and get the factory
-					factory = (ProjectionModelNodeAdapterFactoryXML) factoryRegistry.getFactoryFor(ProjectionModelNodeAdapterXML.class);
-				}
-			}
-			finally {
-				if (sModel != null) {
-					sModel.releaseFromRead();
-				}
-			}
-		}
-
-		if (debugProjectionPerf) {
-			long end = System.currentTimeMillis();
-			System.out.println("StructuredTextFoldingProviderXML.getAdapterFactory: " + (end - start)); //$NON-NLS-1$
-		}
-		return factory;
-	}
-
-	/**
-	 * Initialize this provider with the correct document. Assumes projection
-	 * is enabled. (otherwise, only install would have been called)
-	 */
-	public void initialize() {
-		if (!isInstalled()) {
-			return;
-		}
-
-		long start = System.currentTimeMillis();
-		// clear out old info
-		projectionDisabled();
-
-		fDocument = fViewer.getDocument();
-
-		// set projection viewer on new document's adapter factory
-		if (fViewer.getProjectionAnnotationModel() != null) {
-			ProjectionModelNodeAdapterFactoryXML factory = getAdapterFactory(true);
-			if (factory != null) {
-				factory.addProjectionViewer(fViewer);
-			}
-			try {
-				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=198304
-				// disable redraw while adding all adapters
-				fViewer.setRedraw(false);
-				addAllAdapters();
-			}
-			finally {
-				fViewer.setRedraw(true);
-			}
-		}
-		fProjectionNeedsToBeEnabled = false;
-
-		if (debugProjectionPerf) {
-			long end = System.currentTimeMillis();
-			System.out.println("StructuredTextFoldingProviderXML.initialize: " + (end - start)); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Associate a ProjectionViewer with this IStructuredTextFoldingProvider
-	 * 
-	 * @param viewer -
-	 *            assumes not null
-	 */
-	public void install(ProjectionViewer viewer) {
-		// uninstall before trying to install new viewer
-		if (isInstalled()) {
-			uninstall();
-		}
-		fViewer = viewer;
-		fViewer.addProjectionListener(this);
-		fViewer.addTextInputListener(this);
-	}
-
-	private boolean isInstalled() {
-		return fViewer != null;
-	}
-
-	public void projectionDisabled() {
-		ProjectionModelNodeAdapterFactoryXML factory = getAdapterFactory(false);
-		if (factory != null) {
-			factory.removeProjectionViewer(fViewer);
-		}
-
-		// clear out all annotations
-		if (fViewer.getProjectionAnnotationModel() != null) {
-			fViewer.getProjectionAnnotationModel().removeAllAnnotations();
-		}
-
-		removeAllAdapters();
-
-		fDocument = null;
-		fProjectionNeedsToBeEnabled = false;
-	}
-
-	public void projectionEnabled() {
-		initialize();
-	}
-
-	/**
-	 * Removes an adapter from node and its children
-	 * 
-	 * @param node
-	 * @param level
-	 */
-	private void removeAdapterFromNodeAndChildren(Node node, int level) {
-		if (node instanceof INodeNotifier) {
-			INodeNotifier notifier = (INodeNotifier) node;
-
-			// try and get the adapter for the current node and remove it
-			INodeAdapter adapter = notifier.getExistingAdapter(ProjectionModelNodeAdapterXML.class);
-			if (adapter != null) {
-				notifier.removeAdapter(adapter);
-			}
-
-			Node nextChild = node.getFirstChild();
-			while (nextChild != null) {
-				Node childNode = nextChild;
-				nextChild = childNode.getNextSibling();
-
-				removeAdapterFromNodeAndChildren(childNode, level + 1);
-			}
-		}
-	}
-
-	/**
-	 * Goes through every node and removes adapter from each for cleanup
-	 * purposes
-	 */
-	private void removeAllAdapters() {
-		long start = System.currentTimeMillis();
-
-		if (fDocument != null) {
-			IStructuredModel sModel = null;
-			try {
-				sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
-				if (sModel != null) {
-					int startOffset = 0;
-					IndexedRegion startNode = sModel.getIndexedRegion(startOffset);
-					if (startNode instanceof Node) {
-						Node nextSibling = (Node) startNode;
-						while (nextSibling != null) {
-							Node currentNode = nextSibling;
-							nextSibling = currentNode.getNextSibling();
-
-							removeAdapterFromNodeAndChildren(currentNode, 0);
-						}
-					}
-				}
-			}
-			finally {
-				if (sModel != null) {
-					sModel.releaseFromRead();
-				}
-			}
-		}
-
-		if (debugProjectionPerf) {
-			long end = System.currentTimeMillis();
-			System.out.println("StructuredTextFoldingProviderXML.removeAllAdapters: " + (end - start)); //$NON-NLS-1$
-		}
-	}
-
-	public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
-		// if folding is enabled and new document is going to be a totally
-		// different document, disable projection
-		if ((fDocument != null) && (fDocument != newInput)) {
-			// disable projection and disconnect everything
-			projectionDisabled();
-			fProjectionNeedsToBeEnabled = true;
-		}
-	}
-
-	public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
-		// if projection was previously enabled before input document changed
-		// and new document is different than old document
-		if (fProjectionNeedsToBeEnabled && (fDocument == null) && (newInput != null)) {
-			projectionEnabled();
-			fProjectionNeedsToBeEnabled = false;
-		}
-	}
-
-	/**
-	 * Disconnect this IStructuredTextFoldingProvider from projection viewer
-	 */
-	public void uninstall() {
-		if (isInstalled()) {
-			projectionDisabled();
-
-			fViewer.removeProjectionListener(this);
-			fViewer.removeTextInputListener(this);
-			fViewer = null;
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/EnumeratedStringPropertyDescriptor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/EnumeratedStringPropertyDescriptor.java
deleted file mode 100644
index a4bd9f6..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/EnumeratedStringPropertyDescriptor.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.properties;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-/**
- * This class should be used for properties which require a combo box cell
- * editor and whose values consist of a list of enumerated strings.
- */
-public class EnumeratedStringPropertyDescriptor extends PropertyDescriptor {
-	protected StringComboBoxCellEditor fEditor;
-	protected Composite fParent;
-
-	/**
-	 * The enumerated possible values for the described property
-	 */
-	protected String fValues[] = null;
-
-	public EnumeratedStringPropertyDescriptor(Object id, String newDisplayName, String[] valuesArray) {
-		super(id, newDisplayName);
-		setDescription((String) id);
-		fValues = valuesArray;
-	}
-
-	/**
-	 * Creates and returns a new cell editor for editing this property.
-	 * Returns <code>null</code> if the property is not editable.
-	 * 
-	 * @param parent
-	 *            the parent widget for the cell editor
-	 * @return the cell editor for this property, or <code>null</code> if
-	 *         this property cannot be edited
-	 */
-	public CellEditor createPropertyEditor(Composite parent) {
-		// Check to see if we already have a Cell Editor with a valid Control
-		// under the given parent.
-		// If any of that's not true, create and return a new Cell Editor
-		if ((fEditor == null) || (fEditor.getControl() == null) || fEditor.getControl().isDisposed() || (parent != fParent)) {
-			fEditor = new StringComboBoxCellEditor(parent, fValues);
-		}
-		fParent = parent;
-		return fEditor;
-	}
-
-	public void updateValues(String newValues[]) {
-		if (Arrays.equals(fValues, newValues)) {
-			return;
-		}
-		fValues = newValues;
-		if (fEditor != null) {
-			fEditor.setItems(newValues);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/StringComboBoxCellEditor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/StringComboBoxCellEditor.java
deleted file mode 100644
index a6536be..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/StringComboBoxCellEditor.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.properties;
-
-
-
-import org.eclipse.jface.viewers.ComboBoxCellEditor;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.sse.ui.internal.Logger;
-
-
-/**
- * An extended ComboBoxCellEditor that selects and returns Strings
- */
-
-public class StringComboBoxCellEditor extends ComboBoxCellEditor {
-	private boolean fSettingValue = false;
-
-	/**
-	 * 
-	 */
-	public StringComboBoxCellEditor() {
-		super();
-	}
-
-	/**
-	 * @param parent
-	 * @param items
-	 */
-	public StringComboBoxCellEditor(Composite parent, String[] items) {
-		super(parent, items);
-	}
-
-	/**
-	 * @param parent
-	 * @param items
-	 * @param style
-	 */
-	public StringComboBoxCellEditor(Composite parent, String[] items, int style) {
-		super(parent, items, style);
-	}
-
-	protected Object doGetValue() {
-		// otherwise limits to set of valid values
-		Object index = super.doGetValue();
-		int selection = -1;
-		if (index instanceof Integer) {
-			selection = ((Integer) index).intValue();
-		}
-		if (selection >= 0) {
-			return getItems()[selection];
-		}
-		else if (getControl() instanceof CCombo) {
-			// retrieve the actual text as the list of valid items doesn't
-			// contain the value
-			return ((CCombo) getControl()).getText();
-		}
-		return null;
-	}
-
-	protected void doSetValue(Object value) {
-		if (fSettingValue) {
-			return;
-		}
-		fSettingValue = true;
-		if (value instanceof Integer) {
-			super.doSetValue(value);
-		}
-		else {
-			String stringValue = value.toString();
-			int selection = -1;
-			for (int i = 0; i < getItems().length; i++) {
-				if (getItems()[i].equals(stringValue)) {
-					selection = i;
-				}
-			}
-			if (selection >= 0) {
-				super.doSetValue(new Integer(selection));
-			}
-			else {
-				super.doSetValue(new Integer(-1));
-				if ((getControl() instanceof CCombo) && !stringValue.equals(((CCombo) getControl()).getText())) {
-					// update the Text widget
-					((CCombo) getControl()).setText(stringValue);
-				}
-			}
-		}
-		fSettingValue = false;
-	}
-
-	public void setItems(String[] newItems) {
-		if ((getControl() == null) || getControl().isDisposed()) {
-			Logger.log(Logger.ERROR, "Attempted to update item list for disposed cell editor"); //$NON-NLS-1$
-			return;
-		}
-
-		// keep selection if possible
-		Object previousSelectedValue = getValue();
-		super.setItems(newItems);
-		if ((previousSelectedValue != null) && (getControl() instanceof CCombo)) {
-			for (int i = 0; i < newItems.length; i++) {
-				if (newItems[i].equals(previousSelectedValue)) {
-					setValue(previousSelectedValue);
-				}
-			}
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySource.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySource.java
deleted file mode 100644
index 2436d15..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySource.java
+++ /dev/null
@@ -1,840 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.properties;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Stack;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySheetEntry;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.IPropertySource2;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.views.properties.IPropertySourceExtension;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceHelper;
-import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapter;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * An IPropertySource implementation for a JFace viewer used to display
- * properties of DOM nodes.
- */
-public class XMLPropertySource implements IPropertySource, IPropertySourceExtension, IPropertySource2 {
-	protected final static String CATEGORY_ATTRIBUTES = XMLUIMessages.XMLPropertySourceAdapter_0;
-
-	private static final boolean fSetExpertFilter = false;
-
-	/**
-	 * derive categories from CMDataTypes; disabled until display strings can
-	 * be planned
-	 */
-	private final static boolean fShouldDeriveCategories = false;
-
-	private final static boolean fSortEnumeratedValues = true;
-
-	/**
-	 * Note: we want the default fCaseSensitive to be true, but, to avoid
-	 * meaningless double initialization, we leave default here, and set in
-	 * constructor only.
-	 */
-	private boolean fCaseSensitive;
-	private IPropertyDescriptor[] fDescriptors = null;
-	private Node fNode = null;
-
-	private Stack fValuesBeingSet = new Stack();
-
-	public XMLPropertySource(INodeNotifier target) {
-		super();
-		fNode = initNode(target);
-		fCaseSensitive = initCaseSensitive(fNode);
-
-	}
-
-	/** seperate method just to isolate error processing */
-	private Node initNode(INodeNotifier target) {
-		Node node = null;
-		if (target instanceof Node) {
-			node = (Node) target;
-		}
-		else {
-			throw new IllegalArgumentException("XMLPropertySource is only for Nodes"); //$NON-NLS-1$
-		}
-		return node;
-	}
-
-	private boolean initCaseSensitive(Node node) {
-		// almost all tags are case senstive, except that old HTML
-		boolean caseSensitive = true;
-		DocumentTypeAdapter adapter = null;
-		if (node instanceof IDOMNode) {
-			adapter = getDocTypeFromDOMNode(node);
-		}
-		if (adapter != null) {
-			caseSensitive = (adapter.getTagNameCase() == DocumentTypeAdapter.STRICT_CASE);
-		}
-		return caseSensitive;
-	}
-
-	/**
-	 * by "internal spec" the DOCTYPE adapter is only available from Document
-	 * Node
-	 * 
-	 * @return {@link DocumentTypeAdapter}
-	 */
-	private DocumentTypeAdapter getDocTypeFromDOMNode(Node node) {
-		DocumentTypeAdapter adapter = null;
-		Document ownerDocument = node.getOwnerDocument();
-		if (ownerDocument == null) {
-			// if ownerDocument is null, then fNode must be the Document Node
-			// [old, old comment]
-			// hmmmm, guess not. See
-			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=130233
-			// guess this is used for many INodeNotifiers, not just XML.
-			// (and DTD's use IDOMNode? ... that doesn't sound quite right
-			// ... but, maybe a separate issue).
-			if (node instanceof Document) {
-				ownerDocument = (Document) node;
-			}
-		}
-		if (ownerDocument != null) {
-			adapter = (DocumentTypeAdapter) ((INodeNotifier) ownerDocument).getAdapterFor(DocumentTypeAdapter.class);
-		}
-
-		return adapter;
-	}
-
-	private String[] _getValidFixedStrings(CMAttributeDeclaration attrDecl, CMDataType helper) {
-		String attributeName = DOMNamespaceHelper.computeName(attrDecl, fNode, null);
-		List values = new ArrayList(1);
-		String impliedValue = helper.getImpliedValue();
-		if (impliedValue != null) {
-			values.add(impliedValue);
-		}
-		boolean checkIfCurrentValueIsIncluded = ((fNode.getAttributes() != null) && (fNode.getAttributes().getNamedItem(attributeName) != null) && (fNode.getAttributes().getNamedItem(attributeName).getNodeValue() != null));
-		if (checkIfCurrentValueIsIncluded) {
-			String currentValue = null;
-			currentValue = fNode.getAttributes().getNamedItem(attributeName).getNodeValue();
-			if (!currentValue.equals(impliedValue)) {
-				values.add(currentValue);
-			}
-		}
-		String[] validStrings = new String[values.size()];
-		validStrings = (String[]) values.toArray(validStrings);
-		return validStrings;
-	}
-
-	private String[] _getValidStrings(CMAttributeDeclaration attrDecl, CMDataType valuesHelper) {
-		String attributeName = DOMNamespaceHelper.computeName(attrDecl, fNode, null);
-		List values = new ArrayList(1);
-		boolean currentValueKnown = false;
-		boolean checkIfCurrentValueIsKnown = ((fNode.getAttributes() != null) && (fNode.getAttributes().getNamedItem(attributeName) != null) && (fNode.getAttributes().getNamedItem(attributeName).getNodeValue() != null));
-		String currentValue = null;
-		if (checkIfCurrentValueIsKnown) {
-			currentValue = fNode.getAttributes().getNamedItem(attributeName).getNodeValue();
-		}
-
-		if ((valuesHelper.getImpliedValueKind() == CMDataType.IMPLIED_VALUE_FIXED) && (valuesHelper.getImpliedValue() != null)) {
-			// FIXED value
-			currentValueKnown = (currentValue != null) && valuesHelper.getImpliedValue().equals(currentValue);
-			values.add(valuesHelper.getImpliedValue());
-		}
-		else {
-			// ENUMERATED values
-			String[] valueStrings = null;
-			// valueStrings = valuesHelper.getEnumeratedValues();
-			ModelQuery modelQuery = ModelQueryUtil.getModelQuery(fNode.getOwnerDocument());
-			if ((modelQuery != null) && (fNode.getNodeType() == Node.ELEMENT_NODE)) {
-				valueStrings = modelQuery.getPossibleDataTypeValues((Element) fNode, attrDecl);
-			}
-			else {
-				valueStrings = attrDecl.getAttrType().getEnumeratedValues();
-			}
-			if (valueStrings != null) {
-				for (int i = 0; i < valueStrings.length; i++) {
-					if (checkIfCurrentValueIsKnown && valueStrings[i].equals(currentValue)) {
-						currentValueKnown = true;
-					}
-					values.add(valueStrings[i]);
-				}
-			}
-		}
-		if ((valuesHelper.getImpliedValueKind() != CMDataType.IMPLIED_VALUE_NONE) && (valuesHelper.getImpliedValue() != null)) {
-			if (!values.contains(valuesHelper.getImpliedValue())) {
-				values.add(valuesHelper.getImpliedValue());
-			}
-		}
-
-		if (checkIfCurrentValueIsKnown && !currentValueKnown && (currentValue != null) && (currentValue.length() > 0)) {
-			values.add(currentValue);
-		}
-		String[] validStrings = new String[values.size()];
-		validStrings = (String[]) values.toArray(validStrings);
-		return validStrings;
-	}
-
-	private IPropertyDescriptor createDefaultPropertyDescriptor(String attributeName) {
-		return createDefaultPropertyDescriptor(attributeName, false);
-	}
-
-	private IPropertyDescriptor createDefaultPropertyDescriptor(String attributeName, boolean hideOnFilter) {
-		// The descriptor class used here is also used in
-		// updatePropertyDescriptors()
-		TextPropertyDescriptor descriptor = new TextPropertyDescriptor(attributeName, attributeName);
-		descriptor.setCategory(getCategory(null));
-		descriptor.setDescription(attributeName);
-		if (hideOnFilter && fSetExpertFilter) {
-			descriptor.setFilterFlags(new String[]{IPropertySheetEntry.FILTER_ID_EXPERT});
-		}
-		return descriptor;
-	}
-
-	/**
-	 * Creates a property descriptor for an attribute with ENUMERATED values -
-	 * if the value does not exist, an editable combo box is returned - if the
-	 * value exists but is not one in the enumerated list of value, a combo
-	 * box featuring the current and correct values is returned - if the value
-	 * exists and it is a valid value, a combo box featuring the correct
-	 * values with the current one visible is returned
-	 */
-	private IPropertyDescriptor createEnumeratedPropertyDescriptor(CMAttributeDeclaration attrDecl, CMDataType valuesHelper) {
-		// the displayName MUST be set
-		String attrName = DOMNamespaceHelper.computeName(attrDecl, fNode, null);
-		EnumeratedStringPropertyDescriptor descriptor = new EnumeratedStringPropertyDescriptor(attrName, attrName, _getValidStrings(attrDecl, valuesHelper));
-		descriptor.setCategory(getCategory(attrDecl));
-		descriptor.setDescription(attrName);
-		if ((attrDecl.getUsage() != CMAttributeDeclaration.REQUIRED) && fSetExpertFilter) {
-			descriptor.setFilterFlags(new String[]{IPropertySheetEntry.FILTER_ID_EXPERT});
-		}
-		return descriptor;
-	}
-
-	/**
-	 * Creates a property descriptor for an attribute with a FIXED value - if
-	 * the value does not exist, an editable combo box is returned - if the
-	 * value exists but is not the fixed/default value, a combo box featuring
-	 * the current and correct value is returned - if the value exists and it
-	 * is the fixed/default value, no cell editor is provided "locking" the
-	 * value in
-	 */
-	private IPropertyDescriptor createFixedPropertyDescriptor(CMAttributeDeclaration attrDecl, CMDataType helper) {
-		// the displayName MUST be set
-		String attrName = DOMNamespaceHelper.computeName(attrDecl, fNode, null);
-		EnumeratedStringPropertyDescriptor descriptor = new EnumeratedStringPropertyDescriptor(attrName, attrName, _getValidFixedStrings(attrDecl, helper));
-		descriptor.setCategory(getCategory(attrDecl));
-		descriptor.setDescription(DOMNamespaceHelper.computeName(attrDecl, fNode, null));
-		return descriptor;
-	}
-
-	protected IPropertyDescriptor createPropertyDescriptor(CMAttributeDeclaration attrDecl) {
-		IPropertyDescriptor descriptor = null;
-		CMDataType attrType = attrDecl.getAttrType();
-
-		if (attrType != null) {
-			// handle declarations that provide FIXED/ENUMERATED values
-			if ((attrType.getEnumeratedValues() != null) && (attrType.getEnumeratedValues().length > 0)) {
-				descriptor = createEnumeratedPropertyDescriptor(attrDecl, attrType);
-			}
-			else if (((attrDecl.getUsage() == CMAttributeDeclaration.FIXED) || (attrType.getImpliedValueKind() == CMDataType.IMPLIED_VALUE_FIXED)) && (attrType.getImpliedValue() != null)) {
-				descriptor = createFixedPropertyDescriptor(attrDecl, attrType);
-			}
-			else {
-				// plain text
-				descriptor = createTextPropertyDescriptor(attrDecl);
-			}
-		}
-		else {
-			// no extra information given
-			descriptor = createTextPropertyDescriptor(attrDecl);
-		}
-		return descriptor;
-	}
-
-	/**
-	 * Returns the current collection of property descriptors.
-	 * 
-	 * @return all valid descriptors.
-	 */
-	private IPropertyDescriptor[] createPropertyDescriptors() {
-		CMNamedNodeMap attrMap = null;
-		CMElementDeclaration ed = getDeclaration();
-		if (ed != null) {
-			attrMap = ed.getAttributes();
-			CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attrMap);
-			List nodes = ModelQueryUtil.getModelQuery(fNode.getOwnerDocument()).getAvailableContent((Element) fNode, ed, ModelQuery.INCLUDE_ATTRIBUTES);
-			for (int k = 0; k < nodes.size(); k++) {
-				CMNode cmnode = (CMNode) nodes.get(k);
-				if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-					allAttributes.put(cmnode);
-				}
-			}
-			attrMap = allAttributes;
-		}
-
-		List descriptorList = new ArrayList();
-		List names = new ArrayList();
-		IPropertyDescriptor descriptor;
-
-		CMAttributeDeclaration attrDecl = null;
-
-		// add descriptors for existing attributes
-		NamedNodeMap attributes = fNode.getAttributes();
-		if (attributes != null) {
-			for (int i = 0; i < attributes.getLength(); i++) {
-				Attr attr = (Attr) attributes.item(i);
-				// if metainfo is present for this attribute, use the
-				// CMAttributeDeclaration to derive a descriptor
-				if (attrMap != null) {
-					String attrName = attr.getName();
-					if (fCaseSensitive) {
-						attrDecl = (CMAttributeDeclaration) attrMap.getNamedItem(attrName);
-					}
-					else {
-						attrDecl = null;
-						for (int j = 0; j < attrMap.getLength(); j++) {
-							if (!fCaseSensitive && attrMap.item(j).getNodeName().equalsIgnoreCase(attrName)) {
-								attrDecl = (CMAttributeDeclaration) attrMap.item(j);
-								break;
-							}
-						}
-					}
-				}
-				// be consistent: if there's metainfo, use *that* as the
-				// descriptor ID
-				descriptor = null;
-				if (attrDecl != null) {
-					String attrName = DOMNamespaceHelper.computeName(attrDecl, fNode, null);
-					if (!names.contains(attrName)) {
-						descriptor = createPropertyDescriptor(attrDecl);
-						if (descriptor != null)
-							names.add(attrName);
-					}
-				}
-				else {
-					if (!names.contains(attr.getName())) {
-						descriptor = createDefaultPropertyDescriptor(attr.getName());
-						if (descriptor != null)
-							names.add(attr.getName());
-					}
-				}
-				if (descriptor != null) {
-					descriptorList.add(descriptor);
-				}
-			}
-		}
-
-		// add descriptors from the metainfo that are not yet listed
-		if (attrMap != null) {
-			for (int i = 0; i < attrMap.getLength(); i++) {
-				attrDecl = (CMAttributeDeclaration) attrMap.item(i);
-				String attrName = DOMNamespaceHelper.computeName(attrDecl, fNode, null);
-				if (!names.contains(attrName)) {
-					IPropertyDescriptor holdDescriptor = createPropertyDescriptor(attrDecl);
-					if (holdDescriptor != null) {
-						names.add(attrName);
-						descriptorList.add(holdDescriptor);
-					}
-				}
-			}
-		}
-
-		// add MQE-based descriptors
-		if (ed != null && fNode.getNodeType() == Node.ELEMENT_NODE) {
-			List nodes = ModelQueryUtil.getModelQuery(fNode.getOwnerDocument()).getAvailableContent((Element) fNode, ed, ModelQuery.INCLUDE_ATTRIBUTES);
-			for (int i = 0; i < nodes.size(); i++) {
-				CMNode node = (CMNode) nodes.get(i);
-				if (node.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-					attrDecl = (CMAttributeDeclaration) node;
-					String attrName = DOMNamespaceHelper.computeName(attrDecl, fNode, null);
-					if (!names.contains(attrName)) {
-						IPropertyDescriptor holdDescriptor = createPropertyDescriptor(attrDecl);
-						if (holdDescriptor != null) {
-							names.add(attrName);
-							descriptorList.add(holdDescriptor);
-						}
-					}
-				}
-			}
-		}
-
-
-		IPropertyDescriptor[] descriptors = new IPropertyDescriptor[descriptorList.size()];
-		for (int i = 0; i < descriptors.length; i++) {
-			descriptors[i] = (IPropertyDescriptor) descriptorList.get(i);
-		}
-		return descriptors;
-	}
-
-	private IPropertyDescriptor createTextPropertyDescriptor(CMAttributeDeclaration attrDecl) {
-		String attrName = DOMNamespaceHelper.computeName(attrDecl, fNode, null);
-		TextPropertyDescriptor descriptor = new TextPropertyDescriptor(attrName, attrName);
-		descriptor.setCategory(getCategory(attrDecl));
-		descriptor.setDescription(attrName);
-		if ((attrDecl.getUsage() != CMAttributeDeclaration.REQUIRED) && fSetExpertFilter) {
-			descriptor.setFilterFlags(new String[]{IPropertySheetEntry.FILTER_ID_EXPERT});
-		}
-		return descriptor;
-	}
-
-	private String getCategory(CMAttributeDeclaration attrDecl) {
-		if (attrDecl != null) {
-			if (attrDecl.supports("category")) { //$NON-NLS-1$
-				return (String) attrDecl.getProperty("category"); //$NON-NLS-1$
-			}
-			if (fShouldDeriveCategories && (attrDecl.getAttrType() != null) && (attrDecl.getAttrType().getNodeName() != null) && (attrDecl.getAttrType().getNodeName().length() > 0)) {
-				return attrDecl.getAttrType().getDataTypeName();
-			}
-		}
-		return CATEGORY_ATTRIBUTES;
-	}
-
-	private CMElementDeclaration getDeclaration() {
-		if ((fNode == null) || (fNode.getNodeType() != Node.ELEMENT_NODE)) {
-			return null;
-		}
-		ModelQuery modelQuery = ModelQueryUtil.getModelQuery(fNode.getOwnerDocument());
-		if (modelQuery != null) {
-			return modelQuery.getCMElementDeclaration((Element) fNode);
-		}
-		return null;
-	}
-
-	private Display getDisplay() {
-
-		return PlatformUI.getWorkbench().getDisplay();
-	}
-
-	/**
-	 * Returns a value for this Node that can be editted in a property sheet.
-	 * 
-	 * @return a value that can be editted
-	 */
-	public Object getEditableValue() {
-		return null;
-	}
-
-	/**
-	 * Returns the current collection of property descriptors.
-	 * 
-	 * @return all valid descriptors.
-	 */
-	public final IPropertyDescriptor[] getPropertyDescriptors() {
-		if ((fDescriptors == null) || (fDescriptors.length == 0)) {
-			fDescriptors = createPropertyDescriptors();
-		}
-		else {
-			updatePropertyDescriptors();
-		}
-		return fDescriptors;
-	}
-
-	/**
-	 * Returns the current value for the named property.
-	 * 
-	 */
-	public Object getPropertyValue(Object nameObject) {
-		String name = nameObject.toString();
-		String returnedValue = null;
-		NamedNodeMap attrMap = fNode.getAttributes();
-		if (attrMap != null) {
-			Node attribute = attrMap.getNamedItem(name);
-			if (attribute != null) {
-				if (attribute instanceof IDOMNode) {
-					returnedValue = ((IDOMNode) attribute).getValueSource();
-				}
-				else {
-					returnedValue = attribute.getNodeValue();
-				}
-			}
-		}
-		if (returnedValue == null) {
-			returnedValue = ""; //$NON-NLS-1$
-		}
-		return returnedValue;
-	}
-
-	private String[] getValidValues(CMAttributeDeclaration attrDecl) {
-		if (attrDecl == null) {
-			return new String[0];
-		}
-
-		String[] validValues = null;
-		CMDataType attrType = attrDecl.getAttrType();
-		if (attrType != null) {
-			validValues = _getValidStrings(attrDecl, attrType);
-			if (fSortEnumeratedValues) {
-				Arrays.sort(validValues);
-			}
-		}
-		if (validValues == null) {
-			validValues = new String[0];
-		}
-		return validValues;
-	}
-
-	public boolean isPropertyRemovable(Object id) {
-		return true;
-	}
-
-	public boolean isPropertyResettable(Object id) {
-		boolean resettable = false;
-		String property = id.toString();
-		CMNamedNodeMap attrDecls = null;
-
-		CMElementDeclaration ed = getDeclaration();
-		if (ed != null) {
-			attrDecls = ed.getAttributes();
-			CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attrDecls);
-			List nodes = ModelQueryUtil.getModelQuery(fNode.getOwnerDocument()).getAvailableContent((Element) fNode, ed, ModelQuery.INCLUDE_ATTRIBUTES);
-			for (int k = 0; k < nodes.size(); k++) {
-				CMNode cmnode = (CMNode) nodes.get(k);
-				if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-					allAttributes.put(cmnode);
-				}
-			}
-			attrDecls = allAttributes;
-		}
-
-		if (attrDecls != null) {
-			CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) attrDecls.getNamedItem(property);
-			if (attrDecl != null) {
-				if (attrDecl.getAttrType() != null) {
-					CMDataType helper = attrDecl.getAttrType();
-					if ((helper.getImpliedValueKind() != CMDataType.IMPLIED_VALUE_NONE) && (helper.getImpliedValue() != null)) {
-						resettable = true;
-					}
-				}
-			}
-		}
-		return resettable;
-	}
-
-	/**
-	 * Returns whether the property value has changed from the default.
-	 * 
-	 * @return <code>true</code> if the value of the specified property has
-	 *         changed from its original default value; <code>false</code>
-	 *         otherwise.
-	 */
-	public boolean isPropertySet(Object propertyObject) {
-		String property = propertyObject.toString();
-
-		NamedNodeMap attrMap = fNode.getAttributes();
-		if (attrMap != null) {
-			return attrMap.getNamedItem(property) != null;
-		}
-		return false;
-	}
-
-	/**
-	 * Remove the given attribute from the Node
-	 * 
-	 * @param propertyObject
-	 */
-	public void removeProperty(Object propertyObject) {
-		NamedNodeMap attrMap = fNode.getAttributes();
-		if (attrMap != null) {
-			Node attribute = attrMap.getNamedItem(propertyObject.toString());
-			if (attribute != null) {
-				try {
-					attrMap.removeNamedItem(propertyObject.toString());
-				}
-				catch (DOMException e) {
-					if (e.code != DOMException.INVALID_MODIFICATION_ERR) {
-						Logger.logException(e);
-					}
-				}
-			}
-		}
-	}
-
-	/**
-	 * Resets the specified property's value to its default value.
-	 * 
-	 */
-	public void resetPropertyValue(Object propertyObject) {
-		String property = propertyObject.toString();
-		CMNamedNodeMap attrDecls = null;
-
-		CMElementDeclaration ed = getDeclaration();
-		if (ed != null) {
-			attrDecls = ed.getAttributes();
-			CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attrDecls);
-			List nodes = ModelQueryUtil.getModelQuery(fNode.getOwnerDocument()).getAvailableContent((Element) fNode, ed, ModelQuery.INCLUDE_ATTRIBUTES);
-			for (int k = 0; k < nodes.size(); k++) {
-				CMNode cmnode = (CMNode) nodes.get(k);
-				if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-					allAttributes.put(cmnode);
-				}
-			}
-			attrDecls = allAttributes;
-		}
-
-		NamedNodeMap attrMap = fNode.getAttributes();
-		if (attrDecls != null) {
-			CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) attrDecls.getNamedItem(property);
-			String defValue = null;
-			if (attrDecl != null) {
-				if (attrDecl.getAttrType() != null) {
-					CMDataType helper = attrDecl.getAttrType();
-					if ((helper.getImpliedValueKind() != CMDataType.IMPLIED_VALUE_NONE) && (helper.getImpliedValue() != null)) {
-						defValue = helper.getImpliedValue();
-					}
-				}
-			}
-			if ((defValue != null) && (defValue.length() > 0)) {
-				((Attr) attrMap.getNamedItem(property)).setValue(defValue);
-			}
-			else {
-				attrMap.removeNamedItem(property);
-			}
-		}
-		else {
-			attrMap.removeNamedItem(property);
-		}
-	}
-
-	/**
-	 * Sets the named property to the given value.
-	 * 
-	 */
-	public void setPropertyValue(Object nameObject, Object value) {
-		// Avoid cycling - can happen if a closing cell editor causes a
-		// refresh
-		// on the PropertySheet page and the setInput again asks the editor to
-		// close; besides, why apply the same value twice?
-		if (!fValuesBeingSet.isEmpty() && (fValuesBeingSet.peek() == nameObject)) {
-			return;
-		}
-		fValuesBeingSet.push(nameObject);
-		String name = nameObject.toString();
-		String valueString = null;
-		if (value != null) {
-			valueString = value.toString();
-		}
-		NamedNodeMap attrMap = fNode.getAttributes();
-		try {
-			if (attrMap != null) {
-				Attr attr = (Attr) attrMap.getNamedItem(name);
-				if (attr != null) {
-					// EXISTING VALUE
-					// potential out of control loop if updating the value
-					// triggers a viewer update, forcing the
-					// active cell editor to save its value and causing the
-					// loop to continue
-					if ((attr.getValue() == null) || !attr.getValue().equals(valueString)) {
-						if (attr instanceof IDOMNode) {
-							((IDOMNode) attr).setValueSource(valueString);
-						}
-						else {
-							attr.setValue(valueString);
-						}
-					}
-				}
-				else {
-					// NEW(?) value
-					if (value != null) { // never create an empty attribute
-						Attr newAttr = fNode.getOwnerDocument().createAttribute(name);
-						if (newAttr instanceof IDOMNode) {
-							((IDOMNode) newAttr).setValueSource(valueString);
-						}
-						else {
-							newAttr.setValue(valueString);
-						}
-						attrMap.setNamedItem(newAttr);
-					}
-				}
-			}
-			else {
-				if (fNode instanceof Element) {
-					((Element) fNode).setAttribute(name, valueString);
-				}
-			}
-		}
-		catch (DOMException e) {
-			Display d = getDisplay();
-			if (d != null) {
-				d.beep();
-			}
-		}
-		fValuesBeingSet.pop();
-	}
-
-	protected void updatePropertyDescriptors() {
-		if ((fDescriptors == null) || (fDescriptors.length == 0)) {
-			// Nothing to update
-			return;
-		}
-
-		// List of all names encountered in the tag and defined by the element
-		List declaredNames = new ArrayList();
-		// New descriptor list that will become fDescriptors after all
-		// processing is done
-		List descriptors = new ArrayList();
-		// Names of the descriptors in the above List
-		List descriptorNames = new ArrayList();
-
-		// Update any descriptors derived from the metainfo
-		CMElementDeclaration ed = getDeclaration();
-		CMNamedNodeMap attrMap = null;
-		if (ed != null) {
-			attrMap = ed.getAttributes();
-			CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attrMap);
-			List nodes = ModelQueryUtil.getModelQuery(fNode.getOwnerDocument()).getAvailableContent((Element) fNode, ed, ModelQuery.INCLUDE_ATTRIBUTES);
-			for (int k = 0; k < nodes.size(); k++) {
-				CMNode cmnode = (CMNode) nodes.get(k);
-				if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-					allAttributes.put(cmnode);
-				}
-			}
-			attrMap = allAttributes;
-		}
-		// Update exiting descriptors; not added to the final list here
-		if (attrMap != null) {
-			// Update existing descriptor types based on metainfo
-			CMAttributeDeclaration attrDecl = null;
-			for (int i = 0; i < attrMap.getLength(); i++) {
-				attrDecl = (CMAttributeDeclaration) attrMap.item(i);
-				String attrName = DOMNamespaceHelper.computeName(attrDecl, fNode, null);
-				if (!declaredNames.contains(attrName)) {
-					declaredNames.add(attrName);
-				}
-				for (int j = 0; j < fDescriptors.length; j++) {
-					boolean sameName = (fCaseSensitive && fDescriptors[j].getId().equals(attrDecl.getNodeName())) || (!fCaseSensitive && attrDecl.getNodeName().equals(fDescriptors[j].getId().toString()));
-					if (sameName) {
-						String[] validValues = getValidValues(attrDecl);
-						// Update the descriptor for this
-						// CMAttributeDeclaration (only enumerated values get
-						// updated for now)
-						if (fDescriptors[j] instanceof EnumeratedStringPropertyDescriptor) {
-							((EnumeratedStringPropertyDescriptor) fDescriptors[j]).updateValues(validValues);
-						}
-						// Replace with better descriptor
-						else if ((validValues != null) && (validValues.length > 0)) {
-							fDescriptors[j] = createPropertyDescriptor(attrDecl);
-						}
-					}
-				}
-			}
-		}
-		else {
-			// Update existing descriptors based on not having any metainfo
-			for (int j = 0; j < fDescriptors.length; j++) {
-				// Replace with basic descriptor
-				if (!(fDescriptors[j] instanceof TextPropertyDescriptor)) {
-					fDescriptors[j] = createDefaultPropertyDescriptor((String) fDescriptors[j].getId());
-				}
-			}
-		}
-
-		NamedNodeMap attributes = fNode.getAttributes();
-
-		// Remove descriptors for attributes that aren't present AND aren't
-		// known through metainfo,
-		// do this by only reusing existing descriptors for attributes that
-		// are present or declared
-		for (int i = 0; i < fDescriptors.length; i++) {
-			if (fDescriptors[i] != null) {
-				String descriptorName = fDescriptors[i].getId().toString();
-				if ((declaredNames.contains(descriptorName) || (attributes.getNamedItem(descriptorName) != null)) && !descriptorNames.contains(descriptorName)) {
-					descriptorNames.add(descriptorName);
-					descriptors.add(fDescriptors[i]);
-				}
-			}
-		}
-
-		// Add descriptors for declared attributes that don't already have one
-		if (attrMap != null) {
-			// Update existing descriptor types based on metainfo
-			CMAttributeDeclaration attrDecl = null;
-			for (int i = 0; i < attrMap.getLength(); i++) {
-				attrDecl = (CMAttributeDeclaration) attrMap.item(i);
-				String attrName = DOMNamespaceHelper.computeName(attrDecl, fNode, null);
-				if (fCaseSensitive) {
-					if (!descriptorNames.contains(attrName)) {
-						IPropertyDescriptor descriptor = createPropertyDescriptor(attrDecl);
-						if (descriptor != null) {
-							descriptorNames.add(attrName);
-							descriptors.add(descriptor);
-						}
-					}
-				}
-				else {
-					boolean exists = false;
-					for (int j = 0; j < descriptorNames.size(); j++) {
-						exists = (descriptorNames.get(j).toString().equalsIgnoreCase(attrName)) || exists;
-					}
-					if (!exists) {
-						descriptorNames.add(attrName);
-						IPropertyDescriptor descriptor = createPropertyDescriptor(attrDecl);
-						if (descriptor != null) {
-							descriptorNames.add(attrName);
-							descriptors.add(descriptor);
-						}
-					}
-				}
-			}
-		}
-
-		// Add descriptors for existing attributes that don't already have one
-		if (attributes != null) {
-			for (int i = 0; i < attributes.getLength(); i++) {
-				Attr attr = (Attr) attributes.item(i);
-				String attrName = attr.getName();
-				if (fCaseSensitive) {
-					if (!descriptorNames.contains(attrName)) {
-						descriptorNames.add(attrName);
-						descriptors.add(createDefaultPropertyDescriptor(attrName));
-					}
-				}
-				else {
-					boolean exists = false;
-					for (int j = 0; j < descriptorNames.size(); j++) {
-						exists = (descriptorNames.get(j).toString().equalsIgnoreCase(attrName)) || exists;
-					}
-					if (!exists) {
-						descriptorNames.add(attrName);
-						descriptors.add(createDefaultPropertyDescriptor(attrName));
-					}
-				}
-			}
-		}
-
-		// Update fDescriptors
-		IPropertyDescriptor[] newDescriptors = new IPropertyDescriptor[descriptors.size()];
-		for (int i = 0; i < newDescriptors.length; i++) {
-			newDescriptors[i] = (IPropertyDescriptor) descriptors.get(i);
-		}
-		fDescriptors = newDescriptors;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/provisional/IDOMSourceEditingTextTools.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/provisional/IDOMSourceEditingTextTools.java
deleted file mode 100644
index a018b08..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/provisional/IDOMSourceEditingTextTools.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.provisional;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
-import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.NodeLocation;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-public interface IDOMSourceEditingTextTools extends ISourceEditingTextTools {
-	/**
-	 * Returns a W3C DOM document
-	 * 
-	 * @return Document object or <code>null</code> if corresponding
-	 *         document does not exist
-	 */
-	Document getDOMDocument();
-
-	/**
-	 * Returns the W3C DOM Node at the given offset
-	 * 
-	 * @param offset
-	 *            the offset within the IDocument
-	 * @return a Node at that location, if one is present
-	 * 
-	 * @throws BadLocationException
-	 *             for invalid offsets
-	 */
-	Node getNode(int offset) throws BadLocationException;
-
-	/**
-	 * Returns a NodeLocation object describing the position information of
-	 * the Node's start and end tags.
-	 * 
-	 * @param node
-	 * @return The NodeLocation for this Node, null for unsupported Node
-	 *         instances.
-	 */
-	NodeLocation getNodeLocation(Node node);
-
-	/**
-	 * Returns the current server-side page language for the Document of the
-	 * given Node.
-	 * 
-	 * @return The server-side page language for this nodem null for Nodes
-	 *         within unsupported Documents.
-	 */
-	String getPageLanguage(Node node);
-
-	/**
-	 * Returns start offset of given Node.
-	 * 
-	 * @param node
-	 *            w3c <code>Node</code> object to check
-	 * @return the start offset or -1 for unsupported Nodes
-	 */
-	int getStartOffset(Node node);
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/provisional/XMLSourceEditingTextTools.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/provisional/XMLSourceEditingTextTools.java
deleted file mode 100644
index 63a337e..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/provisional/XMLSourceEditingTextTools.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.provisional;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
-import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.NodeLocation;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMText;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- * Implements ISourceEditingTextTools interface
- */
-public class XMLSourceEditingTextTools implements IDOMSourceEditingTextTools, INodeAdapter {
-
-	protected class NodeLocationImpl implements NodeLocation {
-		private IDOMNode node;
-
-		public NodeLocationImpl(IDOMNode xmlnode) {
-			super();
-			node = xmlnode;
-		}
-
-		public int getEndTagEndOffset() {
-			if (node.getEndStructuredDocumentRegion() != null) {
-				return node.getEndStructuredDocumentRegion().getEndOffset();
-			}
-			return -1;
-		}
-
-		public int getEndTagStartOffset() {
-			if (node.getEndStructuredDocumentRegion() != null) {
-				return node.getEndStructuredDocumentRegion().getStartOffset();
-			}
-			return -1;
-		}
-
-		public int getStartTagEndOffset() {
-			if (node.getStartStructuredDocumentRegion() != null) {
-				return node.getStartStructuredDocumentRegion().getEndOffset();
-			}
-			return -1;
-		}
-
-		public int getStartTagStartOffset() {
-			if (node.getStartStructuredDocumentRegion() != null) {
-				return node.getStartStructuredDocumentRegion().getStartOffset();
-			}
-			return -1;
-		}
-	}
-
-	StructuredTextEditor fTextEditor = null;
-
-	public int getCaretOffset() {
-		StructuredTextViewer stv = fTextEditor.getTextViewer();
-		if ((stv != null) && (stv.getTextWidget() != null) && !stv.getTextWidget().isDisposed()) {
-			return stv.widgetOffset2ModelOffset(stv.getTextWidget().getCaretOffset());
-		}
-		return 0;
-	}
-
-	public IDocument getDocument() {
-		return fTextEditor.getDocumentProvider().getDocument(fTextEditor.getEditorInput());
-	}
-
-	public Document getDOMDocument() {
-		return (Document) fTextEditor.getModel().getAdapter(Document.class);
-	}
-
-	/*
-	 * If similar function is needed, composite it around the text editor's
-	 * instance. Removed also because it returns an alread-released model
-	 * 
-	 * public Document getDOMDocument(IMarker marker) { if (marker == null)
-	 * return null;
-	 * 
-	 * IResource res = marker.getResource(); if (res == null || !(res
-	 * instanceof IFile)) return null;
-	 * 
-	 * IModelManager mm = StructuredModelManager.getModelManager();
-	 * IStructuredModel model = null; try { model =
-	 * mm.getExistingModelForRead((IFile) res); if (model == null || !(model
-	 * instanceof IDOMModel)) return null;
-	 * 
-	 * return ((IDOMModel) model).getDocument(); } finally { if (model !=
-	 * null) model.releaseFromRead(); } }
-	 */
-
-	public IEditorPart getEditorPart() {
-		return fTextEditor.getEditorPart();
-	}
-
-	public Node getNode(int offset) throws BadLocationException {
-		Node node = null;
-		if ((0 <= offset) && (offset <= getDocument().getLength())) {
-			node = (Node) fTextEditor.getModel().getIndexedRegion(offset);
-		}
-		else {
-			throw new BadLocationException();
-		}
-		return node;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.extensions.SourceEditingTextTools#getNodeLocation(org.w3c.dom.Node)
-	 */
-	public NodeLocation getNodeLocation(Node node) {
-		if ((node.getNodeType() == Node.ELEMENT_NODE) && (node instanceof IDOMNode)) {
-			return new NodeLocationImpl((IDOMNode) node);
-		}
-		return null;
-	}
-
-	public String getPageLanguage(Node node) {
-		return ""; //$NON-NLS-1$
-	}
-
-	public ITextSelection getSelection() {
-		return (ITextSelection) fTextEditor.getSelectionProvider().getSelection();
-	}
-
-	/**
-	 * IExtendedMarkupEditor method
-	 */
-	// public List getSelectedNodes() {
-	// ViewerSelectionManager vsm = getViewerSelectionManager();
-	// return (vsm != null) ? vsm.getSelectedNodes() : null;
-	// }
-	public int getStartOffset(Node node) {
-		if ((node == null) || !(node instanceof IDOMText)) {
-			return -1;
-		}
-
-		IStructuredDocumentRegion fnode = ((IDOMText) node).getFirstStructuredDocumentRegion();
-		return fnode.getStartOffset();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.core.core.INodeAdapter#isAdapterForType(java.lang.Object)
-	 */
-	public boolean isAdapterForType(Object type) {
-		return ISourceEditingTextTools.class.equals(type);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.core.core.INodeAdapter#notifyChanged(org.eclipse.wst.sse.core.core.INodeNotifier,
-	 *      int, java.lang.Object, java.lang.Object, java.lang.Object, int)
-	 */
-	public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
-	}
-
-	public void setTextEditor(StructuredTextEditor editor) {
-		fTextEditor = editor;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/registry/AdapterFactoryProviderForXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/registry/AdapterFactoryProviderForXML.java
deleted file mode 100644
index 3794a17..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/registry/AdapterFactoryProviderForXML.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.registry;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IDocumentTypeHandler;
-import org.eclipse.wst.sse.core.internal.model.FactoryRegistry;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.util.Assert;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryProvider;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelhandler.ModelHandlerForXML;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.ui.internal.DOMObserver;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeAdapterFactory;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLUIPreferenceNames;
-
-/**
- * 
- */
-public class AdapterFactoryProviderForXML implements AdapterFactoryProvider {
-
-	/*
-	 * @see AdapterFactoryProvider#addAdapterFactories(IStructuredModel)
-	 */
-	public void addAdapterFactories(IStructuredModel structuredModel) {
-
-		// add the normal content based factories to model's registry
-		addContentBasedFactories(structuredModel);
-	}
-
-	protected void addContentBasedFactories(IStructuredModel structuredModel) {
-		FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
-		Assert.isNotNull(factoryRegistry, "Program Error: client caller must ensure model has factory registry"); //$NON-NLS-1$
-		INodeAdapterFactory factory = null;
-
-		factory = factoryRegistry.getFactoryFor(IJFaceNodeAdapter.class);
-		if (factory == null) {
-			factory = new JFaceNodeAdapterFactory();
-			factoryRegistry.addFactory(factory);
-		}
-
-		// cs... added for inferred grammar support
-		//
-		if (structuredModel != null) {
-			ModelQuery modelQuery = ModelQueryUtil.getModelQuery(structuredModel);
-			if (modelQuery != null) {
-				CMDocumentManager documentManager = modelQuery.getCMDocumentManager();
-				if (documentManager != null) {
-					IPreferenceStore store = XMLUIPlugin.getDefault().getPreferenceStore();
-					boolean useInferredGrammar = (store != null) ? store.getBoolean(XMLUIPreferenceNames.USE_INFERRED_GRAMMAR) : true;
-
-					documentManager.setPropertyEnabled(CMDocumentManager.PROPERTY_ASYNC_LOAD, true);
-					documentManager.setPropertyEnabled(CMDocumentManager.PROPERTY_AUTO_LOAD, false);
-					documentManager.setPropertyEnabled(CMDocumentManager.PROPERTY_USE_CACHED_RESOLVED_URI, true);
-					DOMObserver domObserver = new DOMObserver(structuredModel);
-					domObserver.setGrammarInferenceEnabled(useInferredGrammar);
-					domObserver.init();
-				}
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryProvider#isFor(org.eclipse.wst.sse.core.internal.ltk.modelhandler.IDocumentTypeHandler)
-	 */
-	public boolean isFor(IDocumentTypeHandler contentTypeDescription) {
-		return (contentTypeDescription instanceof ModelHandlerForXML);
-	}
-
-	public void reinitializeFactories(IStructuredModel structuredModel) {
-		// nothing to do, since no embedded type
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/search/XMLFindOccurrencesActionDelegate.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/search/XMLFindOccurrencesActionDelegate.java
deleted file mode 100644
index 84f2ec9..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/search/XMLFindOccurrencesActionDelegate.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.search;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.sse.ui.internal.search.FindOccurrencesActionDelegate;
-
-/**
- * Sets up FindOccurrencesActionDelegate for xml find occurrences processors
- */
-public class XMLFindOccurrencesActionDelegate extends FindOccurrencesActionDelegate {
-	private List fProcessors;
-
-	protected List getProcessors() {
-		if (fProcessors == null) {
-			fProcessors = new ArrayList();
-			XMLFindOccurrencesProcessor htmlProcessor = new XMLFindOccurrencesProcessor();
-			fProcessors.add(htmlProcessor);
-		}
-		return fProcessors;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/search/XMLFindOccurrencesProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/search/XMLFindOccurrencesProcessor.java
deleted file mode 100644
index 6b12fec..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/search/XMLFindOccurrencesProcessor.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.search;
-
-import org.eclipse.wst.sse.ui.internal.search.FindOccurrencesProcessor;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.core.text.IXMLPartitions;
-
-/**
- * Configures a FindOccurrencesProcessor with XML partitions and regions
- */
-public class XMLFindOccurrencesProcessor extends FindOccurrencesProcessor {
-
-	protected String[] getPartitionTypes() {
-		return new String[]{IXMLPartitions.XML_DEFAULT};
-	}
-
-	protected String[] getRegionTypes() {
-		return new String[]{DOMRegionContext.XML_TAG_NAME, DOMRegionContext.XML_TAG_ATTRIBUTE_NAME, DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE};
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectEnclosingXMLActionDelegate.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectEnclosingXMLActionDelegate.java
deleted file mode 100644
index 258be52..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectEnclosingXMLActionDelegate.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.selection;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.selection.StructuredSelectActionDelegate;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.w3c.dom.Node;
-
-public class StructuredSelectEnclosingXMLActionDelegate extends StructuredSelectActionDelegate {
-
-	protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
-		IndexedRegion indexedRegion = null;
-
-		indexedRegion = getIndexedRegion(document, textSelection.getOffset());
-
-		return indexedRegion;
-	}
-
-	protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
-		Region newRegion = null;
-		if (indexedRegion instanceof Node) {
-			Node cursorNode = (Node) indexedRegion;
-
-			// use parent node for empty text node
-			if ((cursorNode.getNodeType() == Node.TEXT_NODE) && (cursorNode.getNodeValue().trim().length() == 0)) {
-				cursorNode = cursorNode.getParentNode();
-
-				if (cursorNode instanceof IndexedRegion) {
-					indexedRegion = (IndexedRegion) cursorNode;
-				}
-			}
-
-			Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
-
-			if ((cursorNodeRegion.getOffset() >= textSelection.getOffset()) && (cursorNodeRegion.getOffset() <= textSelection.getOffset() + textSelection.getLength()) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= textSelection.getOffset()) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= textSelection.getOffset() + textSelection.getLength())) {
-				Node newNode = cursorNode.getParentNode();
-
-				if (newNode instanceof IndexedRegion) {
-					IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
-					newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
-				}
-			}
-			else {
-				newRegion = cursorNodeRegion;
-			}
-		}
-		return newRegion;
-	}
-
-	public void init(IAction action) {
-		if (action != null) {
-			action.setText(XMLUIMessages.StructureSelectEnclosing_label);
-			action.setToolTipText(XMLUIMessages.StructureSelectEnclosing_tooltip);
-			action.setDescription(XMLUIMessages.StructureSelectEnclosing_description);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectNextXMLActionDelegate.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectNextXMLActionDelegate.java
deleted file mode 100644
index f5088c3..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectNextXMLActionDelegate.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.selection;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.selection.StructuredSelectActionDelegate;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.w3c.dom.Node;
-
-public class StructuredSelectNextXMLActionDelegate extends StructuredSelectActionDelegate {
-
-	protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
-		int offset = textSelection.getOffset() + textSelection.getLength() - 1;
-		if (offset < 0) {
-			offset = 0;
-		}
-
-		IndexedRegion indexedRegion = null;
-
-		indexedRegion = getIndexedRegion(document, offset);
-
-		return indexedRegion;
-	}
-
-	protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
-		Region newRegion = null;
-		if (indexedRegion instanceof Node) {
-			Node cursorNode = (Node) indexedRegion;
-
-			// use parent node for empty text node
-			if ((cursorNode.getNodeType() == Node.TEXT_NODE) && (cursorNode.getNodeValue().trim().length() == 0)) {
-				cursorNode = cursorNode.getParentNode();
-
-				if (cursorNode instanceof IndexedRegion) {
-					indexedRegion = (IndexedRegion) cursorNode;
-				}
-			}
-
-			Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
-			int currentOffset = textSelection.getOffset();
-			int currentEndOffset = currentOffset + textSelection.getLength();
-			if ((cursorNodeRegion.getOffset() >= currentOffset) && (cursorNodeRegion.getOffset() <= currentEndOffset) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= currentOffset) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= currentEndOffset)) {
-				newRegion = getNewSelectionRegion2(indexedRegion, textSelection);
-			}
-			else {
-				newRegion = cursorNodeRegion;
-			}
-		}
-		return newRegion;
-	}
-
-	public void init(IAction action) {
-		if (action != null) {
-			action.setText(XMLUIMessages.StructureSelectNext_label);
-			action.setToolTipText(XMLUIMessages.StructureSelectNext_tooltip);
-			action.setDescription(XMLUIMessages.StructureSelectNext_description);
-		}
-	}
-
-	/**
-	 * This method was separated out from getNewSelectionRegion2 because the
-	 * code in here is allowed to be called recursively.
-	 * 
-	 * @param indexedRegion
-	 * @param textSelection
-	 * @return new region to select or null if none
-	 */
-	private Region getNewSelectionRegion2(IndexedRegion indexedRegion, ITextSelection textSelection) {
-		Region newRegion = null;
-		if (indexedRegion instanceof Node) {
-			Node node = (Node) indexedRegion;
-			Node newNode = node.getNextSibling();
-			if (newNode == null) {
-				newNode = node.getParentNode();
-
-				if (newNode instanceof IndexedRegion) {
-					IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
-					newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
-				}
-			}
-			else {
-				if (newNode instanceof IndexedRegion) {
-					IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
-					newRegion = new Region(textSelection.getOffset(), newIndexedRegion.getEndOffset() - textSelection.getOffset());
-
-					if (newNode.getNodeType() == Node.TEXT_NODE) {
-						newRegion = getNewSelectionRegion2(newIndexedRegion, new TextSelection(newRegion.getOffset(), newRegion.getLength()));
-					}
-				}
-			}
-		}
-		return newRegion;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectPreviousXMLActionDelegate.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectPreviousXMLActionDelegate.java
deleted file mode 100644
index 8939c32..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectPreviousXMLActionDelegate.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.selection;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.selection.StructuredSelectActionDelegate;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.w3c.dom.Node;
-
-public class StructuredSelectPreviousXMLActionDelegate extends StructuredSelectActionDelegate {
-
-	protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
-		IndexedRegion indexedRegion = null;
-
-		indexedRegion = getIndexedRegion(document, textSelection.getOffset());
-
-		return indexedRegion;
-	}
-
-	protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
-		Region newRegion = null;
-		if (indexedRegion instanceof Node) {
-			Node cursorNode = (Node) indexedRegion;
-
-			// use parent node for empty text node
-			if ((cursorNode.getNodeType() == Node.TEXT_NODE) && (cursorNode.getNodeValue().trim().length() == 0)) {
-				cursorNode = cursorNode.getParentNode();
-
-				if (cursorNode instanceof IndexedRegion) {
-					indexedRegion = (IndexedRegion) cursorNode;
-				}
-			}
-
-			Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
-
-			if ((cursorNodeRegion.getOffset() >= textSelection.getOffset()) && (cursorNodeRegion.getOffset() <= textSelection.getOffset() + textSelection.getLength()) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= textSelection.getOffset()) && (cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= textSelection.getOffset() + textSelection.getLength())) {
-				Node newNode = cursorNode.getPreviousSibling();
-				if (newNode == null) {
-					newNode = cursorNode.getParentNode();
-
-					if (newNode instanceof IndexedRegion) {
-						IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
-						newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
-					}
-				}
-				else {
-					if (newNode instanceof IndexedRegion) {
-						IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
-						newRegion = new Region(newIndexedRegion.getStartOffset(), textSelection.getOffset() + textSelection.getLength() - newIndexedRegion.getStartOffset());
-
-						if (newNode.getNodeType() == Node.TEXT_NODE) {
-							newRegion = getNewSelectionRegion(newIndexedRegion, new TextSelection(newRegion.getOffset(), newRegion.getLength()));
-						}
-					}
-				}
-
-			}
-			else {
-				newRegion = cursorNodeRegion;
-			}
-		}
-		return newRegion;
-	}
-
-	public void init(IAction action) {
-		if (action != null) {
-			action.setText(XMLUIMessages.StructureSelectPrevious_label);
-			action.setToolTipText(XMLUIMessages.StructureSelectPrevious_tooltip);
-			action.setDescription(XMLUIMessages.StructureSelectPrevious_description);
-		}
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/IStyleConstantsXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/IStyleConstantsXML.java
deleted file mode 100644
index 79055b6..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/IStyleConstantsXML.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     Benjamin Muskalla, b.muskalla@gmx.net - [158660] character entities should have their own syntax highlighting preference      
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.style;
-
-/**
- * Contains the symbolic name of styles used by LineStyleProvider,
- * ColorManager, and any others who may be interested
- */
-public interface IStyleConstantsXML {
-	public static final String BACKGROUND = "background"; //$NON-NLS-1$
-	public static final String CDATA_BORDER = "cdataBorder";//$NON-NLS-1$
-	public static final String CDATA_TEXT = "cdataText";//$NON-NLS-1$
-	public static final String COMMENT_BORDER = "commentBorder";//$NON-NLS-1$
-	public static final String COMMENT_TEXT = "commentText";//$NON-NLS-1$
-	public static final String DECL_BORDER = "declBoder";//$NON-NLS-1$
-	public static final String DOCTYPE_EXTERNAL_ID = "doctypeExternalId";//$NON-NLS-1$
-	public static final String DOCTYPE_EXTERNAL_ID_PUBREF = "doctypeExternalPubref";//$NON-NLS-1$
-	public static final String DOCTYPE_EXTERNAL_ID_SYSREF = "doctypeExtrenalSysref";//$NON-NLS-1$
-	public static final String DOCTYPE_NAME = "doctypeName";//$NON-NLS-1$
-
-	public static final String FOREGROUND = "foreground"; //$NON-NLS-1$
-	public static final String PI_BORDER = "piBorder";//$NON-NLS-1$
-	public static final String PI_CONTENT = "piContent";//$NON-NLS-1$
-
-	public static final String TAG_ATTRIBUTE_EQUALS = "tagAttributeEquals"; //$NON-NLS-1$
-	public static final String TAG_ATTRIBUTE_NAME = "tagAttributeName";//$NON-NLS-1$
-	public static final String TAG_ATTRIBUTE_VALUE = "tagAttributeValue";//$NON-NLS-1$
-	public static final String TAG_BORDER = "tagBorder";//$NON-NLS-1$
-	public static final String TAG_NAME = "tagName";//$NON-NLS-1$
-	public static final String XML_CONTENT = "xmlContent";//$NON-NLS-1$
-	public static final String ENTITY_REFERENCE = "entityReference";//$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/LineStyleProviderForXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/LineStyleProviderForXML.java
deleted file mode 100644
index 2584548..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/LineStyleProviderForXML.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     Benjamin Muskalla, b.muskalla@gmx.net - [158660] character entities should have their own syntax highlighting preference     
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.style;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.provisional.style.AbstractLineStyleProvider;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-public class LineStyleProviderForXML extends AbstractLineStyleProvider implements LineStyleProvider {
-	public LineStyleProviderForXML() {
-		super();
-	}
-
-	protected TextAttribute getAttributeFor(ITextRegion region) {
-		/**
-		 * a method to centralize all the "format rules" for regions
-		 * specifically associated for how to "open" the region.
-		 */
-		// not sure why this is coming through null, but just to catch it
-		if (region == null) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.CDATA_TEXT);
-		}
-		String type = region.getType();
-		if ((type == DOMRegionContext.XML_CONTENT) || (type == DOMRegionContext.XML_DOCTYPE_INTERNAL_SUBSET)) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.XML_CONTENT);
-		}
-		else if ((type == DOMRegionContext.XML_TAG_OPEN) || (type == DOMRegionContext.XML_END_TAG_OPEN) || (type == DOMRegionContext.XML_TAG_CLOSE) || (type == DOMRegionContext.XML_EMPTY_TAG_CLOSE)) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_BORDER);
-		}
-		else if ((type == DOMRegionContext.XML_CDATA_OPEN) || (type == DOMRegionContext.XML_CDATA_CLOSE)) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.CDATA_BORDER);
-		}
-		else if (type == DOMRegionContext.XML_CDATA_TEXT) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.CDATA_TEXT);
-		}
-		else if (type == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
-		}
-		else if (type == DOMRegionContext.XML_DOCTYPE_DECLARATION) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_NAME);
-		}
-		else if (type == DOMRegionContext.XML_TAG_NAME) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_NAME);
-		}
-		else if ((type == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
-		}
-		else if (type == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS);
-		}
-		else if ((type == DOMRegionContext.XML_COMMENT_OPEN) || (type == DOMRegionContext.XML_COMMENT_CLOSE)) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.COMMENT_BORDER);
-		}
-		else if (type == DOMRegionContext.XML_COMMENT_TEXT) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.COMMENT_TEXT);
-		}
-		else if (type == DOMRegionContext.XML_DOCTYPE_NAME) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.DOCTYPE_NAME);
-		}
-		else if ((type == DOMRegionContext.XML_CHAR_REFERENCE) || (type == DOMRegionContext.XML_ENTITY_REFERENCE) || (type == DOMRegionContext.XML_PE_REFERENCE)) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.ENTITY_REFERENCE);
-		}
-		else if (type == DOMRegionContext.XML_PI_CONTENT) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.PI_CONTENT);
-		}
-		else if ((type == DOMRegionContext.XML_PI_OPEN) || (type == DOMRegionContext.XML_PI_CLOSE)) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.PI_BORDER);
-		}
-		else if ((type == DOMRegionContext.XML_DECLARATION_OPEN) || (type == DOMRegionContext.XML_DECLARATION_CLOSE)) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.DECL_BORDER);
-		}
-		else if (type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSREF) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF);
-		}
-		else if (type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBREF) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF);
-		}
-		else if ((type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBLIC) || (type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSTEM)) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID);
-		}
-		else if (type == DOMRegionContext.UNDEFINED) {
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.CDATA_TEXT);
-		}
-		else if (type == DOMRegionContext.WHITE_SPACE) {
-			// white space is normall not on its own ... but when it is, we'll
-			// treat as content
-			return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.XML_CONTENT);
-		}
-		else {
-			// default, return null to signal "not handled"
-			// in which case, other factories should be tried
-			return null;
-		}
-	}
-
-	protected IPreferenceStore getColorPreferences() {
-		return XMLUIPlugin.getDefault().getPreferenceStore();
-	}
-
-	protected void handlePropertyChange(PropertyChangeEvent event) {
-		String styleKey = null;
-
-		if (event != null) {
-			String prefKey = event.getProperty();
-			// check if preference changed is a style preference
-			if (IStyleConstantsXML.TAG_NAME.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.TAG_NAME;
-			}
-			else if (IStyleConstantsXML.TAG_BORDER.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.TAG_BORDER;
-			}
-			else if (IStyleConstantsXML.TAG_ATTRIBUTE_NAME.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.TAG_ATTRIBUTE_NAME;
-			}
-			else if (IStyleConstantsXML.TAG_ATTRIBUTE_VALUE.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.TAG_ATTRIBUTE_VALUE;
-			}
-			else if (IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS;
-			}
-			else if (IStyleConstantsXML.COMMENT_BORDER.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.COMMENT_BORDER;
-			}
-			else if (IStyleConstantsXML.COMMENT_TEXT.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.COMMENT_TEXT;
-			}
-			else if (IStyleConstantsXML.ENTITY_REFERENCE.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.ENTITY_REFERENCE;
-			}
-			else if (IStyleConstantsXML.CDATA_BORDER.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.CDATA_BORDER;
-			}
-			else if (IStyleConstantsXML.CDATA_TEXT.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.CDATA_TEXT;
-			}
-			else if (IStyleConstantsXML.DECL_BORDER.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.DECL_BORDER;
-			}
-			else if (IStyleConstantsXML.DOCTYPE_EXTERNAL_ID.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.DOCTYPE_EXTERNAL_ID;
-			}
-			else if (IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF;
-			}
-			else if (IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF;
-			}
-			else if (IStyleConstantsXML.DOCTYPE_NAME.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.DOCTYPE_NAME;
-			}
-			else if (IStyleConstantsXML.PI_CONTENT.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.PI_CONTENT;
-			}
-			else if (IStyleConstantsXML.PI_BORDER.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.PI_BORDER;
-			}
-			else if (IStyleConstantsXML.XML_CONTENT.equals(prefKey)) {
-				styleKey = IStyleConstantsXML.XML_CONTENT;
-			}
-		}
-
-		if (styleKey != null) {
-			// overwrite style preference with new value
-			addTextAttribute(styleKey);
-			super.handlePropertyChange(event);
-		}
-	}
-
-	/**
-	 * Loads text attributes into map. Make sure map is cleared before calling
-	 * this.
-	 */
-	protected void loadColors() {
-		addTextAttribute(IStyleConstantsXML.TAG_NAME);
-		addTextAttribute(IStyleConstantsXML.TAG_BORDER);
-		addTextAttribute(IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
-		addTextAttribute(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
-		addTextAttribute(IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS);
-		addTextAttribute(IStyleConstantsXML.COMMENT_BORDER);
-		addTextAttribute(IStyleConstantsXML.COMMENT_TEXT);
-		addTextAttribute(IStyleConstantsXML.CDATA_BORDER);
-		addTextAttribute(IStyleConstantsXML.CDATA_TEXT);
-		addTextAttribute(IStyleConstantsXML.DECL_BORDER);
-		addTextAttribute(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID);
-		addTextAttribute(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF);
-		addTextAttribute(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF);
-		addTextAttribute(IStyleConstantsXML.DOCTYPE_NAME);
-		addTextAttribute(IStyleConstantsXML.PI_CONTENT);
-		addTextAttribute(IStyleConstantsXML.PI_BORDER);
-		addTextAttribute(IStyleConstantsXML.XML_CONTENT);
-		addTextAttribute(IStyleConstantsXML.ENTITY_REFERENCE);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/MarkupTagInfoProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/MarkupTagInfoProvider.java
deleted file mode 100644
index 47513ef..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/MarkupTagInfoProvider.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.taginfo;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocumentation;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDescriptionBuilder;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/**
- * Provides basic tag information such as element/attribute name, data type,
- * and tag info/documentation for CMNodes. Uses HTML to enhance presentation.
- */
-public class MarkupTagInfoProvider {
-	protected final static String BOLD_END = "</b>"; //$NON-NLS-1$
-	protected final static String BOLD_START = "<b>"; //$NON-NLS-1$
-	protected final static String HEADING_END = "</h5>"; //$NON-NLS-1$
-	protected final static String HEADING_START = "<h5>"; //$NON-NLS-1$
-	protected final static String LIST_BEGIN = "<ul>"; //$NON-NLS-1$
-	protected final static String LIST_ELEMENT = "<li>"; //$NON-NLS-1$
-	protected final static String NEW_LINE = "<dl>"; //$NON-NLS-1$
-	protected final static String PARAGRAPH_END = "</p>"; //$NON-NLS-1$
-	protected final static String PARAGRAPH_START = "<p>"; //$NON-NLS-1$
-	protected final static String SPACE = " "; //$NON-NLS-1$
-
-	/**
-	 * Returns basic tag information for display given a CMNode
-	 * 
-	 * @return String
-	 */
-	public String getInfo(CMNode node) {
-		if (node == null) {
-			return null;
-		}
-		StringBuffer sb = new StringBuffer();
-		// we assume that if there is tagInfo present, only display tagInfo
-		printTagInfo(sb, node);
-
-		// no tagInfo present, so try to display tag description
-		if (sb.length() == 0) {
-			printDescription(sb, node);
-		}
-
-		// no tag description present either, so display default info
-		if (sb.length() == 0) {
-			printDefaultInfo(node, sb);
-		}
-
-		return sb.toString();
-	}
-
-	/**
-	 * Adds dataType's data type information, including enumerated type values
-	 * to string buffer, sb
-	 * 
-	 */
-	protected void printDataTypeInfo(StringBuffer sb, CMDataType dataType) {
-		String dataTypeName = dataType.getNodeName();
-		if ((dataTypeName != null) && (dataTypeName.length() > 0)) {
-			sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Data_Type____4 + SPACE + BOLD_END);
-			sb.append(dataTypeName);
-			sb.append(PARAGRAPH_END);
-		}
-		String[] enumeratedValue = dataType.getEnumeratedValues();
-		if ((enumeratedValue != null) && (enumeratedValue.length > 0)) {
-			sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Enumerated_Values____5 + SPACE + BOLD_END);
-			sb.append(LIST_BEGIN);
-			for (int i = 0; i < enumeratedValue.length; i++) {
-				sb.append(LIST_ELEMENT + enumeratedValue[i]);
-			}
-			sb.append(PARAGRAPH_END);
-		}
-	}
-
-	/**
-	 * Adds the default info (element name, content model, data type) of
-	 * CMNode to the string buffer, sb
-	 * 
-	 */
-	protected void printDefaultInfo(CMNode node, StringBuffer sb) {
-		{
-
-			if (node.getNodeType() == CMNode.ELEMENT_DECLARATION) {
-				CMElementDeclaration ed = (CMElementDeclaration) node;
-				sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Element____1 + SPACE + BOLD_END);
-				sb.append(node.getNodeName());
-				sb.append(PARAGRAPH_END);
-				printDocumentation(sb, node);
-				if (ed.getContentType() == CMElementDeclaration.PCDATA) {
-					CMDataType dataType = ed.getDataType();
-					if (dataType != null) {
-						printDataTypeInfo(sb, dataType);
-					}
-				}
-				else {
-					CMDescriptionBuilder builder = new CMDescriptionBuilder();
-					String description = builder.buildDescription(node);
-					if ((description != null) && (description.length() > 0)) {
-						sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Content_Model____2 + SPACE + BOLD_END);
-						sb.append(description + PARAGRAPH_END);
-					}
-				}
-			}
-			else if (node.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-				CMAttributeDeclaration ad = (CMAttributeDeclaration) node;
-				sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Attribute____3 + SPACE + BOLD_END);
-				sb.append(node.getNodeName());
-				sb.append(PARAGRAPH_END);
-				printDocumentation(sb, node);
-				CMDataType dataType = ad.getAttrType();
-				if (dataType != null) {
-					printDataTypeInfo(sb, dataType);
-				}
-			}
-			else if (node.getNodeType() == CMNode.DATA_TYPE) {
-				sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Data_Type____4 + SPACE + BOLD_END);
-				sb.append(node.getNodeName());
-				sb.append(PARAGRAPH_END);
-				printDocumentation(sb, node);
-			}
-		}
-	}
-
-	/**
-	 * Adds the description property of the CMNode to the string buffer, sb
-	 * 
-	 */
-	protected void printDescription(StringBuffer sb, CMNode node) {
-		String tagInfo = (String) node.getProperty("description"); //$NON-NLS-1$
-		if (tagInfo != null) {
-			sb.append(PARAGRAPH_START + tagInfo.trim() + PARAGRAPH_END);
-		}
-	}
-
-	/**
-	 * Adds the tag documentation property of the CMNode to the string buffer,
-	 * sb
-	 * 
-	 */
-	protected void printDocumentation(StringBuffer sb, CMNode node) {
-		CMNodeList nodeList = (CMNodeList) node.getProperty("documentation"); //$NON-NLS-1$
-		if ((nodeList != null) && (nodeList.getLength() > 0)) {
-			for (int i = 0; i < nodeList.getLength(); i++) {
-				CMDocumentation documentation = (CMDocumentation) nodeList.item(i);
-				String doc = documentation.getValue();
-				if (doc != null) {
-					sb.append(PARAGRAPH_START + doc.trim() + PARAGRAPH_END);
-				}
-			}
-			sb.append(NEW_LINE);
-		}
-	}
-
-	/**
-	 * Adds the tag info property of the CMNode to the string buffer, sb
-	 * 
-	 */
-	protected void printTagInfo(StringBuffer sb, CMNode node) {
-		String tagInfo = (String) node.getProperty("tagInfo"); //$NON-NLS-1$
-		if (tagInfo != null) {
-			sb.append(PARAGRAPH_START + tagInfo.trim() + PARAGRAPH_END);
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLInformationProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLInformationProvider.java
deleted file mode 100644
index fe76a69..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLInformationProvider.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.taginfo;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.information.IInformationProvider;
-import org.eclipse.jface.text.information.IInformationProviderExtension;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-
-/**
- * Provides context information for XML tags (Shows tooltip description)
- * 
- * @deprecated StructuredTextViewerConfiguration creates the appropriate
- *             information provider
- */
-public class XMLInformationProvider implements IInformationProvider, IInformationProviderExtension {
-
-	private ITextHover fTextHover = null;
-
-	public XMLInformationProvider() {
-		fTextHover = SSEUIPlugin.getDefault().getTextHoverManager().createBestMatchHover(new XMLTagInfoHoverProcessor());
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.information.IInformationProvider#getInformation(org.eclipse.jface.text.ITextViewer,
-	 *      org.eclipse.jface.text.IRegion)
-	 */
-	public String getInformation(ITextViewer textViewer, IRegion subject) {
-		return (String) getInformation2(textViewer, subject);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.information.IInformationProviderExtension#getInformation2(org.eclipse.jface.text.ITextViewer,
-	 *      org.eclipse.jface.text.IRegion)
-	 */
-	public Object getInformation2(ITextViewer textViewer, IRegion subject) {
-		return fTextHover.getHoverInfo(textViewer, subject);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.information.IInformationProvider#getSubject(org.eclipse.jface.text.ITextViewer,
-	 *      int)
-	 */
-	public IRegion getSubject(ITextViewer textViewer, int offset) {
-		return fTextHover.getHoverRegion(textViewer, offset);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLTagInfoHoverProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLTagInfoHoverProcessor.java
deleted file mode 100644
index 47276fc..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLTagInfoHoverProcessor.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.taginfo;
-
-
-
-import java.util.List;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.taginfo.AbstractHoverProcessor;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceHelper;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- * Provides hover help documentation for xml tags
- * 
- * @see org.eclipse.jface.text.ITextHover
- */
-public class XMLTagInfoHoverProcessor extends AbstractHoverProcessor {
-	protected MarkupTagInfoProvider fInfoProvider = null;
-
-	/**
-	 * Constructor for XMLTextHoverProcessor.
-	 */
-	public XMLTagInfoHoverProcessor() {
-		// nothing
-	}
-
-	/**
-	 * Retreives documentation to display in the hover help popup.
-	 * 
-	 * @return String any documentation information to display
-	 *         <code>null</code> if there is nothing to display.
-	 * 
-	 */
-	protected String computeHoverHelp(ITextViewer textViewer, int documentPosition) {
-		String result = null;
-
-		IndexedRegion treeNode = ContentAssistUtils.getNodeAt(textViewer, documentPosition);
-		if (treeNode == null) {
-			return null;
-		}
-		Node node = (Node) treeNode;
-
-		while ((node != null) && (node.getNodeType() == Node.TEXT_NODE) && (node.getParentNode() != null)) {
-			node = node.getParentNode();
-		}
-		IDOMNode parentNode = (IDOMNode) node;
-
-		IStructuredDocumentRegion flatNode = ((IStructuredDocument) textViewer.getDocument()).getRegionAtCharacterOffset(documentPosition);
-		if (flatNode != null) {
-			ITextRegion region = flatNode.getRegionAtCharacterOffset(documentPosition);
-			if (region != null) {
-				result = computeRegionHelp(treeNode, parentNode, flatNode, region);
-			}
-		}
-
-		return result;
-	}
-
-	/**
-	 * Computes the hoverhelp based on region
-	 * 
-	 * @return String hoverhelp
-	 */
-	protected String computeRegionHelp(IndexedRegion treeNode, IDOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
-		String result = null;
-		if (region == null) {
-			return null;
-		}
-		String regionType = region.getType();
-		if (regionType == DOMRegionContext.XML_TAG_NAME) {
-			result = computeTagNameHelp((IDOMNode) treeNode, parentNode, flatNode, region);
-		}
-		else if (regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-			result = computeTagAttNameHelp((IDOMNode) treeNode, parentNode, flatNode, region);
-		}
-		else if (regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-			result = computeTagAttValueHelp((IDOMNode) treeNode, parentNode, flatNode, region);
-		}
-		return result;
-	}
-
-	/**
-	 * Computes the hover help for the attribute name
-	 */
-	protected String computeTagAttNameHelp(IDOMNode xmlnode, IDOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
-		CMElementDeclaration elementDecl = getCMElementDeclaration(xmlnode);
-		String attName = flatNode.getText(region);
-		CMAttributeDeclaration attDecl = getCMAttributeDeclaration(xmlnode, elementDecl, attName);
-		return getAdditionalInfo(elementDecl, attDecl);
-	}
-
-	/**
-	 * Computes the hover help for the attribute value (this is the same as
-	 * the attribute name's help)
-	 */
-	protected String computeTagAttValueHelp(IDOMNode xmlnode, IDOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
-		CMElementDeclaration elementDecl = getCMElementDeclaration(xmlnode);
-		ITextRegion attrNameRegion = getAttrNameRegion(xmlnode, region);
-
-		String attName = flatNode.getText(attrNameRegion);
-		CMAttributeDeclaration attDecl = getCMAttributeDeclaration(xmlnode, elementDecl, attName);
-		return getAdditionalInfo(elementDecl, attDecl);
-	}
-
-	/**
-	 * Computes the hover help for the tag name
-	 */
-	protected String computeTagNameHelp(IDOMNode xmlnode, IDOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
-		CMElementDeclaration elementDecl = getCMElementDeclaration(xmlnode);
-		CMElementDeclaration pelementDecl = getCMElementDeclaration(parentNode);
-		return getAdditionalInfo(pelementDecl, elementDecl);
-	}
-
-	/**
-	 * Retreives cmnode's documentation to display in the hover help popup. If
-	 * no documentation exists for cmnode, try displaying parentOrOwner's
-	 * documentation
-	 * 
-	 * @return String any documentation information to display for cmnode.
-	 *         <code>null</code> if there is nothing to display.
-	 */
-	protected String getAdditionalInfo(CMNode parentOrOwner, CMNode cmnode) {
-		String addlInfo = null;
-
-		if (cmnode == null) {
-			if (Debug.displayWarnings) {
-				new IllegalArgumentException("Null declaration!").printStackTrace(); //$NON-NLS-1$
-			}
-			return null;
-		}
-
-		addlInfo = getInfoProvider().getInfo(cmnode);
-		if ((addlInfo == null) && (parentOrOwner != null)) {
-			addlInfo = getInfoProvider().getInfo(parentOrOwner);
-		}
-		return addlInfo;
-	}
-
-	/**
-	 * Find the region of the attribute name for the given attribute value
-	 * region
-	 * 
-	 */
-	protected ITextRegion getAttrNameRegion(IDOMNode node, ITextRegion region) {
-		// Find the attribute name for which this position should have a value
-		IStructuredDocumentRegion open = node.getFirstStructuredDocumentRegion();
-		ITextRegionList openRegions = open.getRegions();
-		int i = openRegions.indexOf(region);
-		if (i < 0) {
-			return null;
-		}
-		ITextRegion nameRegion = null;
-		while (i >= 0) {
-			nameRegion = openRegions.get(i--);
-			if (nameRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-				break;
-			}
-		}
-		return nameRegion;
-	}
-
-	/**
-	 * Retreives CMAttributeDeclaration indicated by attribute name within
-	 * elementDecl
-	 */
-	protected CMAttributeDeclaration getCMAttributeDeclaration(IDOMNode node, CMElementDeclaration elementDecl, String attName) {
-		CMAttributeDeclaration attrDecl = null;
-
-		if (elementDecl != null) {
-			CMNamedNodeMap attributes = elementDecl.getAttributes();
-			
-			CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attributes);
-			List nodes = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent((Element) node, elementDecl, ModelQuery.INCLUDE_ATTRIBUTES);
-			for (int k = 0; k < nodes.size(); k++) {
-				CMNode cmnode = (CMNode) nodes.get(k);
-				if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-					allAttributes.put(cmnode);
-				}
-			}
-			attributes = allAttributes;
-
-			String noprefixName = DOMNamespaceHelper.getUnprefixedName(attName);
-			if (attributes != null) {
-				attrDecl = (CMAttributeDeclaration) attributes.getNamedItem(noprefixName);
-				if (attrDecl == null) {
-					attrDecl = (CMAttributeDeclaration) attributes.getNamedItem(attName);
-				}
-			}
-		}
-		return attrDecl;
-	}
-
-	/**
-	 * Retreives CMElementDeclaration for given node
-	 * 
-	 * @return CMElementDeclaration - CMElementDeclaration of node or
-	 *         <code>null</code> if not possible
-	 */
-	protected CMElementDeclaration getCMElementDeclaration(Node node) {
-		CMElementDeclaration result = null;
-		if (node.getNodeType() == Node.ELEMENT_NODE) {
-			ModelQuery modelQuery = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
-			if (modelQuery != null) {
-				result = modelQuery.getCMElementDeclaration((Element) node);
-			}
-		}
-		return result;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer,
-	 *      org.eclipse.jface.text.IRegion)
-	 */
-	public String getHoverInfo(ITextViewer viewer, IRegion hoverRegion) {
-		if ((hoverRegion == null) || (viewer == null) || (viewer.getDocument() == null)) {
-			return null;
-		}
-
-		String displayText = null;
-		int documentOffset = hoverRegion.getOffset();
-		displayText = computeHoverHelp(viewer, documentOffset);
-
-		return displayText;
-	}
-
-	/**
-	 * Returns the region to hover the text over based on the offset.
-	 * 
-	 * @param textViewer
-	 * @param offset
-	 * 
-	 * @return IRegion region to hover over if offset is within tag name,
-	 *         attribute name, or attribute value and if offset is not over
-	 *         invalid whitespace. otherwise, returns <code>null</code>
-	 * 
-	 * @see org.eclipse.jface.text.ITextHover#getHoverRegion(ITextViewer, int)
-	 */
-	public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
-		if ((textViewer == null) || (textViewer.getDocument() == null)) {
-			return null;
-		}
-
-		IStructuredDocumentRegion flatNode = ((IStructuredDocument) textViewer.getDocument()).getRegionAtCharacterOffset(offset);
-		ITextRegion region = null;
-
-		if (flatNode != null) {
-			region = flatNode.getRegionAtCharacterOffset(offset);
-		}
-
-		if (region != null) {
-			// only supply hoverhelp for tag name, attribute name, or
-			// attribute value
-			String regionType = region.getType();
-			if ((regionType == DOMRegionContext.XML_TAG_NAME) || (regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) || (regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)) {
-				try {
-					// check if we are at whitespace before or after line
-					IRegion line = textViewer.getDocument().getLineInformationOfOffset(offset);
-					if ((offset > (line.getOffset())) && (offset < (line.getOffset() + line.getLength()))) {
-						// check if we are in region's trailing whitespace
-						// (whitespace after relevant info)
-						if (offset < flatNode.getTextEndOffset(region)) {
-							return new Region(flatNode.getStartOffset(region), region.getTextLength());
-						}
-					}
-				}
-				catch (BadLocationException e) {
-					Logger.logException(e);
-				}
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * @deprecated if enabled flag is false, dont call getHoverRegion in the
-	 *             first place if true, use getHoverRegion(ITextViewer, int)
-	 */
-	public IRegion getHoverRegion(ITextViewer textViewer, int offset, boolean enabled) {
-		if ((!enabled) || (textViewer == null) || (textViewer.getDocument() == null)) {
-			return null;
-		}
-
-		IStructuredDocumentRegion flatNode = ((IStructuredDocument) textViewer.getDocument()).getRegionAtCharacterOffset(offset);
-		ITextRegion region = null;
-
-		if (flatNode != null) {
-			region = flatNode.getRegionAtCharacterOffset(offset);
-		}
-
-		if (region != null) {
-			// only supply hoverhelp for tag name, attribute name, or
-			// attribute value
-			String regionType = region.getType();
-			if ((regionType == DOMRegionContext.XML_TAG_NAME) || (regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) || (regionType == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)) {
-				try {
-					// check if we are at whitespace before or after line
-					IRegion line = textViewer.getDocument().getLineInformationOfOffset(offset);
-					if ((offset > (line.getOffset())) && (offset < (line.getOffset() + line.getLength()))) {
-						// check if we are in region's trailing whitespace
-						// (whitespace after relevant info)
-						if (offset < flatNode.getTextEndOffset(region)) {
-							return new Region(flatNode.getStartOffset(region), region.getTextLength());
-						}
-					}
-				}
-				catch (BadLocationException e) {
-					Logger.logException(e);
-				}
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * Gets the infoProvider.
-	 * 
-	 * @return Returns fInfoProvider and if fInfoProvider was
-	 *         <code>null</code> set fInfoProvider to DefaultInfoProvider
-	 */
-	public MarkupTagInfoProvider getInfoProvider() {
-		if (fInfoProvider == null) {
-			fInfoProvider = new MarkupTagInfoProvider();
-		}
-		return fInfoProvider;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/EncodingTemplateVariableResolverXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/EncodingTemplateVariableResolverXML.java
deleted file mode 100644
index 079b042..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/EncodingTemplateVariableResolverXML.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.templates;
-
-import org.eclipse.jface.text.templates.SimpleTemplateVariableResolver;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-
-public class EncodingTemplateVariableResolverXML extends SimpleTemplateVariableResolver {
-	private static final String ENCODING_TYPE = getEncodingType();
-
-	private static String getEncodingType() {
-		return "encoding"; //$NON-NLS-1$
-	}
-
-	/**
-	 * Creates a new encoding variable
-	 */
-	public EncodingTemplateVariableResolverXML() {
-		super(ENCODING_TYPE, XMLUIMessages.Creating_files_encoding);
-	}
-
-	protected String resolve(TemplateContext context) {
-		return XMLCorePlugin.getDefault().getPluginPreferences().getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/TemplateContextTypeIdsXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/TemplateContextTypeIdsXML.java
deleted file mode 100644
index f7993e2..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/TemplateContextTypeIdsXML.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.templates;
-
-public class TemplateContextTypeIdsXML {
-
-	public static final String ALL = getAll();
-
-	public static final String ATTRIBUTE = getAttribute();
-
-	public static final String ATTRIBUTE_VALUE = getAttributeValue();
-
-	public static final String NEW = getNew();
-
-	public static final String TAG = getTag();
-
-	private static String getAll() {
-		return getPrefix() + "_all"; //$NON-NLS-1$
-	}
-
-	private static String getAttribute() {
-		return getPrefix() + "_attribute"; //$NON-NLS-1$
-	}
-
-	private static String getAttributeValue() {
-		return getPrefix() + "_attribute_value"; //$NON-NLS-1$
-	}
-
-	private static String getNew() {
-		return getPrefix() + "_new"; //$NON-NLS-1$
-	}
-
-	private static String getPrefix() {
-		return "xml"; //$NON-NLS-1$
-	}
-
-	private static String getTag() {
-		return getPrefix() + "_tag"; //$NON-NLS-1$
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/TemplateContextTypeXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/TemplateContextTypeXML.java
deleted file mode 100644
index 43ccf20..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/TemplateContextTypeXML.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.templates;
-
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-import org.eclipse.jface.text.templates.TemplateContextType;
-
-/**
- * Base class for XML template context types. Templates of this context type
- * apply to any place within XML content type.
- */
-public class TemplateContextTypeXML extends TemplateContextType {
-
-	public TemplateContextTypeXML() {
-		super();
-		addResolver(new GlobalTemplateVariables.Cursor());
-		addResolver(new GlobalTemplateVariables.Date());
-		addResolver(new GlobalTemplateVariables.Dollar());
-		addResolver(new GlobalTemplateVariables.LineSelection());
-		addResolver(new GlobalTemplateVariables.Time());
-		addResolver(new GlobalTemplateVariables.User());
-		addResolver(new GlobalTemplateVariables.WordSelection());
-		addResolver(new GlobalTemplateVariables.Year());
-		addResolver(new EncodingTemplateVariableResolverXML());
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/text/XMLDocumentRegionEdgeMatcher.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/text/XMLDocumentRegionEdgeMatcher.java
deleted file mode 100644
index b29fd9b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/text/XMLDocumentRegionEdgeMatcher.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.text;
-
-import org.eclipse.jface.text.source.DefaultCharacterPairMatcher;
-import org.eclipse.wst.sse.ui.internal.text.DocumentRegionEdgeMatcher;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-
-public class XMLDocumentRegionEdgeMatcher extends DocumentRegionEdgeMatcher {
-
-	private static final char[] PAIRS = {'{', '}', '(', ')', '[', ']','"','"','\'','\''};
-
-	public XMLDocumentRegionEdgeMatcher() {
-		super(new String[]{DOMRegionContext.XML_TAG_NAME, DOMRegionContext.XML_COMMENT_TEXT, DOMRegionContext.XML_CDATA_TEXT, DOMRegionContext.XML_PI_OPEN, DOMRegionContext.XML_PI_CONTENT}, new DefaultCharacterPairMatcher(PAIRS));
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/SharedXMLEditorPluginImageHelper.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/SharedXMLEditorPluginImageHelper.java
deleted file mode 100644
index 9981244..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/SharedXMLEditorPluginImageHelper.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.util;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-
-
-public class SharedXMLEditorPluginImageHelper {
-	public static final String IMG_DTOOL_CONSTRAINOFF = XMLEditorPluginImages.IMG_DTOOL_CONSTRAINOFF;
-	public static final String IMG_DTOOL_CONSTRAINON = XMLEditorPluginImages.IMG_DTOOL_CONSTRAINON;
-	public static final String IMG_DTOOL_RLDGRMR = XMLEditorPluginImages.IMG_DTOOL_RLDGRMR;
-	public static final String IMG_DTOOL_VALIDATE = XMLEditorPluginImages.IMG_DTOOL_VALIDATE;
-	public static final String IMG_ETOOL_CONSTRAINOFF = XMLEditorPluginImages.IMG_ETOOL_CONSTRAINOFF;
-	public static final String IMG_ETOOL_CONSTRAINON = XMLEditorPluginImages.IMG_ETOOL_CONSTRAINON;
-	public static final String IMG_ETOOL_RLDGRMR = XMLEditorPluginImages.IMG_ETOOL_RLDGRMR;
-	public static final String IMG_ETOOL_VALIDATE = XMLEditorPluginImages.IMG_ETOOL_VALIDATE;
-	public static final String IMG_OBJ_ATTRIBUTE = XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE;
-	public static final String IMG_OBJ_CDATASECTION = XMLEditorPluginImages.IMG_OBJ_CDATASECTION;
-	public static final String IMG_OBJ_COMMENT = XMLEditorPluginImages.IMG_OBJ_COMMENT;
-	public static final String IMG_OBJ_DOCTYPE = XMLEditorPluginImages.IMG_OBJ_DOCTYPE;
-	public static final String IMG_OBJ_ELEMENT = XMLEditorPluginImages.IMG_OBJ_ELEMENT;
-	public static final String IMG_OBJ_ENTITY = XMLEditorPluginImages.IMG_OBJ_ENTITY;
-	public static final String IMG_OBJ_ENTITY_REFERENCE = XMLEditorPluginImages.IMG_OBJ_ENTITY_REFERENCE;
-	public static final String IMG_OBJ_NOTATION = XMLEditorPluginImages.IMG_OBJ_NOTATION;
-	public static final String IMG_OBJ_PROCESSINGINSTRUCTION = XMLEditorPluginImages.IMG_OBJ_PROCESSINGINSTRUCTION;
-	public static final String IMG_OBJ_TAG_GENERIC = XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC;
-	public static final String IMG_OBJ_TAG_MACRO = XMLEditorPluginImages.IMG_OBJ_TAG_MACRO;
-	public static final String IMG_OBJ_TXTEXT = XMLEditorPluginImages.IMG_OBJ_TXTEXT;
-
-	/**
-	 * Retrieves the specified image from the xml source editor plugin's image
-	 * registry. Note: The returned <code>Image</code> is managed by the
-	 * workbench; clients must <b>not </b> dispose of the returned image.
-	 * 
-	 * @param symbolicName
-	 *            the symbolic name of the image; there are constants declared
-	 *            in this class for build-in images that come with the xml
-	 *            source editor
-	 * @return the image, or <code>null</code> if not found
-	 */
-	public static Image getImage(String symbolicName) {
-		return XMLEditorPluginImageHelper.getInstance().getImage(symbolicName);
-	}
-
-	/**
-	 * Retrieves the image descriptor for specified image from the xml source
-	 * editor plugin's image registry. Unlike <code>Image</code>s, image
-	 * descriptors themselves do not need to be disposed.
-	 * 
-	 * @param symbolicName
-	 *            the symbolic name of the image; there are constants declared
-	 *            in this interface for build-in images that come with the xml
-	 *            source editor
-	 * @return the image descriptor, or <code>null</code> if not found
-	 */
-	public static ImageDescriptor getImageDescriptor(String symbolicName) {
-		return XMLEditorPluginImageHelper.getInstance().getImageDescriptor(symbolicName);
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/XMLCommonResources.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/XMLCommonResources.java
deleted file mode 100644
index a3ba0bb..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/XMLCommonResources.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.util;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-/**
- * @deprecated use XMLUIPlugin.getResourceString() instead
- */
-/**
- * This class exists temporarily until the properties files can be
- * re-organized and the various resource references can be updated
- */
-public class XMLCommonResources {
-	protected static XMLCommonResources instance;
-
-	public synchronized static XMLCommonResources getInstance() {
-		if (instance == null) {
-			instance = new XMLCommonResources(XMLUIPlugin.getDefault());
-		}
-		return instance;
-	}
-
-	private XMLUIPlugin editorPlugin;
-
-	private ResourceBundle resourceBundle;
-
-	public XMLCommonResources(XMLUIPlugin editorPlugin) {
-		instance = this;
-		this.editorPlugin = editorPlugin;
-		try {
-			resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.ui.internal.XMLUIPluginResources"); //$NON-NLS-1$
-		}
-		catch (MissingResourceException exception) {
-			// TODO... log an error message
-			// B2BUtilPlugin.getPlugin().getMsgLogger().write(B2BUtilPlugin.getGUIString("_WARN_PLUGIN_PROPERTIES_MISSING")
-			// + descriptor.getLabel());
-			resourceBundle = null;
-		}
-	}
-
-	ImageDescriptor _getImageDescriptor(String iconName) {
-		return AbstractUIPlugin.imageDescriptorFromPlugin(XMLUIPlugin.ID, iconName);
-	}
-
-
-	public ResourceBundle getResourceBundle() {
-		return resourceBundle;
-	}
-
-	/**
-	 * This gets the string resource.
-	 */
-	public String getString(String key) {
-		return getResourceBundle().getString(key);
-	}
-
-	/**
-	 * This gets the string resource and does one substitution.
-	 */
-	public String getString(String key, Object s1) {
-		return MessageFormat.format(getString(key), new Object[]{s1});
-	}
-
-	/**
-	 * This gets the string resource and does two substitutions.
-	 */
-	public String getString(String key, Object s1, Object s2) {
-		return MessageFormat.format(getString(key), new Object[]{s1, s2});
-	}
-
-	public IWorkbench getWorkbench() {
-		return editorPlugin.getWorkbench();
-	}
-	/*
-	 * public ImageFactory getImageFactory() { return imageFactory; }
-	 */
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/XMLCommonUIContextIds.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/XMLCommonUIContextIds.java
deleted file mode 100644
index 763d502..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/XMLCommonUIContextIds.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-
-
-package org.eclipse.wst.xml.ui.internal.util;
-
-/**
- * Context help id constants.
- */
-public interface XMLCommonUIContextIds {
-	public static final String PLUGIN_NAME = "org.eclipse.wst.xml.ui"; //$NON-NLS-1$
-
-	/* CONTEXT_ID xcui0500 for Edit Attribute Instruction Dialog */
-	public static final String XCUI_ATTRIBUTE_DIALOG = PLUGIN_NAME + ".xcui0500"; //$NON-NLS-1$
-
-	/* CONTEXT_ID xcui0400 for Select XML Catalog ID Dialog */
-	public static final String XCUI_CATALOG_DIALOG = PLUGIN_NAME + ".xcui0400"; //$NON-NLS-1$
-
-	/* CONTEXT_IDs for XML Common UI use xcuixxx context IDs */
-
-	/* CONTEXT_ID xcui0010 for Edit Doctype Dialog */
-	public static final String XCUI_DOCTYPE_DIALOG = PLUGIN_NAME + ".xcui0010"; //$NON-NLS-1$
-	/* CONTEXT_ID xcui0030 for Public ID Text Edit */
-	public static final String XCUI_DOCTYPE_PUBLIC = PLUGIN_NAME + ".xcui0030"; //$NON-NLS-1$
-	/* CONTEXT_ID xcui0020 for Root Element Name Text Edit */
-	public static final String XCUI_DOCTYPE_ROOT = PLUGIN_NAME + ".xcui0020"; //$NON-NLS-1$
-	/* CONTEXT_ID xcui0040 for System ID Text Edit */
-	public static final String XCUI_DOCTYPE_SYSTEM = PLUGIN_NAME + ".xcui0050"; //$NON-NLS-1$
-
-	/* CONTEXT_ID xcui0300 for Edit Element Instruction Dialog */
-	public static final String XCUI_ELEMENT_DIALOG = PLUGIN_NAME + ".xcui0600"; //$NON-NLS-1$
-
-	/* CONTEXT_ID xcui0200 for Edit Namespace Dialog */
-	public static final String XCUI_NAMESPACE_DIALOG = PLUGIN_NAME + ".xcui0200"; //$NON-NLS-1$
-
-	/* CONTEXT_ID xcui0300 for Edit Processing Instruction Dialog */
-	public static final String XCUI_PROCESSING_DIALOG = PLUGIN_NAME + ".xcui0300"; //$NON-NLS-1$
-
-	/* CONTEXT_ID xcui0100 for Edit Schema Information Dialog */
-	public static final String XCUI_SCHEMA_INFO_DIALOG = PLUGIN_NAME + ".xcui0100"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidator.java
deleted file mode 100644
index 3973bab..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidator.java
+++ /dev/null
@@ -1,602 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.validation;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.validation.internal.core.IMessageAccess;
-import org.eclipse.wst.validation.internal.core.ValidationException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IProjectValidationContext;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-import org.eclipse.wst.validation.internal.provisional.core.IValidator;
-import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMText;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * A DelegatingReconcileValidator calls its delegate validator to get a list
- * of validation error IMessages. Using information in this IMessage the
- * DelegatingReconcileValidator updates the IMessage with an offset and length
- * to give a good range to be "squiggled" and adds the messages to the
- * IReporter
- * 
- * @author Mark Hutchinson
- * 
- */
-public abstract class DelegatingSourceValidator implements IValidator {
-	// the selection strategies:
-	protected static final String ALL_ATTRIBUTES = "ALL_ATTRIBUTES"; //$NON-NLS-1$
-	protected static final String ATTRIBUTE_NAME = "ATTRIBUTE_NAME"; //$NON-NLS-1$
-	protected static final String ATTRIBUTE_VALUE = "ATTRIBUTE_VALUE"; //$NON-NLS-1$
-	protected static final String START_TAG = "START_TAG"; //$NON-NLS-1$
-	protected static final String TEXT = "TEXT"; //$NON-NLS-1$
-	protected static final String FIRST_NON_WHITESPACE_TEXT = "FIRST_NON_WHITESPACE_TEXT"; //$NON-NLS-1$
-	protected static final String TEXT_ENTITY_REFERENCE = "TEXT_ENTITY_REFERENCE"; //$NON-NLS-1$
-	protected static final String VALUE_OF_ATTRIBUTE_WITH_GIVEN_VALUE = "VALUE_OF_ATTRIBUTE_WITH_GIVEN_VALUE"; //$NON-NLS-1$
-	protected static final String END_TAG = "END_TAG"; //$NON-NLS-1$
-
-	/**
-	 * This constant specifies the attribute name that specifies the side of
-	 * the 'start tag' that the validator has used to report an error. A
-	 * validator may choose to report a message at the left (the start of the
-	 * start tag)or at the right (the end of the start tag). When this
-	 * attribute is not specified error ERROR_SIDE_LEFT is the default.
-	 */
-	protected static final String ERROR_SIDE = "ERROR_SIDE"; //$NON-NLS-1$
-
-	/**
-	 * When the ERROR_SIDE attribute specifies the ERROR_SIDE_LEFT value it is
-	 * assumed that the message specifies a location to the left of the start
-	 * tag
-	 */
-	protected static final String ERROR_SIDE_LEFT = "ERROR_SIDE_LEFT"; //$NON-NLS-1$	
-
-	/**
-	 * When the ERROR_SIDE attribute specifies the ERROR_SIDE_RIGHT value it
-	 * is assumed that the message specifies a location to the right of the
-	 * start tag
-	 */
-	protected static final String ERROR_SIDE_RIGHT = "ERROR_SIDE_RIGHT"; //$NON-NLS-1$	
-
-	protected static final String COLUMN_NUMBER_ATTRIBUTE = "columnNumber"; //$NON-NLS-1$
-	protected static final String SQUIGGLE_SELECTION_STRATEGY_ATTRIBUTE = "squiggleSelectionStrategy"; //$NON-NLS-1$
-	protected static final String SQUIGGLE_NAME_OR_VALUE_ATTRIBUTE = "squiggleNameOrValue"; //$NON-NLS-1$
-
-	public DelegatingSourceValidator() {
-		super(); // constructor
-	}
-
-	public void cleanup(IReporter arg0) { // don't need to implement
-	}
-
-	// My Implementation of IHelper
-	class MyHelper implements IProjectValidationContext {
-		InputStream inputStream;
-
-		IFile file;
-
-		public MyHelper(InputStream inputStream, IFile file) {
-			this.inputStream = inputStream;
-			this.file = file;
-		}
-
-		public int getBuildKind() {
-			return 0;
-		}
-
-		public Object loadModel(String symbolicName, Object[] parms) {
-			if (symbolicName.equals("getFile")) { //$NON-NLS-1$
-				return file;
-			}
-			return null;
-		}
-
-		public Object loadModel(String symbolicName) {
-			if (symbolicName.equals("inputStream")) { //$NON-NLS-1$
-				return inputStream;
-			}
-			return null;
-		}
-
-		public String[] getURIs() {
-			if (file != null) {
-				return new String[]{file.getFullPath().toString()};
-			}
-			return new String[0];
-		}
-
-		public IProject getProject() {
-			if (file != null) {
-				return file.getProject();
-			}
-			return null;
-		}
-	}
-
-	// My Implementation of IReporter
-	class MyReporter implements IReporter {
-		List list = new ArrayList();
-
-		public MyReporter() {
-			super();
-		}
-
-		public void addMessage(IValidator origin, IMessage message) {
-			list.add(message);
-		}
-
-		public void displaySubtask(IValidator validator, IMessage message) {
-			/* do not need to implement */
-		}
-
-		public IMessageAccess getMessageAccess() {
-			return null;
-		}
-
-		public boolean isCancelled() {
-			return false;
-		}
-
-		public void removeAllMessages(IValidator origin, Object object) { // do
-			/* do not need to implement */
-		}
-
-		public void removeAllMessages(IValidator origin) {
-			/* do not need to implement */
-		}
-
-		public void removeMessageSubset(IValidator validator, Object obj, String groupName) {// do
-			/* do not need to implement */
-		}
-
-		public List getMessages() {
-			return list;
-		}
-	}
-
-	protected abstract IValidator getDelegateValidator();
-
-	/**
-	 * Calls a delegate validator getting and updates it's list of
-	 * ValidationMessages with a good squiggle offset and length.
-	 * 
-	 * @param helper
-	 *            loads an object.
-	 * @param reporter
-	 *            Is an instance of an IReporter interface, which is used for
-	 *            interaction with the user.
-	 */
-	public void validate(IValidationContext helper, IReporter reporter) throws ValidationException {
-		String[] delta = helper.getURIs();
-		if (delta.length > 0) {
-			// get the file, model and document:
-			IFile file = getFile(delta[0]);
-			IDOMModel xmlModel = getModelForResource(file);
-			try {
-				IDOMDocument document = xmlModel.getDocument();
-
-				// store the text in a byte array; make a full copy to ease
-				// any threading problems
-				byte[] byteArray;
-				try {
-					byteArray = xmlModel.getStructuredDocument().get().getBytes("UTF-8");
-				}
-				catch (UnsupportedEncodingException e) {
-					// Not likely to happen
-					byteArray = xmlModel.getStructuredDocument().get().getBytes();
-				}
-
-				if (isDelegateValidatorEnabled(file)) {
-					IValidator validator = getDelegateValidator();
-					if (validator != null) {
-						// Validate the file:
-						IValidationContext vHelper = new MyHelper(new ByteArrayInputStream(byteArray), file);
-						MyReporter vReporter = new MyReporter();
-						if (validator instanceof IValidatorJob) {
-							((IValidatorJob) validator).validateInJob(vHelper, vReporter);
-						}
-						else {
-							validator.validate(vHelper, vReporter);
-						}
-						List messages = vReporter.list;
-
-						// set the offset and length
-						updateValidationMessages(messages, document, reporter);
-					}
-				}
-			}
-
-
-			finally {
-				if (xmlModel != null) {
-					xmlModel.releaseFromRead();
-				}
-			}
-		}
-	}
-
-	/**
-	 * iterates through the messages and calculates a "better" offset and
-	 * length
-	 * 
-	 * @param messages -
-	 *            a List of IMessages
-	 * @param document -
-	 *            the document
-	 * @param reporter -
-	 *            the reporter the messages are to be added to
-	 */
-	protected void updateValidationMessages(List messages, IDOMDocument document, IReporter reporter) {
-		for (int i = 0; i < messages.size(); i++) {
-			IMessage message = (IMessage) messages.get(i);
-			try {
-				if (message.getAttribute(COLUMN_NUMBER_ATTRIBUTE) != null) {
-					int column = ((Integer) message.getAttribute(COLUMN_NUMBER_ATTRIBUTE)).intValue();
-					String selectionStrategy = (String) message.getAttribute(SQUIGGLE_SELECTION_STRATEGY_ATTRIBUTE);
-					String nameOrValue = (String) message.getAttribute(SQUIGGLE_NAME_OR_VALUE_ATTRIBUTE);
-
-					// convert the line and Column numbers to an offset:
-					int start = document.getStructuredDocument().getLineOffset(message.getLineNumber() - 1) + column - 1;
-
-					// calculate the "better" start and end offset:
-					int[] result = computeStartAndEndLocation(start, selectionStrategy, getErrorSide(message), nameOrValue, document);
-					if (result != null) {
-						message.setOffset(result[0]);
-						message.setLength(result[1] - result[0]);
-						reporter.addMessage(this, message);
-					}
-				}
-			}
-			catch (BadLocationException e) { // this exception should not
-				// occur - it is thrown if
-				// trying to convert an
-				// invalid line number to and
-				// offset
-			}
-
-		}
-	}
-
-	/**
-	 * @param delta
-	 *            the IFileDelta containing the file name to get
-	 * @return the IFile
-	 */
-	public IFile getFile(String delta) {
-		IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(delta));
-		if (file != null && file.exists())
-		  return file;
-		return null;
-	}
-
-	/**
-	 * 
-	 * @param file
-	 *            the file to get the model for
-	 * @return the file's XMLModel
-	 */
-	protected IDOMModel getModelForResource(IFile file) {
-		IStructuredModel model = null;
-		IModelManager manager = StructuredModelManager.getModelManager();
-
-		try {
-			model = manager.getModelForRead(file);
-			// TODO.. HTML validator tries again to get a model a 2nd way
-		}
-		catch (Exception e) {
-			// e.printStackTrace();
-		}
-
-		return model instanceof IDOMModel ? (IDOMModel) model : null;
-	}
-
-	/**
-	 * @deprecated use computeStartEndLocation(int startOffset, String
-	 *             errorMessage, String selectionStrategy, boolean leftError,
-	 *             String nameOrValue, IDOMDocument document) {
-	 * 
-	 */
-	protected int[] computeStartEndLocation(int startOffset, String errorMessage, String selectionStrategy, String nameOrValue, IDOMDocument document) {
-		return computeStartAndEndLocation(startOffset, selectionStrategy, ERROR_SIDE_RIGHT, nameOrValue, document);
-	}
-
-	/**
-	 * Calculates the "better" offsets.
-	 * 
-	 * @param startOffset -
-	 *            the offset given by Xerces
-	 * @param errorMessage -
-	 *            the Xerces error Message
-	 * @param selectionStrategy -
-	 *            the selectionStrategy
-	 * @param document -
-	 *            the document
-	 * @return int[] - position 0 has the start offset of the squiggle range,
-	 *         position 1 has the endOffset
-	 */
-	/*
-	 * The way the offsets is calculated is: - find the indexed region
-	 * (element) closest to the given offset - if we are between two elements,
-	 * choosing left or right element will depend on parameter 'errorSide' -
-	 * based on the selectionStrategy choose the underlining strategy (eg
-	 * START_TAG means underline the start tag of that element) - use
-	 * information from nameOrValue and the DOM to get better offsets
-	 * 
-	 */
-	protected int[] computeStartAndEndLocation(int startOffset, String selectionStrategy, String errorSide, String nameOrValue, IDOMDocument document) {
-		try {
-			int startEndPositions[] = new int[2];
-
-			IndexedRegion region = document.getModel().getIndexedRegion(startOffset);
-			IndexedRegion prevRegion = document.getModel().getIndexedRegion(startOffset - 1);
-
-			if (prevRegion != region) {
-				// if between two regions we use the 'errorSide' to understand
-				// which
-				// element is applicable. if we know the error has been
-				// reported to the
-				// right of the tag, then we can assume we need to step back
-				// to the previous
-				// region to land at the 'correct location. Otherwise assume
-				// we're
-				// exactly where we need to be.
-				if (ERROR_SIDE_LEFT.equals(errorSide)) {
-					region = prevRegion;
-				}
-			}
-
-			// initialize start and end positions to be the start positions
-			// this means if the
-			// special case is not taken care of below the start and end
-			// offset are set to be
-			// the start of the region where the error was
-			if (region != null) {
-				startEndPositions[0] = region.getStartOffset();
-				startEndPositions[1] = startEndPositions[0];
-			}
-			else { // this will message will not get added to the IReporter
-				// since the length is 0
-				startEndPositions[0] = 0;
-				startEndPositions[1] = 0;
-			}
-			if (region instanceof Node) {
-				Node node = (Node) region;
-
-				if (START_TAG.equals(selectionStrategy)) {// then we want to
-					// underline the opening tag
-					if (node.getNodeType() == Node.ELEMENT_NODE) {
-						IDOMElement element = (IDOMElement) node;
-						startEndPositions[0] = element.getStartOffset() + 1;
-						startEndPositions[1] = startEndPositions[0] + element.getTagName().length();
-					}
-				}
-				else if (END_TAG.equals(selectionStrategy)) {// then we want to
-					// underline the end tag
-					if (node.getNodeType() == Node.ELEMENT_NODE) {
-						IDOMElement element = (IDOMElement) node;
-						startEndPositions[0] = element.getEndStartOffset();
-						startEndPositions[1] = element.getEndOffset();
-					}
-				}
-				else if (ATTRIBUTE_NAME.equals(selectionStrategy)) { // in
-					// underline the attribute's name
-					if (node.getNodeType() == Node.ELEMENT_NODE) {
-						IDOMElement element = (IDOMElement) node;
-						IDOMNode attributeNode = (IDOMNode) (element.getAttributeNode(nameOrValue));
-						if (attributeNode != null) {
-							startEndPositions[0] = attributeNode.getStartOffset();
-							startEndPositions[1] = attributeNode.getStartOffset() + nameOrValue.length();
-						}
-					}
-				}
-				else if (ATTRIBUTE_VALUE.equals(selectionStrategy)) {
-					// underline the attribute's value
-					if (node.getNodeType() == Node.ELEMENT_NODE) {
-						IDOMElement element = (IDOMElement) node;
-						IDOMAttr attributeNode = (IDOMAttr) (element.getAttributeNode(nameOrValue));
-						if (attributeNode != null) {
-							startEndPositions[0] = attributeNode.getValueRegionStartOffset();
-							startEndPositions[1] = startEndPositions[0] + attributeNode.getValueRegionText().length();
-						}
-					}
-				}
-				else if (ALL_ATTRIBUTES.equals(selectionStrategy)) {
-					// underline all attributes
-					if (node.getNodeType() == Node.ELEMENT_NODE) {
-						IDOMElement element = (IDOMElement) node;
-						NamedNodeMap attributes = element.getAttributes();
-						if (attributes != null) {
-							IDOMNode first = (IDOMNode) attributes.item(0);
-							IDOMNode last = (IDOMNode) attributes.item(attributes.getLength() - 1);
-							if ((first != null) && (last != null)) {
-								startEndPositions[0] = first.getStartOffset();
-								startEndPositions[1] = last.getEndOffset();
-							}
-						}
-					}
-				}
-				else if (TEXT.equals(selectionStrategy)) {
-					// underline the text between the tags
-					if (node.getNodeType() == Node.TEXT_NODE) {
-						IDOMText textNode = (IDOMText) node;
-						int start = textNode.getStartOffset();
-						String value = textNode.getNodeValue();
-						int index = 0;
-						char curChar = value.charAt(index);
-						// here we are finding start offset by skipping over
-						// whitespace:
-						while ((curChar == '\n') || (curChar == '\t') || (curChar == '\r') || (curChar == ' ')) {
-							curChar = value.charAt(index);
-							index++;
-						}
-						if (index > 0) {
-							index--;
-
-						}
-						start = start + index;
-						startEndPositions[0] = start + index;
-						startEndPositions[1] = start + value.trim().length();
-					}
-					else if (node.getNodeType() == Node.ELEMENT_NODE) {
-						IDOMElement element = (IDOMElement) node;
-						Node child = element.getFirstChild();
-						if (child instanceof IDOMNode) {
-							IDOMNode xmlChild = ((IDOMNode) child);
-							startEndPositions[0] = xmlChild.getStartOffset();
-							startEndPositions[1] = xmlChild.getEndOffset();
-						}
-					}
-				}
-				else if (FIRST_NON_WHITESPACE_TEXT.equals(selectionStrategy)) {
-					// search through all child nodes and return range of
-					// first non-whitespace
-					// text node
-					if (node.getNodeType() == Node.ELEMENT_NODE) {
-						NodeList nodes = node.getChildNodes();
-						for (int i = 0; i < nodes.getLength(); i++) {
-							Node currentNode = nodes.item(i);
-							if (currentNode.getNodeType() == Node.TEXT_NODE) {
-								// TODO (Trung) I don't think we should call
-								// getNodeValue(), trim(), length()
-								// repeatedly.
-								// This is inefficient, to improve use local
-								// variables to store values.
-								IDOMText textNode = (IDOMText) currentNode;
-								if (textNode.getNodeValue().trim().length() > 0) {
-									String value = textNode.getNodeValue();
-									int index = 0;
-									int start = textNode.getStartOffset();
-									char curChar = value.charAt(index);
-									// here we are finding start offset by
-									// skipping over whitespace:
-									while ((curChar == '\n') || (curChar == '\t') || (curChar == '\r') || (curChar == ' ')) {
-										curChar = value.charAt(index);
-										index++;
-									}
-									if (index > 0) {
-										index--;
-
-									}
-									start = start + index;
-									startEndPositions[0] = start;
-									startEndPositions[1] = start + value.trim().length();
-									break;
-								}
-							}
-
-						}
-					}
-				}
-
-				else if (TEXT_ENTITY_REFERENCE.equals(selectionStrategy)) {
-					if (node.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
-						startEndPositions[0] = region.getStartOffset();
-						startEndPositions[1] = region.getEndOffset();
-					}
-					else if (node.getNodeType() == Node.ELEMENT_NODE) {
-						/*
-						 * In this case the undeclared entity might be in one
-						 * of the attribute values. Search through the
-						 * attributes to find the range of the undeclared
-						 * entity.
-						 */
-						String entity = "&" + nameOrValue + ";"; //$NON-NLS-1$ //$NON-NLS-2$
-						NamedNodeMap attributes = node.getAttributes();
-						for (int i = 0; i < attributes.getLength(); i++) {
-							IDOMAttr attr = (IDOMAttr) attributes.item(i);
-							String nodeValue = attr.getNodeValue();
-							int index = nodeValue.indexOf(entity);
-							if (index != -1) {
-								startEndPositions[0] = attr.getValueRegionStartOffset() + index + 1;
-								startEndPositions[1] = startEndPositions[0] + entity.length();
-							}
-						}
-					}
-
-				}
-				else if (VALUE_OF_ATTRIBUTE_WITH_GIVEN_VALUE.equals(selectionStrategy)) {
-					// TODO (Trung) do we really need this strategy ?
-					// If we know the name of the name of the attribute, we
-					// can retrieve its value.
-					// Hence, we can incoperate this strategy with
-					// ATTRIBUTE_VALUE ?
-					if (node.getNodeType() == Node.ELEMENT_NODE) {
-						// here we will search through all attributes for the
-						// one with the
-						// with the value we want:
-						// TODO (Trung) I see a potential problem here.
-						// What happens when there is another attribute having
-						// the same value
-						// with this attribute's buggy value ?
-						// Need to solve when time permits.
-						NamedNodeMap attributes = node.getAttributes();
-						for (int i = 0; i < attributes.getLength(); i++) {
-							IDOMAttr attr = (IDOMAttr) attributes.item(i);
-							String nodeValue = attr.getNodeValue().trim();
-							if (nodeValue.equals(nameOrValue)) {
-								startEndPositions[0] = attr.getValueRegionStartOffset() + 1;
-								startEndPositions[1] = startEndPositions[0] + nodeValue.length();
-								break;
-							}
-						}
-					}
-				}
-			}
-			return startEndPositions;
-		}
-		// catch (Exception e) { // e.printStackTrace();
-		// }
-		finally {
-		}
-		// return null;
-	}
-
-	/**
-	 * Returns true if delegate validator is enabled based on Validation
-	 * preferences
-	 * 
-	 * @param file
-	 * @return false if delegate validator is not enabled based on Validatoin
-	 *         preferences, true otherwise
-	 */
-	protected boolean isDelegateValidatorEnabled(IFile file) {
-		return true;
-	}
-
-	protected String getErrorSide(IMessage message) {
-		// note that if the ERROR_SIDE is unspecified we return the default
-		// value ERROR_SIDE_LEFT
-		Object value = message.getAttribute(ERROR_SIDE);
-		return ERROR_SIDE_RIGHT.equals(value) ? ERROR_SIDE_RIGHT : ERROR_SIDE_LEFT;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidatorForXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidatorForXML.java
deleted file mode 100644
index 414a85b..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidatorForXML.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xml.ui.internal.validation;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.validation.ValidationFramework;
-import org.eclipse.wst.validation.Validator;
-import org.eclipse.wst.validation.internal.provisional.core.IValidator;
-
-/**
- * This performs as you type validation for XML files
- */
-public class DelegatingSourceValidatorForXML extends DelegatingSourceValidator
-{
-  private final static String Id = "org.eclipse.wst.xml.core.xml"; //$NON-NLS-1$
-
-  private Validator _validator;
-
-  public DelegatingSourceValidatorForXML()
-  {
-  }
-
-  private Validator getValidator()
-  {
-    if (_validator == null)
-      _validator = ValidationFramework.getDefault().getValidator(Id);
-    return _validator;
-  }
-
-  protected IValidator getDelegateValidator()
-  {
-    Validator v = getValidator();
-    if (v == null)
-      return null;
-    return v.asIValidator();
-  }
-
-  protected boolean isDelegateValidatorEnabled(IFile file)
-  {
-    Validator v = getValidator();
-    if (v == null)
-      return false;
-    if (!v.shouldValidate(file, false, false))
-      return false;
-    return v.isBuildValidation() || v.isManualValidation();
-  }
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupQuickAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupQuickAssistProcessor.java
deleted file mode 100644
index c8c876c..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupQuickAssistProcessor.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.validation;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
-import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.correction.ProblemIDsXML;
-import org.eclipse.wst.xml.ui.internal.correction.RemoveUnknownElementQuickFixProposal;
-import org.eclipse.wst.xml.ui.internal.correction.RenameInFileQuickAssistProposal;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-
-/**
- * Quick assist processor for problems found by the markup validator
- */
-class MarkupQuickAssistProcessor implements IQuickAssistProcessor {
-	private int fProblemId;
-	private Object fAdditionalFixInfo = null;
-
-	public boolean canAssist(IQuickAssistInvocationContext invocationContext) {
-		return false;
-	}
-
-	public boolean canFix(Annotation annotation) {
-		boolean result = false;
-
-		switch (fProblemId) {
-			case ProblemIDsXML.EmptyTag :
-			case ProblemIDsXML.MissingEndTag :
-			case ProblemIDsXML.AttrsInEndTag :
-			case ProblemIDsXML.MissingAttrValue :
-			case ProblemIDsXML.NoAttrValue :
-			case ProblemIDsXML.SpacesBeforeTagName :
-			case ProblemIDsXML.SpacesBeforePI :
-			case ProblemIDsXML.NamespaceInPI :
-			case ProblemIDsXML.UnknownElement :
-			case ProblemIDsXML.UnknownAttr :
-			case ProblemIDsXML.InvalidAttrValue :
-			case ProblemIDsXML.MissingRequiredAttr :
-			case ProblemIDsXML.AttrValueNotQuoted :
-			case ProblemIDsXML.MissingClosingBracket :
-				result = true;
-		}
-
-		return result;
-	}
-
-	public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
-		ArrayList proposals = new ArrayList();
-
-		switch (fProblemId) {
-			case ProblemIDsXML.EmptyTag :
-				proposals.add(new CompletionProposal("", invocationContext.getOffset(), invocationContext.getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_0, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				break;
-			case ProblemIDsXML.MissingEndTag :
-				String tagName = (String) ((Object[]) fAdditionalFixInfo)[0];
-				String tagClose = (String) ((Object[]) fAdditionalFixInfo)[1];
-				int tagCloseOffset = ((Integer) ((Object[]) fAdditionalFixInfo)[2]).intValue();
-				int startTagEndOffset = ((Integer) ((Object[]) fAdditionalFixInfo)[3]).intValue();
-				int firstChildStartOffset = ((Integer) ((Object[]) fAdditionalFixInfo)[4]).intValue();
-				int endOffset = ((Integer) ((Object[]) fAdditionalFixInfo)[5]).intValue();
-				proposals.add(new CompletionProposal(tagClose, tagCloseOffset, 0, 0, getImage(), XMLUIMessages.QuickFixProcessorXML_1, null, "")); //$NON-NLS-1$ 
-				proposals.add(new CompletionProposal("", invocationContext.getOffset(), startTagEndOffset - invocationContext.getOffset(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_2, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				proposals.add(new CompletionProposal("</" + tagName + ">", firstChildStartOffset, 0, 0, getImage(), XMLUIMessages.QuickFixProcessorXML_3, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-				proposals.add(new CompletionProposal("</" + tagName + ">", endOffset, 0, 0, getImage(), XMLUIMessages.QuickFixProcessorXML_4, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-				break;
-			case ProblemIDsXML.AttrsInEndTag :
-				proposals.add(new CompletionProposal("", invocationContext.getOffset(), invocationContext.getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_5, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				break;
-			case ProblemIDsXML.MissingAttrValue :
-				String defaultAttrValue = (String) ((Object[]) fAdditionalFixInfo)[0];
-				int insertOffset = ((Integer) ((Object[]) fAdditionalFixInfo)[1]).intValue();
-				proposals.add(new CompletionProposal("\"" + defaultAttrValue + "\"", invocationContext.getOffset() + invocationContext.getLength() + insertOffset, 0, defaultAttrValue.length() + 2, getImage(), XMLUIMessages.QuickFixProcessorXML_6, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-				proposals.add(new CompletionProposal("", invocationContext.getOffset(), invocationContext.getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_7, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				break;
-			case ProblemIDsXML.NoAttrValue :
-				defaultAttrValue = (String) fAdditionalFixInfo;
-				proposals.add(new CompletionProposal("=\"" + defaultAttrValue + "\"", invocationContext.getOffset() + invocationContext.getLength(), 0, defaultAttrValue.length() + 3, getImage(), XMLUIMessages.QuickFixProcessorXML_6, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-				proposals.add(new CompletionProposal("", invocationContext.getOffset(), invocationContext.getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_7, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				break;
-			case ProblemIDsXML.SpacesBeforeTagName :
-				proposals.add(new CompletionProposal("", invocationContext.getOffset(), invocationContext.getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_8, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				break;
-			case ProblemIDsXML.SpacesBeforePI :
-				proposals.add(new CompletionProposal("", invocationContext.getOffset(), invocationContext.getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_9, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				break;
-			case ProblemIDsXML.NamespaceInPI :
-				proposals.add(new CompletionProposal("", invocationContext.getOffset(), invocationContext.getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_10, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				break;
-			case ProblemIDsXML.UnknownElement :
-				proposals.add(new RemoveUnknownElementQuickFixProposal(fAdditionalFixInfo, getImage(), XMLUIMessages.QuickFixProcessorXML_11));
-				proposals.add(new RenameInFileQuickAssistProposal());
-				break;
-			case ProblemIDsXML.UnknownAttr :
-				proposals.add(new CompletionProposal("", invocationContext.getOffset(), invocationContext.getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_7, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				proposals.add(new RenameInFileQuickAssistProposal());
-				break;
-			case ProblemIDsXML.InvalidAttrValue :
-				proposals.add(new CompletionProposal("", invocationContext.getOffset(), invocationContext.getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_12, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				break;
-			case ProblemIDsXML.MissingRequiredAttr :
-				String requiredAttr = (String) ((Object[]) fAdditionalFixInfo)[0];
-				insertOffset = ((Integer) ((Object[]) fAdditionalFixInfo)[1]).intValue();
-				proposals.add(new CompletionProposal(requiredAttr, invocationContext.getOffset() + insertOffset, 0, requiredAttr.length(), getImage(), XMLUIMessages.QuickFixProcessorXML_13, null, "")); //$NON-NLS-1$ 
-				break;
-			case ProblemIDsXML.AttrValueNotQuoted :
-				String attrValue = (String) fAdditionalFixInfo;
-				proposals.add(new CompletionProposal("\"" + attrValue + "\"", invocationContext.getOffset(), invocationContext.getLength(), attrValue.length() + 2, getImage(), XMLUIMessages.QuickFixProcessorXML_14, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-				break;
-			case ProblemIDsXML.MissingClosingBracket :
-				proposals.add(new CompletionProposal(">", invocationContext.getOffset() + invocationContext.getLength(), 0, 1, getImage(), XMLUIMessages.QuickFixProcessorXML_15, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ 
-				break;
-		}
-		return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
-	}
-
-	public String getErrorMessage() {
-		return null;
-	}
-
-	private Image getImage() {
-		return XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_CORRECTION_CHANGE);
-	}
-
-	public void setProblemId(int problemId) {
-		fProblemId = problemId;
-	}
-
-	public void setAdditionalFixInfo(Object fixInfo) {
-		fAdditionalFixInfo = fixInfo;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupValidator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupValidator.java
deleted file mode 100644
index a23c8f2..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupValidator.java
+++ /dev/null
@@ -1,738 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.internal.validation;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.ui.internal.reconcile.AbstractStructuredTextReconcilingStrategy;
-import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey;
-import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
-import org.eclipse.wst.sse.ui.internal.reconcile.validator.AnnotationInfo;
-import org.eclipse.wst.sse.ui.internal.reconcile.validator.ISourceValidator;
-import org.eclipse.wst.sse.ui.internal.reconcile.validator.IncrementalReporter;
-import org.eclipse.wst.validation.internal.core.ValidationException;
-import org.eclipse.wst.validation.internal.operations.LocalizedMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-import org.eclipse.wst.validation.internal.provisional.core.IValidator;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.correction.ProblemIDsXML;
-import org.w3c.dom.Node;
-
-/**
- * Basic XML syntax checking step. Only used as ISourceValidator at the
- * moment
- * 
- * @author pavery
- */
-public class MarkupValidator implements IValidator, ISourceValidator {
-	private String DQUOTE = "\""; //$NON-NLS-1$
-
-	protected String SEVERITY_ATTR_MISSING_VALUE = TemporaryAnnotation.ANNOT_ERROR;
-	protected String SEVERITY_ATTR_NO_VALUE = TemporaryAnnotation.ANNOT_ERROR;
-	// severities for the problems discoverable by this reconciler; possibly
-	// user configurable later
-	protected String SEVERITY_GENERIC_ILLFORMED_SYNTAX = TemporaryAnnotation.ANNOT_WARNING;
-	protected String SEVERITY_STRUCTURE = TemporaryAnnotation.ANNOT_ERROR;
-	protected String SEVERITY_SYNTAX_ERROR = TemporaryAnnotation.ANNOT_ERROR;
-	// used for attribute quote checking
-	private String SQUOTE = "'"; //$NON-NLS-1$
-	private final String QUICKASSISTPROCESSOR = IQuickAssistProcessor.class.getName();
-
-	private IDocument fDocument;
-
-	private void addAttributeError(String messageText, String attributeValueText, int start, int length, int problemId, IStructuredDocumentRegion sdRegion, IReporter reporter) {
-
-		if (sdRegion.isDeleted()) {
-			return;
-		}
-
-		int lineNo = getLineNumber(start);
-		LocalizedMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, messageText);
-		message.setOffset(start);
-		message.setLength(length);
-		message.setLineNo(lineNo);
-
-		MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
-		processor.setProblemId(problemId);
-		processor.setAdditionalFixInfo(attributeValueText);
-		message.setAttribute(QUICKASSISTPROCESSOR, processor);
-
-		AnnotationInfo info = new AnnotationInfo(message);
-		((IncrementalReporter) reporter).addAnnotationInfo(this, info);
-	}
-
-	private void checkAttributesInEndTag(IStructuredDocumentRegion structuredDocumentRegion, IReporter reporter) {
-
-		if (structuredDocumentRegion.isDeleted()) {
-			return;
-		}
-
-		ITextRegionList textRegions = structuredDocumentRegion.getRegions();
-		int errorCount = 0;
-		int start = structuredDocumentRegion.getEndOffset();
-		int end = structuredDocumentRegion.getEndOffset();
-		for (int i = 0; (i < textRegions.size()) && (errorCount < AbstractStructuredTextReconcilingStrategy.ELEMENT_ERROR_LIMIT) && !structuredDocumentRegion.isDeleted(); i++) {
-			ITextRegion textRegion = textRegions.get(i);
-			if ((textRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) || (textRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) || (textRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)) {
-				if (start > structuredDocumentRegion.getStartOffset(textRegion)) {
-					start = structuredDocumentRegion.getStartOffset(textRegion);
-				}
-				end = structuredDocumentRegion.getEndOffset(textRegion);
-				errorCount++;
-			}
-		}
-		// create one error for all attributes in the end tag
-		if (errorCount > 0) {
-			// Position p = new Position(start, end - start);
-			String messageText = XMLUIMessages.End_tag_has_attributes;
-			LocalizedMessage message = new LocalizedMessage(IMessage.NORMAL_SEVERITY, messageText);
-			message.setOffset(start);
-			message.setLength(end - start);
-			message.setLineNo(getLineNumber(start));
-
-			MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
-			processor.setProblemId(ProblemIDsXML.AttrsInEndTag);
-			message.setAttribute(QUICKASSISTPROCESSOR, processor);
-
-			AnnotationInfo info = new AnnotationInfo(message);
-			((IncrementalReporter) reporter).addAnnotationInfo(this, info);
-		}
-	}
-
-
-	private void checkClosingBracket(IStructuredDocumentRegion structuredDocumentRegion, IReporter reporter) {
-
-		if (structuredDocumentRegion.isDeleted()) {
-			return;
-		}
-
-		ITextRegionList regions = structuredDocumentRegion.getRegions();
-		ITextRegion r = null;
-		boolean closed = false;
-		for (int i = 0; (i < regions.size()) && !structuredDocumentRegion.isDeleted(); i++) {
-			r = regions.get(i);
-			if ((r.getType() == DOMRegionContext.XML_TAG_CLOSE) || (r.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE)) {
-				closed = true;
-			}
-		}
-		if (!closed) {
-
-			String messageText = XMLUIMessages.ReconcileStepForMarkup_6;
-
-			int start = structuredDocumentRegion.getStartOffset();
-			int length = structuredDocumentRegion.getText().trim().length();
-			int lineNo = getLineNumber(start);
-
-			LocalizedMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, messageText);
-			message.setOffset(start);
-			message.setLength(length);
-			message.setLineNo(lineNo);
-
-			MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
-			processor.setProblemId(ProblemIDsXML.MissingClosingBracket);
-			message.setAttribute(QUICKASSISTPROCESSOR, processor);
-
-			AnnotationInfo info = new AnnotationInfo(message);
-			((IncrementalReporter) reporter).addAnnotationInfo(this, info);
-		}
-	}
-
-	private void checkEmptyTag(IStructuredDocumentRegion structuredDocumentRegion, IReporter reporter) {
-
-		if (structuredDocumentRegion.isDeleted()) {
-			return;
-		}
-
-		// navigate to name
-		ITextRegionList regions = structuredDocumentRegion.getRegions();
-		if (regions.size() == 2) {
-			// missing name region
-			if ((regions.get(0).getType() == DOMRegionContext.XML_TAG_OPEN) && (regions.get(1).getType() == DOMRegionContext.XML_TAG_CLOSE)) {
-				String messageText = XMLUIMessages.ReconcileStepForMarkup_3;
-				int start = structuredDocumentRegion.getStartOffset();
-				int length = structuredDocumentRegion.getLength();
-				int lineNo = getLineNumber(start);
-
-				LocalizedMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, messageText);
-				message.setOffset(start);
-				message.setLength(length);
-				message.setLineNo(lineNo);
-
-				MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
-				processor.setProblemId(ProblemIDsXML.EmptyTag);
-				message.setAttribute(QUICKASSISTPROCESSOR, processor);
-
-				AnnotationInfo info = new AnnotationInfo(message);
-				((IncrementalReporter) reporter).addAnnotationInfo(this, info);
-			}
-		}
-	}
-
-	private int getLineNumber(int start) {
-		int lineNo = -1;
-		try {
-			lineNo = getDocument().getLineOfOffset(start);
-		}
-		catch (BadLocationException e) {
-			Logger.logException(e);
-		}
-		return lineNo;
-	}
-
-	private void checkForAttributeValue(IStructuredDocumentRegion structuredDocumentRegion, IReporter reporter) {
-
-		if (structuredDocumentRegion.isDeleted()) {
-			return;
-		}
-
-		// check for attributes without a value
-		// track the attribute/equals/value sequence using a state of 0, 1 ,2
-		// representing the name, =, and value, respectively
-		int attrState = 0;
-		ITextRegionList textRegions = structuredDocumentRegion.getRegions();
-		// ReconcileAnnotationKey key = createKey(structuredDocumentRegion,
-		// getScope());
-
-		int errorCount = 0;
-		for (int i = 0; (i < textRegions.size()) && (errorCount < AbstractStructuredTextReconcilingStrategy.ELEMENT_ERROR_LIMIT); i++) {
-			ITextRegion textRegion = textRegions.get(i);
-			if ((textRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) || isTagCloseTextRegion(textRegion)) {
-				// dangling name and '='
-				if ((attrState == 2) && (i >= 2)) {
-					// create annotation
-					ITextRegion nameRegion = textRegions.get(i - 2);
-					if (!(nameRegion instanceof ITextRegionContainer)) {
-						Object[] args = {structuredDocumentRegion.getText(nameRegion)};
-						String messageText = NLS.bind(XMLUIMessages.Attribute__is_missing_a_value, args);
-
-						int start = structuredDocumentRegion.getStartOffset(nameRegion);
-						int end = structuredDocumentRegion.getEndOffset();
-						int lineNo = getLineNumber(start);
-						int textLength = structuredDocumentRegion.getText(nameRegion).trim().length();
-
-						LocalizedMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, messageText);
-						message.setOffset(start);
-						message.setLength(textLength);
-						message.setLineNo(lineNo);
-
-						// quick fix info
-						ITextRegion equalsRegion = textRegions.get(i - 2 + 1);
-						int insertOffset = structuredDocumentRegion.getTextEndOffset(equalsRegion) - end;
-						Object[] additionalFixInfo = {structuredDocumentRegion.getText(nameRegion), new Integer(insertOffset)};
-
-						MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
-						processor.setProblemId(ProblemIDsXML.MissingAttrValue);
-						processor.setAdditionalFixInfo(additionalFixInfo);
-						message.setAttribute(QUICKASSISTPROCESSOR, processor);
-
-						AnnotationInfo info = new AnnotationInfo(message);
-
-						((IncrementalReporter) reporter).addAnnotationInfo(this, info);
-
-						// annotation.setAdditionalFixInfo(additionalFixInfo);
-						// results.add(annotation);
-						errorCount++;
-					}
-				}
-				// name but no '=' (XML only)
-				else if ((attrState == 1) && (i >= 1)) {
-					// create annotation
-					ITextRegion previousRegion = textRegions.get(i - 1);
-					if (!(previousRegion instanceof ITextRegionContainer)) {
-						Object[] args = {structuredDocumentRegion.getText(previousRegion)};
-						String messageText = NLS.bind(XMLUIMessages.Attribute__has_no_value, args);
-						int start = structuredDocumentRegion.getStartOffset(previousRegion);
-						int textLength = structuredDocumentRegion.getText(previousRegion).trim().length();
-						int lineNo = getLineNumber(start);
-
-						LocalizedMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, messageText);
-						message.setOffset(start);
-						message.setLength(textLength);
-						message.setLineNo(lineNo);
-
-						MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
-						processor.setProblemId(ProblemIDsXML.NoAttrValue);
-						processor.setAdditionalFixInfo(structuredDocumentRegion.getText(previousRegion));
-						message.setAttribute(QUICKASSISTPROCESSOR, processor);
-
-						AnnotationInfo info = new AnnotationInfo(message);
-
-						((IncrementalReporter) reporter).addAnnotationInfo(this, info);
-
-						errorCount++;
-					}
-				}
-				attrState = 1;
-			}
-			else if (textRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) {
-				attrState = 2;
-			}
-			else if (textRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-				attrState = 0;
-			}
-		}
-
-	}
-
-	private void checkForSpaceBeforeName(IStructuredDocumentRegion structuredDocumentRegion, IReporter reporter) {
-
-		if (structuredDocumentRegion.isDeleted()) {
-			return;
-		}
-
-		String sdRegionText = structuredDocumentRegion.getFullText();
-		if (sdRegionText.startsWith(" ")) { //$NON-NLS-1$
-			IStructuredDocumentRegion prev = structuredDocumentRegion.getPrevious();
-			if (prev != null) {
-				// this is possibly the case of "< tag"
-				if ((prev.getRegions().size() == 1) && isStartTag(prev)) {
-					// add the error for preceding space in tag name
-					String messageText = XMLUIMessages.ReconcileStepForMarkup_2;
-					int start = structuredDocumentRegion.getStartOffset();
-					// find length of whitespace
-					int length = sdRegionText.trim().equals("") ? sdRegionText.length() : sdRegionText.indexOf(sdRegionText.trim()); //$NON-NLS-1$
-
-					LocalizedMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, messageText);
-					message.setOffset(start);
-					message.setLength(length);
-					message.setLineNo(getLineNumber(start));
-
-					MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
-					processor.setProblemId(ProblemIDsXML.SpacesBeforeTagName);
-					message.setAttribute(QUICKASSISTPROCESSOR, processor);
-
-					AnnotationInfo info = new AnnotationInfo(message);
-					((IncrementalReporter) reporter).addAnnotationInfo(this, info);
-				}
-			}
-		}
-	}
-
-	private void checkNoNamespaceInPI(IStructuredDocumentRegion structuredDocumentRegion, IReporter reporter) {
-
-		if (structuredDocumentRegion.isDeleted()) {
-			return;
-		}
-
-		// navigate to name
-		ITextRegionList regions = structuredDocumentRegion.getRegions();
-		ITextRegion r = null;
-		int errorCount = 0;
-		for (int i = 0; (i < regions.size()) && (errorCount < AbstractStructuredTextReconcilingStrategy.ELEMENT_ERROR_LIMIT) && !structuredDocumentRegion.isDeleted(); i++) {
-			r = regions.get(i);
-			if (r.getType() == DOMRegionContext.XML_TAG_NAME) {
-				String piText = structuredDocumentRegion.getText(r);
-				int index = piText.indexOf(":"); //$NON-NLS-1$
-				if (index != -1) {
-					String messageText = XMLUIMessages.ReconcileStepForMarkup_4;
-					int start = structuredDocumentRegion.getStartOffset(r) + index;
-					int length = piText.trim().length() - index;
-
-					LocalizedMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, messageText);
-					message.setOffset(start);
-					message.setLength(length);
-					message.setLineNo(getLineNumber(start));
-
-					MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
-					processor.setProblemId(ProblemIDsXML.NamespaceInPI);
-					message.setAttribute(QUICKASSISTPROCESSOR, processor);
-
-					AnnotationInfo info = new AnnotationInfo(message);
-					((IncrementalReporter) reporter).addAnnotationInfo(this, info);
-
-					errorCount++;
-				}
-			}
-		}
-	}
-
-	private void checkQuotesForAttributeValues(IStructuredDocumentRegion structuredDocumentRegion, IReporter reporter) {
-		ITextRegionList regions = structuredDocumentRegion.getRegions();
-		ITextRegion r = null;
-		String attrValueText = ""; //$NON-NLS-1$
-		int errorCount = 0;
-		for (int i = 0; (i < regions.size()) && (errorCount < AbstractStructuredTextReconcilingStrategy.ELEMENT_ERROR_LIMIT); i++) {
-			r = regions.get(i);
-			if (r.getType() != DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-				continue;
-			}
-
-			attrValueText = structuredDocumentRegion.getText(r);
-			// attribute value includes quotes in the string
-			// split up attribute value on quotes
-			/*
-			 * WORKAROUND till
-			 * http://dev.icu-project.org/cgi-bin/icu-bugs/incoming?findid=5207
-			 * is fixed. (Also see BUG143628)
-			 */
-
-			java.util.StringTokenizer st = new java.util.StringTokenizer(attrValueText, "\"'", true); //$NON-NLS-1$
-			int size = st.countTokens();
-			// get the pieces of the attribute value
-			String one = "", two = ""; //$NON-NLS-1$ //$NON-NLS-2$
-			if (size > 0) {
-				one = st.nextToken();
-			}
-			if (size > 1) {
-				two = st.nextToken();
-			}
-			if (size > 2) {
-				// should be handled by parsing...
-				// as in we can't have an attribute value like: <element
-				// attr="a"b"c"/>
-				// and <element attr='a"b"c' /> is legal
-				continue;
-			}
-
-
-			if (size == 1) {
-				if (one.equals(DQUOTE) || one.equals(SQUOTE)) {
-					// missing closing quote
-					String message = XMLUIMessages.ReconcileStepForMarkup_0;
-					addAttributeError(message, attrValueText, structuredDocumentRegion.getStartOffset(r), attrValueText.trim().length(), ProblemIDsXML.Unclassified, structuredDocumentRegion, reporter);
-					errorCount++;
-				}
-				else {
-					// missing both
-					String message = XMLUIMessages.ReconcileStepForMarkup_1;
-					addAttributeError(message, attrValueText, structuredDocumentRegion.getStartOffset(r), attrValueText.trim().length(), ProblemIDsXML.AttrValueNotQuoted, structuredDocumentRegion, reporter);
-					errorCount++;
-				}
-			}
-			else if (size == 2) {
-				if ((one.equals(SQUOTE) && !two.equals(SQUOTE)) || (one.equals(DQUOTE) && !two.equals(DQUOTE))) {
-					// missing closing quote
-					String message = XMLUIMessages.ReconcileStepForMarkup_0;
-					addAttributeError(message, attrValueText, structuredDocumentRegion.getStartOffset(r), attrValueText.trim().length(), ProblemIDsXML.Unclassified, structuredDocumentRegion, reporter);
-					errorCount++;
-				}
-			}
-		}
-		// end of region for loop
-	}
-
-	private void checkStartEndTagPairs(IStructuredDocumentRegion sdRegion, IReporter reporter) {
-
-		if (sdRegion.isDeleted()) {
-			return;
-		}
-
-		// check start/end tag pairs
-		IDOMNode xmlNode = getXMLNode(sdRegion);
-
-		if (xmlNode == null) {
-			return;
-		}
-
-		boolean selfClosed = false;
-		String tagName = null;
-		int length = 0;
-
-		if (xmlNode.isContainer()) {
-			IStructuredDocumentRegion endRegion = xmlNode.getEndStructuredDocumentRegion();
-			if (endRegion == null) {
-				IStructuredDocumentRegion startRegion = xmlNode.getStartStructuredDocumentRegion();
-				if (!startRegion.isDeleted()) {
-					// analyze the tag (check self closing)
-					ITextRegionList regions = startRegion.getRegions();
-					ITextRegion r = null;
-					for (int i = 0; i < regions.size(); i++) {
-						r = regions.get(i);
-						if ((r.getType() == DOMRegionContext.XML_TAG_OPEN) || (r.getType() == DOMRegionContext.XML_TAG_CLOSE)) {
-							length++;
-						}
-						else if (r.getType() == DOMRegionContext.XML_TAG_NAME) {
-							tagName = sdRegion.getText(r);
-							length += tagName.length();
-						}
-						else if (r.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE) {
-							selfClosed = true;
-						}
-					}
-
-					if (!selfClosed && (tagName != null)) {
-						Object[] args = {tagName};
-						String messageText = NLS.bind(XMLUIMessages.Missing_end_tag_, args);
-
-						int start = sdRegion.getStart();
-						int lineNumber = getLineNumber(start);
-
-						// SEVERITY_STRUCTURE == IMessage.HIGH_SEVERITY
-						IMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, messageText);
-						message.setOffset(start);
-						message.setLength(length);
-						message.setLineNo(lineNumber);
-
-						if (reporter instanceof IncrementalReporter) {
-
-							Object[] additionalFixInfo = getStartEndFixInfo(xmlNode, tagName, r);
-
-							MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
-							processor.setProblemId(ProblemIDsXML.MissingEndTag);
-							processor.setAdditionalFixInfo(additionalFixInfo);
-							message.setAttribute(QUICKASSISTPROCESSOR, processor);
-
-							AnnotationInfo info = new AnnotationInfo(message);
-
-							((IncrementalReporter) reporter).addAnnotationInfo(this, info);
-						}
-						else {
-							reporter.addMessage(this, message);
-						}
-					}
-				}
-			}
-
-		}
-	}
-
-	private Object[] getStartEndFixInfo(IDOMNode xmlNode, String tagName, ITextRegion r) {
-		// quick fix info
-		String tagClose = "/>"; //$NON-NLS-1$
-		int tagCloseOffset = xmlNode.getFirstStructuredDocumentRegion().getEndOffset();
-		if ((r != null) && (r.getType() == DOMRegionContext.XML_TAG_CLOSE)) {
-			tagClose = "/"; //$NON-NLS-1$
-			tagCloseOffset--;
-		}
-		IDOMNode firstChild = (IDOMNode) xmlNode.getFirstChild();
-		while ((firstChild != null) && (firstChild.getNodeType() == Node.TEXT_NODE)) {
-			firstChild = (IDOMNode) firstChild.getNextSibling();
-		}
-		int endOffset = xmlNode.getEndOffset();
-		int firstChildStartOffset = firstChild == null ? endOffset : firstChild.getStartOffset();
-		Object[] additionalFixInfo = {tagName, tagClose, new Integer(tagCloseOffset), new Integer(xmlNode.getFirstStructuredDocumentRegion().getEndOffset()), // startTagEndOffset
-					new Integer(firstChildStartOffset), // firstChildStartOffset
-					new Integer(endOffset)}; // endOffset
-		return additionalFixInfo;
-	}
-
-	private void checkStartingSpaceForPI(IStructuredDocumentRegion structuredDocumentRegion, IReporter reporter) {
-
-		if (structuredDocumentRegion.isDeleted()) {
-			return;
-		}
-
-		IStructuredDocumentRegion prev = structuredDocumentRegion.getPrevious();
-		if ((prev != null) && prev.getStartOffset() == 0) {
-			if (prev.getType() == DOMRegionContext.XML_CONTENT) {
-				String messageText = XMLUIMessages.ReconcileStepForMarkup_5;
-				int start = prev.getStartOffset();
-				int length = prev.getLength();
-
-				LocalizedMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, messageText);
-				message.setOffset(start);
-				message.setLength(length);
-				message.setLineNo(getLineNumber(start));
-
-				MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
-				processor.setProblemId(ProblemIDsXML.SpacesBeforePI);
-				message.setAttribute(QUICKASSISTPROCESSOR, processor);
-
-				AnnotationInfo info = new AnnotationInfo(message);
-				((IncrementalReporter) reporter).addAnnotationInfo(this, info);
-
-				// Position p = new Position(start, length);
-				//				
-				// ReconcileAnnotationKey key =
-				// createKey(structuredDocumentRegion, getScope());
-				// TemporaryAnnotation annotation = new TemporaryAnnotation(p,
-				// SEVERITY_SYNTAX_ERROR, message, key,
-				// ProblemIDsXML.SpacesBeforePI);
-				// results.add(annotation);
-			}
-		}
-	}
-
-	public int getScope() {
-		return ReconcileAnnotationKey.PARTIAL;
-	}
-
-	private IDOMNode getXMLNode(IStructuredDocumentRegion sdRegion) {
-
-		if (sdRegion == null) {
-			return null;
-		}
-
-		IStructuredModel xModel = null;
-		IDOMNode xmlNode = null;
-		// get/release models should always be in a try/finally block
-		try {
-			xModel = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
-			// xModel is sometime null, when closing editor, for example
-			if (xModel != null) {
-				xmlNode = (IDOMNode) xModel.getIndexedRegion(sdRegion.getStart());
-			}
-		}
-		finally {
-			if (xModel != null) {
-				xModel.releaseFromRead();
-			}
-		}
-		return xmlNode;
-	}
-
-	/**
-	 * Determines whether the IStructuredDocumentRegion is a XML "end tag"
-	 * since they're not allowed to have attribute ITextRegions
-	 * 
-	 * @param structuredDocumentRegion
-	 */
-	private boolean isEndTag(IStructuredDocumentRegion structuredDocumentRegion) {
-		if ((structuredDocumentRegion == null) || structuredDocumentRegion.isDeleted()) {
-			return false;
-		}
-		return structuredDocumentRegion.getFirstRegion().getType() == DOMRegionContext.XML_END_TAG_OPEN;
-	}
-
-	/**
-	 * Determines if the IStructuredDocumentRegion is an XML Processing
-	 * Instruction
-	 * 
-	 * @param structuredDocumentRegion
-	 * 
-	 */
-	private boolean isPI(IStructuredDocumentRegion structuredDocumentRegion) {
-		if ((structuredDocumentRegion == null) || structuredDocumentRegion.isDeleted()) {
-			return false;
-		}
-		return structuredDocumentRegion.getFirstRegion().getType() == DOMRegionContext.XML_PI_OPEN;
-	}
-
-	/**
-	 * Determines whether the IStructuredDocumentRegion is a XML "start tag"
-	 * since they need to be checked for proper XML attribute region sequences
-	 * 
-	 * @param structuredDocumentRegion
-	 * 
-	 */
-	private boolean isStartTag(IStructuredDocumentRegion structuredDocumentRegion) {
-		if ((structuredDocumentRegion == null) || structuredDocumentRegion.isDeleted()) {
-			return false;
-		}
-		return structuredDocumentRegion.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN;
-	}
-
-	// Because we check the "proper" closing separately from attribute
-	// sequencing, we need to know what's
-	// an appropriate close.
-	private boolean isTagCloseTextRegion(ITextRegion textRegion) {
-		return (textRegion.getType() == DOMRegionContext.XML_TAG_CLOSE) || (textRegion.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE);
-	}
-
-	/**
-	 * Determines if the IStructuredDocumentRegion is XML Content
-	 * 
-	 * @param structuredDocumentRegion
-	 * 
-	 */
-	private boolean isXMLContent(IStructuredDocumentRegion structuredDocumentRegion) {
-		if ((structuredDocumentRegion == null) || structuredDocumentRegion.isDeleted()) {
-			return false;
-		}
-		return structuredDocumentRegion.getFirstRegion().getType() == DOMRegionContext.XML_CONTENT;
-	}
-
-	private void setDocument(IDocument doc) {
-		fDocument = doc;
-	}
-
-	private IDocument getDocument() {
-		return fDocument;
-	}
-
-	public void connect(IDocument document) {
-		setDocument(document);
-	}
-
-	public void disconnect(IDocument document) {
-		setDocument(null);
-	}
-
-	public void validate(IRegion dirtyRegion, IValidationContext helper, IReporter reporter) {
-		if (getDocument() == null) {
-			return;
-		}
-		if (!(reporter instanceof IncrementalReporter)) {
-			return;
-		}
-		if (!(getDocument() instanceof IStructuredDocument)) {
-			return;
-		}
-
-		// remove old messages
-		reporter.removeAllMessages(this);
-
-		IStructuredDocumentRegion[] regions = ((IStructuredDocument) fDocument).getStructuredDocumentRegions(dirtyRegion.getOffset(), dirtyRegion.getLength());
-		for (int i = 0; i < regions.length; i++) {
-			validate(regions[i], reporter);
-		}
-	}
-
-	public void validate(IStructuredDocumentRegion structuredDocumentRegion, IReporter reporter) {
-
-		if (structuredDocumentRegion == null) {
-			return;
-		}
-
-		if (isStartTag(structuredDocumentRegion)) {
-			// check for attributes without a value
-			checkForAttributeValue(structuredDocumentRegion, reporter);
-			// check if started tag is ended
-			checkStartEndTagPairs(structuredDocumentRegion, reporter);
-			// check empty tag <>
-			checkEmptyTag(structuredDocumentRegion, reporter);
-			// check that each attribute has quotes
-			checkQuotesForAttributeValues(structuredDocumentRegion, reporter);
-			// check that the closing '>' is there
-			checkClosingBracket(structuredDocumentRegion, reporter);
-		}
-		else if (isEndTag(structuredDocumentRegion)) {
-			checkAttributesInEndTag(structuredDocumentRegion, reporter);
-			// check that the closing '>' is there
-			checkClosingBracket(structuredDocumentRegion, reporter);
-		}
-		else if (isPI(structuredDocumentRegion)) {
-			// check validity of processing instruction
-			checkStartingSpaceForPI(structuredDocumentRegion, reporter);
-			checkNoNamespaceInPI(structuredDocumentRegion, reporter);
-		}
-		else if (isXMLContent(structuredDocumentRegion)) {
-			checkForSpaceBeforeName(structuredDocumentRegion, reporter);
-		}
-	}
-
-	public void cleanup(IReporter reporter) {
-		// TODO Auto-generated method stub
-
-	}
-
-	public void validate(IValidationContext helper, IReporter reporter) throws ValidationException {
-		// TODO Auto-generated method stub
-
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/XMLContentOutlineConfiguration.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/XMLContentOutlineConfiguration.java
deleted file mode 100644
index 9359ae9..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/XMLContentOutlineConfiguration.java
+++ /dev/null
@@ -1,575 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.views.contentoutline;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jface.util.TransferDragSourceListener;
-import org.eclipse.jface.util.TransferDropTargetListener;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DragSourceEvent;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.sse.ui.internal.IReleasable;
-import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateAction;
-import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateActionContributionItem;
-import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
-import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
-import org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeContentProvider;
-import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeLabelProvider;
-import org.eclipse.wst.xml.ui.internal.contentoutline.XMLNodeActionManager;
-import org.eclipse.wst.xml.ui.internal.dnd.DragNodeCommand;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * Outline Configuration for generic XML support, expects that the viewer's
- * input will be the DOM Model.
- * 
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration
- * @since 1.0
- */
-public class XMLContentOutlineConfiguration extends ContentOutlineConfiguration {
-	private class ActionManagerMenuListener implements IMenuListener, IReleasable {
-		private XMLNodeActionManager fActionManager;
-		private TreeViewer fTreeViewer;
-
-		public ActionManagerMenuListener(TreeViewer viewer) {
-			fTreeViewer = viewer;
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.action.IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager)
-		 */
-		public void menuAboutToShow(IMenuManager manager) {
-			if (fActionManager == null) {
-				fActionManager = createNodeActionManager(fTreeViewer);
-			}
-			fActionManager.fillContextMenu(manager, fTreeViewer.getSelection());
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.wst.sse.ui.internal.IReleasable#release()
-		 */
-		public void release() {
-			fTreeViewer = null;
-			if (fActionManager != null) {
-				fActionManager.setModel(null);
-			}
-		}
-	}
-
-	private class AttributeShowingLabelProvider extends JFaceNodeLabelProvider {
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
-		 */
-		public String getText(Object o) {
-			StringBuffer text = new StringBuffer(super.getText(o));
-			if (o instanceof Node) {
-				Node node = (Node) o;
-				if ((node.getNodeType() == Node.ELEMENT_NODE) && fShowAttributes) {
-					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88444
-					if (node.hasAttributes()) {
-						Element element = (Element) node;
-						NamedNodeMap attributes = element.getAttributes();
-						Node idTypedAttribute = null;
-						Node requiredAttribute = null;
-						boolean hasId = false;
-						boolean hasName = false;
-						Node shownAttribute = null;
-
-						// try to get content model element
-						// declaration
-						CMElementDeclaration elementDecl = null;
-						ModelQuery mq = ModelQueryUtil.getModelQuery(element.getOwnerDocument());
-						if (mq != null) {
-							elementDecl = mq.getCMElementDeclaration(element);
-						}
-						// find an attribute of type (or just named)
-						// ID
-						if (elementDecl != null) {
-							int i = 0;
-							while ((i < attributes.getLength()) && (idTypedAttribute == null)) {
-								Node attr = attributes.item(i);
-								String attrName = attr.getNodeName();
-								CMNamedNodeMap attributeDeclarationMap = elementDecl.getAttributes();
-								
-								CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attributeDeclarationMap);
-								List nodes = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent(element, elementDecl, ModelQuery.INCLUDE_ATTRIBUTES);
-								for (int k = 0; k < nodes.size(); k++) {
-									CMNode cmnode = (CMNode) nodes.get(k);
-									if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
-										allAttributes.put(cmnode);
-									}
-								}
-								attributeDeclarationMap = allAttributes;
-
-								CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) attributeDeclarationMap.getNamedItem(attrName);
-								if (attrDecl != null) {
-									if ((attrDecl.getAttrType() != null) && (CMDataType.ID.equals(attrDecl.getAttrType().getDataTypeName()))) {
-										idTypedAttribute = attr;
-									}
-									else if ((attrDecl.getUsage() == CMAttributeDeclaration.REQUIRED) && (requiredAttribute == null)) {
-										// as a backup, keep tabs on
-										// any required
-										// attributes
-										requiredAttribute = attr;
-									}
-									else {
-										hasId = hasId || attrName.equals("id"); //$NON-NLS-1$
-										hasName = hasName || attrName.equals("name"); //$NON-NLS-1$
-									}
-								}
-								++i;
-							}
-						}
-
-						/*
-						 * If no suitable attribute was found, try using a
-						 * required attribute, if none, then prefer "id" or
-						 * "name", otherwise just use first attribute
-						 */
-						if (idTypedAttribute != null) {
-							shownAttribute = idTypedAttribute;
-						}
-						else if (requiredAttribute != null) {
-							shownAttribute = requiredAttribute;
-						}
-						else if (hasId) {
-							shownAttribute = attributes.getNamedItem("id"); //$NON-NLS-1$
-						}
-						else if (hasName) {
-							shownAttribute = attributes.getNamedItem("name"); //$NON-NLS-1$
-						}
-						if (shownAttribute == null) {
-							shownAttribute = attributes.item(0);
-						}
-
-						// display the attribute and value (without quotes)
-						String attributeName = shownAttribute.getNodeName();
-						if ((attributeName != null) && (attributeName.length() > 0)) {
-							text.append(" " + attributeName); //$NON-NLS-1$
-							String attributeValue = shownAttribute.getNodeValue();
-							if ((attributeValue != null) && (attributeValue.length() > 0)) {
-								text.append("=" + StringUtils.strip(attributeValue)); //$NON-NLS-1$
-							}
-						}
-					}
-				}
-			}
-			return text.toString();
-		}
-	}
-
-	private class StatusLineLabelProvider extends JFaceNodeLabelProvider {
-		TreeViewer treeViewer = null;
-
-		public StatusLineLabelProvider(TreeViewer viewer) {
-			treeViewer = viewer;
-		}
-
-		public String getText(Object element) {
-			if (element == null)
-				return null;
-
-			StringBuffer s = new StringBuffer();
-			Node node = (Node) element;
-			while (node != null) {
-				if (node.getNodeType() != Node.DOCUMENT_NODE) {
-					s.insert(0, super.getText(node));
-				}
-				node = node.getParentNode();
-				if (node != null && node.getNodeType() != Node.DOCUMENT_NODE) {
-					s.insert(0, IPath.SEPARATOR);
-				}
-			}
-			return s.toString();
-		}
-	}
-
-	/**
-	 * Toggle action for whether or not to display element's first attribute
-	 */
-	private class ToggleShowAttributeAction extends PropertyChangeUpdateAction {
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88444
-		private TreeViewer fTreeViewer;
-
-		public ToggleShowAttributeAction(IPreferenceStore store, String preference, TreeViewer treeViewer) {
-			super(XMLUIMessages.XMLContentOutlineConfiguration_0, store, preference, true);
-			setToolTipText(getText());
-			// images needed
-			// setDisabledImageDescriptor(SYNCED_D);
-			// (nsd) temporarily re-use Properties view image
-			setImageDescriptor(EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_OBJ_PROP_PS));
-			fTreeViewer = treeViewer;
-			update();
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.ui.texteditor.IUpdate#update()
-		 */
-		public void update() {
-			super.update();
-			fShowAttributes = isChecked();
-
-			// notify the configuration of the change
-			enableShowAttributes(fShowAttributes, fTreeViewer);
-
-			// refresh the outline view
-			fTreeViewer.refresh(true);
-		}
-	}
-
-	private IContentProvider fContentProvider = null;
-
-	private ActionManagerMenuListener fContextMenuFiller = null;
-
-	private ILabelProvider fLabelProvider = null;
-
-	boolean fShowAttributes = false;
-
-	private JFaceNodeLabelProvider fSimpleLabelProvider;
-	private TransferDragSourceListener[] fTransferDragSourceListeners;
-
-	private TransferDropTargetListener[] fTransferDropTargetListeners;
-
-	/*
-	 * Preference key for Show Attributes
-	 */
-	private final String OUTLINE_SHOW_ATTRIBUTE_PREF = "outline-show-attribute-editor"; //$NON-NLS-1$
-
-	/**
-	 * Create new instance of XMLContentOutlineConfiguration
-	 */
-	public XMLContentOutlineConfiguration() {
-		// Must have empty constructor to createExecutableExtension
-		super();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#createMenuContributions(org.eclipse.jface.viewers.TreeViewer)
-	 */
-	protected IContributionItem[] createMenuContributions(TreeViewer viewer) {
-		IContributionItem[] items;
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88444
-		IContributionItem showAttributeItem = new PropertyChangeUpdateActionContributionItem(new ToggleShowAttributeAction(getPreferenceStore(), OUTLINE_SHOW_ATTRIBUTE_PREF, viewer));
-		items = super.createMenuContributions(viewer);
-		if (items == null) {
-			items = new IContributionItem[]{showAttributeItem};
-		}
-		else {
-			IContributionItem[] combinedItems = new IContributionItem[items.length + 1];
-			System.arraycopy(items, 0, combinedItems, 0, items.length);
-			combinedItems[items.length] = showAttributeItem;
-			items = combinedItems;
-		}
-		return items;
-	}
-
-	/**
-	 * Returns the NodeActionManager to use for the given treeViewer.
-	 * <p>
-	 * Not API. May be removed in the future.
-	 * </p>
-	 * 
-	 * @param treeViewer
-	 *            the TreeViewer associated with this configuration
-	 * @return a node action manager for use with this tree viewer
-	 */
-	protected XMLNodeActionManager createNodeActionManager(TreeViewer treeViewer) {
-		return new XMLNodeActionManager((IStructuredModel) treeViewer.getInput(), treeViewer);
-	}
-
-	/**
-	 * Notifies this configuration that the flag that indicates whether or not
-	 * to show attribute values in the tree viewer has changed. The tree
-	 * viewer is automatically refreshed afterwards to update the labels.
-	 * 
-	 * Clients should not call this method, but rather should react to it.
-	 * 
-	 * @param showAttributes
-	 *            flag indicating whether or not to show attribute values in
-	 *            the tree viewer
-	 * @param treeViewer
-	 *            the TreeViewer associated with this configuration
-	 */
-	protected void enableShowAttributes(boolean showAttributes, TreeViewer treeViewer) {
-		// nothing by default
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getContentProvider(org.eclipse.jface.viewers.TreeViewer)
-	 */
-	public IContentProvider getContentProvider(TreeViewer viewer) {
-		if (fContentProvider == null) {
-			fContentProvider = new JFaceNodeContentProvider();
-		}
-		return fContentProvider;
-	}
-
-	private Object getFilteredNode(Object object) {
-		if (object instanceof Node) {
-			Node node = (Node) object;
-
-			// replace attribute node in selection with its parent
-			if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
-				node = ((Attr) node).getOwnerElement();
-			}
-			else if (node.getNodeType() == Node.TEXT_NODE) {
-				node = node.getParentNode();
-			}
-			return node;
-		}
-		return object;
-	}
-
-	private Object[] getFilteredNodes(Object[] filteredNodes) {
-		for (int i = 0; i < filteredNodes.length; i++) {
-			filteredNodes[i] = getFilteredNode(filteredNodes[i]);
-		}
-		return filteredNodes;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getLabelProvider(org.eclipse.jface.viewers.TreeViewer)
-	 */
-	public ILabelProvider getLabelProvider(TreeViewer viewer) {
-		if (fLabelProvider == null) {
-			fLabelProvider = new AttributeShowingLabelProvider();
-		}
-		return fLabelProvider;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getMenuListener(org.eclipse.jface.viewers.TreeViewer)
-	 */
-	public IMenuListener getMenuListener(TreeViewer viewer) {
-		if (fContextMenuFiller == null) {
-			fContextMenuFiller = new ActionManagerMenuListener(viewer);
-		}
-		return fContextMenuFiller;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getPreferenceStore()
-	 */
-	protected IPreferenceStore getPreferenceStore() {
-		return XMLUIPlugin.getDefault().getPreferenceStore();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getSelection(org.eclipse.jface.viewers.TreeViewer,
-	 *      org.eclipse.jface.viewers.ISelection)
-	 */
-	public ISelection getSelection(TreeViewer viewer, ISelection selection) {
-		ISelection filteredSelection = selection;
-		if (selection instanceof IStructuredSelection) {
-			Object[] filteredNodes = getFilteredNodes(((IStructuredSelection) selection).toArray());
-			filteredSelection = new StructuredSelection(filteredNodes);
-		}
-		return filteredSelection;
-	}
-
-	public ILabelProvider getStatusLineLabelProvider(TreeViewer treeViewer) {
-		if (fSimpleLabelProvider == null) {
-			fSimpleLabelProvider = new StatusLineLabelProvider(treeViewer);
-		}
-		return fSimpleLabelProvider;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getTransferDragSourceListeners(org.eclipse.jface.viewers.TreeViewer)
-	 */
-	public TransferDragSourceListener[] getTransferDragSourceListeners(final TreeViewer treeViewer) {
-		if (fTransferDragSourceListeners == null) {
-			fTransferDragSourceListeners = new TransferDragSourceListener[]{new TransferDragSourceListener() {
-
-				public void dragFinished(DragSourceEvent event) {
-					LocalSelectionTransfer.getTransfer().setSelection(null);
-				}
-
-				public void dragSetData(DragSourceEvent event) {
-				}
-
-				public void dragStart(DragSourceEvent event) {
-					LocalSelectionTransfer.getTransfer().setSelection(treeViewer.getSelection());
-				}
-
-				public Transfer getTransfer() {
-					return LocalSelectionTransfer.getTransfer();
-				}
-			}};
-		}
-
-		return fTransferDragSourceListeners;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getTransferDropTargetListeners(org.eclipse.jface.viewers.TreeViewer)
-	 */
-	public TransferDropTargetListener[] getTransferDropTargetListeners(final TreeViewer treeViewer) {
-		if (fTransferDropTargetListeners == null) {
-			fTransferDropTargetListeners = new TransferDropTargetListener[]{new TransferDropTargetListener() {
-				public void dragEnter(DropTargetEvent event) {
-				}
-
-				public void dragLeave(DropTargetEvent event) {
-				}
-
-				public void dragOperationChanged(DropTargetEvent event) {
-				}
-
-				public void dragOver(DropTargetEvent event) {
-					event.feedback = DND.FEEDBACK_SELECT;
-					float feedbackFloat = getHeightInItem(event);
-					if (feedbackFloat > 0.75) {
-						event.feedback = DND.FEEDBACK_INSERT_AFTER;
-					}
-					else if (feedbackFloat < 0.25) {
-						event.feedback = DND.FEEDBACK_INSERT_BEFORE;
-					}
-					event.feedback |= DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL;
-				}
-
-				public void drop(DropTargetEvent event) {
-					if (event.operations != DND.DROP_NONE && LocalSelectionTransfer.getTransfer().getSelection() != null && !LocalSelectionTransfer.getTransfer().getSelection().isEmpty()) {
-						IStructuredSelection selection = (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection();
-						if (selection != null && !selection.isEmpty() && event.item != null && event.item.getData() != null) {
-							/*
-							 * the command uses these numbers instead of the
-							 * feedback constants (even though it converts in
-							 * the other direction as well)
-							 */
-							float feedbackFloat = getHeightInItem(event);
-
-							final DragNodeCommand command = new DragNodeCommand(event.item.getData(), feedbackFloat, event.operations, event.detail, selection.toList(), treeViewer);
-							if (command != null && command.canExecute()) {
-								SafeRunnable.run(new SafeRunnable() {
-									public void run() throws Exception {
-										command.execute();
-									}
-								});
-							}
-						}
-					}
-				}
-
-				public void dropAccept(DropTargetEvent event) {
-				}
-
-				private float getHeightInItem(DropTargetEvent event) {
-					if (event.item == null)
-						return .5f;
-					if (event.item instanceof TreeItem) {
-						TreeItem treeItem = (TreeItem) event.item;
-						Control control = treeItem.getParent();
-						Point point = control.toControl(new Point(event.x, event.y));
-						Rectangle bounds = treeItem.getBounds();
-						return (float) (point.y - bounds.y) / (float) bounds.height;
-					}
-					else if (event.item instanceof TableItem) {
-						TableItem tableItem = (TableItem) event.item;
-						Control control = tableItem.getParent();
-						Point point = control.toControl(new Point(event.x, event.y));
-						Rectangle bounds = tableItem.getBounds(0);
-						return (float) (point.y - bounds.y) / (float) bounds.height;
-					}
-					else {
-						return 0.0F;
-					}
-				}
-
-				public Transfer getTransfer() {
-					return LocalSelectionTransfer.getTransfer();
-				}
-
-				public boolean isEnabled(DropTargetEvent event) {
-					return getTransfer().isSupportedType(event.currentDataType);
-				}
-			}};
-		}
-		return fTransferDropTargetListeners;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#unconfigure(org.eclipse.jface.viewers.TreeViewer)
-	 */
-	public void unconfigure(TreeViewer viewer) {
-		super.unconfigure(viewer);
-		fTransferDragSourceListeners = null;
-		fTransferDropTargetListeners = null;
-		if (fContextMenuFiller != null) {
-			fContextMenuFiller.release();
-			fContextMenuFiller = null;
-		}
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySheetConfiguration.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySheetConfiguration.java
deleted file mode 100644
index aba549d..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySheetConfiguration.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *     Jens Lukowski/Innoopract - initial renaming/restructuring
- *     
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.views.properties;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.progress.UIJob;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.IPropertySourceProvider;
-import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManagerListener;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.properties.XMLPropertySource;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * Configuration for property sheet page which shows XML content.
- * 
- * @see org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration
- * @since 1.0
- */
-public class XMLPropertySheetConfiguration extends PropertySheetConfiguration {
-	private class CMDocumentManagerListenerImpl implements CMDocumentManagerListener {
-		public void cacheCleared(CMDocumentCache cache) {
-			// nothing to do
-		}
-
-		public void cacheUpdated(CMDocumentCache cache, final String uri, int oldStatus, int newStatus, CMDocument cmDocument) {
-			if ((newStatus == CMDocumentCache.STATUS_LOADED) || (newStatus == CMDocumentCache.STATUS_ERROR)) {
-				refreshPages();
-			}
-		}
-
-		public void propertyChanged(CMDocumentManager cmDocumentManager, String propertyName) {
-			if (cmDocumentManager.getPropertyEnabled(CMDocumentManager.PROPERTY_AUTO_LOAD)) {
-				refreshPages();
-			}
-		}
-
-		private void refreshPages() {
-			getPropertiesRefreshJob().addPropertySheetPage(fPropertySheetPage);
-			getPropertiesRefreshJob().schedule(PropertiesRefreshJob.UPDATE_DELAY);
-		}
-	}
-
-	private class PropertiesRefreshJob extends UIJob {
-		public static final int UPDATE_DELAY = 200;
-
-		private Set propertySheetPages = null;
-
-		public PropertiesRefreshJob() {
-			super(XMLUIMessages.JFaceNodeAdapter_1);
-			setSystem(true);
-			setPriority(Job.SHORT);
-			propertySheetPages = new HashSet(1);
-		}
-
-		void addPropertySheetPage(IPropertySheetPage page) {
-			if (page != null) {
-				propertySheetPages.add(page);
-				schedule(UPDATE_DELAY);
-			}
-		}
-
-		public IStatus runInUIThread(IProgressMonitor monitor) {
-			Object[] pages = propertySheetPages.toArray();
-			propertySheetPages.clear();
-
-			for (int i = 0; i < pages.length; i++) {
-				PropertySheetPage page = (PropertySheetPage) pages[i];
-				if ((page != null) && (page.getControl() != null) && !page.getControl().isDisposed()) {
-					page.refresh();
-				}
-			}
-
-			return Status.OK_STATUS;
-		}
-	}
-
-	private class XMLPropertySheetRefreshAdapter implements INodeAdapter {
-		public boolean isAdapterForType(Object type) {
-			return false;
-		}
-
-		public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
-			if (fPropertySheetPage != null) {
-				getPropertiesRefreshJob().addPropertySheetPage(fPropertySheetPage);
-			}
-		}
-	}
-
-	private class XMLPropertySourceProvider implements IPropertySourceProvider {
-		private IPropertySource fPropertySource = null;
-		private INodeNotifier fSource = null;
-
-		public IPropertySource getPropertySource(Object object) {
-			if ((fSource != null) && object.equals(fSource)) {
-				return fPropertySource;
-			}
-
-			if (object instanceof IDOMNode) {
-				fSource = (INodeNotifier) object;
-				fPropertySource = (IPropertySource) fSource.getAdapterFor(IPropertySource.class);
-				if (fPropertySource == null) {
-					fPropertySource = new XMLPropertySource((INodeNotifier) object);
-				}
-			}
-			else {
-				fSource = null;
-				fPropertySource = null;
-			}
-			return fPropertySource;
-		}
-	}
-
-	private CMDocumentManagerListenerImpl fCMDocumentManagerListener = new CMDocumentManagerListenerImpl();
-	private PropertiesRefreshJob fPropertiesRefreshJob = null;
-	IPropertySheetPage fPropertySheetPage = null;
-	private IPropertySourceProvider fPropertySourceProvider = null;
-	private INodeAdapter fRefreshAdapter = new XMLPropertySheetRefreshAdapter();
-	private CMDocumentManager[] fSelectedCMDocumentManagers = new CMDocumentManager[0];
-	private INodeNotifier[] fSelectedNotifiers = new INodeNotifier[0];
-
-
-	/**
-	 * Create new instance of XMLPropertySheetConfiguration
-	 */
-	public XMLPropertySheetConfiguration() {
-		// Must have empty constructor to createExecutableExtension
-		super();
-	}
-
-	public ISelection getInputSelection(IWorkbenchPart selectingPart, ISelection selection) {
-		if (fSelectedNotifiers != null) {
-			for (int i = 0; i < fSelectedNotifiers.length; i++) {
-				fSelectedNotifiers[i].removeAdapter(fRefreshAdapter);
-			}
-			fSelectedNotifiers = null;
-		}
-		for (int i = 0; i < fSelectedCMDocumentManagers.length; i++) {
-			fSelectedCMDocumentManagers[i].removeListener(fCMDocumentManagerListener);
-		}
-
-		ISelection preferredSelection = selection;
-		if (selection instanceof IStructuredSelection) {
-			IStructuredSelection structuredSel = (IStructuredSelection) selection;
-
-			/*
-			 * On Attr nodes, select the owner Element. On Text nodes, select
-			 * the parent Element.
-			 */
-			Object[] selectedObjects = new Object[structuredSel.size()];
-			System.arraycopy(structuredSel.toArray(), 0, selectedObjects, 0, selectedObjects.length);
-			for (int i = 0; i < selectedObjects.length; i++) {
-				Object inode = selectedObjects[i];
-				if (inode instanceof Node) {
-					Node node = (Node) inode;
-					// replace Attribute Node with its owner
-					Node parentNode = node.getParentNode();
-					if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
-						Element ownerElement = ((Attr) node).getOwnerElement();
-						selectedObjects[i] = ownerElement;
-					}
-					// replace Text Node with its parent
-					else if (((node.getNodeType() == Node.TEXT_NODE) || (node.getNodeType() == Node.CDATA_SECTION_NODE)) && (parentNode != null)) {
-						selectedObjects[i] = parentNode;
-					}
-				}
-			}
-
-			if (selectedObjects.length > 0) {
-				Set managers = new HashSet(1);
-				Set selectedNotifiers = new HashSet(1);
-
-				for (int i = 0; i < selectedObjects.length; i++) {
-					if (selectedObjects[i] instanceof Node) {
-						ModelQuery query = ModelQueryUtil.getModelQuery(((Node) selectedObjects[i]).getOwnerDocument());
-						if (query != null) {
-							CMDocumentManager mgr = query.getCMDocumentManager();
-							if (mgr != null) {
-								managers.add(mgr);
-								mgr.addListener(fCMDocumentManagerListener);
-							}
-						}
-					}
-					/*
-					 * Add UI refresh adapters and remember notifiers for
-					 * later removal
-					 */
-					if (selectedObjects[i] instanceof INodeNotifier) {
-						selectedNotifiers.add(selectedObjects[i]);
-						((INodeNotifier) selectedObjects[i]).addAdapter(fRefreshAdapter);
-					}
-				}
-				fSelectedCMDocumentManagers = (CMDocumentManager[]) managers.toArray(new CMDocumentManager[managers.size()]);
-				fSelectedNotifiers = (INodeNotifier[]) selectedNotifiers.toArray(new INodeNotifier[selectedNotifiers.size()]);
-			}
-
-
-			preferredSelection = new StructuredSelection(selectedObjects);
-		}
-		return preferredSelection;
-	}
-
-	PropertiesRefreshJob getPropertiesRefreshJob() {
-		if (fPropertiesRefreshJob == null) {
-			fPropertiesRefreshJob = new PropertiesRefreshJob();
-		}
-		return fPropertiesRefreshJob;
-	}
-
-	public IPropertySourceProvider getPropertySourceProvider(IPropertySheetPage page) {
-		if (fPropertySourceProvider == null) {
-			fPropertySheetPage = page;
-			fPropertySourceProvider = new XMLPropertySourceProvider();
-		}
-		return fPropertySourceProvider;
-	}
-
-
-	public void unconfigure() {
-		super.unconfigure();
-		for (int i = 0; i < fSelectedCMDocumentManagers.length; i++) {
-			fSelectedCMDocumentManagers[i].removeListener(fCMDocumentManagerListener);
-		}
-		fPropertySheetPage = null;
-	}
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/templates/xmldefault-templates.properties b/bundles/org.eclipse.wst.xml.ui/templates/xmldefault-templates.properties
deleted file mode 100644
index 8b5177a..0000000
--- a/bundles/org.eclipse.wst.xml.ui/templates/xmldefault-templates.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-#     Jens Lukowski/Innoopract - initial renaming/restructuring
-#     
-###############################################################################
-Templates.comment.name=comment
-Templates.comment.desc=xml comment
-Templates.xmldeclaration.name=xml declaration
-Templates.xmldeclaration.desc=xml declaration
-Templates.xslpi.name=XSL processing instruction
-Templates.xslpi.desc=XSL processing instruction
-Templates.xsinsp.name=xsinsp
-Templates.xsinsp.desc=XML Schema name space
-Templates.schemaLoc.name=schemaLoc
-Templates.schemaLoc.desc=XML Schema location attribute
-Templates.noschemaLoc.name=noschemaLoc
-Templates.noschemaLoc.desc=No Namespace Schema Location
-Templates.defaultnsp.name=default namespace
-Templates.defaultnsp.desc=Default Namespace Attribute
diff --git a/bundles/org.eclipse.wst.xml.ui/templates/xmldefault-templates.xml b/bundles/org.eclipse.wst.xml.ui/templates/xmldefault-templates.xml
deleted file mode 100644
index 8f11808..0000000
--- a/bundles/org.eclipse.wst.xml.ui/templates/xmldefault-templates.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     David Carver - added templates for xsi namespace, schemaLocation, and
-                      default namespace
- *******************************************************************************/
- -->
-<templates>
-  <template name="%Templates.xmldeclaration.name" description="%Templates.xmldeclaration.desc" id="org.eclipse.wst.xml.ui.internal.templates.xmldeclaration" context="xml_new" enabled="true">&lt;?xml version="1.0" encoding="${encoding}"?&gt;</template>
-  <template name="%Templates.comment.name" description="%Templates.comment.desc" id="org.eclipse.wst.xml.ui.internal.templates.comment" context="xml_tag" enabled="true">&lt;!-- ${cursor} --&gt;</template>
-  <template name="%Templates.xslpi.name" description="%Templates.xslpi.desc" id="org.eclipse.wst.xml.ui.internal.templates.xslpi" context="xml_tag" enabled="true">&lt;?xml-stylesheet type="text/xsl" href="${cursor}"?&gt;</template>
-  <template name="%Templates.xsinsp.name" description="%Templates.xsinsp.desc" id="org.eclipse.wst.xml.ui.internal.templates.xsinsp" context="xml_attribute" enabled="true">xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"</template>
-  <template name="%Templates.schemaLoc.name" description="%Templates.schemaLoc.desc" id="org.eclipse.wst.xml.ui.internal.templates.schemaLoc" context="xml_attribute" enabled="true">xsi:schemaLocation="{namespace} {location}"</template>
-  <template name="%Templates.noschemaLoc.name" description="%Templates.noschemaLoc.desc" id="org.eclipse.wst.xml.ui.internal.templates.noschemaLoc" context="xml_attribute" enabled="true">xsi:schemaLocation="{namespace} {location}"</template>
-  <template name="%Templates.defaultnsp.name" description="%Templates.defaultnsp.desc" id="org.eclipse.wst.xml.ui.internal.templates.defaultnsp" context="xml_attribute" enabled="true">xmlns="default namespace"</template>
-</templates>
diff --git a/features/org.eclipse.wst.xml_ui.feature.patch/buildnotes_org.eclipse.wst.xml_ui.feature.patch.html b/features/org.eclipse.wst.xml_ui.feature.patch/buildnotes_org.eclipse.wst.xml_ui.feature.patch.html
index 2135742..fc6828a 100644
--- a/features/org.eclipse.wst.xml_ui.feature.patch/buildnotes_org.eclipse.wst.xml_ui.feature.patch.html
+++ b/features/org.eclipse.wst.xml_ui.feature.patch/buildnotes_org.eclipse.wst.xml_ui.feature.patch.html
@@ -4,17 +4,26 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <meta name="Build" content="Build">
-<title>WTP XML 3.0.0 Patches</title>
+<title>WTP XML 3.0.5 Patches</title>
 </head>
 
 <body>
 
-<h1>WTP XML 3.0.0 Patches</h1>
+<h1>WTP XML 3.0.5 Patches</h1>
 
 <h2>org.eclipse.wst.xml_ui.feature.patch</h2>
 
-<p>Bug <a
-	href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=236010'>236010</a>.
-Attributes from different namespace not handled correctly</p>
+<p>Bug <a href='https://bugs.eclipse.org/280483'>280483</a>. "A handler conflict occurred. This may disable some commands." warning on restart</p>
+<p>Bug <a href='https://bugs.eclipse.org/285284'>285284</a>. Removing comment end tag and adding it back leaves validation errors</p>
+<p>Bug <a href="https://bugs.eclipse.org/289464">289464</a>. IExecutionDelegate should be using ISafeRunnable</p>
+<p>Bug <a href='https://bugs.eclipse.org/290322'>290322</a>. [reconciling] DirtyRegionProcessor cancels and schedules a Job for every keystroke</p>
+<p>Bug <a href='https://bugs.eclipse.org/292088'>292088</a>. DirtyRegionProcessor Job may not be canceled when the editor closes</p>
+<p>Bug <a href='https://bugs.eclipse.org/299820'>299820</a>. [validation] NPE in DelegatingSourceValidator#validate</p>
+<p>Bug <a href='https://bugs.eclipse.org/303554'>303554</a>. [validation] JSP Syntax Validators show error annotations even when the build based markers are turned off</p>
+<p>Bug <a href='https://bugs.eclipse.org/308548'>308548</a>. XSD to XML generator can cause an out of memory error on certain types of documents</p>
+<p>Bug <a href='https://bugs.eclipse.org/312307'>312307</a>. [validation] ValidatorStrategy triggering unwanted plug-in activation</p>
+<p>Bug <a href='https://bugs.eclipse.org/319048'>319048</a>. Utility code may leak Image handles</p>
+<p>Bug <a href='https://bugs.eclipse.org/320322'>320322</a>. [validation] JSP source validators running even when respective batch validators have been turned off</p>
+
 </body>
 </html>
diff --git a/features/org.eclipse.wst.xml_ui.feature.patch/feature.properties b/features/org.eclipse.wst.xml_ui.feature.patch/feature.properties
index 9594cb5..4c3e00e 100644
--- a/features/org.eclipse.wst.xml_ui.feature.patch/feature.properties
+++ b/features/org.eclipse.wst.xml_ui.feature.patch/feature.properties
@@ -27,7 +27,17 @@
 description=\
 Contains fixes for the following bugs:\n\
 \n\
-Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=236010 Attributes from different namespace not handled correctly\n\
+Bug https://bugs.eclipse.org/280483 "A handler conflict occurred. This may disable some commands." warning on restart\n\
+Bug https://bugs.eclipse.org/285284 Removing comment end tag and adding it back leaves validation errors\n\
+Bug https://bugs.eclipse.org/289464 IExecutionDelegate should be using ISafeRunnable\n\
+Bug https://bugs.eclipse.org/290322 [reconciling] DirtyRegionProcessor cancels and schedules a Job for every keystroke\n\
+Bug https://bugs.eclipse.org/292088 DirtyRegionProcessor Job may not be canceled when the editor closes\n\
+Bug https://bugs.eclipse.org/299820 [validation] NPE in DelegatingSourceValidator#validate\n\
+Bug https://bugs.eclipse.org/303554 [validation] JSP Syntax Validators show error annotations even when the build based markers are turned off\n\
+Bug https://bugs.eclipse.org/308548 XSD to XML generator can cause an out of memory error on certain types of documents\n\
+Bug https://bugs.eclipse.org/312307 [validation] ValidatorStrategy triggering unwanted plug-in activation\n\
+Bug https://bugs.eclipse.org/319048 Utility code may leak Image handles\n\
+Bug https://bugs.eclipse.org/320322 [validation] JSP source validators running even when respective batch validators have been turned off\n\
 \n\
 
 # "copyright" property - text of the "Feature Update Copyright"
diff --git a/features/org.eclipse.wst.xml_ui.feature.patch/feature.xml b/features/org.eclipse.wst.xml_ui.feature.patch/feature.xml
index 7ab947c..3bfe0bb 100644
--- a/features/org.eclipse.wst.xml_ui.feature.patch/feature.xml
+++ b/features/org.eclipse.wst.xml_ui.feature.patch/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.wst.xml_ui.feature.patch"
       label="%featureName"
-      version="3.0.0.qualifier"
+      version="3.0.5.qualifier"
       provider-name="%providerName">
 
    <description>
@@ -18,14 +18,21 @@
    </license>
 
    <requires>
-      <import feature="org.eclipse.wst.xml_ui.feature" version="3.0.0.v200806092130-7F2EN0Cwum5M5u64RsGoSUMYCSXS" patch="true"/>
+      <import feature="org.eclipse.wst.xml_ui.feature" version="3.0.5.v200903310029-7F3ENzCwum8Y6U_uQnFsWiUaNXFk" patch="true"/>
    </requires>
 
    <plugin
+         id="org.eclipse.wst.sse.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
          id="org.eclipse.wst.xml.ui"
          download-size="0"
          install-size="0"
          version="0.0.0"
          unpack="false"/>
-         
+
 </feature>