Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.html.ui')
-rw-r--r--bundles/org.eclipse.wst.html.ui/.classpath8
-rw-r--r--bundles/org.eclipse.wst.html.ui/.cvsignore4
-rw-r--r--bundles/org.eclipse.wst.html.ui/.options1
-rw-r--r--bundles/org.eclipse.wst.html.ui/.project28
-rw-r--r--bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.core.prefs50
-rw-r--r--bundles/org.eclipse.wst.html.ui/build.properties24
-rw-r--r--bundles/org.eclipse.wst.html.ui/buildnotes_html.html33
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/ctool16/newhtml_wiz.gifbin1017 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/table.gifbin573 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-anchor.gifbin197 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-body.gifbin343 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-button.gifbin344 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-font.gifbin229 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-form.gifbin353 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-generic.gifbin98 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-html.gifbin570 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image-map.gifbin577 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image.gifbin601 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-jsp.gifbin135 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-template.gifbin205 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-title.gifbin581 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag.gifbin82 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/wizban/newhfile_wiz.gifbin3057 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/sourceEditor.gifbin353 -> 0 bytes
-rw-r--r--bundles/org.eclipse.wst.html.ui/plugin.properties30
-rw-r--r--bundles/org.eclipse.wst.html.ui/plugin.xml403
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationHelper.java52
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationReporter.java134
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationResult.java64
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationWorkbenchHelper.java47
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidator.java292
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/LocalizedMessage.java65
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListHelper.java46
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListUtility.java435
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextEditorHTML.java62
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java361
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java100
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPlugin.java104
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties73
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/Logger.java160
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/SharedHTMLEditorPluginImageHelper.java58
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/CustomTemplateProposal.java40
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java478
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java130
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java78
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/NoRegionContentAssistProcessorForHTML.java40
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java83
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/HTMLNodeActionManager.java125
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterFactoryForHTML.java50
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterForHTML.java114
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntry.java30
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntryProvider.java29
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ContentSettingsRegistry.java172
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntry.java23
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProvider.java24
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProviderBuilder.java56
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/HTMLContentSettingsPropertyPage.java277
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ProjectContentSettingsPropertyPage.java279
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/ActionContributorHTML.java31
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupActionHTML.java42
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupDialogHTML.java310
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImageHelper.java154
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImages.java31
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/IHelpContextIds.java43
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/ExternalFileEditorInput.java146
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/ExternalFileHyperlink.java72
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/URIHyperlinkDetector.java89
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/WorkspaceFileHyperlink.java79
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java472
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java77
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceNames.java55
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLColorPage.java124
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLFilesPreferencePage.java190
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java142
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLTemplatePreferencePage.java58
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java97
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterHTML.java263
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java216
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/registry/AdapterFactoryProviderForEmbeddedHTML.java35
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/registry/AdapterFactoryProviderForHTML.java138
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/search/HTMLFindOccurrencesAction.java49
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/IStyleConstantsHTML.java22
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/LineStyleProviderForHTML.java75
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLBestMatchHoverProcessor.java34
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.java53
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLTagInfoHoverProcessor.java28
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/EncodingTemplateVariableResolverHTML.java38
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/TemplateContextTypeHTML.java34
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/TemplateContextTypeIdsHTML.java50
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/HTMLDocumentRegionEdgeMatcher.java28
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/views/contentoutline/HTMLContentOutlineConfiguration.java41
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLWizard.java84
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.properties44
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.xml28
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_de.properties35
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_es.properties35
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_fr.properties35
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_it.properties35
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_ja.properties35
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_ko.properties35
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_pt_BR.properties35
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_zh_CN.properties35
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_zh_TW.properties35
103 files changed, 0 insertions, 8449 deletions
diff --git a/bundles/org.eclipse.wst.html.ui/.classpath b/bundles/org.eclipse.wst.html.ui/.classpath
deleted file mode 100644
index ac75a6210c..0000000000
--- a/bundles/org.eclipse.wst.html.ui/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-html-validation"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.wst.html.ui/.cvsignore b/bundles/org.eclipse.wst.html.ui/.cvsignore
deleted file mode 100644
index 2f941d80f2..0000000000
--- a/bundles/org.eclipse.wst.html.ui/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-bin
-htmleditor.jar
-temp.folder
-build.xml
diff --git a/bundles/org.eclipse.wst.html.ui/.options b/bundles/org.eclipse.wst.html.ui/.options
deleted file mode 100644
index 6d015ff08a..0000000000
--- a/bundles/org.eclipse.wst.html.ui/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.html.ui/projectionperf=false
diff --git a/bundles/org.eclipse.wst.html.ui/.project b/bundles/org.eclipse.wst.html.ui/.project
deleted file mode 100644
index 38bee736ad..0000000000
--- a/bundles/org.eclipse.wst.html.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.html.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 036ecb464e..0000000000
--- a/bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,50 +0,0 @@
-#Sun Mar 13 23:58:13 EST 2005
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.wst.html.ui/build.properties b/bundles/org.eclipse.wst.html.ui/build.properties
deleted file mode 100644
index 9a8d1fa489..0000000000
--- a/bundles/org.eclipse.wst.html.ui/build.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- *.jar,\
- html.jar,\
- icons/,\
- plugin.properties,\
- templates/
-source.htmleditor.jar = src/,\
- src-html-validation/
-src.includes = plugin.xml,\
- plugin.properties,\
- icons/,\
- build.xml,\
- templates/
-output.htmleditor.jar = bin/
diff --git a/bundles/org.eclipse.wst.html.ui/buildnotes_html.html b/bundles/org.eclipse.wst.html.ui/buildnotes_html.html
deleted file mode 100644
index 2baca38770..0000000000
--- a/bundles/org.eclipse.wst.html.ui/buildnotes_html.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta
- http-equiv="Content-Type"
- content="text/html; charset=ISO-8859-1" />
-<meta
- name="GENERATOR"
- content="WTP" />
-<meta
- http-equiv="Content-Style-Type"
- content="text/css" />
-<link
- href="theme/Master.css"
- rel="stylesheet"
- type="text/css" />
-<title>Build Notes for HTML Component</title>
-</head>
-<body>
-<h2>Build Notes for HTML <br />
-<br />
-M3, 02/23/2005</h2>
-
-<h3>What's new in this drop</h3>
-<p>Added HTML validation, which validates against HTML spec 4.01 (with a few small variations), for both batch validation and as-you-type validation. The batch validation is &quot;off&quot; by default, until performance implications can be assessed.
-Note: a known limitation is this validation only works if the file extension (e.g. 'html') is in lowercase.</p>
-<h3>API Changes from previous Build/Milestone</h3>
-<h3>Problem reports fixed</h3>
-
-
-</body>
-</html>
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/ctool16/newhtml_wiz.gif b/bundles/org.eclipse.wst.html.ui/icons/full/ctool16/newhtml_wiz.gif
deleted file mode 100644
index 022c0eb4dd..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/ctool16/newhtml_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/table.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/table.gif
deleted file mode 100644
index b99b45cac1..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/table.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-anchor.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-anchor.gif
deleted file mode 100644
index f58992d6c8..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-anchor.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-body.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-body.gif
deleted file mode 100644
index 005fa99b46..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-body.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-button.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-button.gif
deleted file mode 100644
index d143fcf621..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-button.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-font.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-font.gif
deleted file mode 100644
index bbb40cb3f1..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-font.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-form.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-form.gif
deleted file mode 100644
index 3b139588c1..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-form.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-generic.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-generic.gif
deleted file mode 100644
index 65f516e80a..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-generic.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-html.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-html.gif
deleted file mode 100644
index fb39ba6f9e..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-html.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image-map.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image-map.gif
deleted file mode 100644
index ef3235d170..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image-map.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image.gif
deleted file mode 100644
index a988c1d5fb..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-jsp.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-jsp.gif
deleted file mode 100644
index 4084602119..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-jsp.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-template.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-template.gif
deleted file mode 100644
index 5d1f81b6d4..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-template.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-title.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-title.gif
deleted file mode 100644
index b129090b16..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-title.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag.gif b/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag.gif
deleted file mode 100644
index 5e7fb33399..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/full/wizban/newhfile_wiz.gif b/bundles/org.eclipse.wst.html.ui/icons/full/wizban/newhfile_wiz.gif
deleted file mode 100644
index 360c2a8bdd..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/full/wizban/newhfile_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/icons/sourceEditor.gif b/bundles/org.eclipse.wst.html.ui/icons/sourceEditor.gif
deleted file mode 100644
index 75ebdb8586..0000000000
--- a/bundles/org.eclipse.wst.html.ui/icons/sourceEditor.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.html.ui/plugin.properties b/bundles/org.eclipse.wst.html.ui/plugin.properties
deleted file mode 100644
index 63fcfa161b..0000000000
--- a/bundles/org.eclipse.wst.html.ui/plugin.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName=Eclipse.org
-pluginName=SSE HTML Source Editor
-nlFeatureName=SSE HTML Source Editor NL Support
-HTML_Source_Page_Editor.name=HTML Source Page Editor
-HTML_Files.name=HTML Files
-HTML_Source.name=HTML Source
-HTML_Templates.name=HTML Templates
-HTML_Styles.name=HTML Styles
-WebContentSettings.name=Web Content Settings
-Device_Profile_Entry_Provider_Extension.name=Device Profile Entry Provider Extension
-All_HTML_context_type_Extension_Element.name=All HTML
-HTML_New_context_type_Extension_Element.name=New HTML
-HTML_Tag_context_type_Extension_Element.name=HTML Tag
-HTML_Attribute_context_type_Extension_Element.name=HTML Attribute
-HTML_Attribute_value_context_type_Extension_Element.name=HTML Attribute value
-HTML_Syntax_Validator.name=HTML Syntax Validator
-###############################################################################
-#org.eclipse.ui.newWizards extension point
-_UI_WIZARD_NAME = HTML
-_UI_WIZARD_CREATE_NEW_FILE = Create a new HTML page
diff --git a/bundles/org.eclipse.wst.html.ui/plugin.xml b/bundles/org.eclipse.wst.html.ui/plugin.xml
deleted file mode 100644
index d45834b580..0000000000
--- a/bundles/org.eclipse.wst.html.ui/plugin.xml
+++ /dev/null
@@ -1,403 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.html.ui"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.wst.html.ui.internal.HTMLUIPlugin">
-
- <runtime>
- <library name="htmleditor.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.wst.sse.ui"/>
- <import plugin="org.eclipse.wst.xml.ui"/>
- <import plugin="org.eclipse.wst.css.ui"/>
- <import plugin="org.eclipse.wst.sse.core"/>
- <import plugin="org.eclipse.wst.css.core"/>
- <import plugin="org.eclipse.wst.html.core"/>
- <import plugin="org.eclipse.wst.xml.core"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.jdt.ui"/>
- <import plugin="org.eclipse.wst.common.uriresolver"/>
- <import plugin="org.eclipse.wst.validation"/>
- <import plugin="org.eclipse.wst.javascript.ui"/>
- </requires>
-
- <extension-point id="deviceProfileEntryProvider" name="%Device_Profile_Entry_Provider_Extension.name"/>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- name="%HTML_Source_Page_Editor.name"
- icon="icons/sourceEditor.gif"
- default="true"
- contributorClass="org.eclipse.wst.html.ui.internal.edit.ui.ActionContributorHTML"
- class="org.eclipse.wst.html.ui.StructuredTextEditorHTML"
- symbolicFontName="org.eclipse.wst.sse.ui.textfont"
- id="org.eclipse.wst.html.core.htmlsource.source">
- <contentTypeBinding contentTypeId="org.eclipse.wst.html.core.htmlsource" />
- </editor>
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.extendedconfiguration">
- <configuration
- type="textviewerconfiguration"
- class="org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTML"
- target="org.eclipse.wst.html.core.htmlsource"/>
- <configuration
- type="contentoutlineconfiguration"
- class="org.eclipse.wst.html.ui.internal.views.contentoutline.HTMLContentOutlineConfiguration"
- target="org.eclipse.wst.html.core.htmlsource"/>
- <configuration
- type="propertysheetconfiguration"
- class="org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConfiguration"
- target="org.eclipse.wst.html.core.htmlsource"/>
- <configuration
- type="sourceeditingtexttools"
- class="org.eclipse.wst.xml.ui.XMLSourceEditingTextTools"
- target="org.eclipse.wst.html.core.htmlsource"/>
- <configuration
- type="characterpairmatcher"
- class="org.eclipse.wst.html.ui.internal.text.HTMLDocumentRegionEdgeMatcher"
- target="org.eclipse.wst.html.core.htmlsource"/>
- <configuration
- type="structuredtextfoldingprovider"
- class="org.eclipse.wst.html.ui.internal.projection.StructuredTextFoldingProviderHTML"
- target="org.eclipse.wst.html.core.htmlsource"/>
- <definition
- type="preferencepages"
- value="org.eclipse.wst.html.ui.preferences"
- target="org.eclipse.wst.html.core.htmlsource"/>
- <definition
- type="preferencepages"
- value="org.eclipse.wst.html.ui.preferences.source"
- target="org.eclipse.wst.html.core.htmlsource"/>
- <definition
- type="preferencepages"
- value="org.eclipse.wst.html.ui.preferences.templates"
- target="org.eclipse.wst.html.core.htmlsource"/>
- <definition
- type="preferencepages"
- value="org.eclipse.wst.html.ui.preferences.styles"
- target="org.eclipse.wst.html.core.htmlsource"/>
- </extension>
- <extension
- point="org.eclipse.core.filebuffers.annotationModelCreation">
- <factory
- contentTypeId="org.eclipse.wst.html.core.htmlsource"
- class="org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModelFactory"/>
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.adapterFactoryDescription">
- <adapterFactoryDescription
- class="org.eclipse.wst.html.ui.internal.registry.AdapterFactoryProviderForHTML">
- <contentType id="org.eclipse.wst.html.core.htmlsource"/>
- </adapterFactoryDescription>
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.embeddedAdapterFactoryProvider">
- <embeddedAdapterFactoryProvider
- class="org.eclipse.wst.html.ui.internal.registry.AdapterFactoryProviderForEmbeddedHTML">
- </embeddedAdapterFactoryProvider>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
-<!-- HTML PREFERENCE PAGES-->
- <page
- name="%HTML_Files.name"
- category="org.eclipse.wst.sse.ui.preferences"
- class="org.eclipse.wst.html.ui.internal.preferences.ui.HTMLFilesPreferencePage"
- id="org.eclipse.wst.html.ui.preferences">
- </page>
- <page
- name="%HTML_Source.name"
- category="org.eclipse.wst.html.ui.preferences"
- class="org.eclipse.wst.html.ui.internal.preferences.ui.HTMLSourcePreferencePage"
- id="org.eclipse.wst.html.ui.preferences.source">
- </page>
- <page
- name="%HTML_Templates.name"
- category="org.eclipse.wst.html.ui.preferences"
- class="org.eclipse.wst.html.ui.internal.preferences.ui.HTMLTemplatePreferencePage"
- id="org.eclipse.wst.html.ui.preferences.templates">
- </page>
- <page
- name="%HTML_Styles.name"
- category="org.eclipse.wst.html.ui.preferences"
- class="org.eclipse.wst.html.ui.internal.preferences.ui.HTMLColorPage"
- id="org.eclipse.wst.html.ui.preferences.styles">
- </page>
- </extension>
-<!-- Web content settings -->
- <extension
- point="org.eclipse.ui.propertyPages">
-<!-- for j2ee web project -->
- <page
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
- name="%WebContentSettings.name"
- class="org.eclipse.wst.html.ui.internal.contentproperties.ui.ProjectContentSettingsPropertyPage"
- id="org.eclipse.wst.html.ui.dynamicprojectpropertypage">
- <filter
- name="nature"
- value="org.eclipse.wst.webproject.WebNature">
- </filter>
- </page>
-<!-- for static web project -->
- <page
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
- name="%WebContentSettings.name"
- class="org.eclipse.wst.html.ui.internal.contentproperties.ui.ProjectContentSettingsPropertyPage"
- id="org.eclipse.wst.html.ui.staticprojectpropertypage">
- <filter
- name="nature"
- value="org.eclipse.wst.webproject.StaticWebNature">
- </filter>
- </page>
- <page
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- name="%WebContentSettings.name"
- nameFilter="*.htm*"
- class="org.eclipse.wst.html.ui.internal.contentproperties.ui.HTMLContentSettingsPropertyPage"
- id="org.eclipse.wst.html.ui.htmlpropertypage">
- </page>
- <page
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- name="%WebContentSettings.name"
- nameFilter="*.shtml"
- class="org.eclipse.wst.html.ui.internal.contentproperties.ui.HTMLContentSettingsPropertyPage"
- id="org.eclipse.wst.html.ui.htmlpropertypage">
- </page>
- <page
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- name="%WebContentSettings.name"
- nameFilter="*.xhtml"
- class="org.eclipse.wst.html.ui.internal.contentproperties.ui.HTMLContentSettingsPropertyPage"
- id="org.eclipse.wst.html.ui.htmlpropertypage">
- </page>
- <page
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- name="%WebContentSettings.name"
- nameFilter="*.jhtml"
- class="org.eclipse.wst.html.ui.internal.contentproperties.ui.HTMLContentSettingsPropertyPage"
- id="org.eclipse.wst.html.ui.htmlpropertypage">
- </page>
- <page
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- name="%WebContentSettings.name"
- nameFilter="*.jsp"
- class="org.eclipse.wst.html.ui.internal.contentproperties.ui.HTMLContentSettingsPropertyPage"
- id="org.eclipse.wst.html.ui.htmlpropertypage">
- </page>
- <page
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- name="%WebContentSettings.name"
- nameFilter="*.jspf"
- class="org.eclipse.wst.html.ui.internal.contentproperties.ui.HTMLContentSettingsPropertyPage"
- id="org.eclipse.wst.html.ui.htmlpropertypage">
- </page>
- <page
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- name="%WebContentSettings.name"
- nameFilter="*.jsf"
- class="org.eclipse.wst.html.ui.internal.contentproperties.ui.HTMLContentSettingsPropertyPage"
- id="org.eclipse.wst.html.ui.htmlpropertypage">
- </page>
- <page
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- name="%WebContentSettings.name"
- nameFilter="*.wml"
- class="org.eclipse.wst.html.ui.internal.contentproperties.ui.HTMLContentSettingsPropertyPage"
- id="org.eclipse.wst.html.ui.htmlpropertypage">
- </page>
- </extension>
-<!-- Editor actionsets -->
- <extension
- point="org.eclipse.ui.actionSetPartAssociations">
- <actionSetPartAssociation
- targetID="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
- <part
- id="org.eclipse.wst.html.core.htmlsource.source">
- </part>
- </actionSetPartAssociation>
- <actionSetPartAssociation
- targetID="org.eclipse.ui.NavigateActionSet">
- <part
- id="org.eclipse.wst.html.core.htmlsource.source">
- </part>
- </actionSetPartAssociation>
- </extension>
-
-<!-- Templates -->
- <extension
- point="org.eclipse.ui.editors.templates">
- <contextType
- name="%All_HTML_context_type_Extension_Element.name"
- class="org.eclipse.wst.html.ui.internal.templates.TemplateContextTypeHTML"
- id="html_all">
- </contextType>
- <contextType
- name="%HTML_New_context_type_Extension_Element.name"
- class="org.eclipse.wst.html.ui.internal.templates.TemplateContextTypeHTML"
- id="html_new">
- </contextType>
- <contextType
- name="%HTML_Tag_context_type_Extension_Element.name"
- class="org.eclipse.wst.html.ui.internal.templates.TemplateContextTypeHTML"
- id="html_tag">
- </contextType>
- <contextType
- name="%HTML_Attribute_context_type_Extension_Element.name"
- class="org.eclipse.wst.html.ui.internal.templates.TemplateContextTypeHTML"
- id="html_attribute">
- </contextType>
- <contextType
- name="%HTML_Attribute_value_context_type_Extension_Element.name"
- class="org.eclipse.wst.html.ui.internal.templates.TemplateContextTypeHTML"
- id="html_attribute_value">
- </contextType>
- <include
- file="templates/htmldefault-templates.xml"
- translations="templates/htmldefault-templates.properties">
- </include>
- </extension>
- <!-- initialize html ui preferences -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.wst.html.ui.internal.preferences.HTMLUIPreferenceInitializer"/>
- </extension>
-
- <!--======================================================================================-->
- <!-- Document provider for ExternalFileEditorInput -->
- <!--======================================================================================-->
- <extension point="org.eclipse.ui.editors.documentProviders">
- <provider
- inputTypes="org.eclipse.wst.html.ui.internal.hyperlink.ExternalFileEditorInput"
- class="org.eclipse.ui.editors.text.TextFileDocumentProvider"
- id="org.eclipse.wst.html.ui.internal.ExternalFileDocumentProvider">
- </provider>
- </extension>
-
- <!--======================================================================================-->
- <!-- Workbench validation -->
- <!--======================================================================================-->
- <extension
- id="HTMLValidator"
- name="%HTML_Syntax_Validator.name"
- point="org.eclipse.wst.validation.validator">
- <validator>
- <!--
- <projectNature
- id="org.eclipse.wst.web.WebNature">
- </projectNature>
- <projectNature
- id="org.eclipse.wst.web.StaticWebNature">
- </projectNature>
- -->
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.html">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.htm">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.xhtml">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.htpl">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.wml">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jsp">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jspf">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jsf">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jsv">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jtpl">
- </filter>
- <helper
- class="org.eclipse.wst.html.internal.validation.HTMLValidationWorkbenchHelper">
- </helper>
- <run
- enabled="false"
- class="org.eclipse.wst.html.internal.validation.HTMLValidator">
- </run>
- </validator>
- </extension>
-
- <!--======================================================================================-->
- <!-- As you type validation -->
- <!--======================================================================================-->
-
- <extension
- point="org.eclipse.wst.sse.ui.sourcevalidation">
- <validator
- scope="total"
- class="org.eclipse.wst.html.internal.validation.HTMLValidator"
- id="org.eclipse.wst.html.htmlsourcevalidator">
- <contentTypeIdentifier
- id="org.eclipse.wst.html.core.htmlsource">
- <partitionType
- id="org.eclipse.wst.html.HTML_DEFAULT">
- </partitionType>
- </contentTypeIdentifier>
- <contentTypeIdentifier
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.wst.html.HTML_DEFAULT">
- </partitionType>
- </contentTypeIdentifier>
- </validator>
- </extension>
-
-
- <!-- New JSP wizard -->
- <extension point="org.eclipse.ui.newWizards">
- <wizard id="org.eclipse.wst.html.ui.internal.wizard.NewHTMLWizard"
- name="%_UI_WIZARD_NAME"
- class="org.eclipse.wst.html.ui.internal.wizard.NewHTMLWizard"
- category="org.eclipse.wst.web.ui"
- icon="icons/full/ctool16/newhtml_wiz.gif">
- <description>%_UI_WIZARD_CREATE_NEW_FILE</description>
- <selection class="org.eclipse.core.resources.IResource" />
- </wizard>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationHelper.java b/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationHelper.java
deleted file mode 100644
index 37e76a287a..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationHelper.java
+++ /dev/null
@@ -1,52 +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.html.internal.validation;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- * A version of IHelper not dependent on IWorkbenchHelper.
- *
- * @author pavery
- */
-public class HTMLValidationHelper {
- /**
- */
- public HTMLValidationHelper() {
- super();
- }
-
- /**
- * When an IValidator associates a target object with an IMessage, the
- * WorkbenchReporter eventually resolves that target object with an
- * IResource. Sometimes more than one target object resolves to the same
- * IResource (usually the IProject, which is the default IResource when an
- * IFile cannot be found). This method is called, by the
- * WorkbenchReporter, so that the WorkbenchReporter can distinguish
- * between the IMessages which are on the same IResource, but refer to
- * different target objects. This is needed for the
- * removeAllMessages(IValidator, Object) method, so that when one target
- * object removes all of its messages, that it doesn't remove another
- * target object's messages.
- *
- * This method may return null only if object is null. Otherwise, an id
- * which can uniquely identify a particular object must be returned. The
- * id needs to be unique only within one particular IValidator.
- */
- public String getTargetObjectName(Object object) {
- if (object == null)
- return null;
- if (object instanceof IFile)
- ((IFile) object).getFullPath().toString();
- return object.toString();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationReporter.java b/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationReporter.java
deleted file mode 100644
index 624e7c13fd..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationReporter.java
+++ /dev/null
@@ -1,134 +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.html.internal.validation;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.validate.ValidationMessage;
-import org.eclipse.wst.sse.core.internal.validate.ValidationReporter;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-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;
-
-public class HTMLValidationReporter implements ValidationReporter {
-
- private IValidator owner = null;
- private IReporter reporter = null;
- private IFile file = null;
- private IStructuredModel model = null;
- private HTMLValidationResult result = null;
-
- /**
- */
- public HTMLValidationReporter(IValidator owner, IReporter reporter, IFile file, IStructuredModel model) {
- super();
- this.owner = owner;
- this.reporter = reporter;
- this.file = file;
- this.model = model;
- }
-
- /**
- */
- public void clear() {
- if (this.file == null)
- return;
-
- this.result = null;
-
- if (this.reporter != null) {
- this.reporter.removeAllMessages(this.owner, this.file);
- }
- else {
- // remove by myself?
- String id = HTMLValidator.class.getName();
- try {
- // TaskListHelper API changed
- // TaskListHelper.getTaskList().removeAllTasks(id, this.file,
- // null);
- TaskListHelper.getTaskList().removeAllTasks(this.file, id, null);
- }
- catch (CoreException ex) {
- }
- }
- }
-
-
- /**
- */
- public HTMLValidationResult getResult() {
- if (this.result == null)
- this.result = new HTMLValidationResult();
- return this.result;
- }
-
- /**
- */
- public void report(ValidationMessage message) {
- if (message == null)
- return;
- if (this.file == null)
- return;
-
- IMessage mes = translateMessage(message);
-
- if (this.reporter != null) {
- this.reporter.addMessage(this.owner, mes);
- }
- else {
- // add by myself?
- String id = HTMLValidator.class.getName();
- String location = Integer.toString(mes.getLineNumber());
- String name = this.file.getFullPath().toString();
- try {
- TaskListHelper.getTaskList().addTask(id, this.file, location, mes.getId(), mes.getText(), mes.getSeverity(), name, mes.getGroupName(), mes.getOffset(), mes.getLength());
- }
- catch (CoreException ex) {
- }
- }
- }
-
- /**
- * Translate ValidationMessage to IMessage and generate result log
- */
- private IMessage translateMessage(ValidationMessage message) {
- int severity = IMessage.LOW_SEVERITY;
- HTMLValidationResult result = getResult();
- switch (message.getSeverity()) {
- case ValidationMessage.ERROR :
- severity = IMessage.HIGH_SEVERITY;
- result.addError();
- break;
- case ValidationMessage.WARNING :
- severity = IMessage.NORMAL_SEVERITY;
- result.addWarning();
- break;
- default :
- result.addInformation();
- break;
- }
-
- IMessage mes = new LocalizedMessage(severity, message.getMessage(), this.file);
- mes.setOffset(message.getOffset());
- mes.setLength(message.getLength());
- if (this.model != null) {
- IStructuredDocument flatModel = this.model.getStructuredDocument();
- if (flatModel != null) {
- int line = flatModel.getLineOfOffset(message.getOffset());
- mes.setLineNo(line + 1);
- }
- }
-
- return mes;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationResult.java b/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationResult.java
deleted file mode 100644
index 90c9f771cf..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationResult.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.internal.validation;
-
-public class HTMLValidationResult {
- private int errors = 0;
- private int warnings = 0;
- private int informations = 0;
-
- /**
- */
- public HTMLValidationResult() {
- }
-
- /**
- */
- public void addError() {
- this.errors++;
- }
-
- /**
- */
- public void addInformation() {
- this.informations++;
- }
-
- /**
- */
- public void addWarning() {
- this.warnings++;
- }
-
- /**
- */
- public int getErrors() {
- return this.errors;
- }
-
- /**
- */
- public int getInformations() {
- return this.informations;
- }
-
- /**
- */
- public int getWarnings() {
- return this.warnings;
- }
-
- /**
- */
- public boolean isValid() {
- return (this.errors == 0 && this.warnings == 0 && this.informations == 0);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationWorkbenchHelper.java b/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationWorkbenchHelper.java
deleted file mode 100644
index 90bfde5134..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationWorkbenchHelper.java
+++ /dev/null
@@ -1,47 +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.html.internal.validation;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.validation.internal.operations.WorkbenchContext;
-
-public class HTMLValidationWorkbenchHelper extends WorkbenchContext {
- /**
- */
- public HTMLValidationWorkbenchHelper() {
- super();
- }
-
- /**
- * When an IValidator associates a target object with an IMessage, the
- * WorkbenchReporter eventually resolves that target object with an
- * IResource. Sometimes more than one target object resolves to the same
- * IResource (usually the IProject, which is the default IResource when an
- * IFile cannot be found). This method is called, by the
- * WorkbenchReporter, so that the WorkbenchReporter can distinguish
- * between the IMessages which are on the same IResource, but refer to
- * different target objects. This is needed for the
- * removeAllMessages(IValidator, Object) method, so that when one target
- * object removes all of its messages, that it doesn't remove another
- * target object's messages.
- *
- * This method may return null only if object is null. Otherwise, an id
- * which can uniquely identify a particular object must be returned. The
- * id needs to be unique only within one particular IValidator.
- */
- public String getTargetObjectName(Object object) {
- if (object == null)
- return null;
- if (object instanceof IFile)
- return getPortableName((IFile) object);
- return object.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidator.java b/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidator.java
deleted file mode 100644
index dd19bfec64..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidator.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.internal.validation;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.html.core.internal.validate.HTMLValidationAdapterFactory;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.sse.core.IModelManager;
-import org.eclipse.wst.sse.core.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.util.URIResolver;
-import org.eclipse.wst.sse.core.internal.validate.ValidationAdapter;
-import org.eclipse.wst.validation.internal.operations.IWorkbenchContext;
-import org.eclipse.wst.validation.internal.operations.WorkbenchReporter;
-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.document.IDOMDocument;
-import org.eclipse.wst.xml.core.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapter;
-import org.eclispe.wst.validation.internal.core.Message;
-
-public class HTMLValidator implements IValidator {
- /**
- */
- public HTMLValidator() {
- super();
- }
-
- /**
- */
- public void cleanup(IReporter reporter) {
- // nothing to do
- }
-
- /**
- */
- protected IDOMModel getModel(IProject project, IFile file) {
- if (project == null || file == null)
- return null;
- if (!file.exists())
- return null;
- if (!canHandle(file))
- return null;
-
- IStructuredModel model = null;
- IModelManager manager = StructuredModelManager.getModelManager();
-
- try {
- try {
- model = manager.getModelForRead(file);
- }
- catch (UnsupportedEncodingException ex) {
- // retry ignoring META charset for invalid META charset
- // specification
- // recreate input stream, because it is already partially read
- model = manager.getModelForRead(file, new String(), null);
- }
- }
- catch (UnsupportedEncodingException ex) {
- }
- catch (IOException ex) {
- }
- catch (CoreException ex) {
- }
-
- if (model == null)
- return null;
- if (!(model instanceof IDOMModel)) {
- releaseModel(model);
- return null;
- }
- return (IDOMModel) model;
- }
-
- /**
- */
- protected HTMLValidationReporter getReporter(IReporter reporter, IFile file, IDOMModel model) {
- return new HTMLValidationReporter(this, reporter, file, model);
- }
-
- /**
- * Check file extension to validate
- */
- private boolean canHandle(IFile file) {
- if (file == null)
- return false;
- String name = file.getFullPath().toString();
- if (name == null)
- return false;
- int index = name.lastIndexOf('.');
- if (index < 0)
- return false;
- String ext = name.substring(index + 1);
- if (ext == null || ext.length() == 0)
- return false;
- ext = ext.toLowerCase();
- return (ext.startsWith("htm") || //$NON-NLS-1$
- ext.startsWith("jsp") || //$NON-NLS-1$
- ext.equals("jsf") || //$NON-NLS-1$
- ext.startsWith("xht") || //$NON-NLS-1$
- ext.startsWith("shtm") || //$NON-NLS-1$
- ext.startsWith("wml") || //$NON-NLS-1$
- ext.equals("jhtml"));//$NON-NLS-1$
- }
-
- /**
- */
- private boolean hasHTMLFeature(IDOMDocument document) {
- DocumentTypeAdapter adapter = (DocumentTypeAdapter) document.getAdapterFor(DocumentTypeAdapter.class);
- if (adapter == null)
- return false;
- return adapter.hasFeature("HTML");//$NON-NLS-1$
- }
-
- /**
- */
- protected void releaseModel(IStructuredModel model) {
- if (model != null)
- model.releaseFromRead();
- }
-
- /**
- */
- public void validate(IValidationContext helper, IReporter reporter) {
- if (helper == null)
- return;
- if ((reporter != null) && (reporter.isCancelled() == true)) {
- throw new OperationCanceledException();
- }
- String[] deltaArray = helper.getURIs();
- if (deltaArray != null && deltaArray.length > 0) {
- validateDelta(helper, reporter);
- }
- else {
- validateFull(helper, reporter);
- }
- }
-
- /**
- */
- protected HTMLValidationResult validate(IDOMModel model, IFile file) {
- IProject prj = null;
- if (file != null) {
- prj = file.getProject();
- }
- if ((prj == null) && (model != null)) {
- URIResolver res = model.getResolver();
- if (res != null) {
- prj = res.getProject();
- }
- }
- final WorkbenchReporter reporter = new WorkbenchReporter(prj, new NullProgressMonitor());
- return validate(reporter, file, model);
- }
-
- /**
- */
- private HTMLValidationResult validate(IReporter reporter, IFile file, IDOMModel model) {
- if (file == null || model == null)
- return null; // error
- IDOMDocument document = model.getDocument();
- if (document == null)
- return null; // error
- if (!hasHTMLFeature(document))
- return null; // ignore
-
- INodeAdapterFactory factory = HTMLValidationAdapterFactory.getInstance();
- ValidationAdapter adapter = (ValidationAdapter) factory.adapt(document);
- if (adapter == null)
- return null; // error
-
- HTMLValidationReporter rep = getReporter(reporter, file, model);
- rep.clear();
- adapter.setReporter(rep);
- if (reporter != null) {
- String args[] = new String[]{file.getFullPath().toString()};
-
- // Message mess = new Message("HTMLValidation", //$NON-NLS-1$
- // SeverityEnum.LOW_SEVERITY,
- // "MESSAGE_HTML_VALIDATION_MESSAGE_UI_", //$NON-NLS-1$
- // args);
- Message mess = new LocalizedMessage(IMessage.LOW_SEVERITY, HTMLUIMessages.MESSAGE_HTML_VALIDATION_MESSAGE_UI_);
- mess.setParams(args);
- reporter.displaySubtask(this, mess);
- }
- adapter.validate(document);
- return rep.getResult();
- }
-
- /**
- */
- private void validateContainer(IValidationContext helper, IReporter reporter, IContainer container) {
- try {
- IResource[] resourceArray = container.members(false);
- for (int i = 0; i < resourceArray.length; i++) {
- IResource resource = resourceArray[i];
- if (resource == null)
- continue;
- if (resource instanceof IFile) {
- validateFile(helper, reporter, (IFile) resource);
- }
- else if (resource instanceof IContainer) {
- validateContainer(helper, reporter, (IContainer) resource);
- }
- }
- }
- catch (CoreException ex) {
- }
- }
-
- /**
- */
- private void validateDelta(IValidationContext helper, IReporter reporter) {
- String[] deltaArray = helper.getURIs();
- for (int i = 0; i < deltaArray.length; i++) {
- String delta = deltaArray[i];
- if (delta == null)
- continue;
- IResource resource = getResource(delta);
- if (resource == null || !(resource instanceof IFile))
- continue;
- validateFile(helper, reporter, (IFile) resource);
- }
- }
-
- /**
- */
- private void validateFile(IValidationContext helper, IReporter reporter, IFile file) {
- if ((reporter != null) && (reporter.isCancelled() == true)) {
- throw new OperationCanceledException();
- }
- IDOMModel model = getModel(file.getProject(), file);
- if (model == null)
- return;
-
- try {
- validate(reporter, file, model);
- }
- finally {
- releaseModel(model);
- }
- }
-
- /**
- */
- private void validateFull(IValidationContext helper, IReporter reporter) {
- IProject project = null;
- String[] fileDelta = helper.getURIs();
- if (helper instanceof IWorkbenchContext) {
- IWorkbenchContext wbHelper = (IWorkbenchContext) helper;
- project = wbHelper.getProject();
- }
- else {
- // won't work for project validation (b/c nothing in file delta)
- project = getResource(fileDelta[0]).getProject();
- }
- if (project == null)
- return;
- validateContainer(helper, reporter, project);
- }
-
- /*
- * added to get rid or dependency on IWorkbenchHelper
- *
- * @see com.ibm.sse.editor.extensions.validator.IWorkbenchHelper#getResource(com.ibm.sse.editor.extensions.validator.IFileDelta)
- */
- public IResource getResource(String delta) {
- return ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(delta));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/LocalizedMessage.java b/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/LocalizedMessage.java
deleted file mode 100644
index b637b177dd..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/LocalizedMessage.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.internal.validation;
-
-import java.util.Locale;
-
-import org.eclipse.core.resources.IResource;
-import org.eclispe.wst.validation.internal.core.Message;
-
-/**
- * copied from org.eclipse.wst.validation.internal.operations.LocalizedMessage
- *
- * This class is provided for validators which run only in Eclipse and whose messages, because they
- * come from another tool, are already localized. LocalizedMessage cannot be used by any validator
- * which needs to run in both WebSphere and Eclipse.
- */
-public class LocalizedMessage extends Message {
- private String _message = null;
-
- public LocalizedMessage(int severity, String messageText) {
- this(severity, messageText, null);
- }
-
- public LocalizedMessage(int severity, String messageText, IResource targetObject) {
- this(severity, messageText, (Object) targetObject);
- }
-
- public LocalizedMessage(int severity, String messageText, Object targetObject) {
- super(null, severity, null);
- setLocalizedMessage(messageText);
- setTargetObject(targetObject);
- }
-
- public void setLocalizedMessage(String message) {
- _message = message;
- }
-
- public String getLocalizedMessage() {
- return _message;
- }
-
- public String getText() {
- return getLocalizedMessage();
- }
-
- public String getText(ClassLoader cl) {
- return getLocalizedMessage();
- }
-
- public String getText(Locale l) {
- return getLocalizedMessage();
- }
-
- public String getText(Locale l, ClassLoader cl) {
- return getLocalizedMessage();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListHelper.java b/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListHelper.java
deleted file mode 100644
index 17ecaf67d3..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListHelper.java
+++ /dev/null
@@ -1,46 +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.html.internal.validation;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * pa_TODO moved this class here for now to remove dependency on
- * com.ibm.etools.validation.
- *
- * This class is intended to be used only by the validation framework. The
- * TaskListHelper class will be removed in Milestone 4.
- */
-public class TaskListHelper {
- private static TaskListHelper _taskListHelper = null;
-
- public static TaskListHelper getTaskList() {
- if (_taskListHelper == null) {
- _taskListHelper = new TaskListHelper();
- }
- return _taskListHelper;
- }
-
- /**
- * This method adds a message to a resource in the task list.
- */
- public void addTask(String pluginId, IResource resource, String location, String messageId, String message, int markerType, String targetObjectName, String groupName, int offset, int length) throws CoreException {
- TaskListUtility.addTask(pluginId, resource, location, messageId, message, markerType, targetObjectName, groupName, offset, length);
- }
-
- /**
- * This method removes all messages from a resource in the task list.
- */
- public void removeAllTasks(IResource resource, String owner, String objectName) throws CoreException {
- TaskListUtility.removeAllTasks(resource, owner, objectName);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListUtility.java b/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListUtility.java
deleted file mode 100644
index d23011610f..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListUtility.java
+++ /dev/null
@@ -1,435 +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.html.internal.validation;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-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.wst.validation.internal.provisional.core.IMessage;
-
-/**
- * This class must be called only by the validation framework.
- *
- * This singleton interacts with the eclipse workbench's Task list.
- * TaskListUtility adds and removes tasks from the list.
- *
- * This class must not be called outside of an IWorkspaceRunnable or
- * IRunnableWithProgress. Many resource deltas can be generated by the methods
- * in this class.
- *
- * This came from com.ibm.etools.validate.internal.util.TaskListUtility
- */
-public class TaskListUtility {
- // private static final String PLUGIN_ID = ValidationPlugin.PLUGIN_ID;
- private static final String PLUGIN_ID = "com.ibm.etools.validation";//$NON-NLS-1$
- private static final String VALIDATION_MARKER = PLUGIN_ID + ".problemmarker"; //$NON-NLS-1$ // The extension which is used to add validation markers to the task list
- private static final String VALIDATION_MARKER_OWNER = "owner"; //$NON-NLS-1$ // The IValidator who owns the IMarker on the task list
- private static final String VALIDATION_MARKER_SEVERITY = "validationSeverity"; //$NON-NLS-1$ // one of the IMessage values
- private static final String VALIDATION_MARKER_TARGETOBJECT = "targetObject"; //$NON-NLS-1$ // When more than one target object resolves to the same IResource, this field identifies which targetObject owns a particular message.
- private static final String VALIDATION_MARKER_GROUP = "groupName"; //$NON-NLS-1$ // For incremental validation, this field associates a message with a group, so that a subset of messages may be removed from a file.
- private static final String VALIDATION_MARKER_MESSAGEID = "messageId"; //$NON-NLS-1$ // Persist the message id of the message, not just the translated text.
- private static final int DEPTH_INFINITE = IResource.DEPTH_INFINITE;
- private static final int DEPTH_ZERO = IResource.DEPTH_ZERO;
- private final static IMarker[] NO_MARKERS = new IMarker[0];
-
- /**
- * This method adds a message to a resource in the task list.
- */
- public static IMarker addTask(String pluginId, IResource resource, String location, String messageId, String message, int markerType, String targetObjectName, String groupName, int offset, int length) throws CoreException {
- if ((message == null) || (resource == null)) {
- return null;
- }
-
- int severity = getSeverity(markerType);
-
- // Allow duplicate entries in the task list.
- // Prior to a full validation, the validation framework will remove
- // all messages owned
- // by a validator before it is executed.
- // Prior to an incremental validation, the validation framework will
- // remove all messages,
- // on each of the changed resources, owned by a validator before it is
- // invoked.
- //
- // It is up to the validator to make sure that it is not adding the
- // same message
- // in more than one place, and also to clear out any old messages
- // which are not cleared
- // by the validation framework.
- IMarker item = resource.createMarker(VALIDATION_MARKER); // add a
- // validation
- // marker
-
- // For performance reasons, replace the multiple setAttribute
- // calls above with a single setAttributes call.
- boolean offsetSet = ((offset != IMessage.OFFSET_UNSET) && (length != IMessage.OFFSET_UNSET));
- int size = (offsetSet) ? 10 : 8; // add CHAR_START, CHAR_END only
- // if the offset is set. If the
- // offset is set, it takes
- // precendence over the line
- // number. (eclipse's rule, not
- // mine.)
- String[] attribNames = new String[size];
- Object[] attribValues = new Object[size];
-
- // Very first thing, add the owner. That way, if the code dies
- // before things are persisted, hopefully this marker will be
- // persisted.
- // Hopefully, eclipse WILL persist this field, as requested.
- attribNames[0] = VALIDATION_MARKER_OWNER;
- attribValues[0] = pluginId;
- attribNames[1] = VALIDATION_MARKER_SEVERITY; // this validation
- // severity is stored,
- // in addition to the
- // marker severity, to
- // enable more than
- // one severity of
- // message to be
- // displayed. e.g.
- // ERROR | WARNING
- // (using binary OR).
- // The IMarker
- // constants are
- // regular decimal
- // constants.
- attribValues[1] = new Integer(markerType);
- attribNames[2] = VALIDATION_MARKER_TARGETOBJECT; // to distinguish
- // between
- // messages which
- // are registered
- // on an
- // IResource, but
- // against
- // different
- // target objects
- attribValues[2] = ((targetObjectName == null) ? "" : targetObjectName); //$NON-NLS-1$
- attribNames[3] = VALIDATION_MARKER_GROUP;
- attribValues[3] = ((groupName == null) ? "" : groupName); //$NON-NLS-1$
- attribNames[4] = IMarker.MESSAGE;
- attribValues[4] = message;
- attribNames[5] = VALIDATION_MARKER_MESSAGEID;
- attribValues[5] = messageId;
-
- attribNames[6] = IMarker.SEVERITY; // IMarker.SEVERITY_ERROR,
- // IMarker.SEVERITY_WARNING,
- // IMarker.SEVERITY_INFO
- attribValues[6] = new Integer(severity);
- try {
- // If the location is a line number, store it as a line number
- Integer lineNumber = Integer.valueOf(location);
- attribNames[7] = IMarker.LINE_NUMBER;
- attribValues[7] = lineNumber;
- }
- catch (NumberFormatException exc) {
- // Otherwise, store it as a text location
- attribNames[7] = IMarker.LOCATION;
- attribValues[7] = location;
- }
-
- if (offsetSet) {
- attribNames[8] = IMarker.CHAR_START;
- attribValues[8] = new Integer(offset);
- attribNames[9] = IMarker.CHAR_END;
- attribValues[9] = new Integer(offset + length);
- }
-
- item.setAttributes(attribNames, attribValues);
-
- return item;
- }
-
- /**
- * Given one of the SeverityEnum severities, return the IMarker severity
- * int that is its equivalent.
- */
- private static int getSeverity(int severityEnumValue) {
- switch (severityEnumValue) {
- case (IMessage.HIGH_SEVERITY) : {
- return IMarker.SEVERITY_ERROR;
- }
-
- case (IMessage.LOW_SEVERITY) : {
- return IMarker.SEVERITY_INFO;
- }
-
- case (IMessage.NORMAL_SEVERITY) : {
- return IMarker.SEVERITY_WARNING;
- }
-
- case (IMessage.ALL_MESSAGES) :
- case (IMessage.ERROR_AND_WARNING) :
- default : {
- // assume it's a warning.
- return IMarker.SEVERITY_WARNING;
- }
- }
- }
-
- private static int getDepth(IResource resource) {
- if (resource instanceof IProject) {
- return DEPTH_INFINITE; // DEPTH_INFINITE means get this project's
- // markers, and the markers belonging to
- // the project's children.
- }
- else if (resource instanceof IWorkspaceRoot) {
- // Needed for the ValidationMigrator when it checks for orphan
- // tasks.
- return DEPTH_INFINITE; // DEPTH_INFINITE means get all of the
- // markers in the workspace
- }
-
- return DEPTH_ZERO; // DEPTH_ZERO means just this resource, not its
- // children
- }
-
- private static IMarker[] getValidationTasks(IResource resource, int severity, int depth) {
- IMarker[] tempMarkers = null;
- int validCount = 0;
- try {
- IMarker[] allMarkers = null;
- try {
- allMarkers = resource.findMarkers(VALIDATION_MARKER, false, depth); // false
- // means
- // only
- // consider
- // PROBLEM_MARKER,
- // not
- // variants
- // of
- // PROBLEM_MARKER.
- // Since
- // addTask
- // only
- // adds
- // PROBLEM_MARKER,
- // we
- // don't
- // need
- // to
- // consider
- // its
- // subtypes.
- }
- catch (CoreException exc) {
- // Logger logger =
- // ValidationPlugin.getPlugin().getMsgLogger();
- // if (logger.isLoggingLevel(Level.SEVERE)) {
- // LogEntry entry = ValidationPlugin.getLogEntry();
- // entry.setSourceID("TaskListUtility.getValidationTasks(IResource,
- // int)"); //$NON-NLS-1$
- // entry.setTargetException(exc);
- // logger.write(Level.SEVERE, entry);
- // }
- return NO_MARKERS;
- }
-
- // Now filter in the markers, based on severity type.
- if (allMarkers.length != 0) {
- tempMarkers = new IMarker[allMarkers.length];
- for (int i = 0; i < allMarkers.length; i++) {
- IMarker marker = allMarkers[i];
- Integer filterSeverity = (Integer) marker.getAttribute(VALIDATION_MARKER_SEVERITY);
- if (filterSeverity == null) {
- // odd...marker wasn't created correctly. How could
- // this happen?
- // Default to the current severity and add it to the
- // list.
- try {
- marker.setAttribute(IMarker.SEVERITY, getSeverity(severity));
- }
- catch (CoreException exc) {
- // Logger logger =
- // ValidationPlugin.getPlugin().getMsgLogger();
- // if (logger.isLoggingLevel(Level.SEVERE)) {
- // LogEntry entry =
- // ValidationPlugin.getLogEntry();
- // entry.setSourceID("TaskListUtility.getValidationTasks(int,
- // IResource, int)"); //$NON-NLS-1$
- // entry.setTargetException(exc);
- // logger.write(Level.SEVERE, entry);
- // }
- continue;
- }
- catch (Throwable exc) {
- // Logger logger =
- // ValidationPlugin.getPlugin().getMsgLogger();
- // if (logger.isLoggingLevel(Level.SEVERE)) {
- // LogEntry entry =
- // ValidationPlugin.getLogEntry();
- // entry.setSourceID("TaskListUtility.getValidationTasks(int,
- // IResource, int)"); //$NON-NLS-1$
- // entry.setTargetException(exc);
- // logger.write(Level.SEVERE, entry);
- // }
- continue;
- }
- }
- else if ((severity & filterSeverity.intValue()) == 0) {
- continue;
- }
- tempMarkers[validCount++] = marker;
- }
- }
- }
- catch (CoreException exc) {
- // Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
- // if (logger.isLoggingLevel(Level.SEVERE)) {
- // LogEntry entry = ValidationPlugin.getLogEntry();
- // entry.setSourceID("TaskListUtility.getValidationTasks(int,
- // IResource, int)"); //$NON-NLS-1$
- // entry.setTargetException(exc);
- // logger.write(Level.SEVERE, entry);
- // }
- }
-
- if (validCount == 0) {
- return NO_MARKERS;
- }
-
- IMarker[] validMarkers = new IMarker[validCount];
- System.arraycopy(tempMarkers, 0, validMarkers, 0, validCount);
- return validMarkers;
- }
-
- private static IMarker[] getValidationTasks(IResource resource, String[] messageOwners, int depth) {
- IMarker[] markers = getValidationTasks(resource, IMessage.ALL_MESSAGES, depth);
- if (markers.length == 0) {
- return NO_MARKERS;
- }
-
- IMarker[] temp = new IMarker[markers.length];
- int validCount = 0;
- for (int i = 0; i < markers.length; i++) {
- IMarker marker = markers[i];
-
- try {
- Object owner = marker.getAttribute(VALIDATION_MARKER_OWNER);
- if ((owner == null) || !(owner instanceof String)) {
- // The ValidationMigrator will remove any "unowned"
- // validation markers.
- continue;
- }
-
- for (int j = 0; j < messageOwners.length; j++) {
- String messageOwner = messageOwners[j];
- if (((String) owner).equals(messageOwner)) {
- temp[validCount++] = marker;
- break;
- }
- }
- }
- catch (CoreException exc) {
- // Logger logger =
- // ValidationPlugin.getPlugin().getMsgLogger();
- // if (logger.isLoggingLevel(Level.SEVERE)) {
- // LogEntry entry = ValidationPlugin.getLogEntry();
- // entry.setSourceID("TaskListUtility.getValidationTasks(project,
- // String[])"); //$NON-NLS-1$
- // entry.setTargetException(exc);
- // logger.write(Level.SEVERE, entry);
- // }
- return NO_MARKERS;
- }
- }
-
- IMarker[] result = new IMarker[validCount];
- System.arraycopy(temp, 0, result, 0, validCount);
- return result;
- }
-
- /**
- * This method retrieves all validation tasks from the resource. If depth
- * is INFINITE, child tasks are returned as well. Only the tasks which are
- * owned by the specified messageOwner, and apply to the named IMessage's
- * target object (objectName) will be returned.
- */
- private static IMarker[] getValidationTasks(IResource resource, String[] messageOwner, String objectName, String groupName, int depth) throws CoreException {
- if ((messageOwner == null) || (resource == null)) {
- return NO_MARKERS;
- }
-
- int validCount = 0;
- IMarker[] validList = null;
- IMarker[] markers = getValidationTasks(resource, messageOwner, depth);
- if (markers != null) {
- validList = new IMarker[markers.length];
- for (int i = 0; i < markers.length; i++) {
- IMarker marker = markers[i];
-
- // If more than one target object resolves to the same
- // resource, removing one target's
- // messages should not remove the other target object's
- // messages.
- if (objectName != null) {
- Object targetObject = marker.getAttribute(VALIDATION_MARKER_TARGETOBJECT);
- if ((targetObject == null) || !(targetObject instanceof String) || !(((String) targetObject).equals(objectName))) {
- continue;
- }
- }
-
- if (groupName != null) {
- Object group = marker.getAttribute(VALIDATION_MARKER_GROUP);
- if ((group == null) || !(group instanceof String) || !(((String) group).equals(groupName))) {
- continue;
- }
- }
-
- validList[validCount++] = marker;
- }
- }
-
- if (validCount == 0) {
- return NO_MARKERS;
- }
-
- IMarker[] result = new IMarker[validCount];
- System.arraycopy(validList, 0, result, 0, validCount);
- return result;
- }
-
- /**
- * This method removes all messages from a resource in the task list.
- */
- public static void removeAllTasks(IResource resource, String owner, String objectName) throws CoreException {
- removeAllTasks(resource, new String[]{owner}, objectName);
- }
-
- public static void removeAllTasks(IResource resource, String[] owners, String objectName) throws CoreException {
- removeAllTasks(resource, owners, objectName, getDepth(resource));
- }
-
- protected static void removeAllTasks(IResource resource, String[] owners, String objectName, int depth) throws CoreException {
- removeTaskSubset(resource, owners, objectName, null, depth); // null
- // means
- // no
- // group
- // name
- }
-
- /**
- * This method removes a subset of tasks from the project, including child
- * tasks. Every task which belongs to the group, identified by groupName,
- * will be removed.
- */
- protected static void removeTaskSubset(IResource resource, String[] owners, String objectName, String groupName, int depth) throws CoreException {
- if ((owners == null) || (resource == null)) {
- return;
- }
-
- IMarker[] allTasks = getValidationTasks(resource, owners, objectName, groupName, depth);
- if (allTasks.length > 0) {
- ResourcesPlugin.getWorkspace().deleteMarkers(allTasks);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextEditorHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextEditorHTML.java
deleted file mode 100644
index 9a3d9c2369..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextEditorHTML.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.wst.html.ui.internal.edit.ui.CleanupActionHTML;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.html.ui.internal.search.HTMLFindOccurrencesAction;
-import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
-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.search.FindOccurrencesActionProvider;
-import org.eclipse.wst.xml.ui.actions.AddBlockCommentActionXML;
-import org.eclipse.wst.xml.ui.actions.RemoveBlockCommentActionXML;
-import org.eclipse.wst.xml.ui.actions.ToggleCommentActionXML;
-
-public class StructuredTextEditorHTML extends StructuredTextEditor {
- private final static String UNDERSCORE = "_"; //$NON-NLS-1$
-
- protected void createActions() {
- super.createActions();
-
- ResourceBundle resourceBundle = HTMLUIMessages.getResourceBundle();
-
- Action action = new CleanupActionHTML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT + UNDERSCORE, this);
- action.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT);
- setAction(StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT, action);
-
- action = new ToggleCommentActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_TOGGLE_COMMENT + UNDERSCORE, this);
- action.setActionDefinitionId(ActionDefinitionIds.TOGGLE_COMMENT);
- setAction(StructuredTextEditorActionConstants.ACTION_NAME_TOGGLE_COMMENT, action);
-
- action = new AddBlockCommentActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT + UNDERSCORE, this);
- action.setActionDefinitionId(ActionDefinitionIds.ADD_BLOCK_COMMENT);
- setAction(StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT, action);
-
- action = new RemoveBlockCommentActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT + UNDERSCORE, this);
- action.setActionDefinitionId(ActionDefinitionIds.REMOVE_BLOCK_COMMENT);
- setAction(StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT, action);
-
- FindOccurrencesActionProvider foAction = new FindOccurrencesActionProvider(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FIND_OCCURRENCES + UNDERSCORE, this);
- foAction.addAction(new HTMLFindOccurrencesAction(resourceBundle, "", this)); //$NON-NLS-1$
- foAction.setActionDefinitionId(ActionDefinitionIds.FIND_OCCURRENCES);
- setAction(StructuredTextEditorActionConstants.ACTION_NAME_FIND_OCCURRENCES, foAction);
- markAsSelectionDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FIND_OCCURRENCES, true);
- }
- protected void initializeEditor() {
- super.initializeEditor();
- setHelpContextId(IHelpContextIds.HTML_SOURCEVIEW_HELPID);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java
deleted file mode 100644
index a33c52aadb..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jdt.ui.PreferenceConstants;
-import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
-import org.eclipse.jdt.ui.text.JavaTextTools;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.IAutoEditStrategy;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextDoubleClickStrategy;
-import org.eclipse.jface.text.ITextHover;
-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.formatter.IContentFormatter;
-import org.eclipse.jface.text.formatter.MultiPassContentFormatter;
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-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.reconciler.IReconcilingStrategy;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.css.core.text.ICSSPartitionTypes;
-import org.eclipse.wst.css.ui.internal.contentassist.CSSContentAssistProcessor;
-import org.eclipse.wst.css.ui.internal.style.LineStyleProviderForEmbeddedCSS;
-import org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl;
-import org.eclipse.wst.html.core.internal.text.StructuredTextPartitionerForHTML;
-import org.eclipse.wst.html.core.text.IHTMLPartitionTypes;
-import org.eclipse.wst.html.ui.internal.contentassist.HTMLContentAssistProcessor;
-import org.eclipse.wst.html.ui.internal.contentassist.NoRegionContentAssistProcessorForHTML;
-import org.eclipse.wst.html.ui.internal.hyperlink.URIHyperlinkDetector;
-import org.eclipse.wst.html.ui.internal.style.LineStyleProviderForHTML;
-import org.eclipse.wst.html.ui.internal.taginfo.HTMLBestMatchHoverProcessor;
-import org.eclipse.wst.html.ui.internal.taginfo.HTMLInformationProvider;
-import org.eclipse.wst.html.ui.internal.taginfo.HTMLTagInfoHoverProcessor;
-import org.eclipse.wst.javascript.ui.internal.common.contentassist.JavaScriptContentAssistProcessor;
-import org.eclipse.wst.javascript.ui.internal.common.style.LineStyleProviderForJavaScript;
-import org.eclipse.wst.javascript.ui.internal.common.taginfo.JavaScriptBestMatchHoverProcessor;
-import org.eclipse.wst.javascript.ui.internal.common.taginfo.JavaScriptInformationProvider;
-import org.eclipse.wst.javascript.ui.internal.common.taginfo.JavaScriptTagInfoHoverProcessor;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.text.IStructuredPartitionTypes;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.format.StructuredFormattingStrategy;
-import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.reconcile.StructuredRegionProcessor;
-import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
-import org.eclipse.wst.sse.ui.style.IHighlighter;
-import org.eclipse.wst.sse.ui.style.LineStyleProvider;
-import org.eclipse.wst.sse.ui.taginfo.AnnotationHoverProcessor;
-import org.eclipse.wst.sse.ui.taginfo.ProblemAnnotationHoverProcessor;
-import org.eclipse.wst.sse.ui.taginfo.TextHoverManager;
-import org.eclipse.wst.sse.ui.util.EditorUtility;
-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.autoedit.StructuredAutoEditStrategyXML;
-import org.eclipse.wst.xml.ui.internal.correction.CorrectionProcessorXML;
-import org.eclipse.wst.xml.ui.internal.doubleclick.XMLDoubleClickStrategy;
-import org.eclipse.wst.xml.ui.reconcile.StructuredTextReconcilingStrategyForMarkup;
-
-public class StructuredTextViewerConfigurationHTML extends StructuredTextViewerConfiguration {
-
- InformationPresenter fInformationPresenter = null;
-
- private JavaSourceViewerConfiguration fJavaSourceViewerConfiguration;
-
- public StructuredTextViewerConfigurationHTML() {
- super();
- }
-
- public StructuredTextViewerConfigurationHTML(IPreferenceStore store) {
- super(store);
- }
-
-
- /* (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]);
- }
-
- if (contentType == IHTMLPartitionTypes.HTML_DEFAULT || contentType == IHTMLPartitionTypes.HTML_DECLARATION) {
- allStrategies.add(new StructuredAutoEditStrategyXML());
- }
-
- return (IAutoEditStrategy[]) allStrategies.toArray(new IAutoEditStrategy[0]);
- }
-
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- if (configuredContentTypes == null) {
- String[] xmlTypes = StructuredTextPartitionerForXML.getConfiguredContentTypes();
- String[] htmlTypes = StructuredTextPartitionerForHTML.getConfiguredContentTypes();
- configuredContentTypes = new String[2 + xmlTypes.length + htmlTypes.length];
-
- configuredContentTypes[0] = IStructuredPartitionTypes.DEFAULT_PARTITION;
- configuredContentTypes[1] = IStructuredPartitionTypes.UNKNOWN_PARTITION;
-
- int index = 0;
- System.arraycopy(xmlTypes, 0, configuredContentTypes, index += 2, xmlTypes.length);
- System.arraycopy(htmlTypes, 0, configuredContentTypes, index += xmlTypes.length, htmlTypes.length);
- }
-
- return configuredContentTypes;
- }
-
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- IContentAssistant ca = super.getContentAssistant(sourceViewer);
-
- if (ca != null && ca instanceof ContentAssistant) {
- ContentAssistant contentAssistant = (ContentAssistant) ca;
-
- IContentAssistProcessor htmlContentAssistProcessor = new HTMLContentAssistProcessor();
- IContentAssistProcessor jsContentAssistProcessor = new JavaScriptContentAssistProcessor();
- IContentAssistProcessor cssContentAssistProcessor = new CSSContentAssistProcessor();
- IContentAssistProcessor noRegionProcessorForHTML = new NoRegionContentAssistProcessorForHTML();
-
- // HTML
- setContentAssistProcessor(contentAssistant, htmlContentAssistProcessor, IHTMLPartitionTypes.HTML_DEFAULT);
- setContentAssistProcessor(contentAssistant, htmlContentAssistProcessor, IHTMLPartitionTypes.HTML_COMMENT);
-
- // JavaScript
- setContentAssistProcessor(contentAssistant, jsContentAssistProcessor, IHTMLPartitionTypes.SCRIPT);
-
- // CSS
- setContentAssistProcessor(contentAssistant, cssContentAssistProcessor, ICSSPartitionTypes.STYLE);
-
- // unknown
- setContentAssistProcessor(contentAssistant, noRegionProcessorForHTML, IStructuredPartitionTypes.UNKNOWN_PARTITION);
- }
-
- return ca;
- }
-
- public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
- final MultiPassContentFormatter formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), IHTMLPartitionTypes.HTML_DEFAULT);
-
- formatter.setMasterStrategy(new StructuredFormattingStrategy(new HTMLFormatProcessorImpl()));
-
- return formatter;
- }
-
- public IContentAssistant getCorrectionAssistant(ISourceViewer sourceViewer) {
- IContentAssistant ca = super.getCorrectionAssistant(sourceViewer);
-
- if (ca != null && ca instanceof ContentAssistant) {
- ContentAssistant correctionAssistant = (ContentAssistant) ca;
- ITextEditor editor = getTextEditor();
- if (editor != null) {
- IContentAssistProcessor correctionProcessor = new CorrectionProcessorXML(editor);
- correctionAssistant.setContentAssistProcessor(correctionProcessor, IHTMLPartitionTypes.HTML_DEFAULT);
- correctionAssistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.XML_CDATA);
- correctionAssistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.XML_COMMENT);
- correctionAssistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.XML_DECLARATION);
- correctionAssistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.XML_PI);
- correctionAssistant.setContentAssistProcessor(correctionProcessor, IXMLPartitions.DTD_SUBSET);
- }
- }
-
- return ca;
- }
-
- public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
- if (contentType.compareTo(IHTMLPartitionTypes.HTML_DEFAULT) == 0)
- // HTML
- return new XMLDoubleClickStrategy();
- else if (contentType.compareTo(IHTMLPartitionTypes.SCRIPT) == 0)
- // JavaScript
- return getJavaSourceViewerConfiguration(sourceViewer).getDoubleClickStrategy(sourceViewer, contentType);
- else
- return super.getDoubleClickStrategy(sourceViewer, contentType);
- }
-
- public IHighlighter getHighlighter(ISourceViewer sourceViewer) {
- IHighlighter highlighter = super.getHighlighter(sourceViewer);
-
- if (highlighter != null) {
- // HTML
- LineStyleProvider htmlLineStyleProvider = new LineStyleProviderForHTML();
- highlighter.addProvider(IHTMLPartitionTypes.HTML_DEFAULT, htmlLineStyleProvider);
- highlighter.addProvider(IHTMLPartitionTypes.HTML_COMMENT, htmlLineStyleProvider);
- highlighter.addProvider(IHTMLPartitionTypes.HTML_DECLARATION, htmlLineStyleProvider);
-
- // JavaScript
- LineStyleProvider jsLineStyleProvider = new LineStyleProviderForJavaScript();
- highlighter.addProvider(IHTMLPartitionTypes.SCRIPT, jsLineStyleProvider);
-
- // CSS
- LineStyleProvider cssLineStyleProvider = new LineStyleProviderForEmbeddedCSS();
- highlighter.addProvider(ICSSPartitionTypes.STYLE, cssLineStyleProvider);
- }
-
- return highlighter;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.editors.text.TextSourceViewerConfiguration#getHyperlinkDetectors(org.eclipse.jface.text.source.ISourceViewer)
- */
- public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {
- if (sourceViewer == null || !fPreferenceStore.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINKS_ENABLED))
- return null;
-
- List allDetectors = new ArrayList(0);
- allDetectors.add(new URIHyperlinkDetector());
-
- IHyperlinkDetector[] superDetectors = super.getHyperlinkDetectors(sourceViewer);
- for (int m = 0; m < superDetectors.length; m++) {
- IHyperlinkDetector detector = superDetectors[m];
- if (!allDetectors.contains(detector)) {
- allDetectors.add(detector);
- }
- }
- return (IHyperlinkDetector[]) allDetectors.toArray(new IHyperlinkDetector[0]);
- }
-
- public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
- if (fInformationPresenter == null) {
- fInformationPresenter = new InformationPresenter(getInformationPresenterControlCreator(sourceViewer));
-
- // HTML
- IInformationProvider htmlInformationProvider = new HTMLInformationProvider();
- fInformationPresenter.setInformationProvider(htmlInformationProvider, IHTMLPartitionTypes.HTML_DEFAULT);
-
- // JavaScript
- IInformationProvider javascriptInformationProvider = new JavaScriptInformationProvider();
- fInformationPresenter.setInformationProvider(javascriptInformationProvider, IHTMLPartitionTypes.SCRIPT);
-
- fInformationPresenter.setSizeConstraints(60, 10, true, true);
- }
-
- return fInformationPresenter;
- }
-
- private JavaSourceViewerConfiguration getJavaSourceViewerConfiguration(ISourceViewer viewer) {
- if (fJavaSourceViewerConfiguration == null) {
- IPreferenceStore store = PreferenceConstants.getPreferenceStore();
- JavaTextTools javaTextTools = new JavaTextTools(store);
- fJavaSourceViewerConfiguration = new JavaSourceViewerConfiguration(javaTextTools.getColorManager(), store, getTextEditor(), getConfiguredDocumentPartitioning(viewer));
- }
- return fJavaSourceViewerConfiguration;
- }
-
- /**
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getReconcilerg(org.eclipse.jface.text.source.ISourceViewer)
- */
- public IReconciler getReconciler(ISourceViewer sourceViewer) {
- if (fReconciler != null) {
- // a reconciler should always either be installed or disposed of
- if (!fReconciler.isInstalled()) {
- fReconciler = null;
- }
- }
-
- if (fReconciler == null) {
- // create one
- fReconciler = new StructuredRegionProcessor();
- fReconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
- }
-
- boolean reconcilingEnabled = fPreferenceStore.getBoolean(CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS);
-
- if (!reconcilingEnabled)
- return fReconciler;
-
- if (fReconciler != null) {
- IDocument doc = ((StructuredTextEditor) editorPart).getDocumentProvider().getDocument(editorPart.getEditorInput());
- IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(doc);
- try {
- if (sModel != null) {
-
- String contentTypeId = sModel.getContentTypeIdentifier();
-
- IReconcilingStrategy markupStrategy = new StructuredTextReconcilingStrategyForMarkup((ITextEditor) editorPart);
-
- fReconciler.setReconcilingStrategy(markupStrategy, IStructuredPartitionTypes.DEFAULT_PARTITION);
- fReconciler.setReconcilingStrategy(markupStrategy, IXMLPartitions.XML_DEFAULT);
-
- fReconciler.setDefaultStrategy(markupStrategy);
-
- if (contentTypeId != null)
- fReconciler.setValidatorStrategy(createValidatorStrategy(contentTypeId));
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- }
- return fReconciler;
- }
-
- public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) {
- ITextHover hover = null;
- TextHoverManager.TextHoverDescriptor[] hoverDescs = getTextHovers();
- int i = 0;
- while (i < hoverDescs.length && hover == null) {
- if (hoverDescs[i].isEnabled() && EditorUtility.computeStateMask(hoverDescs[i].getModifierString()) == stateMask) {
- String hoverType = hoverDescs[i].getId();
- if (TextHoverManager.COMBINATION_HOVER.equalsIgnoreCase(hoverType)) {
- // treat specially if it's JavaScript, HTML otherwise
- if (contentType.equals(IHTMLPartitionTypes.SCRIPT)) {
- hover = new JavaScriptBestMatchHoverProcessor();
- }
- else {
- hover = new HTMLBestMatchHoverProcessor();
- }
- }
- else if (TextHoverManager.PROBLEM_HOVER.equalsIgnoreCase(hoverType)) {
- hover = new ProblemAnnotationHoverProcessor();
- }
- else if (TextHoverManager.ANNOTATION_HOVER.equalsIgnoreCase(hoverType)) {
- hover = new AnnotationHoverProcessor();
- }
- else if (TextHoverManager.DOCUMENTATION_HOVER.equalsIgnoreCase(hoverType)) {
- // treat specially if it's JavaScript, HTML otherwise
- if (contentType.equals(IHTMLPartitionTypes.SCRIPT)) {
- hover = new JavaScriptTagInfoHoverProcessor();
- }
- else {
- hover = new HTMLTagInfoHoverProcessor();
- }
- }
- }
- i++;
- }
- if (hover == null) {
- hover = super.getTextHover(sourceViewer, contentType, stateMask);
- }
- return hover;
- }
-
- public void unConfigure(ISourceViewer viewer) {
- super.unConfigure(viewer);
-
- // InformationPresenters
- if (fInformationPresenter != null)
- fInformationPresenter.uninstall();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java
deleted file mode 100644
index a97543db6e..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java
+++ /dev/null
@@ -1,100 +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 - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.html.ui.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by HTML UI
- *
- * @since 1.0
- */
-public class HTMLUIMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.wst.html.ui.internal.HTMLUIPluginResources";//$NON-NLS-1$
- private static ResourceBundle fResourceBundle;
-
- public static String Sample_HTML_doc;
- public static String HTMLFilesPreferencePage_0;
- public static String HTMLFilesPreferencePage_1;
- public static String HTMLFilesPreferencePage_2;
- public static String HTMLFilesPreferencePage_3;
- public static String _UI_WIZARD_NEW_TITLE;
- public static String _UI_WIZARD_NEW_HEADING;
- public static String _UI_WIZARD_NEW_DESCRIPTION;
- public static String _ERROR_FILENAME_MUST_END_HTML;
- public static String Creating_files_encoding;
- public static String MESSAGE_HTML_VALIDATION_MESSAGE_UI_;
- public static String CleanupDocument_label; // resource bundle
- public static String CleanupDocument_tooltip; // resource bundle
- public static String CleanupDocument_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 FindOccurrences_label; // resource bundle
- public static String Creating_files;
- public static String Encoding_desc;
- public static String UI_Description_of_role_of_following_DOCTYPE;
- public static String UI_Public_ID;
- public static String UI_System_ID;
- public static String UI_none;
- public static String Preferred_markup_case_UI_;
- public static String Tag_names__UI_;
- public static String Tag_names_Upper_case_UI_;
- public static String Tag_names_Lower_case_UI_;
- public static String Attribute_names__UI_;
- public static String Attribute_names_Upper_case_UI_;
- public static String Attribute_names_Lower_case_UI_;
- public static String Cleanup_UI_;
- public static String Tag_name_case_for_HTML_UI_;
- public static String Tag_name_case_As_is_UI_;
- public static String Tag_name_case_Lower_UI_;
- public static String Tag_name_case_Upper_UI_;
- public static String Attribute_name_case_for_HTML_UI_;
- public static String Attribute_name_case_As_is_UI_;
- public static String Attribute_name_case_Lower_UI_;
- public static String Attribute_name_case_Upper_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;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, HTMLUIMessages.class);
- }
-
- private HTMLUIMessages() {
- // cannot create new instance of this class
- }
-
- 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.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPlugin.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPlugin.java
deleted file mode 100644
index 54618972e5..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPlugin.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal;
-
-import java.io.IOException;
-
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-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.html.ui.internal.preferences.HTMLUIPreferenceNames;
-import org.eclipse.wst.html.ui.internal.templates.TemplateContextTypeIdsHTML;
-import org.eclipse.wst.sse.ui.registry.AdapterFactoryRegistry;
-import org.eclipse.wst.sse.ui.registry.AdapterFactoryRegistryImpl;
-import org.eclipse.wst.sse.ui.registry.embedded.EmbeddedAdapterFactoryRegistryImpl;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class HTMLUIPlugin extends AbstractUIPlugin {
- public final static String ID = "org.eclipse.wst.html.ui"; //$NON-NLS-1$
-
- protected static HTMLUIPlugin instance = null;
-
- /**
- * The template store for the html editor.
- */
- private TemplateStore fTemplateStore;
-
- /**
- * The template context type registry for the html editor.
- */
- private ContextTypeRegistry fContextTypeRegistry;
-
- public HTMLUIPlugin() {
- super();
- instance = this;
- }
-
- public static HTMLUIPlugin getDefault() {
- return instance;
- }
-
- public synchronized static HTMLUIPlugin getInstance() {
- return instance;
- }
-
- public AdapterFactoryRegistry getAdapterFactoryRegistry() {
- return AdapterFactoryRegistryImpl.getInstance();
-
- }
-
- public AdapterFactoryRegistry getEmbeddedAdapterFactoryRegistry() {
- return EmbeddedAdapterFactoryRegistryImpl.getInstance();
-
- }
-
- /**
- * Returns the template store for the html editor templates.
- *
- * @return the template store for the html editor templates
- */
- public TemplateStore getTemplateStore() {
- if (fTemplateStore == null) {
- fTemplateStore = new ContributionTemplateStore(getTemplateContextRegistry(), getPreferenceStore(), HTMLUIPreferenceNames.TEMPLATES_KEY);
-
- try {
- fTemplateStore.load();
- } catch (IOException e) {
- Logger.logException(e);
- }
- }
- return fTemplateStore;
- }
-
- /**
- * Returns the template context type registry for the html plugin.
- *
- * @return the template context type registry for the html plugin
- */
- public ContextTypeRegistry getTemplateContextRegistry() {
- if (fContextTypeRegistry == null) {
- ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
- registry.addContextType(TemplateContextTypeIdsHTML.ALL);
- registry.addContextType(TemplateContextTypeIdsHTML.NEW);
- registry.addContextType(TemplateContextTypeIdsHTML.TAG);
- registry.addContextType(TemplateContextTypeIdsHTML.ATTRIBUTE);
- registry.addContextType(TemplateContextTypeIdsHTML.ATTRIBUTE_VALUE);
-
- fContextTypeRegistry = registry;
- }
-
- return fContextTypeRegistry;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties
deleted file mode 100644
index b08c35a63e..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties
+++ /dev/null
@@ -1,73 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-## The following line is a sample HTML document. Please translate only the following parts:
-## HTML Highlighting Preferences
-## we need a flaming logo
-Sample_HTML_doc=<!DOCTYPE HTML\n\tPUBLIC \"-//W3C/DTD/ HTML 4.01 Transitional//EN\"\n\t\"http://www.w3.org/TR/html4/loose.dtd\">\n<HTML>\n\t<HEAD>\n\t\t<META content=\"text/html\">\n\t\t<TITLE>HTML Highlighting Preferences</TITLE>\n\t</HEAD>\n<BODY>\n\t<!--\n\t\twe need a flaming logo!\n\t-->\n</BODY>\n</HTML>
-
-HTMLFilesPreferencePage_0=Loading files...
-HTMLFilesPreferencePage_1=Add this suffix (if not specified):
-HTMLFilesPreferencePage_2=Insert DOCTYPE declaration
-HTMLFilesPreferencePage_3=Insert GENERATOR with META tag
-#
-_UI_WIZARD_NEW_TITLE = New HTML Page
-_UI_WIZARD_NEW_HEADING = HTML Page
-_UI_WIZARD_NEW_DESCRIPTION = Create a new HTML Page.
-_ERROR_FILENAME_MUST_END_HTML = The file name must end in .html or .xhtml
-#
-Creating_files_encoding=Creating files encoding preference
-MESSAGE_HTML_VALIDATION_MESSAGE_UI_=HTML Syntax : {0}
-# Copied from sse.ui
-CleanupDocument_label=C&leanup Document...
-CleanupDocument_tooltip=Cleanup Document
-CleanupDocument_description=Cleanup Document
-ToggleComment_label=Togg&le 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 Bloc&k Comment
-RemoveBlockComment_tooltip=Remove Block Comment
-RemoveBlockComment_description=Remove Block Comment
-FindOccurrences_label=O&ccurrences in File
-Creating_files=Creating files
-Encoding_desc=The following encoding will apply:
-Preferred_markup_case_UI_=Preferred markup case for content assist, and code generation
-Tag_names__UI_=Tag names:
-Tag_names_Upper_case_UI_=&Uppercase
-Tag_names_Lower_case_UI_=&Lowercase
-Attribute_names__UI_=Attribute names:
-Attribute_names_Upper_case_UI_=U&ppercase
-Attribute_names_Lower_case_UI_=L&owercase
-Cleanup_UI_=Cleanup
-Tag_name_case_for_HTML_UI_=Tag name case for HTML:
-Tag_name_case_As_is_UI_=&As-is
-Tag_name_case_Lower_UI_=&Lower
-Tag_name_case_Upper_UI_=&Upper
-Attribute_name_case_for_HTML_UI_=Attribute name case for HTML:
-Attribute_name_case_As_is_UI_=A&s-is
-Attribute_name_case_Lower_UI_=L&ower
-Attribute_name_case_Upper_UI_=U&pper
-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
-
-# web content settings
-UI_Description_of_role_of_following_DOCTYPE=Use the following default document type when no DOCTYPE is declared in a file:
-UI_Public_ID=Public ID:
-UI_System_ID=System ID:
-UI_none=none \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/Logger.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/Logger.java
deleted file mode 100644
index 0b872f0c3b..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/Logger.java
+++ /dev/null
@@ -1,160 +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.html.ui.internal;
-
-
-
-import java.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;
-
-
-/**
- * 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.html.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
- public static final int INFO_DEBUG = 200 + INFO;
-
- public static final int OK = IStatus.OK; // 0
-
- public static final int OK_DEBUG = 200 + OK;
-
- private static final String TRACEFILTER_LOCATION = "/debug/tracefilter"; //$NON-NLS-1$
- public static final int WARNING = IStatus.WARNING; // 2
- public static final int WARNING_DEBUG = 200 + WARNING;
-
- /**
- * Adds message to log.
- *
- * @param level
- * severity level of the message (OK, INFO, WARNING, ERROR,
- * OK_DEBUG, INFO_DEBUG, WARNING_DEBUG, ERROR_DEBUG)
- * @param message
- * text to add to the log
- * @param exception
- * 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())
- return;
- }
-
- int severity = IStatus.OK;
- switch (level) {
- case INFO_DEBUG :
- case INFO :
- severity = IStatus.INFO;
- break;
- case WARNING_DEBUG :
- case WARNING :
- severity = IStatus.WARNING;
- break;
- case ERROR_DEBUG :
- case ERROR :
- severity = IStatus.ERROR;
- }
- message = (message != null) ? message : "null"; //$NON-NLS-1$
- Status statusObj = new Status(severity, PLUGIN_ID, severity, message, exception);
- Bundle bundle = Platform.getBundle(PLUGIN_ID);
- if (bundle != null)
- Platform.getLog(bundle).log(statusObj);
- }
-
- /**
- * Prints message to log if category matches /debug/tracefilter option.
- *
- * @param message
- * text to print
- * @param category
- * category of the message, to be compared with
- * /debug/tracefilter
- */
- protected static void _trace(String category, String message, Throwable exception) {
- if (isTracing(category)) {
- 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)
- Platform.getLog(bundle).log(statusObj);
- }
- }
-
- /**
- * @return true if the platform is debugging
- */
- public static boolean isDebugging() {
- return Platform.inDebugMode();
- }
-
- /**
- * Determines if currently tracing a category
- *
- * @param category
- * @return true if tracing category, false otherwise
- */
- public static boolean isTracing(String category) {
- if (!isDebugging())
- return false;
-
- String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION);
- if (traceFilter != null) {
- StringTokenizer tokenizer = new StringTokenizer(traceFilter, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- String cat = tokenizer.nextToken().trim();
- if (category.equals(cat)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public static void log(int level, String message) {
- _log(level, message, null);
- }
-
- public static void log(int level, String message, Throwable exception) {
- _log(level, message, exception);
- }
-
- public static void logException(String message, Throwable exception) {
- _log(ERROR, message, exception);
- }
-
- public static void logException(Throwable exception) {
- _log(ERROR, exception.getMessage(), exception);
- }
-
- public static void trace(String category, String message) {
- _trace(category, message, null);
- }
-
- public static void traceException(String category, String message, Throwable exception) {
- _trace(category, message, exception);
- }
-
- public static void traceException(String category, Throwable exception) {
- _trace(category, exception.getMessage(), exception);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/SharedHTMLEditorPluginImageHelper.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/SharedHTMLEditorPluginImageHelper.java
deleted file mode 100644
index 68dc842246..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/SharedHTMLEditorPluginImageHelper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.html.ui.internal.editor.HTMLEditorPluginImageHelper;
-import org.eclipse.wst.html.ui.internal.editor.HTMLEditorPluginImages;
-
-
-public class SharedHTMLEditorPluginImageHelper {
- public static final String IMG_OBJ_TABLE = HTMLEditorPluginImages.IMG_OBJ_TABLE;
- public static final String IMG_OBJ_TAG_ANCHOR = HTMLEditorPluginImages.IMG_OBJ_TAG_ANCHOR;
- public static final String IMG_OBJ_TAG_BODY = HTMLEditorPluginImages.IMG_OBJ_TAG_BODY;
- public static final String IMG_OBJ_TAG_BUTTON = HTMLEditorPluginImages.IMG_OBJ_TAG_BUTTON;
- public static final String IMG_OBJ_TAG_FONT = HTMLEditorPluginImages.IMG_OBJ_TAG_FONT;
- public static final String IMG_OBJ_TAG_FORM = HTMLEditorPluginImages.IMG_OBJ_TAG_FORM;
- public static final String IMG_OBJ_TAG_HTML = HTMLEditorPluginImages.IMG_OBJ_TAG_HTML;
- public static final String IMG_OBJ_TAG_IMAGE_MAP = HTMLEditorPluginImages.IMG_OBJ_TAG_IMAGE_MAP;
- public static final String IMG_OBJ_TAG_IMAGE = HTMLEditorPluginImages.IMG_OBJ_TAG_IMAGE;
- public static final String IMG_OBJ_TAG_JSP = HTMLEditorPluginImages.IMG_OBJ_TAG_JSP;
- public static final String IMG_OBJ_TAG_TITLE = HTMLEditorPluginImages.IMG_OBJ_TAG_TITLE;
- public static final String IMG_OBJ_TAG = HTMLEditorPluginImages.IMG_OBJ_TAG;
-
- /**
- * Retrieves the specified image from the html 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 html source editor
- * @return the image, or <code>null</code> if not found
- */
- public static Image getImage(String symbolicName) {
- return HTMLEditorPluginImageHelper.getInstance().getImage(symbolicName);
- }
-
- /**
- * Retrieves the image descriptor for specified image from the html 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 html source editor
- * @return the image descriptor, or <code>null</code> if not found
- */
- public static ImageDescriptor getImageDescriptor(String symbolicName) {
- return HTMLEditorPluginImageHelper.getInstance().getImageDescriptor(symbolicName);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/CustomTemplateProposal.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/CustomTemplateProposal.java
deleted file mode 100644
index 650a4c3f7d..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/CustomTemplateProposal.java
+++ /dev/null
@@ -1,40 +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.html.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.internal.util.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.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
deleted file mode 100644
index 02110c8ba9..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
+++ /dev/null
@@ -1,478 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-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.css.ui.internal.contentassist.CSSContentAssistProcessor;
-import org.eclipse.wst.html.core.HTML40Namespace;
-import org.eclipse.wst.html.core.HTMLCMProperties;
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocument;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.editor.HTMLEditorPluginImageHelper;
-import org.eclipse.wst.html.ui.internal.editor.HTMLEditorPluginImages;
-import org.eclipse.wst.html.ui.internal.preferences.HTMLUIPreferenceNames;
-import org.eclipse.wst.html.ui.internal.templates.TemplateContextTypeIdsHTML;
-import org.eclipse.wst.javascript.ui.internal.common.contentassist.JavaScriptContentAssistProcessor;
-import org.eclipse.wst.sse.core.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.IModelManager;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.document.IDOMDocument;
-import org.eclipse.wst.xml.core.document.IDOMModel;
-import org.eclipse.wst.xml.core.document.IDOMNode;
-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.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-import org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor;
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentModelGenerator;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLRelevanceConstants;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-public class HTMLContentAssistProcessor extends AbstractContentAssistProcessor implements IPropertyChangeListener {
- private INodeAdapterFactory factoryForCSS = null;
- protected IPreferenceStore fPreferenceStore = null;
- protected boolean isXHTML = false;
- protected IResource fResource = null;
- private HTMLTemplateCompletionProcessor fTemplateProcessor = null;
- private List fTemplateContexts = new ArrayList();
-
- public HTMLContentAssistProcessor() {
-
- super();
- }
-
- protected void addAttributeNameProposals(ContentAssistRequest contentAssistRequest) {
- addTemplates(contentAssistRequest, TemplateContextTypeIdsHTML.ATTRIBUTE);
- super.addAttributeNameProposals(contentAssistRequest);
- }
-
- protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- addTemplates(contentAssistRequest, TemplateContextTypeIdsHTML.ATTRIBUTE_VALUE);
- super.addAttributeValueProposals(contentAssistRequest);
- }
-
- /**
- * @see AbstractContentAssistProcessor#addXMLProposal(ContentAssistRequest)
- */
- protected void addXMLProposal(ContentAssistRequest contentAssistRequest) {
- if (isXHTML)
- super.addXMLProposal(contentAssistRequest);
- }
-
- /**
- * Add the proposals for a completely empty document
- */
- protected void addEmptyDocumentProposals(ContentAssistRequest contentAssistRequest) {
- addTemplates(contentAssistRequest, TemplateContextTypeIdsHTML.NEW);
- }
-
- protected void addPCDATAProposal(String nodeName, ContentAssistRequest contentAssistRequest) {
- if (isXHTML)
- super.addPCDATAProposal(nodeName, contentAssistRequest);
- }
-
- protected void addStartDocumentProposals(ContentAssistRequest contentAssistRequest) {
- if (isXHTML)
- addEmptyDocumentProposals(contentAssistRequest);
- }
-
- protected void addTagInsertionProposals(ContentAssistRequest contentAssistRequest, int childPosition) {
- addTemplates(contentAssistRequest, TemplateContextTypeIdsHTML.TAG);
- super.addTagInsertionProposals(contentAssistRequest, childPosition);
- }
-
- /**
- * Adds templates to the list of proposals
- *
- * @param contentAssistRequest
- * @param context
- */
- private void addTemplates(ContentAssistRequest contentAssistRequest, String context) {
- 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, contentAssistRequest.getReplacementBeginPosition());
- for (int i = 0; i < proposals.length; ++i) {
- if (useProposalList)
- contentAssistRequest.addProposal(proposals[i]);
- else
- contentAssistRequest.addMacro(proposals[i]);
- }
- }
- }
- }
-
- protected boolean beginsWith(String aString, String prefix) {
- if (aString == null || prefix == null || prefix.length() == 0)
- return true;
- int minimumLength = Math.min(prefix.length(), aString.length());
- String beginning = aString.substring(0, minimumLength);
- return beginning.equalsIgnoreCase(prefix);
- }
-
- protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) {
- ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
- addTemplates(request, TemplateContextTypeIdsHTML.ALL);
- return request;
- }
-
- /**
- * 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 documentPosition
- * a location within the document
- * @return an array of code-assist items
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer textViewer, int documentPosition) {
- fTemplateContexts.clear();
-
- IndexedRegion treeNode = ContentAssistUtils.getNodeAt((StructuredTextViewer) textViewer, documentPosition);
- IDOMNode node = (IDOMNode) treeNode;
- setErrorMessage(null);
-
- // check if it's in a comment node
- IStructuredDocument structuredDocument = (IStructuredDocument) textViewer.getDocument();
- IStructuredDocumentRegion fn = structuredDocument.getRegionAtCharacterOffset(documentPosition);
- if (fn != null && fn.getType() == DOMRegionContext.XML_COMMENT_TEXT && documentPosition != fn.getStartOffset()) {
- return new ICompletionProposal[0];
- }
-
- // CMVC 242695
- // if it's a </script> tag, bounce back to JS ca processor...
- if (fn != null && fn.getType() == DOMRegionContext.XML_TAG_NAME && documentPosition == fn.getStartOffset()) {
- ITextRegionList v = fn.getRegions();
- if (v.size() > 1) {
- // determine that it's a close tag
- if ((v.get(0)).getType() == DOMRegionContext.XML_END_TAG_OPEN) {
- Iterator it = v.iterator();
- ITextRegion region = null;
- // search for script tag name
- while (it.hasNext()) {
- region = (ITextRegion) it.next();
- if (fn.getText(region).equalsIgnoreCase("script")) { //$NON-NLS-1$
- // return JS content assist...
- JavaScriptContentAssistProcessor jsProcessor = new JavaScriptContentAssistProcessor();
- return jsProcessor.computeCompletionProposals(textViewer, documentPosition);
- }
- }
- }
- }
- }
-
- isXHTML = getXHTML(node);
-
- fGenerator = null; // force reload of content generator
-
- // handle blank HTML document case
- if (treeNode == null || isViewerEmpty(textViewer)) {
- // cursor is at the EOF
- ICompletionProposal htmlTagProposal = getHTMLTagPropsosal((StructuredTextViewer) textViewer, documentPosition);
- ICompletionProposal[] superResults = super.computeCompletionProposals(textViewer, documentPosition);
- if (superResults != null && superResults.length > 0 && htmlTagProposal != null) {
- ICompletionProposal[] blankHTMLDocResults = new ICompletionProposal[superResults.length + 1];
- blankHTMLDocResults[0] = htmlTagProposal;
- System.arraycopy(superResults, 0, blankHTMLDocResults, 1, superResults.length);
- return blankHTMLDocResults;
- }
- }
-
- if (node != null && node.getNodeType() == Node.ELEMENT_NODE) {
-
- // check embedded CSS proposals at the beginning of the STYLE end
- // tag
- Element element = (Element) node;
- String tagName = element.getTagName();
- if (tagName != null && tagName.equalsIgnoreCase(HTML40Namespace.ATTR_NAME_STYLE)) {//$NON-NLS-1$
- IStructuredDocumentRegion endStructuredDocumentRegion = node.getEndStructuredDocumentRegion();
- if (endStructuredDocumentRegion != null && endStructuredDocumentRegion.getStartOffset() == documentPosition) {
- IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
- if (startStructuredDocumentRegion != null) {
- int offset = startStructuredDocumentRegion.getEndOffset();
- int pos = documentPosition - offset;
- ICompletionProposal[] proposals = getCSSProposals(textViewer, pos, node, offset, (char) 0);
- if (proposals != null)
- return proposals;
- }
- }
- }
-
- // check inline CSS proposals
- // need to find attr region from sd region
- IStructuredDocumentRegion sdRegion = ContentAssistUtils.getStructuredDocumentRegion((StructuredTextViewer) textViewer, documentPosition);
- Iterator regions = sdRegion.getRegions().iterator();
- ITextRegion styleNameRegion = null;
- ITextRegion styleValueRegion = null;
- while (regions.hasNext()) {
- styleNameRegion = (ITextRegion) regions.next();
- if (styleNameRegion.getType().equals(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) && sdRegion.getText(styleNameRegion).equalsIgnoreCase(HTML40Namespace.ATTR_NAME_STYLE)) { //$NON-NLS-1$
- // the next region should be "="
- if (regions.hasNext()) {
- regions.next(); // skip the "="
- // next region should be attr value region
- if (regions.hasNext()) {
- styleValueRegion = (ITextRegion) regions.next();
- break;
- }
- }
- }
- }
-
- if (styleValueRegion != null) {
- int offset = sdRegion.getStartOffset(styleValueRegion);
- int end = sdRegion.getTextEndOffset(styleValueRegion);
- if (documentPosition >= offset && documentPosition <= end) {
- boolean askCSS = true;
- char quote = (char) 0;
- String text = sdRegion.getText(styleValueRegion);
- int length = (text != null ? text.length() : 0);
- if (length > 0) {
- char firstChar = text.charAt(0);
- if (firstChar == '"' || firstChar == '\'') {
- if (documentPosition == offset) {
- // before quote
- askCSS = false;
- } else {
- offset++;
- quote = firstChar;
- }
- }
- if (documentPosition == end) {
- if (length > 1 && text.charAt(length - 1) == quote) {
- // after quote
- askCSS = false;
- }
- }
- }
- if (askCSS) {
- int pos = documentPosition - offset;
- ICompletionProposal[] proposals = getCSSProposals(textViewer, pos, node, offset, quote);
- if (proposals != null)
- return proposals;
- }
- }
- }
- }
-
- return super.computeCompletionProposals(textViewer, documentPosition);
- }
-
- /**
- * Returns true if there is no text or it's all white space, otherwise
- * returns false
- *
- * @param treeNode
- * @param textViewer
- * @return boolean
- */
- private 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;
- }
-
- /**
- * @return ICompletionProposal
- */
- private ICompletionProposal getHTMLTagPropsosal(StructuredTextViewer viewer, int documentPosition) {
- IModelManager mm = StructuredModelManager.getModelManager();
- IStructuredModel model = null;
- try {
- if (mm != null)
- model = mm.getExistingModelForRead(viewer.getDocument());
-
- IDOMDocument doc = ((IDOMModel) model).getDocument();
-
- ModelQuery mq = ModelQueryUtil.getModelQuery(doc);
- // XHTML requires lowercase tagname for lookup
- CMElementDeclaration htmlDecl = (CMElementDeclaration) mq.getCorrespondingCMDocument(doc).getElements().getNamedItem(HTML40Namespace.ElementName.HTML.toLowerCase());
- if (htmlDecl != null) {
- StringBuffer proposedTextBuffer = new StringBuffer();
- getContentGenerator().generateTag(doc, htmlDecl, proposedTextBuffer);
-
- String proposedText = proposedTextBuffer.toString();
- String requiredName = getContentGenerator().getRequiredName(doc, htmlDecl);
-
- CustomCompletionProposal proposal = new CustomCompletionProposal(proposedText, documentPosition, // start
- // pos
- 0, // replace length
- requiredName.length() + 2, // cursor position
- // after (relavtive to
- // start)
- HTMLEditorPluginImageHelper.getInstance().getImage(HTMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), requiredName, null, null, XMLRelevanceConstants.R_TAG_NAME);
- return proposal;
- }
- } finally {
- if (model != null)
- model.releaseFromRead();
- }
- return null;
- }
-
- /**
- * @see AbstractContentAssistProcessor#getContentGenerator()
- */
- public XMLContentModelGenerator getContentGenerator() {
- if (fGenerator == null) {
- if (isXHTML)
- fGenerator = XHTMLMinimalContentModelGenerator.getInstance();
- else
- fGenerator = HTMLMinimalContentModelGenerator.getInstance();
- }
- return fGenerator;
- }
-
- protected ICompletionProposal[] getCSSProposals(ITextViewer viewer, int pos, IDOMNode element, int offset, char quote) {
-
- CSSContentAssistProcessor cssProcessor = new CSSContentAssistProcessor();
- cssProcessor.setDocumentOffset(offset);
- cssProcessor.setQuoteCharOfStyleAttribute(quote);
-
- return cssProcessor.computeCompletionProposals(viewer, pos);
- }
-
- protected String getEmptyTagCloseString() {
- if (isXHTML)
- return " />"; //$NON-NLS-1$
- return ">"; //$NON-NLS-1$
- }
-
- private HTMLTemplateCompletionProcessor getTemplateCompletionProcessor() {
- if (fTemplateProcessor == null) {
- fTemplateProcessor = new HTMLTemplateCompletionProcessor();
- }
- return fTemplateProcessor;
- }
-
- /**
- * Determine if this Document is an XHTML Document. Oprates solely off of
- * the Document Type declaration
- */
- protected boolean getXHTML(Node node) {
- if (node == null)
- return false;
-
- Document doc = null;
- if (node.getNodeType() != Node.DOCUMENT_NODE)
- doc = node.getOwnerDocument();
- else
- doc = ((Document) node);
-
- if (doc instanceof IDOMDocument)
- return ((IDOMDocument) doc).isXMLType();
-
-
- if (doc instanceof INodeNotifier) {
- ModelQueryAdapter adapter = (ModelQueryAdapter) ((INodeNotifier) doc).getAdapterFor(ModelQueryAdapter.class);
- CMDocument cmdoc = null;
- if (adapter != null && adapter.getModelQuery() != null)
- cmdoc = adapter.getModelQuery().getCorrespondingCMDocument(doc);
- if (cmdoc != null) {
- // treat as XHTML unless we've got the in-code HTML content
- // model
- if (cmdoc instanceof HTMLCMDocument)
- return false;
- if (cmdoc.supports(HTMLCMProperties.IS_XHTML))
- return Boolean.TRUE.equals(cmdoc.getProperty(HTMLCMProperties.IS_XHTML));
- }
- }
- // this should never be reached
- DocumentType docType = doc.getDoctype();
- return docType != null && docType.getPublicId() != null && docType.getPublicId().indexOf("-//W3C//DTD XHTML ") == 0; //$NON-NLS-1$
- }
-
- protected void init() {
- getPreferenceStore().addPropertyChangeListener(this);
- reinit();
- }
-
- protected void reinit() {
- String key = HTMLUIPreferenceNames.AUTO_PROPOSE;
- boolean doAuto = getPreferenceStore().getBoolean(key);
- if (doAuto) {
- key = HTMLUIPreferenceNames.AUTO_PROPOSE_CODE;
- completionProposalAutoActivationCharacters = getPreferenceStore().getString(key).toCharArray();
- } else {
- completionProposalAutoActivationCharacters = null;
- }
- }
-
- public void release() {
- if (factoryForCSS != null) {
- factoryForCSS.release();
- }
- getPreferenceStore().removePropertyChangeListener(this);
- super.release();
- }
-
- protected boolean stringsEqual(String a, String b) {
- return a.equalsIgnoreCase(b);
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
-
- if (property.compareTo(HTMLUIPreferenceNames.AUTO_PROPOSE) == 0 || property.compareTo(HTMLUIPreferenceNames.AUTO_PROPOSE_CODE) == 0) {
- reinit();
- }
- }
-
- protected IPreferenceStore getPreferenceStore() {
- if (fPreferenceStore == null)
- fPreferenceStore = HTMLUIPlugin.getDefault().getPreferenceStore();
-
- return fPreferenceStore;
- }
-
- /**
- * @see com.ibm.sed.edit.adapters.ExtendedContentAssistAdapter#computeCompletionProposals(ITextViewer,
- * int, IndexedRegion, ITextRegion)
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentPosition, IndexedRegion indexedNode, ITextRegion region) {
- return computeCompletionProposals(viewer, documentPosition);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java
deleted file mode 100644
index 8f2a83f928..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentassist;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.html.core.HTMLCMProperties;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLElementDeclaration;
-import org.eclipse.wst.sse.core.internal.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentModelGenerator;
-import org.w3c.dom.Node;
-
-public class HTMLMinimalContentModelGenerator extends XMLContentModelGenerator {
-
- private static HTMLMinimalContentModelGenerator instance = null;
- protected int fTagCase;
- protected int fAttrCase;
-
- /**
- * HTMLMinimalContentModelGenerator constructor comment.
- */
- private HTMLMinimalContentModelGenerator() {
- super();
- }
-
- private void init() {
- //IPreferenceStore prefs = CommonPreferencesPlugin.getDefault().getPreferenceStore(ContentType.ContentTypeID_HTML);
- Preferences prefs = HTMLCorePlugin.getDefault().getPluginPreferences();
- fTagCase = prefs.getInt(CommonModelPreferenceNames.TAG_NAME_CASE);
- fAttrCase = prefs.getInt(CommonModelPreferenceNames.ATTR_NAME_CASE);
- }
-
- protected void generateEndTag(String tagName, Node parentNode, CMElementDeclaration elementDecl, StringBuffer buffer) {
- if (elementDecl == null)
- return;
- if (elementDecl instanceof HTMLElementDeclaration) {
- if (((Boolean) elementDecl.getProperty(HTMLCMProperties.IS_JSP)).booleanValue()) {
- if (elementDecl.getContentType() == CMElementDeclaration.EMPTY)
- return;
- }
- else {
- String ommission = (String) elementDecl.getProperty(HTMLCMProperties.OMIT_TYPE);
- if (ommission.equals(HTMLCMProperties.Values.OMIT_END) || ommission.equals(HTMLCMProperties.Values.OMIT_END_DEFAULT) || ommission.equals(HTMLCMProperties.Values.OMIT_END_MUST)) {
- return;
- }
- }
- }
-
- if (elementDecl.getContentType() == CMElementDeclaration.EMPTY)
- return;
- buffer.append("</" + tagName + ">"); //$NON-NLS-2$//$NON-NLS-1$
- return;
- }
-
- private boolean shouldIgnoreCase(CMNode cmnode) {
- if (!cmnode.supports(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return false;
- return ((Boolean) cmnode.getProperty(HTMLCMProperties.SHOULD_IGNORE_CASE)).booleanValue();
- }
-
- public String getRequiredName(Node ownerNode, CMNode cmnode) {
- String name = super.getRequiredName(ownerNode, cmnode);
- // don't change the case unless we're certain it is meaningless
- if (shouldIgnoreCase(cmnode)) {
- int caseVal = -1;
- if (cmnode.getNodeType() == CMNode.ELEMENT_DECLARATION)
- caseVal = fTagCase;
- else if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION)
- caseVal = fAttrCase;
- switch (caseVal) {
- case CommonModelPreferenceNames.LOWER :
- {
- name = name.toLowerCase();
- }
- break;
- case CommonModelPreferenceNames.UPPER :
- {
- name = name.toUpperCase();
- }
- break;
- }
- }
- return name;
- }
-
- 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 instanceof HTMLElementDeclaration) {
- if (((Boolean) elementDecl.getProperty(HTMLCMProperties.IS_JSP)).booleanValue()) {
- if (elementDecl.getContentType() == CMElementDeclaration.EMPTY)
- return "/>"; //$NON-NLS-1$
- }
- else {
- String ommission = (String) elementDecl.getProperty(HTMLCMProperties.OMIT_TYPE);
- if (ommission.equals(HTMLCMProperties.Values.OMIT_END) || ommission.equals(HTMLCMProperties.Values.OMIT_END_DEFAULT) || ommission.equals(HTMLCMProperties.Values.OMIT_END_MUST)) {
- return ">"; //$NON-NLS-1$
- }
- }
- }
-
- return ">"; //$NON-NLS-1$
- }
-
- /**
- * Gets the instance.
- * @return Returns a HTMLMinimalContentModelGenerator
- */
- public synchronized static HTMLMinimalContentModelGenerator getInstance() {
- if (instance == null)
- instance = new HTMLMinimalContentModelGenerator();
- instance.init();
- return instance;
- }
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java
deleted file mode 100644
index cc01530a81..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentassist;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-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.persistence.TemplateStore;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.editor.HTMLEditorPluginImageHelper;
-import org.eclipse.wst.html.ui.internal.editor.HTMLEditorPluginImages;
-
-
-/**
- * Completion processor for HTML Templates. Most of the work is already done
- * by the HTML Content Assist processor, so by the time the
- * HTMLTemplateCompletionProcessor is asked for content assist proposals, the
- * HTML content assist processor has already set the context type for
- * templates.
- */
-class HTMLTemplateCompletionProcessor extends TemplateCompletionProcessor {
- private String fContextTypeId = 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 HTMLEditorPluginImageHelper.getInstance().getImage(HTMLEditorPluginImages.IMG_OBJ_TAG_TEMPLATE);
- }
-
- private ContextTypeRegistry getTemplateContextRegistry() {
- return HTMLUIPlugin.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 HTMLUIPlugin.getDefault().getTemplateStore();
- }
-
- void setContextType(String contextTypeId) {
- fContextTypeId = contextTypeId;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/NoRegionContentAssistProcessorForHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/NoRegionContentAssistProcessorForHTML.java
deleted file mode 100644
index dde1edd7a8..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/NoRegionContentAssistProcessorForHTML.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentassist;
-
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.wst.css.core.text.ICSSPartitionTypes;
-import org.eclipse.wst.css.ui.internal.contentassist.CSSContentAssistProcessor;
-import org.eclipse.wst.html.core.text.IHTMLPartitionTypes;
-import org.eclipse.wst.javascript.ui.internal.common.contentassist.JavaScriptContentAssistProcessor;
-import org.eclipse.wst.xml.ui.internal.contentassist.NoRegionContentAssistProcessor;
-
-/**
- *
- * @author pavery
- */
-public class NoRegionContentAssistProcessorForHTML extends NoRegionContentAssistProcessor {
- /*
- * @see com.ibm.sse.editor.xml.contentassist.NoRegionContentAssistProcessor#initPartitionToProcessorMap()
- */
- protected void initPartitionToProcessorMap() {
- super.initPartitionToProcessorMap();
- IContentAssistProcessor htmlProcessor = new HTMLContentAssistProcessor();
- fPartitionToProcessorMap.put(IHTMLPartitionTypes.HTML_DEFAULT, htmlProcessor);
- fPartitionToProcessorMap.put(IHTMLPartitionTypes.HTML_COMMENT, htmlProcessor);
-
- IContentAssistProcessor jsContentAssistProcessor = new JavaScriptContentAssistProcessor();
- fPartitionToProcessorMap.put(IHTMLPartitionTypes.SCRIPT, jsContentAssistProcessor);
-
- IContentAssistProcessor cssContentAssistProcessor = new CSSContentAssistProcessor();
- fPartitionToProcessorMap.put(ICSSPartitionTypes.STYLE, cssContentAssistProcessor);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java
deleted file mode 100644
index 0e881cd472..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentassist;
-
-
-
-import org.eclipse.wst.html.core.HTMLCMProperties;
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentModelGenerator;
-import org.w3c.dom.Node;
-
-public class XHTMLMinimalContentModelGenerator extends XMLContentModelGenerator {
-
- private static XHTMLMinimalContentModelGenerator instance = null;
-
- private XHTMLMinimalContentModelGenerator() {
- super();
- }
-
- protected void generateEndTag(String tagName, Node parentNode, CMElementDeclaration elementDecl, StringBuffer buffer) {
- if (elementDecl == null)
- return;
- if (elementDecl instanceof HTMLElementDeclaration) {
- if (((Boolean) elementDecl.getProperty(HTMLCMProperties.IS_JSP)).booleanValue()) {
- if (elementDecl.getContentType() == CMElementDeclaration.EMPTY)
- return;
- }
- else {
- String ommission = (String) elementDecl.getProperty(HTMLCMProperties.OMIT_TYPE);
- if (ommission.equals(HTMLCMProperties.Values.OMIT_END) || ommission.equals(HTMLCMProperties.Values.OMIT_END_DEFAULT) || ommission.equals(HTMLCMProperties.Values.OMIT_END_MUST)) {
- return;
- }
- }
- }
-
- if (elementDecl.getContentType() == CMElementDeclaration.EMPTY)
- return;
- buffer.append("</" + tagName + ">"); //$NON-NLS-2$//$NON-NLS-1$
- return;
- }
-
-
- public String getStartTagClose(Node parentNode, CMElementDeclaration elementDecl) {
- String other = getOtherClose(parentNode);
- if (other != null)
- return other;
- if (elementDecl == null)
- return ">"; //$NON-NLS-1$
- // EMPTY tag, do a self-close
- if (elementDecl.getContentType() == CMElementDeclaration.EMPTY) {
- // if it's a JSP element, don't add the space since the JSP container doesn't/shouldn't care
- if (elementDecl instanceof HTMLElementDeclaration && (((Boolean) elementDecl.getProperty(HTMLCMProperties.IS_JSP)).booleanValue()))
- // if it's not JSP, conform to XHTML guidelines and add the space
- return "/>"; //$NON-NLS-1$
- else
- return " />"; //$NON-NLS-1$
- }
- // not defined as EMPTY, but should be treated as such anyway
- else if (elementDecl instanceof HTMLElementDeclaration) {
- String ommission = (String) elementDecl.getProperty(HTMLCMProperties.OMIT_TYPE);
- if (ommission.equals(HTMLCMProperties.Values.OMIT_END) || ommission.equals(HTMLCMProperties.Values.OMIT_END_DEFAULT) || ommission.equals(HTMLCMProperties.Values.OMIT_END_MUST)) {
- return " />"; //$NON-NLS-1$
- }
- }
-
- return ">"; //$NON-NLS-1$
- }
-
- public synchronized static XHTMLMinimalContentModelGenerator getInstance() {
- if (instance == null)
- instance = new XHTMLMinimalContentModelGenerator();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/HTMLNodeActionManager.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/HTMLNodeActionManager.java
deleted file mode 100644
index 9fdd487246..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/HTMLNodeActionManager.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentoutline;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.html.core.HTMLCMProperties;
-import org.eclipse.wst.html.core.contenttype.ContentTypeIdForHTML;
-import org.eclipse.wst.html.core.internal.HTMLContentBuilder;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.eclipse.wst.sse.core.internal.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilder;
-import org.eclipse.wst.xml.ui.internal.contentoutline.XMLNodeActionManager;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- *
- */
-public class HTMLNodeActionManager extends XMLNodeActionManager {
- protected int fTagCase;
- protected int fAttrCase;
-
- public HTMLNodeActionManager(IStructuredModel model, Viewer viewer) {
- super(model, viewer);
- updateCase();
- }
-
- /**
- * If neccessary, employ a DOMContentBuilder that understands how to
- * change the case of HTML tags (but NOT taglib derived tags).
- */
- public DOMContentBuilder createDOMContentBuilder(Document document) {
- DOMContentBuilder builder = null;
- if (model.getModelHandler().getAssociatedContentTypeId().equals(ContentTypeIdForHTML.ContentTypeID_HTML))
- builder = new HTMLContentBuilder(document);
- else
- builder = super.createDOMContentBuilder(document);
-
- return builder;
- }
-
- private boolean shouldIgnoreCase(CMNode cmnode) {
- if (!cmnode.supports(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return false;
- return ((Boolean) cmnode.getProperty(HTMLCMProperties.SHOULD_IGNORE_CASE)).booleanValue();
- }
-
- /**
- * Modify the displayed menuitem label to change the case of HTML children
- * but neither XML nor taglib-derived children.
- */
- public String getLabel(Node parent, CMNode cmnode) {
- String result = null;
- //CMNode cmnode = action.getCMNode();
- // don't change the case unless we're certain it is meaningless
- if (shouldIgnoreCase(cmnode)) {
- String name = cmnode.getNodeName();
- if (cmnode.getNodeType() == CMNode.ELEMENT_DECLARATION) {
- if (fTagCase == CommonModelPreferenceNames.LOWER)
- name = name.toLowerCase();
- else if (fTagCase == CommonModelPreferenceNames.UPPER)
- name = name.toUpperCase();
- // else do nothing
- }
- else if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
- if (fAttrCase == CommonModelPreferenceNames.LOWER)
- name = name.toLowerCase();
- else if (fAttrCase == CommonModelPreferenceNames.UPPER)
- name = name.toUpperCase();
- // else do nothing
- }
- result = name;
- }
- else {
- result = super.getLabel(parent, cmnode);
- }
-
- return result;
- }
-
- /**
- * Another HTML specific detail.
- */
- protected void updateCase() {
- if (model.getModelHandler().getAssociatedContentTypeId().equals(ContentTypeIdForHTML.ContentTypeID_HTML)) {
- Preferences prefs = HTMLCorePlugin.getDefault().getPluginPreferences(); //$NON-NLS-1$
- fTagCase = prefs.getInt(CommonModelPreferenceNames.TAG_NAME_CASE);
- fAttrCase = prefs.getInt(CommonModelPreferenceNames.ATTR_NAME_CASE);
- // Element caseSettings = HTMLPreferenceManager.getHTMLInstance().getElement(PreferenceNames.PREFERRED_CASE);
- // fTagCase = caseSettings.getAttribute(PreferenceNames.TAGNAME);
- // fAttrCase = caseSettings.getAttribute(PreferenceNames.ATTRIBUTENAME);
- }
- }
-
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.xml.ui.actions.AbstractNodeActionManager#reformat(org.w3c.dom.Node, boolean)
- */
- public void reformat(Node newElement, boolean deep) {
- try {
- // tell the model that we are about to make a big model change
- model.aboutToChangeModel();
-
- // format selected node
- IStructuredFormatProcessor formatProcessor = new HTMLFormatProcessorImpl();
- formatProcessor.formatNode(newElement);
- }
- finally {
- // tell the model that we are done with the big model change
- model.changedModel();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterFactoryForHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterFactoryForHTML.java
deleted file mode 100644
index 9c749dd173..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterFactoryForHTML.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentoutline;
-
-
-
-import org.eclipse.wst.sse.core.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeAdapterFactory;
-
-/**
- * An adapter factory to create JFaceNodeAdapters. Use this
- * adapter factory with a JFaceAdapterContentProvider to display
- * DOM nodes in a tree.
- */
-public class JFaceNodeAdapterFactoryForHTML extends JFaceNodeAdapterFactory {
-
-
- public JFaceNodeAdapterFactoryForHTML() {
- this(IJFaceNodeAdapter.class, true);
- }
-
- public JFaceNodeAdapterFactoryForHTML(Object adapterKey, boolean registerAdapters) {
- super(adapterKey, registerAdapters);
- }
-
- protected INodeAdapter createAdapter(INodeNotifier node) {
- if (singletonAdapter == null) {
- // create the JFaceNodeAdapter
- singletonAdapter = new JFaceNodeAdapterForHTML(this);
- initAdapter(singletonAdapter, node);
- }
- return singletonAdapter;
- }
-
- public INodeAdapterFactory copy() {
- return new JFaceNodeAdapterFactoryForHTML(this.adapterKey, this.shouldRegisterAdapter);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterForHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterForHTML.java
deleted file mode 100644
index 9cfa9bac2a..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterForHTML.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentoutline;
-
-
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.html.core.HTML40Namespace;
-import org.eclipse.wst.html.ui.internal.editor.HTMLEditorPluginImageHelper;
-import org.eclipse.wst.html.ui.internal.editor.HTMLEditorPluginImages;
-import org.eclipse.wst.sse.core.INodeAdapterFactory;
-import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeAdapter;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * Adapts a DOM node to a JFace viewer.
- */
-public class JFaceNodeAdapterForHTML extends JFaceNodeAdapter {
-
- private Image createHTMLImage(String imageResourceName) {
- ImageDescriptor imageDescriptor = HTMLEditorPluginImageHelper.getInstance().getImageDescriptor(imageResourceName);
- if (imageDescriptor != null)
- return imageDescriptor.createImage();
- return null;
- }
-
- /**
- * Constructor for JFaceNodeAdapterForHTML.
- * @param adapterFactory
- */
- public JFaceNodeAdapterForHTML(INodeAdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- protected Image createImage(Node node) {
- Image image = null;
-
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- if (node.getNodeName().equalsIgnoreCase("table")) //$NON-NLS-1$
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TABLE);
- else if (node.getNodeName().equalsIgnoreCase("a")) //$NON-NLS-1$
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TAG_ANCHOR);
- else if (node.getNodeName().equalsIgnoreCase("body")) //$NON-NLS-1$
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TAG_BODY);
- else if (node.getNodeName().equalsIgnoreCase("button")) //$NON-NLS-1$
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TAG_BUTTON);
- else if (node.getNodeName().equalsIgnoreCase("font")) //$NON-NLS-1$
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TAG_FONT);
- else if (node.getNodeName().equalsIgnoreCase("form")) //$NON-NLS-1$
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TAG_FORM);
- else if (node.getNodeName().equalsIgnoreCase("html")) //$NON-NLS-1$
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TAG_HTML);
- else if (node.getNodeName().equalsIgnoreCase("img")) //$NON-NLS-1$
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TAG_IMAGE);
- else if (node.getNodeName().equalsIgnoreCase("map")) //$NON-NLS-1$
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TAG_IMAGE_MAP);
- else if (node.getNodeName().equalsIgnoreCase("title")) //$NON-NLS-1$
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TAG_TITLE);
- else
- image = createHTMLImage(HTMLEditorPluginImages.IMG_OBJ_TAG);
- }
- if (image == null) {
- image = super.createImage(node);
- }
- return image;
- }
-
- /*
- * @see IJFaceNodeAdapter#getLabelText(Node)
- */
- public String getLabelText(Node node) {
- // TODO (pa) eventually showing ID, NAME, etc..might be a preference
- // - like in the package explorer for java.. (along w/ being able to customize delimiters)
- // - possibly for all (or filtered list of) elements
- String text = null;
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- if (node.getNodeName().equalsIgnoreCase("table")) { //$NON-NLS-1$
- // won't update properly as-is
- // it will only update if you change the attr name,
- // delete a ", or add a new element to the tree
- text = node.getNodeName();
-
- // get attr values
- String tableID = null;
- tableID = ((Element) node).getAttribute(HTML40Namespace.ATTR_NAME_ID);
- String tableName = null;
- tableName = ((Element) node).getAttribute(HTML40Namespace.ATTR_NAME_NAME);
-
- // if there's ID or NAME, add a ">"
- if ((tableID != null && tableID.length() > 0) || (tableName != null && tableName.length() > 0)) {
- text += " > "; //$NON-NLS-1$
- }
-
- if (tableID != null && tableID.length() > 0)
- text += " ID:[" + tableID + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- if (tableName != null && tableName.length() > 0)
- text += " NAME:[" + tableName + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- if (text == null)
- text = super.getLabelText(node);
- return text;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntry.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntry.java
deleted file mode 100644
index d72abeb07e..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntry.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentproperties.ui;
-
-public class AbstractDeviceProfileEntry implements DeviceProfileEntry {
-
- public AbstractDeviceProfileEntry() {
- super();
- }
-
- public String getEntryId() {
- return null;
- }
-
- public String getEntryName() {
- return null;
- }
-
- public void release() {
- }
-
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntryProvider.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntryProvider.java
deleted file mode 100644
index 173e80cd22..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntryProvider.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentproperties.ui;
-
-import java.util.Iterator;
-
-public class AbstractDeviceProfileEntryProvider implements
- DeviceProfileEntryProvider {
-
- public AbstractDeviceProfileEntryProvider() {
- super();
- }
-
- public Iterator getDeviceProfileEntries() {
- return null;
- }
-
- public void release() {
- }
-
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ContentSettingsRegistry.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ContentSettingsRegistry.java
deleted file mode 100644
index 1579af23d5..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ContentSettingsRegistry.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentproperties.ui;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfile;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfileRegistry;
-import org.eclipse.wst.html.core.internal.document.HTMLDocumentTypeEntry;
-import org.eclipse.wst.html.core.internal.document.HTMLDocumentTypeRegistry;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.sse.core.internal.encoding.CommonCharsetNames;
-import org.eclipse.wst.sse.ui.contentproperties.ui.ComboList;
-
-public final class ContentSettingsRegistry {
-
- private static final String NONE = HTMLUIMessages.UI_none;
-
- public static String maxLengthStringInHTMLDocumentTypeRegistry = ""; //$NON-NLS-1$
- public static String maxLengthStringInCharacterCodeRegistry = ""; //$NON-NLS-1$
-
- private ContentSettingsRegistry() {
- }
-
- public static void setHTMLDocumentTypeRegistryInto(ComboList combo) {
- combo.add(NONE, ""); //$NON-NLS-1$
- HTMLDocumentTypeRegistry reg = HTMLDocumentTypeRegistry.getInstance();
- Enumeration e = reg.getEntries();
- while (e.hasMoreElements()) {
- HTMLDocumentTypeEntry entry = (HTMLDocumentTypeEntry) e.nextElement();
- String publicId = entry.getPublicId();
- String displayName = entry.getDisplayName();
- if (displayName != null) {
- combo.add(displayName, publicId);
- if (displayName.length() > maxLengthStringInHTMLDocumentTypeRegistry.length())
- maxLengthStringInHTMLDocumentTypeRegistry = displayName;
- }
- else
- combo.add(publicId, publicId);
- if (publicId.length() > maxLengthStringInHTMLDocumentTypeRegistry.length())
- maxLengthStringInHTMLDocumentTypeRegistry = publicId;
- if (entry.getSystemId() == null)
- continue; // if HTML entry
- if (entry.getSystemId().length() > maxLengthStringInHTMLDocumentTypeRegistry.length())
- maxLengthStringInHTMLDocumentTypeRegistry = entry.getSystemId();
- }
-
- combo.sortByKey(1);
- }
-
- public static void setCSSMetaModelRegistryInto(ComboList combo) {
- combo.add(NONE, ""); //$NON-NLS-1$
- CSSProfileRegistry reg = CSSProfileRegistry.getInstance();
- Iterator i = reg.getProfiles();
- while (i.hasNext()) {
- CSSProfile profile = (CSSProfile) i.next();
- String id = profile.getProfileID();
- String name = profile.getProfileName();
- combo.add(name, id);
- }
- combo.sortByKey(1);
- }
-
- public static void setDeviceProfileRegistryInto(ComboList combo) {
- combo.add(NONE, ""); //$NON-NLS-1$
- DeviceProfileEntryProvider reg = DeviceProfileEntryProviderBuilder.getEntryProvider();
- if (reg == null) {
- return;
- }
- Iterator profiles = reg.getDeviceProfileEntries();
- if (profiles == null) {
- reg.release();
- return;
- }
- DeviceProfileEntry entry;
- while (profiles.hasNext()) {
- entry = (DeviceProfileEntry) profiles.next();
- combo.add(entry.getEntryName(), entry.getEntryId());
- entry.release();
- }
- reg.release();
- combo.sortByKey(1);
- }
-
- public static String getSystemIdFrom(String publicId) {
- if (publicId == null || publicId.length() == 0)
- return null;
- HTMLDocumentTypeRegistry reg = HTMLDocumentTypeRegistry.getInstance();
- Enumeration e = reg.getEntries();
- while (e.hasMoreElements()) {
- HTMLDocumentTypeEntry entry = (HTMLDocumentTypeEntry) e.nextElement();
- if (entry.getPublicId().equals(publicId))
- return entry.getSystemId();
- }
- return null;
- }
-
- public static void setContentTypeInto(ComboList combo) {
- String[] type = {"", //$NON-NLS-1$
- "application/xhtml+xml", //$NON-NLS-1$
- "application/xml", //$NON-NLS-1$
- "text/html", //$NON-NLS-1$
- "text/xml",}; //$NON-NLS-1$
- String[] displayName = {NONE, "application/xhtml+xml", //$NON-NLS-1$
- //$NON-NLS-1$
- "application/xml", //$NON-NLS-1$
- "text/html", //$NON-NLS-1$
- "text/xml",}; //$NON-NLS-1$
- for (int i = 0; i < type.length; i++) {
- if (displayName[i] != null && displayName[i].length() != 0)
- combo.add(displayName[i], type[i]);
- else
- combo.add(type[i], type[i]);
- }
-
- }
-
- public static void setCharacterCodeInto(ComboList combo) {
- combo.add(NONE, ""); //$NON-NLS-1$
- String max = ""; //$NON-NLS-1$
- //CommonCharsetNames encoding = new CommonCharsetNames();
- String[] charCode = CommonCharsetNames.getCommonCharsetNames();
- for (int i = 0; i < charCode.length; i++) {
- String displayName = CommonCharsetNames.getDisplayString(charCode[i]);
- if (displayName != null && displayName.length() != 0) {
- combo.add(displayName, charCode[i]);
- int n_byte = displayName.getBytes().length;
- if (max.getBytes().length < n_byte)
- max = displayName;
- }
- else
- combo.add(charCode[i], charCode[i]);
- }
- /*
- charCode = encoding.getSupportedJavaEncodings();
- for(int i=0;i<charCode.length;i++){
- String displayName = encoding.getDisplayString(charCode[i]);
- if (displayName!=null && displayName.length()!=0)
- combo.add(displayName,charCode[i]);
- else
- combo.add(charCode[i],charCode[i]);
- }
- */
- // combo.sortByKey(1);
- maxLengthStringInCharacterCodeRegistry = max;
- }
-
- public static void setLanguageInto(ComboList combo) {
- String[] lang = {"", //$NON-NLS-1$
- "java", //$NON-NLS-1$
- "javascript",}; //$NON-NLS-1$
- String[] displayName = {NONE, "java", //$NON-NLS-1$
- //$NON-NLS-1$
- "javascript",}; //$NON-NLS-1$
- for (int i = 0; i < lang.length; i++) {
- if (displayName[i] != null && displayName[i].length() != 0)
- combo.add(displayName[i], lang[i]);
- else
- combo.add(lang[i], lang[i]);
- }
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntry.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntry.java
deleted file mode 100644
index 94f24e4374..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntry.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentproperties.ui;
-
-/**
- * <p>
- * This interface is not intended to be implemented by clients
- * directly. Instead, please use abstract class(AbstractDeviceProfileEntry) instead.
- * </p>
- */
-public interface DeviceProfileEntry {
- public String getEntryId();
- public String getEntryName();
- public void release();
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProvider.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProvider.java
deleted file mode 100644
index 552c1db220..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProvider.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentproperties.ui;
-
-import java.util.Iterator;
-
-/**
- * <p>
- * This interface is not intended to be implemented by clients
- * directly. Instead, please use abstract class(AbstractDeviceProfileEntryProvider) instead.
- * </p>
- */
-public interface DeviceProfileEntryProvider {
- public Iterator getDeviceProfileEntries();
- public void release();
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProviderBuilder.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProviderBuilder.java
deleted file mode 100644
index 6367d10b6f..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProviderBuilder.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentproperties.ui;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-
-public class DeviceProfileEntryProviderBuilder {
- private static final String EXTENSION_POINT_PLUGINID = "org.eclipse.wst.html.ui"; //$NON-NLS-1$
- private static final String EXTENSION_POINT_NAME = "deviceProfileEntryProvider"; //$NON-NLS-1$
- private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
-
- public DeviceProfileEntryProviderBuilder() {
- super();
- }
- static public DeviceProfileEntryProvider getEntryProvider() {
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_POINT_PLUGINID, EXTENSION_POINT_NAME);
- if (point != null) {
- IExtension extensions[] = point.getExtensions();
- if ((extensions != null) && (extensions.length > 0)) {
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement elements[] = extensions[i].getConfigurationElements();
- if ((elements != null) && (elements.length > 0)) {
- for (int j = 0; j < elements.length; j++) {
- IConfigurationElement config = elements[j];
- if ((config != null) && (config.getName().equals(EXTENSION_POINT_NAME) == true)) {
- String className = config.getAttribute(ATTR_CLASS);
- if (className != null) {
- try {
- DeviceProfileEntryProvider provider = (DeviceProfileEntryProvider)config.createExecutableExtension(ATTR_CLASS);
- if (provider != null) {
- return provider;
- }
- } catch (CoreException ignored) {
- }
- }
- }
- }
- }
- }
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/HTMLContentSettingsPropertyPage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/HTMLContentSettingsPropertyPage.java
deleted file mode 100644
index 848d98e096..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/HTMLContentSettingsPropertyPage.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentproperties.ui;
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.html.ui.internal.Logger;
-import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.contentproperties.IContentSettings;
-import org.eclipse.wst.sse.ui.contentproperties.ui.ComboListOnPropertyPage;
-import org.eclipse.wst.sse.ui.contentproperties.ui.ContentSettingsPropertyPage;
-
-public final class HTMLContentSettingsPropertyPage extends ContentSettingsPropertyPage implements org.eclipse.swt.events.SelectionListener {
-
-
- private final int N_DOCUMENT_TYPE = 0;
- private final int N_CSS_PROFILE = 1;
- private final int N_TARGET_DEVICE = 2;
-
- private Text publicIdText;
- private Text systemIdText;
-
- public HTMLContentSettingsPropertyPage() {
- super();
- numberOfCombo = 3;
- numCols = 2;
- numRows = 8;
- combo = new ComboListOnPropertyPage[super.numberOfCombo];
-
- }
-
-
-
- protected void createDocumentTypeComboBox() {
-
- // create description of implecit DOCTYPE
- Label label = new Label(propertyPage, SWT.LEFT);
- label.setText(HTMLUIMessages.UI_Description_of_role_of_following_DOCTYPE);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = numCols;
- label.setLayoutData(data);
-
- // create combobox
- super.combo[N_DOCUMENT_TYPE] = super.createComboBoxOf(DOCUMENT_LABEL);
- super.combo[this.N_DOCUMENT_TYPE].addSelectionListener(this);
- // set entry list into Combo
- ContentSettingsRegistry.setHTMLDocumentTypeRegistryInto(combo[N_DOCUMENT_TYPE]);
- // create TextField
- createIDTextField();
- if (combo[N_DOCUMENT_TYPE].getItemCount() <= 0)
- return;
-
- String initValue = contentSettings.getProperty((IResource) super.getElement(), IContentSettings.HTML_DOCUMENT_TYPE);
- // when either .contentsettings or element doesn't exist
- // when attribute doesn't exists,getProperty returns empty string.
- if (initValue == null)
- initValue = ""; //$NON-NLS-1$
- // set init selectionItem in Combo
- super.setSelectionItem(combo[N_DOCUMENT_TYPE], initValue);
- this.publicIdText.setText(initValue);
- if (!initValue.equals("")) {//$NON-NLS-1$
- // toro D210260
- if (ContentSettingsRegistry.getSystemIdFrom(initValue) != null)
- this.systemIdText.setText(ContentSettingsRegistry.getSystemIdFrom(initValue));
- else
- this.systemIdText.setText("");//$NON-NLS-1$
- }
- else
- this.systemIdText.setText("");//$NON-NLS-1$
-
- // create separator
- label = new Label(propertyPage, SWT.SEPARATOR | SWT.HORIZONTAL);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = numCols;
- data.verticalSpan = 8;
- label.setLayoutData(data);
-
- }
-
-
-
- protected void createCSSComboBox() {
- super.combo[N_CSS_PROFILE] = super.createComboBoxOf(CSS_LABEL);
-
- ContentSettingsRegistry.setCSSMetaModelRegistryInto(combo[N_CSS_PROFILE]);
- if (combo[N_CSS_PROFILE].getItemCount() <= 0)
- return;
- String initValue = contentSettings.getProperty((IResource) super.getElement(), IContentSettings.CSS_PROFILE);
- // when either .contentsettings or element doesn't exist
- // when attribute doesn't exists,getProperty returns empty string.
- if (initValue == null)
- initValue = ""; //$NON-NLS-1$
- // set init selectionItem in Combo
- super.setSelectionItem(combo[N_CSS_PROFILE], initValue);
- }
-
-
-
- protected void createDeviceComboBox() {
- super.combo[N_TARGET_DEVICE] = super.createComboBoxOf(DEVICE_LABEL);
-
- ContentSettingsRegistry.setDeviceProfileRegistryInto(combo[N_TARGET_DEVICE]);
- if (combo[N_TARGET_DEVICE].getItemCount() <= 0)
- return;
- String initValue = contentSettings.getProperty((IResource) super.getElement(), IContentSettings.DEVICE_PROFILE);
- // when either .contentsettings or element doesn't exist
- // when attribute doesn't exists,getProperty returns empty string.
- if (initValue == null)
- initValue = ""; //$NON-NLS-1$
- // set init selectionItem in Combo
- super.setSelectionItem(combo[N_TARGET_DEVICE], initValue);
- }
-
-
- protected void createSettingsPageGUI() {
- int type = ((IResource) getElement()).getType();
- switch (type) {
- case IResource.FILE :
- // composite = createComposite(propertyPage,numCols,numRows);
- createDocumentTypeComboBox();
- createCSSComboBox();
- createDeviceComboBox();
- computeMaxWidthHint();
- WorkbenchHelp.setHelp(propertyPage, IHelpContextIds.WEB_CONTENT_SETTINGS_HELPID);
- break;
-
- default :
- Logger.log(Logger.WARNING, "HTMLContentSettingsPropertyPage is instantiated by resource except FILE");//$NON-NLS-1$
- break;
- }
-
- }
-
-
-
- protected void putSelectedPropertyInto(Map properties, String valueInCombo, int index) {
-
- switch (index) {
- case N_DOCUMENT_TYPE :
- // doc type
- properties.put(IContentSettings.HTML_DOCUMENT_TYPE, valueInCombo);
- break;
- case N_CSS_PROFILE :
- // css
- properties.put(IContentSettings.CSS_PROFILE, valueInCombo);
- break;
- case N_TARGET_DEVICE :
- // device
- properties.put(IContentSettings.DEVICE_PROFILE, valueInCombo);
- break;
- default :
- Logger.log(Logger.ERROR, "Index is out of range in putSelectedPropertyInto() in class HTMLContentSettingsPropertyPage");//$NON-NLS-1$
- break;
- }
-
- }
-
- protected void deleteNoneProperty(int index) {
- switch (index) {
- case N_DOCUMENT_TYPE :
- // doc type
- contentSettings.deleteProperty((IResource) super.getElement(), IContentSettings.HTML_DOCUMENT_TYPE);
- break;
- case N_CSS_PROFILE :
- // css
- contentSettings.deleteProperty((IResource) super.getElement(), IContentSettings.CSS_PROFILE);
- break;
- case N_TARGET_DEVICE :
- // device
- contentSettings.deleteProperty((IResource) super.getElement(), IContentSettings.DEVICE_PROFILE);
- break;
- default :
- Logger.log(Logger.ERROR, "Index is out of range in deleteNoneProperty() in class HTMLContentSettingsPropertyPage");//$NON-NLS-1$
- break;
- }
- }
-
- private void createIDTextField() {
- // public ID & System ID
- Label publicLabel = new Label(super.propertyPage, SWT.NONE);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 10;
- publicLabel.setLayoutData(data);
- publicLabel.setText(HTMLUIMessages.UI_Public_ID);
- publicIdText = new Text(super.propertyPage, SWT.BORDER | SWT.READ_ONLY);
- data = new GridData();
-
- publicIdText.setLayoutData(data);
-
- Label systemLabel = new Label(super.propertyPage, SWT.NONE);
- data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 10;
- systemLabel.setLayoutData(data);
- systemLabel.setText(HTMLUIMessages.UI_System_ID);
- systemIdText = new Text(super.propertyPage, SWT.BORDER | SWT.READ_ONLY);
- data = new GridData();
-
- systemIdText.setLayoutData(data);
- }
-
-
-
- private void computeMaxWidthHint() {
- // maxLengthString was set when HTMLDocumentTypeEntry was set in class ContentSettingsRegistry.
- String maxLengthString = ContentSettingsRegistry.maxLengthStringInHTMLDocumentTypeRegistry;
- String backup = this.systemIdText.getText();
- this.systemIdText.setText(maxLengthString);
- int maxWidthHint = this.systemIdText.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
- this.systemIdText.setText(backup);
-
- if (this.combo[this.N_DOCUMENT_TYPE].getLayoutData() != null)
- ((GridData) this.combo[this.N_DOCUMENT_TYPE].getLayoutData()).widthHint = maxWidthHint;
- if (this.publicIdText.getLayoutData() != null)
- ((GridData) this.publicIdText.getLayoutData()).widthHint = maxWidthHint;
- if (this.systemIdText.getLayoutData() != null)
- ((GridData) this.systemIdText.getLayoutData()).widthHint = maxWidthHint;
- if (this.combo[this.N_CSS_PROFILE].getLayoutData() != null)
- ((GridData) this.combo[this.N_CSS_PROFILE].getLayoutData()).widthHint = maxWidthHint;
- if (this.combo[this.N_TARGET_DEVICE].getLayoutData() != null)
- ((GridData) this.combo[this.N_TARGET_DEVICE].getLayoutData()).widthHint = maxWidthHint;
-
- }
-
-
- public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) {
- }
-
- public void widgetSelected(org.eclipse.swt.events.SelectionEvent event) {
- Widget source = event.widget;
-
- if (this.combo[this.N_DOCUMENT_TYPE].equals(source)) {
- ComboListOnPropertyPage combo = this.combo[this.N_DOCUMENT_TYPE];
- if (combo.getSelectionIndex() < 0)
- return;
- if (!combo.getSelectedValue().equals("")) {//$NON-NLS-1$
- this.publicIdText.setText(combo.getSelectedValue());
- if (ContentSettingsRegistry.getSystemIdFrom(combo.getSelectedValue()) != null)
- this.systemIdText.setText(ContentSettingsRegistry.getSystemIdFrom(combo.getSelectedValue()));
- else
- this.systemIdText.setText("");//$NON-NLS-1$
- }
- else {
- this.publicIdText.setText("");//$NON-NLS-1$
- this.systemIdText.setText(""); //$NON-NLS-1$
- }
-
- }
- }
-
- protected void performDefaults() {
- super.performDefaults();
- this.publicIdText.setText("");//$NON-NLS-1$
- this.systemIdText.setText(""); //$NON-NLS-1$
-
- }
-
-
-}
-
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ProjectContentSettingsPropertyPage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ProjectContentSettingsPropertyPage.java
deleted file mode 100644
index ee400a00f9..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ProjectContentSettingsPropertyPage.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.contentproperties.ui;
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.html.ui.internal.Logger;
-import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.contentproperties.IContentSettings;
-import org.eclipse.wst.sse.ui.contentproperties.ui.ComboListOnPropertyPage;
-import org.eclipse.wst.sse.ui.contentproperties.ui.ContentSettingsPropertyPage;
-
-public final class ProjectContentSettingsPropertyPage extends ContentSettingsPropertyPage implements org.eclipse.swt.events.SelectionListener {
-
-
- private final int N_DOCUMENT_TYPE = 0;
- private final int N_CSS_PROFILE = 1;
- private final int N_TARGET_DEVICE = 2;
-
- private Text publicIdText;
- private Text systemIdText;
-
- public ProjectContentSettingsPropertyPage() {
- super();
- numberOfCombo = 3;
- numCols = 2;
- numRows = 8;
- combo = new ComboListOnPropertyPage[super.numberOfCombo];
-
- }
-
-
-
- protected void createDocumentTypeComboBox() {
-
- // create description of implecit DOCTYPE
- Label label = new Label(propertyPage, SWT.LEFT);
- label.setText(HTMLUIMessages.UI_Description_of_role_of_following_DOCTYPE);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = numCols;
- label.setLayoutData(data);
-
- // create combobox
- super.combo[N_DOCUMENT_TYPE] = super.createComboBoxOf(DOCUMENT_LABEL);
- super.combo[this.N_DOCUMENT_TYPE].addSelectionListener(this);
- // set entry list into Combo
- ContentSettingsRegistry.setHTMLDocumentTypeRegistryInto(combo[N_DOCUMENT_TYPE]);
- // create TextField
- createIDTextField();
- if (combo[N_DOCUMENT_TYPE].getItemCount() <= 0)
- return;
-
- String initValue = contentSettings.getProperty((IResource) super.getElement(), IContentSettings.HTML_DOCUMENT_TYPE);
- // when either .contentsettings or element doesn't exist
- // when attribute doesn't exists,getProperty returns empty string.
- if (initValue == null)
- initValue = ""; //$NON-NLS-1$
- // set init selectionItem in Combo
- super.setSelectionItem(combo[N_DOCUMENT_TYPE], initValue);
- this.publicIdText.setText(initValue);
- if (!initValue.equals("")) {//$NON-NLS-1$
- // toro D210260
- if (ContentSettingsRegistry.getSystemIdFrom(initValue) != null)
- this.systemIdText.setText(ContentSettingsRegistry.getSystemIdFrom(initValue));
- else
- this.systemIdText.setText("");//$NON-NLS-1$
- }
- else
- this.systemIdText.setText("");//$NON-NLS-1$
-
- // create separator
- label = new Label(propertyPage, SWT.SEPARATOR | SWT.HORIZONTAL);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = numCols;
- data.verticalSpan = 8;
- label.setLayoutData(data);
-
- }
-
-
-
- protected void createCSSComboBox() {
- super.combo[N_CSS_PROFILE] = super.createComboBoxOf(CSS_LABEL);
-
- ContentSettingsRegistry.setCSSMetaModelRegistryInto(combo[N_CSS_PROFILE]);
- if (combo[N_CSS_PROFILE].getItemCount() <= 0)
- return;
- String initValue = contentSettings.getProperty((IResource) super.getElement(), IContentSettings.CSS_PROFILE);
- // when either .contentsettings or element doesn't exist
- // when attribute doesn't exists,getProperty returns empty string.
- if (initValue == null)
- initValue = ""; //$NON-NLS-1$
- // set init selectionItem in Combo
- super.setSelectionItem(combo[N_CSS_PROFILE], initValue);
- }
-
-
-
- protected void createDeviceComboBox() {
- super.combo[N_TARGET_DEVICE] = super.createComboBoxOf(DEVICE_LABEL);
-
- ContentSettingsRegistry.setDeviceProfileRegistryInto(combo[N_TARGET_DEVICE]);
- if (combo[N_TARGET_DEVICE].getItemCount() <= 0)
- return;
- String initValue = contentSettings.getProperty((IResource) super.getElement(), IContentSettings.DEVICE_PROFILE);
- // when either .contentsettings or element doesn't exist
- // when attribute doesn't exists,getProperty returns empty string.
- if (initValue == null)
- initValue = ""; //$NON-NLS-1$
- // set init selectionItem in Combo
- super.setSelectionItem(combo[N_TARGET_DEVICE], initValue);
- }
-
-
- protected void createSettingsPageGUI() {
- int type = ((IResource) getElement()).getType();
- switch (type) {
- case IResource.PROJECT :
- // composite = createComposite(propertyPage,numCols,numRows);
- createDocumentTypeComboBox();
- createCSSComboBox();
- createDeviceComboBox();
- computeMaxWidthHint();
- WorkbenchHelp.setHelp(propertyPage, IHelpContextIds.WEB_CONTENT_SETTINGS_HELPID);
- break;
-
- default :
- Logger.log(Logger.WARNING, "ProjectContentSettingsPropertyPage is instantiated by resource except PROJECT");//$NON-NLS-1$
- break;
- }
-
- }
-
-
-
- protected void putSelectedPropertyInto(Map properties, String valueInCombo, int index) {
-
- switch (index) {
- case N_DOCUMENT_TYPE :
- // doc type
- properties.put(IContentSettings.HTML_DOCUMENT_TYPE, valueInCombo);
- break;
- case N_CSS_PROFILE :
- // css
- properties.put(IContentSettings.CSS_PROFILE, valueInCombo);
- break;
- case N_TARGET_DEVICE :
- // device
- properties.put(IContentSettings.DEVICE_PROFILE, valueInCombo);
- break;
- default :
- Logger.log(Logger.ERROR, "Index is out of range in putSelectedPropertyInto() in class ProjectContentSettingsPropertyPage");//$NON-NLS-1$
- break;
- }
-
- }
-
- protected void deleteNoneProperty(int index) {
- switch (index) {
- case N_DOCUMENT_TYPE :
- // doc type
- contentSettings.deleteProperty((IResource) super.getElement(), IContentSettings.HTML_DOCUMENT_TYPE);
- break;
-
- case N_CSS_PROFILE :
- // css
- contentSettings.deleteProperty((IResource) super.getElement(), IContentSettings.CSS_PROFILE);
- break;
-
- case N_TARGET_DEVICE :
- // device
- contentSettings.deleteProperty((IResource) super.getElement(), IContentSettings.DEVICE_PROFILE);
- break;
-
- default :
- Logger.log(Logger.ERROR, "Index is out of range in deleteNoneProperty() in class ProjectContentSettingsPropertyPage");//$NON-NLS-1$
- break;
- }
- }
-
- private void createIDTextField() {
- // public ID & System ID
- Label publicLabel = new Label(super.propertyPage, SWT.NONE);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 10;
- publicLabel.setLayoutData(data);
- publicLabel.setText(HTMLUIMessages.UI_Public_ID);
- publicIdText = new Text(super.propertyPage, SWT.BORDER | SWT.READ_ONLY);
- data = new GridData();
-
- publicIdText.setLayoutData(data);
-
- Label systemLabel = new Label(super.propertyPage, SWT.NONE);
- data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 10;
- systemLabel.setLayoutData(data);
- systemLabel.setText(HTMLUIMessages.UI_System_ID);
- systemIdText = new Text(super.propertyPage, SWT.BORDER | SWT.READ_ONLY);
- data = new GridData();
-
- systemIdText.setLayoutData(data);
- }
-
-
-
- private void computeMaxWidthHint() {
- // maxLengthString was set when HTMLDocumentTypeEntry was set in class ContentSettingsRegistry.
- String maxLengthString = ContentSettingsRegistry.maxLengthStringInHTMLDocumentTypeRegistry;
- String backup = this.systemIdText.getText();
- this.systemIdText.setText(maxLengthString);
- int maxWidthHint = this.systemIdText.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
- this.systemIdText.setText(backup);
-
- if (this.combo[this.N_DOCUMENT_TYPE].getLayoutData() != null)
- ((GridData) this.combo[this.N_DOCUMENT_TYPE].getLayoutData()).widthHint = maxWidthHint;
- if (this.publicIdText.getLayoutData() != null)
- ((GridData) this.publicIdText.getLayoutData()).widthHint = maxWidthHint;
- if (this.systemIdText.getLayoutData() != null)
- ((GridData) this.systemIdText.getLayoutData()).widthHint = maxWidthHint;
- if (this.combo[this.N_CSS_PROFILE].getLayoutData() != null)
- ((GridData) this.combo[this.N_CSS_PROFILE].getLayoutData()).widthHint = maxWidthHint;
- if (this.combo[this.N_TARGET_DEVICE].getLayoutData() != null)
- ((GridData) this.combo[this.N_TARGET_DEVICE].getLayoutData()).widthHint = maxWidthHint;
-
- }
-
-
- public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) {
- }
-
- public void widgetSelected(org.eclipse.swt.events.SelectionEvent event) {
- Widget source = event.widget;
-
- if (this.combo[this.N_DOCUMENT_TYPE].equals(source)) {
- ComboListOnPropertyPage combo = this.combo[this.N_DOCUMENT_TYPE];
- if (combo.getSelectionIndex() < 0)
- return;
- if (!combo.getSelectedValue().equals("")) {//$NON-NLS-1$
- this.publicIdText.setText(combo.getSelectedValue());
- if (ContentSettingsRegistry.getSystemIdFrom(combo.getSelectedValue()) != null)
- this.systemIdText.setText(ContentSettingsRegistry.getSystemIdFrom(combo.getSelectedValue()));
- else
- this.systemIdText.setText("");//$NON-NLS-1$
- }
- else {
- this.publicIdText.setText("");//$NON-NLS-1$
- this.systemIdText.setText(""); //$NON-NLS-1$
- }
-
- }
- }
-
- protected void performDefaults() {
- super.performDefaults();
- this.publicIdText.setText("");//$NON-NLS-1$
- this.systemIdText.setText(""); //$NON-NLS-1$
-
- }
-
-}
-
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/ActionContributorHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/ActionContributorHTML.java
deleted file mode 100644
index 0c711b296a..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/ActionContributorHTML.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.edit.ui;
-
-import org.eclipse.wst.xml.ui.actions.ActionContributorXML;
-
-/**
- *
- * Instead, use SourcePageActionContributor for source page contributor
- * of multi page editor.
- *
- * Note that this class is still valid for single page editor.
- */
-public class ActionContributorHTML extends ActionContributorXML {
- private static final String[] EDITOR_IDS = {"org.eclipse.wst.html.core.htmlsource.source", "org.eclipse.wst.sse.ui.StructuredTextEditor"}; //$NON-NLS-1$ //$NON-NLS-2$
-
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.xml.ui.actions.ActionContributor#getExtensionIDs()
- */
- protected String[] getExtensionIDs() {
- return EDITOR_IDS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupActionHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupActionHTML.java
deleted file mode 100644
index 0eedfb667d..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupActionHTML.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.edit.ui;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.html.core.internal.cleanup.HTMLCleanupProcessorImpl;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupProcessor;
-import org.eclipse.wst.sse.ui.internal.actions.CleanupAction;
-
-public class CleanupActionHTML extends CleanupAction {
- protected IStructuredCleanupProcessor fCleanupProcessor;
-
- public CleanupActionHTML(ResourceBundle bundle, String prefix, ITextEditor editor) {
- super(bundle, prefix, editor);
- }
-
- protected Dialog getCleanupDialog(Shell shell) {
- if (fCleanupDialog == null)
- fCleanupDialog = new CleanupDialogHTML(shell);
-
- return fCleanupDialog;
- }
-
- protected IStructuredCleanupProcessor getCleanupProcessor() {
- if (fCleanupProcessor == null)
- fCleanupProcessor = new HTMLCleanupProcessorImpl();
-
- return fCleanupProcessor;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupDialogHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupDialogHTML.java
deleted file mode 100644
index b9170e466f..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupDialogHTML.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.edit.ui;
-
-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.Group;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.html.core.contenttype.ContentTypeIdForHTML;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler;
-import org.eclipse.wst.sse.core.internal.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.xml.core.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.internal.cleanup.XMLCleanupPreferencesImpl;
-
-public class CleanupDialogHTML extends Dialog implements SelectionListener {
-
- protected Button fRadioButtonTagNameCaseAsis;
- protected Button fRadioButtonTagNameCaseLower;
- protected Button fRadioButtonTagNameCaseUpper;
- protected Button fRadioButtonAttrNameCaseAsis;
- protected Button fRadioButtonAttrNameCaseLower;
- protected Button fRadioButtonAttrNameCaseUpper;
- protected Button fCheckBoxInsertRequiredAttrs;
- protected Button fCheckBoxInsertMissingTags;
- protected Button fCheckBoxQuoteAttrValues;
- protected Button fCheckBoxFormatSource;
- protected Button fCheckBoxConvertEOLCodes;
- protected Button fRadioButtonConvertEOLWindows;
- protected Button fRadioButtonConvertEOLUnix;
- protected Button fRadioButtonConvertEOLMac;
- protected IStructuredModel fModel = null;
- protected Preferences fPreferences = null;
-
- public CleanupDialogHTML(Shell shell) {
- super(shell);
- }
-
- public Control createDialogArea(Composite parent) {
- getShell().setText(HTMLUIMessages.Cleanup_UI_);
- Composite composite = new Composite(parent, SWT.NULL);
-
- createDialogAreaInComposite(composite);
- initializeOptions();
-
- return composite;
- }
-
- protected void createDialogAreaInCompositeForHTML(Composite composite) {
- // Convert tag name case
- // d257064 need to associate group w/ radio buttons so radio buttons header can be read
- Group tagNameCase = new Group(composite, SWT.NONE);
- tagNameCase.setText(HTMLUIMessages.Tag_name_case_for_HTML_UI_);
- GridLayout hLayout = new GridLayout();
- hLayout.numColumns = 3;
- tagNameCase.setLayout(hLayout);
- fRadioButtonTagNameCaseAsis = new Button(tagNameCase, SWT.RADIO);
- fRadioButtonTagNameCaseAsis.setText(HTMLUIMessages.Tag_name_case_As_is_UI_);
- fRadioButtonTagNameCaseAsis.addSelectionListener(this);
- fRadioButtonTagNameCaseLower = new Button(tagNameCase, SWT.RADIO);
- fRadioButtonTagNameCaseLower.setText(HTMLUIMessages.Tag_name_case_Lower_UI_);
- fRadioButtonTagNameCaseLower.addSelectionListener(this);
- fRadioButtonTagNameCaseUpper = new Button(tagNameCase, SWT.RADIO);
- fRadioButtonTagNameCaseUpper.setText(HTMLUIMessages.Tag_name_case_Upper_UI_);
- fRadioButtonTagNameCaseUpper.addSelectionListener(this);
-
- // Convert attr name case
- // d257064 need to associate group w/ radio buttons so radio buttons header can be read
- Group attrNameCase = new Group(composite, SWT.NONE);
- attrNameCase.setText(HTMLUIMessages.Attribute_name_case_for_HTML_UI_);
- attrNameCase.setLayout(hLayout);
- fRadioButtonAttrNameCaseAsis = new Button(attrNameCase, SWT.RADIO);
- fRadioButtonAttrNameCaseAsis.setText(HTMLUIMessages.Attribute_name_case_As_is_UI_);
- fRadioButtonAttrNameCaseAsis.addSelectionListener(this);
- fRadioButtonAttrNameCaseLower = new Button(attrNameCase, SWT.RADIO);
- fRadioButtonAttrNameCaseLower.setText(HTMLUIMessages.Attribute_name_case_Lower_UI_);
- fRadioButtonAttrNameCaseLower.addSelectionListener(this);
- fRadioButtonAttrNameCaseUpper = new Button(attrNameCase, SWT.RADIO);
- fRadioButtonAttrNameCaseUpper.setText(HTMLUIMessages.Attribute_name_case_Upper_UI_);
- fRadioButtonAttrNameCaseUpper.addSelectionListener(this);
- }
-
- protected void createDialogAreaInComposite(Composite composite) {
- if (isHTMLType()) {
- createDialogAreaInCompositeForHTML(composite);
- WorkbenchHelp.setHelp(composite, IHelpContextIds.CLEANUP_HTML_HELPID); // use HTML specific help
- }
- else
- WorkbenchHelp.setHelp(composite, org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds.CLEANUP_XML_HELPID); // use XML specific help
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.makeColumnsEqualWidth = true;
- composite.setLayout(layout);
-
- // Insert missing required attrs
- fCheckBoxInsertRequiredAttrs = new Button(composite, SWT.CHECK);
- fCheckBoxInsertRequiredAttrs.setText(HTMLUIMessages.Insert_required_attributes_UI_);
- fCheckBoxInsertRequiredAttrs.addSelectionListener(this);
-
- // Insert missing begin/end tags
- fCheckBoxInsertMissingTags = new Button(composite, SWT.CHECK);
- fCheckBoxInsertMissingTags.setText(HTMLUIMessages.Insert_missing_tags_UI_);
- fCheckBoxInsertMissingTags.addSelectionListener(this);
-
- // Quote attribute values
- fCheckBoxQuoteAttrValues = new Button(composite, SWT.CHECK);
- fCheckBoxQuoteAttrValues.setText(HTMLUIMessages.Quote_attribute_values_UI_);
- fCheckBoxQuoteAttrValues.addSelectionListener(this);
-
- // Format source
- fCheckBoxFormatSource = new Button(composite, SWT.CHECK);
- fCheckBoxFormatSource.setText(HTMLUIMessages.Format_source_UI_);
- fCheckBoxFormatSource.addSelectionListener(this);
-
- // Convert EOL code
- fCheckBoxConvertEOLCodes = new Button(composite, SWT.CHECK);
- fCheckBoxConvertEOLCodes.setText(HTMLUIMessages.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(HTMLUIMessages.EOL_Windows_UI);
- fRadioButtonConvertEOLWindows.addSelectionListener(this);
- fRadioButtonConvertEOLUnix = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLUnix.setText(HTMLUIMessages.EOL_Unix_UI);
- fRadioButtonConvertEOLUnix.addSelectionListener(this);
- fRadioButtonConvertEOLMac = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLMac.setText(HTMLUIMessages.EOL_Mac_UI);
- fRadioButtonConvertEOLMac.addSelectionListener(this);
- }
-
- protected void okPressed() {
- storeOptions();
-
- super.okPressed();
- }
-
- protected void initializeOptionsForHTML() {
- int tagNameCase = getModelPreferences().getInt(CommonModelPreferenceNames.CLEANUP_TAG_NAME_CASE);
- if (tagNameCase == CommonModelPreferenceNames.UPPER)
- fRadioButtonTagNameCaseUpper.setSelection(true);
- else if (tagNameCase == CommonModelPreferenceNames.LOWER)
- fRadioButtonTagNameCaseLower.setSelection(true);
- else
- fRadioButtonTagNameCaseAsis.setSelection(true);
-
- int attrNameCase = getModelPreferences().getInt(CommonModelPreferenceNames.CLEANUP_ATTR_NAME_CASE);
- if (attrNameCase == CommonModelPreferenceNames.UPPER)
- fRadioButtonAttrNameCaseUpper.setSelection(true);
- else if (attrNameCase == CommonModelPreferenceNames.LOWER)
- fRadioButtonAttrNameCaseLower.setSelection(true);
- else
- fRadioButtonAttrNameCaseAsis.setSelection(true);
- }
-
- protected void initializeOptions() {
- if (isHTMLType())
- initializeOptionsForHTML();
-
- fCheckBoxInsertRequiredAttrs.setSelection(getModelPreferences().getBoolean(CommonModelPreferenceNames.INSERT_REQUIRED_ATTRS));
- fCheckBoxInsertMissingTags.setSelection(getModelPreferences().getBoolean(CommonModelPreferenceNames.INSERT_MISSING_TAGS));
- fCheckBoxQuoteAttrValues.setSelection(getModelPreferences().getBoolean(CommonModelPreferenceNames.QUOTE_ATTR_VALUES));
- fCheckBoxFormatSource.setSelection(getModelPreferences().getBoolean(CommonModelPreferenceNames.FORMAT_SOURCE));
- fCheckBoxConvertEOLCodes.setSelection(getModelPreferences().getBoolean(CommonModelPreferenceNames.CONVERT_EOL_CODES));
- if (fCheckBoxConvertEOLCodes.getSelection()) {
- String EOLCode = getModelPreferences().getString(CommonModelPreferenceNames.CLEANUP_EOL_CODE);
- if (EOLCode == CommonEncodingPreferenceNames.LF)
- fRadioButtonConvertEOLUnix.setSelection(true);
- else if (EOLCode == CommonEncodingPreferenceNames.CR)
- fRadioButtonConvertEOLMac.setSelection(true);
- else
- fRadioButtonConvertEOLWindows.setSelection(true);
- }
- enableEOLCodeRadios(fCheckBoxConvertEOLCodes.getSelection());
- }
-
- protected void storeOptionsForHTML() {
- if (fRadioButtonTagNameCaseUpper.getSelection())
- getModelPreferences().setValue(CommonModelPreferenceNames.CLEANUP_TAG_NAME_CASE, CommonModelPreferenceNames.UPPER);
- else if (fRadioButtonTagNameCaseLower.getSelection())
- getModelPreferences().setValue(CommonModelPreferenceNames.CLEANUP_TAG_NAME_CASE, CommonModelPreferenceNames.LOWER);
- else
- getModelPreferences().setValue(CommonModelPreferenceNames.CLEANUP_TAG_NAME_CASE, CommonModelPreferenceNames.ASIS);
-
- if (fRadioButtonAttrNameCaseUpper.getSelection())
- getModelPreferences().setValue(CommonModelPreferenceNames.CLEANUP_ATTR_NAME_CASE, CommonModelPreferenceNames.UPPER);
- else if (fRadioButtonAttrNameCaseLower.getSelection())
- getModelPreferences().setValue(CommonModelPreferenceNames.CLEANUP_ATTR_NAME_CASE, CommonModelPreferenceNames.LOWER);
- else
- getModelPreferences().setValue(CommonModelPreferenceNames.CLEANUP_ATTR_NAME_CASE, CommonModelPreferenceNames.ASIS);
-
- // explicitly save plugin preferences so values are stored
- HTMLCorePlugin.getDefault().savePluginPreferences();
- }
-
- protected void storeOptions() {
- if (isHTMLType()) {
- storeOptionsForHTML();
- XMLCleanupPreferencesImpl.getInstance().setTagNameCase(getModelPreferences().getInt(CommonModelPreferenceNames.CLEANUP_TAG_NAME_CASE));
- XMLCleanupPreferencesImpl.getInstance().setAttrNameCase(getModelPreferences().getInt(CommonModelPreferenceNames.CLEANUP_ATTR_NAME_CASE));
- }
- else {
- XMLCleanupPreferencesImpl.getInstance().setTagNameCase(CommonModelPreferenceNames.ASIS);
- XMLCleanupPreferencesImpl.getInstance().setAttrNameCase(CommonModelPreferenceNames.ASIS);
- }
-
- getModelPreferences().setValue(CommonModelPreferenceNames.INSERT_REQUIRED_ATTRS, fCheckBoxInsertRequiredAttrs.getSelection());
- getModelPreferences().setValue(CommonModelPreferenceNames.INSERT_MISSING_TAGS, fCheckBoxInsertMissingTags.getSelection());
- getModelPreferences().setValue(CommonModelPreferenceNames.QUOTE_ATTR_VALUES, fCheckBoxQuoteAttrValues.getSelection());
- getModelPreferences().setValue(CommonModelPreferenceNames.FORMAT_SOURCE, fCheckBoxFormatSource.getSelection());
- getModelPreferences().setValue(CommonModelPreferenceNames.CONVERT_EOL_CODES, fCheckBoxConvertEOLCodes.getSelection());
- XMLCleanupPreferencesImpl.getInstance().setInsertMissingTags(fCheckBoxInsertMissingTags.getSelection());
- XMLCleanupPreferencesImpl.getInstance().setQuoteAttrValues(fCheckBoxQuoteAttrValues.getSelection());
- XMLCleanupPreferencesImpl.getInstance().setFormatSource(fCheckBoxFormatSource.getSelection());
- XMLCleanupPreferencesImpl.getInstance().setConvertEOLCodes(fCheckBoxConvertEOLCodes.getSelection());
- if (fCheckBoxConvertEOLCodes.getSelection()) {
- if (fRadioButtonConvertEOLUnix.getSelection()) {
- getModelPreferences().setValue(CommonModelPreferenceNames.CLEANUP_EOL_CODE, CommonEncodingPreferenceNames.LF);
- XMLCleanupPreferencesImpl.getInstance().setEOLCode(CommonEncodingPreferenceNames.LF);
- }
- else if (fRadioButtonConvertEOLMac.getSelection()) {
- getModelPreferences().setValue(CommonModelPreferenceNames.CLEANUP_EOL_CODE, CommonEncodingPreferenceNames.CR);
- XMLCleanupPreferencesImpl.getInstance().setEOLCode(CommonEncodingPreferenceNames.CR);
- }
- else {
- getModelPreferences().setValue(CommonModelPreferenceNames.CLEANUP_EOL_CODE, CommonEncodingPreferenceNames.CRLF);
- XMLCleanupPreferencesImpl.getInstance().setEOLCode(CommonEncodingPreferenceNames.CRLF);
- }
- }
-
- // explicitly save plugin preferences so values are stored
- HTMLCorePlugin.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());
- }
-
- public void setModel(IStructuredModel model) {
- fModel = model;
- }
-
- protected Preferences getModelPreferences() {
- return HTMLCorePlugin.getDefault().getPluginPreferences();
- }
-
- protected boolean isXMLType() {
- boolean result = false;
-
- if (fModel != null) {
- IModelHandler modelHandler = fModel.getModelHandler();
- if (modelHandler.getAssociatedContentTypeId().equals(ContentTypeIdForXML.ContentTypeID_XML))
- result = true;
- }
-
- return result;
- }
-
- protected boolean isHTMLType() {
- boolean result = true;
-
- if (fModel != null) {
- IModelHandler modelHandler = fModel.getModelHandler();
- if (modelHandler.getAssociatedContentTypeId().equals(ContentTypeIdForHTML.ContentTypeID_HTML))
- result = true;
- }
-
- return result;
- }
-
- 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);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImageHelper.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImageHelper.java
deleted file mode 100644
index e8d0887a82..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImageHelper.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.editor;
-
-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.html.ui.internal.HTMLUIPlugin;
-
-
-/**
- * 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 HTMLEditorPluginImageHelper {
- private final String PLUGINID = HTMLUIPlugin.ID;
- private static HTMLEditorPluginImageHelper instance = null;
-
- // save a descriptor for each image
- private HashMap fImageDescRegistry = null;
-
- /**
- * Gets the instance.
- *
- * @return Returns a HTMLEditorPluginImageHelper
- */
- public synchronized static HTMLEditorPluginImageHelper getInstance() {
- if (instance == null)
- instance = new HTMLEditorPluginImageHelper();
- 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;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImages.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImages.java
deleted file mode 100644
index 22c65fda61..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImages.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.editor;
-
-/**
- * Bundle of most images used by the HTML Editor plug-in.
- */
-public class HTMLEditorPluginImages {
- public static final String IMG_OBJ_TABLE = "icons/full/obj16/table.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_ANCHOR = "icons/full/obj16/tag-anchor.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_BODY = "icons/full/obj16/tag-body.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_BUTTON = "icons/full/obj16/tag-button.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_FONT = "icons/full/obj16/tag-font.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_FORM = "icons/full/obj16/tag-form.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_HTML = "icons/full/obj16/tag-html.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_IMAGE_MAP = "icons/full/obj16/tag-image-map.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_IMAGE = "icons/full/obj16/tag-image.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_JSP = "icons/full/obj16/tag-jsp.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_TEMPLATE = "icons/full/obj16/tag-template.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_TITLE = "icons/full/obj16/tag-title.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG = "icons/full/obj16/tag.gif"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/IHelpContextIds.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/IHelpContextIds.java
deleted file mode 100644
index 77746a379c..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/IHelpContextIds.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.editor;
-
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-
-/**
- * Help context ids for the HTML Source Editor.
- * <p>
- * This interface contains constants only; it is not intended to be implemented.
- * </p>
- *
- */
-public interface IHelpContextIds {
- // org.eclipse.wst.html.ui.
- public static final String PREFIX = HTMLUIPlugin.ID + "."; //$NON-NLS-1$
-
- // HTML Source page editor
- public static final String HTML_SOURCEVIEW_HELPID = PREFIX + "ehtm0000"; //$NON-NLS-1$
-
- // HTML Files Preference page
- public static final String HTML_PREFWEBX_FILES_HELPID = PREFIX + "webx0030"; //$NON-NLS-1$
- // HTML Source Preference page
- public static final String HTML_PREFWEBX_SOURCE_HELPID = PREFIX + "webx0031"; //$NON-NLS-1$
- // HTML Styles Preference page
- public static final String HTML_PREFWEBX_STYLES_HELPID = PREFIX + "webx0032"; //$NON-NLS-1$
- // HTML Templates Preference page
- public static final String HTML_PREFWEBX_TEMPLATES_HELPID = PREFIX + "webx0033"; //$NON-NLS-1$
-
- // HTML Cleanup dialog
- public static final String CLEANUP_HTML_HELPID = PREFIX + "xmlm1100"; //$NON-NLS-1$
-
- // HTML Content Settings
- public static final String WEB_CONTENT_SETTINGS_HELPID = PREFIX + "misc0170"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/ExternalFileEditorInput.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/ExternalFileEditorInput.java
deleted file mode 100644
index 016d2dcf71..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/ExternalFileEditorInput.java
+++ /dev/null
@@ -1,146 +0,0 @@
-package org.eclipse.wst.html.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.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.
- *
- * @since 3.1
- */
- 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 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 java.lang.Object#hashCode()
- */
- public int hashCode() {
- return fFile.hashCode();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/ExternalFileHyperlink.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/ExternalFileHyperlink.java
deleted file mode 100644
index a37e44f61f..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/ExternalFileHyperlink.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.eclipse.wst.html.ui.internal.hyperlink;
-
-import java.io.File;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.wst.html.ui.internal.Logger;
-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;
-
-/**
- * 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;
- }
-
- /*
- * (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() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void open() {
- if (fHyperlinkFile != null) {
- IEditorInput input = new ExternalFileEditorInput(fHyperlinkFile);
- IEditorDescriptor descriptor;
- try {
- descriptor = IDE.getEditorDescriptor(input.getName());
- 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.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/URIHyperlinkDetector.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/URIHyperlinkDetector.java
deleted file mode 100644
index ee2dee83ad..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/URIHyperlinkDetector.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.eclipse.wst.html.ui.internal.hyperlink;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.html.ui.internal.Logger;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.util.StringUtils;
-import org.eclipse.wst.sse.core.internal.util.URIResolver;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceHelper;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-
-/**
- * Detects hyperlinks in tags. Includes detection in DOCTYPE and attribute
- * values. Resolves references to schemas, dtds, href, file, src, etc using the
- * Web Project Resolver.
- *
- */
-public class URIHyperlinkDetector extends XMLHyperlinkDetector {
- // copies of this class exist in:
- // org.eclipse.wst.html.ui.internal.hyperlink
- // org.eclipse.jst.jsp.ui.internal.hyperlink
-
- 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$
-
- protected String getURIString(Node node, IDocument document) {
- if (isXMLHandled(node))
- return super.getURIString(node, document);
-
- String resolvedURI = null;
- if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
- // handle attribute node
- Attr attrNode = (Attr) node;
- String attrValue = attrNode.getValue();
- attrValue = StringUtils.strip(attrValue);
-
- if (attrValue != null && attrValue.length() > 0) {
- // currently using model's URI resolver until a better resolver is
- // extended to common extensible URI resolver
- // future_TODO: should use the new common extensible URI resolver
- // when
- // clients start implementing it
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- if (sModel != null) {
- URIResolver resolver = sModel.getResolver();
- resolvedURI = resolver != null ? resolver.getLocationByURI(attrValue, true) : attrValue;
- }
- }
- catch (Exception e) {
- Logger.logException(e);
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- }
- }
- return resolvedURI;
- }
-
- /**
- * Check if this is an xml-related node (schema location, doctype).
- * @param node
- * @return
- */
- private boolean isXMLHandled(Node node) {
- short nodeType = node.getNodeType();
- if (nodeType == Node.DOCUMENT_TYPE_NODE) {
- return true;
- } else if (nodeType == Node.ATTRIBUTE_NODE) {
- Attr attrNode = (Attr) node;
- String attrName = attrNode.getName();
-
- // handle schemaLocation attribute
- String prefix = DOMNamespaceHelper.getPrefix(attrName);
- String unprefixedName = DOMNamespaceHelper.getUnprefixedName(attrName);
- if ((XMLNS.equals(prefix)) || (XMLNS.equals(unprefixedName))) {
- return true;
- } else if ((XSI_NAMESPACE_URI.equals(DOMNamespaceHelper.getNamespaceURI(attrNode))) && (SCHEMA_LOCATION.equals(unprefixedName))) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/WorkspaceFileHyperlink.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/WorkspaceFileHyperlink.java
deleted file mode 100644
index 8ee3ac1db0..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/WorkspaceFileHyperlink.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package org.eclipse.wst.html.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.html.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() {
- // TODO Auto-generated method stub
- return null;
- }
-
- 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.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java
deleted file mode 100644
index e6e9bcebfc..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java
+++ /dev/null
@@ -1,472 +0,0 @@
-package org.eclipse.wst.html.ui.internal.hyperlink;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-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.IHyperlink;
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.URLHyperlink;
-import org.eclipse.wst.common.uriresolver.URIResolverPlugin;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.util.StringUtils;
-import org.eclipse.wst.xml.core.document.IDOMAttr;
-import org.eclipse.wst.xml.core.document.IDOMNode;
-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.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceHelper;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-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;
-
-/**
- * Detects hyperlinks in XML tags. Includes detection in DOCTYPE and attribute
- * values. Resolves references to schemas, dtds, etc using the Common URI
- * Resolver.
- *
- */
-class XMLHyperlinkDetector implements IHyperlinkDetector {
- // 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 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$
- private final String HTTP_PROTOCOL = "http://";//$NON-NLS-1$
-
- 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 (!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]);
- }
-
- /**
- * 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 (uriString != null) {
- String temp = uriString.toLowerCase();
- if (temp.startsWith(HTTP_PROTOCOL)) {
- // this is a URLHyperlink since this is a web address
- link = new URLHyperlink(hyperlinkRegion, uriString);
- }
- else {
- // try to locate the file in the workspace
- IFile file = getFile(uriString);
- if (file != null && file.exists()) {
- // 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
- File externalFile = new File(uriString);
- link = new ExternalFileHyperlink(hyperlinkRegion, externalFile);
- }
- }
- }
-
- return link;
- }
-
- 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();
- int regLength = att.getValueRegion().getTextLength();
- String attValue = att.getValueRegionText();
- if (StringUtils.isQuoted(attValue)) {
- regOffset = ++regOffset;
- regLength = regLength - 2;
- }
- hyperRegion = new Region(regOffset, regLength);
- }
- }
- return hyperRegion;
- }
-
- /**
- * Returns the URI string
- *
- * @param node -
- * assumes not null
- */
- protected 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;
- baseLoc = getBaseLocation(document);
- String attrName = attrNode.getName();
- String attrValue = attrNode.getValue();
- attrValue = StringUtils.strip(attrValue);
-
- // 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);
- }
- 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 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) {
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(fileString));
- for (int i = 0; i < files.length && file == null; i++)
- if (files[i].exists())
- file = files[i];
- }
-
- return file;
- }
-
- /**
- * 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) {
- CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) cmElement.getAttributes().getNamedItem(attrName);
- if ((attrDecl != null) && (attrDecl.getAttrType() != null) && (CMDataType.URI.equals(attrDecl.getAttrType().getDataTypeName()))) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * 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;
- }
-
- /**
- * 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);
- 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;
- }
-
- /**
- * Get the base location from the current model (local file system)
- */
- private String getBaseLocation(IDocument document) {
- String baseLoc = null;
-
- // get the base location from the current model
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- if (sModel != null) {
- IPath location = new Path(sModel.getBaseLocation());
- if (location.toFile().exists()) {
- baseLoc = location.toString();
- }
- else {
- IPath basePath = new Path(sModel.getBaseLocation());
- if(basePath.segmentCount() > 1)
- baseLoc = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath).getLocation().toString();
- else
- baseLoc = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(basePath).toString();
- }
- }
- }
- finally {
- if (sModel != null) {
- sModel.releaseFromRead();
- }
- }
- return baseLoc;
- }
-
- /**
- * Checks whether the given uriString is really pointing to a file
- *
- * @param uriString
- * @return boolean
- */
- private boolean isValidURI(String uriString) {
- boolean isValid = false;
-
- if (uriString != null) {
- // first do a quick check to see if this is some sort of http://
- String tempString = uriString.toLowerCase();
- if (tempString.startsWith(HTTP_PROTOCOL))
- isValid = true;
- else {
- File file = new File(uriString);
- try {
- URI uri = new URI(uriString);
- file = new File(uri);
- }
- catch (URISyntaxException e) {
- // it is okay that a uri could not be created out of
- // uriString
- }
- catch (IllegalArgumentException e) {
- // it is okay that file could not be created out of uri
- }
- isValid = file.exists();
- }
- }
- 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);
- }
-
- /**
- * 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;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java
deleted file mode 100644
index e2969c3fcc..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.wst.html.ui.internal.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.style.IStyleConstantsHTML;
-import org.eclipse.wst.sse.ui.preferences.ui.ColorHelper;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-/**
- * Sets default values for HTML UI preferences
- */
-public class HTMLUIPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = HTMLUIPlugin.getDefault().getPreferenceStore();
-
- store.setDefault(HTMLUIPreferenceNames.AUTO_PROPOSE, true);
- store.setDefault(HTMLUIPreferenceNames.AUTO_PROPOSE_CODE, "<");//$NON-NLS-1$
-
- // HTML Style Preferences
- String NOBACKGROUNDBOLD = " | null | false"; //$NON-NLS-1$
- String styleValue = ColorHelper.getColorString(127, 0, 127) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.TAG_ATTRIBUTE_NAME, styleValue);
-
- styleValue = ColorHelper.getColorString(42, 0, 255) + NOBACKGROUNDBOLD;
- 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.getColorString(63, 95, 191) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.COMMENT_BORDER, styleValue);
- store.setDefault(IStyleConstantsXML.COMMENT_TEXT, styleValue);
-
- styleValue = ColorHelper.getColorString(0, 128, 128) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.DECL_BORDER, styleValue);
-
- styleValue = ColorHelper.getColorString(0, 0, 128) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.DOCTYPE_NAME, styleValue);
- store.setDefault(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF, styleValue);
-
- styleValue = ColorHelper.getColorString(128, 128, 128) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, styleValue);
-
- styleValue = ColorHelper.getColorString(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.getColorString(0, 128, 128) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.TAG_BORDER, styleValue);
-
- styleValue = ColorHelper.getColorString(63, 127, 127) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.TAG_NAME, styleValue);
-
- styleValue = ColorHelper.getColorString(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.getColorString(0, 128, 128) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.CDATA_BORDER, styleValue);
-
- styleValue = ColorHelper.getColorString(0, 0, 0) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.CDATA_TEXT, styleValue);
-
- styleValue = ColorHelper.getColorString(191, 95, 63) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsHTML.SCRIPT_AREA_BORDER, styleValue);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceNames.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceNames.java
deleted file mode 100644
index f02070f1b8..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceNames.java
+++ /dev/null
@@ -1,55 +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.html.ui.internal.preferences;
-
-/**
- * Preference keys for HTML UI
- */
-public class HTMLUIPreferenceNames {
- /**
- * 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$
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLColorPage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLColorPage.java
deleted file mode 100644
index 26079187f7..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLColorPage.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.preferences.ui;
-
-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.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.html.core.contenttype.ContentTypeIdForHTML;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.core.IModelManager;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-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.preferences.ui.StyledTextColorPicker;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLColorPage;
-
-public class HTMLColorPage extends XMLColorPage {
-
- /**
- * 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;
- }
-
- public String getSampleText() {
- return HTMLUIMessages.Sample_HTML_doc;
-
- }
-
- protected void initContextStyleMap(Dictionary contextStyleMap) {
-
- initCommonContextStyleMap(contextStyleMap);
- initDocTypeContextStyleMap(contextStyleMap);
- // FIXME: these were "brute forced" commented out when moving XMLJSPRegionContexts
- // effect is unknown, but thought just to effect preference page
- //contextStyleMap.put(XMLJSPRegionContexts.JSP_DIRECTIVE_NAME, IStyleConstantsXML.TAG_NAME);
- //contextStyleMap.put(XMLJSPRegionContexts.JSP_COMMENT_OPEN, IStyleConstantsXML.COMMENT_BORDER);
- //contextStyleMap.put(XMLJSPRegionContexts.JSP_COMMENT_TEXT, IStyleConstantsXML.COMMENT_TEXT);
- //contextStyleMap.put(XMLJSPRegionContexts.JSP_COMMENT_CLOSE, IStyleConstantsXML.COMMENT_BORDER);
- }
-
- protected void initDescriptions(Dictionary descriptions) {
-
- initCommonDescriptions(descriptions);
- initDocTypeDescriptions(descriptions);
- }
-
- protected void initStyleList(ArrayList list) {
- initCommonStyleList(list);
- initDocTypeStyleList(list);
- // list.add(HTMLColorManager.SCRIPT_AREA_BORDER);
-
- }
-
- protected void setupPicker(StyledTextColorPicker picker) {
- IModelManager mmanager = StructuredModelManager.getModelManager();
- picker.setParser(mmanager.createStructuredDocumentFor(ContentTypeIdForHTML.ContentTypeID_HTML).getParser());
-
- // create descriptions for hilighting types
- Dictionary descriptions = new Hashtable();
- initDescriptions(descriptions);
-
- // map region types to hilighting types
- Dictionary contextStyleMap = new Hashtable();
- initContextStyleMap(contextStyleMap);
-
- ArrayList styleList = new ArrayList();
- initStyleList(styleList);
-
- picker.setContextStyleMap(contextStyleMap);
- picker.setDescriptions(descriptions);
- picker.setStyleList(styleList);
-
- // updatePickerFont(picker);
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Control c = super.createContents(parent);
- WorkbenchHelp.setHelp(c, IHelpContextIds.HTML_PREFWEBX_STYLES_HELPID);
- return c;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return HTMLUIPlugin.getDefault().getPreferenceStore();
- }
- /* (non-Javadoc)
- * @see org.eclipse.wst.sse.ui.preferences.ui.AbstractColorPage#savePreferences()
- */
- protected void savePreferences() {
- HTMLUIPlugin.getDefault().savePluginPreferences();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLFilesPreferencePage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLFilesPreferencePage.java
deleted file mode 100644
index 19b12fa57a..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLFilesPreferencePage.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.preferences.ui;
-
-import org.eclipse.core.runtime.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.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.html.core.HTMLFilesPreferenceNames;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.xml.ui.internal.preferences.EncodingSettings;
-import org.eclipse.wst.xml.ui.internal.preferences.WorkbenchDefaultEncodingSettings;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage;
-
-public class HTMLFilesPreferencePage extends XMLFilesPreferencePage {
- private WorkbenchDefaultEncodingSettings fInputEncodingSettings = null;
- private Text fHtmlext_Field;
- private Button fDoctype_Button;
- private Button fGenerator_Button;
-
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.preferences.ui.AbstractPreferencePage#getModelPreferences()
- */
- protected Preferences getModelPreferences() {
- return HTMLCorePlugin.getDefault().getPluginPreferences();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return HTMLUIPlugin.getDefault().getPreferenceStore();
- }
-
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.xml.preferences.ui.XMLFilesPreferencePage#doSavePreferenceStore()
- */
- protected void doSavePreferenceStore() {
- HTMLCorePlugin.getDefault().savePluginPreferences(); // model
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Composite scrolledComposite = createScrolledComposite(parent);
- createContentsForCreatingOrSavingGroup(scrolledComposite);
- createContentsForCreatingGroup(scrolledComposite);
- createContentsForLoadingGroup(scrolledComposite);
-
- WorkbenchHelp.setHelp(scrolledComposite, IHelpContextIds.HTML_PREFWEBX_FILES_HELPID);
-
- setSize(scrolledComposite);
- loadPreferences();
-
- return scrolledComposite;
- }
-
- protected void createContentsForLoadingGroup(Composite parent) {
- Group group = createGroup(parent, 1);
- group.setText(HTMLUIMessages.HTMLFilesPreferencePage_0);
-
- fInputEncodingSettings = new WorkbenchDefaultEncodingSettings(group);
- }
-
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.preferences.ui.AbstractPreferencePage#initializeValues()
- */
- protected void initializeValues() {
- super.initializeValues();
- initializeValuesForLoadingGroup();
- }
-
- protected void initializeValuesForLoadingGroup() {
- String encoding = getModelPreferences().getString(CommonEncodingPreferenceNames.INPUT_CODESET);
-
- fInputEncodingSettings.setIANATag(encoding);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
- protected void performDefaults() {
- super.performDefaults();
- performDefaultsForLoadingGroup();
- }
-
- protected void performDefaultsForLoadingGroup() {
- String encoding = getModelPreferences().getDefaultString(CommonEncodingPreferenceNames.INPUT_CODESET);
-
- fInputEncodingSettings.setIANATag(encoding);
- }
-
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.preferences.ui.AbstractPreferencePage#storeValues()
- */
- protected void storeValues() {
- super.storeValues();
- storeValuesForLoadingGroup();
- }
-
- protected void storeValuesForLoadingGroup() {
- getModelPreferences().setValue(CommonEncodingPreferenceNames.INPUT_CODESET, fInputEncodingSettings.getIANATag());
- }
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.xml.preferences.ui.XMLFilesPreferencePage#createContentsForCreatingGroup(org.eclipse.swt.widgets.Composite)
- */
- protected void createContentsForCreatingGroup(Composite parent) {
- Group creatingGroup = createGroup(parent, 2);
- creatingGroup.setText(HTMLUIMessages.Creating_files);
-
- // Add this suffix..
- createLabel(creatingGroup, HTMLUIMessages.HTMLFilesPreferencePage_1);
- fHtmlext_Field = createTextField(creatingGroup);
-
- // Encoding..
- Label label = createLabel(creatingGroup, HTMLUIMessages.Encoding_desc);
- ((GridData)label.getLayoutData()).horizontalSpan = 2;
- fEncodingSettings = new EncodingSettings(creatingGroup);
- ((GridData)fEncodingSettings.getLayoutData()).horizontalSpan = 2;
-
- // Insert DOCTYPE declaration
- fDoctype_Button = createCheckBox(creatingGroup, HTMLUIMessages.HTMLFilesPreferencePage_2);
- ((GridData)fDoctype_Button.getLayoutData()).horizontalSpan = 2;
-
- // Insert GENERATOR with META tag
- fGenerator_Button = createCheckBox(creatingGroup, HTMLUIMessages.HTMLFilesPreferencePage_3);
- ((GridData)fGenerator_Button.getLayoutData()).horizontalSpan = 2;
- }
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.xml.preferences.ui.XMLFilesPreferencePage#initializeValuesForCreatingGroup()
- */
- protected void initializeValuesForCreatingGroup() {
- super.initializeValuesForCreatingGroup();
-
- String defaultSuffix = getModelPreferences().getString(HTMLFilesPreferenceNames.DEFAULT_SUFFIX);
- if (defaultSuffix.length() > 0) {
- fHtmlext_Field.setText(defaultSuffix);
- }
-
- boolean bCheck;
- bCheck = getModelPreferences().getBoolean(HTMLFilesPreferenceNames.GENERATE_DOCUMENT_TYPE);
- fDoctype_Button.setSelection(bCheck);
-
- bCheck = getModelPreferences().getBoolean(HTMLFilesPreferenceNames.GENERATE_GENERATOR);
- fGenerator_Button.setSelection(bCheck);
- }
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.xml.preferences.ui.XMLFilesPreferencePage#performDefaultsForCreatingGroup()
- */
- protected void performDefaultsForCreatingGroup() {
- super.performDefaultsForCreatingGroup();
-
- fHtmlext_Field.setText(getModelPreferences().getDefaultString(HTMLFilesPreferenceNames.DEFAULT_SUFFIX));
-
- fDoctype_Button.setSelection(getModelPreferences().getDefaultBoolean(HTMLFilesPreferenceNames.GENERATE_DOCUMENT_TYPE));
- fGenerator_Button.setSelection(getModelPreferences().getDefaultBoolean(HTMLFilesPreferenceNames.GENERATE_GENERATOR));
- }
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.xml.preferences.ui.XMLFilesPreferencePage#storeValuesForCreatingGroup()
- */
- protected void storeValuesForCreatingGroup() {
- super.storeValuesForCreatingGroup();
-
- String str_ext = fHtmlext_Field.getText();
- getModelPreferences().setValue(HTMLFilesPreferenceNames.DEFAULT_SUFFIX, str_ext);
-
- getModelPreferences().setValue(HTMLFilesPreferenceNames.GENERATE_DOCUMENT_TYPE, fDoctype_Button.getSelection());
-
- getModelPreferences().setValue(HTMLFilesPreferenceNames.GENERATE_GENERATOR, fGenerator_Button.getSelection());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java
deleted file mode 100644
index d6d37f9147..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.preferences.ui;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.preference.IPreferenceStore;
-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.help.WorkbenchHelp;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.core.internal.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLSourcePreferencePage;
-
-public class HTMLSourcePreferencePage extends XMLSourcePreferencePage {
-
- protected Button fTagNameAsIs = null;
- protected Button fTagNameUpper = null;
- protected Button fTagNameLower = null;
- protected Button fAttrNameAsIs = null;
- protected Button fAttrNameUpper = null;
- protected Button fAttrNameLower = null;
-
- protected void createContentsForGrammarConstraintsGroup(Composite parent) {
- // do nothing
- }
-
- protected void performDefaultsForGrammarConstraintsGroup() {
- // do nothing
- }
-
- protected void initializeValuesForGrammarConstraintsGroup() {
- // do nothing
- }
-
- protected void storeValuesForGrammarConstraintsGroup() {
- // do nothing
- }
-
- protected void createContentsForContentAssistGroup(Composite parent) {
- super.createContentsForContentAssistGroup(parent);
-
- // add one more group of preferences
- createContentsForPreferredCaseGroup(parent, 2);
- }
-
- protected Composite createContentsForPreferredCaseGroup(Composite parent, int columnSpan) {
- Group caseGroup = createGroup(parent, columnSpan);
- caseGroup.setText(HTMLUIMessages.Preferred_markup_case_UI_);
-
- // d257064 need to associate group w/ radio buttons so radio buttons header can be read
- Group tagNameGroup = createGroup(caseGroup, 1);
- tagNameGroup.setText(HTMLUIMessages.Tag_names__UI_);
- fTagNameUpper = createRadioButton(tagNameGroup, HTMLUIMessages.Tag_names_Upper_case_UI_);
- fTagNameLower = createRadioButton(tagNameGroup, HTMLUIMessages.Tag_names_Lower_case_UI_);
-
- // d257064 need to associate group w/ radio buttons so radio buttons header can be read
- Group attrNameGroup = createGroup(caseGroup, 1);
- attrNameGroup.setText(HTMLUIMessages.Attribute_names__UI_);
- fAttrNameUpper = createRadioButton(attrNameGroup, HTMLUIMessages.Attribute_names_Upper_case_UI_);
- fAttrNameLower = createRadioButton(attrNameGroup, HTMLUIMessages.Attribute_names_Lower_case_UI_);
-
- return parent;
-
- }
-
- protected void performDefaults() {
- fTagNameUpper.setSelection(getModelPreferences().getDefaultInt(CommonModelPreferenceNames.TAG_NAME_CASE) == CommonModelPreferenceNames.UPPER);
- fTagNameLower.setSelection(getModelPreferences().getDefaultInt(CommonModelPreferenceNames.TAG_NAME_CASE) == CommonModelPreferenceNames.LOWER);
- fAttrNameUpper.setSelection(getModelPreferences().getDefaultInt(CommonModelPreferenceNames.ATTR_NAME_CASE) == CommonModelPreferenceNames.UPPER);
- fAttrNameLower.setSelection(getModelPreferences().getDefaultInt(CommonModelPreferenceNames.ATTR_NAME_CASE) == CommonModelPreferenceNames.LOWER);
-
- super.performDefaults();
- }
-
- protected void initializeValues() {
- fTagNameUpper.setSelection(getModelPreferences().getInt(CommonModelPreferenceNames.TAG_NAME_CASE) == CommonModelPreferenceNames.UPPER);
- fTagNameLower.setSelection(getModelPreferences().getInt(CommonModelPreferenceNames.TAG_NAME_CASE) == CommonModelPreferenceNames.LOWER);
- fAttrNameUpper.setSelection(getModelPreferences().getInt(CommonModelPreferenceNames.ATTR_NAME_CASE) == CommonModelPreferenceNames.UPPER);
- fAttrNameLower.setSelection(getModelPreferences().getInt(CommonModelPreferenceNames.ATTR_NAME_CASE) == CommonModelPreferenceNames.LOWER);
-
- super.initializeValues();
- }
-
- protected void storeValues() {
- if (fTagNameUpper.getSelection())
- getModelPreferences().setValue(CommonModelPreferenceNames.TAG_NAME_CASE, CommonModelPreferenceNames.UPPER);
- else
- getModelPreferences().setValue(CommonModelPreferenceNames.TAG_NAME_CASE, CommonModelPreferenceNames.LOWER);
- if (fAttrNameUpper.getSelection())
- getModelPreferences().setValue(CommonModelPreferenceNames.ATTR_NAME_CASE, CommonModelPreferenceNames.UPPER);
- else
- getModelPreferences().setValue(CommonModelPreferenceNames.ATTR_NAME_CASE, CommonModelPreferenceNames.LOWER);
-
- super.storeValues();
- }
-
- public boolean performOk() {
- boolean result = super.performOk();
-
- doSavePreferenceStore();
-
- return result;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.preferences.ui.xml.XMLSourcePreferencePage#getModelPreferences()
- */
- protected Preferences getModelPreferences() {
- return HTMLCorePlugin.getDefault().getPluginPreferences();
- }
-
- protected IPreferenceStore doGetPreferenceStore() {
- return HTMLUIPlugin.getDefault().getPreferenceStore();
- }
-
- protected void doSavePreferenceStore() {
- HTMLUIPlugin.getDefault().savePluginPreferences(); // UI
- HTMLCorePlugin.getDefault().savePluginPreferences(); // model
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Control c = super.createContents(parent);
- WorkbenchHelp.setHelp(c, IHelpContextIds.HTML_PREFWEBX_SOURCE_HELPID);
- return c;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLTemplatePreferencePage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLTemplatePreferencePage.java
deleted file mode 100644
index f495fe9768..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLTemplatePreferencePage.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.preferences.ui;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-
-
-/**
- * Preference page for HTML templates
- */
-public class HTMLTemplatePreferencePage extends TemplatePreferencePage {
-
- public HTMLTemplatePreferencePage() {
- HTMLUIPlugin htmlEditorPlugin = HTMLUIPlugin.getDefault();
-
- setPreferenceStore(htmlEditorPlugin.getPreferenceStore());
- setTemplateStore(htmlEditorPlugin.getTemplateStore());
- setContextTypeRegistry(htmlEditorPlugin.getTemplateContextRegistry());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- boolean ok = super.performOk();
- HTMLUIPlugin.getDefault().savePluginPreferences();
- return ok;
- }
-
- /* (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.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite ancestor) {
- Control c = super.createContents(ancestor);
- WorkbenchHelp.setHelp(c, IHelpContextIds.HTML_PREFWEBX_TEMPLATES_HELPID);
- return c;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java
deleted file mode 100644
index 06d9384092..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java
+++ /dev/null
@@ -1,97 +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.html.ui.internal.projection;
-
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.wst.html.core.HTML40Namespace;
-import org.eclipse.wst.sse.core.AbstractAdapterFactory;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.w3c.dom.Node;
-
-public class ProjectionModelNodeAdapterFactoryHTML extends AbstractAdapterFactory {
- // copies of this class located in:
- // org.eclipse.wst.html.ui.internal.projection
- // org.eclipse.jst.jsp.ui.internal.projection
-
- private ProjectionViewer fProjectionViewer;
-
- public ProjectionModelNodeAdapterFactoryHTML() {
- adapterKey = ProjectionModelNodeAdapterHTML.class;
- }
-
- /**
- * Actually creates an adapter for the parent of target if target is the
- * "adapt-able" node
- */
- protected INodeAdapter createAdapter(INodeNotifier target) {
- if ((fProjectionViewer != null) && (target instanceof Node) && ((Node) target).getNodeType() == Node.ELEMENT_NODE) {
- Node node = (Node) target;
- if (isNodeProjectable(node)) {
-
- // actually work with the parent node to listen for add,
- // delete events
- Node parent = node.getParentNode();
- if (parent instanceof INodeNotifier) {
- INodeNotifier parentNotifier = (INodeNotifier) parent;
- ProjectionModelNodeAdapterHTML parentAdapter = (ProjectionModelNodeAdapterHTML) parentNotifier.getExistingAdapter(ProjectionModelNodeAdapterHTML.class);
- if (parentAdapter == null) {
- // create a new adapter for parent
- parentAdapter = new ProjectionModelNodeAdapterHTML(this);
- parentNotifier.addAdapter(parentAdapter);
- }
- // call update on parent because a new node has just been
- // added
- parentAdapter.updateAdapter(parent);
- }
- }
- }
-
- return null;
- }
-
- ProjectionViewer getProjectionViewer() {
- return fProjectionViewer;
- }
-
- /**
- * Returns true if node is a node type able to fold
- *
- * @param node
- * @return boolean true if node is projectable, false otherwise
- */
- boolean isNodeProjectable(Node node) {
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- String tagName = node.getNodeName();
- // node is only projectable if it is head, body, script, style,
- // table tags
- if (HTML40Namespace.ElementName.HEAD.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.BODY.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.SCRIPT.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.STYLE.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.TABLE.equalsIgnoreCase((tagName)))
- return true;
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.core.AbstractAdapterFactory#release()
- */
- public void release() {
- fProjectionViewer = null;
-
- super.release();
- }
-
- void setProjectionViewer(ProjectionViewer viewer) {
- fProjectionViewer = viewer;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterHTML.java
deleted file mode 100644
index 1da7249f93..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterHTML.java
+++ /dev/null
@@ -1,263 +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.html.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.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.Position;
-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.GC;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.html.ui.internal.Logger;
-import org.w3c.dom.Node;
-
-/**
- * Updates projection annotation model with projection annotations for this
- * adapter node's children
- */
-public class ProjectionModelNodeAdapterHTML implements INodeAdapter {
-
- 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 need the styledtext line height
- int lineHeight = fAdapterFactory.getProjectionViewer().getTextWidget().getLineHeight();
-
- // do not draw annotations that only span one line and mark
- // them as not visible
- if ((rectangle.height / lineHeight) <= 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();
- }
- }
-
- // copies of this class located in:
- // org.eclipse.wst.html.ui.internal.projection
- // org.eclipse.jst.jsp.ui.internal.projection
- private final static boolean debugProjectionPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.html.ui/projectionperf")); //$NON-NLS-1$ //$NON-NLS-2$
-
- ProjectionModelNodeAdapterFactoryHTML fAdapterFactory;
- private Map fTagAnnotations = new HashMap();
-
- public ProjectionModelNodeAdapterHTML(ProjectionModelNodeAdapterFactoryHTML 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 (fAdapterFactory.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) {
- try {
-// // region-based
-// // extra line when collapsed, but no region increase when add newline
-// pos = new Position(start, end - start);
-
-// // 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 == ProjectionModelNodeAdapterHTML.class;
- }
-
- 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.getProjectionViewer() == null) {
- 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) {
- 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]);
- }
- ProjectionViewer viewer = fAdapterFactory.getProjectionViewer();
- ProjectionAnnotationModel annotationModel = viewer.getProjectionAnnotationModel();
- annotationModel.modifyAnnotations(oldList, additions, modifyList);
- }
-
- // save new list of annotations
- fTagAnnotations = additions;
-
- long end = System.currentTimeMillis();
- if (debugProjectionPerf) {
- String nodeName = node != null ? node.getNodeName() : "null"; //$NON-NLS-1$
- System.out.println("ProjectionModelNodeAdapterHTML.updateAdapter (" + nodeName + "):" + (end - start)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java
deleted file mode 100644
index effbba8b5f..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java
+++ /dev/null
@@ -1,216 +0,0 @@
-package org.eclipse.wst.html.ui.internal.projection;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.projection.IProjectionListener;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.IndexedRegion;
-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.ui.internal.projection.IStructuredTextFoldingProvider;
-import org.eclipse.wst.xml.core.document.IDOMModel;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- * Updates the projection model of a structured model for HTML.
- */
-public class StructuredTextFoldingProviderHTML implements IStructuredTextFoldingProvider, IProjectionListener {
- private final static boolean debugProjectionPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.html.ui/projectionperf")); //$NON-NLS-1$ //$NON-NLS-2$
-
- private IDocument fDocument;
- private ProjectionViewer fViewer;
-
- /**
- * Adds an adapter to node and its children
- *
- * @param node
- * @param level
- */
- private void addAdapterToNodeAndChildren(Node node, int level) {
- if (node instanceof INodeNotifier) {
- INodeNotifier notifier = (INodeNotifier) node;
-
- // try and get the adapter for the current node and update the
- // adapter with projection information
- ProjectionModelNodeAdapterHTML adapter = (ProjectionModelNodeAdapterHTML) notifier.getExistingAdapter(ProjectionModelNodeAdapterHTML.class);
- if (adapter != null) {
- adapter.updateAdapter(node);
- }
- else {
- // just call getadapter so the adapter is created and
- // automatically initialized
- notifier.getAdapterFor(ProjectionModelNodeAdapterHTML.class);
- }
-
- Node nextChild = node.getFirstChild();
- while (nextChild != null) {
- Node childNode = nextChild;
- nextChild = childNode.getNextSibling();
-
- addAdapterToNodeAndChildren(childNode, level + 1);
- }
- }
- }
-
- /**
- * Goes through every node and adds an adapter onto each for tracking
- * purposes
- */
- private void addAllAdapters() {
- long start = System.currentTimeMillis();
-
- 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 level = 0;
- Node nextSibling = (Node) startNode;
- while (nextSibling != null) {
- Node currentNode = nextSibling;
- nextSibling = currentNode.getNextSibling();
-
- addAdapterToNodeAndChildren(currentNode, level);
- }
- }
- }
- }
- finally {
- if (sModel != null) {
- sModel.releaseFromRead();
- }
- }
-
- long end = System.currentTimeMillis();
- if (debugProjectionPerf)
- System.out.println("StructuredTextFoldingProviderHTML.addAllAdapters: " + (end - start)); //$NON-NLS-1$
- }
-
- /**
- * Get the ProjectionModelNodeAdapterFactoryHTML to use with this
- * provider.
- *
- * @return ProjectionModelNodeAdapterFactoryHTML
- */
- private ProjectionModelNodeAdapterFactoryHTML getAdapterFactory(boolean createIfNeeded) {
- long start = System.currentTimeMillis();
-
- ProjectionModelNodeAdapterFactoryHTML factory = 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(ProjectionModelNodeAdapterHTML.class) && createIfNeeded) {
- ProjectionModelNodeAdapterFactoryHTML newFactory = new ProjectionModelNodeAdapterFactoryHTML();
-
- // 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 = (ProjectionModelNodeAdapterFactoryHTML) factoryRegistry.getFactoryFor(ProjectionModelNodeAdapterHTML.class);
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
-
- long end = System.currentTimeMillis();
- if (debugProjectionPerf)
- System.out.println("StructuredTextFoldingProviderHTML.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;
-
- // set projection viewer to null on old document's adapter factory
- ProjectionModelNodeAdapterFactoryHTML factory = getAdapterFactory(false);
- if (factory != null) {
- factory.setProjectionViewer(null);
- }
-
- // clear out all annotations
- if (fViewer.getProjectionAnnotationModel() != null)
- fViewer.getProjectionAnnotationModel().removeAllAnnotations();
-
- fDocument = fViewer.getDocument();
-
- if (fDocument != null) {
- // set projection viewer on new document's adapter factory
- factory = getAdapterFactory(true);
- if (factory != null) {
- factory.setProjectionViewer(fViewer);
- }
-
- addAllAdapters();
- }
- }
-
- /**
- * Associate a ProjectionViewer with this IStructuredTextFoldingProvider
- *
- * @param viewer
- */
- public void install(ProjectionViewer viewer) {
- // uninstall before trying to install new viewer
- if (isInstalled()) {
- uninstall();
- }
- fViewer = viewer;
- fViewer.addProjectionListener(this);
- }
-
- private boolean isInstalled() {
- return fViewer != null;
- }
-
- public void projectionDisabled() {
- ProjectionModelNodeAdapterFactoryHTML factory = getAdapterFactory(false);
- if (factory != null) {
- factory.setProjectionViewer(null);
- }
-
- fDocument = null;
- }
-
- public void projectionEnabled() {
- initialize();
- }
-
- /**
- * Disconnect this IStructuredTextFoldingProvider from projection viewer
- */
- public void uninstall() {
- if (isInstalled()) {
- projectionDisabled();
-
- fViewer.removeProjectionListener(this);
- fViewer = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/registry/AdapterFactoryProviderForEmbeddedHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/registry/AdapterFactoryProviderForEmbeddedHTML.java
deleted file mode 100644
index 56926a3e70..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/registry/AdapterFactoryProviderForEmbeddedHTML.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.registry;
-
-import org.eclipse.wst.html.core.internal.modelhandler.EmbeddedHTML;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler;
-import org.eclipse.wst.sse.ui.registry.embedded.EmbeddedAdapterFactoryProvider;
-
-public class AdapterFactoryProviderForEmbeddedHTML implements EmbeddedAdapterFactoryProvider {
-
- /*
- * @see AdapterFactoryProvider#addAdapterFactories(IStructuredModel)
- */
- public void addAdapterFactories(IStructuredModel structuredModel) {
- // if (structuredModel instanceof XMLModel) {
- // XMLDocument doc = ((XMLModel) structuredModel).getDocument();
- // }
- }
-
- /*
- * @see AdapterFactoryProvider#isFor(ContentTypeDescription)
- */
- public boolean isFor(EmbeddedTypeHandler contentTypeDescription) {
- return (contentTypeDescription instanceof EmbeddedHTML);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/registry/AdapterFactoryProviderForHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/registry/AdapterFactoryProviderForHTML.java
deleted file mode 100644
index 97c7bb69e6..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/registry/AdapterFactoryProviderForHTML.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.registry;
-
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.wst.html.core.internal.modelhandler.ModelHandlerForHTML;
-import org.eclipse.wst.html.ui.internal.contentoutline.JFaceNodeAdapterFactoryForHTML;
-import org.eclipse.wst.sse.core.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IDocumentTypeHandler;
-import org.eclipse.wst.sse.core.internal.model.FactoryRegistry;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.sse.ui.registry.AdapterFactoryProvider;
-import org.eclipse.wst.sse.ui.util.Assert;
-import org.eclipse.wst.xml.core.document.IDOMModel;
-import org.eclipse.wst.xml.ui.internal.properties.XMLPropertySourceAdapterFactory;
-
-/**
- *
- */
-public class AdapterFactoryProviderForHTML implements AdapterFactoryProvider {
-
- /*
- * @see AdapterFactoryProvider#addAdapterFactories(IStructuredModel)
- */
- public void addAdapterFactories(IStructuredModel structuredModel) {
-
- // these are the normal edit side content based factories
- addContentBasedFactories(structuredModel);
- // ===
- // Must update/add to propagating adapter here too
- if (structuredModel instanceof IDOMModel) {
- addPropagatingAdapters(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;
- // == this list came from the previous "HTML only" list
- // factory = factoryRegistry.getFactoryFor(ContentAssistAdapter.class);
-
- // Doc Partion change: no more adapter factories for edit side functions
-
- // if (factory == null) {
- // factory = new HTMLContentAssistAdapterFactory();
- // factoryRegistry.addFactory(factory);
- // }
-
- // factory = factoryRegistry.getFactoryFor(DoubleClickAdapter.class);
- // if (factory == null) {
- // factory = new DoubleClickAdapterFactory(DoubleClickAdapter.class, true);
- // factoryRegistry.addFactory(factory);
- // }
- // // == New adapter factories for tagInfo
- // factory = factoryRegistry.getFactoryFor(HoverHelpAdapter.class);
- // if (factory == null) {
- // factory = new HTMLHoverHelpAdapterFactory(HoverHelpAdapter.class, true);
- // factoryRegistry.addFactory(factory);
- // }
- // factory = factoryRegistry.getFactoryFor(TagInfoProviderAdapter.class);
- // if (factory == null) {
- // factory = new JSTagInfoProviderAdapterFactory(TagInfoProviderAdapter.class, true);
- // factoryRegistry.addFactory(factory);
- // }
- // ==
- // == this list came from the previous 'for both XML and HTML' list
- factory = factoryRegistry.getFactoryFor(IPropertySource.class);
- if (factory == null) {
- factory = new XMLPropertySourceAdapterFactory();
- factoryRegistry.addFactory(factory);
- }
- factory = factoryRegistry.getFactoryFor(IJFaceNodeAdapter.class);
- if (factory == null) {
- factory = new JFaceNodeAdapterFactoryForHTML();
- factoryRegistry.addFactory(factory);
- }
- // factory = factoryRegistry.getFactoryFor(com.ibm.sed.edit.adapters.LineStyleProvider.class);
- // if (factory == null) {
- // factory = new LineStyleProviderFactoryForHTML();
- // factoryRegistry.addFactory(factory);
- // }
-
- // factory = factoryRegistry.getFactoryFor(ReconcilerAdapter.class);
- // if (factory == null) {
- // // can't use Propagating system since the Node tree is already built by now
- // ReconcilerAdapterFactoryForXML reconcilerFactory = new ReconcilerAdapterFactoryForXML();
- // factoryRegistry.addFactory(reconcilerFactory);
- // reconcilerFactory.adaptAll((XMLModel) structuredModel);
- // }
- }
-
- protected void addPropagatingAdapters(IStructuredModel structuredModel) {
-// XMLModel xmlModel = (XMLModel) structuredModel;
-// XMLDocument document = xmlModel.getDocument();
-// PropagatingAdapter propagatingAdapter = (PropagatingAdapter) document.getAdapterFor(PropagatingAdapter.class);
-// if (propagatingAdapter != null) {
- // no longer needs?
- // factory = new HTMLLineStyeUpdaterFactory();
- // propagatingAdapter.addAdaptOnCreateFactory(factory);
- // propagatingAdapter.initializeForFactory(factory, document);
-
- // checking if we should bother adding this factory
- // if the preference says not to check validity, we don't bother creating this factory
- // to improve performance...
- //if(structuredModel.getStructuredPreferenceStore().getPreferenceString(CommonPreferenceNames.EDITOR_VALIDATION_METHOD).equals(CommonPreferenceNames.EDITOR_VALIDATION_CONTENT_MODEL)) {
- //factory = new ReconcilerAdapterFactoryForXML();
- //propagatingAdapter.addAdaptOnCreateFactory(factory);
- // (pa) perf:
- //propagatingAdapter.initializeForFactory(factory, xmlModel.getDocument());
- //}
-
-// }
- }
-
- /*
- * @see AdapterFactoryProvider#isFor(ContentTypeDescription)
- */
- public boolean isFor(IDocumentTypeHandler contentTypeDescription) {
- return (contentTypeDescription instanceof ModelHandlerForHTML);
- }
-
- public void reinitializeFactories(IStructuredModel structuredModel) {
- // nothing to do, since no embedded type
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/search/HTMLFindOccurrencesAction.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/search/HTMLFindOccurrencesAction.java
deleted file mode 100644
index 079359a679..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/search/HTMLFindOccurrencesAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.search;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.html.core.text.IHTMLPartitionTypes;
-import org.eclipse.wst.sse.ui.internal.search.BasicFindOccurrencesAction;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.core.text.IXMLPartitions;
-
-
-/**
- * Configures a BasicFindOccurrencesAction with HTML partitions and regions
- *
- * @author pavery
- */
-public class HTMLFindOccurrencesAction extends BasicFindOccurrencesAction {
-
- public HTMLFindOccurrencesAction(ResourceBundle bundle, String prefix, ITextEditor editor) {
- super(bundle, prefix, editor);
- }
-
- /**
- * @see com.ibm.sse.editor.internal.search.BasicFindOccurrencesAction#getPartitionTypes()
- */
- public String[] getPartitionTypes() {
-
- return new String[]{IHTMLPartitionTypes.HTML_DEFAULT, IXMLPartitions.XML_DEFAULT};
- }
-
- /**
- * @see com.ibm.sse.editor.internal.search.BasicFindOccurrencesAction#getRegionTypes()
- */
- public String[] getRegionTypes() {
-
- return new String[]{DOMRegionContext.XML_TAG_NAME, DOMRegionContext.XML_TAG_ATTRIBUTE_NAME, DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE};
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/IStyleConstantsHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/IStyleConstantsHTML.java
deleted file mode 100644
index 5c7c88decc..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/IStyleConstantsHTML.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.style;
-
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-/**
- * Contains the symbolic name of styles used by LineStyleProvider, ColorManager, and
- * any others who may be interested
- */
-public interface IStyleConstantsHTML extends IStyleConstantsXML {
- public static final String SCRIPT_AREA_BORDER = "SCRIPT_AREA_BORDER";//$NON-NLS-1$
- public static final String SCRIPT_AREA = "SCRIPT_AREA";//$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/LineStyleProviderForHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/LineStyleProviderForHTML.java
deleted file mode 100644
index 56f71f96d5..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/LineStyleProviderForHTML.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.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.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.ui.style.LineStyleProvider;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-import org.eclipse.wst.xml.ui.internal.style.LineStyleProviderForXML;
-
-public class LineStyleProviderForHTML extends LineStyleProviderForXML implements LineStyleProvider {
-
- public LineStyleProviderForHTML() {
- super();
- }
-
- /**
- * a method to centralize all the "format rules" for regions
- * specifically associated for how to "open" the region.
- */
- // NOTE: this method was just copied down form LineStyleProviderForXML
- public TextAttribute getAttributeFor(ITextRegion region) {
- // not sure why this is coming through null, but just to catch it
- if (region == null) {
- return (TextAttribute)getTextAttributes().get(IStyleConstantsXML.XML_CONTENT);
- }
- if (region.getType() == DOMRegionContext.BLOCK_TEXT) {
- return (TextAttribute)getTextAttributes().get(IStyleConstantsXML.XML_CONTENT);
- }
- // first try "standard" tag attributes from super class
- return super.getAttributeFor(region);
- }
-
- protected void loadColors() {
- super.loadColors();
-
- addTextAttribute(IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- }
-
-
- protected void handlePropertyChange(PropertyChangeEvent event) {
- if (event != null) {
- String prefKey = event.getProperty();
- // check if preference changed is a style preference
- if (IStyleConstantsHTML.SCRIPT_AREA_BORDER.equals(prefKey)) {
- addTextAttribute(IStyleConstantsHTML.SCRIPT_AREA_BORDER);
-
- // this is what AbstractLineStyleProvider.propertyChange() does
- getHighlighter().refreshDisplay();
- } else {
- super.handlePropertyChange(event);
- }
- } else {
- super.handlePropertyChange(event);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.wst.sse.ui.style.AbstractLineStyleProvider#getColorPreferences()
- */
- protected IPreferenceStore getColorPreferences() {
- return HTMLUIPlugin.getDefault().getPreferenceStore();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLBestMatchHoverProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLBestMatchHoverProcessor.java
deleted file mode 100644
index 644966b1b9..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLBestMatchHoverProcessor.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.taginfo;
-
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.wst.sse.ui.taginfo.AbstractBestMatchHoverProcessor;
-
-/**
- * Provides the best html hover help documentation (by using other hover help processors)
- * Priority of hover help processors is:
- * ProblemHoverProcessor, HTMLTagInfoHoverProcessor, AnnotationHoverProcessor
- */
-public class HTMLBestMatchHoverProcessor extends AbstractBestMatchHoverProcessor {
- HTMLTagInfoHoverProcessor fTagInfoHover;
-
- /* (non-Javadoc)
- * @see com.ibm.sse.editor.structured.taginfo.AbstractBestMatchHoverProcessor#getTagInfoHover()
- */
- protected ITextHover getTagInfoHover() {
- if (fTagInfoHover == null) {
- fTagInfoHover = new HTMLTagInfoHoverProcessor();
- }
- return fTagInfoHover;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.java
deleted file mode 100644
index 26ecebfed4..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.taginfo;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.information.IInformationProvider;
-import org.eclipse.jface.text.information.IInformationProviderExtension;
-
-/**
- * Provides context information for HTML tags (Shows tooltip description)
- *
- * @author amywu
- */
-public class HTMLInformationProvider implements IInformationProvider, IInformationProviderExtension {
-
- private HTMLBestMatchHoverProcessor fTextHover = null;
-
- public HTMLInformationProvider() {
- fTextHover = new HTMLBestMatchHoverProcessor();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.information.IInformationProvider#getSubject(org.eclipse.jface.text.ITextViewer, int)
- */
- public IRegion getSubject(ITextViewer textViewer, int offset) {
- return fTextHover.getHoverRegion(textViewer, offset);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.information.IInformationProvider#getInformation(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
- */
- 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);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLTagInfoHoverProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLTagInfoHoverProcessor.java
deleted file mode 100644
index b8f7103d94..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLTagInfoHoverProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.taginfo;
-
-
-
-import org.eclipse.wst.xml.ui.internal.taginfo.XMLTagInfoHoverProcessor;
-
-/**
- * Provides hover help documentation for HTML tags
- *
- * @author amywu
- */
-public class HTMLTagInfoHoverProcessor extends XMLTagInfoHoverProcessor {
- // currently empty because XMLTagInfoHoverProcessor handles all cases relevant to HTML
- public HTMLTagInfoHoverProcessor() {
- super();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/EncodingTemplateVariableResolverHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/EncodingTemplateVariableResolverHTML.java
deleted file mode 100644
index aca7d175e7..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/EncodingTemplateVariableResolverHTML.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.html.ui.internal.templates;
-
-import org.eclipse.jface.text.templates.SimpleTemplateVariableResolver;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-
-
-public class EncodingTemplateVariableResolverHTML extends SimpleTemplateVariableResolver {
- private static final String ENCODING_TYPE = getEncodingType();
-
- private static String getEncodingType() {
- return "encoding"; //$NON-NLS-1$
- }
-
- /**
- * Creates a new encoding variable
- */
- public EncodingTemplateVariableResolverHTML() {
- super(ENCODING_TYPE, HTMLUIMessages.Creating_files_encoding);
- }
-
- protected String resolve(TemplateContext context) {
- return HTMLCorePlugin.getDefault().getPluginPreferences().getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/TemplateContextTypeHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/TemplateContextTypeHTML.java
deleted file mode 100644
index bf775f4ce4..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/TemplateContextTypeHTML.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.templates;
-
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-import org.eclipse.jface.text.templates.TemplateContextType;
-
-/**
- * Base class for HTML template context types. Templates of this context type
- * apply to any place within HTML content type.
- */
-public class TemplateContextTypeHTML extends TemplateContextType {
-
- public TemplateContextTypeHTML() {
- 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 EncodingTemplateVariableResolverHTML());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/TemplateContextTypeIdsHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/TemplateContextTypeIdsHTML.java
deleted file mode 100644
index 794b13db36..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/TemplateContextTypeIdsHTML.java
+++ /dev/null
@@ -1,50 +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.html.ui.internal.templates;
-
-
-public class TemplateContextTypeIdsHTML {
-
- 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 getTag() {
- return getPrefix() + "_tag"; //$NON-NLS-1$
- }
-
- private static String getPrefix() {
- return "html"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/HTMLDocumentRegionEdgeMatcher.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/HTMLDocumentRegionEdgeMatcher.java
deleted file mode 100644
index c58a457adb..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/HTMLDocumentRegionEdgeMatcher.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.text;
-
-import org.eclipse.jdt.internal.ui.text.JavaPairMatcher;
-import org.eclipse.wst.sse.ui.text.DocumentRegionEdgeMatcher;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-public class HTMLDocumentRegionEdgeMatcher extends DocumentRegionEdgeMatcher {
-
- protected final static char[] BRACKETS = {'{', '}', '(', ')', '[', ']'};
-
- /**
- * @param validContexts
- * @param nextMatcher
- */
- public HTMLDocumentRegionEdgeMatcher() {
- super(new String[]{DOMRegionContext.XML_TAG_NAME, DOMRegionContext.XML_COMMENT_TEXT, DOMRegionContext.XML_CDATA_TEXT, DOMRegionContext.XML_PI_OPEN, DOMRegionContext.XML_PI_CONTENT}, new JavaPairMatcher(BRACKETS));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/views/contentoutline/HTMLContentOutlineConfiguration.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/views/contentoutline/HTMLContentOutlineConfiguration.java
deleted file mode 100644
index d46aa98aee..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/views/contentoutline/HTMLContentOutlineConfiguration.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.ui.internal.views.contentoutline;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.contentoutline.HTMLNodeActionManager;
-import org.eclipse.wst.xml.ui.internal.contentoutline.XMLNodeActionManager;
-import org.eclipse.wst.xml.ui.internal.views.contentoutline.XMLContentOutlineConfiguration;
-
-public class HTMLContentOutlineConfiguration extends XMLContentOutlineConfiguration {
-
- /**
- * @param editor
- */
- public HTMLContentOutlineConfiguration() {
- super();
- }
-
- /**
- * @see com.ibm.sse.editor.xml.views.contentoutline.XMLContentOutlineConfiguration#createNodeActionManager(org.eclipse.jface.viewers.TreeViewer)
- */
- protected XMLNodeActionManager createNodeActionManager(TreeViewer treeViewer) {
- return new HTMLNodeActionManager(getEditor().getModel(), treeViewer);
- }
- /* (non-Javadoc)
- * @see org.eclipse.wst.sse.ui.views.contentoutline.StructuredContentOutlineConfiguration#getPreferenceStore()
- */
- protected IPreferenceStore getPreferenceStore() {
- return HTMLUIPlugin.getDefault().getPreferenceStore();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLWizard.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLWizard.java
deleted file mode 100644
index 1cbfc3dae3..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLWizard.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.eclipse.wst.html.ui.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.Logger;
-
-public class NewHTMLWizard extends Wizard implements INewWizard {
- static String PAGE_IMAGE = "/icons/full/wizban/newhfile_wiz.gif"; //$NON-NLS-1$
- private WizardNewFileCreationPage fNewFilePage;
- private IStructuredSelection fSelection;
- List fValidExtensions = new ArrayList(Arrays.asList(new String[]{"html", "xhtml"})); //$NON-NLS-1$ //$NON-NLS-2$
-
- public void addPages() {
- fNewFilePage = new WizardNewFileCreationPage("HTMLWizardNewFileCreationPage", new StructuredSelection(IDE.computeSelectedResources(fSelection))) { //$NON-NLS-1$
- protected boolean validatePage() {
- IPath handlePath = new Path(getFileName());
- String extension = handlePath.getFileExtension();
- if (extension == null || !fValidExtensions.contains(extension)) {
- setErrorMessage(HTMLUIMessages._ERROR_FILENAME_MUST_END_HTML);
- return false;
- }
- setErrorMessage(null);
- return super.validatePage();
- }
- };
- fNewFilePage.setTitle(HTMLUIMessages._UI_WIZARD_NEW_HEADING);
- fNewFilePage.setDescription(HTMLUIMessages._UI_WIZARD_NEW_DESCRIPTION);
-
- addPage(fNewFilePage);
- }
-
- public void init(IWorkbench aWorkbench, IStructuredSelection aSelection) {
- fSelection = aSelection;
- setWindowTitle(HTMLUIMessages._UI_WIZARD_NEW_TITLE);
- if (PAGE_IMAGE != null) {
- ImageDescriptor descriptor = HTMLUIPlugin.getDefault().getImageRegistry().getDescriptor(PAGE_IMAGE);
- if (descriptor == null) {
- descriptor = ImageDescriptor.createFromURL(HTMLUIPlugin.getDefault().getBundle().getEntry(PAGE_IMAGE));
- HTMLUIPlugin.getDefault().getImageRegistry().put(PAGE_IMAGE, descriptor);
- }
- setDefaultPageImageDescriptor(descriptor);
- }
- }
-
- private void openEditor(final IFile file) {
- if (file != null) {
- getShell().getDisplay().asyncExec(new Runnable() {
- public void run() {
- try {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IDE.openEditor(page, file, true);
- }
- catch (PartInitException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- });
- }
- }
-
- public boolean performFinish() {
- IFile file = fNewFilePage.createNewFile();
- openEditor(file);
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.properties b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.properties
deleted file mode 100644
index dd1e16d8d8..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Templates.comment.name=comment
-Templates.comment.desc=comment
-Templates.ul.name=ul
-Templates.ul.desc=unordered list
-Templates.ul.content=<ul>\n <li> Item one </li>\n <li> Item two </li>\n</ul>\n
-Templates.dl.name=dl
-Templates.dl.desc=definition list
-Templates.dl.content=<dl>\n <dt> First definition <dd> First explanation\n <dt> Second definition <dd> Second explanation\n</dl>\n
-Templates.table.name=table
-Templates.table.desc=table
-Templates.table.content=<table>\n <tr>\n <th>Column 1 Heading</th>\n <th>Column 2 Heading</th>\n </tr>\n <tr>\n <td>Row 1: Col 1</td>\n <td>Row 1: Col 2</td>\n </tr>\n</table>\n
-Templates.ol.name=ol
-Templates.ol.desc=ordered list
-Templates.ol.content=<ol>\n <li> Item one </li>\n <li> Item two </li>\n</ol>\n
-Templates.html.name=html 4.01 transitional
-Templates.html.desc=html 4.01 transitional
-Templates.html.content=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=${encoding}">\n<title>Insert title here</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.htmlframeset.name=html 4.01 frameset
-Templates.htmlframeset.desc=html 4.01 frameset
-Templates.htmlframeset.content=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=${encoding}">\n<title>Insert title here</title>\n</head>\n<frameset>\n <frame>\n <frame>\n <noframes>\n <body>\n <p>This page uses frames. The current browser you are using does not support frames.</p>\n </body>\n </noframes>\n</frameset>\n</html>
-Templates.xhtml.name=xhtml 1.0 transitional
-Templates.xhtml.desc=xhtml 1.0 transitional
-Templates.xhtml.content=<?xml version="1.0" encoding="${encoding}" ?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />\n<title>Insert title here</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.xhtmlframeset.name=xhtml 1.0 frameset
-Templates.xhtmlframeset.desc=xhtml 1.0 frameset
-Templates.xhtmlframeset.content=<?xml version="1.0" encoding="${encoding}" ?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />\n<title>Insert title here</title>\n</head>\n<frameset>\n <frame />\n <frame />\n <noframes>\n <body>\n <p>This page uses frames. The current browser you are using does not support frames.</p>\n </body>\n </noframes>\n</frameset>\n</html>
-Templates.script.name=script
-Templates.script.desc=script (commented)
-Templates.script.content=<script type=\"${cursor}text/javascript\">\n<!--\n\n//-->\n</script>
-Templates.style.name=style
-Templates.style.desc=style (commented)
-Templates.style.content=<style>\n<!--\n${cursor}\n-->\n</style>
-Templates.imgmap.name=img
-Templates.imgmap.desc=img (map) \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.xml b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.xml
deleted file mode 100644
index 0681bf0f41..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<templates>
-
-<template name="%Templates.comment.name" description="%Templates.comment.desc" id="com.ibm.sse.editor.html.templates.comment" context="html_tag" enabled="true">&lt;!-- ${cursor} --&gt;</template>
-
-<template name="%Templates.imgmap.name" description="%Templates.imgmap.desc" id="com.ibm.sse.editor.html.templates.imgmap" context="html_tag" enabled="true">&lt;img ismap&gt;</template>
-
-<template name="%Templates.ul.name" description="%Templates.ul.desc" id="com.ibm.sse.editor.html.templates.ul" context="html_tag" enabled="true">%Templates.ul.content</template>
-
-<template name="%Templates.dl.name" description="%Templates.dl.desc" id="com.ibm.sse.editor.html.templates.dl" context="html_tag" enabled="true">%Templates.dl.content</template>
-
-<template name="%Templates.table.name" description="%Templates.table.desc" id="com.ibm.sse.editor.html.templates.table" context="html_tag" enabled="true">%Templates.table.content</template>
-
-<template name="%Templates.ol.name" description="%Templates.ol.desc" id="com.ibm.sse.editor.html.templates.ol" context="html_tag" enabled="true">%Templates.ol.content</template>
-
-<template name="%Templates.html.name" description="%Templates.html.desc" id="com.ibm.sse.editor.html.templates.html" context="html_new" enabled="true">%Templates.html.content</template>
-
-<template name="%Templates.htmlframeset.name" description="%Templates.htmlframeset.desc" id="com.ibm.sse.editor.html.templates.htmlframeset" context="html_new" enabled="true">%Templates.htmlframeset.content</template>
-
-<template name="%Templates.xhtml.name" description="%Templates.xhtml.desc" id="com.ibm.sse.editor.html.templates.xhtml" context="html_new" enabled="true">%Templates.xhtml.content</template>
-
-<template name="%Templates.xhtmlframeset.name" description="%Templates.xhtmlframeset.desc" id="com.ibm.sse.editor.html.templates.xhtmlframeset" context="html_new" enabled="true">%Templates.xhtmlframeset.content</template>
-
-<template name="%Templates.script.name" description="%Templates.script.desc" id="com.ibm.sse.editor.html.templates.script" context="html_tag" enabled="true">%Templates.script.content</template>
-
-<template name="%Templates.style.name" description="%Templates.style.desc" id="com.ibm.sse.editor.html.templates.style" context="html_tag" enabled="true">%Templates.style.content</template>
-
-</templates>
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_de.properties b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_de.properties
deleted file mode 100644
index 58df23f7e8..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_de.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Templates.comment.name=Kommentar
-Templates.comment.desc=Kommentar
-Templates.ul.name=ul
-Templates.ul.desc=ul (Schablone)
-Templates.ul.content=<ul>\n <li> Eintrag 1</li>\n <li> Eintrag 2</li>\n</ul>\n
-Templates.dl.name=dl
-Templates.dl.desc=dl (Schablone)
-Templates.dl.content=<dl>\n <dt> Erste Definition <dd> Erste Erl\u00e4uterung\n <dt> Zweite Definition <dd> Zweite Erl\u00e4uterung\n</dl>\n
-Templates.table.name=Tabelle
-Templates.table.desc=Tabelle (Schablone)
-Templates.table.content=<table border>\n <tr>\n <th>Spalte 1 \u00dcberschrift</th>\n <th>Spalte 2 \u00dcberschrift</th>\n </tr>\n <tr>\n <td>Zeile 1: Spalte 1</td>\n <td>Zeile 1: Spalte 2</td>\n </tr>\n</table>\n
-Templates.ol.name=ol
-Templates.ol.desc=ol (Schablone)
-Templates.ol.content=<ol>\n <li> Eintrag 1</li>\n <li> Eintrag 2</li>\n </ol>\n
-Templates.html.name=html
-Templates.html.desc=html (Schablone)
-Templates.html.content=<html>\n<head>\n<title>Hier Titel einf\u00fcgen</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.script.name=Script
-Templates.script.desc=Script (Kommentar)
-Templates.script.content=<script type=\"${cursor}text/javascript\">\n<!--\n\n//-->\n</script>
-Templates.style.name=Darstellung
-Templates.style.desc=Darstellung (Kommentar)
-Templates.style.content=<style>\n<!--\n${Cursor}\n-->\n</style>
-Templates.imgmap.name=img
-Templates.imgmap.desc=img (Abbildung)
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_es.properties b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_es.properties
deleted file mode 100644
index 58a3cd638e..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_es.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Templates.comment.name=comment
-Templates.comment.desc=comment
-Templates.ul.name=ul
-Templates.ul.desc=ul (plantilla)
-Templates.ul.content=<ul>\n <li> Elemento uno </li>\n <li> Elemento dos </li>\n</ul>\n
-Templates.dl.name=dl
-Templates.dl.desc=dl (plantilla)
-Templates.dl.content=<dl>\n <dt> Primera definici\u00f3n <dd> Primera explicaci\u00f3n\n <dt> Segunda definici\u00f3n <dd> Segunda explicaci\u00f3n\n</dl>\n
-Templates.table.name=table
-Templates.table.desc=table (plantilla)
-Templates.table.content=<table border>\n <tr>\n <th>Cabecera de columna 1</th>\n <th>Cabecera de columna 2</th>\n </tr>\n <tr>\n <td>Fila 1: Col 1</td>\n <td>Fila 1: Col 2</td>\n </tr>\n</table>\n
-Templates.ol.name=ol
-Templates.ol.desc=ol (plantilla)
-Templates.ol.content=<ol>\n <li> Elemento uno </li>\n <li> Elemento dos </li>\n</ol>\n
-Templates.html.name=html
-Templates.html.desc=html (plantilla)
-Templates.html.content=<html>\n<head>\n<title>Insertar t\u00edtulo aqu\u00ed</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.script.name=script
-Templates.script.desc=script (comentado)
-Templates.script.content=<script type=\"${cursor}text/javascript\">\n<!--\n\n//-->\n</script>
-Templates.style.name=style
-Templates.style.desc=style (comentado)
-Templates.style.content=<style>\n<!--\n${cursor}\n-->\n</style>
-Templates.imgmap.name=img
-Templates.imgmap.desc=img (mapa)
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_fr.properties b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_fr.properties
deleted file mode 100644
index f5973262b9..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_fr.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Templates.comment.name=commentaire
-Templates.comment.desc=commentaire
-Templates.ul.name=ul
-Templates.ul.desc=ul (mod\u00e8le)
-Templates.ul.content=<ul>\n <li> El\u00e9ment un </li>\n <li> El\u00e9ment deux </li>\n</ul>\n
-Templates.dl.name=dl
-Templates.dl.desc=dl (mod\u00e8le)
-Templates.dl.content=<dl>\n <dt> Premi\u00e8re d\u00e9finition <dd> Premi\u00e8re explication\n <dt> Seconde d\u00e9finition <dd> Seconde explication\n</dl>\n
-Templates.table.name=table
-Templates.table.desc=table (mod\u00e8le)
-Templates.table.content=<table border>\n <tr>\n <th>Colonne 1 En-t\u00eate</th>\n <th>Colonne 2 En-t\u00eate</th>\n </tr>\n <tr>\n <td>Ligne 1 : Col 1</td>\n <td>Ligne 1 : Col 2</td>\n </tr>\n</table>\n
-Templates.ol.name=ol
-Templates.ol.desc=ol (mod\u00e8le)
-Templates.ol.content=<ol>\n <li> El\u00e9ment un </li>\n <li> El\u00e9ment deux </li>\n </ol>\n
-Templates.html.name=html
-Templates.html.desc=html (mod\u00e8le)
-Templates.html.content=<html>\n<head>\n<title>Ins\u00e9rer le titre ici</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.script.name=script
-Templates.script.desc=script (comment\u00e9)
-Templates.script.content=<script type=\"${cursor}text/javascript\">\n<!--\n\n//-->\n</script>
-Templates.style.name=style
-Templates.style.desc=style (comment\u00e9)
-Templates.style.content=<style>\n<!--\n${cursor}\n-->\n</style>
-Templates.imgmap.name=img
-Templates.imgmap.desc=img (mappe)
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_it.properties b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_it.properties
deleted file mode 100644
index 1e159ce6c4..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_it.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Templates.comment.name=commento
-Templates.comment.desc=commento
-Templates.ul.name=ul
-Templates.ul.desc=ul (modello)
-Templates.ul.content=<ul>\n <li> Elemento uno </li>\n <li> Elemento due </li>\n</ul>\n
-Templates.dl.name=dl
-Templates.dl.desc=dl (modello)
-Templates.dl.content=<dl>\n <dt> Prima definizione <dd> Prima spiegazione\n <dt> Seconda definizione <dd> Seconda spiegazione\n</dl>\n
-Templates.table.name=tabella
-Templates.table.desc=tabella (modello)
-Templates.table.content=<table border>\n <tr>\n <th>Intestazione colonna 1</th>\n <th>Intestazione colonna 2</th>\n </tr>\n <tr>\n <td>Riga 1: Colonna 1</td>\n <td>Riga 1: Colonna 2</td>\n </tr>\n</table>\n
-Templates.ol.name=ol
-Templates.ol.desc=ol (modello)
-Templates.ol.content=<ol>\n <li> Elemento uno </li>\n <li> Elemento due </li>\n</ol>\n
-Templates.html.name=html
-Templates.html.desc=html (modello)
-Templates.html.content=<html>\n<head>\n<title>Inserire il titolo in questo punto</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.script.name=script
-Templates.script.desc=script (commentato)
-Templates.script.content=<script type=\"${cursor}text/javascript\">\n<!--\n\n//-->\n</script>
-Templates.style.name=stile
-Templates.style.desc=stile (commentato)
-Templates.style.content=<style>\n<!--\n${cursor}\n-->\n</style>
-Templates.imgmap.name=img
-Templates.imgmap.desc=img (mappa)
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_ja.properties b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_ja.properties
deleted file mode 100644
index 229ced96a1..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_ja.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Templates.comment.name=\u30b3\u30e1\u30f3\u30c8
-Templates.comment.desc=\u30b3\u30e1\u30f3\u30c8
-Templates.ul.name=ul
-Templates.ul.desc=ul (\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8)
-Templates.ul.content=<ul>\n <li> \u9805\u76ee 1 </li>\n <li> \u9805\u76ee 2 </li>\n</ul>\n
-Templates.dl.name=dl
-Templates.dl.desc=dl (\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8)
-Templates.dl.content=<dl>\n <dt> 1 \u756a\u76ee\u306e\u5b9a\u7fa9 <dd> 1 \u756a\u76ee\u306e\u8aac\u660e\n <dt> 2 \u756a\u76ee\u306e\u5b9a\u7fa9 <dd> 2 \u756a\u76ee\u306e\u8aac\u660e\n</dl>\n
-Templates.table.name=table
-Templates.table.desc=\u30c6\u30fc\u30d6\u30eb (\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8)
-Templates.table.content=<table border>\n <tr>\n <th>\u5217 1 \u898b\u51fa\u3057</th>\n <th>\u5217 2 \u898b\u51fa\u3057</th>\n </tr>\n <tr>\n <td>\u884c 1: \u5217 1</td>\n <td>\u884c 1: \u5217 2</td>\n </tr>\n</table>\n
-Templates.ol.name=ol
-Templates.ol.desc=ol (\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8)
-Templates.ol.content=<ol>\n <li> \u9805\u76ee 1 </li>\n <li> \u9805\u76ee 2 </li>\n</ol>\n
-Templates.html.name=html
-Templates.html.desc=html (\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8)
-Templates.html.content=<html>\n<head>\n<title>\u3053\u3053\u306b\u30bf\u30a4\u30c8\u30eb\u3092\u633f\u5165</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.script.name=script
-Templates.script.desc=\u30b9\u30af\u30ea\u30d7\u30c8 (\u30b3\u30e1\u30f3\u30c8)
-Templates.script.content=<script type=\"${cursor}text/javascript\">\n<!--\n\n//-->\n</script>
-Templates.style.name=style
-Templates.style.desc=\u30b9\u30bf\u30a4\u30eb (\u30b3\u30e1\u30f3\u30c8)
-Templates.style.content=<style>\n<!--\n${cursor}\n-->\n</style>
-Templates.imgmap.name=img
-Templates.imgmap.desc=img (\u30de\u30c3\u30d7)
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_ko.properties b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_ko.properties
deleted file mode 100644
index c45f44b70c..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_ko.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Templates.comment.name=\uc8fc\uc11d
-Templates.comment.desc=\uc8fc\uc11d
-Templates.ul.name=ul
-Templates.ul.desc=ul (\ud15c\ud50c\ub9ac\ud2b8)
-Templates.ul.content=<ul>\n<li> \ud56d\ubaa9 1 </li>\n<li> \ud56d\ubaa9 2 </li>\n</ul>\n
-Templates.dl.name=dl
-Templates.dl.desc=dl (\ud15c\ud50c\ub9ac\ud2b8)
-Templates.dl.content=<dl>\n<dt> \uc81c1 \uc815\uc758 <dd> \uc81c1 \uc124\uba85\n<dt> \uc81c2 \uc815\uc758 <dd> \uc81c2 \uc124\uba85\n</dl>\n
-Templates.table.name=table
-Templates.table.desc=table (\ud15c\ud50c\ub9ac\ud2b8)
-Templates.table.content=<table border>\n<tr>\n<th>\uc5f4 1 \ud45c\uc81c</th>\n<th>\uc5f4 2 \ud45c\uc81c</th>\n</tr>\n<tr>\n<td>\ud589 1: \uc5f4 1</td>\n<td>\ud589 1: \uc5f4 2</td>\n</tr>\n</table>\n
-Templates.ol.name=ol
-Templates.ol.desc=ol (\ud15c\ud50c\ub9ac\ud2b8)
-Templates.ol.content=<ol>\n<li> \ud56d\ubaa9 1 </li>\n<li> \ud56d\ubaa9 2 </li>\n</ol>\n
-Templates.html.name=html
-Templates.html.desc=html (\ud15c\ud50c\ub9ac\ud2b8)
-Templates.html.content=<html>\n<head>\n<title>\uc5ec\uae30\uc5d0 \uc81c\ubaa9 \uc0bd\uc785</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.script.name=script
-Templates.script.desc=script (\uc8fc\uc11d\ucc98\ub9ac)
-Templates.script.content=<script type=\"${cursor}text/javascript\">\n<!--\n\n//-->\n</script>
-Templates.style.name=style
-Templates.style.desc=style (\uc8fc\uc11d\ucc98\ub9ac)
-Templates.style.content=<style>\n<!--\n${cursor}\n-->\n</style>
-Templates.imgmap.name=img
-Templates.imgmap.desc=img (\ub9f5)
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_pt_BR.properties b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_pt_BR.properties
deleted file mode 100644
index 282472b2fd..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_pt_BR.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Templates.comment.name=coment\u00e1rio
-Templates.comment.desc=coment\u00e1rio
-Templates.ul.name=ul
-Templates.ul.desc=ul (modelo)
-Templates.ul.content=<ul>\n<li> Item um </li>\n<li> Item dois </li>\n</ul>\n
-Templates.dl.name=dl
-Templates.dl.desc=dl (modelo)
-Templates.dl.content=<dl>\n<dt> Primeira defini\u00e7\u00e3o <dd> Primeira explica\u00e7\u00e3o\n<dt> Segunda defini\u00e7\u00e3o <dd> Segunda explica\u00e7\u00e3o\n</dl>\n
-Templates.table.name=tabela
-Templates.table.desc=tabela (modelo)
-Templates.table.content=<table border>\n<tr>\n<th>T\u00edtulo da Coluna 1</th>\n<th>T\u00edtulo da Coluna 2</th>\n</tr>\n <tr>\n<td>Linha 1: Col 1</td>\n<td>Linha 1: Col 2</td>\n</tr>\n</table>\n
-Templates.ol.name=ol
-Templates.ol.desc=ol (modelo)
-Templates.ol.content=<ol>\n<li> Item um </li>\n<li> Item dois </li>\n</ol>\n
-Templates.html.name=html
-Templates.html.desc=html (modelo)
-Templates.html.content=<html>\n<head>\n<title>Inserir t\u00edtulo aqui</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.script.name=script
-Templates.script.desc=script (comentado)
-Templates.script.content=<script type=\"${cursor}text/javascript\">\n<!--\n\n//-->\n</script>
-Templates.style.name=estilo
-Templates.style.desc=estilo (comentado)
-Templates.style.content=<style>\n<!--\n${cursor}\n-->\n</style>
-Templates.imgmap.name=img
-Templates.imgmap.desc=img (mapa)
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_zh_CN.properties b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_zh_CN.properties
deleted file mode 100644
index 0ccbd24f73..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_zh_CN.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Templates.comment.name=\u6ce8\u91ca
-Templates.comment.desc=\u6ce8\u91ca
-Templates.ul.name=ul
-Templates.ul.desc=ul \uff08\u6a21\u677f\uff09
-Templates.ul.content=<ul>\n <li> \u7b2c\u4e00\u9879 </li>\n <li> \u7b2c\u4e8c\u9879 </li>\n </ul>\n
-Templates.dl.name=dl
-Templates.dl.desc=dl \uff08\u6a21\u677f\uff09
-Templates.dl.content=<dl>\n <dt> \u7b2c\u4e00\u4e2a\u5b9a\u4e49 <dd> \u7b2c\u4e00\u4e2a\u8bf4\u660e\n <dt> \u7b2c\u4e8c\u4e2a\u5b9a\u4e49 <dd> \u7b2c\u4e8c\u4e2a\u8bf4\u660e\n </dl>\n
-Templates.table.name=\u8868
-Templates.table.desc=\u8868 \uff08\u6a21\u677f\uff09
-Templates.table.content=<table border>\n <tr>\n <th>\u7b2c 1 \u5217\u6807\u9898</th>\n <th>\u7b2c 2 \u5217\u6807\u9898</th>\n </tr>\n <tr>\n <td>\u7b2c 1 \u884c\uff1a\u7b2c 1 \u5217</td>\n <td>\u7b2c 1 \u884c\uff1a\u7b2c 2 \u5217</td>\n </tr>\n </table>\n
-Templates.ol.name=ol
-Templates.ol.desc=ol \uff08\u6a21\u677f\uff09
-Templates.ol.content=<ol>\n <li> \u7b2c\u4e00\u9879 </li>\n <li> \u7b2c\u4e8c\u9879 </li>\n </ol>\n
-Templates.html.name=html
-Templates.html.desc=html \uff08\u6a21\u677f\uff09
-Templates.html.content=<html>\n<head>\n<title>\u5728\u6b64\u5904\u63d2\u5165\u6807\u9898</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.script.name=\u811a\u672c
-Templates.script.desc=\u811a\u672c \uff08\u5df2\u52a0\u6ce8\u91ca\uff09
-Templates.script.content=<script type=\"${cursor}text/javascript\">\n<!--\n\n//-->\n</script>
-Templates.style.name=\u6837\u5f0f
-Templates.style.desc=\u6837\u5f0f \uff08\u5df2\u52a0\u6ce8\u91ca\uff09
-Templates.style.content=<style>\n<!--\n${cursor}\n-->\n</style>
-Templates.imgmap.name=img
-Templates.imgmap.desc=img \uff08\u6620\u5c04\uff09
diff --git a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_zh_TW.properties b/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_zh_TW.properties
deleted file mode 100644
index ff357930e9..0000000000
--- a/bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates_zh_TW.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Templates.comment.name=\u8a3b\u89e3
-Templates.comment.desc=\u8a3b\u89e3
-Templates.ul.name=ul
-Templates.ul.desc=ul \uff08\u7bc4\u672c\uff09
-Templates.ul.content=<ul>\n <li> \u9805\u76ee 1 </li>\n <li> \u9805\u76ee 2 </li>\n </ul>\n
-Templates.dl.name=dl
-Templates.dl.desc=dl \uff08\u7bc4\u672c\uff09
-Templates.dl.content=<dl>\n <dt> \u7b2c\u4e00\u500b\u5b9a\u7fa9 <dd> \u7b2c\u4e00\u500b\u8aaa\u660e\n <dt> \u7b2c\u4e8c\u500b\u5b9a\u7fa9 <dd> \u7b2c\u4e8c\u500b\u8aaa\u660e\n </dl>\n
-Templates.table.name=table
-Templates.table.desc=table \uff08\u7bc4\u672c\uff09
-Templates.table.content=<table border>\n <tr>\n <th>\u7b2c 1 \u6b04\u6a19\u984c</th>\n <th>\u7b2c 2 \u6b04\u6a19\u984c</th>\n </tr>\n <tr>\n <td>\u5217 1\uff1a\u76f4\u6b04 1</td>\n <td>\u5217 1\uff1a\u76f4\u6b04 2</td>\n </tr>\n </table>\n
-Templates.ol.name=ol
-Templates.ol.desc=ol \uff08\u7bc4\u672c\uff09
-Templates.ol.content=<ol>\n <li> \u9805\u76ee 1 </li>\n <li> \u9805\u76ee 2 </li>\n </ol>\n
-Templates.html.name=html
-Templates.html.desc=html \uff08\u7bc4\u672c\uff09
-Templates.html.content=<html>\n<head>\n<title>\u5728\u9019\u88e1\u63d2\u5165\u6a19\u984c</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.script.name=Script
-Templates.script.desc=script \uff08\u52a0\u8a3b\uff09
-Templates.script.content=<script type=\"${cursor}text/javascript\">\n<!--\n\n//-->\n</script>
-Templates.style.name=style
-Templates.style.desc=style \uff08\u52a0\u8a3b\uff09
-Templates.style.content=<style>\n<!--\n${cursor}\n-->\n</style>
-Templates.imgmap.name=img
-Templates.imgmap.desc=img \uff08\u5c0d\u6620\uff09

Back to the top