Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/EclipsePerformanceLog.java')
-rw-r--r--tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/EclipsePerformanceLog.java77
1 files changed, 0 insertions, 77 deletions
diff --git a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/EclipsePerformanceLog.java b/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/EclipsePerformanceLog.java
deleted file mode 100644
index f48f1a3a4..000000000
--- a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/EclipsePerformanceLog.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.jst.ws.tests.performance.util;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.eclipse.wst.common.environment.ILog;
-
-
-public class EclipsePerformanceLog implements ILog {
-
- private boolean runState = false;
- Performance perf = null;
- PerformanceMeter performanceMeter= null;
-
- public boolean isEnabled() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isEnabled(String option) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void log(int severity, int messageNum, Object caller, String method, Throwable throwable) {
- // TODO Auto-generated method stub
-
- }
-
- public void log(int severity, String option, int messageNum, Object caller, String method, Throwable throwable) {
- // TODO Auto-generated method stub
-
- }
-
- public void log(int severity, int messageNum, Object caller, String method, IStatus status) {
- // TODO Auto-generated method stub
-
- }
-
- public void log(int severity, String option, int messageNum, Object caller, String method, IStatus status) {
- // TODO Auto-generated method stub
-
- }
-
- public void log(int severity, int messageNum, Object caller, String method, Object object) {
- // TODO Auto-generated method stub
-
- }
-
- public void log(int severity, String option, int messageNum, Object caller, String method, Object object) {
-
- if (method.equals("runCommand")) {
-
- try {
- if (!runState) {
- // begin performance recording
- perf = Performance.getDefault();
- performanceMeter = perf.createPerformanceMeter(((String)object).toString());
- performanceMeter.start();
- runState = true;
- }
- else {
- // end performance recording
- performanceMeter.stop();
- performanceMeter.commit();
- perf.assertPerformance(performanceMeter);
- performanceMeter.dispose();
- runState = false;
- }
- }
- catch(Exception e) {
- // handle exception
- }
- }
- }
-
-}

Back to the top

td class='add' style='width: 0.0%;'/> -rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSheetAdapter.java41
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSheetListAdapter.java41
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CSSCleanupStrategy.java98
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CSSCleanupStrategyImpl.java191
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CleanupProcessorCSS.java131
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSAccess.java26
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSAttr.java40
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSCharsetRule.java23
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSDocument.java98
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSImportRule.java34
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSMediaRule.java22
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSModel.java49
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNamedNodeMap.java26
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNode.java94
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNodeList.java31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSPageRule.java28
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSPrimitiveValue.java46
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSRuleContainer.java60
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelector.java67
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorCombinator.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorItem.java32
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorList.java62
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSimpleSelector.java77
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleDeclItem.java73
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleDeclaration.java46
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleRule.java28
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleSheet.java47
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSValue.java26
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSValueList.java35
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICounter.java49
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/IDOMImplementationCSS.java28
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/IDocumentStyle.java62
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/event/ICSSStyleListener.java32
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/event/ICSSStyleNotifier.java40
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/format/CSSSourceFormatter.java49
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/format/FormatProcessorCSS.java112
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java144
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/Logger.java156
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSHeadTokenizer.java1357
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSHeadTokenizerConstants.java19
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSResourceEncodingDetector.java149
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/ContentDescriberForCSS.java24
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IMediaGroupID.java34
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IValID.java266
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMContainer.java164
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFontProperty.java198
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFunction.java89
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNode.java1369
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNumber.java220
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMProperty.java417
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMString.java86
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMSubProperty.java122
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMURange.java81
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMUtil.java48
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/AbstractCSSNodeList.java76
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSAttrImpl.java151
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSCharsetRuleImpl.java93
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDeclarationItemParser.java1077
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDocumentImpl.java183
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSFontFaceRuleImpl.java76
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSImportRuleImpl.java234
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSMediaRuleImpl.java244
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelCreationContext.java155
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelDeletionContext.java268
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelImpl.java677
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelNodeFeeder.java122
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelParser.java1281
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdateContext.java416
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdater.java583
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java298
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNamedNodeMapImpl.java48
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeImpl.java559
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeListImpl.java38
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPageRuleImpl.java110
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveContainer.java56
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveValueImpl.java374
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRegionContainer.java257
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleDeclContainer.java58
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleImpl.java84
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleListImpl.java45
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelector.java427
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorCombinator.java76
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorItem.java42
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java212
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorParser.java335
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSimpleSelector.java281
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStructuredDocumentRegionContainer.java265
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclItemImpl.java258
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java69
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationImpl.java306
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleRuleImpl.java110
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java625
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSUnknownRuleImpl.java79
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CounterImpl.java128
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/DOMCSSImpl.java54
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/MediaListImpl.java166
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RGBColorImpl.java108
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RectImpl.java122
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/StyleSheetListImpl.java44
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/ByteUtil.java228
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentCharsetDetector.java126
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentLoader.java87
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSEmbededStyleNotifyAdapter.java60
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSStyleEventDeliverer.java155
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSStyleNotifyAdapter.java174
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java974
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrChangeContext.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrFormatter.java165
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSFormatUtil.java165
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatter.java48
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatterFactory.java81
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceGenerator.java61
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CharsetRuleFormatter.java188
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CompoundRegion.java52
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CounterFormatter.java316
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DeclContainerFormatter.java118
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DefaultCSSSourceFormatter.java126
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FontFaceRuleFormatter.java97
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FormatRegion.java71
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FunctionFormatter.java187
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/ImportRuleFormatter.java345
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaListFormatter.java216
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaRuleFormatter.java394
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PageRuleFormatter.java193
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PrimitiveValueFormatter.java271
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RGBFormatter.java44
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RectFormatter.java44
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclItemFormatter.java394
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclarationFormatter.java253
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleRuleFormatter.java166
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleSheetFormatter.java273
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/UnknownRuleFormatter.java86
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCategoryImpl.java75
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCharsetRuleImpl.java45
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMContainerImpl.java63
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMDescriptorImpl.java75
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFontFaceRuleImpl.java45
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFunctionImpl.java96
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMImportRuleImpl.java44
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMKeywordImpl.java75
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMMediaRuleImpl.java41
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNodeImpl.java148
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNumberImpl.java52
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPageRuleImpl.java50
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPropertyImpl.java76
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPseudoClassImpl.java33
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPseudoElementImpl.java33
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelectorExpressionImpl.java49
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelectorImpl.java81
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStringImpl.java86
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleRuleImpl.java50
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleSheetImpl.java50
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMUnitImpl.java108
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMetaModelImpl.java95
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileImpl.java158
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileTest.java73
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/MetaModelErrors.java30
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/NodePool.java171
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileHandler.java283
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileKeywords.java58
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileLoader.java72
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/RegistryReader.java112
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ValueCollector.java50
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/XMLReaderUtil.java38
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSRegionUtil.java51
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSSourceParser.java284
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSStructuredDocumentRegionFactory.java27
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSTokenizer.java1220
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSContextRegion.java23
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSTextRegionFactory.java34
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/tasks/CSSTaskTagSeeker.java40
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentReParser.java451
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentRegionFactory.java39
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredDocumentWalker.java169
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/rules/StructuredTextPartitionerForCSS.java35
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMCategory.java16
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMCharsetRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMContainer.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMDescriptor.java20
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMFontFaceRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMFunction.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMImportRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMKeyword.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMMediaRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMNode.java51
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMNumber.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMPageRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMProperty.java22
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMSelector.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMString.java17
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMStyleRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMStyleSheet.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMUnit.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMetaModel.java37
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSProfile.java31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSProfileRegistry.java69
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSFunctionID.java22
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSKeywordID.java261
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMMTypeCollector.java62
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMediaGroupID.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelFinder.java51
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelTraverser.java92
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelUtil.java120
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSNumberID.java23
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSProfileFinder.java105
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSPropertyID.java137
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSStringID.java22
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSUnitID.java34
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/modelhandler/CSSModelLoader.java54
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/modelhandler/ModelHandlerForCSS.java56
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSRegionContexts.java76
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSTextParser.java101
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSTextToken.java23
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSModelPreferenceNames.java32
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSPreferenceHelper.java270
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/AbstractCssTraverser.java204
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSClassTraverser.java114
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSLinkConverter.java191
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSPathService.java81
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSSelectorListFactory.java35
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSStyleDeclarationFactory.java65
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSUtil.java335
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/ImportRuleCollector.java71
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/ImportedCollector.java61
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/RegionIterator.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectionCollector.java76
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectorValidator.java97
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectorsCollector.java101
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/URLHelper.java210
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/URLModelProviderCSS.java388
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundPositionXSubStyleAdapter.java142
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundPositionYSubStyleAdapter.java150
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundShorthandAdapter.java179
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderBottomShorthandAdapter.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderColorShorthandAdapter.java158
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderLeftShorthandAdapter.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderRightShorthandAdapter.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderShorthandAdapter.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderStyleShorthandAdapter.java130
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderTopShorthandAdapter.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderWidthShorthandAdapter.java130
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/CSSPropertyContext.java2997
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipBottomSubStyleAdapter.java53
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipLeftSubStyleAdapter.java53
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipRightSubStyleAdapter.java53
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipSubStyleAdapter.java132
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipTopSubStyleAdapter.java53
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/FontShorthandAdapter.java240
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ICSS2Properties.java127
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/IShorthandAdapter.java31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ISubPropertyAdapter.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ListStyleShorthandAdapter.java110
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/MarginShorthandAdapter.java129
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/PaddingShorthandAdapter.java129
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ValueData.java45
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSS2Properties.java1666
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSCharsetRule.java54
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSFontFaceRule.java31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSImportRule.java47
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSMediaRule.java84
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSPageRule.java47
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSPrimitiveValue.java313
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSRule.java102
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSRuleList.java50
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleDeclaration.java163
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleRule.java48
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleSheet.java94
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSUnknownRule.java26
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSValue.java76
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSValueList.java54
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/Counter.java42
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/DOMImplementationCSS.java45
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/DocumentCSS.java57
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/ElementCSSInlineStyle.java36
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/RGBColor.java54
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/Rect.java48
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/ViewCSS.java51
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/DocumentStyle.java38
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/LinkStyle.java35
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/MediaList.java93
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/StyleSheet.java100
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/StyleSheetList.java49
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/views/AbstractView.java31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/w3c/dom/views/DocumentView.java33
-rw-r--r--bundles/org.eclipse.wst.css.ui/.classpath7
-rw-r--r--bundles/org.eclipse.wst.css.ui/.compatibility2
-rw-r--r--bundles/org.eclipse.wst.css.ui/.cvsignore5
-rw-r--r--bundles/org.eclipse.wst.css.ui/.project28
-rw-r--r--bundles/org.eclipse.wst.css.ui/build.properties22
-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/aural_props.gifbin229 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/boxmodel_props.gifbin348 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/charset_rule.gifbin365 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/class_selector.gifbin338 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/colback_props.gifbin610 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/content_props.gifbin366 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyname.gifbin612 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_function.gifbin164 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_identifier.gifbin314 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_unit.gifbin218 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/font_props.gifbin120 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/fontface_rule.gifbin347 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/id_selector.gifbin374 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_rule.gifbin363 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_selector.gifbin339 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/media_rule.gifbin592 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/other_props.gifbin600 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/page_rule.gifbin586 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/pagedmedia_props.gifbin597 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/pseudo.gifbin588 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/sort.gifbin162 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/style_rule.gifbin371 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/stylesheet.gifbin579 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/table_props.gifbin599 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag_selector.gifbin346 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/text_props.gifbin601 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/ui_props.gifbin608 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/unknown_rule.gifbin365 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/visual_props.gifbin609 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/plugin.properties21
-rw-r--r--bundles/org.eclipse.wst.css.ui/plugin.xml132
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/ActionContributorCSS.java121
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/CSSEditorPlugin.java21
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextEditorCSS.java60
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextViewerConfigurationCSS.java124
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/autoedit/StructuredAutoEditStrategyCSS.java501
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSCACandidate.java102
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSContentAssistContext.java454
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSContentAssistProcessor.java273
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalArranger.java169
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGenerator.java209
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForAtmarkRule.java293
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForDeclarationName.java171
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForDeclarationValue.java370
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForHTMLTag.java157
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForPseudoSelector.java157
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/HTML40Namespace.java889
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ContentSettingsRegistry.java34
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ui/CSSContentSettingsPropertyPage.java101
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupActionCSS.java40
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupDialogCSS.java290
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/image/CSSImageHelper.java124
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/image/CSSImageType.java235
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java153
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties50
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/Logger.java156
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/CSSEditorPluginImages.java51
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/IHelpContextIds.java42
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectCSSAction.java53
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectEnclosingCSSAction.java47
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectNextCSSAction.java60
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectPreviousCSSAction.java55
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/CSSPreferenceManager.java184
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorManager.java227
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorPage.java227
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSFilesPreferencePage.java59
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSSourcePreferencePage.java246
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/registry/AdapterFactoryProviderCSS.java55
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/CSSTextColors.java143
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/IStyleConstantsCSS.java31
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForCSS.java209
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForEmbeddedCSS.java109
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/taginfo/CSSBestMatchHoverProcessor.java33
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/text/CSSDocumentRegionEdgeMatcher.java89
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSContentOutlineConfiguration.java118
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSNodeAdapter.java319
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeAdapterFactoryCSS.java42
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeContentProviderCSS.java263
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeLabelProviderCSS.java231
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java65
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySheetConfiguration.java53
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySource.java348
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySourceAdapterFactory.java45
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSTextPropertyDescriptor.java112
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.classpath7
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.compatibility2
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.cvsignore5
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.project26
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.core.prefs69
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.pde.prefs12
-rw-r--r--bundles/org.eclipse.wst.dtd.core/README.txt1
-rw-r--r--bundles/org.eclipse.wst.dtd.core/build.properties22
-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gifbin136 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gifbin366 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gifbin196 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gifbin585 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gifbin156 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gifbin124 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gifbin316 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gifbin366 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gifbin339 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gifbin341 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gifbin382 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gifbin369 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gifbin358 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gifbin3357 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/newdtd_wiz.gifbin3294 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gifbin177 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gifbin141 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gifbin139 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gifbin147 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gifbin91 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gifbin149 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gifbin140 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gifbin149 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gifbin349 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gifbin356 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gifbin140 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gifbin135 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gifbin146 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/plugin.properties127
-rw-r--r--bundles/org.eclipse.wst.dtd.core/plugin.xml80
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Attribute.java370
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/AttributeEnumList.java72
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/AttributeList.java116
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMBasicNode.java163
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMGroupNode.java425
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMNode.java134
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMRepeatableNode.java80
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Comment.java76
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDFile.java655
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDNode.java334
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDPlugin.java22
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDResource.java57
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Element.java198
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Entity.java325
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/ExternalNode.java243
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Logger.java20
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/NamedTopLevelNode.java134
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/NodeList.java94
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Notation.java30
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/ParameterEntityReference.java114
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/TopLevelNode.java85
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Unrecognized.java39
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/builder/delegates/DTDTaskTagSeeker.java25
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/content/ContentDescriberForDTD.java30
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/document/DTDModel.java29
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/document/DTDModelImpl.java271
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/encoding/DTDDocumentCharsetDetector.java61
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/encoding/DTDDocumentLoader.java64
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/event/IDTDFileListener.java24
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/event/NodesEvent.java32
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java110
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java143
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java41
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java33
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java84
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/DTDModelDumper.java40
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/DTDModelLoader.java47
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/ModelHandlerForDTD.java46
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegion.java32
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionFactory.java26
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionParser.java262
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionTypes.java76
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/rules/StructuredTextPartitionerForDTD.java42
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/DTDTokenizer.java1428
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/Token.java61
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/Yytoken.java90
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/dtd.flex312
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDBatchNodeDelete.java57
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDExternalReferenceRemover.java145
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDModelUpdater.java135
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDNotationReferenceRemover.java92
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDReferenceUpdater.java192
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDSAXParser.java170
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDUniqueNameHelper.java91
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDVisitor.java105
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/LabelValuePair.java30
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.classpath7
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.compatibility2
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.cvsignore6
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.project26
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.jdt.core.prefs69
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.pde.prefs12
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/README.txt1
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/build.properties22
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/DTDFile.gifbin159 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Attribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Element.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_ElementToConModel.gifbin336 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_GroupToConModel.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Attribute.gifbin164 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Element.gifbin225 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_ElementToConModel.gifbin320 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_GroupToConModel.gifbin114 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Attribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Element.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_ElementToConModel.gifbin336 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_GroupToConModel.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Comment.gifbin196 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity.gifbin124 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity_Reference.gifbin318 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Notation.gifbin177 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/organize_dtd_logically.gifbin347 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sort.gifbin162 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/validate.gifbin358 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/plugin.properties343
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/plugin.xml110
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/ActionContributorDTD.java41
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/DTDEditorPlugin.java21
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextEditorDTD.java24
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextViewerConfigurationDTD.java97
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DTDDragAndDropManager.java46
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragAttributeCommand.java61
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragContentModelCommand.java111
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragTopLevelNodesCommand.java64
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java152
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImageHelper.java155
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImages.java42
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/IHelpContextIds.java36
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDColorPage.java171
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDFilesPreferencePage.java62
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/registry/AdapterFactoryProviderForDTD.java74
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/IStyleConstantsDTD.java41
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTD.java132
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTDSubSet.java161
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/taginfo/DTDBestMatchHoverProcessor.java34
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/text/DTDDocumentRegionEdgeMatcher.java28
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java210
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java307
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java87
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java288
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/IndexedNodeList.java86
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/OrderAction.java64
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/SortAction.java63
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddAttributeAction.java54
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddAttributeListAction.java44
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddCommentAction.java32
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddElementAction.java33
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddElementToContentModelAction.java50
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddEntityAction.java35
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddGroupToContentModelAction.java40
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddNotationAction.java34
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddParameterEntityReferenceAction.java48
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/BaseAction.java78
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/DeleteAction.java69
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/properties/DTDPropertySourceAdapter.java131
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/properties/DTDPropertySourceAdapterFactory.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/.classpath7
-rw-r--r--bundles/org.eclipse.wst.html.core/.compatibility2
-rw-r--r--bundles/org.eclipse.wst.html.core/.cvsignore5
-rw-r--r--bundles/org.eclipse.wst.html.core/.options2
-rw-r--r--bundles/org.eclipse.wst.html.core/.project28
-rw-r--r--bundles/org.eclipse.wst.html.core/.settings/org.eclipse.pde.prefs12
-rw-r--r--bundles/org.eclipse.wst.html.core/build.properties22
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref.xml294
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref_de.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref_es.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref_fr.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref_it.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref_ja.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref_ko.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref_pt_BR.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref_zh_CN.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref_zh_TW.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/plugin.properties15
-rw-r--r--bundles/org.eclipse.wst.html.core/plugin.xml216
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTML40Namespace.java675
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCMProperties.java116
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCorePlugin.java19
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLFilesPreferenceNames.java31
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLFormatContraints.java35
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/PreferenceNames.java35
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/AbstractNodeCleanupHandler.java87
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/CSSTextNodeCleanupHandler.java86
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/ElementNodeCleanupHandler.java635
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupHandlerFactory.java119
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupProcessorImpl.java45
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/JSPElementNodeCleanupHandler.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/NodeCleanupHandler.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/commentelement/handlers/CommentElementHandlerForSSI.java164
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/AttributeCollection.java1295
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMContentImpl.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMGroupImpl.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamedNodeMapImpl.java99
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamespaceImpl.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeImpl.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeListImpl.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ComplexTypeDefinition.java76
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ComplexTypeDefinitionFactory.java185
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdAddress.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdColumnGroup.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdDl.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdEmbed.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFieldset.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFlowContainer.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFrameset.java93
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHead.java176
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHtml.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdInlineContainer.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdLiContainer.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdMap.java72
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdNoframesContent.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdOptionContainer.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdParamContainer.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdSelect.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTable.java128
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTableCellContainer.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTrContainer.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/DeclCollection.java238
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ElementCollection.java886
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/EntityCollection.java837
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HCMDocImpl.java92
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttrDeclImpl.java122
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttributeDeclaration.java24
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataType.java66
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataTypeImpl.java125
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocument.java37
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocumentFactory.java60
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMNode.java32
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElemDeclImpl.java377
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElementDeclaration.java81
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java76
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclaration.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLPropertyDeclaration.java105
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedA.java100
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedADDRESS.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedAPPLET.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedAREA.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBASE.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBASEFONT.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBDO.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBGSOUND.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBLOCKQUOTE.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBODY.java96
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBR.java51
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBUTTON.java102
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCAPTION.java48
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCENTER.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOL.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOLGROUP.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDD.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDIV.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDL.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDT.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEMBED.java94
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEmpty.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFIELDSET.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFONT.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFORM.java93
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFRAME.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFRAMESET.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFlowContainer.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFontStyle.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHEAD.java78
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHR.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHTML.java81
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHeading.java86
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIFRAME.java76
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIMG.java89
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedINPUT.java122
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedISINDEX.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedInlineContainer.java29
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLABEL.java94
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLEGEND.java54
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLI.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLINK.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedListItemContainer.java30
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMAP.java53
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMARQUEE.java81
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMENU.java90
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMETA.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMarkChanges.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOBR.java33
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOEMBED.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOFRAMES.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOSCRIPT.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOBJECT.java86
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOL.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOPTGROUP.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOPTION.java66
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedP.java106
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPARAM.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPRE.java92
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPcdata.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPhrase.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedQ.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSCRIPT.java81
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSELECT.java79
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSPAN.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIBase.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIConfig.java48
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIEcho.java46
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIExec.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIFlastmod.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIFsize.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIInclude.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIPrintenv.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSISet.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSTYLE.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedScripts.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTABLE.java91
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTEXTAREA.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTITLE.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTR.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTableBody.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTableCell.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedUL.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedWBR.java32
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JCMDocImpl.java79
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSP11Namespace.java112
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPCMDocument.java29
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPElementCollection.java897
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/PropertyProvider.java23
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/PropertyProviderFactory.java359
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/AttributeCollection.java324
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CHCMDocImpl.java95
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CHTMLNamespace.java152
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMContentImpl.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMGroupImpl.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNamedNodeMapImpl.java97
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeImpl.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeListImpl.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ComplexTypeDefinition.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ComplexTypeDefinitionFactory.java146
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdAddress.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdDl.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdFlowContainer.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHead.java175
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHtml.java79
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdInlineContainer.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdLiContainer.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdOptionContainer.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdSelect.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/DeclCollection.java238
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ElementCollection.java495
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/EntityCollection.java837
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLAttrDeclImpl.java118
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMDataTypeImpl.java126
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMNode.java32
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLElemDeclImpl.java380
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLEntityDeclImpl.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedA.java99
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedADDRESS.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedBASE.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedBLOCKQUOTE.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedBODY.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedBR.java51
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedCENTER.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDD.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDIV.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDL.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDT.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedEmpty.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedFORM.java92
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedFlowContainer.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHEAD.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHR.java75
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHTML.java81
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHeading.java85
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedIMG.java88
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedINPUT.java108
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedInlineContainer.java29
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedLI.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedListItemContainer.java30
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMENU.java87
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMETA.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedOL.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedOPTION.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedP.java105
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPRE.java91
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPcdata.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSELECT.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIBase.java52
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIConfig.java45
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIEcho.java43
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIExec.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIFlastmod.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIFsize.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIInclude.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIPrintenv.java48
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSISet.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedTEXTAREA.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedTITLE.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedUL.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/PropertyProvider.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/PropertyProviderFactory.java363
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ssi/SSICMDocumentFactory.java158
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/DocumentStyleImpl.java96
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/ElementStyleImpl.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLConverter.java302
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapter.java294
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapterFactory.java136
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeConstants.java19
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeEntry.java127
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeRegistry.java139
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeRegistryReader.java107
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java354
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapterFactory.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/MetaData.java28
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/MetaDataAdapter.java283
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/TagScanner.java166
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/UnknownTagAdapter.java82
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/XMLStyleModelImpl.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLDocumentCharsetDetector.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLDocumentLoader.java166
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLModelLoader.java114
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/EmbeddedCSSFormatter.java90
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLElementFormatter.java333
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatContraintsImpl.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatProcessorImpl.java60
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java650
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatterFactory.java108
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java281
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/SpaceConverter.java233
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractCSSModelAdapter.java105
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractStyleSheetAdapter.java238
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/CSSQueryContext.java137
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/CSSQueryDeclarationData.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/CSSQueryTraverser.java115
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/CSSQueryValueData.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/HTMLDocumentAdapter.java398
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/HTMLStyleSelectorAdapter.java154
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/HTMLStyleSelectorAdapterFactory.java81
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/LinkElementAdapter.java276
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAdapterFactory.java162
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAttrAdapter.java248
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleElementAdapter.java411
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleListener.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/URLHelper.java33
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/URLModelProvider.java446
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java143
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties40
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/Logger.java144
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/ContentDescriberForHTML.java25
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.java1692
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizerConstants.java20
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLResourceEncodingDetector.java190
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/text/rules/StructuredTextPartitionerForHTML.java204
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelhandler/EmbeddedHTML.java139
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelhandler/ModelHandlerForHTML.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMAttributeDeclarationBuddySystem.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMDocumentForBuddySystem.java119
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMElementDeclarationBuddySystem.java201
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNamedNodeMapForBuddySystem.java109
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNodeBuddySystem.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/DocumentQuery.java200
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ElementDeclarationAdapter.java29
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ElementDeclarationAdapterFactory.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HMQUtil.java121
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLElementDeclarationAdapter.java54
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryAssociationProvider.java54
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java100
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java148
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForEmbeddedHTML.java51
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java148
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/XHTMLAssociationProvider.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/preferences/HTMLContentBuilder.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/AbstractErrorInfo.java40
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java200
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CompositeValidator.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/DocumentPropagatingValidator.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/ElementPropagatingValidator.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/ErrorInfo.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/ErrorInfoImpl.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/ErrorState.java41
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/FMUtil.java103
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java207
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java194
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java178
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLSimpleDocumentValidator.java39
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLSimpleValidator.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLValidationAdapterFactory.java72
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/MessageFactory.java254
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java127
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NullValidator.java34
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/PrimeValidator.java25
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SMUtil.java36
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/Segment.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java345
-rw-r--r--bundles/org.eclipse.wst.xml.core/.classpath7
-rw-r--r--bundles/org.eclipse.wst.xml.core/.compatibility2
-rw-r--r--bundles/org.eclipse.wst.xml.core/.cvsignore5
-rw-r--r--bundles/org.eclipse.wst.xml.core/.options2
-rw-r--r--bundles/org.eclipse.wst.xml.core/.project27
-rw-r--r--bundles/org.eclipse.wst.xml.core/.settings/org.eclipse.jdt.core.prefs69
-rw-r--r--bundles/org.eclipse.wst.xml.core/README.txt1
-rw-r--r--bundles/org.eclipse.wst.xml.core/build.properties24
-rw-r--r--bundles/org.eclipse.wst.xml.core/plugin.properties17
-rw-r--r--bundles/org.eclipse.wst.xml.core/plugin.xml114
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/.cvsignore1
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/Logger.java22
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/NameValidator.java29
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/XMLModelPlugin.java21
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/XMLPreferenceNames.java51
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/builder/delegates/XMLTaskTagSeeker.java41
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/cleanup/CleanupProcessorXML.java90
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/cleanup/ElementNodeCleanupHandler.java556
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/cleanup/NodeCleanupHandler.java70
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/cleanup/XMLCleanupPreferences.java54
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/cleanup/XMLCleanupPreferencesImpl.java142
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementAdapter.java126
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementHandler.java107
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/BasicCommentElementHandler.java153
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementConfiguration.java229
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementRegistry.java84
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/util/CommentElementFactory.java65
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/util/TagScanner.java196
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/contenttype/ContentDescriberForXML.java25
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/contenttype/XMLHeadTokenizer.java1226
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/contenttype/XMLHeadTokenizerConstants.java24
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/contenttype/XMLResourceEncodingDetector.java102
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DocumentLoaderForXML.java131
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DocumentTypeAdapter.java51
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/InvalidCharacterException.java67
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/JSPTag.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/TagAdapter.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLAttr.java65
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLCharEntity.java37
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLDocument.java66
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLDocumentType.java32
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLElement.java107
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLGenerator.java154
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLModel.java36
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLModelNotifier.java103
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLNamespace.java25
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLNode.java124
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLText.java40
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/encoding/XMLDocumentCharsetDetector.java37
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/encoding/XMLDocumentLoader.java78
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/CommentNodeFormatter.java99
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/DocumentNodeFormatter.java53
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java354
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/FormatProcessorXML.java108
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/IStructuredFormatPreferencesXML.java21
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java765
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/StructuredFormatPreferencesXML.java27
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/TextNodeFormatter.java198
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/DebugAdapterFactory.java81
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java274
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/IDebugAdapter.java19
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/Logger.java157
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java138
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties17
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/ByteReader.java107
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/EncodingParserConstants.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/HeadParserToken.java44
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/IntStack.java99
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLDeclDetector.java156
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLHeadTokenizer.java1222
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLHeadTokenizerConstants.java22
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java756
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CDATASectionImpl.java140
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CMNodeUtil.java42
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CharacterDataImpl.java353
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CommentImpl.java183
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentFragmentImpl.java74
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java1073
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeAdapterImpl.java120
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java222
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java1421
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/EntityImpl.java227
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/EntityReferenceImpl.java89
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ModelParserAdapter.java55
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeContainer.java514
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeImpl.java809
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeIteratorImpl.java257
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeListImpl.java111
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NotationImpl.java138
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ProcessingInstructionImpl.java227
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/RangeImpl.java630
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java334
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java348
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionChecker.java143
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionContainer.java605
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionManagementException.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionProxy.java548
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionUtil.java167
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java1107
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java738
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelContext.java237
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelImpl.java875
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifierImpl.java469
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelParser.java2365
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelUpdater.java1647
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/filebuffers/DocumentFactoryForXML.java39
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/BlockStructuredDocumentRegion.java46
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/ContextRegionContainer.java386
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/IntStack.java97
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/RegionFactory.java49
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XML10Names.java541
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLRegionContexts.java21
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLSourceParser.java595
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLStructuredDocumentReParser.java125
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLStructuredRegionFactory.java42
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLTokenizer.java1699
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/AttributeEqualsRegion.java92
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/AttributeNameRegion.java170
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/AttributeValueRegion.java167
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/BlockTextRegion.java36
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/GenericTemplateRegion.java105
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/RegionToStringUtil.java36
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/RegionUpdateRule.java205
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/TagCloseRegion.java95
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/TagNameRegion.java98
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/TagOpenRegion.java98
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/WhiteSpaceOnlyRegion.java190
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/XMLCDataTextRegion.java179
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/XMLContentRegion.java179
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/XMLHeadParserFactory.java25
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/XMLHeadParserRegion.java111
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/XMLParserRegionFactory.java86
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/propagate/PropagatingAdapterFactoryImpl.java113
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/propagate/PropagatingAdapterImpl.java168
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/text/XMLStructuredDocumentRegion.java36
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/util/DebugDocument.java104
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/validate/AbstractPropagatingValidator.java45
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/validate/Propagator.java51
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/validate/ValidationComponent.java50
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/jsp/model/parser/temp/XMLJSPRegionContexts.java59
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/jsp/model/parser/temp/package.html8
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelhandler/EmbeddedXML.java89
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelhandler/ModelHandlerForXML.java63
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelhandler/XMLModelLoader.java95
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForEmbeddedXML.java54
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForXML.java178
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryUtil.java64
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLCatalogIdResolver.java89
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryAssociationProvider.java37
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryImpl.java38
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/parser/XMLRegionContext.java69
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/text/rules/StructuredTextPartitionerForXML.java139
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/ranges/COPYRIGHT.html100
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/ranges/DocumentRange.java39
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/ranges/Range.java434
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/ranges/RangeException.java50
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/ranges/package.html3
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/traversal/COPYRIGHT.html100
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/traversal/DocumentTraversal.java101
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/traversal/NodeFilter.java151
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/traversal/NodeIterator.java113
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/traversal/TreeWalker.java185
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/w3c/dom/traversal/package.html3
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.classpath7
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.cvsignore5
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.project28
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.jdt.core.prefs69
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.pde.prefs12
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/build.properties33
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/XSDFile.gifbin361 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/annotationsheader.gifbin376 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributegroupsheader.gifbin362 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributesheader.gifbin367 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/directivesheader.gifbin336 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/elementsheader.gifbin595 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/groupsheader.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/notationsheader.gifbin345 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_list_obj.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_restrict_obj.gifbin232 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_union_obj.gifbin244 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/typesheader.gifbin242 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/ovr16/attributeoverlay.gifbin117 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/ovr16/textoverlay.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/plugin.properties1047
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/plugin.xml205
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDDataTypeValueExtension.java195
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java79
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDActionBarContributor.java183
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDContentOutlinePage.java378
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java1148
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditorAdapter.java27
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditorContextIds.java460
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditorPlugin.java353
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMenuListener.java2056
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMultiPageEditorPart.java726
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDSelectionManager.java96
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java405
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDURIConverter.java87
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/AbstractAction.java68
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/AddAttributeAction.java40
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/AddEnumsAction.java92
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/AddModelGroupAction.java57
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/AddSchemaNodeAction.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/BackAction.java90
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateAnnotationAction.java55
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateAttributeAndRequired.java115
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateElementAction.java365
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateGroupAction.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateIdentityConstraintsAction.java74
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateLocalComplexTypeAction.java68
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateLocalSimpleTypeAction.java85
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateSimpleContentAction.java162
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateSimpleTypeAction.java68
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DOMAttribute.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DeleteAction.java237
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/GraphRenameAction.java23
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/ISchemaEditorActionConstants.java20
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/MakeAnonymousGlobal.java66
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/ModelMessage.java36
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/MoveAction.java182
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/OpenSchemaAction.java64
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/ReloadDependenciesAction.java58
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/SetBaseTypeAction.java384
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/XSDEditNamespacesAction.java221
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AbstractCommand.java71
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AddAttributeDeclarationCommand.java141
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AddComplexTypeDefinitionCommand.java53
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AddElementDeclarationCommand.java53
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AddModelGroupCommand.java103
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AddSimpleTypeDefinitionCommand.java56
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/RenameCommand.java66
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/BaseDragNodesCommand.java102
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/DragNodesCommand.java77
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/XSDDragAndDropManager.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/editparts/AbstractComponentViewerRootEditPart.java63
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/figures/ConnectedEditPartFigure.java138
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/figures/ConnectionRenderingFigure.java215
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/figures/ContainerFigure.java60
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/figures/ContainerLayout.java218
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/figures/FillLayout.java162
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/figures/IConnectedEditPartFigure.java30
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/figures/IConnectedFigure.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/figures/IConnectionRenderingViewer.java16
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/figures/IExpandable.java19
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/gef/util/figures/SpacingFigure.java27
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/BaseGraphicalViewer.java198
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/FigureCanvasKeyboardHandler.java125
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/GraphContextMenuProvider.java58
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/GraphicsConstants.java36
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/LinkedGraphViewer.java163
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/PrintGraphAction.java84
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDChildUtility.java285
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDComponentViewer.java105
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDGraphUtil.java35
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDGraphViewer.java598
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDGraphicalViewerKeyHandler.java352
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDInheritanceViewer.java98
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDSubstitutionGroupChildUtility.java46
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDSubstitutionGroupsViewer.java99
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/BaseEditPart.java86
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/CategoryEditPart.java187
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/ComplexTypeDefinitionEditPart.java215
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/ComplexTypeInheritedContentEditPart.java150
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/ComponentViewerRootEditPart.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/ElementDeclarationEditPart.java425
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/ExpandableGraphNodeEditPart.java189
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/GraphNodeEditPart.java144
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/IFeedbackHandler.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/MessageEditPart.java38
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/ModelGroupDefinitionEditPart.java204
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/ModelGroupEditPart.java187
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/RepeatableGraphNodeEditPart.java72
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/RootComplexTypeDefinitionEditPart.java121
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/RootModelGroupDefinitionEditPart.java105
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/SchemaDirectiveEditPart.java60
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/SchemaEditPart.java207
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/SimpleTypeDefinitionEditPart.java103
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/SubstitutionGroupViewerRootEditPart.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/TopLevelComponentEditPart.java316
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/TypeEditPart.java72
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/WildcardEditPart.java85
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editparts/XSDEditPartFactory.java102
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/ComboBoxCellEditorManager.java205
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/ComponentNameDirectEditManager.java104
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/DirectEditPolicyDelegate.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/DragAndDropCommand.java154
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/DragAndDropEditPolicy.java47
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/GraphNodeDragTracker.java34
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/SelectionHandlesEditPolicyImpl.java257
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/SimpleDirectEditPolicy.java58
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/TextCellEditorManager.java74
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/TypeReferenceDirectEditManager.java118
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/BogusLayout.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/CenterLayout.java118
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/CenteredIconFigure.java39
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/ConnectionFigure.java210
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/ContainerFigure.java71
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/ContainerLayout.java249
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/ExpandableGraphNodeFigure.java133
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/FillLayout.java161
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/FloatableFigure.java29
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/GraphNodeContainerFigure.java29
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/GraphNodeFigure.java184
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/Interactor.java54
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/LabelFigure.java88
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/PostLayoutManager.java19
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/RepeatableGraphNodeFigure.java85
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/figures/RoundedLineBorder.java67
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/model/Category.java266
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/model/ModelAdapter.java27
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/model/ModelAdapterListener.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/model/XSDModelAdapterFactory.java511
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/GenerateDtd.gifbin605 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/GenerateJava.gifbin609 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/GraphViewElementRef.gifbin860 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/NewXSD.gifbin3261 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/RegexWizardArrow.gifbin54 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/ValidateXSD.gifbin558 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDAll.gifbin88 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDAnnotate.gifbin594 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDAny.gifbin613 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDAnyAttribute.gifbin384 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDAppInfo.gifbin121 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDAttribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDAttributeGroup.gifbin235 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDAttributeGroupRef.gifbin361 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDAttributeRef.gifbin350 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDChoice.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDComplexContent.gifbin211 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDComplexType.gifbin155 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDDoc.gifbin368 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDElement.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDElementRef.gifbin585 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDExtension.gifbin101 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDField.gifbin227 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDFile.gifbin361 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDGlobalAttribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDGlobalElement.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDGroup.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDGroupRef.gifbin347 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDImport.gifbin114 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDInclude.gifbin324 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDKey.gifbin323 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDKeyRef.gifbin558 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDNotation.gifbin177 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDRedefine.gifbin373 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDSelector.gifbin136 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDSequence.gifbin91 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDSimpleContent.gifbin210 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDSimpleEnum.gifbin105 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDSimpleList.gifbin347 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDSimplePattern.gifbin120 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDSimpleRestrict.gifbin141 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDSimpleType.gifbin150 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDSimpleUnion.gifbin138 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/XSDUnique.gifbin210 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/back.gifbin873 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/browsebutton.gifbin825 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/forward.gifbin874 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/generate_xml.gifbin612 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/regx_wiz.gifbin3241 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/reloadgrammar.gifbin365 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/icons/sort.gifbin159 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/preferences/XSDPreferencePage.java256
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AnyAttributePropertySource.java173
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AnyContentPropertyDescriptor.java155
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AnyElementPropertySource.java228
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AppInfoPropertySource.java216
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AttributeGroupRefPropertySource.java172
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AttributePropertySource.java294
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AttributesTable.java331
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/BasePropertySource.java126
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ComplexTypePropertySource.java380
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/DocumentationPropertySource.java243
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/DynamicCellEditor.java1174
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ElementPropertySource.java546
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/EnumerationPropertySource.java131
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/FixedOrDefaultTextPropertyDescriptor.java307
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/GroupRefPropertySource.java229
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ImportPropertySource.java335
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/IncludePropertySource.java238
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/KeyrefPropertySource.java210
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ModelGroupPropertySource.java266
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/NamePropertySource.java219
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/NotationPropertySource.java186
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/OptionsTextCellEditor.java241
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/PatternPropertySource.java272
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ReadOnlyPropertySource.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SchemaDirectiveHelperPropertySource.java191
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SchemaPropertySource.java530
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleContentPropertyDescriptor.java209
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleContentPropertySource.java230
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleRestrictPropertySource.java362
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypeListPropertySource.java143
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypePropertySource.java183
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypeUnionPropertySource.java494
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/TypesPropertyDescriptor.java1160
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XPathPropertySource.java150
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XSDComboBoxPropertyDescriptor.java304
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XSDPropertySheetPage.java119
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XSDPropertySourceProvider.java285
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSection.java495
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSectionDescriptor.java108
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AnnotationSection.java595
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AnnotationSectionDescriptor.java109
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AttributesViewContentProvider.java289
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AttributesViewSection.java460
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AttributesViewSectionDescriptor.java101
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/ComplexTypeSection.java222
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/ComplexTypeSectionDescriptor.java82
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/EnumerationsSection.java434
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/EnumerationsSectionDescriptor.java87
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/FacetViewer.java498
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/FacetsSection.java802
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/FacetsSectionDescriptor.java87
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/MinMaxSection.java286
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/MinMaxSectionDescriptor.java145
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/ModelGroupSection.java144
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/ModelGroupSectionDescriptor.java102
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NameSection.java444
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NameSectionDescriptor.java169
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NamespaceAndSchemaLocationDescriptor.java87
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NamespaceAndSchemaLocationSection.java345
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NamespaceProcessContentsSection.java196
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NamespaceProcessContentsSectionDescriptor.java84
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NamespaceSection.java432
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NamespaceSectionDescriptor.java86
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/OtherAttributesSection.java125
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/OtherAttributesSectionDescriptor.java145
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/PatternSection.java165
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/PatternSectionDescriptor.java85
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/ReferenceSection.java290
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/ReferenceSectionDescriptor.java174
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/SchemaLocationDescriptor.java88
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/SchemaLocationSection.java183
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/SimpleContentBaseTypeOptionsDialog.java158
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/SimpleContentUnionMemberTypesDialog.java314
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/SimpleTypeSection.java541
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/SimpleTypeSectionDescriptor.java91
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/SimpleTypeUnionSection.java185
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/SimpleTypeUnionSectionDescriptor.java87
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/TextChangeHelper.java102
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/TypesDialog.java726
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/TypesSection.java326
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/TypesSectionDescriptor.java134
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/ValueSection.java118
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/ValueSectionDescriptor.java82
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/XSDSectionDescriptorProvider.java57
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/XSDSectionLabelProvider.java169
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/XSDTabbedPropertySheetPage.java140
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/XSDWorkbook.java97
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/XSDWorkbookPage.java51
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/CategoryAdapter.java168
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDAbstractAdapter.java165
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDAdapterFactoryLabelProvider.java160
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDAnnotationAdapter.java83
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDAttributeDeclarationAdapter.java113
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDAttributeGroupDefinitionAdapter.java100
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDAttributeUseAdapter.java90
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDComplexTypeDefinitionAdapter.java182
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDContentProvider.java305
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDElementDeclarationAdapter.java193
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDModelAdapterFactoryImpl.java422
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDModelGroupAdapter.java141
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDModelGroupDefinitionAdapter.java96
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDNotationDeclarationAdapter.java44
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDParticleAdapter.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDSchemaAdapter.java405
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDSchemaDirectiveAdapter.java102
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDSimpleTypeDefinitionAdapter.java193
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/provider/XSDWildcardAdapter.java112
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/XSDVisitor.java217
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/delete/BaseCleanup.java107
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/delete/BaseGlobalCleanup.java29
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/delete/GlobalAttributeCleanup.java106
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/delete/GlobalAttributeGroupCleanup.java102
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/delete/GlobalElementCleanup.java84
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/delete/GlobalGroupCleanup.java84
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/delete/GlobalSimpleOrComplexTypeCleanup.java141
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/delete/XSDExternalFileCleanup.java299
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/BaseRenamer.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/GlobalAttributeGroupRenamer.java57
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/GlobalAttributeRenamer.java66
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/GlobalElementRenamer.java41
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/GlobalGroupRenamer.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/GlobalSimpleOrComplexTypeRenamer.java91
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/SchemaPrefixChangeHandler.java212
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/TargetNamespaceChangeHandler.java154
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/OpenOnSelectionHelper.java322
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/SelectionAdapter.java83
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/TypesHelper.java762
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/ViewUtility.java429
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/XSDDOMHelper.java1103
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/XSDSchemaHelper.java72
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/widgets/EnumerationsDialog.java106
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/widgets/SetBaseTypeDialog.java180
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/widgets/TypeSection.java340
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/widgets/XSDEditSchemaInfoDialog.java84
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/wizards/NewXSDWizard.java168
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/wizards/RegexCompositionPage.java965
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/wizards/RegexNode.java421
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/wizards/RegexTestingPage.java161
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/wizards/RegexWizard.java65
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/wizards/XSDLocationChoicePage.java71
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/wizards/XSDNewFilePage.java130
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/wizards/XSDSelectIncludeFileWizard.java371
1404 files changed, 0 insertions, 196739 deletions
diff --git a/bundles/org.eclipse.wst.css.core/.classpath b/bundles/org.eclipse.wst.css.core/.classpath
deleted file mode 100644
index df094ee4a7..0000000000
--- a/bundles/org.eclipse.wst.css.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <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.css.core/.compatibility b/bundles/org.eclipse.wst.css.core/.compatibility
deleted file mode 100644
index b943e425e3..0000000000
--- a/bundles/org.eclipse.wst.css.core/.compatibility
+++ /dev/null
@@ -1,2 +0,0 @@
-#Wed Mar 24 13:53:52 EST 2004
-.project=8811
diff --git a/bundles/org.eclipse.wst.css.core/.cvsignore b/bundles/org.eclipse.wst.css.core/.cvsignore
deleted file mode 100644
index 0e7c86bf57..0000000000
--- a/bundles/org.eclipse.wst.css.core/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-temp.folder
-cssmodel.jar
-build.xml
-dev.properties
diff --git a/bundles/org.eclipse.wst.css.core/.options b/bundles/org.eclipse.wst.css.core/.options
deleted file mode 100644
index 490975b210..0000000000
--- a/bundles/org.eclipse.wst.css.core/.options
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.wst.css.core/debug=true
-org.eclipse.wst.css.core/debug/tracefilter= \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/.project b/bundles/org.eclipse.wst.css.core/.project
deleted file mode 100644
index bb046e9d84..0000000000
--- a/bundles/org.eclipse.wst.css.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.css.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.css.core/build.properties b/bundles/org.eclipse.wst.css.core/build.properties
deleted file mode 100644
index 78aa1c4e21..0000000000
--- a/bundles/org.eclipse.wst.css.core/build.properties
+++ /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
-###############################################################################
-bin.includes = plugin.xml,\
- *.jar,\
- css.jar,\
- cssprofile/,\
- .options,\
- plugin.properties
-source.cssmodel.jar = src/
-src.includes = plugin.xml,\
- cssprofile/,\
- build.xml,\
- .options,\
- plugin.properties
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/css-profile.dtd b/bundles/org.eclipse.wst.css.core/cssprofile/css-profile.dtd
deleted file mode 100644
index 35535a837c..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/css-profile.dtd
+++ /dev/null
@@ -1,132 +0,0 @@
-<!-- DTD for CSS Meta Model Profile -->
-
-<!-- Entities -->
-
-<!-- name-definition : In defining meta model object, object name -->
-<!-- is given by using this attribute. -->
-
-<!ENTITY % name-definition 'name CDATA #REQUIRED' >
-
-<!-- name-reference : used to refer meta model object that defined -->
-<!-- by name-definition -->
-
-<!ENTITY % name-reference 'name CDATA #REQUIRED' >
-
-<!-- availability : CSS Meta Model Profile permit importing -->
-<!-- other profile and describe difference for it. -->
-
-<!ENTITY % availability 'enabled (true | false) "true"' >
-<!ENTITY % overwrite 'overwrite (true | false) "false"' >
-
-<!-- ******************** -->
-<!-- elments/attributes -->
-<!-- ******************** -->
-
-<!ELEMENT css-profile (profile-import? , (stylesheet-def | charset-rule-def | import-rule-def | page-rule-def | media-rule-def | fontface-rule-def | style-rule-def | property-def | descriptor-def | container-def | function-def | number-def | unit-def | keyword-def | category-def | pseudo-element-def | pseudo-class-def)*) >
-
-<!-- a profile can include other profile -->
-
-<!ELEMENT profile-import EMPTY >
-<!ATTLIST profile-import name CDATA #REQUIRED >
-
-<!-- which type of rule can be used? -->
-
-<!ELEMENT stylesheet-def (description? , (charset-rule | import-rule | page-rule | media-rule | fontface-rule | style-rule)*) >
-<!ATTLIST stylesheet-def %overwrite; >
-
-<!ELEMENT charset-rule EMPTY >
-<!ATTLIST charset-rule %availability; >
-<!ELEMENT import-rule EMPTY >
-<!ATTLIST import-rule %availability; >
-<!ELEMENT page-rule EMPTY >
-<!ATTLIST page-rule %availability; >
-<!ELEMENT media-rule EMPTY >
-<!ATTLIST media-rule %availability; >
-<!ELEMENT fontface-rule EMPTY >
-<!ATTLIST fontface-rule %availability; >
-<!ELEMENT style-rule EMPTY >
-<!ATTLIST style-rule %availability; >
-
-<!ELEMENT charset-rule-def (description?) >
-<!ATTLIST charset-rule-def %overwrite; >
-
-<!ELEMENT import-rule-def (description?) >
-<!ATTLIST import-rule-def %overwrite; >
-
-<!ELEMENT page-rule-def (description? , (property | pseudo-class)*) >
-<!ATTLIST page-rule-def %overwrite; >
-
-<!ELEMENT media-rule-def (description?) >
-<!ATTLIST media-rule-def %overwrite; >
-
-<!ELEMENT fontface-rule-def (description? , descriptor*) >
-<!ATTLIST fontface-rule-def %overwrite; >
-
-<!ELEMENT style-rule-def (description? , (property | selector-expression | pseudo-class | pseudo-element)*) >
-<!ATTLIST style-rule-def %overwrite; >
-
-<!ELEMENT selector-expression EMPTY >
-<!ATTLIST selector-expression name (descendant | child | adjacent | universal | attribute) #REQUIRED %availability; >
-
-<!ELEMENT pseudo-class EMPTY >
-<!ATTLIST pseudo-class %name-reference; %availability; >
-
-<!ELEMENT pseudo-element EMPTY >
-<!ATTLIST pseudo-element %name-reference; %availability; >
-
-<!ELEMENT pseudo-class-def (description?, selector-value) >
-<!ATTLIST pseudo-class-def %name-definition; %overwrite; >
-<!ELEMENT selector-value (#PCDATA) >
-
-<!ELEMENT pseudo-element-def (description?, selector-value) >
-<!ATTLIST pseudo-element-def %name-definition; %overwrite; >
-
-<!ELEMENT keyword-def (description? , keyword-value) >
-<!ATTLIST keyword-def %name-definition; %overwrite; >
-<!ELEMENT keyword-value (#PCDATA) >
-<!ELEMENT description (#PCDATA) >
-
-<!ELEMENT function-def (description? , function-value) >
-<!ATTLIST function-def %name-definition; %overwrite; >
-<!ELEMENT function-value (#PCDATA) >
-
-<!ELEMENT number-def (description? , unit*) >
-<!ATTLIST number-def %name-definition; %overwrite; >
-<!ELEMENT unit EMPTY >
-<!ATTLIST unit %name-reference; %availability; >
-
-<!ELEMENT unit-def (description? , unit-value) >
-<!ATTLIST unit-def %name-definition; %overwrite; >
-<!ELEMENT unit-value (#PCDATA) >
-
-<!ELEMENT container-def (description? , (number | keyword | function | container)*) >
-<!ATTLIST container-def %name-definition; %overwrite; >
-
-<!ELEMENT category-def (description?, caption) >
-<!ATTLIST category-def %name-definition; %overwrite; >
-<!ELEMENT caption (#PCDATA) >
-
-<!ELEMENT property-def (description? , (number | keyword | function | container | string | separator | property)*) >
-<!ATTLIST property-def %name-definition; %overwrite;
- inherited (yes | no | na) "na"
- mediagroup CDATA #IMPLIED
- category CDATA #IMPLIED >
-<!ELEMENT descriptor-def (description?, (number | keyword | function | container | string | separator | property)*) >
-<!ATTLIST descriptor-def %name-definition; %overwrite; >
-
-<!ELEMENT number EMPTY >
-<!ATTLIST number %name-reference; %availability; >
-<!ELEMENT keyword EMPTY >
-<!ATTLIST keyword %name-reference; %availability; >
-<!ELEMENT function EMPTY >
-<!ATTLIST function %name-reference; %availability; >
-<!ELEMENT container EMPTY >
-<!ATTLIST container %name-reference; %availability; >
-<!ELEMENT string EMPTY >
-<!ATTLIST string %name-reference; %availability; >
-<!ELEMENT separator EMPTY >
-<!ATTLIST separator name (comma | slash) #REQUIRED %availability; >
-<!ELEMENT property EMPTY >
-<!ATTLIST property %name-reference; %availability; >
-<!ELEMENT descriptor EMPTY >
-<!ATTLIST descriptor %name-reference; %availability; >
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css1.xml b/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css1.xml
deleted file mode 100644
index 6b0b175319..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css1.xml
+++ /dev/null
@@ -1,826 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--<!DOCTYPE css-profile SYSTEM "css-profile.dtd" >-->
-<css-profile>
- <stylesheet-def>
- <description>%css1.stylesheet-def.description</description>
- <import-rule/>
- <style-rule/>
- </stylesheet-def>
-
- <import-rule-def>
- </import-rule-def>
-
- <style-rule-def>
- <selector-expression name="descendant"/>
- <pseudo-element name="first-line"/>
- <pseudo-element name="first-letter"/>
- <pseudo-class name="link"/>
- <pseudo-class name="visited"/>
- <pseudo-class name="active"/>
- <property name="background"/>
- <property name="background-attachment"/>
- <property name="background-color"/>
- <property name="background-image"/>
- <property name="background-position"/>
- <property name="background-repeat"/>
- <property name="border"/>
- <property name="border-bottom"/>
- <property name="border-bottom-width"/>
- <property name="border-color"/>
- <property name="border-left"/>
- <property name="border-left-width"/>
- <property name="border-right"/>
- <property name="border-right-width"/>
- <property name="border-style"/>
- <property name="border-top"/>
- <property name="border-top-width"/>
- <property name="border-width"/>
- <property name="clear"/>
- <property name="color"/>
- <property name="display"/>
- <property name="float"/>
- <property name="font"/>
- <property name="font-family"/>
- <property name="font-size"/>
- <property name="font-style"/>
- <property name="font-variant"/>
- <property name="font-weight"/>
- <property name="height"/>
- <property name="letter-spacing"/>
- <property name="line-height"/>
- <property name="list-style"/>
- <property name="list-style-image"/>
- <property name="list-style-position"/>
- <property name="list-style-type"/>
- <property name="margin"/>
- <property name="margin-bottom"/>
- <property name="margin-left"/>
- <property name="margin-right"/>
- <property name="margin-top"/>
- <property name="padding"/>
- <property name="padding-bottom"/>
- <property name="padding-left"/>
- <property name="padding-right"/>
- <property name="padding-top"/>
- <property name="text-align"/>
- <property name="text-decoration"/>
- <property name="text-indent"/>
- <property name="text-transform"/>
- <property name="vertical-align"/>
- <property name="white-space"/>
- <property name="width"/>
- <property name="word-spacing"/>
- </style-rule-def>
-
- <pseudo-class-def name="link">
- <selector-value>link</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="visited">
- <selector-value>visited</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="active">
- <selector-value>active</selector-value>
- </pseudo-class-def>
-
- <pseudo-element-def name="first-line">
- <selector-value>first-line</selector-value>
- </pseudo-element-def>
- <pseudo-element-def name="first-letter">
- <selector-value>first-letter</selector-value>
- </pseudo-element-def>
-
- <!-- property definition -->
-
- <property-def name="background" inherited="no" category="colorandbackground">
- <property name="background-color"/>
- <property name="background-image"/>
- <property name="background-repeat"/>
- <property name="background-attachment"/>
- <property name="background-position"/>
- </property-def>
- <property-def name="background-attachment" inherited="no" category="colorandbackground">
- <keyword name="scroll"/>
- <keyword name="fixed"/>
- </property-def>
- <property-def name="background-color" inherited="no" category="colorandbackground">
- <container name="color"/>
- <keyword name="transparent"/>
- </property-def>
- <property-def name="background-image" inherited="no" category="colorandbackground">
- <function name="uri"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="background-position" inherited="no" category="colorandbackground">
- <number name="percentage"/>
- <number name="length"/>
- <keyword name="top"/>
- <keyword name="center"/>
- <keyword name="bottom"/>
- <keyword name="left"/>
- <keyword name="right"/>
- </property-def>
- <property-def name="background-repeat" inherited="no" category="colorandbackground">
- <keyword name="repeat"/>
- <keyword name="repeat-x"/>
- <keyword name="repeat-y"/>
- <keyword name="no-repeat"/>
- </property-def>
- <property-def name="border" inherited="no" category="box">
- <property name="border-width"/>
- <property name="border-style"/>
- <container name="color"/>
- </property-def>
- <property-def name="border-color" inherited="no" category="box">
- <container name="color"/>
- </property-def>
- <property-def name="border-style" inherited="no" category="box">
- <keyword name="none"/>
- <keyword name="dotted"/>
- <keyword name="dashed"/>
- <keyword name="solid"/>
- <keyword name="double"/>
- <keyword name="groove"/>
- <keyword name="ridge"/>
- <keyword name="inset"/>
- <keyword name="outset"/>
- </property-def>
- <property-def name="border-top" inherited="no" category="box">
- <property name="border-top-width"/>
- <property name="border-style"/>
- <container name="color"/>
- </property-def>
- <property-def name="border-right" inherited="no" category="box">
- <property name="border-right-width"/>
- <property name="border-style"/>
- <container name="color"/>
- </property-def>
- <property-def name="border-bottom" inherited="no" category="box">
- <property name="border-bottom-width"/>
- <property name="border-style"/>
- <container name="color"/>
- </property-def>
- <property-def name="border-left" inherited="no" category="box">
- <property name="border-left-width"/>
- <property name="border-style"/>
- <container name="color"/>
- </property-def>
- <property-def name="border-top-width" inherited="no" category="box">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </property-def>
- <property-def name="border-right-width" inherited="no" category="box">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </property-def>
- <property-def name="border-bottom-width" inherited="no" category="box">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </property-def>
- <property-def name="border-left-width" inherited="no" category="box">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </property-def>
- <property-def name="border-width" inherited="no" category="box">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </property-def>
- <property-def name="clear" inherited="no" category="box">
- <keyword name="none"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="both"/>
- </property-def>
- <property-def name="color" inherited="yes" category="colorandbackground">
- <container name="color"/>
- </property-def>
- <property-def name="display" inherited="no" category="classification">
- <keyword name="block"/>
- <keyword name="inline"/>
- <keyword name="list-item"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="float" inherited="no" category="box">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="font"
- inherited="yes" category="font">
- <property name="font-style"/>
- <property name="font-variant"/>
- <property name="font-weight"/>
- <property name="font-size"/>
- <property name="line-height"/>
- <property name="font-family"/>
- <separator name="slash"/>
- </property-def>
- <property-def name="font-family" inherited="yes" category="font">
- <string name="family-name"/>
- <container name="generic-family"/>
- <separator name="comma"/>
- </property-def>
- <property-def name="font-size" inherited="yes" category="font">
- <container name="absolute-size"/>
- <container name="relative-size"/>
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="font-style" inherited="yes" category="font">
- <keyword name="normal"/>
- <keyword name="italic"/>
- <keyword name="oblique"/>
- </property-def>
- <property-def name="font-variant" inherited="yes" category="font">
- <keyword name="normal"/>
- <keyword name="small-caps"/>
- </property-def>
- <property-def name="font-weight" inherited="yes" category="font">
- <keyword name="normal"/>
- <keyword name="bold"/>
- <keyword name="bolder"/>
- <keyword name="lighter"/>
- <keyword name="100"/>
- <keyword name="200"/>
- <keyword name="300"/>
- <keyword name="400"/>
- <keyword name="500"/>
- <keyword name="600"/>
- <keyword name="700"/>
- <keyword name="800"/>
- <keyword name="900"/>
- </property-def>
- <property-def name="height" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="letter-spacing" inherited="yes" category="text">
- <keyword name="normal"/>
- <number name="length"/>
- </property-def>
- <property-def name="line-height" inherited="yes" category="text">
- <keyword name="normal"/>
- <number name="number"/>
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="list-style" inherited="yes" category="classification">
- <keyword name="disc"/>
- <keyword name="circle"/>
- <keyword name="square"/>
- <keyword name="decimal"/>
- <keyword name="lower-roman"/>
- <keyword name="upper-roman"/>
- <keyword name="lower-alpha"/>
- <keyword name="upper-alpha"/>
- <keyword name="none"/>
- <keyword name="inside"/>
- <keyword name="outside"/>
- <function name="uri"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="list-style-image" inherited="yes" category="classification">
- <function name="uri"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="list-style-position" inherited="yes" category="classification">
- <keyword name="inside"/>
- <keyword name="outside"/>
- </property-def>
- <property-def name="list-style-type" inherited="yes" category="classification">
- <keyword name="disc"/>
- <keyword name="circle"/>
- <keyword name="square"/>
- <keyword name="decimal"/>
- <keyword name="lower-roman"/>
- <keyword name="upper-roman"/>
- <keyword name="lower-alpha"/>
- <keyword name="upper-alpha"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="margin" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="margin-top" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="margin-right" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="margin-bottom" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="margin-left" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="padding" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="padding-top" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="padding-right" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="padding-bottom" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="padding-left" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="text-align" inherited="yes" category="text">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="center"/>
- <keyword name="justify"/>
- </property-def>
- <property-def name="text-decoration" inherited="no" category="text">
- <keyword name="none"/>
- <keyword name="underline"/>
- <keyword name="overline"/>
- <keyword name="line-through"/>
- <keyword name="blink"/>
- </property-def>
- <property-def name="text-indent" inherited="yes" category="text">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="text-transform" inherited="yes" category="text">
- <keyword name="capitalize"/>
- <keyword name="uppercase"/>
- <keyword name="lowercase"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="vertical-align" inherited="no" category="text">
- <keyword name="baseline"/>
- <keyword name="sub"/>
- <keyword name="super"/>
- <keyword name="top"/>
- <keyword name="text-top"/>
- <keyword name="middle"/>
- <keyword name="bottom"/>
- <keyword name="text-bottom"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="white-space" inherited="yes" category="classification">
- <keyword name="normal"/>
- <keyword name="pre"/>
- <keyword name="nowrap"/>
- </property-def>
- <property-def name="width" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="word-spacing" inherited="yes" category="text">
- <keyword name="normal"/>
- <number name="length"/>
- </property-def>
-
- <!-- container definition : Container is the lump of values.
- It can be used like macros. -->
- <container-def name="absolute-size">
- <keyword name="xx-small"/>
- <keyword name="x-small"/>
- <keyword name="small"/>
- <keyword name="medium"/>
- <keyword name="large"/>
- <keyword name="x-large"/>
- <keyword name="xx-large"/>
- </container-def>
- <container-def name="color">
- <keyword name="aqua"/>
- <keyword name="black"/>
- <keyword name="blue"/>
- <keyword name="fuchsia"/>
- <keyword name="gray"/>
- <keyword name="green"/>
- <keyword name="lime"/>
- <keyword name="maroon"/>
- <keyword name="navy"/>
- <keyword name="olive"/>
- <keyword name="purple"/>
- <keyword name="red"/>
- <keyword name="silver"/>
- <keyword name="teal"/>
- <keyword name="white"/>
- <keyword name="yellow"/>
- <function name="rgb"/>
- <number name="hash"/>
- </container-def>
- <container-def name="generic-family">
- <keyword name="serif"/>
- <keyword name="sans-serif"/>
- <keyword name="cursive"/>
- <keyword name="fantasy"/>
- <keyword name="monospace"/>
- </container-def>
- <container-def name="relative-size">
- <keyword name="smaller"/>
- <keyword name="larger"/>
- </container-def>
-
- <!-- category definition : This is used to categorize properties
- in Properties View. -->
- <category-def name="box">
- <caption>%css1.category-def.box.caption</caption>
- </category-def>
- <category-def name="colorandbackground">
- <caption>%css1.category-def.colorandbackground.caption</caption>
- </category-def>
- <category-def name="classification">
- <caption>%css1.category-def.classification.caption</caption>
- </category-def>
- <category-def name="font">
- <caption>%css1.category-def.font.caption</caption>
- </category-def>
- <category-def name="text">
- <caption>%css1.category-def.text.caption</caption>
- </category-def>
-
- <function-def name="rgb">
- <function-value>rgb</function-value>
- </function-def>
- <function-def name="uri">
- <function-value>url</function-value>
- </function-def>
-
- <!-- number definition : What unit types be acceptable for each
- number type? -->
- <number-def name="hash">
- <unit name="hash"/>
- </number-def>
- <number-def name="length">
- <unit name="em"/>
- <unit name="ex"/>
- <unit name="px"/>
- <unit name="in"/>
- <unit name="cm"/>
- <unit name="mm"/>
- <unit name="pt"/>
- <unit name="pc"/>
- </number-def>
- <number-def name="number">
- </number-def>
- <number-def name="percentage">
- <unit name="percentage"/>
- </number-def>
-
- <unit-def name="cm">
- <unit-value>cm</unit-value>
- </unit-def>
- <unit-def name="em">
- <unit-value>em</unit-value>
- </unit-def>
- <unit-def name="ex">
- <unit-value>ex</unit-value>
- </unit-def>
- <unit-def name="hash">
- <unit-value>#</unit-value>
- </unit-def>
- <unit-def name="in">
- <unit-value>in</unit-value>
- </unit-def>
- <unit-def name="mm">
- <unit-value>mm</unit-value>
- </unit-def>
- <unit-def name="pc">
- <unit-value>pc</unit-value>
- </unit-def>
- <unit-def name="percentage">
- <unit-value>%</unit-value>
- </unit-def>
- <unit-def name="pt">
- <unit-value>pt</unit-value>
- </unit-def>
- <unit-def name="px">
- <unit-value>px</unit-value>
- </unit-def>
-
- <!-- keywords : string constants (this is last part..) -->
- <keyword-def name="100">
- <keyword-value>100</keyword-value>
- </keyword-def>
- <keyword-def name="200">
- <keyword-value>200</keyword-value>
- </keyword-def>
- <keyword-def name="300">
- <keyword-value>300</keyword-value>
- </keyword-def>
- <keyword-def name="400">
- <keyword-value>400</keyword-value>
- </keyword-def>
- <keyword-def name="500">
- <keyword-value>500</keyword-value>
- </keyword-def>
- <keyword-def name="600">
- <keyword-value>600</keyword-value>
- </keyword-def>
- <keyword-def name="700">
- <keyword-value>700</keyword-value>
- </keyword-def>
- <keyword-def name="800">
- <keyword-value>800</keyword-value>
- </keyword-def>
- <keyword-def name="900">
- <keyword-value>900</keyword-value>
- </keyword-def>
- <keyword-def name="aqua">
- <keyword-value>aqua</keyword-value>
- </keyword-def>
- <keyword-def name="auto">
- <keyword-value>auto</keyword-value>
- </keyword-def>
- <keyword-def name="baseline">
- <keyword-value>baseline</keyword-value>
- </keyword-def>
- <keyword-def name="black">
- <keyword-value>black</keyword-value>
- </keyword-def>
- <keyword-def name="blink">
- <keyword-value>blink</keyword-value>
- </keyword-def>
- <keyword-def name="block">
- <keyword-value>block</keyword-value>
- </keyword-def>
- <keyword-def name="blue">
- <keyword-value>blue</keyword-value>
- </keyword-def>
- <keyword-def name="bold">
- <keyword-value>bold</keyword-value>
- </keyword-def>
- <keyword-def name="bolder">
- <keyword-value>bolder</keyword-value>
- </keyword-def>
- <keyword-def name="both">
- <keyword-value>both</keyword-value>
- </keyword-def>
- <keyword-def name="bottom">
- <keyword-value>bottom</keyword-value>
- </keyword-def>
- <keyword-def name="capitalize">
- <keyword-value>capitalize</keyword-value>
- </keyword-def>
- <keyword-def name="center">
- <keyword-value>center</keyword-value>
- </keyword-def>
- <keyword-def name="circle">
- <keyword-value>circle</keyword-value>
- </keyword-def>
- <keyword-def name="cursive">
- <keyword-value>cursive</keyword-value>
- </keyword-def>
- <keyword-def name="dashed">
- <keyword-value>dashed</keyword-value>
- </keyword-def>
- <keyword-def name="decimal">
- <keyword-value>decimal</keyword-value>
- </keyword-def>
- <keyword-def name="disc">
- <keyword-value>disc</keyword-value>
- </keyword-def>
- <keyword-def name="dotted">
- <keyword-value>dotted</keyword-value>
- </keyword-def>
- <keyword-def name="double">
- <keyword-value>double</keyword-value>
- </keyword-def>
- <keyword-def name="fantasy">
- <keyword-value>fantasy</keyword-value>
- </keyword-def>
- <keyword-def name="fixed">
- <keyword-value>fixed</keyword-value>
- </keyword-def>
- <keyword-def name="fuchsia">
- <keyword-value>fuchsia</keyword-value>
- </keyword-def>
- <keyword-def name="gray">
- <keyword-value>gray</keyword-value>
- </keyword-def>
- <keyword-def name="green">
- <keyword-value>green</keyword-value>
- </keyword-def>
- <keyword-def name="groove">
- <keyword-value>groove</keyword-value>
- </keyword-def>
- <keyword-def name="inline">
- <keyword-value>inline</keyword-value>
- </keyword-def>
- <keyword-def name="inset">
- <keyword-value>inset</keyword-value>
- </keyword-def>
- <keyword-def name="inside">
- <keyword-value>inside</keyword-value>
- </keyword-def>
- <keyword-def name="italic">
- <keyword-value>italic</keyword-value>
- </keyword-def>
- <keyword-def name="justify">
- <keyword-value>justify</keyword-value>
- </keyword-def>
- <keyword-def name="large">
- <keyword-value>large</keyword-value>
- </keyword-def>
- <keyword-def name="larger">
- <keyword-value>larger</keyword-value>
- </keyword-def>
- <keyword-def name="left">
- <keyword-value>left</keyword-value>
- </keyword-def>
- <keyword-def name="lighter">
- <keyword-value>lighter</keyword-value>
- </keyword-def>
- <keyword-def name="lime">
- <keyword-value>lime</keyword-value>
- </keyword-def>
- <keyword-def name="line-through">
- <keyword-value>line-through</keyword-value>
- </keyword-def>
- <keyword-def name="list-item">
- <keyword-value>list-item</keyword-value>
- </keyword-def>
- <keyword-def name="lower-alpha">
- <keyword-value>lower-alpha</keyword-value>
- </keyword-def>
- <keyword-def name="lower-roman">
- <keyword-value>lower-roman</keyword-value>
- </keyword-def>
- <keyword-def name="lowercase">
- <keyword-value>lowercase</keyword-value>
- </keyword-def>
- <keyword-def name="maroon">
- <keyword-value>maroon</keyword-value>
- </keyword-def>
- <keyword-def name="medium">
- <keyword-value>medium</keyword-value>
- </keyword-def>
- <keyword-def name="middle">
- <keyword-value>middle</keyword-value>
- </keyword-def>
- <keyword-def name="monospace">
- <keyword-value>monospace</keyword-value>
- </keyword-def>
- <keyword-def name="navy">
- <keyword-value>navy</keyword-value>
- </keyword-def>
- <keyword-def name="no-repeat">
- <keyword-value>no-repeat</keyword-value>
- </keyword-def>
- <keyword-def name="none">
- <keyword-value>none</keyword-value>
- </keyword-def>
- <keyword-def name="normal">
- <keyword-value>normal</keyword-value>
- </keyword-def>
- <keyword-def name="nowrap">
- <keyword-value>nowrap</keyword-value>
- </keyword-def>
- <keyword-def name="oblique">
- <keyword-value>oblique</keyword-value>
- </keyword-def>
- <keyword-def name="olive">
- <keyword-value>olive</keyword-value>
- </keyword-def>
- <keyword-def name="outset">
- <keyword-value>outset</keyword-value>
- </keyword-def>
- <keyword-def name="outside">
- <keyword-value>outside</keyword-value>
- </keyword-def>
- <keyword-def name="overline">
- <keyword-value>overline</keyword-value>
- </keyword-def>
- <keyword-def name="pre">
- <keyword-value>pre</keyword-value>
- </keyword-def>
- <keyword-def name="purple">
- <keyword-value>purple</keyword-value>
- </keyword-def>
- <keyword-def name="red">
- <keyword-value>red</keyword-value>
- </keyword-def>
- <keyword-def name="repeat">
- <keyword-value>repeat</keyword-value>
- </keyword-def>
- <keyword-def name="repeat-x">
- <keyword-value>repeat-x</keyword-value>
- </keyword-def>
- <keyword-def name="repeat-y">
- <keyword-value>repeat-y</keyword-value>
- </keyword-def>
- <keyword-def name="ridge">
- <keyword-value>ridge</keyword-value>
- </keyword-def>
- <keyword-def name="right">
- <keyword-value>right</keyword-value>
- </keyword-def>
- <keyword-def name="sans-serif">
- <keyword-value>sans-serif</keyword-value>
- </keyword-def>
- <keyword-def name="scroll">
- <keyword-value>scroll</keyword-value>
- </keyword-def>
- <keyword-def name="serif">
- <keyword-value>serif</keyword-value>
- </keyword-def>
- <keyword-def name="silver">
- <keyword-value>silver</keyword-value>
- </keyword-def>
- <keyword-def name="small">
- <keyword-value>small</keyword-value>
- </keyword-def>
- <keyword-def name="small-caps">
- <keyword-value>small-caps</keyword-value>
- </keyword-def>
- <keyword-def name="smaller">
- <keyword-value>smaller</keyword-value>
- </keyword-def>
- <keyword-def name="solid">
- <keyword-value>solid</keyword-value>
- </keyword-def>
- <keyword-def name="square">
- <keyword-value>square</keyword-value>
- </keyword-def>
- <keyword-def name="sub">
- <keyword-value>sub</keyword-value>
- </keyword-def>
- <keyword-def name="super">
- <keyword-value>super</keyword-value>
- </keyword-def>
- <keyword-def name="teal">
- <keyword-value>teal</keyword-value>
- </keyword-def>
- <keyword-def name="text-top">
- <keyword-value>text-top</keyword-value>
- </keyword-def>
- <keyword-def name="text-bottom">
- <keyword-value>text-bottom</keyword-value>
- </keyword-def>
- <keyword-def name="thick">
- <keyword-value>thick</keyword-value>
- </keyword-def>
- <keyword-def name="thin">
- <keyword-value>thin</keyword-value>
- </keyword-def>
- <keyword-def name="top">
- <keyword-value>top</keyword-value>
- </keyword-def>
- <keyword-def name="transparent">
- <keyword-value>transparent</keyword-value>
- </keyword-def>
- <keyword-def name="underline">
- <keyword-value>underline</keyword-value>
- </keyword-def>
- <keyword-def name="upper-alpha">
- <keyword-value>upper-alpha</keyword-value>
- </keyword-def>
- <keyword-def name="upper-roman">
- <keyword-value>upper-roman</keyword-value>
- </keyword-def>
- <keyword-def name="uppercase">
- <keyword-value>uppercase</keyword-value>
- </keyword-def>
- <keyword-def name="white">
- <keyword-value>white</keyword-value>
- </keyword-def>
- <keyword-def name="x-large">
- <keyword-value>x-large</keyword-value>
- </keyword-def>
- <keyword-def name="x-small">
- <keyword-value>x-small</keyword-value>
- </keyword-def>
- <keyword-def name="xx-small">
- <keyword-value>xx-small</keyword-value>
- </keyword-def>
- <keyword-def name="xx-large">
- <keyword-value>xx-large</keyword-value>
- </keyword-def>
- <keyword-def name="yellow">
- <keyword-value>yellow</keyword-value>
- </keyword-def>
-</css-profile> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css2.xml b/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css2.xml
deleted file mode 100644
index 4efc084b91..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css2.xml
+++ /dev/null
@@ -1,2258 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--<!DOCTYPE css-profile SYSTEM "css-profile.dtd" >-->
-<css-profile>
- <stylesheet-def>
- <description>%css2.stylesheet-def.description</description>
- <charset-rule/>
- <import-rule/>
- <page-rule/>
- <media-rule/>
- <fontface-rule/>
- <style-rule/>
- </stylesheet-def>
-
- <charset-rule-def>
- </charset-rule-def>
- <import-rule-def>
- </import-rule-def>
- <media-rule-def>
- </media-rule-def>
-
- <page-rule-def>
- <pseudo-class name="left"/>
- <pseudo-class name="right"/>
- <pseudo-class name="first"/>
- <property name="size"/>
- <property name="marks"/>
- <property name="page-break-after"/>
- <property name="page-break-before"/>
- <property name="page-break-inside"/>
- <property name="orphans"/>
- <property name="widows"/>
- </page-rule-def>
-
- <fontface-rule-def>
- <descriptor name="ascent"/>
- <descriptor name="baseline"/>
- <descriptor name="bbox"/>
- <descriptor name="cap-height"/>
- <descriptor name="centerline"/>
- <descriptor name="definition-src"/>
- <descriptor name="descent"/>
- <descriptor name="font-family"/>
- <descriptor name="font-size"/>
- <descriptor name="font-stretch"/>
- <descriptor name="font-style"/>
- <descriptor name="font-variant"/>
- <descriptor name="font-weight"/>
- <descriptor name="mathline"/>
- <descriptor name="panose-1"/>
- <descriptor name="slope"/>
- <descriptor name="slope"/>
- <descriptor name="src"/>
- <descriptor name="stemh"/>
- <descriptor name="stemv"/>
- <descriptor name="topline"/>
- <descriptor name="unicode-range"/>
- <descriptor name="units-per-em"/>
- <descriptor name="widths"/>
- <descriptor name="x-height"/>
- </fontface-rule-def>
-
- <!-- Which properties can style rule include ? -->
-
- <style-rule-def>
- <selector-expression name="descendant"/>
- <selector-expression name="child"/>
- <selector-expression name="adjacent"/>
- <selector-expression name="universal"/>
- <selector-expression name="attribute"/>
- <pseudo-element name="first-line"/>
- <pseudo-element name="first-letter"/>
- <pseudo-element name="before"/>
- <pseudo-element name="after"/>
- <pseudo-class name="first-child"/>
- <pseudo-class name="link"/>
- <pseudo-class name="visited"/>
- <pseudo-class name="hover"/>
- <pseudo-class name="active"/>
- <pseudo-class name="focus"/>
- <pseudo-class name="lang"/>
- <property name="azimuth"/>
- <property name="background"/>
- <property name="background-attachment"/>
- <property name="background-color"/>
- <property name="background-image"/>
- <property name="background-position"/>
- <property name="background-repeat"/>
- <property name="border"/>
- <property name="border-collapse"/>
- <property name="border-color"/>
- <property name="border-spacing"/>
- <property name="border-style"/>
- <property name="border-top"/>
- <property name="border-right"/>
- <property name="border-bottom"/>
- <property name="border-left"/>
- <property name="border-top-color"/>
- <property name="border-right-color"/>
- <property name="border-bottom-color"/>
- <property name="border-left-color"/>
- <property name="border-top-style"/>
- <property name="border-right-style"/>
- <property name="border-bottom-style"/>
- <property name="border-left-style"/>
- <property name="border-top-width"/>
- <property name="border-right-width"/>
- <property name="border-bottom-width"/>
- <property name="border-left-width"/>
- <property name="border-width"/>
- <property name="bottom"/>
- <property name="caption-side"/>
- <property name="clear"/>
- <property name="clip"/>
- <property name="color"/>
- <property name="content"/>
- <property name="counter-increment"/>
- <property name="counter-reset"/>
- <property name="cue"/>
- <property name="cue-after"/>
- <property name="cue-before"/>
- <property name="cursor"/>
- <property name="direction"/>
- <property name="display"/>
- <property name="elevation"/>
- <property name="empty-cells"/>
- <property name="float"/>
- <property name="font"/>
- <property name="font-family"/>
- <property name="font-size"/>
- <property name="font-size-adjust"/>
- <property name="font-stretch"/>
- <property name="font-style"/>
- <property name="font-variant"/>
- <property name="font-weight"/>
- <property name="height"/>
- <property name="left"/>
- <property name="letter-spacing"/>
- <property name="line-height"/>
- <property name="list-style"/>
- <property name="list-style-image"/>
- <property name="list-style-position"/>
- <property name="list-style-type"/>
- <property name="margin"/>
- <property name="margin-top"/>
- <property name="margin-right"/>
- <property name="margin-bottom"/>
- <property name="margin-left"/>
- <property name="marker-offset"/>
- <property name="marks"/>
- <property name="max-height"/>
- <property name="max-width"/>
- <property name="min-height"/>
- <property name="min-width"/>
- <property name="orphans"/>
- <property name="outline"/>
- <property name="outline-color"/>
- <property name="outline-style"/>
- <property name="outline-width"/>
- <property name="overflow"/>
- <property name="padding"/>
- <property name="padding-top"/>
- <property name="padding-right"/>
- <property name="padding-bottom"/>
- <property name="padding-left"/>
- <property name="page"/>
- <property name="page-break-after"/>
- <property name="page-break-before"/>
- <property name="page-break-inside"/>
- <property name="pause"/>
- <property name="pause-after"/>
- <property name="pause-before"/>
- <property name="pitch"/>
- <property name="pitch-range"/>
- <property name="play-during"/>
- <property name="position"/>
- <property name="quotes"/>
- <property name="richness"/>
- <property name="right"/>
- <property name="size"/>
- <property name="speak"/>
- <property name="speak-header"/>
- <property name="speak-numeral"/>
- <property name="speak-punctuation"/>
- <property name="speech-rate"/>
- <property name="stress"/>
- <property name="table-layout"/>
- <property name="text-align"/>
- <property name="text-decoration"/>
- <property name="text-indent"/>
- <property name="text-shadow"/>
- <property name="text-transform"/>
- <property name="top"/>
- <property name="unicode-bidi"/>
- <property name="vertical-align"/>
- <property name="visibility"/>
- <property name="voice-family"/>
- <property name="volume"/>
- <property name="white-space"/>
- <property name="widows"/>
- <property name="width"/>
- <property name="word-spacing"/>
- <property name="z-index"/>
- </style-rule-def>
-
- <pseudo-class-def name="first-child">
- <selector-value>first-child</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="link">
- <selector-value>link</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="visited">
- <selector-value>visited</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="hover">
- <selector-value>hover</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="active">
- <selector-value>active</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="focus">
- <selector-value>focus</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="lang">
- <selector-value>lang</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="left">
- <selector-value>left</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="right">
- <selector-value>right</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="first">
- <selector-value>first</selector-value>
- </pseudo-class-def>
-
- <pseudo-element-def name="first-line">
- <selector-value>first-line</selector-value>
- </pseudo-element-def>
- <pseudo-element-def name="first-letter">
- <selector-value>first-letter</selector-value>
- </pseudo-element-def>
- <pseudo-element-def name="before">
- <selector-value>before</selector-value>
- </pseudo-element-def>
- <pseudo-element-def name="after">
- <selector-value>after</selector-value>
- </pseudo-element-def>
-
- <!-- property definition -->
-
- <property-def name="azimuth"
- inherited="yes" mediagroup="aural" category="aural">
- <description>This provides spatial audio property for aural
- presentation</description>
- <number name="angle"/>
- <keyword name="left-side"/>
- <keyword name="far-left"/>
- <keyword name="left"/>
- <keyword name="center-left"/>
- <keyword name="center"/>
- <keyword name="center-right"/>
- <keyword name="right"/>
- <keyword name="far-right"/>
- <keyword name="right-side"/>
- <keyword name="behind"/>
- <keyword name="leftwards"/>
- <keyword name="rightwards"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <property name="background-color"/>
- <property name="background-image"/>
- <property name="background-repeat"/>
- <property name="background-attachment"/>
- <property name="background-position"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background-attachment"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <keyword name="scroll"/>
- <keyword name="fixed"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background-color"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <container name="color"/>
- <keyword name="transparent"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background-image"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <function name="uri"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background-position"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <number name="percentage"/>
- <number name="length"/>
- <keyword name="top"/>
- <keyword name="center"/>
- <keyword name="bottom"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background-repeat"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <keyword name="repeat"/>
- <keyword name="repeat-x"/>
- <keyword name="repeat-y"/>
- <keyword name="no-repeat"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border"
- inherited="no" mediagroup="visual" category="box">
- <property name="border-width"/>
- <property name="border-style"/>
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-collapse"
- inherited="yes" mediagroup="visual" category="tables">
- <keyword name="collapse"/>
- <keyword name="separate"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-color"
- inherited="no" mediagroup="visual" category="box">
- <container name="color"/>
- <keyword name="transparent"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-spacing"
- inherited="yes" mediagroup="visual" category="tables">
- <number name="length"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-style"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-top"
- inherited="no" mediagroup="visual" category="box">
- <property name="border-top-width"/>
- <property name="border-style"/>
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-right"
- inherited="no" mediagroup="visual" category="box">
- <property name="border-right-width"/>
- <property name="border-style"/>
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-bottom"
- inherited="no" mediagroup="visual" category="box">
- <property name="border-bottom-width"/>
- <property name="border-style"/>
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-left"
- inherited="no" mediagroup="visual" category="box">
- <property name="border-left-width"/>
- <property name="border-style"/>
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-top-color"
- inherited="no" mediagroup="visual" category="box">
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-right-color"
- inherited="no" mediagroup="visual" category="box">
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-bottom-color"
- inherited="no" mediagroup="visual" category="box">
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-left-color"
- inherited="no" mediagroup="visual" category="box">
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-top-style"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-right-style"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-bottom-style"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-left-style"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-top-width"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-right-width"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-bottom-width"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-left-width"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-width"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="bottom"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="caption-side"
- inherited="yes" mediagroup="visual" category="tables">
- <keyword name="top"/>
- <keyword name="bottom"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="clear"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="none"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="both"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="clip"
- inherited="no" mediagroup="visual" category="visual">
- <container name="shape"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="color"
- inherited="yes" mediagroup="visual" category="colorandbackground">
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="content"
- inherited="no" mediagroup="all" category="content">
- <string name="any"/>
- <function name="uri"/>
- <function name="counter"/>
- <function name="attr"/>
- <keyword name="open-quote"/>
- <keyword name="close-quote"/>
- <keyword name="no-open-quote"/>
- <keyword name="no-close-quote"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="counter-increment"
- inherited="no" mediagroup="all" category="content">
- <string name="counter-identifier"/>
- <number name="integer"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="counter-reset"
- inherited="no" mediagroup="all" category="content">
- <string name="counter-identifier"/>
- <number name="integer"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="cue"
- inherited="no" mediagroup="aural" category="aural">
- <property name="cue-before"/>
- <property name="cue-after"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="cue-after"
- inherited="no" mediagroup="aural" category="aural">
- <function name="uri"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="cue-before"
- inherited="no" mediagroup="aural" category="aural">
- <function name="uri"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="cursor"
- inherited="yes" mediagroup="visual,interactive" category="ui">
- <function name="uri"/>
- <keyword name="auto"/>
- <keyword name="crosshair"/>
- <keyword name="default"/>
- <keyword name="pointer"/>
- <keyword name="move"/>
- <keyword name="e-resize"/>
- <keyword name="ne-resize"/>
- <keyword name="nw-resize"/>
- <keyword name="n-resize"/>
- <keyword name="se-resize"/>
- <keyword name="sw-resize"/>
- <keyword name="s-resize"/>
- <keyword name="w-resize"/>
- <keyword name="text"/>
- <keyword name="wait"/>
- <keyword name="help"/>
- <keyword name="inherit"/>
- <separator name="comma"/>
- </property-def>
- <property-def name="direction"
- inherited="yes" mediagroup="visual" category="visual">
- <keyword name="ltr"/>
- <keyword name="rtl"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="display"
- inherited="no" mediagroup="all" category="visual">
- <keyword name="inline"/>
- <keyword name="block"/>
- <keyword name="list-item"/>
- <keyword name="run-in"/>
- <keyword name="compact"/>
- <keyword name="marker"/>
- <keyword name="table"/>
- <keyword name="inline-table"/>
- <keyword name="table-row-group"/>
- <keyword name="table-header-group"/>
- <keyword name="table-footer-group"/>
- <keyword name="table-row"/>
- <keyword name="table-column-group"/>
- <keyword name="table-column"/>
- <keyword name="table-cell"/>
- <keyword name="table-caption"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="elevation"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="angle"/>
- <keyword name="below"/>
- <keyword name="level"/>
- <keyword name="above"/>
- <keyword name="higher"/>
- <keyword name="lower"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="empty-cells"
- inherited="yes" mediagroup="visual" category="tables">
- <keyword name="show"/>
- <keyword name="hide"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="float"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font"
- inherited="yes" mediagroup="visual" category="font">
- <property name="font-style"/>
- <property name="font-variant"/>
- <property name="font-weight"/>
- <property name="font-size"/>
- <property name="line-height"/>
- <property name="font-family"/>
- <keyword name="caption"/>
- <keyword name="icon"/>
- <keyword name="menu"/>
- <keyword name="message-box"/>
- <keyword name="small-caption"/>
- <keyword name="status-bar"/>
- <keyword name="inherit"/>
- <separator name="slash"/>
- </property-def>
- <property-def name="font-family"
- inherited="yes" mediagroup="visual" category="font">
- <string name="family-name"/>
- <container name="generic-family"/>
- <keyword name="inherit"/>
- <separator name="comma"/>
- </property-def>
- <property-def name="font-size"
- inherited="yes" mediagroup="visual" category="font">
- <container name="absolute-size"/>
- <container name="relative-size"/>
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font-size-adjust"
- inherited="yes" mediagroup="visual" category="font">
- <number name="number"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font-stretch"
- inherited="yes" mediagroup="visual" category="font">
- <keyword name="normal"/>
- <keyword name="wider"/>
- <keyword name="narrower"/>
- <keyword name="ultra-condensed"/>
- <keyword name="extra-condensed"/>
- <keyword name="condensed"/>
- <keyword name="semi-condensed"/>
- <keyword name="semi-expanded"/>
- <keyword name="expanded"/>
- <keyword name="extra-expanded"/>
- <keyword name="ultra-expanded"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font-style"
- inherited="yes" mediagroup="visual" category="font">
- <keyword name="normal"/>
- <keyword name="italic"/>
- <keyword name="oblique"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font-variant"
- inherited="yes" mediagroup="visual" category="font">
- <keyword name="normal"/>
- <keyword name="small-caps"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font-weight"
- inherited="yes" mediagroup="visual" category="font">
- <keyword name="normal"/>
- <keyword name="bold"/>
- <keyword name="bolder"/>
- <keyword name="lighter"/>
- <keyword name="100"/>
- <keyword name="200"/>
- <keyword name="300"/>
- <keyword name="400"/>
- <keyword name="500"/>
- <keyword name="600"/>
- <keyword name="700"/>
- <keyword name="800"/>
- <keyword name="900"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="height"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="left"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="letter-spacing"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="normal"/>
- <number name="length"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="line-height"
- inherited="yes" mediagroup="visual" category="visual">
- <keyword name="normal"/>
- <number name="number"/>
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="list-style"
- inherited="yes" mediagroup="visual" category="content">
- <property name="list-style-type"/>
- <property name="list-style-position"/>
- <property name="list-style-image"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="list-style-image"
- inherited="yes" mediagroup="visual" category="content">
- <function name="uri"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="list-style-position"
- inherited="yes" mediagroup="visual" category="content">
- <keyword name="inside"/>
- <keyword name="outside"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="list-style-type"
- inherited="yes" mediagroup="visual" category="content">
- <keyword name="disc"/>
- <keyword name="circle"/>
- <keyword name="square"/>
- <keyword name="decimal"/>
- <keyword name="decimal-leading-zero"/>
- <keyword name="lower-roman"/>
- <keyword name="upper-roman"/>
- <keyword name="lower-greek"/>
- <keyword name="lower-alpha"/>
- <keyword name="lower-latin"/>
- <keyword name="upper-alpha"/>
- <keyword name="upper-latin"/>
- <keyword name="hebrew"/>
- <keyword name="armenian"/>
- <keyword name="georgian"/>
- <keyword name="cjk-ideographic"/>
- <keyword name="hiragana"/>
- <keyword name="katakana"/>
- <keyword name="hiragana-iroha"/>
- <keyword name="katakana-iroha"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="margin"
- inherited="no" mediagroup="visual" category="box">
- <container name="margin-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="margin-top"
- inherited="no" mediagroup="visual" category="box">
- <container name="margin-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="margin-right"
- inherited="no" mediagroup="visual" category="box">
- <container name="margin-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="margin-bottom"
- inherited="no" mediagroup="visual" category="box">
- <container name="margin-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="margin-left"
- inherited="no" mediagroup="visual" category="box">
- <container name="margin-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="marker-offset"
- inherited="no" mediagroup="visual" category="content">
- <number name="length"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="marks"
- inherited="na" mediagroup="visual,paged" category="page">
- <keyword name="crop"/>
- <keyword name="cross"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="max-height"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="max-width"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="min-height"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="min-width"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="orphans"
- inherited="yes" mediagroup="visual,paged" category="page">
- <number name="integer"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="outline"
- inherited="no" mediagroup="visual,interactive" category="ui">
- <property name="outline-color"/>
- <property name="outline-style"/>
- <property name="outline-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="outline-color"
- inherited="no" mediagroup="visual,interactive" category="ui">
- <container name="color"/>
- <keyword name="invert"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="outline-style"
- inherited="no" mediagroup="visual,interactive" category="ui">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="outline-width"
- inherited="no" mediagroup="visual,interactive" category="ui">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="overflow"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="visible"/>
- <keyword name="hidden"/>
- <keyword name="scroll"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="padding"
- inherited="no" mediagroup="visual" category="box">
- <container name="padding-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="padding-top"
- inherited="no" mediagroup="visual" category="box">
- <container name="padding-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="padding-right"
- inherited="no" mediagroup="visual" category="box">
- <container name="padding-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="padding-bottom"
- inherited="no" mediagroup="visual" category="box">
- <container name="padding-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="padding-left"
- inherited="no" mediagroup="visual" category="box">
- <container name="padding-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="page"
- inherited="yes" mediagroup="visual,paged" category="page">
- <string name="page-identifier"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="page-break-after"
- inherited="no" mediagroup="visual,paged" category="page">
- <keyword name="auto"/>
- <keyword name="always"/>
- <keyword name="avoid"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="page-break-before"
- inherited="no" mediagroup="visual,paged" category="page">
- <keyword name="auto"/>
- <keyword name="always"/>
- <keyword name="avoid"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="page-break-inside"
- inherited="yes" mediagroup="visual,paged" category="page">
- <keyword name="avoid"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="pause"
- inherited="no" mediagroup="aural" category="aural">
- <number name="time"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="pause-after"
- inherited="no" mediagroup="aural" category="aural">
- <number name="time"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="pause-before"
- inherited="no" mediagroup="aural" category="aural">
- <number name="time"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="pitch"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="frequency"/>
- <keyword name="x-low"/>
- <keyword name="low"/>
- <keyword name="medium"/>
- <keyword name="high"/>
- <keyword name="x-high"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="pitch-range"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="number"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="play-during"
- inherited="no" mediagroup="aural" category="aural">
- <function name="uri"/>
- <keyword name="mix"/>
- <keyword name="repeat"/>
- <keyword name="auto"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="position"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="static"/>
- <keyword name="relative"/>
- <keyword name="absolute"/>
- <keyword name="fixed"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="quotes"
- inherited="yes" mediagroup="visual" category="content">
- <string name="any"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="richness"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="number"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="right"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="size"
- inherited="na" mediagroup="visual,paged" category="page">
- <number name="length"/>
- <keyword name="auto"/>
- <keyword name="portrait"/>
- <keyword name="landscape"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="speak"
- inherited="yes" mediagroup="aural" category="aural">
- <keyword name="normal"/>
- <keyword name="none"/>
- <keyword name="spell-out"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="speak-header"
- inherited="yes" mediagroup="aural" category="tables">
- <keyword name="once"/>
- <keyword name="always"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="speak-numeral"
- inherited="yes" mediagroup="aural" category="aural">
- <keyword name="digits"/>
- <keyword name="continuous"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="speak-punctuation"
- inherited="yes" mediagroup="aural" category="aural">
- <keyword name="code"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="speech-rate"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="number"/>
- <keyword name="x-slow"/>
- <keyword name="slow"/>
- <keyword name="medium"/>
- <keyword name="fast"/>
- <keyword name="x-fast"/>
- <keyword name="faster"/>
- <keyword name="slower"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="stress"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="number"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="table-layout"
- inherited="no" mediagroup="visual" category="tables">
- <keyword name="auto"/>
- <keyword name="fixed"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-align"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="center"/>
- <keyword name="justify"/>
- <string name="any"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-decoration"
- inherited="no" mediagroup="visual" category="text">
- <keyword name="none"/>
- <keyword name="underline"/>
- <keyword name="overline"/>
- <keyword name="line-through"/>
- <keyword name="blink"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-indent"
- inherited="yes" mediagroup="visual" category="text">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-shadow"
- inherited="no" mediagroup="visual" category="text">
- <keyword name="none"/>
- <container name="color"/>
- <number name="length"/>
- <keyword name="inherit"/>
- <separator name="comma"/>
- </property-def>
- <property-def name="text-transform"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="capitalize"/>
- <keyword name="uppercase"/>
- <keyword name="lowercase"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="top"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="unicode-bidi"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="normal"/>
- <keyword name="embed"/>
- <keyword name="bidi-override"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="vertical-align"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="baseline"/>
- <keyword name="sub"/>
- <keyword name="super"/>
- <keyword name="top"/>
- <keyword name="text-top"/>
- <keyword name="middle"/>
- <keyword name="bottom"/>
- <keyword name="text-bottom"/>
- <number name="percentage"/>
- <number name="length"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="visibility"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="visible"/>
- <keyword name="hidden"/>
- <keyword name="collapse"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="voice-family"
- inherited="yes" mediagroup="aural" category="aural">
- <string name="specific-voice"/>
- <container name="generic-voice"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="volume"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="number"/>
- <number name="percentage"/>
- <keyword name="silent"/>
- <keyword name="x-soft"/>
- <keyword name="soft"/>
- <keyword name="medium"/>
- <keyword name="loud"/>
- <keyword name="x-loud"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="white-space"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="normal"/>
- <keyword name="pre"/>
- <keyword name="nowrap"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="widows"
- inherited="yes" mediagroup="visual,paged" category="page">
- <number name="integer"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="width"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="word-spacing"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="normal"/>
- <number name="length"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="z-index"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="auto"/>
- <number name="integer"/>
- <keyword name="inherit"/>
- </property-def>
-
- <!-- descriptor definition : These are for @font-face -->
-
- <descriptor-def name="ascent">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="baseline">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="bbox">
- <number name="number"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="cap-height">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="centerline">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="definition-src">
- <function name="uri"/>
- </descriptor-def>
- <descriptor-def name="descent">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="font-family">
- <string name="family-name"/>
- <container name="generic-family"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="font-size">
- <keyword name="all"/>
- <number name="length"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="font-stretch">
- <keyword name="all"/>
- <keyword name="normal"/>
- <keyword name="ultra-condensed"/>
- <keyword name="extra-condensed"/>
- <keyword name="condensed"/>
- <keyword name="semi-condensed"/>
- <keyword name="semi-expanded"/>
- <keyword name="expanded"/>
- <keyword name="extra-expanded"/>
- <keyword name="ultra-expanded"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="font-style">
- <keyword name="all"/>
- <keyword name="normal"/>
- <keyword name="italic"/>
- <keyword name="oblique"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="font-variant">
- <keyword name="normal"/>
- <keyword name="small-caps"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="font-weight">
- <keyword name="all"/>
- <keyword name="normal"/>
- <keyword name="bold"/>
- <keyword name="100"/>
- <keyword name="200"/>
- <keyword name="300"/>
- <keyword name="400"/>
- <keyword name="500"/>
- <keyword name="600"/>
- <keyword name="700"/>
- <keyword name="800"/>
- <keyword name="900"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="mathline">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="panose-1">
- <number name="integer"/>
- </descriptor-def>
- <descriptor-def name="slope">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="src">
- <function name="uri"/>
- <function name="format"/>
- <container name="font-face-name"/>
- </descriptor-def>
- <descriptor-def name="stemh">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="stemv">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="topline">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="unicode-range">
- <string name="urange"/>
- </descriptor-def>
- <descriptor-def name="units-per-em">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="widths">
- <string name="urange"/>
- <number name="length"/>
- </descriptor-def>
- <descriptor-def name="x-height">
- <number name="number"/>
- </descriptor-def>
-
- <!-- container definition : Container is the lump of values.
- It can be used like macros. -->
- <container-def name="absolute-size">
- <keyword name="xx-small"/>
- <keyword name="x-small"/>
- <keyword name="small"/>
- <keyword name="medium"/>
- <keyword name="large"/>
- <keyword name="x-large"/>
- <keyword name="xx-large"/>
- </container-def>
- <container-def name="border-style">
- <keyword name="none"/>
- <keyword name="hidden"/>
- <keyword name="dotted"/>
- <keyword name="dashed"/>
- <keyword name="solid"/>
- <keyword name="double"/>
- <keyword name="groove"/>
- <keyword name="ridge"/>
- <keyword name="inset"/>
- <keyword name="outset"/>
- </container-def>
- <container-def name="border-width">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </container-def>
- <container-def name="color">
- <keyword name="aqua"/>
- <keyword name="black"/>
- <keyword name="blue"/>
- <keyword name="fuchsia"/>
- <keyword name="gray"/>
- <keyword name="green"/>
- <keyword name="lime"/>
- <keyword name="maroon"/>
- <keyword name="navy"/>
- <keyword name="olive"/>
- <keyword name="purple"/>
- <keyword name="red"/>
- <keyword name="silver"/>
- <keyword name="teal"/>
- <keyword name="white"/>
- <keyword name="yellow"/>
- <container name="system-color"/>
- <function name="rgb"/>
- <number name="hash"/>
- </container-def>
- <container-def name="generic-family">
- <keyword name="serif"/>
- <keyword name="sans-serif"/>
- <keyword name="cursive"/>
- <keyword name="fantasy"/>
- <keyword name="monospace"/>
- </container-def>
- <container-def name="font-face-name">
- <function name="local"/>
- </container-def>
- <container-def name="generic-voice">
- <keyword name="male"/>
- <keyword name="female"/>
- <keyword name="child"/>
- </container-def>
- <container-def name="margin-width">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </container-def>
- <container-def name="padding-width">
- <number name="length"/>
- <number name="percentage"/>
- </container-def>
- <container-def name="relative-size">
- <keyword name="smaller"/>
- <keyword name="larger"/>
- </container-def>
- <container-def name="shape">
- <function name="rect"/>
- </container-def>
- <container-def name="system-color">
- <keyword name="ActiveBorder"/>
- <keyword name="ActiveCaption"/>
- <keyword name="AppWorkspace"/>
- <keyword name="Background"/>
- <keyword name="ButtonFace"/>
- <keyword name="ButtonHighlight"/>
- <keyword name="ButtonShadow"/>
- <keyword name="ButtonText"/>
- <keyword name="CaptionText"/>
- <keyword name="GrayText"/>
- <keyword name="Highlight"/>
- <keyword name="HighlightText"/>
- <keyword name="InactiveBorder"/>
- <keyword name="InactiveCaption"/>
- <keyword name="InactiveCaptionText"/>
- <keyword name="InfoBackground"/>
- <keyword name="InfoText"/>
- <keyword name="Menu"/>
- <keyword name="MenuText"/>
- <keyword name="Scrollbar"/>
- <keyword name="ThreeDDarkShadow"/>
- <keyword name="ThreeDFace"/>
- <keyword name="ThreeDHighlight"/>
- <keyword name="ThreeDLightShadow"/>
- <keyword name="ThreeDShadow"/>
- <keyword name="Window"/>
- <keyword name="WindowFrame"/>
- <keyword name="WindowText"/>
- </container-def>
-
- <!-- category definition : This is used to categorize properties
- in Properties View. -->
- <category-def name="aural">
- <caption>%css2.category-def.aural.caption</caption>
- </category-def>
- <category-def name="box">
- <caption>%css2.category-def.box.caption</caption>
- </category-def>
- <category-def name="colorandbackground">
- <caption>%css2.category-def.colorandbackground.caption</caption>
- </category-def>
- <category-def name="content">
- <caption>%css2.category-def.content.caption</caption>
- </category-def>
- <category-def name="font">
- <caption>%css2.category-def.font.caption</caption>
- </category-def>
- <category-def name="page">
- <caption>%css2.category-def.page.caption</caption>
- </category-def>
- <category-def name="tables">
- <caption>%css2.category-def.tables.caption</caption>
- </category-def>
- <category-def name="text">
- <caption>%css2.category-def.text.caption</caption>
- </category-def>
- <category-def name="ui">
- <caption>%css2.category-def.ui.caption</caption>
- </category-def>
- <category-def name="visual">
-<!-- <caption>%css2.category-def.visual.caption</caption>-->
- <caption>%css2.category-def.visual.caption</caption>
- </category-def>
-
- <!-- function definition -->
- <function-def name="attr">
- <function-value>attr</function-value>
- </function-def>
- <function-def name="counter">
- <function-value>counter</function-value>
- </function-def>
- <function-def name="rect">
- <function-value>rect</function-value>
- </function-def>
- <function-def name="rgb">
- <function-value>rgb</function-value>
- </function-def>
- <function-def name="uri">
- <function-value>url</function-value>
- </function-def>
- <function-def name="format">
- <function-value>format</function-value>
- </function-def>
- <function-def name="local">
- <function-value>local</function-value>
- </function-def>
-
- <!-- number definition : What unit types be acceptable for each
- number type? -->
- <number-def name="angle">
- <unit name="deg"/>
- <unit name="grad"/>
- <unit name="rad"/>
- </number-def>
- <number-def name="frequency">
- <unit name="hz"/>
- <unit name="khz"/>
- </number-def>
- <number-def name="hash">
- <unit name="hash"/>
- </number-def>
- <number-def name="integer">
- </number-def>
- <number-def name="length">
- <unit name="em"/>
- <unit name="ex"/>
- <unit name="px"/>
- <unit name="in"/>
- <unit name="cm"/>
- <unit name="mm"/>
- <unit name="pt"/>
- <unit name="pc"/>
- </number-def>
- <number-def name="number">
- </number-def>
- <number-def name="percentage">
- <unit name="percentage"/>
- </number-def>
- <number-def name="time">
- <unit name="ms"/>
- <unit name="s"/>
- </number-def>
-
- <unit-def name="cm">
- <unit-value>cm</unit-value>
- </unit-def>
- <unit-def name="deg">
- <unit-value>deg</unit-value>
- </unit-def>
- <unit-def name="em">
- <unit-value>em</unit-value>
- </unit-def>
- <unit-def name="ex">
- <unit-value>ex</unit-value>
- </unit-def>
- <unit-def name="grad">
- <unit-value>grad</unit-value>
- </unit-def>
- <unit-def name="hash">
- <unit-value>#</unit-value>
- </unit-def>
- <unit-def name="hz">
- <unit-value>Hz</unit-value>
- </unit-def>
- <unit-def name="in">
- <unit-value>in</unit-value>
- </unit-def>
- <unit-def name="khz">
- <unit-value>kHz</unit-value>
- </unit-def>
- <unit-def name="mm">
- <unit-value>mm</unit-value>
- </unit-def>
- <unit-def name="ms">
- <unit-value>ms</unit-value>
- </unit-def>
- <unit-def name="pc">
- <unit-value>pc</unit-value>
- </unit-def>
- <unit-def name="percentage">
- <unit-value>%</unit-value>
- </unit-def>
- <unit-def name="pt">
- <unit-value>pt</unit-value>
- </unit-def>
- <unit-def name="px">
- <unit-value>px</unit-value>
- </unit-def>
- <unit-def name="rad">
- <unit-value>rad</unit-value>
- </unit-def>
- <unit-def name="s">
- <unit-value>s</unit-value>
- </unit-def>
-
- <!-- keywords : string constants (this is last part..) -->
- <keyword-def name="100">
- <keyword-value>100</keyword-value>
- </keyword-def>
- <keyword-def name="200">
- <keyword-value>200</keyword-value>
- </keyword-def>
- <keyword-def name="300">
- <keyword-value>300</keyword-value>
- </keyword-def>
- <keyword-def name="400">
- <keyword-value>400</keyword-value>
- </keyword-def>
- <keyword-def name="500">
- <keyword-value>500</keyword-value>
- </keyword-def>
- <keyword-def name="600">
- <keyword-value>600</keyword-value>
- </keyword-def>
- <keyword-def name="700">
- <keyword-value>700</keyword-value>
- </keyword-def>
- <keyword-def name="800">
- <keyword-value>800</keyword-value>
- </keyword-def>
- <keyword-def name="900">
- <keyword-value>900</keyword-value>
- </keyword-def>
- <keyword-def name="above">
- <keyword-value>above</keyword-value>
- </keyword-def>
- <keyword-def name="absolute">
- <keyword-value>absolute</keyword-value>
- </keyword-def>
- <keyword-def name="ActiveBorder">
- <keyword-value>ActiveBorder</keyword-value>
- </keyword-def>
- <keyword-def name="ActiveCaption">
- <keyword-value>ActiveCaption</keyword-value>
- </keyword-def>
- <keyword-def name="all">
- <keyword-value>all</keyword-value>
- </keyword-def>
- <keyword-def name="always">
- <keyword-value>always</keyword-value>
- </keyword-def>
- <keyword-def name="AppWorkspace">
- <keyword-value>AppWorkspace</keyword-value>
- </keyword-def>
- <keyword-def name="aqua">
- <keyword-value>aqua</keyword-value>
- </keyword-def>
- <keyword-def name="armenian">
- <keyword-value>armenian</keyword-value>
- </keyword-def>
- <keyword-def name="auto">
- <keyword-value>auto</keyword-value>
- </keyword-def>
- <keyword-def name="avoid">
- <keyword-value>avoid</keyword-value>
- </keyword-def>
- <keyword-def name="Background">
- <keyword-value>Background</keyword-value>
- </keyword-def>
- <keyword-def name="baseline">
- <keyword-value>baseline</keyword-value>
- </keyword-def>
- <keyword-def name="behind">
- <keyword-value>behind</keyword-value>
- </keyword-def>
- <keyword-def name="below">
- <keyword-value>below</keyword-value>
- </keyword-def>
- <keyword-def name="bidi-override">
- <keyword-value>bidi-override</keyword-value>
- </keyword-def>
- <keyword-def name="black">
- <keyword-value>black</keyword-value>
- </keyword-def>
- <keyword-def name="blink">
- <keyword-value>blink</keyword-value>
- </keyword-def>
- <keyword-def name="block">
- <keyword-value>block</keyword-value>
- </keyword-def>
- <keyword-def name="blue">
- <keyword-value>blue</keyword-value>
- </keyword-def>
- <keyword-def name="bold">
- <keyword-value>bold</keyword-value>
- </keyword-def>
- <keyword-def name="bolder">
- <keyword-value>bolder</keyword-value>
- </keyword-def>
- <keyword-def name="both">
- <keyword-value>both</keyword-value>
- </keyword-def>
- <keyword-def name="bottom">
- <keyword-value>bottom</keyword-value>
- </keyword-def>
- <keyword-def name="ButtonFace">
- <keyword-value>ButtonFace</keyword-value>
- </keyword-def>
- <keyword-def name="ButtonHighlight">
- <keyword-value>ButtonHighlight</keyword-value>
- </keyword-def>
- <keyword-def name="ButtonShadow">
- <keyword-value>ButtonShadow</keyword-value>
- </keyword-def>
- <keyword-def name="ButtonText">
- <keyword-value>ButtonText</keyword-value>
- </keyword-def>
- <keyword-def name="capitalize">
- <keyword-value>capitalize</keyword-value>
- </keyword-def>
- <keyword-def name="caption">
- <keyword-value>caption</keyword-value>
- </keyword-def>
- <keyword-def name="CaptionText">
- <keyword-value>CaptionText</keyword-value>
- </keyword-def>
- <keyword-def name="center">
- <keyword-value>center</keyword-value>
- </keyword-def>
- <keyword-def name="center-left">
- <keyword-value>center-left</keyword-value>
- </keyword-def>
- <keyword-def name="center-right">
- <keyword-value>center-right</keyword-value>
- </keyword-def>
- <keyword-def name="child">
- <keyword-value>child</keyword-value>
- </keyword-def>
- <keyword-def name="circle">
- <keyword-value>circle</keyword-value>
- </keyword-def>
- <keyword-def name="cjk-ideographic">
- <keyword-value>cjk-ideographic</keyword-value>
- </keyword-def>
- <keyword-def name="close-quote">
- <keyword-value>close-quote</keyword-value>
- </keyword-def>
- <keyword-def name="code">
- <keyword-value>code</keyword-value>
- </keyword-def>
- <keyword-def name="condensed">
- <keyword-value>condensed</keyword-value>
- </keyword-def>
- <keyword-def name="collapse">
- <keyword-value>collapse</keyword-value>
- </keyword-def>
- <keyword-def name="compact">
- <keyword-value>compact</keyword-value>
- </keyword-def>
- <keyword-def name="continuous">
- <keyword-value>continuous</keyword-value>
- </keyword-def>
- <keyword-def name="crop">
- <keyword-value>crop</keyword-value>
- </keyword-def>
- <keyword-def name="cross">
- <keyword-value>cross</keyword-value>
- </keyword-def>
- <keyword-def name="crosshair">
- <keyword-value>crosshair</keyword-value>
- </keyword-def>
- <keyword-def name="cursive">
- <keyword-value>cursive</keyword-value>
- </keyword-def>
- <keyword-def name="dashed">
- <keyword-value>dashed</keyword-value>
- </keyword-def>
- <keyword-def name="decimal">
- <keyword-value>decimal</keyword-value>
- </keyword-def>
- <keyword-def name="decimal-leading-zero">
- <keyword-value>decimal-leading-zero</keyword-value>
- </keyword-def>
- <keyword-def name="default">
- <keyword-value>default</keyword-value>
- </keyword-def>
- <keyword-def name="digits">
- <keyword-value>digits</keyword-value>
- </keyword-def>
- <keyword-def name="disc">
- <keyword-value>disc</keyword-value>
- </keyword-def>
- <keyword-def name="dotted">
- <keyword-value>dotted</keyword-value>
- </keyword-def>
- <keyword-def name="double">
- <keyword-value>double</keyword-value>
- </keyword-def>
- <keyword-def name="e-resize">
- <keyword-value>e-resize</keyword-value>
- </keyword-def>
- <keyword-def name="embed">
- <keyword-value>embed</keyword-value>
- </keyword-def>
- <keyword-def name="expanded">
- <keyword-value>expanded</keyword-value>
- </keyword-def>
- <keyword-def name="extra-condensed">
- <keyword-value>extra-condensed</keyword-value>
- </keyword-def>
- <keyword-def name="extra-expanded">
- <keyword-value>extra-expanded</keyword-value>
- </keyword-def>
- <keyword-def name="fantasy">
- <keyword-value>fantasy</keyword-value>
- </keyword-def>
- <keyword-def name="far-left">
- <keyword-value>far-left</keyword-value>
- </keyword-def>
- <keyword-def name="far-right">
- <keyword-value>far-right</keyword-value>
- </keyword-def>
- <keyword-def name="fast">
- <keyword-value>fast</keyword-value>
- </keyword-def>
- <keyword-def name="faster">
- <keyword-value>faster</keyword-value>
- </keyword-def>
- <keyword-def name="female">
- <keyword-value>female</keyword-value>
- </keyword-def>
- <keyword-def name="fixed">
- <keyword-value>fixed</keyword-value>
- </keyword-def>
- <keyword-def name="fuchsia">
- <keyword-value>fuchsia</keyword-value>
- </keyword-def>
- <keyword-def name="georgian">
- <keyword-value>georgian</keyword-value>
- </keyword-def>
- <keyword-def name="gray">
- <keyword-value>gray</keyword-value>
- </keyword-def>
- <keyword-def name="GrayText">
- <keyword-value>GrayText</keyword-value>
- </keyword-def>
- <keyword-def name="green">
- <keyword-value>green</keyword-value>
- </keyword-def>
- <keyword-def name="groove">
- <keyword-value>groove</keyword-value>
- </keyword-def>
- <keyword-def name="hebrew">
- <keyword-value>hebrew</keyword-value>
- </keyword-def>
- <keyword-def name="help">
- <keyword-value>help</keyword-value>
- </keyword-def>
- <keyword-def name="hidden">
- <keyword-value>hidden</keyword-value>
- </keyword-def>
- <keyword-def name="hide">
- <keyword-value>hide</keyword-value>
- </keyword-def>
- <keyword-def name="high">
- <keyword-value>high</keyword-value>
- </keyword-def>
- <keyword-def name="Highlight">
- <keyword-value>Highlight</keyword-value>
- </keyword-def>
- <keyword-def name="HighlightText">
- <keyword-value>HighlightText</keyword-value>
- </keyword-def>
- <keyword-def name="higher">
- <keyword-value>higher</keyword-value>
- </keyword-def>
- <keyword-def name="hiragana">
- <keyword-value>hiragana</keyword-value>
- </keyword-def>
- <keyword-def name="hiragana-iroha">
- <keyword-value>hiragana-iroha</keyword-value>
- </keyword-def>
- <keyword-def name="icon">
- <keyword-value>icon</keyword-value>
- </keyword-def>
- <keyword-def name="InactiveBorder">
- <keyword-value>InactiveBorder</keyword-value>
- </keyword-def>
- <keyword-def name="InactiveCaption">
- <keyword-value>InactiveCaption</keyword-value>
- </keyword-def>
- <keyword-def name="InactiveCaptionText">
- <keyword-value>InactiveCaptionText</keyword-value>
- </keyword-def>
- <keyword-def name="InfoBackground">
- <keyword-value>InfoBackground</keyword-value>
- </keyword-def>
- <keyword-def name="InfoText">
- <keyword-value>InfoText</keyword-value>
- </keyword-def>
- <keyword-def name="inherit">
- <keyword-value>inherit</keyword-value>
- </keyword-def>
- <keyword-def name="inline">
- <keyword-value>inline</keyword-value>
- </keyword-def>
- <keyword-def name="inline-table">
- <keyword-value>inline-table</keyword-value>
- </keyword-def>
- <keyword-def name="inset">
- <keyword-value>inset</keyword-value>
- </keyword-def>
- <keyword-def name="inside">
- <keyword-value>inside</keyword-value>
- </keyword-def>
- <keyword-def name="invert">
- <keyword-value>invert</keyword-value>
- </keyword-def>
- <keyword-def name="italic">
- <keyword-value>italic</keyword-value>
- </keyword-def>
- <keyword-def name="justify">
- <keyword-value>justify</keyword-value>
- </keyword-def>
- <keyword-def name="katakana">
- <keyword-value>katakana</keyword-value>
- </keyword-def>
- <keyword-def name="katakana-iroha">
- <keyword-value>katakana-iroha</keyword-value>
- </keyword-def>
- <keyword-def name="landscape">
- <keyword-value>landscape</keyword-value>
- </keyword-def>
- <keyword-def name="large">
- <keyword-value>large</keyword-value>
- </keyword-def>
- <keyword-def name="larger">
- <keyword-value>larger</keyword-value>
- </keyword-def>
- <keyword-def name="left">
- <keyword-value>left</keyword-value>
- </keyword-def>
- <keyword-def name="left-side">
- <keyword-value>left-side</keyword-value>
- </keyword-def>
- <keyword-def name="leftwards">
- <keyword-value>leftwards</keyword-value>
- </keyword-def>
- <keyword-def name="level">
- <keyword-value>level</keyword-value>
- </keyword-def>
- <keyword-def name="lighter">
- <keyword-value>lighter</keyword-value>
- </keyword-def>
- <keyword-def name="lime">
- <keyword-value>lime</keyword-value>
- </keyword-def>
- <keyword-def name="line-through">
- <keyword-value>line-through</keyword-value>
- </keyword-def>
- <keyword-def name="list-item">
- <keyword-value>list-item</keyword-value>
- </keyword-def>
- <keyword-def name="loud">
- <keyword-value>loud</keyword-value>
- </keyword-def>
- <keyword-def name="low">
- <keyword-value>low</keyword-value>
- </keyword-def>
- <keyword-def name="lower">
- <keyword-value>lower</keyword-value>
- </keyword-def>
- <keyword-def name="lower-alpha">
- <keyword-value>lower-alpha</keyword-value>
- </keyword-def>
- <keyword-def name="lower-greek">
- <keyword-value>lower-greek</keyword-value>
- </keyword-def>
- <keyword-def name="lower-latin">
- <keyword-value>lower-latin</keyword-value>
- </keyword-def>
- <keyword-def name="lower-roman">
- <keyword-value>lower-roman</keyword-value>
- </keyword-def>
- <keyword-def name="lowercase">
- <keyword-value>lowercase</keyword-value>
- </keyword-def>
- <keyword-def name="ltr">
- <keyword-value>ltr</keyword-value>
- </keyword-def>
- <keyword-def name="male">
- <keyword-value>male</keyword-value>
- </keyword-def>
- <keyword-def name="marker">
- <keyword-value>marker</keyword-value>
- </keyword-def>
- <keyword-def name="maroon">
- <keyword-value>maroon</keyword-value>
- </keyword-def>
- <keyword-def name="medium">
- <keyword-value>medium</keyword-value>
- </keyword-def>
- <keyword-def name="Menu">
- <keyword-value>Menu</keyword-value>
- </keyword-def>
- <keyword-def name="MenuText">
- <keyword-value>MenuText</keyword-value>
- </keyword-def>
- <keyword-def name="message-box">
- <keyword-value>message-box</keyword-value>
- </keyword-def>
- <keyword-def name="middle">
- <keyword-value>middle</keyword-value>
- </keyword-def>
- <keyword-def name="mix">
- <keyword-value>mix</keyword-value>
- </keyword-def>
- <keyword-def name="monospace">
- <keyword-value>monospace</keyword-value>
- </keyword-def>
- <keyword-def name="move">
- <keyword-value>move</keyword-value>
- </keyword-def>
- <keyword-def name="n-resize">
- <keyword-value>n-resize</keyword-value>
- </keyword-def>
- <keyword-def name="narrower">
- <keyword-value>narrower</keyword-value>
- </keyword-def>
- <keyword-def name="navy">
- <keyword-value>navy</keyword-value>
- </keyword-def>
- <keyword-def name="ne-resize">
- <keyword-value>ne-resize</keyword-value>
- </keyword-def>
- <keyword-def name="no-close-quote">
- <keyword-value>no-close-quote</keyword-value>
- </keyword-def>
- <keyword-def name="no-open-quote">
- <keyword-value>no-open-quote</keyword-value>
- </keyword-def>
- <keyword-def name="no-repeat">
- <keyword-value>no-repeat</keyword-value>
- </keyword-def>
- <keyword-def name="none">
- <keyword-value>none</keyword-value>
- </keyword-def>
- <keyword-def name="normal">
- <keyword-value>normal</keyword-value>
- </keyword-def>
- <keyword-def name="nowrap">
- <keyword-value>nowrap</keyword-value>
- </keyword-def>
- <keyword-def name="nw-resize">
- <keyword-value>nw-resize</keyword-value>
- </keyword-def>
- <keyword-def name="oblique">
- <keyword-value>oblique</keyword-value>
- </keyword-def>
- <keyword-def name="olive">
- <keyword-value>olive</keyword-value>
- </keyword-def>
- <keyword-def name="once">
- <keyword-value>once</keyword-value>
- </keyword-def>
- <keyword-def name="open-quote">
- <keyword-value>open-quote</keyword-value>
- </keyword-def>
- <keyword-def name="outset">
- <keyword-value>outset</keyword-value>
- </keyword-def>
- <keyword-def name="outside">
- <keyword-value>outside</keyword-value>
- </keyword-def>
- <keyword-def name="overline">
- <keyword-value>overline</keyword-value>
- </keyword-def>
- <keyword-def name="pointer">
- <keyword-value>pointer</keyword-value>
- </keyword-def>
- <keyword-def name="portrait">
- <keyword-value>portrait</keyword-value>
- </keyword-def>
- <keyword-def name="pre">
- <keyword-value>pre</keyword-value>
- </keyword-def>
- <keyword-def name="purple">
- <keyword-value>purple</keyword-value>
- </keyword-def>
- <keyword-def name="red">
- <keyword-value>red</keyword-value>
- </keyword-def>
- <keyword-def name="relative">
- <keyword-value>relative</keyword-value>
- </keyword-def>
- <keyword-def name="repeat">
- <keyword-value>repeat</keyword-value>
- </keyword-def>
- <keyword-def name="repeat-x">
- <keyword-value>repeat-x</keyword-value>
- </keyword-def>
- <keyword-def name="repeat-y">
- <keyword-value>repeat-y</keyword-value>
- </keyword-def>
- <keyword-def name="ridge">
- <keyword-value>ridge</keyword-value>
- </keyword-def>
- <keyword-def name="right">
- <keyword-value>right</keyword-value>
- </keyword-def>
- <keyword-def name="right-side">
- <keyword-value>right-side</keyword-value>
- </keyword-def>
- <keyword-def name="rightwards">
- <keyword-value>rightwards</keyword-value>
- </keyword-def>
- <keyword-def name="rtl">
- <keyword-value>rtl</keyword-value>
- </keyword-def>
- <keyword-def name="run-in">
- <keyword-value>run-in</keyword-value>
- </keyword-def>
- <keyword-def name="s-resize">
- <keyword-value>s-resize</keyword-value>
- </keyword-def>
- <keyword-def name="sans-serif">
- <keyword-value>sans-serif</keyword-value>
- </keyword-def>
- <keyword-def name="scroll">
- <keyword-value>scroll</keyword-value>
- </keyword-def>
- <keyword-def name="Scrollbar">
- <keyword-value>Scrollbar</keyword-value>
- </keyword-def>
- <keyword-def name="se-resize">
- <keyword-value>se-resize</keyword-value>
- </keyword-def>
- <keyword-def name="semi-condensed">
- <keyword-value>semi-condensed</keyword-value>
- </keyword-def>
- <keyword-def name="semi-expanded">
- <keyword-value>semi-expanded</keyword-value>
- </keyword-def>
- <keyword-def name="separate">
- <keyword-value>separate</keyword-value>
- </keyword-def>
- <keyword-def name="serif">
- <keyword-value>serif</keyword-value>
- </keyword-def>
- <keyword-def name="show">
- <keyword-value>show</keyword-value>
- </keyword-def>
- <keyword-def name="silent">
- <keyword-value>silent</keyword-value>
- </keyword-def>
- <keyword-def name="silver">
- <keyword-value>silver</keyword-value>
- </keyword-def>
- <keyword-def name="slow">
- <keyword-value>slow</keyword-value>
- </keyword-def>
- <keyword-def name="slower">
- <keyword-value>slower</keyword-value>
- </keyword-def>
- <keyword-def name="small">
- <keyword-value>small</keyword-value>
- </keyword-def>
- <keyword-def name="small-caps">
- <keyword-value>small-caps</keyword-value>
- </keyword-def>
- <keyword-def name="small-caption">
- <keyword-value>small-caption</keyword-value>
- </keyword-def>
- <keyword-def name="smaller">
- <keyword-value>smaller</keyword-value>
- </keyword-def>
- <keyword-def name="soft">
- <keyword-value>soft</keyword-value>
- </keyword-def>
- <keyword-def name="solid">
- <keyword-value>solid</keyword-value>
- </keyword-def>
- <keyword-def name="spell-out">
- <keyword-value>spell-out</keyword-value>
- </keyword-def>
- <keyword-def name="square">
- <keyword-value>square</keyword-value>
- </keyword-def>
- <keyword-def name="static">
- <keyword-value>static</keyword-value>
- </keyword-def>
- <keyword-def name="status-bar">
- <keyword-value>status-bar</keyword-value>
- </keyword-def>
- <keyword-def name="sub">
- <keyword-value>sub</keyword-value>
- </keyword-def>
- <keyword-def name="super">
- <keyword-value>super</keyword-value>
- </keyword-def>
- <keyword-def name="sw-resize">
- <keyword-value>sw-resize</keyword-value>
- </keyword-def>
- <keyword-def name="table">
- <keyword-value>table</keyword-value>
- </keyword-def>
- <keyword-def name="table-caption">
- <keyword-value>table-caption</keyword-value>
- </keyword-def>
- <keyword-def name="table-cell">
- <keyword-value>table-cell</keyword-value>
- </keyword-def>
- <keyword-def name="table-column">
- <keyword-value>table-column</keyword-value>
- </keyword-def>
- <keyword-def name="table-column-group">
- <keyword-value>table-column-group</keyword-value>
- </keyword-def>
- <keyword-def name="table-footer-group">
- <keyword-value>table-footer-group</keyword-value>
- </keyword-def>
- <keyword-def name="table-header-group">
- <keyword-value>table-header-group</keyword-value>
- </keyword-def>
- <keyword-def name="table-row">
- <keyword-value>table-row</keyword-value>
- </keyword-def>
- <keyword-def name="table-row-group">
- <keyword-value>table-row-group</keyword-value>
- </keyword-def>
- <keyword-def name="teal">
- <keyword-value>teal</keyword-value>
- </keyword-def>
- <keyword-def name="text">
- <keyword-value>text</keyword-value>
- </keyword-def>
- <keyword-def name="text-top">
- <keyword-value>text-top</keyword-value>
- </keyword-def>
- <keyword-def name="text-bottom">
- <keyword-value>text-bottom</keyword-value>
- </keyword-def>
- <keyword-def name="thick">
- <keyword-value>thick</keyword-value>
- </keyword-def>
- <keyword-def name="thin">
- <keyword-value>thin</keyword-value>
- </keyword-def>
- <keyword-def name="ThreeDDarkShadow">
- <keyword-value>ThreeDDarkShadow</keyword-value>
- </keyword-def>
- <keyword-def name="ThreeDFace">
- <keyword-value>ThreeDFace</keyword-value>
- </keyword-def>
- <keyword-def name="ThreeDHighlight">
- <keyword-value>ThreeDHighlight</keyword-value>
- </keyword-def>
- <keyword-def name="ThreeDLightShadow">
- <keyword-value>ThreeDLightShadow</keyword-value>
- </keyword-def>
- <keyword-def name="ThreeDShadow">
- <keyword-value>ThreeDShadow</keyword-value>
- </keyword-def>
- <keyword-def name="top">
- <keyword-value>top</keyword-value>
- </keyword-def>
- <keyword-def name="transparent">
- <keyword-value>transparent</keyword-value>
- </keyword-def>
- <keyword-def name="ultra-condensed">
- <keyword-value>ultra-condensed</keyword-value>
- </keyword-def>
- <keyword-def name="ultra-expanded">
- <keyword-value>ultra-expanded</keyword-value>
- </keyword-def>
- <keyword-def name="underline">
- <keyword-value>underline</keyword-value>
- </keyword-def>
- <keyword-def name="upper-alpha">
- <keyword-value>upper-alpha</keyword-value>
- </keyword-def>
- <keyword-def name="upper-latin">
- <keyword-value>upper-latin</keyword-value>
- </keyword-def>
- <keyword-def name="upper-roman">
- <keyword-value>upper-roman</keyword-value>
- </keyword-def>
- <keyword-def name="uppercase">
- <keyword-value>uppercase</keyword-value>
- </keyword-def>
- <keyword-def name="visible">
- <keyword-value>visible</keyword-value>
- </keyword-def>
- <keyword-def name="w-resize">
- <keyword-value>w-resize</keyword-value>
- </keyword-def>
- <keyword-def name="wait">
- <keyword-value>wait</keyword-value>
- </keyword-def>
- <keyword-def name="white">
- <keyword-value>white</keyword-value>
- </keyword-def>
- <keyword-def name="wider">
- <keyword-value>wider</keyword-value>
- </keyword-def>
- <keyword-def name="Window">
- <keyword-value>Window</keyword-value>
- </keyword-def>
- <keyword-def name="WindowFrame">
- <keyword-value>WindowFrame</keyword-value>
- </keyword-def>
- <keyword-def name="WindowText">
- <keyword-value>WindowText</keyword-value>
- </keyword-def>
- <keyword-def name="x-fast">
- <keyword-value>x-fast</keyword-value>
- </keyword-def>
- <keyword-def name="x-high">
- <keyword-value>x-high</keyword-value>
- </keyword-def>
- <keyword-def name="x-large">
- <keyword-value>x-large</keyword-value>
- </keyword-def>
- <keyword-def name="x-loud">
- <keyword-value>x-loud</keyword-value>
- </keyword-def>
- <keyword-def name="x-low">
- <keyword-value>x-low</keyword-value>
- </keyword-def>
- <keyword-def name="x-slow">
- <keyword-value>x-slow</keyword-value>
- </keyword-def>
- <keyword-def name="x-small">
- <keyword-value>x-small</keyword-value>
- </keyword-def>
- <keyword-def name="x-soft">
- <keyword-value>x-soft</keyword-value>
- </keyword-def>
- <keyword-def name="xx-small">
- <keyword-value>xx-small</keyword-value>
- </keyword-def>
- <keyword-def name="xx-large">
- <keyword-value>xx-large</keyword-value>
- </keyword-def>
- <keyword-def name="yellow">
- <keyword-value>yellow</keyword-value>
- </keyword-def>
-</css-profile> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-mobile1_0.xml b/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-mobile1_0.xml
deleted file mode 100644
index 73b6c1209c..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-mobile1_0.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--<!DOCTYPE css-profile SYSTEM "css-profile.dtd" >-->
-<css-profile>
- <profile-import name="cssprofile-css2.xml"/>
- <stylesheet-def>
- <description>%mobile1_0.stylesheet-def.description</description>
- <charset-rule/>
- <import-rule/>
- <media-rule/>
- <style-rule/>
- </stylesheet-def>
-
- <!-- Which properties can style rule include ? -->
- <!-- using "overwrite" method: only disabled properties are written. -->
-
- <style-rule-def overwrite="true">
- <selector-expression name="child" enabled="false"/>
- <selector-expression name="adjacent" enabled="false"/>
- <selector-expression name="attribute" enabled="false"/>
- <pseudo-class name="first-child" enabled="false"/>
- <pseudo-class name="link" enabled="false"/>
- <pseudo-class name="active" enabled="false"/>
- <pseudo-class name="lang" enabled="false"/>
- <property name="azimuth" enabled="false"/>
- <property name="border-collapse" enabled="false"/>
- <property name="border-spacing" enabled="false"/>
- <property name="bottom" enabled="false"/>
- <property name="caption-side" enabled="false"/>
- <property name="clip" enabled="false"/>
- <property name="content" enabled="false"/>
- <property name="counter-increment" enabled="false"/>
- <property name="counter-reset" enabled="false"/>
- <property name="cue" enabled="false"/>
- <property name="cue-after" enabled="false"/>
- <property name="cue-before" enabled="false"/>
- <property name="cursor" enabled="false"/>
- <property name="direction" enabled="false"/>
- <property name="elevation" enabled="false"/>
- <property name="empty-cells" enabled="false"/>
- <property name="font-size-adjust" enabled="false"/>
- <property name="font-stretch" enabled="false"/>
- <property name="left" enabled="false"/>
- <property name="letter-spacing" enabled="false"/>
- <property name="line-height" enabled="false"/>
- <property name="marker-offset" enabled="false"/>
- <property name="marks" enabled="false"/>
- <property name="max-height" enabled="false"/>
- <property name="max-width" enabled="false"/>
- <property name="min-height" enabled="false"/>
- <property name="min-width" enabled="false"/>
- <property name="orphans" enabled="false"/>
- <property name="outline" enabled="false"/>
- <property name="outline-color" enabled="false"/>
- <property name="outline-style" enabled="false"/>
- <property name="outline-width" enabled="false"/>
- <property name="overflow" enabled="false"/>
- <property name="page" enabled="false"/>
- <property name="page-break-after" enabled="false"/>
- <property name="page-break-before" enabled="false"/>
- <property name="page-break-inside" enabled="false"/>
- <property name="pause" enabled="false"/>
- <property name="pause-after" enabled="false"/>
- <property name="pause-before" enabled="false"/>
- <property name="pitch" enabled="false"/>
- <property name="pitch-range" enabled="false"/>
- <property name="play-during" enabled="false"/>
- <property name="position" enabled="false"/>
- <property name="quotes" enabled="false"/>
- <property name="richness" enabled="false"/>
- <property name="right" enabled="false"/>
- <property name="size" enabled="false"/>
- <property name="speak" enabled="false"/>
- <property name="speak-header" enabled="false"/>
- <property name="speak-numeral" enabled="false"/>
- <property name="speak-punctuation" enabled="false"/>
- <property name="speech-rate" enabled="false"/>
- <property name="stress" enabled="false"/>
- <property name="table-layout" enabled="false"/>
- <property name="text-shadow" enabled="false"/>
- <property name="top" enabled="false"/>
- <property name="unicode-bidi" enabled="false"/>
- <property name="voice-family" enabled="false"/>
- <property name="volume" enabled="false"/>
- <property name="widows" enabled="false"/>
- <property name="word-spacing" enabled="false"/>
- <property name="z-index" enabled="false"/>
- </style-rule-def>
-
- <!-- property definition -->
- <!-- using "redifine" method: if "overwrite" attribute is set to
- "false" or not set, it means the node is cleanly redifined -->
-
- <property-def name="background-attachment"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <keyword name="scroll"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="display"
- inherited="no" mediagroup="all" category="visual">
- <keyword name="inline"/>
- <keyword name="block"/>
- <keyword name="list-item"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="list-style-type"
- inherited="yes" mediagroup="visual" category="content">
- <keyword name="disc"/>
- <keyword name="circle"/>
- <keyword name="square"/>
- <keyword name="decimal"/>
- <keyword name="lower-roman"/>
- <keyword name="upper-roman"/>
- <keyword name="lower-greek"/>
- <keyword name="lower-alpha"/>
- <keyword name="upper-alpha"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-align"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="center"/>
- <keyword name="justify"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-decoration"
- inherited="no" mediagroup="visual" category="text">
- <keyword name="none"/>
- <keyword name="underline"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="vertical-align"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="baseline"/>
- <keyword name="sub"/>
- <keyword name="super"/>
- <keyword name="inherit"/>
- </property-def>
-
- <!-- container definition : Container is the lump of values.
- It can be used like macros. -->
- <container-def name="color" overwrite="true">
- <container name="system-color" enabled="false"/>
- </container-def>
-</css-profile> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-wap.xml b/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-wap.xml
deleted file mode 100644
index d3b2a09000..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-wap.xml
+++ /dev/null
@@ -1,614 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--<!DOCTYPE css-profile SYSTEM "css-profile.dtd" >-->
-<css-profile>
- <profile-import name="cssprofile-css2.xml"/>
- <stylesheet-def>
- <description>%wap.stylesheet-def.description</description>
- <charset-rule/>
- <import-rule/>
- <media-rule/>
- <style-rule/>
- </stylesheet-def>
-
- <!-- Which properties can style rule include ? -->
- <!-- using "overwrite" method: only disabled properties are written. -->
-
- <style-rule-def overwrite="true">
- <property name="azimuth" enabled="false"/>
- <property name="border-collapse" enabled="false"/>
- <property name="border-spacing" enabled="false"/>
- <property name="bottom" enabled="false"/>
- <property name="caption-side" enabled="false"/>
- <property name="clip" enabled="false"/>
- <property name="content" enabled="false"/>
- <property name="cue" enabled="false"/>
- <property name="cue-after" enabled="false"/>
- <property name="cue-before" enabled="false"/>
- <property name="cursor" enabled="false"/>
- <property name="direction" enabled="false"/>
- <property name="elevation" enabled="false"/>
- <property name="empty-cells" enabled="false"/>
- <property name="font-size-adjust" enabled="false"/>
- <property name="font-stretch" enabled="false"/>
- <property name="left" enabled="false"/>
- <property name="letter-spacing" enabled="false"/>
- <property name="line-height" enabled="false"/>
- <property name="marker-offset" enabled="false"/>
- <property name="marks" enabled="false"/>
- <property name="max-height" enabled="false"/>
- <property name="max-width" enabled="false"/>
- <property name="min-height" enabled="false"/>
- <property name="min-width" enabled="false"/>
- <property name="orphans" enabled="false"/>
- <property name="outline" enabled="false"/>
- <property name="outline-color" enabled="false"/>
- <property name="outline-style" enabled="false"/>
- <property name="outline-width" enabled="false"/>
- <property name="overflow" enabled="false"/>
- <property name="page" enabled="false"/>
- <property name="page-break-after" enabled="false"/>
- <property name="page-break-before" enabled="false"/>
- <property name="page-break-inside" enabled="false"/>
- <property name="pause" enabled="false"/>
- <property name="pause-after" enabled="false"/>
- <property name="pause-before" enabled="false"/>
- <property name="pitch" enabled="false"/>
- <property name="pitch-range" enabled="false"/>
- <property name="play-during" enabled="false"/>
- <property name="position" enabled="false"/>
- <property name="quotes" enabled="false"/>
- <property name="richness" enabled="false"/>
- <property name="right" enabled="false"/>
- <property name="size" enabled="false"/>
- <property name="speak" enabled="false"/>
- <property name="speak-header" enabled="false"/>
- <property name="speak-numeral" enabled="false"/>
- <property name="speak-punctuation" enabled="false"/>
- <property name="speech-rate" enabled="false"/>
- <property name="stress" enabled="false"/>
- <property name="table-layout" enabled="false"/>
- <property name="text-shadow" enabled="false"/>
- <property name="top" enabled="false"/>
- <property name="unicode-bidi" enabled="false"/>
- <property name="voice-family" enabled="false"/>
- <property name="volume" enabled="false"/>
- <property name="widows" enabled="false"/>
- <property name="word-spacing" enabled="false"/>
- <property name="z-index" enabled="false"/>
- <property name="-wap-marquee-style"/>
- <property name="-wap-marquee-loop"/>
- <property name="-wap-marquee-dir"/>
- <property name="-wap-marquee-speed"/>
- <property name="-wap-accesskey"/>
- <property name="-wap-input-format"/>
- <property name="-wap-input-required"/>
- </style-rule-def>
-
- <!-- property definition -->
- <!-- using "redifine" method: if "overwrite" attribute is set to
- "false" or not set, it means the node is cleanly redifined -->
-
- <property-def name="display"
- inherited="no" mediagroup="all" category="visual">
- <keyword name="inline"/>
- <keyword name="block"/>
- <keyword name="list-item"/>
- <keyword name="-wap-marquee"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="list-style-type"
- inherited="yes" mediagroup="visual" category="content">
- <keyword name="disc"/>
- <keyword name="circle"/>
- <keyword name="square"/>
- <keyword name="decimal"/>
- <keyword name="lower-roman"/>
- <keyword name="upper-roman"/>
- <keyword name="lower-alpha"/>
- <keyword name="upper-alpha"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-align"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="center"/>
- <keyword name="justify"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-decoration"
- inherited="no" mediagroup="visual" category="text">
- <keyword name="none"/>
- <keyword name="underline"/>
- <keyword name="blink"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="vertical-align"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="baseline"/>
- <keyword name="sub"/>
- <keyword name="super"/>
- <keyword name="top"/>
- <keyword name="middle"/>
- <keyword name="bottom"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-marquee-style"
- inherited="no" mediagroup="visual" category="wap">
- <keyword name="scroll"/>
- <keyword name="slide"/>
- <keyword name="alternate"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-marquee-loop"
- inherited="no" mediagroup="visual" category="wap">
- <number name="integer"/>
- <keyword name="infinite"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-marquee-dir"
- inherited="no" mediagroup="visual" category="wap">
- <keyword name="ltr"/>
- <keyword name="rtl"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-marquee-speed"
- inherited="no" mediagroup="visual" category="wap">
- <keyword name="slow"/>
- <keyword name="normal"/>
- <keyword name="fast"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-accesskey"
- inherited="no" mediagroup="interactive" category="wap">
- <container name="keycombination"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-input-format"
- inherited="no" mediagroup="interactive" category="wap">
- <container name="format"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-input-required"
- inherited="no" mediagroup="interactive" category="wap">
- <keyword name="true"/>
- <keyword name="false"/>
- <keyword name="inherit"/>
- </property-def>
-
- <!-- container definition : Container is the lump of values.
- It can be used like macros. -->
- <container-def name="color" overwrite="true">
- <container name="system-color" enabled="false"/>
- </container-def>
- <container-def name="format">
- <string name="any"/>
- </container-def>
- <container-def name="keycombination">
- <container name="key"/>
- <keyword name="-"/>
- </container-def>
- <container-def name="key">
- <keyword name="space"/>
- <container name="specialkey"/>
- </container-def>
- <container-def name="specialkey">
- <container name="modifierkey"/>
- <container name="functionkey"/>
- <container name="navigationkey"/>
- <container name="editkey"/>
- <container name="misckey"/>
- <container name="volumecontrolkey"/>
- <container name="applicationkey"/>
- <container name="phonekey"/>
- <container name="vendorkey"/>
- </container-def>
- <container-def name="modifierkey">
- <keyword name="accesskey"/>
- <container name="cmdkey"/>
- <container name="optkey"/>
- <container name="ctrlkey"/>
- <container name="shiftkey"/>
- <container name="altkey"/>
- <container name="winkey"/>
- <container name="metakey"/>
- <keyword name="fn"/>
- <keyword name="fcn"/>
- <keyword name="caps"/>
- </container-def>
- <container-def name="cmdkey">
- <keyword name="cmd"/>
- <keyword name="rcmd"/>
- <keyword name="lcmd"/>
- </container-def>
- <container-def name="optkey">
- <keyword name="opt"/>
- <keyword name="ropt"/>
- <keyword name="lopt"/>
- </container-def>
- <container-def name="ctrlkey">
- <keyword name="ctrl"/>
- <keyword name="rctrl"/>
- <keyword name="lctrl"/>
- </container-def>
- <container-def name="shiftkey">
- <keyword name="shift"/>
- <keyword name="rshift"/>
- <keyword name="lshift"/>
- </container-def>
- <container-def name="altkey">
- <keyword name="alt"/>
- <keyword name="ralt"/>
- <keyword name="lalt"/>
- </container-def>
- <container-def name="winkey">
- <keyword name="win"/>
- <keyword name="rwin"/>
- <keyword name="lwin"/>
- </container-def>
- <container-def name="metakey">
- <keyword name="meta"/>
- <keyword name="rmeta"/>
- <keyword name="lmeta"/>
- </container-def>
- <container-def name="functionkey">
- <keyword name="f1"/>
- <keyword name="f2"/>
- <keyword name="f3"/>
- <keyword name="f4"/>
- <keyword name="f5"/>
- <keyword name="f6"/>
- <keyword name="f7"/>
- <keyword name="f8"/>
- <keyword name="f9"/>
- <keyword name="f10"/>
- <keyword name="f11"/>
- <keyword name="f12"/>
- <keyword name="f13"/>
- <keyword name="f14"/>
- <keyword name="f15"/>
- </container-def>
- <container-def name="navigationkey">
- <keyword name="tab"/>
- <keyword name="esc"/>
- <keyword name="enter"/>
- <keyword name="return"/>
- <keyword name="menu"/>
- <keyword name="help"/>
- <keyword name="namemenu"/>
- <keyword name="rcl"/>
- <keyword name="snd"/>
- <keyword name="arrowkey"/>
- <keyword name="pagekey"/>
- </container-def>
- <container-def name="arrowkey">
- <keyword name="up"/>
- <keyword name="down"/>
- <keyword name="left"/>
- <keyword name="right"/>
- </container-def>
- <container-def name="pagekey">
- <keyword name="home"/>
- <keyword name="end"/>
- <keyword name="pgup"/>
- <keyword name="pgdn"/>
- </container-def>
- <container-def name="editkey">
- <keyword name="bs"/>
- <keyword name="del"/>
- <keyword name="ins"/>
- <keyword name="undo"/>
- <keyword name="cut"/>
- <keyword name="copy"/>
- <keyword name="paste"/>
- <keyword name="clr"/>
- <keyword name="sto"/>
- </container-def>
- <container-def name="misckey">
- <keyword name="prtsc"/>
- <keyword name="sysrq"/>
- <keyword name="scrlock"/>
- <keyword name="pause"/>
- <keyword name="brk"/>
- <keyword name="numlock"/>
- <keyword name="pwr"/>
- </container-def>
- <container-def name="volumecontrolkey">
- <keyword name="volumeup"/>
- <keyword name="volumedown"/>
- </container-def>
- <container-def name="applicationkey">
- <keyword name="memo"/>
- <keyword name="todo"/>
- <keyword name="calendar"/>
- <keyword name="mail"/>
- <keyword name="address"/>
- </container-def>
- <container-def name="phonekey">
- <keyword name="phone-send"/>
- <keyword name="phone-end"/>
- <keyword name="phone-accept"/>
- </container-def>
- <container-def name="vendorkey">
- <keyword name="vnd."/>
- </container-def>
-
- <category-def name="wap">
- <caption>%wap.category-def.wap.caption</caption>
- </category-def>
-
- <number-def name="length">
- <unit name="em"/>
- <unit name="ex"/>
- <unit name="px"/>
- </number-def>
-
- <keyword-def name="-wap-marquee">
- <keyword-value>-wap-marquee</keyword-value>
- </keyword-def>
- <keyword-def name="slide">
- <keyword-value>slide</keyword-value>
- </keyword-def>
- <keyword-def name="alternate">
- <keyword-value>alternate</keyword-value>
- </keyword-def>
- <keyword-def name="infinite">
- <keyword-value>infinite</keyword-value>
- </keyword-def>
- <keyword-def name="-">
- <keyword-value>-</keyword-value>
- </keyword-def>
- <keyword-def name="space">
- <keyword-value>space</keyword-value>
- </keyword-def>
- <keyword-def name="accesskey">
- <keyword-value>accesskey</keyword-value>
- </keyword-def>
- <keyword-def name="fn">
- <keyword-value>fn</keyword-value>
- </keyword-def>
- <keyword-def name="fcn">
- <keyword-value>fcn</keyword-value>
- </keyword-def>
- <keyword-def name="caps">
- <keyword-value>caps</keyword-value>
- </keyword-def>
- <keyword-def name="cmd">
- <keyword-value>cmd</keyword-value>
- </keyword-def>
- <keyword-def name="rcmd">
- <keyword-value>rcmd</keyword-value>
- </keyword-def>
- <keyword-def name="lcmd">
- <keyword-value>lcmd</keyword-value>
- </keyword-def>
- <keyword-def name="opt">
- <keyword-value>opt</keyword-value>
- </keyword-def>
- <keyword-def name="ropt">
- <keyword-value>ropt</keyword-value>
- </keyword-def>
- <keyword-def name="lopt">
- <keyword-value>lopt</keyword-value>
- </keyword-def>
- <keyword-def name="ctrl">
- <keyword-value>ctrl</keyword-value>
- </keyword-def>
- <keyword-def name="rctrl">
- <keyword-value>rctrl</keyword-value>
- </keyword-def>
- <keyword-def name="lctrl">
- <keyword-value>lctrl</keyword-value>
- </keyword-def>
- <keyword-def name="shift">
- <keyword-value>shift</keyword-value>
- </keyword-def>
- <keyword-def name="rshift">
- <keyword-value>rshift</keyword-value>
- </keyword-def>
- <keyword-def name="lshift">
- <keyword-value>lshift</keyword-value>
- </keyword-def>
- <keyword-def name="alt">
- <keyword-value>alt</keyword-value>
- </keyword-def>
- <keyword-def name="ralt">
- <keyword-value>ralt</keyword-value>
- </keyword-def>
- <keyword-def name="lalt">
- <keyword-value>lalt</keyword-value>
- </keyword-def>
- <keyword-def name="win">
- <keyword-value>win</keyword-value>
- </keyword-def>
- <keyword-def name="rwin">
- <keyword-value>rwin</keyword-value>
- </keyword-def>
- <keyword-def name="lwin">
- <keyword-value>lwin</keyword-value>
- </keyword-def>
- <keyword-def name="meta">
- <keyword-value>meta</keyword-value>
- </keyword-def>
- <keyword-def name="rmeta">
- <keyword-value>rmeta</keyword-value>
- </keyword-def>
- <keyword-def name="lmeta">
- <keyword-value>lmeta</keyword-value>
- </keyword-def>
- <keyword-def name="f1">
- <keyword-value>f1</keyword-value>
- </keyword-def>
- <keyword-def name="f2">
- <keyword-value>f2</keyword-value>
- </keyword-def>
- <keyword-def name="f3">
- <keyword-value>f3</keyword-value>
- </keyword-def>
- <keyword-def name="f4">
- <keyword-value>f4</keyword-value>
- </keyword-def>
- <keyword-def name="f5">
- <keyword-value>f5</keyword-value>
- </keyword-def>
- <keyword-def name="f6">
- <keyword-value>f6</keyword-value>
- </keyword-def>
- <keyword-def name="f7">
- <keyword-value>f7</keyword-value>
- </keyword-def>
- <keyword-def name="f8">
- <keyword-value>f8</keyword-value>
- </keyword-def>
- <keyword-def name="f9">
- <keyword-value>f9</keyword-value>
- </keyword-def>
- <keyword-def name="f10">
- <keyword-value>f10</keyword-value>
- </keyword-def>
- <keyword-def name="f11">
- <keyword-value>f11</keyword-value>
- </keyword-def>
- <keyword-def name="f12">
- <keyword-value>f12</keyword-value>
- </keyword-def>
- <keyword-def name="f13">
- <keyword-value>f13</keyword-value>
- </keyword-def>
- <keyword-def name="f14">
- <keyword-value>f14</keyword-value>
- </keyword-def>
- <keyword-def name="f15">
- <keyword-value>f15</keyword-value>
- </keyword-def>
- <keyword-def name="tab">
- <keyword-value>tab</keyword-value>
- </keyword-def>
- <keyword-def name="esc">
- <keyword-value>esc</keyword-value>
- </keyword-def>
- <keyword-def name="enter">
- <keyword-value>enter</keyword-value>
- </keyword-def>
- <keyword-def name="return">
- <keyword-value>return</keyword-value>
- </keyword-def>
- <keyword-def name="namemenu">
- <keyword-value>namemenu</keyword-value>
- </keyword-def>
- <keyword-def name="rcl">
- <keyword-value>rcl</keyword-value>
- </keyword-def>
- <keyword-def name="snd">
- <keyword-value>snd</keyword-value>
- </keyword-def>
- <keyword-def name="arrowkey">
- <keyword-value>arrowkey</keyword-value>
- </keyword-def>
- <keyword-def name="pagekey">
- <keyword-value>pagekey</keyword-value>
- </keyword-def>
- <keyword-def name="up">
- <keyword-value>up</keyword-value>
- </keyword-def>
- <keyword-def name="down">
- <keyword-value>down</keyword-value>
- </keyword-def>
- <keyword-def name="home">
- <keyword-value>home</keyword-value>
- </keyword-def>
- <keyword-def name="end">
- <keyword-value>end</keyword-value>
- </keyword-def>
- <keyword-def name="pgup">
- <keyword-value>pgup</keyword-value>
- </keyword-def>
- <keyword-def name="pgdn">
- <keyword-value>pgdn</keyword-value>
- </keyword-def>
- <keyword-def name="bs">
- <keyword-value>bs</keyword-value>
- </keyword-def>
- <keyword-def name="del">
- <keyword-value>del</keyword-value>
- </keyword-def>
- <keyword-def name="ins">
- <keyword-value>ins</keyword-value>
- </keyword-def>
- <keyword-def name="undo">
- <keyword-value>undo</keyword-value>
- </keyword-def>
- <keyword-def name="cut">
- <keyword-value>cut</keyword-value>
- </keyword-def>
- <keyword-def name="copy">
- <keyword-value>copy</keyword-value>
- </keyword-def>
- <keyword-def name="paste">
- <keyword-value>paste</keyword-value>
- </keyword-def>
- <keyword-def name="clr">
- <keyword-value>clr</keyword-value>
- </keyword-def>
- <keyword-def name="sto">
- <keyword-value>sto</keyword-value>
- </keyword-def>
- <keyword-def name="prtsc">
- <keyword-value>prtsc</keyword-value>
- </keyword-def>
- <keyword-def name="sysrq">
- <keyword-value>sysrq</keyword-value>
- </keyword-def>
- <keyword-def name="scrlock">
- <keyword-value>scrlock</keyword-value>
- </keyword-def>
- <keyword-def name="brk">
- <keyword-value>brk</keyword-value>
- </keyword-def>
- <keyword-def name="numlock">
- <keyword-value>numlock</keyword-value>
- </keyword-def>
- <keyword-def name="pwr">
- <keyword-value>pwr</keyword-value>
- </keyword-def>
- <keyword-def name="volumeup">
- <keyword-value>volumeup</keyword-value>
- </keyword-def>
- <keyword-def name="volumedown">
- <keyword-value>volumedown</keyword-value>
- </keyword-def>
- <keyword-def name="memo">
- <keyword-value>memo</keyword-value>
- </keyword-def>
- <keyword-def name="todo">
- <keyword-value>todo</keyword-value>
- </keyword-def>
- <keyword-def name="calendar">
- <keyword-value>calendar</keyword-value>
- </keyword-def>
- <keyword-def name="mail">
- <keyword-value>mail</keyword-value>
- </keyword-def>
- <keyword-def name="address">
- <keyword-value>address</keyword-value>
- </keyword-def>
- <keyword-def name="phone-send">
- <keyword-value>phone-send</keyword-value>
- </keyword-def>
- <keyword-def name="phone-end">
- <keyword-value>phone-end</keyword-value>
- </keyword-def>
- <keyword-def name="phone-accept">
- <keyword-value>phone-accept</keyword-value>
- </keyword-def>
- <keyword-def name="vnd.">
- <keyword-value>vnd.</keyword-value>
- </keyword-def>
- <keyword-def name="true">
- <keyword-value>true</keyword-value>
- </keyword-def>
- <keyword-def name="false">
- <keyword-value>false</keyword-value>
- </keyword-def>
-</css-profile> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile.properties b/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile.properties
deleted file mode 100644
index dd7e399c94..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile.properties
+++ /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
-###############################################################################
-# cssprofile-css1.xml
-css1.stylesheet-def.description=Cascading Style Sheets, level 1
-css1.category-def.box.caption=Box model
-css1.category-def.colorandbackground.caption=Colors and Backgrounds
-css1.category-def.classification.caption=Classification
-css1.category-def.font.caption=Font
-css1.category-def.text.caption=Text
-# cssprofile-css2.xml
-css2.stylesheet-def.description=Cascading Style Sheets, level 2
-css2.category-def.aural.caption=Aural
-css2.category-def.box.caption=Box model
-css2.category-def.colorandbackground.caption=Colors and Backgrounds
-css2.category-def.content.caption=Generated content/List
-css2.category-def.font.caption=Fonts
-css2.category-def.page.caption=Paged media
-css2.category-def.tables.caption=Tables
-css2.category-def.text.caption=Text
-css2.category-def.visual.caption=Visual
-css2.category-def.ui.caption=User interface
-# cssprofile-mobile1_0.xml
-mobile1_0.stylesheet-def.description=CSS Mobile Profile 1.0
-# cssprofile-wap.xml
-wap.stylesheet-def.description=WCSS 1.0
-wap.category-def.wap.caption=WCSS Extensions
diff --git a/bundles/org.eclipse.wst.css.core/plugin.properties b/bundles/org.eclipse.wst.css.core/plugin.properties
deleted file mode 100644
index 941ff800e7..0000000000
--- a/bundles/org.eclipse.wst.css.core/plugin.properties
+++ /dev/null
@@ -1,19 +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=Structured Source CSS Model
-nlFeatureName=Structured Source CSS Model NL Support
-cssprofile_css2.name=CSS2: Cascading Style Sheets, level 2
-cssprofile_css1.name=CSS1: Cascading Style Sheets, level 1
-cssprofile_mobile1_0.name=CSS Mobile Profile 1.0
-cssprofile_wap.name=WCSS 1.0
-Structured_CSS_Document_Factory_Extension.name=Structured CSS Document Factory Extension
-CSS_Content_Type_Extension_Element.name=CSS Content Type
diff --git a/bundles/org.eclipse.wst.css.core/plugin.xml b/bundles/org.eclipse.wst.css.core/plugin.xml
deleted file mode 100644
index 13d9f460bb..0000000000
--- a/bundles/org.eclipse.wst.css.core/plugin.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.css.core"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.wst.css.core.internal.CSSCorePlugin">
-
- <runtime>
- <library name="cssmodel.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.wst.common.encoding"/>
- <import plugin="org.eclipse.wst.sse.ui"/>
- <import plugin="org.eclipse.wst.xml.core"/>
- <import plugin="org.eclipse.wst.sse.core"/>
- </requires>
-
- <extension
- point="org.eclipse.wst.sse.core.cssprofile">
- <profile
- name="%cssprofile_css2.name"
- default="true"
- uri="cssprofile/cssprofile-css2.xml"
- id="org.eclipse.wst.css.core.cssprofile.css2">
- </profile>
- <profile
- name="%cssprofile_css1.name"
- uri="cssprofile/cssprofile-css1.xml"
- id="org.eclipse.wst.css.core.cssprofile.css1">
- </profile>
- <profile
- name="%cssprofile_mobile1_0.name"
- uri="cssprofile/cssprofile-mobile1_0.xml"
- id="org.eclipse.wst.css.core.cssprofile.mobile1_0">
- </profile>
- <profile
- name="%cssprofile_wap.name"
- uri="cssprofile/cssprofile-wap.xml"
- id="org.eclipse.wst.css.core.cssprofile.wap">
- </profile>
- </extension>
- <extension
- point="org.eclipse.wst.sse.core.modelHandler">
- <modelHandler
- class="org.eclipse.wst.css.core.modelhandler.ModelHandlerForCSS"
- associatedContentTypeId="org.eclipse.wst.css.core.csssource"
- id="org.eclipse.wst.css.core.modelhandler">
- </modelHandler>
- </extension>
- <extension
- id="org.eclipse.wst.css.core.builderdelegate.todo"
- point="org.eclipse.wst.sse.core.builderdelegate">
- <participant
- class="org.eclipse.wst.css.core.internal.tasks.CSSTaskTagSeeker"
- contentType="org.eclipse.wst.css.core.csssource">
- </participant>
- </extension>
- <extension point="org.eclipse.core.filebuffers.documentCreation"
- id="org.eclipse.wst.css.core.documentfactories"
- name="%Structured_CSS_Document_Factory_Extension.name">
- <factory
- contentTypeId="org.eclipse.wst.css.core.csssource"
- class="org.eclipse.wst.sse.core.filebuffers.BasicStructuredDocumentFactory"/>
- </extension>
- <extension
- point="org.eclipse.team.core.fileTypes">
- <fileTypes
- type="text"
- extension="css">
- </fileTypes>
- </extension>
- <extension
- point="org.eclipse.wst.sse.core.formatProcessors">
- <processor
- class="org.eclipse.wst.css.core.format.FormatProcessorCSS"
- contentTypeId="org.eclipse.wst.css.core.csssource">
- </processor>
- </extension>
- <extension
- point="org.eclipse.core.runtime.contentTypes">
- <content-type
- file-extensions="css"
- priority="high"
- name="%CSS_Content_Type_Extension_Element.name"
- id="csssource"
- base-type="org.eclipse.core.runtime.text">
- <describer class="org.eclipse.wst.css.core.internal.content.ContentDescriberForCSS"/>
- </content-type>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/CSSCorePlugin.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/CSSCorePlugin.java
deleted file mode 100644
index 5896c163f5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/CSSCorePlugin.java
+++ /dev/null
@@ -1,20 +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.css.core;
-
-/**
- * @deprecated use internal CSSCorePlugin class instead if possible
- */
-public class CSSCorePlugin extends
- org.eclipse.wst.css.core.internal.CSSCorePlugin {
- // see org.eclipse.wst.css.core.internal.CSSCorePlugin
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/ICSSModelAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/ICSSModelAdapter.java
deleted file mode 100644
index c9095174df..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/ICSSModelAdapter.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.css.core.adapters;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.sse.core.INodeAdapter;
-
-
-/**
- */
-public interface ICSSModelAdapter extends INodeAdapter {
-
- ICSSModel getModel();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IModelProvideAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IModelProvideAdapter.java
deleted file mode 100644
index b40be5ec5e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IModelProvideAdapter.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.css.core.adapters;
-
-
-
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.IStructuredModel;
-
-/**
- *
- */
-public interface IModelProvideAdapter extends INodeAdapter {
-
- /**
- *
- */
- void modelProvided(IStructuredModel newModel);
-
- /**
- */
- void modelReleased(IStructuredModel newModel);
-
- /**
- */
- void modelRemoved(IStructuredModel newModel);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleDeclarationAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleDeclarationAdapter.java
deleted file mode 100644
index 967d8d87b7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleDeclarationAdapter.java
+++ /dev/null
@@ -1,25 +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.css.core.adapters;
-
-
-
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-
-/**
- */
-public interface IStyleDeclarationAdapter extends ICSSModelAdapter {
-
- /**
- */
- public CSSStyleDeclaration getStyle();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSelectorAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSelectorAdapter.java
deleted file mode 100644
index b163d2701a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSelectorAdapter.java
+++ /dev/null
@@ -1,33 +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.css.core.adapters;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSSimpleSelector;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.w3c.dom.Element;
-
-
-/**
- *
- */
-public interface IStyleSelectorAdapter extends INodeAdapter {
-
- /**
- * @return boolean
- * @param element
- * org.w3c.dom.Element
- * @param pseudoName
- * java.lang.String
- */
- boolean match(ICSSSimpleSelector selector, Element element, String pseudoName);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSheetAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSheetAdapter.java
deleted file mode 100644
index 33e09d258d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSheetAdapter.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.css.core.adapters;
-
-
-
-import org.w3c.dom.Element;
-import org.w3c.dom.stylesheets.StyleSheet;
-
-/**
- */
-public interface IStyleSheetAdapter extends ICSSModelAdapter {
-
- /**
- * Returns HTML/XML element that is the owner of this adapter
- */
- Element getElement();
-
- /**
- * Returns CSS document that is related to this element
- */
- public StyleSheet getSheet();
-
- /**
- * This is called at the time of releasing HTML/XML model
- */
- public void released();
-
- /**
- * This is called at the time of removing this Element from the document
- */
- public void removed();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSheetListAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSheetListAdapter.java
deleted file mode 100644
index 418db30cff..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/adapters/IStyleSheetListAdapter.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.css.core.adapters;
-
-
-
-import java.util.Enumeration;
-
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.w3c.dom.Element;
-import org.w3c.dom.css.CSSStyleDeclaration;
-import org.w3c.dom.stylesheets.StyleSheetList;
-
-/**
- */
-public interface IStyleSheetListAdapter extends INodeAdapter {
-
- /**
- */
- Enumeration getClasses();
-
- /**
- */
- public CSSStyleDeclaration getOverrideStyle(Element element, String pseudoName);
-
- /**
- */
- public StyleSheetList getStyleSheets();
-
- /**
- */
- public void releaseStyleSheets();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CSSCleanupStrategy.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CSSCleanupStrategy.java
deleted file mode 100644
index ccbb10c44c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CSSCleanupStrategy.java
+++ /dev/null
@@ -1,98 +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.css.core.cleanup;
-
-
-
-public interface CSSCleanupStrategy {
-
- static final short ASIS = 0;
- static final short LOWER = 1;
- static final short UPPER = 2;
-
- /**
- *
- * @return short
- */
- short getIdentCase();
-
- /**
- *
- * @return short
- */
- short getPropNameCase();
-
- /**
- *
- * @return short
- */
- short getPropValueCase();
-
- /**
- *
- * @return short
- */
- short getSelectorTagCase();
-
- /**
- *
- * @return boolean
- */
- boolean isFormatSource();
-
- /**
- *
- * @return boolean
- */
- boolean isQuoteValues();
-
- /**
- *
- * @param formatSource
- * boolean
- */
- void setFormatSource(boolean formatSource);
-
- /**
- *
- * @param identCase
- * short
- */
- void setIdentCase(short identCase);
-
- /**
- *
- * @param propNameCase
- * short
- */
- void setPropNameCase(short propNameCase);
-
- /**
- *
- * @param propValueCase
- * short
- */
- void setPropValueCase(short propValueCase);
-
- /**
- *
- * @param quoteValues
- * boolean
- */
- void setQuoteValues(boolean quoteValues);
-
- /**
- *
- * @param selectorTagCase
- * short
- */
- void setSelectorTagCase(short selectorTagCase);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CSSCleanupStrategyImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CSSCleanupStrategyImpl.java
deleted file mode 100644
index 5907b394e8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CSSCleanupStrategyImpl.java
+++ /dev/null
@@ -1,191 +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.css.core.cleanup;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.preferences.CSSModelPreferenceNames;
-import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-
-
-
-public class CSSCleanupStrategyImpl implements CSSCleanupStrategy {
-
- static private CSSCleanupStrategy instance = null;
- // initialize with defaults
- protected short fIdentCase = ASIS;
- protected short fPropNameCase = ASIS;
- protected short fPropValueCase = ASIS;
- protected short fSelectorTagCase = UPPER;
- protected boolean fQuoteValues = true;
- protected boolean fFormatSource = true;
-
- /**
- * CSSCleanupStrategyImpl constructor comment.
- */
- protected CSSCleanupStrategyImpl() {
- super();
- initialize();
- }
-
- /**
- *
- * @return short
- */
- public short getIdentCase() {
- return fIdentCase;
- }
-
- /**
- *
- * @return org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy
- */
- public synchronized static CSSCleanupStrategy getInstance() {
- if (instance == null)
- instance = new CSSCleanupStrategyImpl();
- return instance;
- }
-
- /**
- *
- * @return short
- */
- public short getPropNameCase() {
- return fPropNameCase;
- }
-
- /**
- *
- * @return short
- */
- public short getPropValueCase() {
- return fPropValueCase;
- }
-
- /**
- *
- * @return short
- */
- public short getSelectorTagCase() {
- return fSelectorTagCase;
- }
-
- /**
- *
- */
- private void initialize() {
- Preferences prefs = CSSCorePlugin.getDefault().getPluginPreferences();
- fIdentCase = getCleanupCaseValue(prefs.getInt(CSSModelPreferenceNames.CLEANUP_CASE_IDENTIFIER));
- fPropNameCase = getCleanupCaseValue(prefs.getInt(CSSModelPreferenceNames.CLEANUP_CASE_PROPERTY_NAME));
- fPropValueCase = getCleanupCaseValue(prefs.getInt(CSSModelPreferenceNames.CLEANUP_CASE_PROPERTY_VALUE));
- fSelectorTagCase = getCleanupCaseValue(prefs.getInt(CSSModelPreferenceNames.CLEANUP_CASE_SELECTOR));
- fQuoteValues = prefs.getBoolean(CommonModelPreferenceNames.QUOTE_ATTR_VALUES);
- fFormatSource = prefs.getBoolean(CommonModelPreferenceNames.FORMAT_SOURCE);
- }
-
- /**
- * Return the CSSCleanupStrategy equivalent case short value when given an
- * int
- *
- * @param value
- * @return equivalent case short or ASIS if cannot be determined
- */
- private short getCleanupCaseValue(int value) {
- switch (value) {
- case CommonModelPreferenceNames.LOWER :
- return LOWER;
- case CommonModelPreferenceNames.UPPER :
- return UPPER;
- }
- return ASIS;
- }
-
- /**
- *
- * @return boolean
- */
- public boolean isFormatSource() {
- return fFormatSource;
- }
-
- /**
- *
- * @return boolean
- */
- public boolean isQuoteValues() {
- return fQuoteValues;
- }
-
- /**
- *
- * @param formatSource
- * boolean
- */
- public void setFormatSource(boolean formatSource) {
- fFormatSource = formatSource;
- }
-
- /**
- *
- * @param identCase
- * short
- */
- public void setIdentCase(short identCase) {
- fIdentCase = identCase;
- }
-
- /**
- *
- * @param propNameCase
- * short
- */
- public void setPropNameCase(short propNameCase) {
- fPropNameCase = propNameCase;
- }
-
- /**
- *
- * @param propValueCase
- * short
- */
- public void setPropValueCase(short propValueCase) {
- fPropValueCase = propValueCase;
- }
-
- /**
- *
- * @param quoteValues
- * boolean
- */
- public void setQuoteValues(boolean quoteValues) {
- fQuoteValues = quoteValues;
- }
-
- /**
- *
- * @param selectorTagCase
- * short
- */
- public void setSelectorTagCase(short selectorTagCase) {
- fSelectorTagCase = selectorTagCase;
- }
-
- // TODO: a saveOptions should be added to CSSCleanupStrategy interface
- public void saveOptions() {
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CSSModelPreferenceNames.CLEANUP_CASE_IDENTIFIER, fIdentCase);
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CSSModelPreferenceNames.CLEANUP_CASE_PROPERTY_NAME, fPropNameCase);
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CSSModelPreferenceNames.CLEANUP_CASE_PROPERTY_VALUE, fPropValueCase);
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CSSModelPreferenceNames.CLEANUP_CASE_SELECTOR, fSelectorTagCase);
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CommonModelPreferenceNames.QUOTE_ATTR_VALUES, fQuoteValues);
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CommonModelPreferenceNames.FORMAT_SOURCE, fFormatSource);
- CSSCorePlugin.getDefault().savePluginPreferences();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CleanupProcessorCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CleanupProcessorCSS.java
deleted file mode 100644
index 46e6f2f6d6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/cleanup/CleanupProcessorCSS.java
+++ /dev/null
@@ -1,131 +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.css.core.cleanup;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.formatter.CSSFormatUtil;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatter;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-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.cleanup.AbstractStructuredCleanupProcessor;
-import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.format.IStructuredFormatProcessor;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.w3c.dom.Node;
-
-
-public class CleanupProcessorCSS extends AbstractStructuredCleanupProcessor {
-
- public void cleanupModel(IStructuredModel structuredModel, int start, int length) {
- CSSFormatUtil formatUtil = CSSFormatUtil.getInstance();
- if (structuredModel instanceof ICSSModel) {
- ICSSDocument doc = ((ICSSModel) structuredModel).getDocument();
- CSSSourceFormatter formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) doc);
- StringBuffer buf = formatter.cleanup(doc);
- if (buf != null) {
- int startOffset = ((IndexedRegion) doc).getStartOffset();
- int endOffset = ((IndexedRegion) doc).getEndOffset();
- formatUtil.replaceSource(doc.getModel(), startOffset, endOffset - startOffset, buf.toString());
- }
- }
- else if (structuredModel instanceof XMLModel) {
- List cssnodes = formatUtil.collectCSSNodes(structuredModel, start, length);
- if (cssnodes != null && !cssnodes.isEmpty()) {
- ICSSModel model = null;
- for (int i = 0; i < cssnodes.size(); i++) {
- ICSSNode node = (ICSSNode) cssnodes.get(i);
- CSSSourceFormatter formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) node);
- StringBuffer buf = formatter.cleanup(node);
- if (buf != null) {
- int startOffset = ((IndexedRegion) node).getStartOffset();
- int endOffset = ((IndexedRegion) node).getEndOffset();
- if (model == null) {
- model = node.getOwnerDocument().getModel();
- }
- formatUtil.replaceSource(model, startOffset, endOffset - startOffset, buf.toString());
- }
- }
- }
- }
- }
-
- protected String getContentType() {
- return IContentTypeIdentifier.ContentTypeID_CSS;
- }
-
- public void cleanupModel(IStructuredModel structuredModel) {
- int start = 0;
- int length = structuredModel.getStructuredDocument().getLength();
-
- cleanupModel(structuredModel, start, length);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.cleanup.IStructuredCleanupProcessor#cleanupDocument(org.eclipse.jface.text.IDocument)
- */
- public void cleanupDocument(IDocument document) throws IOException, CoreException {
- // TODO Auto-generated method stub
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.cleanup.IStructuredCleanupProcessor#cleanupDocument(org.eclipse.jface.text.IDocument,
- * int, int)
- */
- public void cleanupDocument(IDocument document, int start, int length) throws IOException, CoreException {
- // TODO Auto-generated method stub
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.cleanup.AbstractStructuredCleanupProcessor#getCleanupHandler(org.w3c.dom.Node)
- */
- protected IStructuredCleanupHandler getCleanupHandler(Node node) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.cleanup.AbstractStructuredCleanupProcessor#getFormatProcessor()
- */
- protected IStructuredFormatProcessor getFormatProcessor() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.cleanup.AbstractStructuredCleanupProcessor#refreshCleanupPreferences()
- */
- protected void refreshCleanupPreferences() {
- // TODO Auto-generated method stub
-
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSAccess.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSAccess.java
deleted file mode 100644
index f05ef5a504..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSAccess.java
+++ /dev/null
@@ -1,26 +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.css.core.document;
-
-
-
-import java.util.Vector;
-
-/**
- *
- */
-public interface ICSSAccess {
-
- /**
- * @return java.util.Vector
- */
- Vector getClassNames();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSAttr.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSAttr.java
deleted file mode 100644
index 087d93b525..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSAttr.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.css.core.document;
-
-
-
-/**
- *
- */
-public interface ICSSAttr extends ICSSNode {
-
- /**
- * @return java.lang.String
- */
- String getName();
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- ICSSNode getOwnerCSSNode();
-
- /**
- * @return java.lang.String
- */
- String getValue();
-
- /**
- * @param newValue
- * java.lang.String
- */
- void setValue(String newValue);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSCharsetRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSCharsetRule.java
deleted file mode 100644
index b861262a5a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSCharsetRule.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.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSCharsetRule;
-
-/**
- *
- */
-public interface ICSSCharsetRule extends ICSSNode, CSSCharsetRule {
-
- java.lang.String ENCODING = "encoding"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSDocument.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSDocument.java
deleted file mode 100644
index 8d70e3a490..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSDocument.java
+++ /dev/null
@@ -1,98 +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.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSFontFaceRule;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSUnknownRule;
-import org.w3c.dom.stylesheets.MediaList;
-
-/**
- *
- */
-public interface ICSSDocument extends ICSSNode {
-
- /**
- * @return org.w3c.dom.css.CSSCharsetRule
- */
- ICSSCharsetRule createCSSCharsetRule();
-
- /**
- * @return org.w3c.dom.css.CSSFontFaceRule
- */
- CSSFontFaceRule createCSSFontFaceRule();
-
- /**
- * @return org.w3c.dom.css.CSSImportRule
- */
- ICSSImportRule createCSSImportRule();
-
- /**
- * @return org.w3c.dom.css.ICSSMediaRule
- */
- ICSSMediaRule createCSSMediaRule();
-
- /**
- * @return org.w3c.dom.css.CSSPageRule
- */
- ICSSPageRule createCSSPageRule();
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- */
- ICSSPrimitiveValue createCSSPrimitiveValue(short primitiveType);
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * java.lang.String
- */
- CSSRule createCSSRule(String rule);
-
- /**
- * @return org.w3c.dom.css.CSSStyleDeclaration
- */
- ICSSStyleDeclaration createCSSStyleDeclaration();
-
- /**
- * @return com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @param propertyName
- * java.lang.String
- */
- ICSSStyleDeclItem createCSSStyleDeclItem(String propertyName);
-
- /**
- * @return org.w3c.dom.css.CSSStyleRule
- */
- ICSSStyleRule createCSSStyleRule();
-
- /**
- * @return org.w3c.dom.css.CSSUnknownRule
- */
- CSSUnknownRule createCSSUnknownRule();
-
- /**
- * @return org.w3c.dom.stylesheets.MediaList
- */
- MediaList createMediaList();
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSModel
- */
- ICSSModel getModel();
-
- /**
- * @return boolean
- */
- boolean isDocument();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSImportRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSImportRule.java
deleted file mode 100644
index 9818c2f160..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSImportRule.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.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSImportRule;
-
-/**
- *
- */
-public interface ICSSImportRule extends ICSSNode, CSSImportRule {
-
- java.lang.String HREF = "href"; //$NON-NLS-1$
-
- /**
- *
- */
- void refreshStyleSheet();
-
- /**
- * @param href
- * java.lang.String
- */
- void setHref(String href);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSMediaRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSMediaRule.java
deleted file mode 100644
index d06f3c5a71..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSMediaRule.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.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSMediaRule;
-
-/**
- *
- */
-public interface ICSSMediaRule extends ICSSNode, ICSSRuleContainer, CSSMediaRule {
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSModel.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSModel.java
deleted file mode 100644
index 15f5f3fd6e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSModel.java
+++ /dev/null
@@ -1,49 +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.css.core.document;
-
-
-
-import org.eclipse.wst.css.core.event.ICSSStyleNotifier;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.w3c.dom.Node;
-
-
-/**
- *
- */
-public interface ICSSModel extends ICSSStyleNotifier, IStructuredModel {
-
- public static final String EXTERNAL = "externalCSS"; //$NON-NLS-1$
- public static final String EMBEDDED = "embeddedCSS"; //$NON-NLS-1$
- public static final String INLINE = "inlineCSS"; //$NON-NLS-1$
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSDocument
- */
- ICSSDocument getDocument();
-
- /**
- * @return org.w3c.dom.Node
- */
- Node getOwnerDOMNode();
-
- /**
- *
- * @return java.lang.Object
- */
- Object getStyleSheetType();
-
- /**
- * cleanup -> rebuild CSS Nodes This is pre-beta fix for 178176.
- */
- void refreshNodes();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNamedNodeMap.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNamedNodeMap.java
deleted file mode 100644
index 321acca79d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNamedNodeMap.java
+++ /dev/null
@@ -1,26 +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.css.core.document;
-
-
-
-/**
- *
- */
-public interface ICSSNamedNodeMap extends ICSSNodeList {
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param name
- * java.lang.String
- */
- ICSSNode getNamedItem(String name);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNode.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNode.java
deleted file mode 100644
index f8af0b89f4..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNode.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.document;
-
-
-
-/**
- *
- */
-public interface ICSSNode {
-
- short ATTR_NODE = -1;
- short UNKNOWNRULE_NODE = 0;
- short STYLERULE_NODE = 1;
- short CHARSETRULE_NODE = 2;
- short IMPORTRULE_NODE = 3;
- short MEDIARULE_NODE = 4;
- short FONTFACERULE_NODE = 5;
- short PAGERULE_NODE = 6;
- short STYLESHEET_NODE = 7;
- short STYLEDECLARATION_NODE = 8;
- short STYLEDECLITEM_NODE = 9;
- short VALUELIST_NODE = 10;
- short PRIMITIVEVALUE_NODE = 11;
- short MEDIALIST_NODE = 12;
- short DOCUMENTCSSSTYLE_NODE = 13;
- short LINKSTYLE_NODE = 14;
- short ELEMENTCSSINLINESTYLE_NODE = 15;
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- * @param deep
- * boolean
- */
- ICSSNode cloneNode(boolean deep);
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNamedNodeMap
- */
- ICSSNamedNodeMap getAttributes();
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNodeList
- */
- ICSSNodeList getChildNodes();
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- */
- ICSSNode getFirstChild();
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- */
- ICSSNode getLastChild();
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- */
- ICSSNode getNextSibling();
-
- /**
- * @return short
- */
- short getNodeType();
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSDocument
- */
- ICSSDocument getOwnerDocument();
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- */
- ICSSNode getParentNode();
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- */
- ICSSNode getPreviousSibling();
-
- /**
- * @return boolean
- */
- boolean hasChildNodes();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNodeList.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNodeList.java
deleted file mode 100644
index 235bfbe8cb..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSNodeList.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.css.core.document;
-
-
-
-/**
- *
- */
-public interface ICSSNodeList {
-
- /**
- * @return int
- */
- int getLength();
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- * @param index
- * int
- */
- ICSSNode item(int index);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSPageRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSPageRule.java
deleted file mode 100644
index a182fad23f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSPageRule.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.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSPageRule;
-
-/**
- *
- */
-public interface ICSSPageRule extends ICSSNode, CSSPageRule {
-
- java.lang.String SELECTOR = "selector"; //$NON-NLS-1$
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSSelectorList
- */
- ICSSSelectorList getSelectors();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSPrimitiveValue.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSPrimitiveValue.java
deleted file mode 100644
index 0260b69f00..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSPrimitiveValue.java
+++ /dev/null
@@ -1,46 +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.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSPrimitiveValue;
-
-/**
- *
- */
-public interface ICSSPrimitiveValue extends ICSSNode, ICSSValue, CSSPrimitiveValue {
-
- short CSS_INTEGER = 26;
- short CSS_HASH = 27;
- short CSS_URANGE = 28;
- short CSS_FORMAT = 29;
- short CSS_LOCAL = 30;
- short CSS_SLASH = 31;
- short CSS_COMMA = 32;
- short CSS_INHERIT_PRIMITIVE = 33;
-
- /**
- * @param floatValue
- * float
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- void setValue(float floatValue) throws org.w3c.dom.DOMException;
-
- /**
- * @param stringValue
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- void setValue(String stringValue) throws org.w3c.dom.DOMException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSRuleContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSRuleContainer.java
deleted file mode 100644
index 61ea7d317c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSRuleContainer.java
+++ /dev/null
@@ -1,60 +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.css.core.document;
-
-
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSRule;
-
-/**
- *
- */
-public interface ICSSRuleContainer {
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- CSSRule appendRule(CSSRule rule) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newRule
- * org.w3c.dom.css.CSSRule
- * @param refRule
- * org.w3c.dom.css.CSSRule
- */
- CSSRule insertRuleBefore(CSSRule newRule, CSSRule refRule) throws DOMException;
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- CSSRule removeRule(CSSRule rule) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newChild
- * org.w3c.dom.css.CSSRule
- * @param oldChild
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- CSSRule replaceRule(CSSRule newRule, CSSRule oldRule) throws org.w3c.dom.DOMException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelector.java
deleted file mode 100644
index 301ceb9c8b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelector.java
+++ /dev/null
@@ -1,67 +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.css.core.document;
-
-
-
-import java.util.Iterator;
-
-import org.w3c.dom.Element;
-
-/**
- *
- */
-public interface ICSSSelector {
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSSelectorItem
- * @param index
- * int
- */
- ICSSSelectorItem getItem(int index);
-
- /**
- * @return java.util.Iterator
- */
- Iterator getIterator();
-
- /**
- * @return int
- */
- int getLength();
-
- /**
- * @return int
- */
- int getSpecificity();
-
- /**
- * @return java.lang.String
- */
- String getString();
-
- /**
- * @return boolean
- * @param element
- * org.w3c.dom.Element
- */
- boolean match(Element element, String pseudoName);
-
- /**
- *
- */
- Iterator getErrors();
-
- /**
- *
- */
- int getErrorCount();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorCombinator.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorCombinator.java
deleted file mode 100644
index 62ceac299b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorCombinator.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.css.core.document;
-
-
-
-/**
- *
- */
-public interface ICSSSelectorCombinator extends ICSSSelectorItem {
-
- public static final char DESCENDANT = ' ';
- public static final char CHILD = '>';
- public static final char ADJACENT = '+';
- public static final char UNKNOWN = '?'; // error case
-
- /**
- * @return int
- */
- char getCombinatorType();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorItem.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorItem.java
deleted file mode 100644
index 94dae8924c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorItem.java
+++ /dev/null
@@ -1,32 +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.css.core.document;
-
-
-
-/**
- *
- */
-public interface ICSSSelectorItem {
-
- public static final int SIMPLE = 1;
- public static final int COMBINATOR = 2;
-
- /**
- * @return int
- */
- int getItemType();
-
- /**
- * @return java.lang.String
- */
- String getString();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorList.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorList.java
deleted file mode 100644
index c4608ddde5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSelectorList.java
+++ /dev/null
@@ -1,62 +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.css.core.document;
-
-
-
-import java.util.Iterator;
-
-import org.w3c.dom.Element;
-
-/**
- *
- */
-public interface ICSSSelectorList {
-
- /**
- * @return java.util.Iterator
- */
- Iterator getIterator();
-
- /**
- * @return int
- */
- int getLength();
-
- /**
- * @return java.util.Vector
- * @param index
- * int
- */
- ICSSSelector getSelector(int index);
-
- /**
- * @return java.lang.String
- */
- String getString();
-
- /**
- *
- */
- int getErrorCount();
-
- /**
- *
- */
- Iterator getErrors();
-
- /**
- * @return boolean
- * @param element
- * org.w3c.dom.Element
- */
- boolean match(Element element, String pseudoName);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSimpleSelector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSimpleSelector.java
deleted file mode 100644
index 4e332e42bf..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSSimpleSelector.java
+++ /dev/null
@@ -1,77 +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.css.core.document;
-
-
-
-/**
- *
- */
-public interface ICSSSimpleSelector extends ICSSSelectorItem {
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- String getAttribute(int index);
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- String getClass(int index);
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- String getID(int index);
-
- /**
- * @return java.lang.String
- */
- String getName();
-
- /**
- * @return boolean
- */
- int getNumOfAttributes();
-
- /**
- * @return boolean
- */
- int getNumOfClasses();
-
- /**
- * @return boolean
- */
- int getNumOfIDs();
-
- /**
- * @return boolean
- */
- int getNumOfPseudoNames();
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- String getPseudoName(int index);
-
- /**
- * @return boolean
- */
- boolean isUniversal();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleDeclItem.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleDeclItem.java
deleted file mode 100644
index 6d4b080379..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleDeclItem.java
+++ /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
- *******************************************************************************/
-package org.eclipse.wst.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSValue;
-
-/**
- *
- */
-public interface ICSSStyleDeclItem extends ICSSNode, ICSSValueList {
-
- java.lang.String IMPORTANT = "important"; //$NON-NLS-1$
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- ICSSPrimitiveValue appendValue(ICSSPrimitiveValue value) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.css.CSSValue
- */
- CSSValue getCSSValue();
-
- /**
- * @return java.lang.String
- */
- String getPriority();
-
- /**
- * @return java.lang.String
- */
- String getPropertyName();
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- ICSSPrimitiveValue removeValue(ICSSPrimitiveValue value) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param newValue
- * org.w3c.dom.css.CSSPrimitiveValue
- * @param oldValue
- * org.w3c.dom.css.CSSPrimitiveValue
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- ICSSPrimitiveValue replaceValue(ICSSPrimitiveValue newValue, ICSSPrimitiveValue oldValue) throws org.w3c.dom.DOMException;
-
- /**
- * @param priority
- * java.lang.String
- */
- void setPriority(String priority);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleDeclaration.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleDeclaration.java
deleted file mode 100644
index f9aeb80c82..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleDeclaration.java
+++ /dev/null
@@ -1,46 +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.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-/**
- *
- */
-public interface ICSSStyleDeclaration extends ICSSDocument, CSSStyleDeclaration {
-
- /**
- * @return com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @param propertyName
- * java.lang.String
- */
- ICSSStyleDeclItem getDeclItemNode(String propertyName);
-
- /**
- * @return com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @param oldDecl
- * com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- ICSSStyleDeclItem removeDeclItemNode(ICSSStyleDeclItem oldDecl) throws org.w3c.dom.DOMException;
-
- /**
- * @return com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @param newDecl
- * com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- ICSSStyleDeclItem setDeclItemNode(ICSSStyleDeclItem newDecl) throws org.w3c.dom.DOMException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleRule.java
deleted file mode 100644
index 95fe26fd9c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleRule.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.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSStyleRule;
-
-/**
- *
- */
-public interface ICSSStyleRule extends ICSSNode, CSSStyleRule {
-
- java.lang.String SELECTOR = "selector"; //$NON-NLS-1$
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSSelectorList
- */
- ICSSSelectorList getSelectors();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleSheet.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleSheet.java
deleted file mode 100644
index 7da1f4710a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSStyleSheet.java
+++ /dev/null
@@ -1,47 +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.css.core.document;
-
-
-
-import org.w3c.dom.Document;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.css.CSSRuleList;
-import org.w3c.dom.css.CSSStyleSheet;
-import org.w3c.dom.stylesheets.StyleSheetList;
-
-/**
- *
- */
-public interface ICSSStyleSheet extends ICSSDocument, ICSSRuleContainer, CSSStyleSheet {
-
- /**
- * @return org.w3c.dom.NodeList
- */
- NodeList getOwnerNodes();
-
- /**
- * @return org.w3c.dom.NodeList
- * @param doc
- * org.w3c.dom.Document
- */
- NodeList getOwnerNodes(Document doc);
-
- /**
- * @return org.w3c.dom.css.CSSRuleList
- */
- CSSRuleList getOwnerRules();
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheetList
- */
- StyleSheetList getParentStyleSheets();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSValue.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSValue.java
deleted file mode 100644
index 90715e9cea..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSValue.java
+++ /dev/null
@@ -1,26 +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.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSValue;
-
-/**
- *
- */
-public interface ICSSValue extends CSSValue {
-
- /**
- * @return java.lang.String
- */
- String getCSSValueText();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSValueList.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSValueList.java
deleted file mode 100644
index 91a59346ea..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICSSValueList.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.css.core.document;
-
-
-
-import org.w3c.dom.css.CSSValueList;
-
-/**
- *
- */
-public interface ICSSValueList extends ICSSValue, CSSValueList {
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- ICSSPrimitiveValue appendValue(ICSSPrimitiveValue value);
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- ICSSPrimitiveValue removeValue(ICSSPrimitiveValue value);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICounter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICounter.java
deleted file mode 100644
index fc57d59e68..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/ICounter.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.css.core.document;
-
-
-
-import org.w3c.dom.css.Counter;
-
-/**
- *
- */
-public interface ICounter extends ICSSNode, Counter {
-
- java.lang.String IDENTIFIER = "identifier"; //$NON-NLS-1$
- java.lang.String LISTSTYLE = "liststyle"; //$NON-NLS-1$
- java.lang.String SEPARATOR = "separator"; //$NON-NLS-1$
-
- /**
- * @param identifier
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- void setIdentifier(String identifier) throws org.w3c.dom.DOMException;
-
- /**
- * @param listStyle
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- void setListStyle(String listStyle) throws org.w3c.dom.DOMException;
-
- /**
- * @param Separator
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- void setSeparator(String separator) throws org.w3c.dom.DOMException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/IDOMImplementationCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/IDOMImplementationCSS.java
deleted file mode 100644
index 81edc69b3f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/IDOMImplementationCSS.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.css.core.document;
-
-
-
-import org.w3c.dom.css.DOMImplementationCSS;
-
-/**
- *
- */
-public interface IDOMImplementationCSS extends DOMImplementationCSS {
-
- /**
- * @return com.ibm.sed.treemodel.cei.CSSStyleDeclBlock
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- ICSSStyleDeclaration createCSSStyleDeclaration() throws org.w3c.dom.DOMException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/IDocumentStyle.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/IDocumentStyle.java
deleted file mode 100644
index bed9a86504..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/document/IDocumentStyle.java
+++ /dev/null
@@ -1,62 +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.css.core.document;
-
-
-
-import org.w3c.dom.stylesheets.DocumentStyle;
-import org.w3c.dom.stylesheets.StyleSheet;
-
-/**
- *
- */
-public interface IDocumentStyle extends DocumentStyle {
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheet
- * @param newSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- StyleSheet appendSheet(StyleSheet newSheet) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheet
- * @param newSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @param refSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- StyleSheet insertSheetBefore(StyleSheet newSheet, StyleSheet refSheet) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheet
- * @param oldSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- StyleSheet removeSheet(StyleSheet oldSheet) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheet
- * @param newSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @param oldSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- StyleSheet replaceSheet(StyleSheet newSheet, StyleSheet oldSheet) throws org.w3c.dom.DOMException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/event/ICSSStyleListener.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/event/ICSSStyleListener.java
deleted file mode 100644
index 021394de83..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/event/ICSSStyleListener.java
+++ /dev/null
@@ -1,32 +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.css.core.event;
-
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSSelector;
-
-
-
-/**
- *
- */
-public interface ICSSStyleListener {
-
- /**
- *
- */
- void styleChanged(ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media);
-
- /**
- *
- */
- void styleUpdate(ICSSModel srcModel);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/event/ICSSStyleNotifier.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/event/ICSSStyleNotifier.java
deleted file mode 100644
index cf824531f7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/event/ICSSStyleNotifier.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.css.core.event;
-
-
-
-import java.util.List;
-
-/**
- *
- */
-public interface ICSSStyleNotifier extends ICSSStyleListener {
-
- /**
- *
- */
- void addStyleListener(ICSSStyleListener listener);
-
- /**
- *
- */
- List getStyleListeners();
-
- /**
- */
- boolean isRecording();
-
- /**
- *
- */
- void removeStyleListener(ICSSStyleListener listener);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/format/CSSSourceFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/format/CSSSourceFormatter.java
deleted file mode 100644
index 4ce2309227..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/format/CSSSourceFormatter.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.css.core.format;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.sse.core.INodeAdapter;
-
-
-/**
- * @deprecated
- */
-public interface CSSSourceFormatter extends INodeAdapter {
-
- /**
- *
- */
- StringBuffer cleanup(ICSSNode node);
-
- /**
- *
- * @return java.lang.StringBuffer
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param region
- * org.eclipse.jface.text.IRegion
- */
- StringBuffer cleanup(ICSSNode node, IRegion region);
-
- /**
- *
- */
- StringBuffer format(ICSSNode node);
-
- /**
- *
- */
- StringBuffer format(ICSSNode node, IRegion region);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/format/FormatProcessorCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/format/FormatProcessorCSS.java
deleted file mode 100644
index 8ce323113b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/format/FormatProcessorCSS.java
+++ /dev/null
@@ -1,112 +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.css.core.format;
-
-import java.util.List;
-
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.formatter.CSSFormatUtil;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatter;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-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.format.AbstractStructuredFormatProcessor;
-import org.eclipse.wst.sse.core.format.IStructuredFormatPreferences;
-import org.eclipse.wst.sse.core.format.IStructuredFormatter;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.w3c.dom.Node;
-
-
-public class FormatProcessorCSS extends AbstractStructuredFormatProcessor {
- /**
- * @deprecated renamed to getFileExtension() TODO will delete in C5
- */
- protected String getContentType() {
- return "css"; //$NON-NLS-1$
- }
-
- protected String getFileExtension() {
- return "css"; //$NON-NLS-1$
- }
-
- public void formatModel(IStructuredModel structuredModel) {
- int start = 0;
- int length = structuredModel.getStructuredDocument().getLength();
-
- formatModel(structuredModel, start, length);
- }
-
- public void formatModel(IStructuredModel structuredModel, int start, int length) {
- CSSFormatUtil formatUtil = CSSFormatUtil.getInstance();
- if (structuredModel instanceof ICSSModel) {
- ICSSDocument doc = ((ICSSModel) structuredModel).getDocument();
- CSSSourceFormatter formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) doc);
- StringBuffer buf = formatter.format(doc);
- if (buf != null) {
- int startOffset = ((IndexedRegion) doc).getStartOffset();
- int endOffset = ((IndexedRegion) doc).getEndOffset();
- formatUtil.replaceSource(doc.getModel(), startOffset, endOffset - startOffset, buf.toString());
- }
- }
- else if (structuredModel instanceof XMLModel) {
- List cssnodes = formatUtil.collectCSSNodes(structuredModel, start, length);
- if (cssnodes != null && !cssnodes.isEmpty()) {
- ICSSModel model = null;
- for (int i = 0; i < cssnodes.size(); i++) {
- ICSSNode node = (ICSSNode) cssnodes.get(i);
- CSSSourceFormatter formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) node);
- StringBuffer buf = formatter.format(node);
- if (buf != null) {
- int startOffset = ((IndexedRegion) node).getStartOffset();
- int endOffset = ((IndexedRegion) node).getEndOffset();
- if (model == null) {
- model = node.getOwnerDocument().getModel();
- }
- formatUtil.replaceSource(model, startOffset, endOffset - startOffset, buf.toString());
- }
- }
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.format.AbstractStructuredFormatProcessor#getFormatPreferences()
- */
- public IStructuredFormatPreferences getFormatPreferences() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.format.AbstractStructuredFormatProcessor#getFormatter(org.w3c.dom.Node)
- */
- protected IStructuredFormatter getFormatter(Node node) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.format.AbstractStructuredFormatProcessor#refreshFormatPreferences()
- */
- protected void refreshFormatPreferences() {
- // TODO Auto-generated method stub
-
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java
deleted file mode 100644
index ee035424c3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java
+++ /dev/null
@@ -1,144 +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.css.core.internal;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.common.encoding.CommonCharsetNames;
-import org.eclipse.wst.common.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class CSSCorePlugin extends Plugin {
- // The shared instance.
- private static CSSCorePlugin plugin;
- // Resource bundle.
- private ResourceBundle resourceBundle;
- private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
- private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public CSSCorePlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static CSSCorePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#initializeDefaultPluginPreferences()
- */
- protected void initializeDefaultPluginPreferences() {
- Preferences prefs = getDefault().getPluginPreferences();
-
- CSSPreferenceHelper.createDefaultPreferences(prefs);
-
- // set model preference defaults
- prefs.setDefault(CommonModelPreferenceNames.CLEANUP_TAG_NAME_CASE, CommonModelPreferenceNames.ASIS);
- prefs.setDefault(CommonModelPreferenceNames.CLEANUP_ATTR_NAME_CASE, CommonModelPreferenceNames.ASIS);
- prefs.setDefault(CommonModelPreferenceNames.INSERT_MISSING_TAGS, true);
- prefs.setDefault(CommonModelPreferenceNames.QUOTE_ATTR_VALUES, true);
- prefs.setDefault(CommonModelPreferenceNames.FORMAT_SOURCE, true);
- prefs.setDefault(CommonModelPreferenceNames.CONVERT_EOL_CODES, false);
-
- prefs.setDefault(CommonEncodingPreferenceNames.INPUT_CODESET, ""); //$NON-NLS-1$
-
- String defaultEnc = CommonModelPreferenceNames.UTF_8;
- String systemEnc = System.getProperty("file.encoding"); //$NON-NLS-1$
- if (systemEnc != null) {
- defaultEnc = CommonCharsetNames.getPreferredDefaultIanaName(systemEnc, CommonModelPreferenceNames.UTF_8);
- }
- prefs.setDefault(CommonEncodingPreferenceNames.OUTPUT_CODESET, defaultEnc);
-
- prefs.setDefault(CommonEncodingPreferenceNames.END_OF_LINE_CODE, ""); //$NON-NLS-1$
-
- prefs.setDefault(CommonModelPreferenceNames.TAB_WIDTH, 4);
-
- prefs.setDefault(CommonModelPreferenceNames.FORMATTING_SUPPORTED, true);
- prefs.setDefault(CommonModelPreferenceNames.LINE_WIDTH, 72);
- prefs.setDefault(CommonModelPreferenceNames.SPLIT_MULTI_ATTRS, false);
- prefs.setDefault(CommonModelPreferenceNames.INDENT_USING_TABS, true);
- prefs.setDefault(CommonModelPreferenceNames.CLEAR_ALL_BLANK_LINES, false);
-
- prefs.setDefault(CommonModelPreferenceNames.PREFERRED_MARKUP_CASE_SUPPORTED, false);
- prefs.setDefault(CommonModelPreferenceNames.TAG_NAME_CASE, CommonModelPreferenceNames.LOWER);
- prefs.setDefault(CommonModelPreferenceNames.ATTR_NAME_CASE, CommonModelPreferenceNames.LOWER);
- }
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String value) {
- String s = value.trim();
- if (!s.startsWith(KEY_PREFIX, 0))
- return s;
- if (s.startsWith(KEY_DOUBLE_PREFIX, 0))
- return s.substring(1);
-
- int ix = s.indexOf(' ');
- String key = ix == -1 ? s : s.substring(0, ix);
-
- ResourceBundle bundle = getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key.substring(1)) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- public static String getResourceString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (IllegalArgumentException e) {
- return getResourceString(key);
- }
-
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.css.core.internal.CSSCorePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties
deleted file mode 100644
index 8b7eabba04..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties
+++ /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
-###############################################################################
-Please_specify_CSS_file_na=Please specify CSS file name.
-ERROR__Cannot_use_a_static_ERROR_=ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.
-You_cannot_use_CSSStyleShe_UI_=You cannot use CSSStyleSheet.getOwnerRule() because of many referencers of this rule\nPlease use getOnwerRules()
-Missing_return_statement_i_ERROR_=Missing return statement in function
-1concat_ERROR_={0}first flat node is null.
-2concat_ERROR_={0}first flat node is not in model.
-3concat_ERROR_={0}last flat node is null.
-4concat_ERROR_={0}last flat node is not in model.
-25concat_ERROR_={0}first region is null.
-26concat_ERROR_={0}first region is not in model.
-27concat_ERROR_={0}last region is null.
-28concat_ERROR_={0}last region is not in model.
-5concat_ERROR_={0}first region is null.
-6concat_ERROR_={0}first region is not in model.
-7concat_ERROR_={0}last region is null.
-8concat_ERROR_={0}last region is not in model.
-9concat_ERROR_=Invalid escape character at line {0} column {1}.
-12concat_EXC_=Caught Exception: {0}
-13concat_ERROR_=Error: Ignoring invalid lexical state : {0}. State unchanged.
-15concat_ERROR_=Lexical error at line {0}, column {1}. Encountered: {2} after :
-ERROR__Cannot_use_a_static_ERROR__ERROR_=ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/Logger.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/Logger.java
deleted file mode 100644
index 78e2fed3f3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/Logger.java
+++ /dev/null
@@ -1,156 +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.css.core.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.css.core"; //$NON-NLS-1$
-
- private static final String TRACEFILTER_LOCATION = "/debug/tracefilter"; //$NON-NLS-1$
-
- public static final int OK = IStatus.OK; // 0
- public static final int INFO = IStatus.INFO; // 1
- public static final int WARNING = IStatus.WARNING; // 2
- public static final int ERROR = IStatus.ERROR; // 4
-
- public static final int OK_DEBUG = 200 + OK;
- public static final int INFO_DEBUG = 200 + INFO;
- public static final int WARNING_DEBUG = 200 + WARNING;
- public static final int ERROR_DEBUG = 200 + ERROR;
-
- /**
- * 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 traceException(String category, String message, Throwable exception) {
- _trace(category, message, exception);
- }
-
- public static void traceException(String category, Throwable exception) {
- _trace(category, exception.getMessage(), exception);
- }
-
- public static void trace(String category, String message) {
- _trace(category, message, null);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSHeadTokenizer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSHeadTokenizer.java
deleted file mode 100644
index 53e61febad..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSHeadTokenizer.java
+++ /dev/null
@@ -1,1357 +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 code was generated by JFlex 1.2.2 on 1/27/04 6:42 PM */
-
-/*nlsXXX*/
-package org.eclipse.wst.css.core.internal.content;
-
-import java.io.IOException;
-import java.io.Reader;
-
-import org.eclipse.wst.common.encoding.EncodingParserConstants;
-import org.eclipse.wst.common.encoding.HeadParserToken;
-import org.eclipse.wst.common.encoding.IntStack;
-import org.eclipse.wst.xml.core.contenttype.XMLHeadTokenizerConstants;
-
-
-/**
- * This class is a scanner generated by <a
- * href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex </a> 1.2.2
- * on 1/27/04 6:42 PM from the specification file
- * <tt>file:/D:/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jflex</tt>
- */
-public class CSSHeadTokenizer {
-
- /** this character denotes the end of file */
- final public static int YYEOF = -1;
-
- /** lexical states */
- final public static int YYINITIAL = 0;
- final public static int UnDelimitedString = 12;
- final public static int DQ_STRING = 8;
- final public static int SQ_STRING = 10;
- final public static int ST_XMLDecl = 2;
- final public static int QuotedAttributeValue = 6;
- final public static int CHARSET_RULE = 4;
-
- /**
- * YY_LEXSTATE[l] is the state in the DFA for the lexical state l
- * YY_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the
- * beginning of a line l is of the form l = 2*k, k a non negative integer
- */
- private final static int YY_LEXSTATE[] = {0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7};
-
- /**
- * Translates characters to character classes
- */
- final private static String yycmap_packed = "\11\0\1\6\1\11\2\0\1\10\22\0\1\6\1\0\1\36\2\0" + "\1\41\1\0\1\37\7\0\1\40\13\0\1\35\1\12\1\7\1\34" + "\1\13\1\17\1\22\1\0\1\20\1\31\1\25\1\0\1\33\1\21" + "\1\32\2\0\1\16\1\15\1\27\1\30\2\0\1\23\1\24\1\26" + "\3\0\1\14\10\0\1\22\1\0\1\20\1\31\1\25\1\0\1\33" + "\1\21\1\32\2\0\1\16\1\15\1\27\1\30\2\0\1\23\1\24" + "\1\26\3\0\1\14\102\0\1\4\3\0\1\5\17\0\1\3\16\0" + "\1\1\20\0\1\3\16\0\1\1\1\2\170\0\1\2\ufe87\0";
-
- /**
- * Translates characters to character classes
- */
- final private static char[] yycmap = yy_unpack_cmap(yycmap_packed);
-
-
- /* error codes */
- final private static int YY_UNKNOWN_ERROR = 0;
- final private static int YY_ILLEGAL_STATE = 1;
- final private static int YY_NO_MATCH = 2;
- final private static int YY_PUSHBACK_2BIG = 3;
-
- /* error messages for the codes above */
- final private static String YY_ERROR_MSG[] = {"Unkown internal scanner error", "Internal error: unknown state", "Error: could not match input", "Error: pushback value was too large"};
-
- /** the input device */
- private java.io.Reader yy_reader;
-
- /** the current state of the DFA */
- private int yy_state;
-
- /** the current lexical state */
- private int yy_lexical_state = YYINITIAL;
-
- /**
- * this buffer contains the current text to be matched and is the source
- * of the yytext() string
- */
- private char yy_buffer[] = new char[16384];
-
- /** the textposition at the last accepting state */
- private int yy_markedPos;
-
- /** the textposition at the last state to be included in yytext */
- private int yy_pushbackPos;
-
- /** the current text position in the buffer */
- private int yy_currentPos;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int yy_startRead;
-
- /**
- * endRead marks the last character in the buffer, that has been read from
- * input
- */
- private int yy_endRead;
-
-
- /** the number of characters up to the start of the matched text */
- private int yychar;
-
-
- /**
- * yy_atBOL == true <=>the scanner is currently at the beginning of a
- * line
- */
- private boolean yy_atBOL;
-
- /** yy_atEOF == true <=>the scanner has returned a value for EOF */
- private boolean yy_atEOF;
-
- /** denotes if the user-EOF-code has already been executed */
- private boolean yy_eof_done;
-
- /* user code: */
-
-
- private boolean hasMore = true;
- private final static int MAX_TO_SCAN = 1000;
- StringBuffer string = new StringBuffer();
- // state stack for easier state handling
- private IntStack fStateStack = new IntStack();
- private String valueText = null;
-
-
-
- public CSSHeadTokenizer() {
- super();
- }
-
- public void reset(Reader in) {
- /* the input device */
- yy_reader = in;
-
- /* the current state of the DFA */
- yy_state = 0;
-
- /* the current lexical state */
- yy_lexical_state = YYINITIAL;
-
- /*
- * this buffer contains the current text to be matched and is the
- * source of the yytext() string
- */
- java.util.Arrays.fill(yy_buffer, (char) 0);
-
- /* the textposition at the last accepting state */
- yy_markedPos = 0;
-
- /* the textposition at the last state to be included in yytext */
- yy_pushbackPos = 0;
-
- /* the current text position in the buffer */
- yy_currentPos = 0;
-
- /* startRead marks the beginning of the yytext() string in the buffer */
- yy_startRead = 0;
-
- /**
- * endRead marks the last character in the buffer, that has been read
- * from input
- */
- yy_endRead = 0;
-
-
- /* the number of characters up to the start of the matched text */
- yychar = 0;
-
-
- /**
- * yy_atBOL == true <=>the scanner is currently at the beginning of a
- * line
- */
- yy_atBOL = false;
-
- /* yy_atEOF == true <=> the scanner has returned a value for EOF */
- yy_atEOF = false;
-
- /* denotes if the user-EOF-code has already been executed */
- yy_eof_done = false;
-
-
- fStateStack.clear();
-
- hasMore = true;
-
- // its a little wasteful to "throw away" first char array generated
- // by class init (via auto generated code), but we really do want
- // a small buffer for our head parsers.
- if (yy_buffer.length != MAX_TO_SCAN) {
- yy_buffer = new char[MAX_TO_SCAN];
- }
-
-
- }
-
-
- public final HeadParserToken getNextToken() throws IOException {
- String context = null;
- context = primGetNextToken();
- HeadParserToken result = null;
- if (valueText != null) {
- result = createToken(context, yychar, valueText);
- valueText = null;
- }
- else {
- result = createToken(context, yychar, yytext());
- }
- return result;
- }
-
- public final boolean hasMoreTokens() {
- return hasMore && yychar < MAX_TO_SCAN;
- }
-
- private void pushCurrentState() {
- fStateStack.push(yystate());
-
- }
-
- private void popState() {
- yybegin(fStateStack.pop());
- }
-
- private HeadParserToken createToken(String context, int start, String text) {
- return new HeadParserToken(context, start, text);
- }
-
-
-
- /**
- * Creates a new scanner There is also a java.io.InputStream version of
- * this constructor.
- *
- * @param in
- * the java.io.Reader to read input from.
- */
- public CSSHeadTokenizer(java.io.Reader in) {
- this.yy_reader = in;
- }
-
- /**
- * Creates a new scanner. There is also java.io.Reader version of this
- * constructor.
- *
- * @param in
- * the java.io.Inputstream to read input from.
- */
- public CSSHeadTokenizer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed
- * the packed character translation table
- * @return the unpacked character translation table
- */
- private static char[] yy_unpack_cmap(String packed) {
- char[] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 158) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do
- map[j++] = value;
- while (--count > 0);
- }
- return map;
- }
-
-
- /**
- * Gets the next input character.
- *
- * @return the next character of the input stream, EOF if the end of the
- * stream is reached.
- * @exception IOException
- * if any I/O-Error occurs
- */
- private int yy_advance() throws java.io.IOException {
-
- /* standard case */
- if (yy_currentPos < yy_endRead)
- return yy_buffer[yy_currentPos++];
-
- /* if the eof is reached, we don't need to work hard */
- if (yy_atEOF)
- return YYEOF;
-
- /* otherwise: need to refill the buffer */
-
- /* first: make room (if you can) */
- if (yy_startRead > 0) {
- System.arraycopy(yy_buffer, yy_startRead, yy_buffer, 0, yy_endRead - yy_startRead);
-
- /* translate stored positions */
- yy_endRead -= yy_startRead;
- yy_currentPos -= yy_startRead;
- yy_markedPos -= yy_startRead;
- yy_pushbackPos -= yy_startRead;
- yy_startRead = 0;
- }
-
- /* is the buffer big enough? */
- if (yy_currentPos >= yy_buffer.length) {
- /* if not: blow it up */
- char newBuffer[] = new char[yy_currentPos * 2];
- System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length);
- yy_buffer = newBuffer;
- }
-
- /* finally: fill the buffer with new input */
- int numRead = yy_reader.read(yy_buffer, yy_endRead, yy_buffer.length - yy_endRead);
-
- if (numRead == -1)
- return YYEOF;
-
- yy_endRead += numRead;
-
- return yy_buffer[yy_currentPos++];
- }
-
-
- /**
- * Closes the input stream.
- */
- final public void yyclose() throws java.io.IOException {
- yy_atEOF = true; /* indicate end of file */
- yy_endRead = yy_startRead; /* invalidate buffer */
- yy_reader.close();
- }
-
-
- /**
- * Returns the current lexical state.
- */
- final public int yystate() {
- return yy_lexical_state;
- }
-
- /**
- * Enters a new lexical state
- *
- * @param newState
- * the new lexical state
- */
- final public void yybegin(int newState) {
- yy_lexical_state = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- final public String yytext() {
- return new String(yy_buffer, yy_startRead, yy_markedPos - yy_startRead);
- }
-
- /**
- * Returns the length of the matched text region.
- */
- final public int yylength() {
- return yy_markedPos - yy_startRead;
- }
-
-
- /**
- * Reports an error that occured while scanning.
- *
- * @param errorCode
- * the code of the errormessage to display
- */
- private void yy_ScanError(int errorCode) {
- try {
- System.out.println(YY_ERROR_MSG[errorCode]);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- System.out.println(YY_ERROR_MSG[YY_UNKNOWN_ERROR]);
- }
-
- System.exit(1);
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number
- * the number of characters to be read again. This number must
- * not be greater than yylength()!
- */
- private void yypushback(int number) {
- if (number > yylength())
- yy_ScanError(YY_PUSHBACK_2BIG);
-
- yy_markedPos -= number;
- }
-
-
- /**
- * Contains user EOF-code, which will be executed exactly once, when the
- * end of file is reached
- */
- private void yy_do_eof() {
- if (!yy_eof_done) {
- yy_eof_done = true;
- hasMore = false;
-
- }
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched, the end
- * of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception IOException
- * if any I/O-Error occurs
- */
- public String primGetNextToken() throws java.io.IOException {
- int yy_input;
- int yy_action;
-
-
- while (true) {
-
- yychar += yylength();
-
- yy_atBOL = yy_markedPos <= 0 || yy_buffer[yy_markedPos - 1] == '\n';
- if (!yy_atBOL && yy_buffer[yy_markedPos - 1] == '\r') {
- yy_atBOL = yy_advance() != '\n';
- if (!yy_atEOF)
- yy_currentPos--;
- }
-
- yy_action = -1;
-
- yy_currentPos = yy_startRead = yy_markedPos;
-
- if (yy_atBOL)
- yy_state = YY_LEXSTATE[yy_lexical_state + 1];
- else
- yy_state = YY_LEXSTATE[yy_lexical_state];
-
-
- yy_forAction : {
- while (true) {
-
- yy_input = yy_advance();
-
- if (yy_input == YYEOF)
- break yy_forAction;
-
- yy_input = yycmap[yy_input];
-
- boolean yy_isFinal = false;
- boolean yy_noLookAhead = false;
-
- yy_forNext : {
- switch (yy_state) {
- case 0 :
- switch (yy_input) {
- case 1 :
- yy_isFinal = true;
- yy_state = 9;
- break yy_forNext;
- case 2 :
- yy_isFinal = true;
- yy_state = 10;
- break yy_forNext;
- case 3 :
- yy_isFinal = true;
- yy_state = 11;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 8;
- break yy_forNext;
- }
-
- case 1 :
- switch (yy_input) {
- case 1 :
- yy_isFinal = true;
- yy_state = 9;
- break yy_forNext;
- case 2 :
- yy_isFinal = true;
- yy_state = 10;
- break yy_forNext;
- case 3 :
- yy_isFinal = true;
- yy_state = 11;
- break yy_forNext;
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 12;
- break yy_forNext;
- case 10 :
- yy_isFinal = true;
- yy_state = 13;
- break yy_forNext;
- case 15 :
- yy_isFinal = true;
- yy_state = 14;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 8;
- break yy_forNext;
- }
-
- case 2 :
- switch (yy_input) {
- case 11 :
- yy_isFinal = true;
- yy_state = 15;
- break yy_forNext;
- case 21 :
- yy_isFinal = true;
- yy_state = 16;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 8;
- break yy_forNext;
- }
-
- case 3 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 17;
- break yy_forNext;
- case 29 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 18;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 8;
- break yy_forNext;
- }
-
- case 4 :
- switch (yy_input) {
- case 6 :
- case 8 :
- yy_isFinal = true;
- yy_state = 20;
- break yy_forNext;
- case 9 :
- yy_isFinal = true;
- yy_state = 21;
- break yy_forNext;
- case 30 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 22;
- break yy_forNext;
- case 31 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 23;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 19;
- break yy_forNext;
- }
-
- case 5 :
- switch (yy_input) {
- case 8 :
- case 9 :
- case 10 :
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 25;
- break yy_forNext;
- case 11 :
- case 32 :
- yy_isFinal = true;
- yy_state = 26;
- break yy_forNext;
- case 29 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 27;
- break yy_forNext;
- case 30 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 28;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 24;
- break yy_forNext;
- }
-
- case 6 :
- switch (yy_input) {
- case 8 :
- case 9 :
- case 10 :
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 25;
- break yy_forNext;
- case 32 :
- yy_isFinal = true;
- yy_state = 26;
- break yy_forNext;
- case 29 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 27;
- break yy_forNext;
- case 31 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 28;
- break yy_forNext;
- case 33 :
- yy_isFinal = true;
- yy_state = 29;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 24;
- break yy_forNext;
- }
-
- case 7 :
- switch (yy_input) {
- case 10 :
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 25;
- break yy_forNext;
- case 32 :
- yy_isFinal = true;
- yy_state = 26;
- break yy_forNext;
- case 11 :
- yy_isFinal = true;
- yy_state = 29;
- break yy_forNext;
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 30;
- break yy_forNext;
- case 29 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 31;
- break yy_forNext;
- case 30 :
- case 31 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 32;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 24;
- break yy_forNext;
- }
-
- case 9 :
- switch (yy_input) {
- case 2 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 33;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 10 :
- switch (yy_input) {
- case 1 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 34;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 11 :
- switch (yy_input) {
- case 4 :
- yy_state = 35;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 12 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_state = 36;
- break yy_forNext;
- case 10 :
- yy_state = 37;
- break yy_forNext;
- case 15 :
- yy_state = 38;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 13 :
- switch (yy_input) {
- case 11 :
- yy_state = 39;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 14 :
- switch (yy_input) {
- case 16 :
- yy_state = 40;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 15 :
- switch (yy_input) {
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 41;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 16 :
- switch (yy_input) {
- case 23 :
- yy_state = 42;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 17 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 17;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 20 :
- switch (yy_input) {
- case 6 :
- case 8 :
- yy_isFinal = true;
- yy_state = 20;
- break yy_forNext;
- case 9 :
- yy_state = 43;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 19;
- break yy_forNext;
- }
-
- case 21 :
- switch (yy_input) {
- case 6 :
- case 8 :
- yy_isFinal = true;
- yy_state = 20;
- break yy_forNext;
- case 9 :
- yy_state = 43;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 19;
- break yy_forNext;
- }
-
- case 26 :
- switch (yy_input) {
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 44;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 29 :
- switch (yy_input) {
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 45;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 35 :
- switch (yy_input) {
- case 5 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 46;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 36 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_state = 36;
- break yy_forNext;
- case 10 :
- yy_state = 37;
- break yy_forNext;
- case 15 :
- yy_state = 38;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 37 :
- switch (yy_input) {
- case 11 :
- yy_state = 39;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 38 :
- switch (yy_input) {
- case 16 :
- yy_state = 40;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 39 :
- switch (yy_input) {
- case 12 :
- yy_state = 47;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 40 :
- switch (yy_input) {
- case 17 :
- yy_state = 48;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 42 :
- switch (yy_input) {
- case 16 :
- yy_state = 49;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 43 :
- switch (yy_input) {
- case 6 :
- case 8 :
- yy_isFinal = true;
- yy_state = 20;
- break yy_forNext;
- case 9 :
- yy_state = 43;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 19;
- break yy_forNext;
- }
-
- case 47 :
- switch (yy_input) {
- case 13 :
- yy_state = 50;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 48 :
- switch (yy_input) {
- case 18 :
- yy_state = 51;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 49 :
- switch (yy_input) {
- case 24 :
- yy_state = 52;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 50 :
- switch (yy_input) {
- case 14 :
- yy_state = 53;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 51 :
- switch (yy_input) {
- case 19 :
- yy_state = 54;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 52 :
- switch (yy_input) {
- case 25 :
- yy_state = 55;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 53 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 56;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 54 :
- switch (yy_input) {
- case 20 :
- yy_state = 57;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 55 :
- switch (yy_input) {
- case 26 :
- yy_state = 58;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 56 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 56;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 57 :
- switch (yy_input) {
- case 21 :
- yy_state = 59;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 58 :
- switch (yy_input) {
- case 23 :
- yy_state = 60;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 59 :
- switch (yy_input) {
- case 22 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 61;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 60 :
- switch (yy_input) {
- case 27 :
- yy_state = 62;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 62 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_state = 62;
- break yy_forNext;
- case 7 :
- yy_isFinal = true;
- yy_state = 63;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 63 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 63;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- default :
- yy_ScanError(YY_ILLEGAL_STATE);
- break;
- }
- }
-
- if (yy_isFinal) {
- yy_action = yy_state;
- yy_markedPos = yy_currentPos;
- if (yy_noLookAhead)
- break yy_forAction;
- }
-
- }
- }
-
-
- switch (yy_action) {
-
- case 45 : {
- yypushback(2);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 65 :
- break;
- case 25 : {
- yypushback(1);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 66 :
- break;
- case 19 :
- case 20 : {
- yypushback(1);
- yybegin(UnDelimitedString);
- string.setLength(0);
- }
- case 67 :
- break;
- case 18 : {
- yybegin(YYINITIAL);
- hasMore = false;
- return CSSHeadTokenizerConstants.RuleEnd;
- }
- case 68 :
- break;
- case 32 : {
- yypushback(1);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;
- }
- case 69 :
- break;
- case 44 : {
- yypushback(2);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 70 :
- break;
- case 61 : {
- if (yychar == 0) {
- yybegin(CHARSET_RULE);
- return CSSHeadTokenizerConstants.CHARSET_RULE;
- }
- }
- case 71 :
- break;
- case 56 : {
- if (yychar == 0) {
- yybegin(ST_XMLDecl);
- return XMLHeadTokenizerConstants.XMLDeclStart;
- }
- }
- case 72 :
- break;
- case 8 :
- case 9 :
- case 10 :
- case 11 :
- case 12 :
- case 13 :
- case 14 :
- case 15 :
- case 16 :
- case 21 : {
- if (yychar > MAX_TO_SCAN) {
- hasMore = false;
- return EncodingParserConstants.MAX_CHARS_REACHED;
- }
- }
- case 73 :
- break;
- case 41 : {
- yybegin(YYINITIAL);
- return XMLHeadTokenizerConstants.XMLDeclEnd;
- }
- case 74 :
- break;
- case 63 : {
- pushCurrentState();
- yybegin(QuotedAttributeValue);
- return XMLHeadTokenizerConstants.XMLDelEncoding;
- }
- case 75 :
- break;
- case 3 :
- case 17 : {
- pushCurrentState();
- yybegin(QuotedAttributeValue);
- }
- case 76 :
- break;
- case 46 : {
- hasMore = false;
- return EncodingParserConstants.UTF83ByteBOM;
- }
- case 77 :
- break;
- case 33 : {
- hasMore = false;
- return EncodingParserConstants.UTF16BE;
- }
- case 78 :
- break;
- case 34 : {
- hasMore = false;
- return EncodingParserConstants.UTF16LE;
- }
- case 79 :
- break;
- case 24 :
- case 26 :
- case 29 : {
- string.append(yytext());
- }
- case 80 :
- break;
- case 23 : {
- yybegin(SQ_STRING);
- string.setLength(0);
- }
- case 81 :
- break;
- case 22 : {
- yybegin(DQ_STRING);
- string.setLength(0);
- }
- case 82 :
- break;
- case 27 : {
- yypushback(1);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 83 :
- break;
- case 28 : {
- popState();
- valueText = string.toString();
- return EncodingParserConstants.StringValue;
- }
- case 84 :
- break;
- case 30 : {
- yypushback(1);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.UnDelimitedStringValue;
- }
- case 85 :
- break;
- case 31 : {
- yypushback(1);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.UnDelimitedStringValue;
- }
- case 86 :
- break;
- default :
- if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
- yy_atEOF = true;
- yy_do_eof();
- {
- hasMore = false;
- return EncodingParserConstants.EOF;
- }
- }
- else {
- yy_ScanError(YY_NO_MATCH);
- }
- }
- }
- }
-
- /**
- * Runs the scanner on input files.
- *
- * This main method is the debugging routine for the scanner. It prints
- * each returned token to System.out until the end of file is reached, or
- * an error occured.
- *
- * @param argv
- * the command line, contains the filenames to run the scanner
- * on.
- */
- public static void main(String argv[]) {
- for (int i = 0; i < argv.length; i++) {
- CSSHeadTokenizer scanner = null;
- try {
- scanner = new CSSHeadTokenizer(new java.io.FileReader(argv[i]));
- }
- catch (java.io.FileNotFoundException e) {
- System.out.println("File not found : \"" + argv[i] + "\"");
- System.exit(1);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- System.out.println("Usage : java CSSHeadTokenizer <inputfile>");
- System.exit(1);
- }
-
- try {
- do {
- System.out.println(scanner.primGetNextToken());
- }
- while (!scanner.yy_atEOF);
-
- }
- catch (java.io.IOException e) {
- System.out.println("An I/O error occured while scanning :");
- System.out.println(e);
- System.exit(1);
- }
- catch (Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
- }
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSHeadTokenizerConstants.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSHeadTokenizerConstants.java
deleted file mode 100644
index b8ddef77fa..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSHeadTokenizerConstants.java
+++ /dev/null
@@ -1,19 +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.css.core.internal.content;
-
-
-public interface CSSHeadTokenizerConstants {
-
- String RuleEnd = "RuleEnd"; //$NON-NLS-1$
- String CHARSET_RULE = "CHARSET_RULE"; //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSResourceEncodingDetector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSResourceEncodingDetector.java
deleted file mode 100644
index 45c10348af..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/CSSResourceEncodingDetector.java
+++ /dev/null
@@ -1,149 +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.css.core.internal.content;
-
-import java.io.IOException;
-
-import org.eclipse.wst.common.encoding.AbstractResourceEncodingDetector;
-import org.eclipse.wst.common.encoding.EncodingGuesser;
-import org.eclipse.wst.common.encoding.EncodingMemento;
-import org.eclipse.wst.common.encoding.EncodingParserConstants;
-import org.eclipse.wst.common.encoding.HeadParserToken;
-import org.eclipse.wst.common.encoding.IResourceCharsetDetector;
-
-
-
-public class CSSResourceEncodingDetector extends AbstractResourceEncodingDetector implements IResourceCharsetDetector {
-
- private CSSHeadTokenizer fTokenizer;
-
- /**
- * There is no spec defined encoding for CSS, so Null is returned.
- */
- public String getSpecDefaultEncoding() {
- // should match what's in plugin.xml (or look it up from there).
- return null;
- }
-
- private boolean canHandleAsUnicodeStream(String tokenType) {
- boolean canHandleAsUnicodeStream = false;
- if (tokenType == EncodingParserConstants.UTF83ByteBOM) {
- canHandleAsUnicodeStream = true;
- String enc = "UTF-8"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- fEncodingMemento.setUTF83ByteBOMUsed(true);
- }
- else if (tokenType == EncodingParserConstants.UTF16BE) {
- canHandleAsUnicodeStream = true;
- String enc = "UTF-16BE"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- }
- else if (tokenType == EncodingParserConstants.UTF16LE) {
- canHandleAsUnicodeStream = true;
- String enc = "UTF-16"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- }
- return canHandleAsUnicodeStream;
- }
-
- /**
- * @return Returns the tokenizer.
- */
- private CSSHeadTokenizer getTokenizer() {
- if (fTokenizer == null) {
- fTokenizer = new CSSHeadTokenizer();
- }
- return fTokenizer;
- }
-
- private boolean isLegalString(String valueTokenType) {
- if (valueTokenType == null)
- return false;
- else
- return valueTokenType.equals(EncodingParserConstants.StringValue) || valueTokenType.equals(EncodingParserConstants.UnDelimitedStringValue) || valueTokenType.equals(EncodingParserConstants.InvalidTerminatedStringValue) || valueTokenType.equals(EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue);
- }
-
- protected void parseInput() throws IOException {
- checkInContents();
- if (fEncodingMemento == null) {
- checkHeuristics();
- }
- }
-
- private void checkInContents() throws IOException {
- CSSHeadTokenizer tokenizer = getTokenizer();
- tokenizer.reset(fReader);
- HeadParserToken token = null;
- String tokenType = null;
- do {
- token = tokenizer.getNextToken();
- tokenType = token.getType();
- if (canHandleAsUnicodeStream(tokenType)) {
- // side effect of canHandle is to create appropriate memento
- }
- else if (tokenType == CSSHeadTokenizerConstants.CHARSET_RULE) {
- if (tokenizer.hasMoreTokens()) {
- HeadParserToken valueToken = tokenizer.getNextToken();
- String valueTokenType = valueToken.getType();
- if (isLegalString(valueTokenType)) {
- createEncodingMemento(valueToken.getText(), EncodingMemento.FOUND_ENCODING_IN_CONTENT);
-
- }
- }
- }
-
- }
- while (tokenizer.hasMoreTokens());
- }
-
- /**
- *
- */
- private void checkHeuristics() throws IOException {
- boolean noHeuristic = false;
- String heuristicEncoding = null;
- try {
- fReader.reset();
- byte[] bytes = new byte[3];
- int nRead = 0;
- for (int i = 0; i < bytes.length; i++) {
- if (fReader.ready()) {
- int oneByte = fReader.read();
- nRead++;
- if (oneByte <= 0xFF) {
- bytes[i] = (byte) oneByte;
- }
- else {
- noHeuristic = true;
- }
- }
- else {
- noHeuristic = true;
- break;
- }
- }
- if (!noHeuristic && nRead == 3) {
- heuristicEncoding = EncodingGuesser.guessEncoding(bytes, 3);
- }
- }
- catch (IOException e) {
- // if any IO exception, then not a heuristic case
- }
- finally {
- fReader.reset();
- }
- if (heuristicEncoding != null) {
- createEncodingMemento(heuristicEncoding, EncodingMemento.GUESSED_ENCODING_FROM_STREAM);
- }
-
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/ContentDescriberForCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/ContentDescriberForCSS.java
deleted file mode 100644
index b28ef02ede..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/content/ContentDescriberForCSS.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.css.core.internal.content;
-
-import org.eclipse.core.runtime.content.ITextContentDescriber;
-import org.eclipse.wst.common.encoding.AbstractContentDescriber;
-import org.eclipse.wst.common.encoding.IResourceCharsetDetector;
-
-
-public class ContentDescriberForCSS extends AbstractContentDescriber implements ITextContentDescriber {
-
- protected IResourceCharsetDetector getDetector() {
- return new CSSResourceEncodingDetector();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IMediaGroupID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IMediaGroupID.java
deleted file mode 100644
index 8d02ac886b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IMediaGroupID.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.css.core.internal.contentmodel;
-
-
-
-/**
- *
- */
-public interface IMediaGroupID {
-
- public final static String M_CONTINUOUS = "continuous"; //$NON-NLS-1$
- public final static String M_PAGED = "paged"; //$NON-NLS-1$
-
- public final static String M_VISUAL = "visual"; //$NON-NLS-1$
- public final static String M_AURAL = "aural"; //$NON-NLS-1$
- public final static String M_TACTILE = "tactile"; //$NON-NLS-1$
-
- public final static String M_GRID = "grid"; //$NON-NLS-1$
- public final static String M_BITMAP = "bitmap"; //$NON-NLS-1$
-
- public final static String M_INTERACTIVE = "interactive"; //$NON-NLS-1$
- public final static String M_STATIC = "static"; //$NON-NLS-1$
-
- public final static String M_ALL = "all"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IValID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IValID.java
deleted file mode 100644
index f49c1a113e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IValID.java
+++ /dev/null
@@ -1,266 +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.css.core.internal.contentmodel;
-
-
-
-/**
- *
- */
-public interface IValID {
-
- public final static String V_100 = "100"; //$NON-NLS-1$
- public final static String V_200 = "200"; //$NON-NLS-1$
- public final static String V_300 = "300"; //$NON-NLS-1$
- public final static String V_400 = "400"; //$NON-NLS-1$
- public final static String V_500 = "500"; //$NON-NLS-1$
- public final static String V_600 = "600"; //$NON-NLS-1$
- public final static String V_700 = "700"; //$NON-NLS-1$
- public final static String V_800 = "800"; //$NON-NLS-1$
- public final static String V_900 = "900"; //$NON-NLS-1$
- public final static String V_ABOVE = "above"; //$NON-NLS-1$
- public final static String V_ABSOLUTE = "absolute"; //$NON-NLS-1$
- public final static String V_ACTIVEBORDER = "ActiveBorder"; //$NON-NLS-1$
- public final static String V_ACTIVECAPTION = "ActiveCaption"; //$NON-NLS-1$
- public final static String V_ALL = "all"; //$NON-NLS-1$
- public final static String V_ALWAYS = "always"; //$NON-NLS-1$
- public final static String V_APPWORKSPACE = "AppWorkspace"; //$NON-NLS-1$
- public final static String V_AQUA = "aqua"; //$NON-NLS-1$
- public final static String V_ARMENIAN = "armenian"; //$NON-NLS-1$
- public final static String V_AUTO = "auto"; //$NON-NLS-1$
- public final static String V_AVOID = "avoid"; //$NON-NLS-1$
- public final static String V_BACKGROUND = "Background"; //$NON-NLS-1$
- public final static String V_BASELINE = "baseline"; //$NON-NLS-1$
- public final static String V_BEHIND = "behind"; //$NON-NLS-1$
- public final static String V_BELOW = "below"; //$NON-NLS-1$
- public final static String V_BIDI_OVERRIDE = "bidi-override"; //$NON-NLS-1$
- public final static String V_BLACK = "black"; //$NON-NLS-1$
- public final static String V_BLINK = "blink"; //$NON-NLS-1$
- public final static String V_BLOCK = "block"; //$NON-NLS-1$
- public final static String V_BLUE = "blue"; //$NON-NLS-1$
- public final static String V_BOLD = "bold"; //$NON-NLS-1$
- public final static String V_BOLDER = "bolder"; //$NON-NLS-1$
- public final static String V_BOTH = "both"; //$NON-NLS-1$
- public final static String V_BOTTOM = "bottom"; //$NON-NLS-1$
- public final static String V_BUTTONFACE = "ButtonFace"; //$NON-NLS-1$
- public final static String V_BUTTONHIGHLIGHT = "ButtonHighlight"; //$NON-NLS-1$
- public final static String V_BUTTONSHADOW = "ButtonShadow"; //$NON-NLS-1$
- public final static String V_BUTTONTEXT = "ButtonText"; //$NON-NLS-1$
- public final static String V_CAPITALIZE = "capitalize"; //$NON-NLS-1$
- public final static String V_CAPTION = "caption"; //$NON-NLS-1$
- public final static String V_CAPTIONTEXT = "CaptionText"; //$NON-NLS-1$
- public final static String V_CENTER = "center"; //$NON-NLS-1$
- public final static String V_CENTER_LEFT = "center-left"; //$NON-NLS-1$
- public final static String V_CENTER_RIGHT = "center-right"; //$NON-NLS-1$
- public final static String V_CHILD = "child"; //$NON-NLS-1$
- public final static String V_CIRCLE = "circle"; //$NON-NLS-1$
- public final static String V_CJK_IDEOGRAPHIC = "cjk-ideographic"; //$NON-NLS-1$
- public final static String V_CLOSE_QUOTE = "close-quote"; //$NON-NLS-1$
- public final static String V_CODE = "code"; //$NON-NLS-1$
- public final static String V_CONDENSED = "condensed"; //$NON-NLS-1$
- public final static String V_COLLAPSE = "collapse"; //$NON-NLS-1$
- public final static String V_COMPACT = "compact"; //$NON-NLS-1$
- public final static String V_CONTINUOUS = "continuous"; //$NON-NLS-1$
- public final static String V_CROP = "crop"; //$NON-NLS-1$
- public final static String V_CROSS = "cross"; //$NON-NLS-1$
- public final static String V_CROSSHAIR = "crosshair"; //$NON-NLS-1$
- public final static String V_CURSIVE = "cursive"; //$NON-NLS-1$
- public final static String V_DASHED = "dashed"; //$NON-NLS-1$
- public final static String V_DECIMAL = "decimal"; //$NON-NLS-1$
- public final static String V_DECIMAL_LEADING_ZERO = "decimal-leading-zero"; //$NON-NLS-1$
- public final static String V_DEFAULT = "default"; //$NON-NLS-1$
- public final static String V_DIGITS = "digits"; //$NON-NLS-1$
- public final static String V_DISC = "disc"; //$NON-NLS-1$
- public final static String V_DOTTED = "dotted"; //$NON-NLS-1$
- public final static String V_DOUBLE = "double"; //$NON-NLS-1$
- public final static String V_E_RESIZE = "e-resize"; //$NON-NLS-1$
- public final static String V_EMBED = "embed"; //$NON-NLS-1$
- public final static String V_EXPANDED = "expanded"; //$NON-NLS-1$
- public final static String V_EXTRA_CONDENSED = "extra-condensed"; //$NON-NLS-1$
- public final static String V_EXTRA_EXPANDED = "extra-expanded"; //$NON-NLS-1$
- public final static String V_FANTASY = "fantasy"; //$NON-NLS-1$
- public final static String V_FAR_LEFT = "far-left"; //$NON-NLS-1$
- public final static String V_FAR_RIGHT = "far-right"; //$NON-NLS-1$
- public final static String V_FAST = "fast"; //$NON-NLS-1$
- public final static String V_FASTER = "faster"; //$NON-NLS-1$
- public final static String V_FEMALE = "female"; //$NON-NLS-1$
- public final static String V_FIXED = "fixed"; //$NON-NLS-1$
- public final static String V_FUCHSIA = "fuchsia"; //$NON-NLS-1$
- public final static String V_GEORGIAN = "georgian"; //$NON-NLS-1$
- public final static String V_GRAY = "gray"; //$NON-NLS-1$
- public final static String V_GRAYTEXT = "GrayText"; //$NON-NLS-1$
- public final static String V_GREEN = "green"; //$NON-NLS-1$
- public final static String V_GROOVE = "groove"; //$NON-NLS-1$
- public final static String V_HEBREW = "hebrew"; //$NON-NLS-1$
- public final static String V_HELP = "help"; //$NON-NLS-1$
- public final static String V_HIDDEN = "hidden"; //$NON-NLS-1$
- public final static String V_HIDE = "hide"; //$NON-NLS-1$
- public final static String V_HIGH = "high"; //$NON-NLS-1$
- public final static String V_HIGHLIGHT = "Highlight"; //$NON-NLS-1$
- public final static String V_HIGHLIGHTTEXT = "HighlightText"; //$NON-NLS-1$
- public final static String V_HIGHER = "higher"; //$NON-NLS-1$
- public final static String V_HIRAGANA = "hiragana"; //$NON-NLS-1$
- public final static String V_HIRAGANA_IROHA = "hiragana-iroha"; //$NON-NLS-1$
- public final static String V_ICON = "icon"; //$NON-NLS-1$
- public final static String V_INACTIVEBORDER = "InactiveBorder"; //$NON-NLS-1$
- public final static String V_INACTIVECAPTION = "InactiveCaption"; //$NON-NLS-1$
- public final static String V_INACTIVECAPTIONTEXT = "InactiveCaptionText"; //$NON-NLS-1$
- public final static String V_INFOBACKGROUND = "InfoBackground"; //$NON-NLS-1$
- public final static String V_INFOTEXT = "InfoText"; //$NON-NLS-1$
- public final static String V_INLINE = "inline"; //$NON-NLS-1$
- public final static String V_INLINE_TABLE = "inline-table"; //$NON-NLS-1$
- public final static String V_INSET = "inset"; //$NON-NLS-1$
- public final static String V_INSIDE = "inside"; //$NON-NLS-1$
- public final static String V_INVERT = "invert"; //$NON-NLS-1$
- public final static String V_ITALIC = "italic"; //$NON-NLS-1$
- public final static String V_JUSTIFY = "justify"; //$NON-NLS-1$
- public final static String V_KATAKANA = "katakana"; //$NON-NLS-1$
- public final static String V_KATAKANA_IROHA = "katakana-iroha"; //$NON-NLS-1$
- public final static String V_LANDSCAPE = "landscape"; //$NON-NLS-1$
- public final static String V_LARGE = "large"; //$NON-NLS-1$
- public final static String V_LARGER = "larger"; //$NON-NLS-1$
- public final static String V_LEFT = "left"; //$NON-NLS-1$
- public final static String V_LEFT_SIDE = "left-side"; //$NON-NLS-1$
- public final static String V_LEFTWARDS = "leftwards"; //$NON-NLS-1$
- public final static String V_LEVEL = "level"; //$NON-NLS-1$
- public final static String V_LIGHTER = "lighter"; //$NON-NLS-1$
- public final static String V_LIME = "lime"; //$NON-NLS-1$
- public final static String V_LINE_THROUGH = "line-through"; //$NON-NLS-1$
- public final static String V_LIST_ITEM = "list-item"; //$NON-NLS-1$
- public final static String V_LOUD = "loud"; //$NON-NLS-1$
- public final static String V_LOW = "low"; //$NON-NLS-1$
- public final static String V_LOWER = "lower"; //$NON-NLS-1$
- public final static String V_LOWER_ALPHA = "lower-alpha"; //$NON-NLS-1$
- public final static String V_LOWER_GREEK = "lower-greek"; //$NON-NLS-1$
- public final static String V_LOWER_LATIN = "lower-latin"; //$NON-NLS-1$
- public final static String V_LOWER_ROMAN = "lower-roman"; //$NON-NLS-1$
- public final static String V_LOWERCASE = "lowercase"; //$NON-NLS-1$
- public final static String V_LTR = "ltr"; //$NON-NLS-1$
- public final static String V_MALE = "male"; //$NON-NLS-1$
- public final static String V_MARKER = "marker"; //$NON-NLS-1$
- public final static String V_MAROON = "maroon"; //$NON-NLS-1$
- public final static String V_MEDIUM = "medium"; //$NON-NLS-1$
- public final static String V_MENU = "menu"; //$NON-NLS-1$
- public final static String V_MENUTEXT = "MenuText"; //$NON-NLS-1$
- public final static String V_MESSAGE_BOX = "message-box"; //$NON-NLS-1$
- public final static String V_MIDDLE = "middle"; //$NON-NLS-1$
- public final static String V_MIX = "mix"; //$NON-NLS-1$
- public final static String V_MONOSPACE = "monospace"; //$NON-NLS-1$
- public final static String V_MOVE = "move"; //$NON-NLS-1$
- public final static String V_N_RESIZE = "n-resize"; //$NON-NLS-1$
- public final static String V_NARROWER = "narrower"; //$NON-NLS-1$
- public final static String V_NAVY = "navy"; //$NON-NLS-1$
- public final static String V_NE_RESIZE = "ne-resize"; //$NON-NLS-1$
- public final static String V_NO_CLOSE_QUOTE = "no-close-quote"; //$NON-NLS-1$
- public final static String V_NO_OPEN_QUOTE = "no-open-quote"; //$NON-NLS-1$
- public final static String V_NO_REPEAT = "no-repeat"; //$NON-NLS-1$
- public final static String V_NONE = "none"; //$NON-NLS-1$
- public final static String V_NORMAL = "normal"; //$NON-NLS-1$
- public final static String V_NOWRAP = "nowrap"; //$NON-NLS-1$
- public final static String V_NW_RESIZE = "nw-resize"; //$NON-NLS-1$
- public final static String V_OBLIQUE = "oblique"; //$NON-NLS-1$
- public final static String V_OLIVE = "olive"; //$NON-NLS-1$
- public final static String V_ONCE = "once"; //$NON-NLS-1$
- public final static String V_OPEN_QUOTE = "open-quote"; //$NON-NLS-1$
- public final static String V_OUTSET = "outset"; //$NON-NLS-1$
- public final static String V_OUTSIDE = "outside"; //$NON-NLS-1$
- public final static String V_OVERLINE = "overline"; //$NON-NLS-1$
- public final static String V_POINTER = "pointer"; //$NON-NLS-1$
- public final static String V_PORTRAIT = "portrait"; //$NON-NLS-1$
- public final static String V_PRE = "pre"; //$NON-NLS-1$
- public final static String V_PURPLE = "purple"; //$NON-NLS-1$
- public final static String V_RED = "red"; //$NON-NLS-1$
- public final static String V_RELATIVE = "relative"; //$NON-NLS-1$
- public final static String V_REPEAT = "repeat"; //$NON-NLS-1$
- public final static String V_REPEAT_X = "repeat-x"; //$NON-NLS-1$
- public final static String V_REPEAT_Y = "repeat-y"; //$NON-NLS-1$
- public final static String V_RIDGE = "ridge"; //$NON-NLS-1$
- public final static String V_RIGHT = "right"; //$NON-NLS-1$
- public final static String V_RIGHT_SIDE = "right-side"; //$NON-NLS-1$
- public final static String V_RIGHTWARDS = "rightwards"; //$NON-NLS-1$
- public final static String V_RTL = "rtl"; //$NON-NLS-1$
- public final static String V_RUN_IN = "run-in"; //$NON-NLS-1$
- public final static String V_S_RESIZE = "s-resize"; //$NON-NLS-1$
- public final static String V_SANS_SERIF = "sans-serif"; //$NON-NLS-1$
- public final static String V_SCROLL = "scroll"; //$NON-NLS-1$
- public final static String V_SCROLLBAR = "Scrollbar"; //$NON-NLS-1$
- public final static String V_SE_RESIZE = "se-resize"; //$NON-NLS-1$
- public final static String V_SEMI_CONDENSED = "semi-condensed"; //$NON-NLS-1$
- public final static String V_SEMI_EXPANDED = "semi-expanded"; //$NON-NLS-1$
- public final static String V_SEPARATE = "separate"; //$NON-NLS-1$
- public final static String V_SERIF = "serif"; //$NON-NLS-1$
- public final static String V_SHOW = "show"; //$NON-NLS-1$
- public final static String V_SILENT = "silent"; //$NON-NLS-1$
- public final static String V_SILVER = "silver"; //$NON-NLS-1$
- public final static String V_SLOW = "slow"; //$NON-NLS-1$
- public final static String V_SLOWER = "slower"; //$NON-NLS-1$
- public final static String V_SMALL = "small"; //$NON-NLS-1$
- public final static String V_SMALL_CAPS = "small-caps"; //$NON-NLS-1$
- public final static String V_SMALL_CAPTION = "small-caption"; //$NON-NLS-1$
- public final static String V_SMALLER = "smaller"; //$NON-NLS-1$
- public final static String V_SOFT = "soft"; //$NON-NLS-1$
- public final static String V_SOLID = "solid"; //$NON-NLS-1$
- public final static String V_SPELL_OUT = "spell-out"; //$NON-NLS-1$
- public final static String V_SQUARE = "square"; //$NON-NLS-1$
- public final static String V_STATIC = "static"; //$NON-NLS-1$
- public final static String V_STATUS_BAR = "status-bar"; //$NON-NLS-1$
- public final static String V_SUB = "sub"; //$NON-NLS-1$
- public final static String V_SUPER = "super"; //$NON-NLS-1$
- public final static String V_SW_RESIZE = "sw-resize"; //$NON-NLS-1$
- public final static String V_TABLE = "table"; //$NON-NLS-1$
- public final static String V_TABLE_CAPTION = "table-caption"; //$NON-NLS-1$
- public final static String V_TABLE_CELL = "table-cell"; //$NON-NLS-1$
- public final static String V_TABLE_COLUMN = "table-column"; //$NON-NLS-1$
- public final static String V_TABLE_COLUMN_GROUP = "table-column-group"; //$NON-NLS-1$
- public final static String V_TABLE_FOOTER_GROUP = "table-footer-group"; //$NON-NLS-1$
- public final static String V_TABLE_HEADER_GROUP = "table-header-group"; //$NON-NLS-1$
- public final static String V_TABLE_ROW = "table-row"; //$NON-NLS-1$
- public final static String V_TABLE_ROW_GROUP = "table-row-group"; //$NON-NLS-1$
- public final static String V_TEAL = "teal"; //$NON-NLS-1$
- public final static String V_TEXT = "text"; //$NON-NLS-1$
- public final static String V_TEXT_TOP = "text-top"; //$NON-NLS-1$
- public final static String V_TEXT_BOTTOM = "text-bottom"; //$NON-NLS-1$
- public final static String V_THICK = "thick"; //$NON-NLS-1$
- public final static String V_THIN = "thin"; //$NON-NLS-1$
- public final static String V_THREEDDARKSHADOW = "ThreeDDarkShadow"; //$NON-NLS-1$
- public final static String V_THREEDFACE = "ThreeDFace"; //$NON-NLS-1$
- public final static String V_THREEDHIGHLIGHT = "ThreeDHighlight"; //$NON-NLS-1$
- public final static String V_THREEDLIGHTSHADOW = "ThreeDLightShadow"; //$NON-NLS-1$
- public final static String V_THREEDSHADOW = "ThreeDShadow"; //$NON-NLS-1$
- public final static String V_TOP = "top"; //$NON-NLS-1$
- public final static String V_TRANSPARENT = "transparent"; //$NON-NLS-1$
- public final static String V_ULTRA_CONDENSED = "ultra-condensed"; //$NON-NLS-1$
- public final static String V_ULTRA_EXPANDED = "ultra-expanded"; //$NON-NLS-1$
- public final static String V_UNDERLINE = "underline"; //$NON-NLS-1$
- public final static String V_UPPER_ALPHA = "upper-alpha"; //$NON-NLS-1$
- public final static String V_UPPER_LATIN = "upper-latin"; //$NON-NLS-1$
- public final static String V_UPPER_ROMAN = "upper-roman"; //$NON-NLS-1$
- public final static String V_UPPERCASE = "uppercase"; //$NON-NLS-1$
- public final static String V_VISIBLE = "visible"; //$NON-NLS-1$
- public final static String V_W_RESIZE = "w-resize"; //$NON-NLS-1$
- public final static String V_WAIT = "wait"; //$NON-NLS-1$
- public final static String V_WHITE = "white"; //$NON-NLS-1$
- public final static String V_WIDER = "wider"; //$NON-NLS-1$
- public final static String V_WINDOW = "Window"; //$NON-NLS-1$
- public final static String V_WINDOWFRAME = "WindowFrame"; //$NON-NLS-1$
- public final static String V_WINDOWTEXT = "WindowText"; //$NON-NLS-1$
- public final static String V_X_FAST = "x-fast"; //$NON-NLS-1$
- public final static String V_X_HIGH = "x-high"; //$NON-NLS-1$
- public final static String V_X_LARGE = "x-large"; //$NON-NLS-1$
- public final static String V_X_LOUD = "x-loud"; //$NON-NLS-1$
- public final static String V_X_LOW = "x-low"; //$NON-NLS-1$
- public final static String V_X_SLOW = "x-slow"; //$NON-NLS-1$
- public final static String V_X_SMALL = "x-small"; //$NON-NLS-1$
- public final static String V_X_SOFT = "x-soft"; //$NON-NLS-1$
- public final static String V_XX_SMALL = "xx-small"; //$NON-NLS-1$
- public final static String V_XX_LARGE = "xx-large"; //$NON-NLS-1$
- public final static String V_YELLOW = "yellow"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMContainer.java
deleted file mode 100644
index d013f7ca6e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMContainer.java
+++ /dev/null
@@ -1,164 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Set;
-import java.util.Vector;
-
-/**
- *
- */
-public class PropCMContainer extends PropCMNode {
-
- private java.util.Vector nodes = new Vector();
- private static java.util.Hashtable instances = null;
- public final static String VAL_ABSOLUTE_SIZE = "absolute-size";//$NON-NLS-1$
- public final static String VAL_BORDER_STYLE = "border-style";//$NON-NLS-1$
- public final static String VAL_BORDER_WIDTH = "border-width";//$NON-NLS-1$
- public final static String VAL_COLOR = "color";//$NON-NLS-1$
- public final static String VAL_SYSTEM_COLOR = "system-color";//$NON-NLS-1$
- public final static String VAL_GENERIC_FAMILY = "generic-family";//$NON-NLS-1$
- public final static String VAL_GENERIC_VOICE = "generic-voice";//$NON-NLS-1$
- public final static String VAL_MARGIN_WIDTH = "margin-width";//$NON-NLS-1$
- public final static String VAL_PADDING_WIDTH = "padding-width";//$NON-NLS-1$
- public final static String VAL_RELATIVE_SIZE = "relative-size";//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMContainer(String name) {
- super(name);
- }
-
- /**
- *
- */
- Object appendChild(Object node) {
- if (!nodes.contains(node))
- nodes.add(node);
- return node;
- }
-
- /**
- *
- */
- public boolean canHave(String identifier) {
- int nChild = getNumChild();
- for (int i = 0; i < nChild; i++) {
- Object child = getChildAt(i);
- if (child instanceof String && identifier.equalsIgnoreCase((String) child))
- return true;
- if (child instanceof PropCMContainer && ((PropCMContainer) child).canHave(identifier))
- return true;
- }
- return false;
- }
-
- /**
- *
- */
- public Object getChildAt(int index) {
- if (nodes == null || index < 0 || nodes.size() <= index)
- return null;
- return nodes.elementAt(index);
- }
-
- /**
- *
- */
- static PropCMContainer getContInstanceOf(String name) {
- if (name == null)
- return null;
-
- // initialize
- if (instances == null)
- instances = new Hashtable(20);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMContainer) node;
-
- if (PropCMNode.isLoading()) {
- // register
- node = new PropCMContainer(name);
- instances.put(name, node);
- }
-
- return (PropCMContainer) node;
- }
-
- /**
- *
- */
- void getIdentifiers(Set idents) {
- if (idents == null)
- return;
- int nChildren = nodes.size();
- for (int i = 0; i < nChildren; i++) {
- Object node = nodes.elementAt(i);
- if (node instanceof PropCMNode)
- ((PropCMNode) node).getIdentifiers(idents);
- else if (node instanceof String)
- idents.add(node);
- }
- }
-
- /**
- *
- */
- public int getNumChild() {
- if (nodes == null)
- return 0;
- return nodes.size();
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_CONTAINER;
- }
-
- /**
- *
- */
- void getValues(Collection values) {
- if (values == null)
- return;
- int nChildren = nodes.size();
- for (int i = 0; i < nChildren; i++) {
- Object node = nodes.elementAt(i);
- if (node instanceof PropCMNode)
- ((PropCMNode) node).getValues(values);
- else if (node instanceof String) {
- if (!values.contains(node))
- values.add(node);
- }
- }
- }
-
- /**
- *
- */
- Object removeChild(Object node) {
- nodes.remove(node);
- return node;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFontProperty.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFontProperty.java
deleted file mode 100644
index a28e21da9f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFontProperty.java
+++ /dev/null
@@ -1,198 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-/**
- *
- */
-public class PropCMFontProperty extends PropCMProperty {
-
- // static fields
- private static java.util.Hashtable instances = null;
- private static java.util.Hashtable cachedIdMap = null;
- // selecting properties
- public final static String PF_FONT_FAMILY = "font-family";//$NON-NLS-1$
- public final static String PF_FONT_STYLE = "font-style";//$NON-NLS-1$
- public final static String PF_FONT_VARIANT = "font-variant";//$NON-NLS-1$
- public final static String PF_FONT_WEIGHT = "font-weight";//$NON-NLS-1$
- public final static String PF_FONT_STRETCH = "font-stretch";//$NON-NLS-1$
- public final static String PF_FONT_SIZE = "font-size";//$NON-NLS-1$
- // qualification properties
- public final static String PF_UNICODE_RANGE = "unicode-range";//$NON-NLS-1$
- // numeric properties
- public final static String PF_UNITS_PER_EM = "units-per-em";//$NON-NLS-1$
- // referencing properties
- public final static String PF_SRC = "src";//$NON-NLS-1$
- // matching properties
- public final static String PF_PANOSE_1 = "panose-1";//$NON-NLS-1$
- public final static String PF_STEMV = "stemv";//$NON-NLS-1$
- public final static String PF_STEMH = "stemh";//$NON-NLS-1$
- public final static String PF_SLOPE = "slope";//$NON-NLS-1$
- public final static String PF_CAP_HEIGHT = "cap-height";//$NON-NLS-1$
- public final static String PF_X_HEIGHT = "x-height";//$NON-NLS-1$
- public final static String PF_ASCENT = "ascent";//$NON-NLS-1$
- public final static String PF_DESCENT = "descent";//$NON-NLS-1$
- // synthesis properties
- public final static String PF_WIDTHS = "widths";//$NON-NLS-1$
- public final static String PF_BBOX = "bbox";//$NON-NLS-1$
- public final static String PF_DEFINITION_SRC = "definition-src";//$NON-NLS-1$
- // alignment properties
- public final static String PF_BASELINE = "baseline";//$NON-NLS-1$
- public final static String PF_CENTERLINE = "centerline";//$NON-NLS-1$
- public final static String PF_MATHLINE = "mathline";//$NON-NLS-1$
- public final static String PF_TOPLINE = "topline";//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMFontProperty(String name) {
- super(name);
- }
-
- /**
- *
- */
- public static PropCMProperty getInstanceOf(String name) {
- // initialize
- if (instances == null)
- instances = new Hashtable(10);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMProperty) node;
-
- // register
- if (PropCMNode.isLoading()) {
- node = new PropCMFontProperty(name);
- instances.put(name, node);
- }
-
- return (PropCMProperty) node;
- }
-
- /**
- *
- */
- public static Enumeration getNameEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.keys();
- }
-
- /**
- *
- */
- public static Enumeration getPropertyEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.elements();
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_FONTPROPERTY;
- }
-
- /**
- *
- */
- public static Vector names() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return new Vector(instances.keySet());
- }
-
- /**
- *
- */
- public static List names(Object mediaGroup) {
- if (mediaGroup == null)
- return names();
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- Vector properties = new Vector();
-
- Iterator it = instances.values().iterator();
- while (it.hasNext()) {
- PropCMProperty prop = (PropCMProperty) it.next();
- if (prop.getMediaGroups().contains(mediaGroup))
- properties.add(prop.getName());
- }
-
- return properties;
- }
-
- /**
- * If itentifier is null, get all properties
- */
- public static Vector propertiesFor(String identifier, boolean shorthands) {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // if identifier is null, get all properties
- if (identifier == null)
- return new Vector(instances.values());
-
- if (cachedIdMap == null) {
- // start cacheing
- cachedIdMap = new Hashtable();
- }
- else {
- // search cached
- Object ret = cachedIdMap.get(identifier + String.valueOf(shorthands));
- if (ret != null)
- return new Vector((Collection) ret);
- }
-
- // create
- Enumeration properties = getPropertyEnum();
- HashSet set = new HashSet();
- while (properties.hasMoreElements()) {
- PropCMProperty prop = (PropCMProperty) properties.nextElement();
- if (!shorthands && prop.isShorthand())
- continue;
- if (prop.canHave(identifier))
- set.add(prop);
- }
-
- // cache
- cachedIdMap.put(identifier + String.valueOf(shorthands), set);
-
- return new Vector(set);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFunction.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFunction.java
deleted file mode 100644
index 03efc91c06..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFunction.java
+++ /dev/null
@@ -1,89 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Set;
-
-/**
- *
- */
-public class PropCMFunction extends PropCMNode {
-
- private static java.util.Hashtable instances = null;
- public final static String VAL_ATTR = "attr";//$NON-NLS-1$
- public final static String VAL_COUNTER = "counter";//$NON-NLS-1$
- public final static String VAL_RGB = "rgb";//$NON-NLS-1$
- public final static String VAL_SHAPE = "rect";//$NON-NLS-1$
- public final static String VAL_URI = "url";//$NON-NLS-1$
- public final static String VAL_FORMAT = "format";//$NON-NLS-1$
- public final static String VAL_LOCAL = "local";//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMFunction(String name) {
- super(name);
- }
-
- /**
- *
- */
- void getIdentifiers(Set indents) {
- }
-
- /**
- *
- */
- static public PropCMFunction getInstanceOf(String name) {
- if (name == null)
- return null;
-
- // initialize
- if (instances == null)
- instances = new Hashtable(10);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMFunction) node;
-
- // register
- if (PropCMNode.isLoading()) {
- node = new PropCMFunction(name);
- instances.put(name, node);
- }
-
- return (PropCMFunction) node;
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_FUNC;
- }
-
- /**
- *
- */
- void getValues(Collection values) {
- if (values != null && !values.contains(this))
- values.add(this);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNode.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNode.java
deleted file mode 100644
index 52a84df134..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNode.java
+++ /dev/null
@@ -1,1369 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Vector;
-
-/**
- *
- */
-public abstract class PropCMNode {
-
- public final static short VAL_IDENTIFIER = 0;
- public final static short VAL_PROPERTY = 1;
- public final static short VAL_NUMBER = 2;
- public final static short VAL_STRING = 3;
- public final static short VAL_FUNC = 4;
- public final static short VAL_CONTAINER = 5;
- public final static short VAL_SUBPROPERTY = 6;
- public final static short VAL_FONTPROPERTY = 7;
- public final static short VAL_UNICODE_RANGE = 8;
- protected java.lang.String name = null;
- private static short LOADING = 0; // 0 : not initialized, 1 : under
- // initializing, 2 : initialize-done
- // and fix DB
-
- /**
- *
- */
- public PropCMNode(String name) {
- super();
- this.name = name;
- }
-
- /**
- *
- */
- public Set getIdentifiers() {
- HashSet ids = new HashSet();
- getIdentifiers(ids);
- return ids;
- }
-
- /**
- *
- */
- abstract void getIdentifiers(Set indents);
-
- /**
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- *
- */
- public abstract short getType();
-
- /**
- *
- */
- public Collection getValues() {
- Vector vals = new Vector();
- getValues(vals);
- return vals;
- }
-
- /**
- *
- */
- abstract void getValues(Collection values);
-
- /**
- *
- */
- protected static void initPropertyCM() {
- if (!isNeedInitialize())
- return;
- LOADING = 1;
-
- PropCMNumber.initNumberCMDim();
-
- // azimuth
- PropCMProperty prop = PropCMProperty.getInstanceOf(PropCMProperty.P_AZIMUTH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_ANGLE));
- prop.appendChild(IValID.V_LEFT_SIDE);
- prop.appendChild(IValID.V_FAR_LEFT);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_CENTER_LEFT);
- prop.appendChild(IValID.V_CENTER);
- prop.appendChild(IValID.V_CENTER_RIGHT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendChild(IValID.V_FAR_RIGHT);
- prop.appendChild(IValID.V_RIGHT_SIDE);
- prop.appendChild(IValID.V_BEHIND);
- prop.appendChild(IValID.V_LEFTWARDS);
- prop.appendChild(IValID.V_RIGHTWARDS);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
- prop.setMaxValueCount(2);
-
- // background
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.setMaxValueCount(6);
-
- // background-attachment
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT);
- prop.appendChild(IValID.V_SCROLL);
- prop.appendChild(IValID.V_FIXED);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendChild(IValID.V_TRANSPARENT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-image
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-position ---- sub-properties horizontal
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_CENTER);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-position ---- sub-properties vertical
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_TOP);
- prop.appendChild(IValID.V_CENTER);
- prop.appendChild(IValID.V_BOTTOM);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-position
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION);
- prop.appendChild(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X));
- prop.appendChild(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y));
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-repeat
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT);
- prop.appendChild(IValID.V_REPEAT);
- prop.appendChild(IValID.V_REPEAT_X);
- prop.appendChild(IValID.V_REPEAT_Y);
- prop.appendChild(IValID.V_NO_REPEAT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE));
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR));
- prop.setMaxValueCount(9);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-collapse
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLLAPSE);
- prop.appendChild(IValID.V_COLLAPSE);
- prop.appendChild(IValID.V_SEPARATE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR));
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendChild(IValID.V_TRANSPARENT);
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-spacing
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_SPACING);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE));
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-top
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-right
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-bottom
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-left
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-top-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-top-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-top-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-right-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-right-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-right-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-bottom-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-bottom-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-bottom-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-left-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-left-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-left-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH);
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH));
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // bottom
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BOTTOM);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // caption-side
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CAPTION_SIDE);
- prop.appendChild(IValID.V_TOP);
- prop.appendChild(IValID.V_BOTTOM);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clear
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CLEAR);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendChild(IValID.V_BOTH);
- prop.appendChild(IValID.V_STATIC);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clip ---- sub-properties top
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- ((PropCMSubProperty) prop).setContainer(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clip ---- sub-properties right
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- ((PropCMSubProperty) prop).setContainer(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clip ---- sub-properties bottom
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- ((PropCMSubProperty) prop).setContainer(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clip ---- sub-properties left
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- ((PropCMSubProperty) prop).setContainer(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clip
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_SHAPE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // content
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CONTENT);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_ANY));
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_COUNTER));
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_ATTR));
- prop.appendChild(IValID.V_OPEN_QUOTE);
- prop.appendChild(IValID.V_CLOSE_QUOTE);
- prop.appendChild(IValID.V_NO_OPEN_QUOTE);
- prop.appendChild(IValID.V_NO_CLOSE_QUOTE);
- prop.setMaxValueCount(-1); // infinite
- prop.appendMediaGroup(IMediaGroupID.M_ALL);
-
- // counter-increment
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_INCREMENT);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_COUNTER_ID));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_ALL);
-
- // counter-reset
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_RESET);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_COUNTER_ID));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_ALL);
-
- // cue
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CUE);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_BEFORE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_AFTER));
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // cue-after
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_AFTER);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // cue-before
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_BEFORE);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // cursor
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CURSOR);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_CROSSHAIR);
- prop.appendChild(IValID.V_DEFAULT);
- prop.appendChild(IValID.V_POINTER);
- prop.appendChild(IValID.V_MOVE);
- prop.appendChild(IValID.V_E_RESIZE);
- prop.appendChild(IValID.V_NE_RESIZE);
- prop.appendChild(IValID.V_NW_RESIZE);
- prop.appendChild(IValID.V_N_RESIZE);
- prop.appendChild(IValID.V_SE_RESIZE);
- prop.appendChild(IValID.V_SW_RESIZE);
- prop.appendChild(IValID.V_S_RESIZE);
- prop.appendChild(IValID.V_W_RESIZE);
- prop.appendChild(IValID.V_TEXT);
- prop.appendChild(IValID.V_WAIT);
- prop.appendChild(IValID.V_HELP);
- prop.setMaxValueCount(-1); // infinite
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_INTERACTIVE);
-
- // direction
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_DIRECTION);
- prop.appendChild(IValID.V_LTR);
- prop.appendChild(IValID.V_RTL);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // display
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_DISPLAY);
- prop.appendChild(IValID.V_INLINE);
- prop.appendChild(IValID.V_BLOCK);
- prop.appendChild(IValID.V_LIST_ITEM);
- prop.appendChild(IValID.V_RUN_IN);
- prop.appendChild(IValID.V_COMPACT);
- prop.appendChild(IValID.V_MARKER);
- prop.appendChild(IValID.V_TABLE);
- prop.appendChild(IValID.V_INLINE_TABLE);
- prop.appendChild(IValID.V_TABLE_ROW_GROUP);
- prop.appendChild(IValID.V_TABLE_HEADER_GROUP);
- prop.appendChild(IValID.V_TABLE_FOOTER_GROUP);
- prop.appendChild(IValID.V_TABLE_ROW);
- prop.appendChild(IValID.V_TABLE_COLUMN_GROUP);
- prop.appendChild(IValID.V_TABLE_COLUMN);
- prop.appendChild(IValID.V_TABLE_CELL);
- prop.appendChild(IValID.V_TABLE_CAPTION);
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_ALL);
-
- // elevation
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_ELEVATION);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_ANGLE));
- prop.appendChild(IValID.V_BELOW);
- prop.appendChild(IValID.V_LEVEL);
- prop.appendChild(IValID.V_ABOVE);
- prop.appendChild(IValID.V_HIGHER);
- prop.appendChild(IValID.V_LOWER);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // empty-cells
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_EMPTY_CELLS);
- prop.appendChild(IValID.V_SHOW);
- prop.appendChild(IValID.V_HIDE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // float
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FLOAT);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_LINE_HEIGHT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_FAMILY));
- prop.appendChild(IValID.V_CAPTION);
- prop.appendChild(IValID.V_ICON);
- prop.appendChild(IValID.V_MENU);
- prop.appendChild(IValID.V_MESSAGE_BOX);
- prop.appendChild(IValID.V_SMALL_CAPTION);
- prop.appendChild(IValID.V_STATUS_BAR);
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-family
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_FAMILY);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_FONT));
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_GENERIC_FAMILY));
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-size
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_ABSOLUTE_SIZE));
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_RELATIVE_SIZE));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-size-adjust
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE_ADJUST);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-stretch
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STRETCH);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_WIDER);
- prop.appendChild(IValID.V_NARROWER);
- prop.appendChild(IValID.V_ULTRA_CONDENSED);
- prop.appendChild(IValID.V_EXTRA_CONDENSED);
- prop.appendChild(IValID.V_CONDENSED);
- prop.appendChild(IValID.V_SEMI_CONDENSED);
- prop.appendChild(IValID.V_SEMI_EXPANDED);
- prop.appendChild(IValID.V_EXPANDED);
- prop.appendChild(IValID.V_EXTRA_EXPANDED);
- prop.appendChild(IValID.V_ULTRA_EXPANDED);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE);
- prop.appendChild(IValID.V_ITALIC);
- prop.appendChild(IValID.V_OBLIQUE);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-variant
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT);
- prop.appendChild(IValID.V_SMALL_CAPS);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-weight
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT);
- prop.appendChild(IValID.V_BOLD);
- prop.appendChild(IValID.V_100);
- prop.appendChild(IValID.V_200);
- prop.appendChild(IValID.V_300);
- prop.appendChild(IValID.V_400);
- prop.appendChild(IValID.V_500);
- prop.appendChild(IValID.V_600);
- prop.appendChild(IValID.V_700);
- prop.appendChild(IValID.V_800);
- prop.appendChild(IValID.V_900);
- prop.appendChild(IValID.V_LIGHTER);
- prop.appendChild(IValID.V_BOLDER);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // height
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_HEIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // leftt
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LEFT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // letter-spacing
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LETTER_SPACING);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // line-height
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LINE_HEIGHT);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // list-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // list-style-image
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // list-style-position
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION);
- prop.appendChild(IValID.V_INSIDE);
- prop.appendChild(IValID.V_OUTSIDE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // list-style-type
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE);
- prop.appendChild(IValID.V_DISC);
- prop.appendChild(IValID.V_CIRCLE);
- prop.appendChild(IValID.V_SQUARE);
- prop.appendChild(IValID.V_DECIMAL);
- prop.appendChild(IValID.V_DECIMAL_LEADING_ZERO);
- prop.appendChild(IValID.V_LOWER_ROMAN);
- prop.appendChild(IValID.V_UPPER_ROMAN);
- prop.appendChild(IValID.V_LOWER_GREEK);
- prop.appendChild(IValID.V_LOWER_ALPHA);
- prop.appendChild(IValID.V_LOWER_LATIN);
- prop.appendChild(IValID.V_UPPER_ALPHA);
- prop.appendChild(IValID.V_UPPER_LATIN);
- prop.appendChild(IValID.V_HEBREW);
- prop.appendChild(IValID.V_ARMENIAN);
- prop.appendChild(IValID.V_GEORGIAN);
- prop.appendChild(IValID.V_CJK_IDEOGRAPHIC);
- prop.appendChild(IValID.V_HIRAGANA);
- prop.appendChild(IValID.V_KATAKANA);
- prop.appendChild(IValID.V_HIRAGANA_IROHA);
- prop.appendChild(IValID.V_KATAKANA_IROHA);
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // margin
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN);
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_TOP));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_RIGHT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_BOTTOM));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_LEFT));
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // margin-top
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_TOP);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // margin-right
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_RIGHT);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // margin-bottom
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_BOTTOM);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // margin-left
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_LEFT);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // marker-offset
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARKER_OFFSET);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // marks
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARKS);
- prop.appendChild(IValID.V_CROP);
- prop.appendChild(IValID.V_CROSS);
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // max-height
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_HEIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // max-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_WIDTH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // min-height
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_HEIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // min-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_WIDTH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // orphans
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_ORPHANS);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // outline
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_WIDTH));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_INTERACTIVE);
-
- // outline-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendChild(IValID.V_INVERT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_INTERACTIVE);
-
- // outline-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_STYLE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_INTERACTIVE);
-
- // outline-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_WIDTH);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_INTERACTIVE);
-
- // overflow
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_OVERFLOW);
- prop.appendChild(IValID.V_VISIBLE);
- prop.appendChild(IValID.V_HIDDEN);
- prop.appendChild(IValID.V_SCROLL);
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // padding
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING);
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_TOP));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_RIGHT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_BOTTOM));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_LEFT));
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // padding-top
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_TOP);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // padding-right
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_RIGHT);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // padding-bottom
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_BOTTOM);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // padding-left
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_LEFT);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // page
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_PAGE_ID));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // page-break-after
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_AFTER);
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_ALWAYS);
- prop.appendChild(IValID.V_AVOID);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // page-break-before
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_BEFORE);
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_ALWAYS);
- prop.appendChild(IValID.V_AVOID);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // page-break-inside
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_INSIDE);
- prop.appendChild(IValID.V_AVOID);
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // pause
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_TIME));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // pause-after
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_AFTER);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_TIME));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // pause-before
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_BEFORE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_TIME));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // pitch
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_FREQUENCY));
- prop.appendChild(IValID.V_X_LOW);
- prop.appendChild(IValID.V_LOW);
- prop.appendChild(IValID.V_MEDIUM);
- prop.appendChild(IValID.V_HIGH);
- prop.appendChild(IValID.V_X_HIGH);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // pitch-range
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH_RANGE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // play-during
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PLAY_DURING);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_MIX);
- prop.appendChild(IValID.V_REPEAT);
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // position
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_POSITION);
- prop.appendChild(IValID.V_ABSOLUTE);
- prop.appendChild(IValID.V_RELATIVE);
- prop.appendChild(IValID.V_FIXED);
- prop.appendChild(IValID.V_STATIC);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // quotes
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_QUOTES);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_ANY));
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // richness
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_RICHNESS);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // right
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_RIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // size
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SIZE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_PORTRAIT);
- prop.appendChild(IValID.V_LANDSCAPE);
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // speak
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_NONE);
- prop.appendChild(IValID.V_SPELL_OUT);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // speak-header
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_HEADER);
- prop.appendChild(IValID.V_ONCE);
- prop.appendChild(IValID.V_ALWAYS);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // speak-numeral
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_NUMERAL);
- prop.appendChild(IValID.V_DIGITS);
- prop.appendChild(IValID.V_CONTINUOUS);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // speak-punctuation
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_PUNCTUATION);
- prop.appendChild(IValID.V_CODE);
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // speech-rate
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SPEECH_RATE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendChild(IValID.V_X_SLOW);
- prop.appendChild(IValID.V_SLOW);
- prop.appendChild(IValID.V_MEDIUM);
- prop.appendChild(IValID.V_FAST);
- prop.appendChild(IValID.V_X_FAST);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // stress
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_STRESS);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // table-layout
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TABLE_LAYOUT);
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_FIXED);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // text-align
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_ALIGN);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_CENTER);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendChild(IValID.V_JUSTIFY);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_ANY));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // text-decoration
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_DECORATION);
- prop.appendChild(IValID.V_UNDERLINE);
- prop.appendChild(IValID.V_OVERLINE);
- prop.appendChild(IValID.V_LINE_THROUGH);
- prop.appendChild(IValID.V_BLINK);
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // text-indent
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_INDENT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // text-shadow
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_SHADOW);
- prop.appendChild(IValID.V_NONE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // text-transform
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_TRANSFORM);
- prop.appendChild(IValID.V_CAPITALIZE);
- prop.appendChild(IValID.V_UPPERCASE);
- prop.appendChild(IValID.V_LOWERCASE);
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // top
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TOP);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // unicode-bidi
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_UNICODE_BIDI);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_EMBED);
- prop.appendChild(IValID.V_BIDI_OVERRIDE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // vertical-align
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_VERTICAL_ALIGN);
- prop.appendChild(IValID.V_BOTTOM);
- prop.appendChild(IValID.V_TEXT_BOTTOM);
- prop.appendChild(IValID.V_SUB);
- prop.appendChild(IValID.V_BASELINE);
- prop.appendChild(IValID.V_MIDDLE);
- prop.appendChild(IValID.V_SUPER);
- prop.appendChild(IValID.V_TEXT_TOP);
- prop.appendChild(IValID.V_TOP);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // visibility
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_VISIBILITY);
- prop.appendChild(IValID.V_VISIBLE);
- prop.appendChild(IValID.V_HIDDEN);
- prop.appendChild(IValID.V_COLLAPSE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // voice-family
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_VOICE_FAMILY);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_VOICE));
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_GENERIC_VOICE));
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // volume
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_VOLUME);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_SILENT);
- prop.appendChild(IValID.V_X_SOFT);
- prop.appendChild(IValID.V_SOFT);
- prop.appendChild(IValID.V_MEDIUM);
- prop.appendChild(IValID.V_LOUD);
- prop.appendChild(IValID.V_X_LOUD);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // white-space
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_WHITE_SPACE);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_PRE);
- prop.appendChild(IValID.V_NOWRAP);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // widows
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_WIDOWS);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_WIDTH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // word-spacing
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_WORD_SPACING);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // z-index
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_Z_INDEX);
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- /** ******** font properties ********* */
- // font-family
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_FAMILY);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_FONT));
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_GENERIC_FAMILY));
- prop.setMaxValueCount(-1);
-
- // font-style
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_STYLE);
- prop.appendChild(IValID.V_ITALIC);
- prop.appendChild(IValID.V_OBLIQUE);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_ALL);
- prop.setMaxValueCount(-1);
-
- // font-variant
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_VARIANT);
- prop.appendChild(IValID.V_SMALL_CAPS);
- prop.appendChild(IValID.V_NORMAL);
- prop.setMaxValueCount(-1);
-
- // font-weight
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_WEIGHT);
- prop.appendChild(IValID.V_BOLD);
- prop.appendChild(IValID.V_100);
- prop.appendChild(IValID.V_200);
- prop.appendChild(IValID.V_300);
- prop.appendChild(IValID.V_400);
- prop.appendChild(IValID.V_500);
- prop.appendChild(IValID.V_600);
- prop.appendChild(IValID.V_700);
- prop.appendChild(IValID.V_800);
- prop.appendChild(IValID.V_900);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_ALL);
- prop.setMaxValueCount(-1);
-
- // font-stretch
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_STRETCH);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_ULTRA_CONDENSED);
- prop.appendChild(IValID.V_EXTRA_CONDENSED);
- prop.appendChild(IValID.V_CONDENSED);
- prop.appendChild(IValID.V_SEMI_CONDENSED);
- prop.appendChild(IValID.V_SEMI_EXPANDED);
- prop.appendChild(IValID.V_EXPANDED);
- prop.appendChild(IValID.V_EXTRA_EXPANDED);
- prop.appendChild(IValID.V_ULTRA_EXPANDED);
- prop.appendChild(IValID.V_ALL);
- prop.setMaxValueCount(-1);
-
- // font-size
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_SIZE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_ABSOLUTE_SIZE));
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_RELATIVE_SIZE));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_ALL);
- prop.setMaxValueCount(-1);
-
- // unicode-range
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_UNICODE_RANGE);
- prop.appendChild(PropCMURange.getInstanceOf(PropCMURange.VAL_URANGE));
- prop.setMaxValueCount(-1);
-
- // units-per-em
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_UNITS_PER_EM);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // src
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_SRC);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_FORMAT));
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_LOCAL));
- prop.setMaxValueCount(-1);
-
- // panose-1
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_PANOSE_1);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.setMaxValueCount(10);
-
- // stemv
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_STEMV);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // stemh
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_STEMH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // slope
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_SLOPE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // cap-height
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_CAP_HEIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // x-height
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_X_HEIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // ascent
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_ASCENT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // descent
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_DESCENT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // widths
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_WIDTHS);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendChild(PropCMURange.getInstanceOf(PropCMURange.VAL_URANGE));
- prop.setMaxValueCount(-1);
-
- // bbox
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_BBOX);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.setMaxValueCount(4);
- prop.setMaxValueCount(4);
-
- // definition-src
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_DEFINITION_SRC);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
-
- // baseline
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_BASELINE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // centerline
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_CENTERLINE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // mathline
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_MATHLINE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // topline
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_TOPLINE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- /** ******** containers ********* */
-
- // absolute-size
- PropCMContainer cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_ABSOLUTE_SIZE);
- cont.appendChild(IValID.V_XX_SMALL);
- cont.appendChild(IValID.V_X_SMALL);
- cont.appendChild(IValID.V_SMALL);
- cont.appendChild(IValID.V_MEDIUM);
- cont.appendChild(IValID.V_LARGE);
- cont.appendChild(IValID.V_X_LARGE);
- cont.appendChild(IValID.V_XX_LARGE);
-
- // border-style
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE);
- cont.appendChild(IValID.V_SOLID);
- cont.appendChild(IValID.V_DASHED);
- cont.appendChild(IValID.V_DOTTED);
- cont.appendChild(IValID.V_DOUBLE);
- cont.appendChild(IValID.V_GROOVE);
- cont.appendChild(IValID.V_RIDGE);
- cont.appendChild(IValID.V_INSET);
- cont.appendChild(IValID.V_OUTSET);
- cont.appendChild(IValID.V_HIDDEN);
- cont.appendChild(IValID.V_NONE);
-
- // border-width
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH);
- cont.appendChild(IValID.V_THIN);
- cont.appendChild(IValID.V_MEDIUM);
- cont.appendChild(IValID.V_THICK);
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
-
- // color
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR);
- cont.appendChild(IValID.V_AQUA);
- cont.appendChild(IValID.V_BLACK);
- cont.appendChild(IValID.V_BLUE);
- cont.appendChild(IValID.V_FUCHSIA);
- cont.appendChild(IValID.V_GRAY);
- cont.appendChild(IValID.V_GREEN);
- cont.appendChild(IValID.V_LIME);
- cont.appendChild(IValID.V_MAROON);
- cont.appendChild(IValID.V_NAVY);
- cont.appendChild(IValID.V_OLIVE);
- cont.appendChild(IValID.V_PURPLE);
- cont.appendChild(IValID.V_RED);
- cont.appendChild(IValID.V_SILVER);
- cont.appendChild(IValID.V_TEAL);
- cont.appendChild(IValID.V_WHITE);
- cont.appendChild(IValID.V_YELLOW);
- cont.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_SYSTEM_COLOR));
- cont.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_RGB));
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_HASH));
-
- // system color
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_SYSTEM_COLOR);
- cont.appendChild(IValID.V_ACTIVEBORDER);
- cont.appendChild(IValID.V_ACTIVECAPTION);
- cont.appendChild(IValID.V_APPWORKSPACE);
- cont.appendChild(IValID.V_BACKGROUND);
- cont.appendChild(IValID.V_BUTTONFACE);
- cont.appendChild(IValID.V_BUTTONHIGHLIGHT);
- cont.appendChild(IValID.V_BUTTONSHADOW);
- cont.appendChild(IValID.V_BUTTONTEXT);
- cont.appendChild(IValID.V_CAPTIONTEXT);
- cont.appendChild(IValID.V_GRAYTEXT);
- cont.appendChild(IValID.V_HIGHLIGHT);
- cont.appendChild(IValID.V_HIGHLIGHTTEXT);
- cont.appendChild(IValID.V_INACTIVEBORDER);
- cont.appendChild(IValID.V_INACTIVECAPTION);
- cont.appendChild(IValID.V_INACTIVECAPTIONTEXT);
- cont.appendChild(IValID.V_INFOBACKGROUND);
- cont.appendChild(IValID.V_INFOTEXT);
- cont.appendChild(IValID.V_MENU);
- cont.appendChild(IValID.V_MENUTEXT);
- cont.appendChild(IValID.V_SCROLLBAR);
- cont.appendChild(IValID.V_THREEDDARKSHADOW);
- cont.appendChild(IValID.V_THREEDFACE);
- cont.appendChild(IValID.V_THREEDHIGHLIGHT);
- cont.appendChild(IValID.V_THREEDLIGHTSHADOW);
- cont.appendChild(IValID.V_THREEDSHADOW);
- cont.appendChild(IValID.V_WINDOW);
- cont.appendChild(IValID.V_WINDOWFRAME);
- cont.appendChild(IValID.V_WINDOWTEXT);
-
- // generic-family
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_GENERIC_FAMILY);
- cont.appendChild(IValID.V_SERIF);
- cont.appendChild(IValID.V_SANS_SERIF);
- cont.appendChild(IValID.V_CURSIVE);
- cont.appendChild(IValID.V_FANTASY);
- cont.appendChild(IValID.V_MONOSPACE);
-
- // generic-voice
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_GENERIC_VOICE);
- cont.appendChild(IValID.V_MALE);
- cont.appendChild(IValID.V_FEMALE);
- cont.appendChild(IValID.V_CHILD);
-
- // margin-width
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH);
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- cont.appendChild(IValID.V_AUTO);
-
- // padding-width
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH);
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
-
- // relative-size
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_RELATIVE_SIZE);
- cont.appendChild(IValID.V_SMALLER);
- cont.appendChild(IValID.V_LARGER);
-
- LOADING = 2;
- }
-
- /**
- *
- */
- protected static boolean isLoading() {
- return LOADING == 1;
- }
-
- /**
- *
- */
- protected static boolean isNeedInitialize() {
- return LOADING == 0;
- }
-
- /**
- *
- */
- public String toString() {
- return getName();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNumber.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNumber.java
deleted file mode 100644
index 2d13122c4f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNumber.java
+++ /dev/null
@@ -1,220 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.w3c.dom.css.CSSPrimitiveValue;
-
-
-/**
- *
- */
-public class PropCMNumber extends PropCMNode {
-
- private static java.util.Hashtable instances = null;
- public final static java.lang.String VAL_ANGLE = "angle";//$NON-NLS-1$
- public final static java.lang.String VAL_FREQUENCY = "frequency";//$NON-NLS-1$
- public final static java.lang.String VAL_INTEGER = "integer";//$NON-NLS-1$
- public final static java.lang.String VAL_LENGTH = "length";//$NON-NLS-1$
- public final static java.lang.String VAL_PERCENTAGE = "percentage";//$NON-NLS-1$
- public final static java.lang.String VAL_TIME = "time";//$NON-NLS-1$
- public final static java.lang.String VAL_HASH = "hash"; // for
- // hex-color//$NON-NLS-1$
- public final static java.lang.String VAL_NUM = "number";//$NON-NLS-1$
- public final static String DIM_CM = "cm";//$NON-NLS-1$
- public final static String DIM_DEG = "deg";//$NON-NLS-1$
- public final static String DIM_EMS = "em";//$NON-NLS-1$
- public final static String DIM_EXS = "ex";//$NON-NLS-1$
- public final static String DIM_GRAD = "grad";//$NON-NLS-1$
- public final static String DIM_HASH = "#";//$NON-NLS-1$
- public final static String DIM_HZ = "Hz";//$NON-NLS-1$
- public final static String DIM_IN = "in";//$NON-NLS-1$
- public final static String DIM_INTEGER = "INTEGER";//$NON-NLS-1$
- public final static String DIM_KHZ = "kHz";//$NON-NLS-1$
- public final static String DIM_MM = "mm";//$NON-NLS-1$
- public final static String DIM_MS = "ms";//$NON-NLS-1$
- public final static String DIM_NUMBER = "NUMBER";//$NON-NLS-1$
- public final static String DIM_PC = "pc";//$NON-NLS-1$
- public final static String DIM_PERCENTAGE = "%";//$NON-NLS-1$
- public final static String DIM_PT = "pt";//$NON-NLS-1$
- public final static String DIM_PX = "px";//$NON-NLS-1$
- public final static String DIM_RAD = "rad";//$NON-NLS-1$
- public final static String DIM_S = "s";//$NON-NLS-1$
- private java.util.Vector fDims = new Vector();
-
- /**
- *
- */
- protected PropCMNumber(String name) {
- super(name);
- }
-
- /**
- *
- */
- public static String getDimension(short primitiveType) {
- switch (primitiveType) {
- case CSSPrimitiveValue.CSS_CM :
- return DIM_CM;
- case CSSPrimitiveValue.CSS_DEG :
- return DIM_DEG;
- case CSSPrimitiveValue.CSS_EMS :
- return DIM_EMS;
- case CSSPrimitiveValue.CSS_EXS :
- return DIM_EXS;
- case CSSPrimitiveValue.CSS_GRAD :
- return DIM_GRAD;
- case ICSSPrimitiveValue.CSS_HASH :
- return DIM_HASH; // prefix dimension ....
- case CSSPrimitiveValue.CSS_HZ :
- return DIM_HZ;
- case CSSPrimitiveValue.CSS_IN :
- return DIM_IN;
- case ICSSPrimitiveValue.CSS_INTEGER :
- return "";//$NON-NLS-1$
- case CSSPrimitiveValue.CSS_KHZ :
- return DIM_KHZ;
- case CSSPrimitiveValue.CSS_MM :
- return DIM_MM;
- case CSSPrimitiveValue.CSS_MS :
- return DIM_MS;
- case CSSPrimitiveValue.CSS_NUMBER :
- return "";//$NON-NLS-1$
- case CSSPrimitiveValue.CSS_PC :
- return DIM_PC;
- case CSSPrimitiveValue.CSS_PERCENTAGE :
- return DIM_PERCENTAGE;
- case CSSPrimitiveValue.CSS_PT :
- return DIM_PT;
- case CSSPrimitiveValue.CSS_PX :
- return DIM_PX;
- case CSSPrimitiveValue.CSS_RAD :
- return DIM_RAD;
- case CSSPrimitiveValue.CSS_S :
- return DIM_S;
- }
-
- return null;
- }
-
- /**
- *
- */
- public Set getDimensions() {
- HashSet vals = new HashSet();
- Iterator it = fDims.iterator();
- while (it.hasNext()) {
- vals.add(it.next());
- }
-
- return vals;
- }
-
- /**
- *
- */
- void getIdentifiers(Set indents) {
- }
-
- /**
- *
- */
- static public PropCMNumber getInstanceOf(String name) {
- if (name == null)
- return null;
-
- // initialize
- if (instances == null)
- instances = new Hashtable(20);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMNumber) node;
-
- // register
- if (PropCMNode.isLoading()) {
- node = new PropCMNumber(name);
- instances.put(name, node);
- }
-
- return (PropCMNumber) node;
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_NUMBER;
- }
-
- /**
- *
- */
- void getValues(Collection values) {
- if (values != null && !values.contains(this))
- values.add(this);
- }
-
- /**
- *
- */
- static void initNumberCMDim() {
- PropCMNumber num = getInstanceOf(VAL_ANGLE);
- num.fDims.add(DIM_DEG);
- num.fDims.add(DIM_GRAD);
- num.fDims.add(DIM_RAD);
-
- num = getInstanceOf(VAL_FREQUENCY);
- num.fDims.add(DIM_HZ);
- num.fDims.add(DIM_KHZ);
-
- num = getInstanceOf(VAL_HASH);
- num.fDims.add(DIM_HASH);
-
- // num = getInstanceOf(VAL_INTEGER);
- // num.fDims.add(DIM_INTEGER);
-
- num = getInstanceOf(VAL_LENGTH);
- num.fDims.add(DIM_CM);
- num.fDims.add(DIM_EMS);
- num.fDims.add(DIM_EXS);
- num.fDims.add(DIM_IN);
- num.fDims.add(DIM_MM);
- num.fDims.add(DIM_PC);
- num.fDims.add(DIM_PT);
- num.fDims.add(DIM_PX);
-
- // num = getInstanceOf(VAL_NUMBER);
- // num.fDims.add(DIM_NUMBER);
-
- num = getInstanceOf(VAL_PERCENTAGE);
- num.fDims.add(DIM_PERCENTAGE);
-
- num = getInstanceOf(VAL_TIME);
- num.fDims.add(DIM_MS);
- num.fDims.add(DIM_S);
-
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMProperty.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMProperty.java
deleted file mode 100644
index bbab38f642..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMProperty.java
+++ /dev/null
@@ -1,417 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-/**
- *
- */
-public class PropCMProperty extends PropCMContainer {
-
- // static fields
- private static java.util.Hashtable instances = null;
- private static java.util.Hashtable cachedIdMap = null;
- public final static String P_AZIMUTH = "azimuth";//$NON-NLS-1$
- public final static String P_BG = "background";//$NON-NLS-1$
- public final static String P_BG_ATTACHMENT = "background-attachment";//$NON-NLS-1$
- public final static String P_BG_COLOR = "background-color";//$NON-NLS-1$
- public final static String P_BG_IMAGE = "background-image";//$NON-NLS-1$
- public final static String P_BG_POSITION = "background-position";//$NON-NLS-1$
- public final static String P_BG_REPEAT = "background-repeat";//$NON-NLS-1$
- public final static String P_BORDER = "border";//$NON-NLS-1$
- public final static String P_BORDER_COLLAPSE = "border-collapse";//$NON-NLS-1$
- public final static String P_BORDER_COLOR = "border-color";//$NON-NLS-1$
- public final static String P_BORDER_SPACING = "border-spacing";//$NON-NLS-1$
- public final static String P_BORDER_STYLE = "border-style";//$NON-NLS-1$
- public final static String P_BORDER_TOP = "border-top";//$NON-NLS-1$
- public final static String P_BORDER_RIGHT = "border-right";//$NON-NLS-1$
- public final static String P_BORDER_BOTTOM = "border-bottom";//$NON-NLS-1$
- public final static String P_BORDER_LEFT = "border-left";//$NON-NLS-1$
- public final static String P_BORDER_TOP_COLOR = "border-top-color";//$NON-NLS-1$
- public final static String P_BORDER_RIGHT_COLOR = "border-right-color";//$NON-NLS-1$
- public final static String P_BORDER_BOTTOM_COLOR = "border-bottom-color";//$NON-NLS-1$
- public final static String P_BORDER_LEFT_COLOR = "border-left-color";//$NON-NLS-1$
- public final static String P_BORDER_TOP_STYLE = "border-top-style";//$NON-NLS-1$
- public final static String P_BORDER_RIGHT_STYLE = "border-right-style";//$NON-NLS-1$
- public final static String P_BORDER_BOTTOM_STYLE = "border-bottom-style";//$NON-NLS-1$
- public final static String P_BORDER_LEFT_STYLE = "border-left-style";//$NON-NLS-1$
- public final static String P_BORDER_TOP_WIDTH = "border-top-width";//$NON-NLS-1$
- public final static String P_BORDER_RIGHT_WIDTH = "border-right-width";//$NON-NLS-1$
- public final static String P_BORDER_BOTTOM_WIDTH = "border-bottom-width";//$NON-NLS-1$
- public final static String P_BORDER_LEFT_WIDTH = "border-left-width";//$NON-NLS-1$
- public final static String P_BORDER_WIDTH = "border-width";//$NON-NLS-1$
- public final static String P_BOTTOM = "bottom";//$NON-NLS-1$
- public final static String P_CAPTION_SIDE = "caption-side";//$NON-NLS-1$
- public final static String P_CLEAR = "clear";//$NON-NLS-1$
- public final static String P_CLIP = "clip";//$NON-NLS-1$
- public final static String P_COLOR = "color";//$NON-NLS-1$
- public final static String P_CONTENT = "content";//$NON-NLS-1$
- public final static String P_COUNTER_INCREMENT = "counter-increment";//$NON-NLS-1$
- public final static String P_COUNTER_RESET = "counter-reset";//$NON-NLS-1$
- public final static String P_CUE = "cue";//$NON-NLS-1$
- public final static String P_CUE_AFTER = "cue-after";//$NON-NLS-1$
- public final static String P_CUE_BEFORE = "cue-before";//$NON-NLS-1$
- public final static String P_CURSOR = "cursor";//$NON-NLS-1$
- public final static String P_DIRECTION = "direction";//$NON-NLS-1$
- public final static String P_DISPLAY = "display";//$NON-NLS-1$
- public final static String P_ELEVATION = "elevation";//$NON-NLS-1$
- public final static String P_EMPTY_CELLS = "empty-cells";//$NON-NLS-1$
- public final static String P_FLOAT = "float";//$NON-NLS-1$
- public final static String P_FONT = "font";//$NON-NLS-1$
- public final static String P_FONT_FAMILY = "font-family";//$NON-NLS-1$
- public final static String P_FONT_SIZE = "font-size";//$NON-NLS-1$
- public final static String P_FONT_SIZE_ADJUST = "font-size-adjust";//$NON-NLS-1$
- public final static String P_FONT_STRETCH = "font-stretch";//$NON-NLS-1$
- public final static String P_FONT_STYLE = "font-style";//$NON-NLS-1$
- public final static String P_FONT_VARIANT = "font-variant";//$NON-NLS-1$
- public final static String P_FONT_WEIGHT = "font-weight";//$NON-NLS-1$
- public final static String P_HEIGHT = "height";//$NON-NLS-1$
- public final static String P_LEFT = "left";//$NON-NLS-1$
- public final static String P_LETTER_SPACING = "letter-spacing";//$NON-NLS-1$
- public final static String P_LINE_HEIGHT = "line-height";//$NON-NLS-1$
- public final static String P_LIST_STYLE = "list-style";//$NON-NLS-1$
- public final static String P_LIST_STYLE_IMAGE = "list-style-image";//$NON-NLS-1$
- public final static String P_LIST_STYLE_POSITION = "list-style-position";//$NON-NLS-1$
- public final static String P_LIST_STYLE_TYPE = "list-style-type";//$NON-NLS-1$
- public final static String P_MARGIN = "margin";//$NON-NLS-1$
- public final static String P_MARGIN_TOP = "margin-top";//$NON-NLS-1$
- public final static String P_MARGIN_RIGHT = "margin-right";//$NON-NLS-1$
- public final static String P_MARGIN_BOTTOM = "margin-bottom";//$NON-NLS-1$
- public final static String P_MARGIN_LEFT = "margin-left";//$NON-NLS-1$
- public final static String P_MARKER_OFFSET = "marker-offset";//$NON-NLS-1$
- public final static String P_MARKS = "marks";//$NON-NLS-1$
- public final static String P_MAX_HEIGHT = "max-height";//$NON-NLS-1$
- public final static String P_MAX_WIDTH = "max-width";//$NON-NLS-1$
- public final static String P_MIN_HEIGHT = "min-height";//$NON-NLS-1$
- public final static String P_MIN_WIDTH = "min-width";//$NON-NLS-1$
- public final static String P_ORPHANS = "orphans";//$NON-NLS-1$
- public final static String P_OUTLINE = "outline";//$NON-NLS-1$
- public final static String P_OUTLINE_COLOR = "outline-color";//$NON-NLS-1$
- public final static String P_OUTLINE_STYLE = "outline-style";//$NON-NLS-1$
- public final static String P_OUTLINE_WIDTH = "outline-width";//$NON-NLS-1$
- public final static String P_OVERFLOW = "overflow";//$NON-NLS-1$
- public final static String P_PADDING = "padding";//$NON-NLS-1$
- public final static String P_PADDING_TOP = "padding-top";//$NON-NLS-1$
- public final static String P_PADDING_RIGHT = "padding-right";//$NON-NLS-1$
- public final static String P_PADDING_BOTTOM = "padding-bottom";//$NON-NLS-1$
- public final static String P_PADDING_LEFT = "padding-left";//$NON-NLS-1$
- public final static String P_PAGE = "page";//$NON-NLS-1$
- public final static String P_PAGE_BREAK_AFTER = "page-break-after";//$NON-NLS-1$
- public final static String P_PAGE_BREAK_BEFORE = "page-break-before";//$NON-NLS-1$
- public final static String P_PAGE_BREAK_INSIDE = "page-break-inside";//$NON-NLS-1$
- public final static String P_PAUSE = "pause";//$NON-NLS-1$
- public final static String P_PAUSE_AFTER = "pause-after";//$NON-NLS-1$
- public final static String P_PAUSE_BEFORE = "pause-before";//$NON-NLS-1$
- public final static String P_PITCH = "pitch";//$NON-NLS-1$
- public final static String P_PITCH_RANGE = "pitch-range";//$NON-NLS-1$
- public final static String P_PLAY_DURING = "play-during";//$NON-NLS-1$
- public final static String P_POSITION = "position";//$NON-NLS-1$
- public final static String P_QUOTES = "quotes";//$NON-NLS-1$
- public final static String P_RICHNESS = "richness";//$NON-NLS-1$
- public final static String P_RIGHT = "right";//$NON-NLS-1$
- public final static String P_SIZE = "size";//$NON-NLS-1$
- public final static String P_SPEAK = "speak";//$NON-NLS-1$
- public final static String P_SPEAK_HEADER = "speak-header";//$NON-NLS-1$
- public final static String P_SPEAK_NUMERAL = "speak-numeral";//$NON-NLS-1$
- public final static String P_SPEAK_PUNCTUATION = "speak-punctuation";//$NON-NLS-1$
- public final static String P_SPEECH_RATE = "speech-rate";//$NON-NLS-1$
- public final static String P_STRESS = "stress";//$NON-NLS-1$
- public final static String P_TABLE_LAYOUT = "table-layout";//$NON-NLS-1$
- public final static String P_TEXT_ALIGN = "text-align";//$NON-NLS-1$
- public final static String P_TEXT_DECORATION = "text-decoration";//$NON-NLS-1$
- public final static String P_TEXT_INDENT = "text-indent";//$NON-NLS-1$
- public final static String P_TEXT_SHADOW = "text-shadow";//$NON-NLS-1$
- public final static String P_TEXT_TRANSFORM = "text-transform";//$NON-NLS-1$
- public final static String P_TOP = "top";//$NON-NLS-1$
- public final static String P_UNICODE_BIDI = "unicode-bidi";//$NON-NLS-1$
- public final static String P_VERTICAL_ALIGN = "vertical-align";//$NON-NLS-1$
- public final static String P_VISIBILITY = "visibility";//$NON-NLS-1$
- public final static String P_VOICE_FAMILY = "voice-family";//$NON-NLS-1$
- public final static String P_VOLUME = "volume";//$NON-NLS-1$
- public final static String P_WHITE_SPACE = "white-space";//$NON-NLS-1$
- public final static String P_WIDOWS = "widows";//$NON-NLS-1$
- public final static String P_WIDTH = "width";//$NON-NLS-1$
- public final static String P_WORD_SPACING = "word-spacing";//$NON-NLS-1$
- public final static String P_Z_INDEX = "z-index";//$NON-NLS-1$
- // instance fields
- private int fMinValueCount = 1;
- private int fMaxValueCount = 1;
- private Object[] mediaGroups;
- protected List containers;
-
- /**
- *
- */
- protected PropCMProperty(String name) {
- super(name);
- }
-
- /**
- *
- */
- Object appendChild(Object node) {
- Object ret = super.appendChild(node);
- if (node instanceof PropCMProperty) {
- // register shorthand container
- PropCMProperty cm = (PropCMProperty) node;
- if (cm.containers == null)
- cm.containers = new Vector();
- if (!cm.containers.contains(this))
- cm.containers.add(this);
- }
- return ret;
- }
-
- /**
- *
- */
- void appendMediaGroup(Object mg) {
- if (mediaGroups == null)
- mediaGroups = new Object[1];
- else {
- Object[] oldMediaGroups = mediaGroups;
- mediaGroups = new Object[oldMediaGroups.length + 1];
- System.arraycopy(oldMediaGroups, 0, mediaGroups, 0, oldMediaGroups.length);
- }
- mediaGroups[mediaGroups.length - 1] = mg;
- }
-
- /**
- *
- */
- public static PropCMProperty getInstanceOf(String name) {
- // initialize
- if (instances == null)
- instances = new Hashtable(200);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMProperty) node;
-
- // register
- if (PropCMNode.isLoading()) {
- node = new PropCMProperty(name);
- instances.put(name, node);
- }
-
- return (PropCMProperty) node;
- }
-
- /**
- *
- */
- public int getMaxValueCount() {
- return fMaxValueCount;
- }
-
- /**
- *
- */
- public List getMediaGroups() {
- if (mediaGroups != null)
- return Arrays.asList(mediaGroups);
- else
- return new ArrayList();
- }
-
- /**
- *
- */
- public int getMinValueCount() {
- return fMinValueCount;
- }
-
- /**
- *
- */
- public static Enumeration getNameEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.keys();
- }
-
- /**
- *
- */
- public static Enumeration getPropertyEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.elements();
- }
-
- /**
- *
- */
- public int getShorthandContainerCount() {
- return (containers == null) ? 0 : containers.size();
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_PROPERTY;
- }
-
- /**
- *
- */
- public boolean isShorthand() {
- int nChild = getNumChild();
- for (int i = 0; i < nChild; i++) {
- Object obj = getChildAt(i);
- if (obj instanceof PropCMProperty && !(obj instanceof PropCMSubProperty))
- return true;
- }
- return false;
- }
-
- /**
- *
- */
- public static Vector names() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return new Vector(instances.keySet());
- }
-
- /**
- *
- */
- public static List names(Object mediaGroup) {
- if (mediaGroup == null)
- return names();
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- Vector properties = new Vector();
-
- Iterator it = instances.values().iterator();
- while (it.hasNext()) {
- PropCMProperty prop = (PropCMProperty) it.next();
- if (prop.getMediaGroups().contains(mediaGroup))
- properties.add(prop.getName());
- }
-
- return properties;
- }
-
- /**
- * If identifier is null, get all properties
- */
- public static Vector propertiesFor(String identifier, boolean shorthands) {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // if identifier is null, get all properties
- if (identifier == null)
- return new Vector(instances.values());
-
- if (cachedIdMap == null) {
- // start cacheing
- cachedIdMap = new Hashtable();
- }
- else {
- // search cached
- Object ret = cachedIdMap.get(identifier + String.valueOf(shorthands));
- if (ret != null)
- return new Vector((Collection) ret);
- }
-
- // create
- Enumeration propertyEnum = getPropertyEnum();
- HashSet set = new HashSet();
- while (propertyEnum.hasMoreElements()) {
- PropCMProperty prop = (PropCMProperty) propertyEnum.nextElement();
- if (!shorthands && prop.isShorthand())
- continue;
- if (prop.canHave(identifier))
- set.add(prop);
- }
-
- // cache
- cachedIdMap.put(identifier + String.valueOf(shorthands), set);
-
- return new Vector(set);
- }
-
- /**
- *
- */
- protected void setMaxValueCount(int newMaxValueCount) {
- fMaxValueCount = newMaxValueCount;
- }
-
- /**
- *
- */
- protected void setMinValueCount(int newMinValueCount) {
- fMinValueCount = newMinValueCount;
- }
-
- /**
- *
- */
- public PropCMProperty shorthandContainerAt(int i) {
- if (containers == null)
- return null;
- if (i < 0 || containers.size() <= i)
- return null;
- return (PropCMProperty) containers.get(i);
- }
-
- /**
- *
- */
- public Iterator shorthandContainerIterator() {
- if (containers == null) {
- return new Iterator() {
- public boolean hasNext() {
- return false;
- }
-
- public Object next() {
- return null;
- }
-
- public void remove() {
- }
- };
- }
- else
- return containers.iterator();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMString.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMString.java
deleted file mode 100644
index a60b57844e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMString.java
+++ /dev/null
@@ -1,86 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Set;
-
-/**
- *
- */
-public class PropCMString extends PropCMNode {
-
- private static java.util.Hashtable instances = null;
- public final static java.lang.String VAL_FONT = "font";//$NON-NLS-1$
- public final static java.lang.String VAL_COUNTER_ID = "counterId";//$NON-NLS-1$
- public final static java.lang.String VAL_PAGE_ID = "pageId";//$NON-NLS-1$
- public final static java.lang.String VAL_VOICE = "voice";//$NON-NLS-1$
- public final static java.lang.String VAL_ANY = "any"; // reserved
- // name//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMString(String name) {
- super(name);
- }
-
- /**
- *
- */
- void getIdentifiers(Set indents) {
- }
-
- /**
- *
- */
- static public PropCMString getInstanceOf(String name) {
- if (name == null)
- return null;
-
- // initialize
- if (instances == null)
- instances = new Hashtable(10);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMString) node;
-
- // register
- node = new PropCMString(name);
- instances.put(name, node);
-
- return (PropCMString) node;
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_STRING;
- }
-
- /**
- *
- */
- void getValues(Collection values) {
- if (values != null && !values.contains(this))
- values.add(this);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMSubProperty.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMSubProperty.java
deleted file mode 100644
index 81ebb3733d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMSubProperty.java
+++ /dev/null
@@ -1,122 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-/**
- *
- */
-public class PropCMSubProperty extends PropCMProperty {
-
- // static fields
- private static java.util.Hashtable instances = null;
- public final static String PSUB_BG_POSITION_X = "background-positionH";//$NON-NLS-1$
- public final static String PSUB_BG_POSITION_Y = "background-positionV";//$NON-NLS-1$
- public final static String PSUB_CLIP_TOP = "clipTop";//$NON-NLS-1$
- public final static String PSUB_CLIP_RIGHT = "clipRight";//$NON-NLS-1$
- public final static String PSUB_CLIP_BOTTOM = "clipBottom";//$NON-NLS-1$
- public final static String PSUB_CLIP_LEFT = "clipLeft";//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMSubProperty(String name) {
- super(name);
- }
-
- /**
- *
- */
- public PropCMProperty getContainer() {
- return shorthandContainerAt(0);
- }
-
- /**
- *
- */
- public static PropCMProperty getInstanceOf(String name) {
- // initialize
- if (instances == null)
- instances = new Hashtable(10);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMProperty) node;
-
- // register
- if (PropCMNode.isLoading()) {
- node = new PropCMSubProperty(name);
- instances.put(name, node);
- }
-
- return (PropCMProperty) node;
- }
-
- /**
- *
- */
- public static Enumeration getNameEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.keys();
- }
-
- /**
- *
- */
- public static Enumeration getPropertyEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.elements();
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_SUBPROPERTY;
- }
-
- /**
- *
- */
- public static Vector names() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return new Vector(instances.keySet());
- }
-
- /**
- *
- */
- public void setContainer(PropCMProperty prop) {
- if (containers == null)
- containers = new Vector();
- containers.clear();
- containers.add(prop);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMURange.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMURange.java
deleted file mode 100644
index 3375715d5e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMURange.java
+++ /dev/null
@@ -1,81 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Set;
-
-/**
- *
- */
-public class PropCMURange extends PropCMNode {
-
- private static java.util.Hashtable instances = null;
- public final static String VAL_URANGE = "urange";//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMURange(String name) {
- super(name);
- }
-
- /**
- *
- */
- void getIdentifiers(Set indents) {
- }
-
- /**
- *
- */
- public static PropCMURange getInstanceOf(String name) {
- if (name == null)
- return null;
-
- // initialize
- if (instances == null)
- instances = new Hashtable(10);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMURange) node;
-
- // register
- node = new PropCMURange(name);
- instances.put(name, node);
-
- return (PropCMURange) node;
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_UNICODE_RANGE;
- }
-
- /**
- *
- */
- void getValues(Collection values) {
- if (values != null && !values.contains(this))
- values.add(this);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMUtil.java
deleted file mode 100644
index 816ba377c6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMUtil.java
+++ /dev/null
@@ -1,48 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Iterator;
-
-/**
- *
- */
-public class PropCMUtil {
-
- /**
- *
- */
- public static void minus(Collection src, Collection ref) {
- Iterator it = ref.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (src.contains(obj))
- src.remove(obj);
- }
- return;
- }
-
- /**
- *
- */
- public static void plus(Collection src, Collection ref) {
- Iterator it = ref.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (!src.contains(obj))
- src.add(obj);
- }
- return;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/AbstractCSSNodeList.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/AbstractCSSNodeList.java
deleted file mode 100644
index eb10e00def..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/AbstractCSSNodeList.java
+++ /dev/null
@@ -1,76 +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.css.core.internal.document;
-
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-
-
-/**
- *
- */
-abstract class AbstractCSSNodeList {
-
- protected Vector nodes = null;
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param ndoe
- * com.ibm.sed.css.interfaces.CSSNode
- */
- ICSSNode appendNode(ICSSNode node) {
- if (node == null)
- return null;
- if (this.nodes == null)
- this.nodes = new Vector();
- this.nodes.addElement(node);
- return node;
- }
-
- /**
- * @return int
- */
- public int getLength() {
- if (this.nodes == null)
- return 0;
- return this.nodes.size();
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param index
- * int
- */
- protected ICSSNode itemImpl(int index) {
- if (this.nodes == null)
- return null;
- if (index < 0 || index >= this.nodes.size())
- return null;
- return (ICSSNode) this.nodes.elementAt(index);
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param index
- * com.ibm.sed.css.interfaces.CSSNode
- */
- ICSSNode removeNode(int index) {
- if (this.nodes == null)
- return null; // no node
- if (index < 0 || index >= this.nodes.size())
- return null; // invalid parameter
-
- ICSSNode removed = (ICSSNode) this.nodes.elementAt(index);
- this.nodes.removeElementAt(index);
- return removed;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSAttrImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSAttrImpl.java
deleted file mode 100644
index 92d03de02e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSAttrImpl.java
+++ /dev/null
@@ -1,151 +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.css.core.internal.document;
-
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSNamedNodeMap;
-import org.eclipse.wst.css.core.document.ICSSNode;
-
-/**
- *
- */
-class CSSAttrImpl extends CSSRegionContainer implements ICSSAttr {
-
- private String fName = null;
- private String fValue = null;
- private CSSNodeImpl ownerCSSNode = null;
-
- /**
- * CSSAttrImpl constructor comment.
- *
- * @param that
- * com.ibm.sed.css.treemodel.CSSRegionContainer
- */
- CSSAttrImpl(CSSAttrImpl that) {
- super(that);
- this.fName = that.fName;
- this.setValue(that.fValue);
- }
-
- /**
- * CSSAttr constructor comment.
- */
- CSSAttrImpl(String name) {
- super();
- this.fName = name;
- }
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- return new CSSAttrImpl(this);
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNamedNodeMap
- */
- public ICSSNamedNodeMap getAttributes() {
- return null;
- }
-
- /**
- * @return java.lang.String
- */
- public java.lang.String getName() {
- return fName;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return ATTR_NODE;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNodeImpl
- */
- public ICSSNode getOwnerCSSNode() {
- return ownerCSSNode;
- }
-
- /**
- * @return java.lang.String
- */
- public java.lang.String getValue() {
- return fValue;
- }
-
- /**
- * @return boolean
- * @param name
- * java.lang.String
- */
- protected boolean matchName(String name) {
- if (name == null)
- return /* (this.name == null) */false;
- if (this.fName == null)
- return false;
- return this.fName.equals(name);
- }
-
- /**
- *
- */
- protected void notifyValueChanged(String oldValue) {
- if (this.ownerCSSNode == null)
- return;
-
- // for model
- ICSSDocument doc = ownerCSSNode.getContainerDocument();
- if (doc == null)
- return;
- CSSModelImpl model = (CSSModelImpl) doc.getModel();
- if (model == null)
- return;
- model.valueChanged(this, oldValue);
-
- // for adapters
- String value = getValue();
- this.ownerCSSNode.notify(CHANGE, this, oldValue, value, this.ownerCSSNode.getStartOffset());
- }
-
- /**
- * @param newName
- * java.lang.String
- */
- protected void setName(java.lang.String newName) {
- fName = newName;
- }
-
- /**
- * @param newOwnerCSSNode
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- */
- protected void setOwnerCSSNode(CSSNodeImpl newOwnerCSSNode) {
- ownerCSSNode = newOwnerCSSNode;
- }
-
- /**
- * @param newValue
- * java.lang.String
- */
- public void setValue(java.lang.String newValue) {
- String oldValue = fValue;
- fValue = newValue;
-
- notifyValueChanged(oldValue);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSCharsetRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSCharsetRuleImpl.java
deleted file mode 100644
index 6fa883655b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSCharsetRuleImpl.java
+++ /dev/null
@@ -1,93 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.CSSUtil;
-
-
-/**
- *
- */
-class CSSCharsetRuleImpl extends CSSRuleImpl implements ICSSCharsetRule {
-
- /**
- *
- */
- CSSCharsetRuleImpl() {
- super();
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSCharsetRuleImpl
- */
- CSSCharsetRuleImpl(CSSCharsetRuleImpl that) {
- super(that);
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSCharsetRuleImpl cloned = new CSSCharsetRuleImpl(this);
-
- return cloned;
- }
-
- /**
- * The encoding information used in this <code>@charset</code> rule.
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the specified encoding value has a
- * syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding
- * rule is readonly.
- */
- public String getEncoding() {
- return CSSUtil.extractStringContents(getAttribute(ENCODING));
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return CHARSETRULE_NODE;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return CHARSET_RULE;
- }
-
- /**
- *
- */
- public void setEncoding(String encoding) throws org.w3c.dom.DOMException {
- // pa_TODO css pref
- // String quote =
- // com.ibm.sse.editor.css.preferences.CSSPreferenceHelper.getInstance().getQuoteString((ICSSModel)getOwnerDocument().getModel());
- String quote = CSSPreferenceHelper.getInstance().getQuoteString(null);
- String enc = CSSUtil.extractStringContents(encoding);
- quote = CSSUtil.detectQuote(enc, quote);
- setAttribute(ENCODING, quote + enc + quote);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDeclarationItemParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDeclarationItemParser.java
deleted file mode 100644
index aa99414765..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDeclarationItemParser.java
+++ /dev/null
@@ -1,1077 +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.css.core.internal.document;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICounter;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.sse.core.internal.text.TextRegionListImpl;
-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.w3c.dom.css.CSSPrimitiveValue;
-
-
-/**
- *
- */
-class CSSDeclarationItemParser {
- /**
- *
- */
- final class FloatInfo {
- /**
- *
- */
- FloatInfo(String text) {
- parse(text);
- }
-
- /**
- *
- */
- void parse(String text) {
- StringBuffer bufValue = new StringBuffer();
- StringBuffer bufIdent = new StringBuffer();
- boolean bNum = true;
- int len = text.length();
- for (int i = 0; i < len; i++) {
- char c = text.charAt(i);
- if (bNum) {
- if ('0' <= c && c <= '9' || c == '.' || c == '+' || c == '-') {
- bufValue.append(c);
- }
- else {
- bufIdent.append(c);
- bNum = false;
- }
- }
- else {
- bufIdent.append(c);
- }
- }
- String valueStr = bufValue.toString();
- fValue = Float.valueOf(valueStr).floatValue();
- fIdentifier = bufIdent.toString();
- fType = getFloatValueType(valueStr, fIdentifier);
- }
-
- /**
- *
- */
- float getValue() {
- return fValue;
- }
-
- /**
- *
- */
- String getIdentifier() {
- return fIdentifier;
- }
-
- /**
- *
- */
- short getValueType() {
- return fType;
- }
-
- private float fValue = 0.0f;
- private String fIdentifier = null;
- private short fType = CSSPrimitiveValue.CSS_UNKNOWN;
- }
-
- final static int S_NORMAL = 0;
- final static int S_FUNCTION = 1;
- final static int S_FONT_SLASH = 2;
- final static int S_COMMA_SEPARATION = 3;
- private ICSSDocument fDocument = null;
- private IStructuredDocumentRegion fParentRegion = null;
- private boolean fTempStructuredDocument = false;
- private CSSModelUpdateContext fUpdateContext = null;
-
- /**
- * CSSDeclarationItemParser constructor comment.
- */
- CSSDeclarationItemParser(ICSSDocument doc) {
- super();
- fDocument = doc;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createAttrValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("attr")) { //$NON-NLS-1$
- return null;
- }
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- if (valueRegions.size() != 1) {
- return null;
- }
-
- CSSPrimitiveValueImpl value = getCSSPrimitiveValue(CSSPrimitiveValue.CSS_ATTR);
- if (value == null) {
- return null;
- }
-
- ITextRegion region = valueRegions.get(0);
- value.setValue(getText(region));
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createCountersValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("counters")) { //$NON-NLS-1$
- return null;
- }
-
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT, CSSRegionContexts.CSS_DECLARATION_VALUE_STRING};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- int size = valueRegions.size();
- if (size != 2 && size != 3) {
- return null;
- }
-
- CounterImpl value = getCounter();
- if (value == null) {
- return null;
- }
-
- for (int i = 0; i < size; i++) {
- ITextRegion region = valueRegions.get(i);
- String text = getText(region);
- CSSAttrImpl attr = null;
- switch (i) {
- case 0 :
- value.setIdentifier(text);
- attr = value.getAttributeNode(ICounter.IDENTIFIER);
- break;
- case 1 :
- value.setSeparator(text);
- attr = value.getAttributeNode(ICounter.SEPARATOR);
- break;
- case 2 :
- value.setListStyle(text);
- attr = value.getAttributeNode(ICounter.LISTSTYLE);
- break;
- default :
- break;
- }
- if (attr != null) {
- attr.setRangeRegion(fParentRegion, region, region);
- }
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createCounterValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("counter")) { //$NON-NLS-1$
- return null;
- }
-
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- int size = valueRegions.size();
- if (size != 1 && size != 2) {
- return null;
- }
-
- CounterImpl value = getCounter();
- if (value == null) {
- return null;
- }
-
- for (int i = 0; i < size; i++) {
- ITextRegion region = valueRegions.get(i);
- String text = getText(region);
- CSSAttrImpl attr = null;
- switch (i) {
- case 0 :
- value.setIdentifier(text);
- attr = value.getAttributeNode(ICounter.IDENTIFIER);
- break;
- case 1 :
- value.setListStyle(text);
- attr = value.getAttributeNode(ICounter.LISTSTYLE);
- break;
- default :
- break;
- }
- if (attr != null) {
- attr.setRangeRegion(fParentRegion, region, region);
- }
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSStyleDeclItemImpl createDeclarationItem(ITextRegionList nodeRegions) {
- CSSStyleDeclItemImpl item = null;
- String name = getPropertyName(nodeRegions);
- if (name != null) {
- item = getCSSStyleDeclItem(name);
- }
- return item;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createFloatValue(String text, String type) {
- FloatInfo info = new FloatInfo(text);
- CSSPrimitiveValueImpl value = getCSSPrimitiveValue(info.getValueType());
- if (value != null) {
- value.setValue(info.getValue());
- }
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createFormatValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("format")) { //$NON-NLS-1$
- return null;
- }
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_STRING};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- // format can take variable args.
- if (valueRegions.size() == 0) {
- return null;
- }
-
- CSSPrimitiveValueImpl value = getCSSPrimitiveValue(ICSSPrimitiveValue.CSS_FORMAT);
- if (value == null) {
- return null;
- }
-
- ITextRegion region = valueRegions.get(0);
- value.setValue(CSSUtil.extractStringContents(getText(region)));
-
- return value;
-
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createLocalValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("local")) { //$NON-NLS-1$
- return null;
- }
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_STRING};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- if (valueRegions.size() != 1) {
- return null;
- }
-
- CSSPrimitiveValueImpl value = getCSSPrimitiveValue(ICSSPrimitiveValue.CSS_LOCAL);
- if (value == null) {
- return null;
- }
-
- ITextRegion region = valueRegions.get(0);
- value.setValue(CSSUtil.extractStringContents(getText(region)));
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createPrimitiveValue(ITextRegion region) {
- if (region == null) {
- return null;
- }
- CSSPrimitiveValueImpl value = null;
- String type = region.getType();
- String text = getText(region);
- if (isBlank(type)) {
- value = null;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || type == CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION || type == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE) {
- value = createFloatValue(text, type);
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_STRING || type == CSSRegionContexts.CSS_DECLARATION_VALUE_URI || type == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || type == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- value = createStringValue(text, type);
- }
-
- if (value == null) {
- value = createStringValue(text, type);
- }
-
- if (!fTempStructuredDocument && value != null) {
- value.setRangeRegion(fParentRegion, region, region);
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createPrimitiveValue(ITextRegionList regions) {
- CSSPrimitiveValueImpl value = null;
- CSSUtil.stripSurroundingSpace(regions);
- if (regions.isEmpty()) {
- return null;
- }
- ITextRegion region = regions.get(0);
- if (region == null) {
- return null;
- }
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- String text = getText(region).toLowerCase();
- if (text.equals("rgb(")) { //$NON-NLS-1$
- value = createRgbValue(regions);
- }
- else if (text.equals("counter(")) { //$NON-NLS-1$
- value = createCounterValue(regions);
- }
- else if (text.equals("counters(")) { //$NON-NLS-1$
- value = createCountersValue(regions);
- }
- else if (text.equals("attr(")) { //$NON-NLS-1$
- value = createAttrValue(regions);
- }
- else if (text.equals("format(")) { //$NON-NLS-1$
- value = createFormatValue(regions);
- }
- else if (text.equals("local(")) { //$NON-NLS-1$
- value = createLocalValue(regions);
- }
- else if (text.equals("rect(")) { //$NON-NLS-1$
- value = createRectValue(regions);
- }
- if (value == null) {
- value = createStringValue(regions);
- }
- }
- else {
- value = createStringValue(regions);
- }
-
- if (!fTempStructuredDocument && value != null) {
- value.setRangeRegion(fParentRegion, regions.get(0), regions.get(regions.size() - 1));
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createRectValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("rect")) { //$NON-NLS-1$
- return null;
- }
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER, CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION, CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT}; // IDENT:
- // for
- // 'auto'
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- if (valueRegions.size() != 4) {
- return null;
- }
-
- RectImpl value = getRect();
- if (value == null) {
- return null;
- }
-
- for (int i = 0; i < 4; i++) {
- ITextRegion region = valueRegions.get(i);
- CSSPrimitiveValueImpl childValue = null;
- switch (i) {
- case 0 :
- childValue = (CSSPrimitiveValueImpl) value.getTop();
- break;
- case 1 :
- childValue = (CSSPrimitiveValueImpl) value.getRight();
- break;
- case 2 :
- childValue = (CSSPrimitiveValueImpl) value.getBottom();
- break;
- case 3 :
- childValue = (CSSPrimitiveValueImpl) value.getLeft();
- break;
- default :
- break;
- }
- if (childValue == null) {
- return null;
- }
- String text = getText(region);
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- setStringValue(childValue, text, type);
- }
- else {
- setFloatValue(childValue, text, type);
- }
- if (!fTempStructuredDocument) {
- childValue.setRangeRegion(fParentRegion, region, region);
- }
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createRgbValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("rgb")) { //$NON-NLS-1$
- return null;
- }
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER, CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- if (valueRegions.size() != 3) {
- return null;
- }
-
- RGBColorImpl value = getRGBColor();
- if (value == null) {
- return null;
- }
-
- for (int i = 0; i < 3; i++) {
- ITextRegion region = valueRegions.get(i);
- CSSPrimitiveValueImpl childValue = null;
- switch (i) {
- case 0 :
- childValue = (CSSPrimitiveValueImpl) value.getRed();
- break;
- case 1 :
- childValue = (CSSPrimitiveValueImpl) value.getGreen();
- break;
- case 2 :
- childValue = (CSSPrimitiveValueImpl) value.getBlue();
- break;
- default :
- break;
- }
- if (childValue == null) {
- return null;
- }
- setFloatValue(childValue, getText(region), region.getType());
- if (!fTempStructuredDocument) {
- childValue.setRangeRegion(fParentRegion, region, region);
- }
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createStringValue(String text, String type) {
- short valueType = getStringValueType(text, type);
- CSSPrimitiveValueImpl value = getCSSPrimitiveValue(valueType);
- if (value != null) {
- if (valueType == CSSPrimitiveValue.CSS_URI) {
- text = CSSUtil.extractUriContents(text);
- }
- else if (valueType == CSSPrimitiveValue.CSS_STRING) {
- text = CSSUtil.extractStringContents(text);
- }
- value.setValue(text);
- }
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createStringValue(ITextRegionList regions) {
- String type = CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT;
- if (regions.size() == 1) {
- ITextRegion region = regions.get(0);
- type = region.getType();
- }
- return createStringValue(makeString(regions), type);
- }
-
- /**
- *
- */
- private CounterImpl getCounter() {
- CounterImpl node;
- if (fUpdateContext != null && fUpdateContext.isActive()) {
- node = fUpdateContext.getCounter();
- }
- else {
- node = (CounterImpl) fDocument.createCSSPrimitiveValue(CSSPrimitiveValue.CSS_COUNTER);
- }
- return node;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl getCSSPrimitiveValue(short type) {
- CSSPrimitiveValueImpl node;
- if (fUpdateContext != null && fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSPrimitiveValue(type);
- }
- else {
- node = (CSSPrimitiveValueImpl) fDocument.createCSSPrimitiveValue(type);
- }
- return node;
- }
-
- /**
- *
- */
- private CSSStyleDeclItemImpl getCSSStyleDeclItem(String propertyName) {
- CSSStyleDeclItemImpl node;
- if (fUpdateContext != null && fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSStyleDeclItem(propertyName);
- }
- else {
- node = (CSSStyleDeclItemImpl) fDocument.createCSSStyleDeclItem(propertyName);
- }
- return node;
- }
-
- /**
- *
- */
- static short getFloatValueType(String ident) {
- ident = ident.toLowerCase();
- short valueType;
- if (ident.length() == 0) {
- valueType = CSSPrimitiveValue.CSS_NUMBER;
- }
- else if (ident.equals("%")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PERCENTAGE;
- }
- else if (ident.equalsIgnoreCase("em")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_EMS;
- }
- else if (ident.equalsIgnoreCase("ex")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_EXS;
- }
- else if (ident.equalsIgnoreCase("px")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PX;
- }
- else if (ident.equalsIgnoreCase("cm")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_CM;
- }
- else if (ident.equalsIgnoreCase("mm")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_MM;
- }
- else if (ident.equalsIgnoreCase("in")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_IN;
- }
- else if (ident.equalsIgnoreCase("pt")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PT;
- }
- else if (ident.equalsIgnoreCase("pc")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PC;
- }
- else if (ident.equalsIgnoreCase("deg")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_DEG;
- }
- else if (ident.equalsIgnoreCase("rad")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_RAD;
- }
- else if (ident.equalsIgnoreCase("grad")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_GRAD;
- }
- else if (ident.equalsIgnoreCase("ms")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_MS;
- }
- else if (ident.equalsIgnoreCase("s")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_S;
- }
- else if (ident.equalsIgnoreCase("hz")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_HZ;
- }
- else if (ident.equalsIgnoreCase("khz")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_KHZ;
- }
- else {
- valueType = CSSPrimitiveValue.CSS_DIMENSION;
- }
- return valueType;
- }
-
- /**
- *
- */
- static short getFloatValueType(String value, String ident) {
- ident = ident.toLowerCase();
- short valueType;
- if (ident.length() == 0) {
- if (0 <= value.indexOf('.')) {
- valueType = CSSPrimitiveValue.CSS_NUMBER;
- }
- else {
- valueType = ICSSPrimitiveValue.CSS_INTEGER;
- }
- }
- else if (ident.equals("%")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PERCENTAGE;
- }
- else if (ident.equalsIgnoreCase("em")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_EMS;
- }
- else if (ident.equalsIgnoreCase("ex")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_EXS;
- }
- else if (ident.equalsIgnoreCase("px")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PX;
- }
- else if (ident.equalsIgnoreCase("cm")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_CM;
- }
- else if (ident.equalsIgnoreCase("mm")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_MM;
- }
- else if (ident.equalsIgnoreCase("in")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_IN;
- }
- else if (ident.equalsIgnoreCase("pt")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PT;
- }
- else if (ident.equalsIgnoreCase("pc")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PC;
- }
- else if (ident.equalsIgnoreCase("deg")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_DEG;
- }
- else if (ident.equalsIgnoreCase("rad")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_RAD;
- }
- else if (ident.equalsIgnoreCase("grad")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_GRAD;
- }
- else if (ident.equalsIgnoreCase("ms")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_MS;
- }
- else if (ident.equalsIgnoreCase("s")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_S;
- }
- else if (ident.equalsIgnoreCase("hz")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_HZ;
- }
- else if (ident.equalsIgnoreCase("khz")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_KHZ;
- }
- else {
- valueType = CSSPrimitiveValue.CSS_DIMENSION;
- }
- return valueType;
- }
-
- /**
- *
- */
- private String getFunctionName(ITextRegionList regions) {
- if (regions == null || regions.size() < 2) {
- return null;
- }
- ITextRegion firstRegion = regions.get(0);
- if (firstRegion.getType() != CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- return null;
- }
- ITextRegion lastRegion = regions.get(regions.size() - 1);
- if (lastRegion.getType() != CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE) {
- return null;
- }
- String text = getText(firstRegion);
- return text.substring(0, text.length() - 1);
- }
-
- /**
- * this method has no validation check, then regions must be passed
- * getFunctionName()...
- */
- private ITextRegionList getFunctionParameters(ITextRegionList regions, String[] accepts) {
- ITextRegionList newRegions = new TextRegionListImpl();
- int nAccepts = (accepts != null) ? accepts.length : 0;
- Iterator i = regions.iterator();
- i.next(); // skip FUNCTION
- while (i.hasNext()) {
- ITextRegion region = (ITextRegion) i.next();
- if (region == null) {
- continue;
- }
- String type = region.getType();
- if (isBlank(type)) {
- continue;
- }
- if (nAccepts == 0) {
- newRegions.add(region);
- }
- else {
- for (int iAccept = 0; iAccept < nAccepts; iAccept++) {
- if (type == accepts[iAccept]) {
- newRegions.add(region);
- break;
- }
- }
- }
- }
- return newRegions;
- }
-
- /**
- *
- */
- // private String getPropertyName(IStructuredDocumentRegion flatNode) {
- // Vector nodeRegions = new Vector(flatNode.getRegions());
- // return getPropertyName(nodeRegions);
- // }
- /**
- *
- */
- private String getPropertyName(ITextRegionList nodeRegions) {
- ITextRegionList nameRegions = new TextRegionListImpl();
- String name = null;
- while (!nodeRegions.isEmpty()) {
- ITextRegion region = nodeRegions.remove(0);
- if (region == null) {
- continue;
- }
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- CSSUtil.stripSurroundingSpace(nameRegions);
- name = makeString(nameRegions);
- break;
- }
- else {
- nameRegions.add(region);
- }
- }
- return name;
- }
-
- /**
- *
- */
- private RectImpl getRect() {
- RectImpl node;
- if (fUpdateContext != null && fUpdateContext.isActive()) {
- node = fUpdateContext.getRect();
- }
- else {
- node = (RectImpl) fDocument.createCSSPrimitiveValue(CSSPrimitiveValue.CSS_RECT);
- }
- return node;
- }
-
- /**
- *
- */
- private RGBColorImpl getRGBColor() {
- RGBColorImpl node;
- if (fUpdateContext != null && fUpdateContext.isActive()) {
- node = fUpdateContext.getRGBColor();
- }
- else {
- node = (RGBColorImpl) fDocument.createCSSPrimitiveValue(CSSPrimitiveValue.CSS_RGBCOLOR);
- }
- return node;
- }
-
- /**
- *
- */
- private short getStringValueType(String text, String type) {
- short valueType;
- if (text.toLowerCase().equals("inherit")) { //$NON-NLS-1$
- valueType = ICSSPrimitiveValue.CSS_INHERIT_PRIMITIVE;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- valueType = CSSPrimitiveValue.CSS_URI;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_STRING) {
- valueType = CSSPrimitiveValue.CSS_STRING;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- valueType = ICSSPrimitiveValue.CSS_HASH;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && text.equals(",")) { //$NON-NLS-1$
- valueType = ICSSPrimitiveValue.CSS_COMMA;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && text.equals("/")) { //$NON-NLS-1$
- valueType = ICSSPrimitiveValue.CSS_SLASH;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_UNICODE_RANGE) {
- valueType = ICSSPrimitiveValue.CSS_URANGE;
- }
- else {
- valueType = CSSPrimitiveValue.CSS_IDENT;
- }
- return valueType;
- }
-
- /**
- *
- */
- private String makeString(ITextRegionList regions) {
- StringBuffer buf = new StringBuffer();
- boolean bSpace = false;
- for (Iterator i = regions.iterator(); i.hasNext();) {
- ITextRegion region = (ITextRegion) i.next();
- String type = region.getType();
- if (!bSpace && isBlank(type)) {
- buf.append(" "); //$NON-NLS-1$
- bSpace = true;
- }
- else {
- buf.append(getText(region));
- bSpace = false;
- }
- }
-
- return buf.toString();
- }
-
- /**
- *
- */
- void setStructuredDocumentTemporary(boolean bTemp) {
- fTempStructuredDocument = bTemp;
- }
-
- /**
- *
- */
- private void setFloatValue(CSSPrimitiveValueImpl value, String text, String type) {
- FloatInfo info = new FloatInfo(text);
- value.setFloatValue(info.getValueType(), info.getValue());
- }
-
- /**
- *
- */
- private void setStringValue(CSSPrimitiveValueImpl value, String text, String type) {
- short valueType = getStringValueType(text, type);
- value.setStringValue(valueType, text);
- }
-
- /**
- * @param item
- * org.eclipse.wst.css.core.model.interfaces.ICSSStyleDeclItem
- * @param nodeRegions
- * java.util.Vector
- */
- private void setupImportantAttribute(ICSSStyleDeclItem item, ITextRegionList nodeRegions) {
- if (item == null || nodeRegions == null || nodeRegions.isEmpty()) {
- return;
- }
- ITextRegion region = nodeRegions.get(nodeRegions.size() - 1);
- if (region != null && region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT) {
- item.setPriority(getText(region));
- CSSAttrImpl attr = ((CSSStyleDeclItemImpl) item).getAttributeNode(ICSSStyleDeclItem.IMPORTANT);
- attr.setRangeRegion(fParentRegion, region, region);
- nodeRegions.remove(region);
- }
- }
-
- /**
- *
- */
- void setUpdateContext(CSSModelUpdateContext updateContext) {
- fUpdateContext = updateContext;
- }
-
- /**
- *
- */
- public static boolean hasColonSeparator(IStructuredDocumentRegion flatNode) {
- if (flatNode == null) {
- return false;
- }
- ITextRegionList regions = flatNode.getRegions();
- if (regions == null || regions.size() == 0) {
- return false;
- }
-
- for (Iterator i = regions.iterator(); i.hasNext();) {
- ITextRegion region = (ITextRegion) i.next();
- if (region == null) {
- continue;
- }
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- *
- */
- CSSStyleDeclItemImpl setupDeclarationItem(IStructuredDocumentRegion flatNode) {
- if (flatNode == null) {
- return null;
- }
- if (!hasColonSeparator(flatNode)) {
- return null;
- }
-
- fParentRegion = flatNode;
-
- ITextRegionList nodeRegions = new TextRegionListImpl(flatNode.getRegions()); // make
- // copy
- CSSStyleDeclItemImpl newItem = createDeclarationItem(nodeRegions);
- if (newItem == null) {
- return null;
- }
- if (!fTempStructuredDocument && flatNode != null) {
- newItem.setRangeStructuredDocumentRegion(flatNode, flatNode);
- }
-
- CSSUtil.stripSurroundingSpace(nodeRegions);
- setupImportantAttribute(newItem, nodeRegions);
- // Now, nodeRegions just has regions for value.
- setupValues(newItem, nodeRegions);
- return newItem;
- }
-
- void setupValues(ICSSStyleDeclItem item, IStructuredDocumentRegion parentRegion, ITextRegionList nodeRegions) {
- fParentRegion = parentRegion;
- setupValues(item, nodeRegions);
- }
-
- /**
- * nodeRegions must be broken. If you need after, make copy of them.
- */
- private void setupValues(ICSSStyleDeclItem item, ITextRegionList nodeRegions) {
- if (item == null) {
- return;
- }
-
- ICSSPrimitiveValue value;
- ITextRegionList regionBuf = new TextRegionListImpl();
-
- String propertyName = item.getPropertyName().toLowerCase();
- boolean bFont = (propertyName.equals(PropCMProperty.P_FONT));
- // (short-hand) font
- int status = (propertyName.equals(PropCMProperty.P_VOICE_FAMILY) || propertyName.equals(PropCMProperty.P_FONT_FAMILY)) ? S_COMMA_SEPARATION : S_NORMAL;
- while (!nodeRegions.isEmpty()) {
- value = null;
- ITextRegion region = nodeRegions.remove(0);
- if (region == null) {
- continue;
- }
- String type = region.getType();
- // if (type == CSSRegionContexts.CSS_DECLARATION_DELIMITER || type
- // == CSSRegionContexts.CSS_RBRACE) {
- // break;
- // }
- switch (status) {
- case S_NORMAL :
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- regionBuf.add(region);
- status = S_FUNCTION;
- }
- else if (bFont && type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && fParentRegion.getText(region).equals("/")) { //$NON-NLS-1$
- value = createPrimitiveValue(region);
- status = S_FONT_SLASH;
- }
- else if (!isBlank(type)) {
- value = createPrimitiveValue(region);
- }
- break;
- case S_FUNCTION :
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE) {
- regionBuf.add(region);
- value = createPrimitiveValue(regionBuf);
- regionBuf.clear();
- status = S_NORMAL;
- }
- else if (!isBlank(type)) {
- regionBuf.add(region);
- }
- break;
- case S_FONT_SLASH :
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION) {
- value = createPrimitiveValue(region);
- status = S_COMMA_SEPARATION;
- }
- else if (!isBlank(type)) {
- value = createPrimitiveValue(region);
- }
- break;
- case S_COMMA_SEPARATION :
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && fParentRegion.getText(region).equals(",")) { //$NON-NLS-1$
- value = createPrimitiveValue(regionBuf);
- regionBuf.clear();
- if (value != null) {
- if (fUpdateContext == null || !fUpdateContext.isActive()) {
- item.appendValue(value);
- }
- }
- value = createPrimitiveValue(region);
- }
- else {
- regionBuf.add(region);
- }
- break;
- default :
- break;
- }
- if (value != null) {
- if (fUpdateContext == null || !fUpdateContext.isActive()) {
- item.appendValue(value);
- }
- }
- }
- if (!regionBuf.isEmpty()) {
- value = createPrimitiveValue(regionBuf);
- if (fUpdateContext == null || !fUpdateContext.isActive()) {
- item.appendValue(value);
- }
- }
- }
-
- private String getText(ITextRegion region) {
- return (fParentRegion != null) ? fParentRegion.getText(region) : ""; //$NON-NLS-1$
- }
-
- private static boolean isBlank(String type) {
- return (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT || type == CSSRegionContexts.CSS_DECLARATION_VALUE_S);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDocumentImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDocumentImpl.java
deleted file mode 100644
index c3bb647e9f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDocumentImpl.java
+++ /dev/null
@@ -1,183 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPageRule;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.w3c.dom.css.CSSFontFaceRule;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSUnknownRule;
-import org.w3c.dom.stylesheets.MediaList;
-
-
-/**
- *
- */
-abstract class CSSDocumentImpl extends CSSStructuredDocumentRegionContainer implements ICSSDocument {
-
- private CSSModelImpl fModel = null;
-
- /**
- * CSSDocumentImpl constructor comment.
- */
- CSSDocumentImpl() {
- super();
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSDocumentImpl
- */
- CSSDocumentImpl(CSSDocumentImpl that) {
- super(that);
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSNode
- * @param name
- * java.lang.String
- */
- ICSSNode createCSSAttr(String name) {
- CSSAttrImpl attr = new CSSAttrImpl(name);
- attr.setOwnerDocument(this);
-
- return attr;
- }
-
- /**
- * @return org.w3c.dom.css.CSSCharsetRule
- */
- public ICSSCharsetRule createCSSCharsetRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSFontFaceRule
- */
- public CSSFontFaceRule createCSSFontFaceRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSImportRule
- */
- public ICSSImportRule createCSSImportRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.ICSSMediaRule
- */
- public ICSSMediaRule createCSSMediaRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPageRule
- */
- public ICSSPageRule createCSSPageRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- */
- public ICSSPrimitiveValue createCSSPrimitiveValue(short primitiveType) {
- CSSPrimitiveValueImpl value = null;
- if (primitiveType == CSSPrimitiveValue.CSS_COUNTER)
- value = new CounterImpl();
- else if (primitiveType == CSSPrimitiveValue.CSS_RECT)
- value = new RectImpl();
- else if (primitiveType == CSSPrimitiveValue.CSS_RGBCOLOR)
- value = new RGBColorImpl();
- else
- value = new CSSPrimitiveValueImpl(primitiveType);
- value.setOwnerDocument(this);
-
- return value;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * java.lang.String
- */
- public CSSRule createCSSRule(String rule) {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSStyleDeclaration
- */
- public ICSSStyleDeclaration createCSSStyleDeclaration() {
- return null;
- }
-
- /**
- * @return com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @param propertyName
- * java.lang.String
- */
- public ICSSStyleDeclItem createCSSStyleDeclItem(String propertyName) {
- CSSStyleDeclItemImpl item = new CSSStyleDeclItemImpl(propertyName);
- item.setOwnerDocument(this);
-
- return item;
- }
-
- /**
- * @return org.w3c.dom.css.CSSStyleRule
- */
- public ICSSStyleRule createCSSStyleRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSUnknownRule
- */
- public CSSUnknownRule createCSSUnknownRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.stylesheets.MediaList
- */
- public MediaList createMediaList() {
- return null;
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSModel
- */
- public ICSSModel getModel() {
- return fModel;
- }
-
- /**
- * @param model
- * com.ibm.sed.css.treemodel.CSSModelImpl
- */
- void setModel(CSSModelImpl model) {
- this.fModel = model;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSFontFaceRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSFontFaceRuleImpl.java
deleted file mode 100644
index c3bdf63fe1..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSFontFaceRuleImpl.java
+++ /dev/null
@@ -1,76 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.w3c.dom.css.CSSFontFaceRule;
-
-
-/**
- *
- */
-class CSSFontFaceRuleImpl extends CSSRuleDeclContainer implements CSSFontFaceRule {
-
- /**
- *
- */
- CSSFontFaceRuleImpl() {
- super();
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSFontFaceRuleImpl
- */
- CSSFontFaceRuleImpl(CSSFontFaceRuleImpl that) {
- super(that);
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSFontFaceRuleImpl cloned = new CSSFontFaceRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return java.lang.String
- */
- String extractPreString() {
- return "@font-face";//$NON-NLS-1$
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return FONTFACERULE_NODE;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return FONT_FACE_RULE;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSImportRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSImportRuleImpl.java
deleted file mode 100644
index bf99f11560..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSImportRuleImpl.java
+++ /dev/null
@@ -1,234 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.adapters.IModelProvideAdapter;
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleSheet;
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.util.CSSLinkConverter;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.css.core.util.URLModelProviderCSS;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSStyleSheet;
-import org.w3c.dom.stylesheets.MediaList;
-
-
-/**
- *
- */
-class CSSImportRuleImpl extends CSSRuleImpl implements ICSSImportRule {
-
- private boolean fDirty = true;
- private ICSSStyleSheet fStyleSheet;
-
- /**
- *
- */
- CSSImportRuleImpl() {
- super();
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSImportRuleImpl
- */
- CSSImportRuleImpl(CSSImportRuleImpl that) {
- super(that);
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSImportRuleImpl cloned = new CSSImportRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- *
- */
- void closeStyleSheet() {
- if (fStyleSheet != null) {
- ICSSStyleSheet sheet = fStyleSheet;
- fStyleSheet = null; // to prevent loop, we must reset fStyleSheet
- // before all closing action
-
- sheet.getModel().removeStyleListener(getOwnerDocument().getModel());
- // get ModelProvideAdapter
- IModelProvideAdapter adapter = (IModelProvideAdapter) getAdapterFor(IModelProvideAdapter.class);
- // if (getOwnerDocument().getModel().getStyleSheetType() ==
- // ICSSModel.EMBEDDED) { // case STYLE tag
- // adapter = (ModelProvideAdapter)
- // ((INodeNotifier)getOwnerDocument().getModel().getOwnerDOMNode()).getAdapterFor(ModelProvideAdapter.class);
- // }
- if (adapter != null)
- adapter.modelRemoved(sheet.getModel());
-
- sheet.getModel().releaseFromRead();
- }
- }
-
- /**
- * The location of the style sheet to be imported. The attribute will not
- * contain the <code>"url(...)"</code> specifier around the URI.
- */
- public String getHref() {
- return CSSUtil.extractUriContents(getAttribute(HREF));
- }
-
- /**
- * A list of media types for which this style sheet may be used.
- */
- public org.w3c.dom.stylesheets.MediaList getMedia() {
- ICSSNode media = getFirstChild();
- if (media != null) {
- if (media instanceof MediaList) {
- return (MediaList) media;
- }
- }
-
- // THIS CASE IS ERROR CASE
- return null;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return IMPORTRULE_NODE;
- }
-
- /**
- * The style sheet referred to by this rule, if it has been loaded. The
- * value of this attribute is <code>null</code> if the style sheet has
- * not yet been loaded or if it will not be loaded (e.g. if the style
- * sheet is for a media type not supported by the user agent).
- */
- public CSSStyleSheet getStyleSheet() {
-
- if (fDirty) {
- // NOTE: try/catch block is a TEMP fix to avoid compile errors:
- try {
- closeStyleSheet();
-
- if (getHref() == null || getHref().length() <= 0) {
- fDirty = false;
- return null;
- }
-
- IStructuredModel baseModel = getOwnerDocument().getModel();
- if (getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED) { // case
- // STYLE
- // tag
- baseModel = ((XMLNode) getOwnerDocument().getModel().getOwnerDOMNode()).getModel();
- }
- // get ModelProvideAdapter
- IModelProvideAdapter adapter = (IModelProvideAdapter) getAdapterFor(IModelProvideAdapter.class);
- // if (getOwnerDocument().getModel().getStyleSheetType() ==
- // ICSSModel.EMBEDDED) { // case STYLE tag
- // adapter = (ModelProvideAdapter)
- // ((INodeNotifier)getOwnerDocument().getModel().getOwnerDOMNode()).getAdapterFor(ModelProvideAdapter.class);
- // }
-
- // load model from IModelManager
- URLModelProviderCSS provider = new URLModelProviderCSS();
- IStructuredModel newModel = provider.getModelForRead(baseModel, getHref());
- fDirty = false;
-
- if (newModel == null)
- return null;
- if (!(newModel instanceof ICSSModel)) {
- newModel.releaseFromRead();
- return null;
- }
-
- // notify adapter
- if (adapter != null)
- adapter.modelProvided(newModel);
-
- fStyleSheet = (ICSSStyleSheet) ((ICSSModel) newModel).getDocument();
- if (fStyleSheet != null)
- fStyleSheet.getModel().addStyleListener(getOwnerDocument().getModel());
- }
- catch (java.io.IOException e) {
- Logger.logException(e);
- }
- }
- return fStyleSheet;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return IMPORT_RULE;
- }
-
- /**
- *
- */
- public void refreshStyleSheet() {
- if (!fDirty) {
- closeStyleSheet();
- fDirty = true;
- notify(INodeNotifier.CHANGE, getAttributeNode(HREF), null, null, getStartOffset());
- }
- }
-
- /**
- */
- void releaseRule() {
- if (fStyleSheet != null) {
- ICSSStyleSheet sheet = fStyleSheet;
- fStyleSheet = null; // to prevent loop, we must reset fStyleSheet
- // before all closing action
-
- sheet.getModel().removeStyleListener(getOwnerDocument().getModel());
- // get ModelProvideAdapter
- IModelProvideAdapter adapter = (IModelProvideAdapter) getAdapterFor(IModelProvideAdapter.class);
- // if (getOwnerDocument().getModel().getStyleSheetType() ==
- // ICSSModel.EMBEDDED) { // case STYLE tag
- // adapter = (ModelProvideAdapter)
- // ((INodeNotifier)getOwnerDocument().getModel().getOwnerDOMNode()).getAdapterFor(ModelProvideAdapter.class);
- // }
- if (adapter != null)
- adapter.modelReleased(sheet.getModel());
-
- sheet.getModel().releaseFromRead();
- }
- }
-
- /**
- * @param href
- * java.lang.String
- */
- public void setHref(String href) throws DOMException {
- fDirty = true;
- setAttribute(HREF, CSSLinkConverter.addFunc(href));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSMediaRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSMediaRuleImpl.java
deleted file mode 100644
index d71bfaf055..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSMediaRuleImpl.java
+++ /dev/null
@@ -1,244 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSRuleList;
-import org.w3c.dom.stylesheets.MediaList;
-
-
-/**
- *
- */
-class CSSMediaRuleImpl extends CSSRuleImpl implements ICSSMediaRule {
-
- /**
- *
- */
- CSSMediaRuleImpl() {
- super();
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSMediaRuleImpl
- */
- CSSMediaRuleImpl(CSSMediaRuleImpl that) {
- super(that);
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule appendRule(org.w3c.dom.css.CSSRule rule) throws org.w3c.dom.DOMException {
- if (rule == null)
- return null;
-
- CSSRule ret = (CSSRule) appendChild((CSSNodeImpl) rule);
- return ret;
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSMediaRuleImpl cloned = new CSSMediaRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * Used to delete a rule from the media block.
- *
- * @param index
- * The index within the media block's rule collection of the
- * rule to remove.
- * @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified index does not
- * correspond to a rule in the media rule list. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule
- * is readonly.
- */
- public void deleteRule(int index) throws DOMException {
- CSSNodeImpl node = getIndexedRule(index);
- if (node != null)
- removeChild(node);
- }
-
- /**
- * A list of all CSS rules contained within the media block.
- */
- public CSSRuleList getCssRules() {
- CSSRuleListImpl list = new CSSRuleListImpl();
-
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSRule)
- list.appendNode(node);
- }
-
- return list;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSRuleImpl
- * @param index
- * int
- */
- CSSRuleImpl getIndexedRule(int index) {
- if (index < 0)
- return null;
-
- int i = 0;
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSRule) {
- if (i++ == index)
- return (CSSRuleImpl) node;
- }
- }
- return null;
- }
-
- /**
- * A list of media types for this rule.
- */
- public MediaList getMedia() {
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof MediaListImpl)
- return (MediaList) node;
- }
-
- return null;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return MEDIARULE_NODE;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return MEDIA_RULE;
- }
-
- /**
- * Used to insert a new rule into the media block.
- *
- * @param rule
- * The parsable text representing the rule. For rule sets this
- * contains both the selector and the style declaration. For
- * at-rules, this specifies both the at-identifier and the rule
- * content.
- * @param index
- * The index within the media block's rule collection of the
- * rule before which to insert the specified rule. If the
- * specified index is equal to the length of the media blocks's
- * rule collection, the rule will be added to the end of the
- * media block.
- * @return The index within the media block's rule collection of the newly
- * inserted rule.
- * @exception DOMException
- * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be
- * inserted at the specified index, e.g., if an
- * <code>@import</code> rule is inserted after a standard rule set or other
- * at-rule. <br>
- * INDEX_SIZE_ERR: Raised if the specified index is not a valid
- * insertion point. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is
- * readonly. <br>
- * SYNTAX_ERR: Raised if the specified rule has a syntax error and
- * is unparsable.
- */
- public int insertRule(String rule, int index) throws DOMException {
- int length = getCssRules().getLength();
- if (index < 0 || length < index)
- throw new DOMException(DOMException.INDEX_SIZE_ERR, "");//$NON-NLS-1$
-
- CSSRuleImpl refRule = (length != index) ? getIndexedRule(index) : null;
-
- CSSRuleImpl newRule = (CSSRuleImpl) getOwnerDocument().createCSSRule(rule);
-
- // prevent from nesting @media rule
- if (newRule.getType() == CSSRule.MEDIA_RULE)
- throw new DOMException(DOMException.SYNTAX_ERR, "");//$NON-NLS-1$
-
- insertBefore(newRule, refRule);
-
- return index;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newRule
- * org.w3c.dom.css.CSSRule
- * @param refRule
- * org.w3c.dom.css.CSSRule
- */
- public org.w3c.dom.css.CSSRule insertRuleBefore(org.w3c.dom.css.CSSRule newRule, org.w3c.dom.css.CSSRule refRule) throws org.w3c.dom.DOMException {
- if (newRule == null && refRule == null)
- return null;
-
- CSSRule ret = (CSSRule) insertBefore((CSSNodeImpl) newRule, (CSSNodeImpl) refRule);
- return ret;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule removeRule(org.w3c.dom.css.CSSRule rule) throws org.w3c.dom.DOMException {
- if (rule == null)
- return null;
-
- CSSRule ret = (CSSRule) removeChild((CSSNodeImpl) rule);
- return ret;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newChild
- * org.w3c.dom.css.CSSRule
- * @param oldChild
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule replaceRule(org.w3c.dom.css.CSSRule newRule, org.w3c.dom.css.CSSRule oldRule) throws org.w3c.dom.DOMException {
- if (newRule == null && oldRule == null)
- return null;
-
- CSSRule ret = (CSSRule) replaceChild((CSSNodeImpl) newRule, (CSSNodeImpl) oldRule);
- return ret;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelCreationContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelCreationContext.java
deleted file mode 100644
index bc640da725..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelCreationContext.java
+++ /dev/null
@@ -1,155 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-
-/**
- *
- */
-class CSSModelCreationContext {
-
- private CSSNodeImpl fRootNode = null;
- private CSSNodeImpl fTargetNode = null;
- private CSSNodeImpl fNextNode = null;
- private int fReparseStart = -1;
- private int fReparseEnd = -1;
-
- /**
- * CSSModelContext constructor comment.
- */
- CSSModelCreationContext(CSSNodeImpl rootNode) {
- super();
-
- fRootNode = rootNode;
- }
-
- /**
- *
- */
- void clear() {
- fNextNode = null;
- fTargetNode = null;
- resetReparseRange();
- }
-
- /**
- *
- */
- CSSNodeImpl getNextNode() {
- return fNextNode;
- }
-
- /**
- *
- */
- int getReparseEnd() {
- return fReparseEnd;
- }
-
- /**
- *
- */
- int getReparseStart() {
- return fReparseStart;
- }
-
- /**
- *
- */
- CSSNodeImpl getRootNode() {
- return fRootNode;
- }
-
- /**
- *
- */
- CSSNodeImpl getTargetNode() {
- return fTargetNode;
- }
-
- /**
- *
- */
- boolean isToReparse() {
- return (0 <= getReparseStart() && 0 <= getReparseEnd());
- }
-
- /**
- *
- */
- void resetReparseRange() {
- fReparseStart = fReparseEnd = -1;
- }
-
- /**
- *
- */
- void setLast() {
- fNextNode = null;
-
- if (!(fRootNode instanceof CSSStructuredDocumentRegionContainer)) {
- fTargetNode = fRootNode;
- }
- else {
- IStructuredDocumentRegion lastStructuredDocumentRegion = ((CSSStructuredDocumentRegionContainer) fRootNode).getLastStructuredDocumentRegion();
- CSSNodeImpl node = fRootNode;
- while (node != null) {
- ICSSNode lastChild = node.getLastChild();
- if (lastChild instanceof CSSStructuredDocumentRegionContainer && ((CSSStructuredDocumentRegionContainer) lastChild).getLastStructuredDocumentRegion() == lastStructuredDocumentRegion) {
- node = (CSSNodeImpl) lastChild;
- }
- else {
- break;
- }
- }
- fTargetNode = node;
- }
- }
-
- /**
- *
- */
- void setNextNode(ICSSNode node) {
- fNextNode = (CSSNodeImpl) node;
- if (fNextNode != null) {
- fTargetNode = (CSSNodeImpl) fNextNode.getParentNode();
- }
- }
-
- /**
- *
- */
- void setReparseEnd(int end) {
- fReparseEnd = end;
- }
-
- /**
- *
- */
- void setReparseStart(int start) {
- fReparseStart = start;
- }
-
- /**
- *
- */
- void setTargetNode(ICSSNode node) {
- fTargetNode = (CSSNodeImpl) node;
- if (fNextNode != null && fNextNode.getParentNode() != fTargetNode) {
- fNextNode = null;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelDeletionContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelDeletionContext.java
deleted file mode 100644
index ee63966d4b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelDeletionContext.java
+++ /dev/null
@@ -1,268 +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.css.core.internal.document;
-
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegionList;
-
-
-/**
- *
- */
-class CSSModelDeletionContext {
-
- private int fOldStart = -1;
- private int fOldLength = 0;
- private int fNewStart = -1;
- private int fNewLength = 0;
- private int fLengthDifference = 0;
- private IStructuredDocumentRegionList fOldStructuredDocumentRegions = null;
- // private ICSSNode fRootNode = null;
- private int fRemovedRangeBegin = -1;
- private int fRemovedRangeEnd = -1;
- private CSSNodeListImpl fNodesToBeRemoved = new CSSNodeListImpl();
-
- /**
- * CSSModelDeletionContext constructor comment.
- */
- CSSModelDeletionContext(ICSSNode rootNode) {
- super();
-
- // fRootNode = rootNode;
- }
-
- /**
- *
- */
- boolean addNodeToBeRemoved(ICSSNode node) {
- int nNodes = fNodesToBeRemoved.getLength();
- for (int i = 0; i < nNodes; i++) {
- ICSSNode parent = fNodesToBeRemoved.item(i);
- if (CSSModelUtil.isParentOf(parent, node)) {
- return false;
- }
- }
- fNodesToBeRemoved.appendNode(node);
- return true;
- }
-
- /**
- *
- */
- void expandRemovedRangeBegin(IStructuredDocumentRegion flatNode) {
- if (flatNode == null) {
- return;
- }
- int newBegin = flatNode.getStart(); // fOldStart == fNewStart, right??
- if (fRemovedRangeBegin < 0 || newBegin < fRemovedRangeBegin) {
- fRemovedRangeBegin = newBegin;
- }
- }
-
- /**
- *
- */
- void expandRemovedRangeEnd(IStructuredDocumentRegion flatNode) {
- if (flatNode == null) {
- return;
- }
- int newEnd = flatNode.getEnd() + ((isOldNode(flatNode)) ? fLengthDifference : 0);
- if (fRemovedRangeEnd < 0 || fRemovedRangeEnd < newEnd) {
- fRemovedRangeEnd = newEnd;
- }
- }
-
- /**
- *
- */
- private CSSStructuredDocumentRegionContainer findContainer(CSSNodeImpl parent, IStructuredDocumentRegion flatNode) {
- if (parent instanceof CSSStructuredDocumentRegionContainer) {
- // Am i a container of flatNode?
- IStructuredDocumentRegion firstNode = ((CSSStructuredDocumentRegionContainer) parent).getFirstStructuredDocumentRegion();
- IStructuredDocumentRegion lastNode = ((CSSStructuredDocumentRegionContainer) parent).getLastStructuredDocumentRegion();
- int firstStart = getOriginalOffset(firstNode);
- int lastStart = getOriginalOffset(lastNode);
- int start = flatNode.getStart();
-
- if (firstStart <= start && start <= lastStart) {
- // I am a container, is my child a container ?
- for (ICSSNode node = parent.getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSNodeImpl) {
- CSSStructuredDocumentRegionContainer container = findContainer((CSSNodeImpl) node, flatNode);
- if (container != null) {
- return container;
- }
- }
- }
- return (CSSStructuredDocumentRegionContainer) parent;
- }
- }
-
- return null;
- }
-
- /**
- *
- */
- CSSStructuredDocumentRegionContainer findDeletionTarget(CSSNodeImpl parent, IStructuredDocumentRegion flatNode) {
- CSSStructuredDocumentRegionContainer target = findContainer(parent, flatNode);
- if (target == null) {
- return null;
- }
-
- // System.out.print(flatNode.toString() + ": ");
-
- // child a(=====)b(=====)c
- // parent (================) a,c can remove parent, but b cannot.
-
- ICSSNode child;
-
- for (child = target.getFirstChild(); child != null && !(child instanceof CSSStructuredDocumentRegionContainer); child = child.getNextSibling()) {
- // just advancing
- }
-
- if (child == null) {
- // System.out.println("target has no children."); // TESTBYCOZY
- return target; // has no child containers.
- }
- else {
- IStructuredDocumentRegion firstNode = ((CSSStructuredDocumentRegionContainer) child).getFirstStructuredDocumentRegion();
- if (flatNode.getStart() < getOriginalOffset(firstNode)) {
- // System.out.println("flatNode is in front of first child");
- // // TESTBYCOZY
- return target; // a
- }
- }
-
- for (child = target.getLastChild(); child != null && !(child instanceof CSSStructuredDocumentRegionContainer); child = child.getPreviousSibling()) {
- // just advancing
- }
-
- if (child == null) {
- // System.out.println("target has no children."); // TESTBYCOZY
- return target; // has no child containers.
- }
- else {
- IStructuredDocumentRegion firstNode = ((CSSStructuredDocumentRegionContainer) child).getFirstStructuredDocumentRegion();
- if (getOriginalOffset(firstNode) < flatNode.getStart()) {
- // System.out.println("flatNode is in after of last child");
- // // TESTBYCOZY
- return target; // c
- }
- }
-
- // System.out.println("flatNode inner of children"); // TESTBYCOZY
- return null; // b
- }
-
- /**
- *
- */
- Iterator getNodesToBeRemoved() {
- Collection nodes = new ArrayList();
- int nNodes = fNodesToBeRemoved.getLength();
- for (int i = 0; i < nNodes; i++) {
- nodes.add(fNodesToBeRemoved.item(i));
- }
- return nodes.iterator();
- }
-
- /**
- *
- */
- private int getOriginalOffset(IStructuredDocumentRegion flatNode) {
- int offset = 0;
- if (flatNode != null) {
- offset = flatNode.getStart();
- if (0 <= fLengthDifference) {
- if (fNewStart + fNewLength < offset) {
- offset -= fLengthDifference;
- }
- }
- else {
- if (fOldStart + fOldLength <= offset || (fNewStart < 0 && fOldStart <= offset && !isOldNode(flatNode)) || (0 <= fNewStart && fNewStart + fNewLength <= offset && !isOldNode(flatNode))) {
- offset -= fLengthDifference;
- }
- }
- }
-
- return offset;
- }
-
- /**
- *
- */
- int getRemovedRangeBegin() {
- return fRemovedRangeBegin;
- }
-
- /**
- *
- */
- int getRemovedRangeEnd() {
- return fRemovedRangeEnd;
- }
-
- /**
- *
- */
- private boolean isOldNode(IStructuredDocumentRegion flatNode) {
- if (fOldStructuredDocumentRegions != null) {
- for (Enumeration e = fOldStructuredDocumentRegions.elements(); e.hasMoreElements();) {
- if (e.nextElement() == flatNode) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- *
- */
- void setupContext(IStructuredDocumentRegionList newStructuredDocumentRegions, IStructuredDocumentRegionList oldStructuredDocumentRegions) {
- IStructuredDocumentRegion flatNode = null;
- fOldLength = CSSUtil.getTextLength(oldStructuredDocumentRegions);
- if (oldStructuredDocumentRegions != null && 0 < oldStructuredDocumentRegions.getLength() && (flatNode = oldStructuredDocumentRegions.item(0)) != null) {
- fOldStart = flatNode.getStart();
- }
- else {
- fOldStart = -1;
- }
- fNewLength = CSSUtil.getTextLength(newStructuredDocumentRegions);
- if (newStructuredDocumentRegions != null && 0 < newStructuredDocumentRegions.getLength() && (flatNode = newStructuredDocumentRegions.item(0)) != null) {
- fNewStart = flatNode.getStart();
- fRemovedRangeBegin = fNewStart;
- fRemovedRangeEnd = fNewStart + fNewLength;
- }
- else {
- fNewStart = -1;
- fRemovedRangeBegin = fRemovedRangeEnd = -1;
- }
- fLengthDifference = fNewLength - fOldLength;
- fOldStructuredDocumentRegions = oldStructuredDocumentRegions;
-
- // cleanup nodes
- while (0 < fNodesToBeRemoved.getLength()) {
- fNodesToBeRemoved.removeNode(0);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelImpl.java
deleted file mode 100644
index 1d98f57a45..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelImpl.java
+++ /dev/null
@@ -1,677 +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.css.core.internal.document;
-
-
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSSelector;
-import org.eclipse.wst.css.core.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.document.ICSSValue;
-import org.eclipse.wst.css.core.event.ICSSStyleListener;
-import org.eclipse.wst.css.core.internal.event.CSSEmbededStyleNotifyAdapter;
-import org.eclipse.wst.css.core.internal.event.CSSStyleNotifyAdapter;
-import org.eclipse.wst.css.core.internal.parser.CSSSourceParser;
-import org.eclipse.wst.css.core.util.ImportRuleCollector;
-import org.eclipse.wst.css.core.util.ImportedCollector;
-import org.eclipse.wst.css.core.util.SelectorsCollector;
-import org.eclipse.wst.sse.core.AbstractStructuredModel;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.events.IStructuredDocumentListener;
-import org.eclipse.wst.sse.core.events.NewDocumentEvent;
-import org.eclipse.wst.sse.core.events.NoChangeEvent;
-import org.eclipse.wst.sse.core.events.RegionChangedEvent;
-import org.eclipse.wst.sse.core.events.RegionsReplacedEvent;
-import org.eclipse.wst.sse.core.events.StructuredDocumentRegionsReplacedEvent;
-import org.eclipse.wst.sse.core.exceptions.ResourceInUse;
-import org.eclipse.wst.sse.core.parser.RegionParser;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.core.util.Assert;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-
-public class CSSModelImpl extends AbstractStructuredModel implements ICSSModel, IStructuredDocumentListener {
-
- private CSSDocumentImpl document = null;
- private org.w3c.dom.Node ownerNode = null;
- private CSSStyleNotifyAdapter styleNotifier = null;
- private CSSModelParser fParser = null;
- private CSSModelUpdater fUpdater = null;
- private boolean fStructuredDocumentUpdate = false;
- private final static String ID_NON_EXTERNAL_CSS = "**_NON_EXTERNAL_CSS_***";//$NON-NLS-1$
-
- /**
- * CSSModelImpl constructor comment.
- *
- */
- public CSSModelImpl() {
- super();
- }
-
- /**
- * @param listener
- * org.eclipse.wst.css.core.event.CSSStyleListener
- */
- public void addStyleListener(ICSSStyleListener listener) {
- getStyleNotifier().addStyleListener(listener);
- }
-
- /**
- * @param parentNode
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param newAttr
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param oldAttr
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- */
- void attrReplaced(CSSNodeImpl parentNode, CSSNodeImpl newAttr, CSSNodeImpl oldAttr) {
- if (!fStructuredDocumentUpdate) {
- CSSModelUpdater updater = getUpdater();
- updater.attrReplaced(parentNode, newAttr, oldAttr);
- }
-
- ICSSSelector removed[] = null, added[] = null;
- if (oldAttr != null && oldAttr.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) oldAttr).getName().equals(ICSSStyleRule.SELECTOR)) {
- CSSAttrImpl attr = (CSSAttrImpl) oldAttr;
- // collect changed selector
- ICSSSelectorList list = new CSSSelectorListImpl(attr.getValue());
- removed = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- removed[i] = list.getSelector(i);
- }
- if (newAttr != null && newAttr.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) newAttr).getName().equals(ICSSStyleRule.SELECTOR)) {
- CSSAttrImpl attr = (CSSAttrImpl) newAttr;
- // collect changed selector
- ICSSSelectorList list = new CSSSelectorListImpl(attr.getValue());
- added = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- added[i] = list.getSelector(i);
- }
- if (removed != null || added != null || getDocument().getNodeType() == ICSSNode.STYLEDECLARATION_NODE) {
- getStyleNotifier().fire(removed, added, null);
- }
- // for href attribute
- if (getStyleListeners() != null && getStyleListeners().size() > 0) {
- boolean update = false;
- if (oldAttr != null && oldAttr.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) oldAttr).getName().equals(ICSSImportRule.HREF)) {
- update = true;
- }
- if (newAttr != null && newAttr.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) newAttr).getName().equals(ICSSImportRule.HREF)) {
- update = true;
- }
- if (update)
- ((ICSSImportRule) parentNode).getStyleSheet();
- }
- }
-
- /**
- *
- */
- public void beginRecording(Object requester, String label, String description) {
- getStyleNotifier().beginRecording();
-
- Node node = getOwnerDOMNode();
- if (node != null && node instanceof XMLNode) {
- IStructuredModel model = ((XMLNode) node).getModel();
- if (model != null) {
- model.beginRecording(requester, label, description);
- return;
- }
- }
- super.beginRecording(requester, label, description);
- }
-
- /**
- * @param parentNode
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param newChild
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param oldChild
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- */
- void childReplaced(CSSNodeImpl parentNode, CSSNodeImpl newChild, CSSNodeImpl oldChild) {
- if (!fStructuredDocumentUpdate) {
- CSSModelUpdater updater = getUpdater();
- updater.childReplaced(parentNode, newChild, oldChild);
- }
-
- // always check and send selector event
- ICSSSelector removed[] = null, added[] = null;
- if (parentNode.getNodeType() == ICSSNode.STYLESHEET_NODE || parentNode.getNodeType() == ICSSNode.MEDIARULE_NODE) {
- // collect old selectors
- SelectorsCollector selTrav = new SelectorsCollector();
- selTrav.apply(oldChild);
- int nSel = selTrav.getSelectors().size();
- if (nSel > 0) {
- removed = new ICSSSelector[nSel];
- for (int i = 0; i < nSel; i++)
- removed[i] = (ICSSSelector) selTrav.getSelectors().get(i);
- }
- // collect new selectors
- selTrav = new SelectorsCollector();
- selTrav.apply(newChild);
- nSel = selTrav.getSelectors().size();
- if (nSel > 0) {
- added = new ICSSSelector[nSel];
- for (int i = 0; i < nSel; i++)
- added[i] = (ICSSSelector) selTrav.getSelectors().get(i);
- }
- }
- else {
- // modification
- ICSSNode rule = parentNode;
- while (rule != null) {
- if (rule instanceof ICSSStyleRule)
- break;
- rule = rule.getParentNode();
- }
- if (rule != null) {
- ICSSSelectorList list = ((ICSSStyleRule) rule).getSelectors();
- added = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- added[i] = list.getSelector(i);
- }
- }
- if (removed != null || added != null || getDocument().getNodeType() == ICSSNode.STYLEDECLARATION_NODE) {
- // send selector changed event
- getStyleNotifier().fire(removed, added, null);
- }
- // close removed import-rule's external style sheets
- {
- ImportRuleCollector trav = new ImportRuleCollector();
- trav.apply(oldChild);
- Iterator it = trav.getRules().iterator();
- while (it.hasNext()) {
- ((CSSImportRuleImpl) it.next()).closeStyleSheet();
- }
- }
- // send events to listener for new import-rules
- if (getStyleListeners() != null && getStyleListeners().size() > 0) {
- ImportedCollector trav = new ImportedCollector();
- trav.apply(newChild);
- }
- }
-
- /**
- *
- */
- private void closeImported() {
- if (!isShared()) {
- // release listeners
- if (getStyleListeners() != null) {
- Vector toRemove = new Vector(getStyleListeners());
- Iterator it = toRemove.iterator();
- while (it.hasNext()) {
- removeStyleListener((ICSSStyleListener) it.next());
- }
- }
- // close import rules
- ImportRuleCollector trav = new ImportRuleCollector();
- trav.apply(getDocument());
- Iterator it2 = trav.getRules().iterator();
- while (it2.hasNext()) {
- ((CSSImportRuleImpl) it2.next()).releaseRule();
- }
- }
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSDocumentImpl
- */
- private CSSDocumentImpl createDocument() {
- CSSDocumentImpl doc = null;
- int parserMode = CSSSourceParser.MODE_STYLESHEET;
- if (ownerNode == null) {
- // this case is external CSS file
- doc = (CSSStyleSheetImpl) DOMCSSImpl.createCSSStyleSheet(null, null); // parameters
- // are
- // for
- // STYLE-tag
- parserMode = CSSSourceParser.MODE_STYLESHEET;
- }
- else if (ownerNode instanceof org.w3c.dom.Element && ((Element) ownerNode).getTagName().toUpperCase().equals("STYLE")) {//$NON-NLS-1$
- // this case is STYLE-tag
- Element style = (Element) ownerNode;
- doc = (CSSStyleSheetImpl) DOMCSSImpl.createCSSStyleSheet(style.getAttribute("TITLE"), //$NON-NLS-1$
- style.getAttribute("MEDIA"));//$NON-NLS-1$
- parserMode = CSSSourceParser.MODE_STYLESHEET;
- }
- else if (ownerNode instanceof org.w3c.dom.Element || ownerNode instanceof org.w3c.dom.Attr) {
- // Inline attributes
- doc = (CSSStyleDeclarationImpl) DOMCSSImpl.createCSSStyleDeclaration();
- parserMode = CSSSourceParser.MODE_DECLARATION;
- }
- RegionParser regionParser = getStructuredDocument().getParser();
- if (regionParser instanceof CSSSourceParser) {
- ((CSSSourceParser) regionParser).setParserMode(parserMode);
- }
- return doc;
- }
-
- /**
- *
- */
- public void endRecording(Object requester) {
- Node node = getOwnerDOMNode();
- if (node != null && node instanceof XMLNode) {
- IStructuredModel model = ((XMLNode) node).getModel();
- if (model != null) {
- model.endRecording(requester);
- return;
- }
- }
- super.endRecording(requester);
-
- getStyleNotifier().endRecording();
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSDocument
- */
- public ICSSDocument getDocument() {
- if (document == null) {
- this.document = createDocument();
- this.document.setModel(this);
- }
- return this.document;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.IStructuredDocument
- */
- public IStructuredDocument getStructuredDocument() {
- IStructuredDocument structuredDocument = super.getStructuredDocument();
- if (structuredDocument != null)
- return structuredDocument;
-
- // the first time
- Assert.isNotNull(getModelHandler());
- structuredDocument = (IStructuredDocument) getModelHandler().getDocumentLoader().createNewStructuredDocument();
- // structuredDocument = new
- // com.ibm.sed.structuredDocument.impl.IStructuredDocument(IStructuredModel.CSS);
- // CSSStructuredDocumentReParser reParser = new
- // CSSStructuredDocumentReParser();
- // reParser.setStructuredDocument(structuredDocument);
- // ((com.ibm.sed.structuredDocument.impl.IStructuredDocument)structuredDocument).setReParser(reParser);
-
- setStructuredDocument(structuredDocument);
-
- return structuredDocument;
- }
-
- /**
- * getNode method comment.
- */
- public IndexedRegion getIndexedRegion(int offset) {
- if (getDocument() == null)
- return null;
- return ((CSSStructuredDocumentRegionContainer) getDocument()).getContainerNode(offset);
- }
-
- /**
- * @return org.w3c.dom.Node
- */
- public Node getOwnerDOMNode() {
- return ownerNode;
- }
-
- /**
- * @param ownerNode
- * org.w3c.dom.Node if the case of external CSS model, you
- * should set null, else if internal css, you should set
- * STYLE-tag node, else if inline css, you should set the
- * element that is the owner of style-attribute.
- */
- public void setOwnerDOMNode(Node node) {
- // prohibit owner change
- Assert.isTrue(ownerNode == null);
- ownerNode = node;
- if (ownerNode != null) { // for internal/inline CSS context
- try {
- setId(ID_NON_EXTERNAL_CSS);
- }
- catch (ResourceInUse e) {
- // impossible
- }
- }
- }
-
- /**
- *
- */
- private CSSModelParser getParser() {
- if (fParser == null) {
- if (getDocument() != null) {
- fParser = new CSSModelParser(document);
- }
- }
- return fParser;
- }
-
- /**
- * @return java.util.List
- */
- public List getStyleListeners() {
- return getStyleNotifier().getStyleListeners();
- }
-
- /**
- *
- * @return java.lang.Object
- */
- public java.lang.Object getStyleSheetType() {
- if (getDocument() instanceof ICSSStyleDeclaration)
- return INLINE;
- if (getOwnerDOMNode() != null)
- return EMBEDDED;
- else
- return EXTERNAL;
- }
-
- private CSSStyleNotifyAdapter getStyleNotifier() {
- if (styleNotifier == null) {
- styleNotifier = (ownerNode != null) ? new CSSEmbededStyleNotifyAdapter(this) : new CSSStyleNotifyAdapter(this);
- }
- return styleNotifier;
- }
-
- /**
- *
- */
- private CSSModelUpdater getUpdater() {
- if (fUpdater == null) {
- fUpdater = new CSSModelUpdater(this);
- fUpdater.setParser(getParser());
- }
- return fUpdater;
- }
-
- /**
- */
- public boolean isRecording() {
- return getStyleNotifier().isRecording();
- }
-
- /**
- * This function returns true if there are other references to the
- * underlying model.
- */
- public boolean isShared() {
- return (getStyleSheetType() == EXTERNAL) && super.isShared();
- }
-
- /**
- * @param structuredDocumentEvent
- * com.ibm.sed.structuredDocument.events.NewModelEvent
- */
- public void newModel(NewDocumentEvent structuredDocumentEvent) {
- if (structuredDocumentEvent == null)
- return;
- IStructuredDocument structuredDocument = structuredDocumentEvent.getStructuredDocument();
- if (structuredDocument == null)
- return;
- // this should not happen, but for the case
- if (structuredDocument != getStructuredDocument())
- setStructuredDocument(structuredDocument);
- IStructuredDocumentRegionList flatNodes = structuredDocument.getRegionList();
- if (flatNodes == null)
- return;
- if (getDocument() == null)
- return;
-
- fStructuredDocumentUpdate = true;
-
- ((CSSStructuredDocumentRegionContainer) getDocument()).removeChildNodes();
-
- CSSModelParser parser = getParser();
- parser.setStructuredDocumentEvent(structuredDocumentEvent);
- parser.replaceStructuredDocumentRegions(flatNodes, null);
-
- fStructuredDocumentUpdate = false;
- }
-
- /**
- * noChange method comment.
- */
- public void noChange(NoChangeEvent structuredDocumentEvent) {
- // nop
- }
-
- /**
- * @param structuredDocumentEvent
- * com.ibm.sed.structuredDocument.events.StructuredDocumentRegionsReplacedEvent
- */
- public void nodesReplaced(StructuredDocumentRegionsReplacedEvent structuredDocumentEvent) {
- if (structuredDocumentEvent == null) {
- return;
- }
- IStructuredDocumentRegionList oldStructuredDocumentRegions = structuredDocumentEvent.getOldStructuredDocumentRegions();
- IStructuredDocumentRegionList newStructuredDocumentRegions = structuredDocumentEvent.getNewStructuredDocumentRegions();
- if (oldStructuredDocumentRegions == null && newStructuredDocumentRegions == null) {
- return;
- }
-
- fStructuredDocumentUpdate = true;
-
- CSSModelParser parser = getParser();
- parser.setStructuredDocumentEvent(structuredDocumentEvent);
- parser.replaceStructuredDocumentRegions(newStructuredDocumentRegions, oldStructuredDocumentRegions);
-
- fStructuredDocumentUpdate = false;
- }
-
- /**
- * cleanup -> rebuild CSS Nodes This is pre-beta fix for 178176.
- */
- public void refreshNodes() {
- // cleanup old nodes
- fStructuredDocumentUpdate = true;
- ((CSSStructuredDocumentRegionContainer) getDocument()).removeChildNodes();
- fStructuredDocumentUpdate = false;
-
- getParser().cleanupUpdateContext();
-
- IStructuredDocument structuredDocument = getStructuredDocument();
- String source = structuredDocument.getText();
-
- structuredDocument.replaceText(this, 0, source.length(), null);
- structuredDocument.replaceText(this, 0, 0, source);
- }
-
- /**
- * @param structuredDocumentEvent
- * com.ibm.sed.structuredDocument.events.RegionChangedEvent
- */
- public void regionChanged(RegionChangedEvent structuredDocumentEvent) {
- if (structuredDocumentEvent == null) {
- return;
- }
- IStructuredDocumentRegion flatNode = structuredDocumentEvent.getStructuredDocumentRegion();
- if (flatNode == null) {
- return;
- }
- ITextRegion region = structuredDocumentEvent.getRegion();
- if (region == null) {
- return;
- }
-
- fStructuredDocumentUpdate = true;
-
- CSSModelParser parser = getParser();
- parser.setStructuredDocumentEvent(structuredDocumentEvent);
- parser.changeRegion(flatNode, region);
-
- fStructuredDocumentUpdate = false;
- }
-
- /**
- * @param structuredDocumentEvent
- * com.ibm.sed.structuredDocument.events.RegionsReplacedEvent
- */
- public void regionsReplaced(RegionsReplacedEvent structuredDocumentEvent) {
- if (structuredDocumentEvent == null)
- return;
- IStructuredDocumentRegion flatNode = structuredDocumentEvent.getStructuredDocumentRegion();
- if (flatNode == null)
- return;
- ITextRegionList oldRegions = structuredDocumentEvent.getOldRegions();
- ITextRegionList newRegions = structuredDocumentEvent.getNewRegions();
- if (oldRegions == null && newRegions == null)
- return;
-
- fStructuredDocumentUpdate = true;
-
- CSSModelParser parser = getParser();
- parser.setStructuredDocumentEvent(structuredDocumentEvent);
- parser.replaceRegions(flatNode, newRegions, oldRegions);
-
- fStructuredDocumentUpdate = false;
-
- }
-
- /**
- *
- */
- public void releaseFromEdit() {
- closeImported();
- if (getStyleSheetType() == EXTERNAL) {
- super.releaseFromEdit();
- }
- }
-
- /**
- *
- */
- public void releaseFromRead() {
- closeImported();
- if (getStyleSheetType() == EXTERNAL) {
- super.releaseFromRead();
- }
- }
-
- /**
- * @param listener
- * org.eclipse.wst.css.core.event.CSSStyleListener
- */
- public void removeStyleListener(ICSSStyleListener listener) {
- getStyleNotifier().removeStyleListener(listener);
- }
-
- /**
- * @param newStructuredDocument
- * com.ibm.sed.structuredDocument.IStructuredDocument
- */
- public void setStructuredDocument(IStructuredDocument newStructuredDocument) {
- IStructuredDocument oldStructuredDocument = super.getStructuredDocument();
- if (newStructuredDocument == oldStructuredDocument)
- return; // noting to do
-
- if (oldStructuredDocument != null)
- oldStructuredDocument.removeDocumentChangingListener(this);
- super.setStructuredDocument(newStructuredDocument);
- if (newStructuredDocument.getLength() > 0) {
- newModel(new NewDocumentEvent(newStructuredDocument, this));
- }
- if (newStructuredDocument != null)
- newStructuredDocument.addDocumentChangingListener(this);
- }
-
- /**
- * @param srcModel
- * com.imb.sed.css.mode.intefaces.ICSSModel
- * @param removed
- * org.eclipse.wst.css.core.model.interfaces.ICSSSelector[]
- * @param added
- * org.eclipse.wst.css.core.model.interfaces.ICSSSelector[]
- */
- public void styleChanged(ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media) {
- getStyleNotifier().styleChanged(srcModel, removed, added, media);
- }
-
- /**
- * @param srcModel
- * org.eclipse.wst.css.core.model.interfaces.ICSSModel
- */
- public void styleUpdate(ICSSModel srcModel) {
- getStyleNotifier().styleUpdate(srcModel);
- }
-
- /**
- * @param node
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- */
- void valueChanged(CSSNodeImpl node, String oldValue) {
- if (!fStructuredDocumentUpdate) {
- CSSModelUpdater updater = getUpdater();
- updater.valueChanged(node, oldValue);
- }
-
- ICSSSelector removed[] = null, added[] = null;
- if (node != null) {
- if (node.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) node).getName().equals(ICSSStyleRule.SELECTOR)) {
- CSSAttrImpl attr = (CSSAttrImpl) node;
- // collect changed selector
- ICSSSelectorList list = new CSSSelectorListImpl(attr.getValue());
- added = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- added[i] = list.getSelector(i);
-
- // get old value
- list = new CSSSelectorListImpl(oldValue);
- removed = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- removed[i] = list.getSelector(i);
- }
- else if (node instanceof ICSSValue) {
- ICSSNode rule = node;
- while (rule != null) {
- if (rule instanceof ICSSStyleRule)
- break;
- rule = rule.getParentNode();
- }
- if (rule != null) {
- ICSSSelectorList list = ((ICSSStyleRule) rule).getSelectors();
- added = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- added[i] = list.getSelector(i);
- }
- }
- }
- if (removed != null || added != null || getDocument().getNodeType() == ICSSNode.STYLEDECLARATION_NODE) {
- // send selector changed event
- getStyleNotifier().fire(removed, added, null);
- }
- // for href attribute
- if (getStyleListeners() != null && getStyleListeners().size() > 0) {
- if (node != null && node.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) node).getName().equals(ICSSImportRule.HREF)) {
- ((ICSSImportRule) ((ICSSAttr) node).getOwnerCSSNode()).getStyleSheet();
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelNodeFeeder.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelNodeFeeder.java
deleted file mode 100644
index 0f50a99cfc..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelNodeFeeder.java
+++ /dev/null
@@ -1,122 +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.css.core.internal.document;
-
-
-
-/**
- *
- */
-class CSSModelNodeFeeder {
-
- CSSDocumentImpl fDocument = null;
- CSSModelUpdateContext fUpdateContext = null;
-
- /**
- * CSSModelNodeFeeder constructor comment.
- */
- CSSModelNodeFeeder() {
- super();
- }
-
- /**
- * CSSModelNodeFeeder constructor comment.
- */
- CSSModelNodeFeeder(CSSDocumentImpl document, CSSModelUpdateContext updateContext) {
- super();
- fDocument = document;
- fUpdateContext = updateContext;
- }
-
- /**
- *
- */
- CSSCharsetRuleImpl getCSSCharsetRule() {
- CSSCharsetRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSCharsetRule();
- }
- else {
- node = (CSSCharsetRuleImpl) fDocument.createCSSCharsetRule();
- }
- return node;
- }
-
- /**
- *
- */
- CSSFontFaceRuleImpl getCSSFontFaceRule() {
- CSSFontFaceRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSFontFaceRule();
- }
- else {
- node = (CSSFontFaceRuleImpl) fDocument.createCSSFontFaceRule();
- }
- return node;
- }
-
- /**
- *
- */
- CSSImportRuleImpl getCSSImportRule() {
- CSSImportRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSImportRule();
- }
- else {
- node = (CSSImportRuleImpl) fDocument.createCSSImportRule();
- }
- return node;
- }
-
- /**
- *
- */
- CSSMediaRuleImpl getCSSMediaRule() {
- CSSMediaRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSMediaRule();
- }
- else {
- node = (CSSMediaRuleImpl) fDocument.createCSSMediaRule();
- }
- return node;
- }
-
- /**
- *
- */
- CSSPageRuleImpl getCSSPageRule() {
- CSSPageRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSPageRule();
- }
- else {
- node = (CSSPageRuleImpl) fDocument.createCSSPageRule();
- }
- return node;
- }
-
- /**
- *
- */
- CSSStyleRuleImpl getCSSStyleRule() {
- CSSStyleRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSStyleRule();
- }
- else {
- node = (CSSStyleRuleImpl) fDocument.createCSSStyleRule();
- }
- return node;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelParser.java
deleted file mode 100644
index c860c508a6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelParser.java
+++ /dev/null
@@ -1,1281 +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.css.core.internal.document;
-
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPageRule;
-import org.eclipse.wst.css.core.document.ICSSRuleContainer;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.internal.text.StructuredDocumentWalker;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.sse.core.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.text.CoreNodeList;
-import org.eclipse.wst.sse.core.internal.text.TextRegionListImpl;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.core.util.Assert;
-import org.w3c.dom.css.CSSFontFaceRule;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-
-/**
- *
- */
-class CSSModelParser {
-
- private CSSDocumentImpl fDocument = null;
- private CSSModelCreationContext fCreationContext = null;
- private CSSModelDeletionContext fDeletionContext = null;
- private CSSModelUpdateContext fUpdateContext = null;
- private CSSModelNodeFeeder fFeeder = null;
- private StructuredDocumentWalker fStructuredDocumentWalker = null;
- private boolean fParseFloating = false;
-
- /**
- * CSSModelParser constructor comment.
- */
- private CSSModelParser() {
- super();
- }
-
- /**
- *
- */
- CSSModelParser(CSSDocumentImpl doc) {
- super();
- fDocument = doc;
- fCreationContext = new CSSModelCreationContext(doc);
- fDeletionContext = new CSSModelDeletionContext(doc);
- fUpdateContext = new CSSModelUpdateContext();
- fFeeder = new CSSModelNodeFeeder(doc, fUpdateContext);
- }
-
- /**
- *
- */
- void changeStructuredDocumentRegion(IStructuredDocumentRegion flatNode) {
- replaceStructuredDocumentRegions(new CoreNodeList(flatNode, flatNode), new CoreNodeList(flatNode, flatNode));
- }
-
- /**
- *
- */
- void changeRegion(IStructuredDocumentRegion flatNode, ITextRegion region) {
- if (flatNode == null || region == null) {
- return;
- }
- if (fDocument == null) {
- return;
- }
-
- changeStructuredDocumentRegion(flatNode);
- }
-
- /**
- *
- */
- private void checkNextNode(IStructuredDocumentRegion flatNode, String type) {
- IStructuredDocumentRegion next = CSSUtil.findNextSignificantNode(flatNode);
- if (CSSUtil.getStructuredDocumentRegionType(next) == type) {
- fCreationContext.setReparseStart(flatNode.getEnd());
- fCreationContext.setReparseEnd(next.getEnd());
- }
- }
-
- /**
- *
- */
- private void cleanupDeletionContext() {
- // setupDeletionContext(null);
- }
-
- /**
- *
- */
- boolean cleanupFirstNode(IStructuredDocumentRegion firstNode, CSSStructuredDocumentRegionContainer target) {
- if (firstNode == null || target == null) {
- return false;
- }
-
- if (firstNode == target.getFirstStructuredDocumentRegion()) {
- IStructuredDocumentRegion nextNode = fStructuredDocumentWalker.getNextNodeInCurrent(firstNode);
- IStructuredDocumentRegion lastNode = target.getLastStructuredDocumentRegion();
- if (lastNode == null || fStructuredDocumentWalker.isOldNode(lastNode) || nextNode == null || lastNode.getStartOffset() < nextNode.getStartOffset()) {
- target.setRangeStructuredDocumentRegion(null, null);
- }
- else {
- target.setFirstStructuredDocumentRegion(nextNode);
- }
- ICSSNode parent = target.getParentNode();
- if (parent instanceof CSSStructuredDocumentRegionContainer) {
- cleanupFirstNode(firstNode, (CSSStructuredDocumentRegionContainer) parent);
- return true;
- }
- }
-
- return false;
- }
-
- /**
- *
- */
- boolean cleanupLastNode(IStructuredDocumentRegion lastNode, CSSStructuredDocumentRegionContainer target) {
- if (lastNode == null || target == null) {
- return false;
- }
-
- if (lastNode == target.getLastStructuredDocumentRegion()) {
- IStructuredDocumentRegion prevNode = fStructuredDocumentWalker.getPrevNodeInCurrent(lastNode);
- IStructuredDocumentRegion firstNode = target.getFirstStructuredDocumentRegion();
- if (firstNode == null || fStructuredDocumentWalker.isOldNode(firstNode) || prevNode == null || prevNode.getStartOffset() < firstNode.getStartOffset()) {
- target.setRangeStructuredDocumentRegion(null, null);
- }
- else {
- target.setLastStructuredDocumentRegion(prevNode);
- }
- ICSSNode parent = target.getParentNode();
- if (parent instanceof CSSStructuredDocumentRegionContainer) {
- cleanupLastNode(lastNode, (CSSStructuredDocumentRegionContainer) parent);
- return true;
- }
- }
-
- return false;
- }
-
- /**
- *
- */
- int cleanupUpdateContext() {
- int remains = fUpdateContext.getNodeCount();
- fUpdateContext.cleanupContext();
- return remains;
- }
-
- /**
- * create floating CSS rule (owner document will be set) this is for
- * CSSStyleSheet.createCSSRule(String)
- *
- * @return org.w3c.dom.css.CSSRule
- * @param flatNodes
- * com.ibm.sed.structuredDocument.IStructuredDocumentRegionList
- */
- CSSRule createCSSRule(IStructuredDocumentRegionList flatNodes) {
- if (flatNodes == null) {
- return null;
- }
-
- fParseFloating = true;
-
- // setup creation context
- fCreationContext.clear();
- fCreationContext.setTargetNode(null);
- fCreationContext.setNextNode(null);
- CSSRuleImpl parentRule = null;
-
- for (Enumeration e = flatNodes.elements(); e.hasMoreElements();) {
- IStructuredDocumentRegion flatNode = (IStructuredDocumentRegion) e.nextElement();
- if (flatNode == null) {
- continue;
- }
- CSSNodeImpl modified = insertStructuredDocumentRegion(flatNode);
- if (parentRule == null && modified instanceof CSSRuleImpl) {
- parentRule = (CSSRuleImpl) modified;
- }
- }
-
- fParseFloating = false;
-
- if (parentRule != null) {
- CSSModelUtil.cleanupContainer(parentRule);
- }
-
- return parentRule;
- }
-
- /**
- *
- */
- private IStructuredDocumentRegion findBraceClose(int depth, IStructuredDocumentRegion start, boolean bBreakSibling) {
- IStructuredDocumentRegion result = null;
- int braceLevel = 0;
- IStructuredDocumentRegion prevNode = null;
- IStructuredDocumentRegion region = start.getNext();
- for (; region != null; region = region.getNext()) {
- int offset = region.getStart();
- if (offset < 0) {
- Assert.isTrue(false);
- break;
- }
- CSSNodeImpl node = getNodeAt(offset);
- int depthHit = (node != null) ? CSSModelUtil.getDepth(node) : -1;
- if (depth <= depthHit) {
- // sibling is found before "}"
- if (bBreakSibling) {
- CSSNodeImpl parent = (CSSNodeImpl) node.getParentNode();
- while (depth <= CSSModelUtil.getDepth(parent)) {
- node = parent;
- parent = (CSSNodeImpl) parent.getParentNode();
- }
- if (parent != null && node != null) {
- parent.removeChild(node);
- }
- }
- else {
- result = prevNode;
- break;
- }
- }
- String type = CSSUtil.getStructuredDocumentRegionType(region);
- if (type == CSSRegionContexts.CSS_LBRACE) {
- braceLevel++;
- }
- if (type == CSSRegionContexts.CSS_RBRACE) {
- braceLevel--;
- if (braceLevel < 0) {
- result = region;
- break;
- }
- }
- prevNode = region;
- }
-
- if (result == null && region == null) {
- // reach the end of document
- result = prevNode;
- }
-
- return result;
- }
-
- /**
- *
- */
- private IStructuredDocumentRegionList getStructuredDocumentRegionList(int start, int end) {
- IStructuredDocumentRegionList nodeList = null;
- if (0 <= start && start <= end) {
- ICSSModel model = fDocument.getModel();
- if (model instanceof CSSModelImpl) {
- IStructuredDocument structuredDocument = ((CSSModelImpl) model).getStructuredDocument();
- if (structuredDocument != null) {
- IStructuredDocumentRegion startNode = structuredDocument.getRegionAtCharacterOffset(start);
- IStructuredDocumentRegion endNode = structuredDocument.getRegionAtCharacterOffset(end - 1);
- if (startNode != null && endNode != null) {
- nodeList = new CoreNodeList(startNode, endNode);
- }
- }
- }
- }
-
- return nodeList;
- }
-
- /**
- *
- */
- private CSSNodeImpl getNodeAt(int offset) {
- CSSNodeImpl rootNode = fCreationContext.getRootNode();
- ICSSNode target = rootNode.getNodeAt(offset);
- if (target instanceof CSSNodeImpl) {
- return (CSSNodeImpl) target;
- }
- else {
- return null;
- }
- }
-
- /**
- *
- */
- private CSSNodeImpl insertBraceClose(IStructuredDocumentRegion region) {
- ICSSNode target = CSSModelUtil.findBraceContainer(fCreationContext.getTargetNode());
-
- if (!(target instanceof CSSStructuredDocumentRegionContainer)) {
- return null;
- }
-
- CSSStructuredDocumentRegionContainer parent = (CSSStructuredDocumentRegionContainer) target;
- if (CSSModelUtil.isInterruption(parent, region)) {
- ICSSNode node = parent.getParentNode();
- if (node instanceof CSSNodeImpl) {
- fCreationContext.setReparseStart(parent.getStartOffset());
- fCreationContext.setReparseEnd(parent.getEndOffset());
- ((CSSNodeImpl) node).removeChild(parent);
- }
- return null;
- }
-
- if (parent instanceof ICSSPageRule || parent instanceof ICSSMediaRule || parent instanceof CSSFontFaceRule || parent instanceof ICSSStyleRule) {
- CSSModelUtil.expandStructuredDocumentRegionContainer(parent, region);
- if (!CSSModelUtil.isBraceClosed(target)) {
- fCreationContext.setTargetNode(parent.getParentNode());
- fCreationContext.setNextNode(parent.getNextSibling());
- return parent;
- }
- }
-
- return null;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertBraceOpen(IStructuredDocumentRegion region) {
- IStructuredDocumentRegion keyRegion = CSSUtil.findPreviousSignificantNode(region);
- if (keyRegion == null) {
- return null;
- }
- if (!fParseFloating) {
- CSSNodeImpl node = getNodeAt(keyRegion.getStartOffset());
- if (node != null && !(node instanceof ICSSRuleContainer)) {
- return null;
- }
- }
- String type = CSSUtil.getStructuredDocumentRegionType(keyRegion);
-
- CSSNodeImpl inserted = null;
- if (type == CSSRegionContexts.CSS_PAGE) {
- inserted = insertPageRule(keyRegion, region);
- }
- else if (type == CSSRegionContexts.CSS_MEDIA) {
- inserted = insertMediaRule(keyRegion, region);
- }
- else if (type == CSSRegionContexts.CSS_FONT_FACE) {
- inserted = insertFontFaceRule(keyRegion, region);
- }
- else if (CSSUtil.isSelectorText(keyRegion)) {
- inserted = insertStyleRule(keyRegion, region);
- }
-
- if (inserted instanceof CSSStructuredDocumentRegionContainer) {
- // CSSModelUtil.expandStructuredDocumentRegionContainer((CSSStructuredDocumentRegionContainer)inserted,
- // flatNode);
- IStructuredDocumentRegion braceClose = findBraceClose(CSSModelUtil.getDepth(inserted), region, (type == CSSRegionContexts.CSS_MEDIA));
- if (braceClose != null) {
- fCreationContext.setReparseStart(region.getEnd());
- fCreationContext.setReparseEnd(braceClose.getEnd());
- }
- }
-
- return inserted;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertCharsetRule(IStructuredDocumentRegion beginDocRegion, IStructuredDocumentRegion endDocRegion) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- ITextRegionList regions = new TextRegionListImpl(beginDocRegion.getRegions());
- regions.remove(0); // must be "@charset"
- ITextRegion encodingRegion = null;
- while (!regions.isEmpty()) {
- ITextRegion textRegion = regions.remove(0);
- if (textRegion == null) {
- continue;
- }
- String type = textRegion.getType();
- if (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT) {
- continue;
- }
- if (type == CSSRegionContexts.CSS_STRING) {
- encodingRegion = textRegion;
- break;
- }
- else {
- break;
- }
- }
- if (encodingRegion == null) {
- return null;
- }
-
- CSSCharsetRuleImpl rule = fFeeder.getCSSCharsetRule();
- if (rule == null) {
- return null;
- }
-
- if (!fUpdateContext.isActive()) {
- rule.setAttribute(ICSSCharsetRule.ENCODING, beginDocRegion.getText(encodingRegion));
- }
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(beginDocRegion, endDocRegion);
- CSSAttrImpl attr = rule.getAttributeNode(ICSSCharsetRule.ENCODING);
- if (attr != null) {
- attr.setRangeRegion(beginDocRegion, encodingRegion, encodingRegion);
- }
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- return rule;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertStructuredDocumentRegion(IStructuredDocumentRegion region) {
- if (fCreationContext == null || region == null) {
- return null;
- }
-
- String type = ((BasicStructuredDocumentRegion) region).getType();
- CSSNodeImpl modified = null;
-
- ICSSNode target = fCreationContext.getTargetNode();
-
- if ((fParseFloating && target == null) || target instanceof ICSSRuleContainer) {
- if (type == CSSRegionContexts.CSS_DELIMITER) {
- modified = insertSemiColonForRule(region);
- }
- else if (type == CSSRegionContexts.CSS_LBRACE) {
- modified = insertBraceOpen(region);
- }
- else if (type == CSSRegionContexts.CSS_RBRACE) {
- modified = insertBraceClose(region);
- }
- else if (type == CSSRegionContexts.CSS_MEDIA || type == CSSRegionContexts.CSS_PAGE || type == CSSRegionContexts.CSS_FONT_FACE || CSSUtil.isSelectorText(region)) {
- checkNextNode(region, CSSRegionContexts.CSS_LBRACE);
- }
- else if (type == CSSRegionContexts.CSS_IMPORT || type == CSSRegionContexts.CSS_CHARSET) {
- checkNextNode(region, CSSRegionContexts.CSS_DELIMITER);
- }
- }
- else if ((target instanceof CSSRuleDeclContainer || target instanceof CSSStyleDeclaration) && type == CSSRegionContexts.CSS_DECLARATION_PROPERTY) {
- modified = insertStyleDeclarationItem(region);
- }
- else if (target instanceof ICSSStyleDeclItem && type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- modified = insertSemiColonForStyleDeclarationItem(region);
- }
- else if (type == CSSRegionContexts.CSS_RBRACE) {
- modified = insertBraceClose(region);
- }
-
- // post process
- if (modified != null) {
- if (modified instanceof CSSStructuredDocumentRegionContainer) {
- ((CSSStructuredDocumentRegionContainer) modified).propagateRangeStructuredDocumentRegion();
- }
- }
-
- return modified;
- }
-
- /**
- *
- */
- private void insertStructuredDocumentRegions(IStructuredDocumentRegionList regionList) {
- for (Enumeration e = regionList.elements(); e.hasMoreElements();) {
- IStructuredDocumentRegion region = (IStructuredDocumentRegion) e.nextElement();
- if (region == null) {
- continue;
- }
- insertStructuredDocumentRegion(region);
- if (fCreationContext.isToReparse()) {
- int origStart = region.getEnd();
- int origEnd = regionList.item(regionList.getLength() - 1).getEnd();
- int newStart = fCreationContext.getReparseStart();
- int newEnd = fCreationContext.getReparseEnd();
- if (newStart < origStart || origEnd < newEnd) {
- IStructuredDocumentRegionList newNodeList = getStructuredDocumentRegionList(newStart, newEnd);
- setupCreationContext(newNodeList.item(0));
- insertStructuredDocumentRegions(newNodeList);
- return;
- }
- else {
- fCreationContext.resetReparseRange();
- }
- }
- }
- }
-
- /**
- *
- */
- private CSSNodeImpl insertFontFaceRule(IStructuredDocumentRegion region, IStructuredDocumentRegion braceNode) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- CSSFontFaceRuleImpl rule = fFeeder.getCSSFontFaceRule();
- if (rule == null) {
- return null;
- }
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(region, braceNode);
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- fCreationContext.setTargetNode(rule);
- // TargetNext is set to null automatically
-
- return rule;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertImportRule(IStructuredDocumentRegion beginDocRegion, IStructuredDocumentRegion endDocRegion) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- ITextRegionList regions = new TextRegionListImpl(beginDocRegion.getRegions());
- regions.remove(0); // must be "@import"
- ITextRegion hrefRegion = null;
- while (!regions.isEmpty()) {
- ITextRegion textRegion = regions.remove(0);
- if (textRegion == null) {
- continue;
- }
- String type = textRegion.getType();
- if (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT) {
- continue;
- }
- if (type == CSSRegionContexts.CSS_URI || type == CSSRegionContexts.CSS_STRING) {
- hrefRegion = textRegion;
- break;
- }
- else {
- break;
- }
- }
- if (hrefRegion == null) {
- return null;
- }
-
- CSSImportRuleImpl rule = fFeeder.getCSSImportRule();
- if (rule == null) {
- return null;
- }
-
- CSSUtil.stripSurroundingSpace(regions);
- MediaListImpl mediaList = (MediaListImpl) rule.getMedia();
- setMediaList(mediaList, beginDocRegion, regions);
-
- if (!fUpdateContext.isActive()) {
- rule.setAttribute(ICSSImportRule.HREF, beginDocRegion.getText(hrefRegion));
- }
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(beginDocRegion, endDocRegion);
- CSSAttrImpl attr = rule.getAttributeNode(ICSSImportRule.HREF);
- if (attr != null) {
- attr.setRangeRegion(beginDocRegion, hrefRegion, hrefRegion);
- }
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- return rule;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertMediaRule(IStructuredDocumentRegion flatNode, IStructuredDocumentRegion braceNode) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- CSSMediaRuleImpl rule = fFeeder.getCSSMediaRule();
- if (rule == null) {
- return null;
- }
-
- ITextRegionList regions = new TextRegionListImpl(flatNode.getRegions());
- regions.remove(0); // must be "@media"
-
- CSSUtil.stripSurroundingSpace(regions);
- MediaListImpl mediaList = (MediaListImpl) rule.getMedia();
- setMediaList(mediaList, flatNode, regions);
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(flatNode, braceNode);
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- fCreationContext.setTargetNode(rule);
- // TargetNext is set to null automatically
-
- return rule;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertPageRule(IStructuredDocumentRegion flatNode, IStructuredDocumentRegion braceNode) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- // get selector regions
- ITextRegionList selectorRegions = new TextRegionListImpl(flatNode.getRegions());
- selectorRegions.remove(0); // must be "@page"
- CSSUtil.stripSurroundingSpace(selectorRegions);
-
- CSSPageRuleImpl rule = fFeeder.getCSSPageRule();
- if (rule == null) {
- return null;
- }
-
- if (!fUpdateContext.isActive()) {
- String selectorStr = CSSUtil.getRegionText(flatNode, selectorRegions);
- if (0 < selectorStr.length()) {
- rule.setSelectorText(selectorStr);
- }
- }
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(flatNode, braceNode);
- CSSAttrImpl attr = rule.getAttributeNode(ICSSPageRule.SELECTOR);
- if (attr != null && selectorRegions != null && !selectorRegions.isEmpty()) {
- attr.setRangeRegion(flatNode, selectorRegions.get(0), selectorRegions.get(selectorRegions.size() - 1));
- }
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- fCreationContext.setTargetNode(rule);
- // TargetNext is set to null automatically
-
- return rule;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertSemiColonForRule(IStructuredDocumentRegion region) {
- IStructuredDocumentRegion keyRegion = CSSUtil.findPreviousSignificantNode(region);
- String type = CSSUtil.getStructuredDocumentRegionType(keyRegion);
-
- CSSNodeImpl inserted = null;
- if (type == CSSRegionContexts.CSS_IMPORT) {
- inserted = insertImportRule(keyRegion, region);
- }
- else if (type == CSSRegionContexts.CSS_CHARSET) {
- inserted = insertCharsetRule(keyRegion, region);
- }
-
- return inserted;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertSemiColonForStyleDeclarationItem(IStructuredDocumentRegion region) {
- // only target/net node is changed. nothing to do.
-
- CSSNodeImpl targetNode = fCreationContext.getTargetNode();
- if (targetNode instanceof ICSSStyleDeclItem) {
- int offset = targetNode.getStartOffset();
- // widen document region range
- // ((CSSStyleDeclItemImpl)targetNode).setLastStructuredDocumentRegion(region);
- CSSModelUtil.expandStructuredDocumentRegionContainer((CSSStyleDeclItemImpl) targetNode, region);
- // psStructuredDocumentRegion indicates CSSStyleDeclItem
- ICSSNode parentNode = targetNode.getParentNode();
- fCreationContext.setTargetNode(parentNode);
- ICSSNode next = null;
- if (parentNode.hasChildNodes()) {
- for (ICSSNode child = targetNode.getFirstChild(); child != null; child = child.getNextSibling()) {
- if (child instanceof CSSStructuredDocumentRegionContainer && offset < ((CSSStructuredDocumentRegionContainer) child).getStartOffset()) {
- next = child;
- break;
- }
- }
- }
- fCreationContext.setNextNode(next);
-
- return targetNode;
- }
-
- return null;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertStyleDeclarationItem(IStructuredDocumentRegion docRegion) {
- CSSStyleDeclarationImpl parent = null;
- CSSNodeImpl node = fCreationContext.getTargetNode();
- if (node instanceof CSSRuleDeclContainer) {
- CSSRuleDeclContainer declContainer = (CSSRuleDeclContainer) node;
- parent = (CSSStyleDeclarationImpl) declContainer.getStyle();
- }
- else if (node instanceof CSSStyleDeclarationImpl) {
- parent = (CSSStyleDeclarationImpl) node;
- }
-
- CSSDeclarationItemParser itemParser = new CSSDeclarationItemParser(parent.getOwnerDocument());
- itemParser.setStructuredDocumentTemporary(false);
- itemParser.setUpdateContext(fUpdateContext);
- CSSStyleDeclItemImpl declItem = itemParser.setupDeclarationItem(docRegion);
- if (declItem == null) {
- return null;
- }
-
- // setup flat container
- declItem.setRangeStructuredDocumentRegion(docRegion, docRegion);
-
- // insert to tree
- if (!fUpdateContext.isActive()) {
- propagateRangePreInsert(parent, declItem);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(declItem, next);
- }
- else {
- parent.appendChild(declItem);
- }
- }
-
- fCreationContext.setTargetNode(declItem);
- // TargetNext is set to null automatically
-
- return declItem;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertStyleRule(IStructuredDocumentRegion flatNode, IStructuredDocumentRegion braceNode) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- // get selector regions
- ITextRegionList selectorRegions = new TextRegionListImpl(flatNode.getRegions());
- CSSUtil.stripSurroundingSpace(selectorRegions);
-
- CSSStyleRuleImpl rule = fFeeder.getCSSStyleRule();
- if (rule == null) {
- return null;
- }
-
- if (!fUpdateContext.isActive()) {
- String selectorStr = CSSUtil.getRegionText(flatNode, selectorRegions);
- if (selectorStr != null && 0 < selectorStr.length()) {
- rule.setSelectorText(selectorStr);
- }
- }
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(flatNode, braceNode);
- CSSAttrImpl attr = rule.getAttributeNode(ICSSPageRule.SELECTOR);
- if (attr != null && selectorRegions != null && !selectorRegions.isEmpty()) {
- attr.setRangeRegion(flatNode, selectorRegions.get(0), selectorRegions.get(selectorRegions.size() - 1));
- }
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- fCreationContext.setTargetNode(rule);
- // TargetNext is set to null automatically
-
- return rule;
- }
-
- /**
- *
- */
- private void pretendRemoveNode() {
- CSSStructuredDocumentRegionContainer node = (CSSStructuredDocumentRegionContainer) fUpdateContext.getDeletionTarget();
- if (node == null) {
- return;
- }
-
- IStructuredDocumentRegion firstNode = node.getFirstStructuredDocumentRegion();
- if (firstNode != null) {
- fDeletionContext.expandRemovedRangeBegin(firstNode);
- }
- IStructuredDocumentRegion lastNode = node.getLastStructuredDocumentRegion();
- if (lastNode != null) {
- fDeletionContext.expandRemovedRangeEnd(lastNode);
- }
-
- shrinkContainer((CSSStructuredDocumentRegionContainer) fUpdateContext.getDeletionTargetParent(), node);
- }
-
- /**
- * @param parent
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param child
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private void propagateRangePreInsert(CSSNodeImpl parent, CSSNodeImpl child) {
- if (!(child instanceof CSSStructuredDocumentRegionContainer) || !(parent instanceof CSSStructuredDocumentRegionContainer)) {
- return;
- }
-
- CSSStructuredDocumentRegionContainer parentContainer = (CSSStructuredDocumentRegionContainer) parent;
- CSSStructuredDocumentRegionContainer childContainer = (CSSStructuredDocumentRegionContainer) child;
- IStructuredDocumentRegion firstNode = childContainer.getFirstStructuredDocumentRegion();
- IStructuredDocumentRegion lastNode = childContainer.getLastStructuredDocumentRegion();
- if (firstNode == null || lastNode == null) {
- return;
- }
-
- boolean bModified = parentContainer.includeRangeStructuredDocumentRegion(firstNode, lastNode);
- if (bModified) {
- parentContainer.propagateRangeStructuredDocumentRegion();
- }
- }
-
- /**
- *
- */
- private void removeStructuredDocumentRegion(IStructuredDocumentRegion flatNode) {
- String type = CSSUtil.getStructuredDocumentRegionType(flatNode);
- if (type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- do {
- flatNode = fStructuredDocumentWalker.getPrevNode(flatNode);
- type = (flatNode != null) ? CSSUtil.getStructuredDocumentRegionType(flatNode) : null;
- }
- while (type != null && (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT));
- }
- if (flatNode == null) {
- return;
- }
-
- // if (fDeletionContext.isInRemovedRange(flatNode)) { // already
- // removed
- // return;
- // }
-
- CSSStructuredDocumentRegionContainer node = fDeletionContext.findDeletionTarget(fDocument, flatNode);
- if (node == null || node == fDocument) {
- return; // not attached with any treeNode
- }
-
- if (node instanceof CSSStyleDeclarationImpl) {
- ICSSNode rule = node.getParentNode();
- if (rule instanceof CSSStyleRuleImpl) {
- node = (CSSStructuredDocumentRegionContainer) rule;
- }
- else {
- return;
- }
- }
-
- // ICSSNode p = node.getParentNode();
- // if (p == null || ! (p instanceof
- // CSSStructuredDocumentRegionContainer)) {
- // return;
- // }
- // CSSStructuredDocumentRegionContainer parent =
- // (CSSStructuredDocumentRegionContainer)p;
-
- if (fDeletionContext.addNodeToBeRemoved(node)) {
- IStructuredDocumentRegion firstNode = node.getFirstStructuredDocumentRegion();
- if (firstNode != null) {
- fDeletionContext.expandRemovedRangeBegin(firstNode);
- }
- IStructuredDocumentRegion lastNode = node.getLastStructuredDocumentRegion();
- if (lastNode != null) {
- fDeletionContext.expandRemovedRangeEnd(lastNode);
- }
- }
-
- // shrinkContainer(node);
- // parent.removeChild(node);
- }
-
- /**
- *
- */
- private void removeStructuredDocumentRegions(IStructuredDocumentRegionList flatNodes) {
- for (Enumeration e = flatNodes.elements(); e.hasMoreElements();) {
- IStructuredDocumentRegion flatNode = (IStructuredDocumentRegion) e.nextElement();
- if (flatNode == null) {
- continue;
- }
- removeStructuredDocumentRegion(flatNode);
- }
-
- Iterator i = fDeletionContext.getNodesToBeRemoved();
- while (i.hasNext()) {
- CSSNodeImpl node = (CSSNodeImpl) i.next();
- if (!(node instanceof CSSStructuredDocumentRegionContainer)) {
- continue;
- }
- CSSNodeImpl parent = (CSSNodeImpl) node.getParentNode();
- if (!(parent instanceof CSSStructuredDocumentRegionContainer)) {
- continue;
- }
- shrinkContainer((CSSStructuredDocumentRegionContainer) parent, (CSSStructuredDocumentRegionContainer) node);
- parent.removeChild(node);
- }
- }
-
- /**
- *
- */
- void replaceStructuredDocumentRegions(IStructuredDocumentRegionList newStructuredDocumentRegions, IStructuredDocumentRegionList oldStructuredDocumentRegions) {
- if (fDocument == null || fCreationContext == null) {
- return;
- }
-
- if (oldStructuredDocumentRegions != null && 0 < oldStructuredDocumentRegions.getLength()) {
- setupDeletionContext(newStructuredDocumentRegions, oldStructuredDocumentRegions);
- short updateMode = fUpdateContext.getUpdateMode();
- if (updateMode == CSSModelUpdateContext.UPDATE_IDLE) {
- removeStructuredDocumentRegions(oldStructuredDocumentRegions);
- }
- else {
- pretendRemoveNode();
- }
- newStructuredDocumentRegions = getStructuredDocumentRegionList(fDeletionContext.getRemovedRangeBegin(), fDeletionContext.getRemovedRangeEnd());
- cleanupDeletionContext();
- }
-
- if (newStructuredDocumentRegions != null && 0 < newStructuredDocumentRegions.getLength()) {
- setupCreationContext(newStructuredDocumentRegions.item(0));
- insertStructuredDocumentRegions(newStructuredDocumentRegions);
- }
-
- // make document hold whole structuredDocument
- /*
- * boolean bUpdate = false; IStructuredDocumentRegion flatNode;
- * flatNode = fDocument.getFirstStructuredDocumentRegion(); bUpdate =
- * bUpdate || (flatNode == null ||
- * fStructuredDocumentWalker.isOldNode(flatNode) ||
- * flatNode.getPrevious() != null); flatNode =
- * fDocument.getLastStructuredDocumentRegion(); bUpdate = bUpdate ||
- * (flatNode == null || fStructuredDocumentWalker.isOldNode(flatNode) ||
- * flatNode.getNext() != null);
- */
- IStructuredDocument structuredDocument = fStructuredDocumentWalker.getStructuredDocument();
- fDocument.setRangeStructuredDocumentRegion(structuredDocument.getFirstStructuredDocumentRegion(), structuredDocument.getLastStructuredDocumentRegion());
- /* } */
-
- // remove in official release
- // CSSModelUtil.diagnoseTree(fDocument,
- // fStructuredDocumentWalker.getStructuredDocument());
- }
-
- /**
- *
- */
- void replaceRegions(IStructuredDocumentRegion flatNode, ITextRegionList newRegions, ITextRegionList oldRegions) {
- if (flatNode == null) {
- return;
- }
- if (newRegions == null || oldRegions == null) {
- return;
- }
- if (fDocument == null) {
- return;
- }
-
- changeStructuredDocumentRegion(flatNode);
- }
-
- /**
- */
- private void resetCreationTarget(IStructuredDocumentRegion newStructuredDocumentRegion) {
- if (newStructuredDocumentRegion == null || newStructuredDocumentRegion.getStartOffset() <= 0) {
- // top of document
- fCreationContext.setTargetNode(fDocument);
- fCreationContext.setNextNode(fDocument.getFirstChild());
- return;
- }
-
- int cursorPos = newStructuredDocumentRegion.getStartOffset();
- CSSNodeImpl cursorNode = getNodeAt(cursorPos);
- if (cursorNode == null) { // end of document
- cursorNode = fDocument;
- }
-
- // find edge of tree node
- CSSNodeImpl node = null;
- // boolean bOverSemiColon = false;
- boolean bOverOpenBrace = false;
- IStructuredDocumentRegion flatNode;
- for (flatNode = newStructuredDocumentRegion; flatNode != null; flatNode = flatNode.getPrevious()) {
- node = getNodeAt(flatNode.getStartOffset());
- if (node == null) {
- node = fDocument;
- }
- if (node != cursorNode || node.getStartOffset() == flatNode.getStartOffset()) {
- break;
- }
- if (flatNode != newStructuredDocumentRegion) {
- String type = CSSUtil.getStructuredDocumentRegionType(flatNode);
- // if (type == CSSRegionContexts.CSS_DELIMITER ||
- // type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- // bOverSemiColon = true;
- // } else
- if (type == CSSRegionContexts.CSS_LBRACE) {
- bOverOpenBrace = true;
- }
- }
- }
-
- CSSNodeImpl targetNode = null;
-
- // if (flatNode == null) {
- // v<--|
- // AAAAAA
- // BBBBBBBBBB cursorNode:A , node:B -> target is A
- // targetNode = (node == null) ? fDocument : node;
- // } else
- if (cursorNode == node) {
- // v<--|
- // AAAAAA
- // BBBBBBBBBB cursorNode:A , node:B -> target is A
- if (bOverOpenBrace && cursorNode instanceof CSSRuleDeclContainer) {
- targetNode = (CSSNodeImpl) ((CSSRuleDeclContainer) cursorNode).getStyle();
- }
- else {
- targetNode = cursorNode;
- }
- }
- else {
- // v<--|
- // AAA
- // BBBBBBBBBB cursorNode:B , node:A -> depend on A's node type
- short nodeType = node.getNodeType();
- if (nodeType == ICSSNode.STYLEDECLITEM_NODE || nodeType == ICSSNode.CHARSETRULE_NODE || nodeType == ICSSNode.IMPORTRULE_NODE) {
- // targetNode = (CSSNodeImpl)((bOverSemiColon) ?
- // node.getParentNode() : node); // NP
- String regionType = CSSUtil.getStructuredDocumentRegionType(flatNode);
- if (regionType == CSSRegionContexts.CSS_DELIMITER || regionType == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- targetNode = (CSSNodeImpl) node.getParentNode();
- }
- else {
- targetNode = node;
- }
- }
- else if (CSSUtil.getStructuredDocumentRegionType(flatNode) == CSSRegionContexts.CSS_RBRACE) {
- targetNode = (CSSNodeImpl) node.getParentNode();
- }
- else {
- targetNode = node;
- }
- }
-
- fCreationContext.setTargetNode(targetNode);
- ICSSNode next = null;
- if (targetNode.hasChildNodes()) {
- for (ICSSNode child = targetNode.getFirstChild(); child != null; child = child.getNextSibling()) {
- if (child instanceof CSSStructuredDocumentRegionContainer && cursorPos < ((CSSStructuredDocumentRegionContainer) child).getStartOffset()) {
- next = child;
- break;
- }
- }
- }
- fCreationContext.setNextNode(next);
-
- }
-
- /**
- */
- private void resetReparseRange() {
- fCreationContext.clear();
- }
-
- /**
- * @param event
- * com.ibm.sed.structuredDocument.events.StructuredDocumentEvent
- */
- void setStructuredDocumentEvent(StructuredDocumentEvent event) {
- if (fStructuredDocumentWalker == null) {
- fStructuredDocumentWalker = new StructuredDocumentWalker();
- }
- fStructuredDocumentWalker.initialize(event);
- }
-
- /**
- * regions: surrounding spaces should be removed. Q. Why did you set
- * mediaTable ? A. MediaList may have two or more medium that have same
- * value, then searcing in MediaList is not perfect. Q.
- * fUpdateContext.isActive() is not care. Are you OK? A. OK.
- */
- private void setMediaList(MediaListImpl mediaList, IStructuredDocumentRegion region, ITextRegionList textRegions) {
- if (mediaList == null || textRegions == null) {
- return;
- }
- Collection mediaTable = new HashSet();
- CSSNodeListImpl attrs = mediaList.getMedia();
- for (int i = 0; i != attrs.getLength(); i++) {
- mediaTable.add(attrs.item(i));
- }
-
- ITextRegion start = null;
- ITextRegion end = null;
-
- Iterator i = textRegions.iterator();
- ITextRegion textRegion = (ITextRegion) ((i.hasNext()) ? i.next() : null);
- while (textRegion != null) {
- if (textRegion.getType() == CSSRegionContexts.CSS_MEDIUM) {
- String mediumStr = region.getText(textRegion);
- if (0 < mediumStr.length()) {
- CSSAttrImpl attr = null;
- // is the medium already set ?
- Iterator iTable = mediaTable.iterator();
- while (iTable.hasNext()) {
- CSSAttrImpl cai = (CSSAttrImpl) iTable.next();
- if (mediumStr.equalsIgnoreCase(cai.getValue())) {
- attr = cai;
- mediaTable.remove(cai);
- break;
- }
- }
- if (attr == null) {
- // is not set. create new attribute
- String key = "mediumP" + mediaList.mediumCounter++; //$NON-NLS-1$
- mediaList.setAttribute(key, mediumStr);
- attr = mediaList.getAttributeNode(key);
- }
- attr.setRangeRegion(region, textRegion, textRegion);
- if (start == null) {
- start = textRegion;
- }
- end = textRegion;
- }
- }
- textRegion = (ITextRegion) ((i.hasNext()) ? i.next() : null);
- }
-
- if (start != null && end != null) {
- mediaList.setRangeRegion(region, start, end);
- }
- }
-
- /**
- *
- */
- private void setupCreationContext(IStructuredDocumentRegion region) {
- resetReparseRange();
- resetCreationTarget(region);
- }
-
- /**
- *
- */
- private void setupDeletionContext(IStructuredDocumentRegionList newStructuredDocumentRegions, IStructuredDocumentRegionList oldStructuredDocumentRegions) {
- fDeletionContext.setupContext(newStructuredDocumentRegions, oldStructuredDocumentRegions);
- }
-
- /**
- *
- */
- void setupUpdateContext(short updateMode, ICSSNode parentNode, ICSSNode targetNode) {
- fUpdateContext.setupContext(updateMode, parentNode, targetNode);
- }
-
- /**
- *
- */
- void shrinkContainer(CSSStructuredDocumentRegionContainer parent, CSSStructuredDocumentRegionContainer child) {
- if (child == null) {
- return;
- }
-
- boolean bModified = false;
- bModified = bModified || cleanupLastNode(child.getLastStructuredDocumentRegion(), parent);
- bModified = bModified || cleanupFirstNode(child.getFirstStructuredDocumentRegion(), parent);
-
- if (bModified) {
- if (parent != null) {
- for (ICSSNode node = parent.getFirstChild(); node != null; node = node.getNextSibling()) {
- if (child != node && node instanceof CSSStructuredDocumentRegionContainer) {
- ((CSSStructuredDocumentRegionContainer) node).propagateRangeStructuredDocumentRegion();
- }
- }
- }
- }
-
- child.setRangeStructuredDocumentRegion(null, null);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdateContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdateContext.java
deleted file mode 100644
index 31018fa4e7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdateContext.java
+++ /dev/null
@@ -1,416 +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.css.core.internal.document;
-
-
-
-import java.util.LinkedList;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.util.AbstractCssTraverser;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSPrimitiveValue;
-
-
-/**
- *
- */
-class CSSModelUpdateContext {
-
-
- class CSSNodeUpdateTraverser extends AbstractCssTraverser {
- public CSSNodeUpdateTraverser() {
- super();
- setTraverseImported(false);
- setTraverseImportFirst(false);
- }
-
- public LinkedList getNodeList() {
- return fTravNodeList;
- }
-
- protected void begin(ICSSNode node) {
- fTravNodeList = new LinkedList();
- }
-
- protected short preNode(ICSSNode node) {
- if (node instanceof CSSStyleDeclarationImpl || node instanceof CSSAttrImpl || node instanceof MediaListImpl) {
- // skip
- }
- else {
- fTravNodeList.add(node);
- }
- if (node instanceof CSSPrimitiveContainer) {
- return TRAV_PRUNE;
- }
- else {
- return TRAV_CONT;
- }
- }
-
- LinkedList fTravNodeList = null;
- }
-
- ICSSNode fLastNode = null;
- ICSSNode fDeletionTargetParent = null;
- ICSSNode fDeletionTarget = null;
- LinkedList fNodeList = null;
- private short fUpdateMode = UPDATE_IDLE;
- static final short UPDATE_IDLE = 0;
- static final short UPDATE_INSERT_FNCONTAINER = 1;
- static final short UPDATE_INSERT_RCONTAINER = 2;
- static final short UPDATE_REMOVE_FNCONTAINER = 3;
- static final short UPDATE_REMOVE_RCONTAINER = 4;
- static final short UPDATE_CHANGE_RCONTAINER = 5;
-
- /**
- * CSSNodeUpdateQueue constructor comment.
- */
- CSSModelUpdateContext() {
- super();
- }
-
- /**
- *
- */
- void cleanupContext() {
- fNodeList = null;
- fDeletionTarget = null;
- fDeletionTargetParent = null;
- fUpdateMode = UPDATE_IDLE;
- }
-
- /**
- *
- */
- CounterImpl getCounter() {
- ICSSNode node = getNode();
- if (node instanceof CounterImpl) {
- return (CounterImpl) node;
- }
- else {
- CSSUtil.debugOut("CounterImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSCharsetRuleImpl getCSSCharsetRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSCharsetRuleImpl) {
- return (CSSCharsetRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSCharsetRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSFontFaceRuleImpl getCSSFontFaceRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSFontFaceRuleImpl) {
- return (CSSFontFaceRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSFontFaceRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSImportRuleImpl getCSSImportRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSImportRuleImpl) {
- return (CSSImportRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSImportRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSMediaRuleImpl getCSSMediaRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSMediaRuleImpl) {
- return (CSSMediaRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSMediaRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSPageRuleImpl getCSSPageRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSPageRuleImpl) {
- return (CSSPageRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSPageRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSPrimitiveValueImpl getCSSPrimitiveValue(short type) {
- ICSSNode node = getNode();
- if (node instanceof CSSPrimitiveValueImpl) {
- short nodeType = ((CSSPrimitiveValueImpl) node).getPrimitiveType();
- if (nodeType == type || ((nodeType == CSSPrimitiveValue.CSS_NUMBER || nodeType == ICSSPrimitiveValue.CSS_INTEGER) && (type == CSSPrimitiveValue.CSS_NUMBER || type == ICSSPrimitiveValue.CSS_INTEGER))) {
- return (CSSPrimitiveValueImpl) node;
- }
- }
-
- if (node instanceof CSSPrimitiveValueImpl) {
- CSSPrimitiveValueImpl value = (CSSPrimitiveValueImpl) node;
- CSSUtil.debugOut("CSSPrimitiveValueImpl [" + type + //$NON-NLS-1$
- "] is expected, but type is [" + //$NON-NLS-1$
- value.getPrimitiveType() + "]: \"" + value.generateSource() + "\"");//$NON-NLS-2$//$NON-NLS-1$
- }
- else {
- CSSUtil.debugOut("CSSPrimitiveValueImpl(" + type + //$NON-NLS-1$
- ") is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- }
-
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
-
- /**
- *
- */
- CSSPrimitiveValueImpl getCSSPrimitiveValueAny() {
- ICSSNode node = getNode();
- if (node instanceof CSSPrimitiveValueImpl) {
- return (CSSPrimitiveValueImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSPrimitiveValueImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSStyleDeclItemImpl getCSSStyleDeclItem(String propertyName) {
- ICSSNode node = getNode();
- if (node instanceof CSSStyleDeclItemImpl && ((CSSStyleDeclItemImpl) node).getPropertyName().equalsIgnoreCase(propertyName)) {
- return (CSSStyleDeclItemImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSStyleDeclItemImpl(" + propertyName + //$NON-NLS-1$
- ") is expected, but " + CSSUtil.getClassString(node));//$NON-NLS-1$
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSStyleRuleImpl getCSSStyleRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSStyleRuleImpl) {
- return (CSSStyleRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSStyleRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- ICSSNode getDeletionTarget() {
- return fDeletionTarget;
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- ICSSNode getDeletionTargetParent() {
- return fDeletionTargetParent;
- }
-
- /**
- *
- */
- private ICSSNode getNode() {
- ICSSNode node = null;
- if (fNodeList != null && 0 < fNodeList.size()) {
- node = (ICSSNode) fNodeList.removeFirst();
- }
- fLastNode = node;
- return node;
- }
-
- /**
- *
- */
- int getNodeCount() {
- if (fNodeList != null) {
- return fNodeList.size();
- }
- else {
- return -1;
- }
- }
-
- /**
- *
- */
- // ICSSNode getParentNode() {
- // return fParentNode;
- // }
- /**
- *
- */
- RectImpl getRect() {
- ICSSNode node = getNode();
- if (node instanceof RectImpl) {
- return (RectImpl) node;
- }
- else {
- CSSUtil.debugOut("RectImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- RGBColorImpl getRGBColor() {
- ICSSNode node = getNode();
- if (node instanceof RGBColorImpl) {
- return (RGBColorImpl) node;
- }
- else {
- CSSUtil.debugOut("RGBColorImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * @return short
- */
- short getUpdateMode() {
- return fUpdateMode;
- }
-
- /**
- *
- */
- boolean isActive() {
- return (fNodeList != null);
- }
-
- /**
- *
- */
- void setupContext(short updateMode, ICSSNode parentNode, ICSSNode targetNode) {
- fUpdateMode = updateMode;
-
- ICSSNode traverseRoot;
- if (updateMode == UPDATE_REMOVE_RCONTAINER || updateMode == UPDATE_INSERT_RCONTAINER || updateMode == UPDATE_CHANGE_RCONTAINER) {
- traverseRoot = parentNode;
- while (traverseRoot instanceof CSSRegionContainer) {
- traverseRoot = traverseRoot.getParentNode();
- }
- }
- else {
- traverseRoot = targetNode;
- }
-
- if (updateMode == UPDATE_REMOVE_RCONTAINER || updateMode == UPDATE_INSERT_RCONTAINER || // region
- // insert
- // =>
- // replace
- // flat
- // node
- updateMode == UPDATE_CHANGE_RCONTAINER || updateMode == UPDATE_REMOVE_FNCONTAINER) {
- fDeletionTarget = traverseRoot;
- if (fDeletionTarget == targetNode) {
- fDeletionTargetParent = parentNode;
- }
- else {
- fDeletionTargetParent = fDeletionTarget.getParentNode();
- }
- }
- else {
- fDeletionTarget = null;
- fDeletionTargetParent = null;
- }
-
- if (updateMode == UPDATE_INSERT_RCONTAINER || updateMode == UPDATE_INSERT_FNCONTAINER || updateMode == UPDATE_REMOVE_RCONTAINER || // region
- // remove
- // =>
- // re-insert
- // flat
- // node
- updateMode == UPDATE_CHANGE_RCONTAINER) {
- CSSNodeUpdateTraverser traverser = new CSSNodeUpdateTraverser();
- traverser.apply(traverseRoot);
- fNodeList = traverser.getNodeList();
- }
- else {
- fNodeList = null;
- }
- }
-
- /**
- *
- */
- private void ungetNode() {
- if (fNodeList != null && fLastNode != null) {
- fNodeList.addFirst(fLastNode);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdater.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdater.java
deleted file mode 100644
index b8e740bb6f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdater.java
+++ /dev/null
@@ -1,583 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.formatter.AttrChangeContext;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceGenerator;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.events.NoChangeEvent;
-import org.eclipse.wst.sse.core.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.w3c.dom.DOMException;
-
-
-/**
- *
- */
-class CSSModelUpdater {
-
- private CSSModelImpl fModel = null;
- private CSSModelParser fParser = null;
-
- /**
- * CSSModelUpdater constructor comment.
- */
- CSSModelUpdater() {
- super();
- }
-
- /**
- *
- */
- CSSModelUpdater(CSSModelImpl model) {
- super();
- fModel = model;
- }
-
- /**
- * @param parentNode
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private void attrInserted(CSSNodeImpl parentNode, CSSAttrImpl attr) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(parentNode);
-
- if (formatter == null) {
- CSSUtil.debugOut("Cannot get format adapter : " + parentNode.getClass().toString());//$NON-NLS-1$
- return;
- }
-
- short updateMode = CSSModelUpdateContext.UPDATE_INSERT_RCONTAINER;
- fParser.setupUpdateContext(updateMode, parentNode, attr);
-
- // get formatted info
- AttrChangeContext region = new AttrChangeContext();
- String text = new String(formatter.formatAttrChanged(parentNode, attr, true, region));
-
- // set text
- StructuredDocumentEvent result = insertText(region.start, region.end - region.start, text);
-
- int nRemains = fParser.cleanupUpdateContext();
-
- if (0 < nRemains && !(result instanceof NoChangeEvent)) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * @param parentNode
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private void attrRemoved(CSSNodeImpl parentNode, CSSAttrImpl attr) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(parentNode);
-
- if (formatter == null) {
- CSSUtil.debugOut("Cannot get format adapter : " + parentNode.getClass().toString());//$NON-NLS-1$
- return;
- }
-
- short updateMode = CSSModelUpdateContext.UPDATE_REMOVE_RCONTAINER;
- fParser.setupUpdateContext(updateMode, parentNode, attr);
-
- // get formatted info
- AttrChangeContext region = new AttrChangeContext();
- String text = new String(formatter.formatAttrChanged(parentNode, attr, false, region));
-
- // set text
- StructuredDocumentEvent result = insertText(region.start, region.end - region.start, text);
-
- int nRemains = fParser.cleanupUpdateContext();
-
- if (0 < nRemains && !(result instanceof NoChangeEvent)) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- void attrReplaced(CSSNodeImpl parentNode, CSSNodeImpl newAttr, CSSNodeImpl oldAttr) {
- if (parentNode == null) {
- return;
- }
-
- if (oldAttr != null) {
- attrRemoved(parentNode, (CSSAttrImpl) oldAttr);
- }
-
- if (newAttr != null) {
- attrInserted(parentNode, (CSSAttrImpl) newAttr);
- }
- }
-
- /**
- *
- */
- private void childInserted(CSSNodeImpl parentNode, CSSNodeImpl node) {
- short updateMode = CSSModelUpdateContext.UPDATE_IDLE;
-
- if (node instanceof CSSStructuredDocumentRegionContainer) {
- updateMode = CSSModelUpdateContext.UPDATE_INSERT_FNCONTAINER;
- }
- else if (node instanceof CSSRegionContainer) {
- updateMode = CSSModelUpdateContext.UPDATE_INSERT_RCONTAINER;
- }
- else {
- CSSUtil.debugOut("What's this node? : " + node.getClass().toString());//$NON-NLS-1$
- return;
- }
-
- fParser.setupUpdateContext(updateMode, parentNode, node);
-
- StructuredDocumentEvent result = defaultInserted(parentNode, node);
-
- int nRemains = fParser.cleanupUpdateContext();
-
- if (0 < nRemains && !(result instanceof NoChangeEvent)) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- private void childRemoved(CSSNodeImpl parentNode, CSSNodeImpl node) {
- short updateMode = CSSModelUpdateContext.UPDATE_IDLE;
-
- if (node instanceof CSSStructuredDocumentRegionContainer) {
- updateMode = CSSModelUpdateContext.UPDATE_REMOVE_FNCONTAINER;
- }
- else if (node instanceof CSSRegionContainer) {
- updateMode = CSSModelUpdateContext.UPDATE_REMOVE_RCONTAINER;
- }
- else {
- CSSUtil.debugOut("What's this node? : " + node.getClass().toString());//$NON-NLS-1$
- return;
- }
-
- fParser.setupUpdateContext(updateMode, parentNode, node);
-
- CSSNodeImpl prev = getOldPrevious(parentNode, node);
- CSSNodeImpl next = getOldNext(parentNode, node);
- int insertPos = -1, endPos = -1;
- String source = "";//$NON-NLS-1$
- if (prev != null) {
- insertPos = prev.getEndOffset();
- }
- else {
- insertPos = node.getStartOffset();
- insertPos -= nearestSpaceLengthBefore(parentNode, insertPos);
- }
- if (next != null) {
- endPos = next.getStartOffset();
- }
- else {
- endPos = node.getEndOffset();
- endPos += nearestSpaceLengthAfter(parentNode, endPos);
- }
- source = getSpaceBefore(parentNode, next, node);
- StructuredDocumentEvent result;
- if (source.length() > 0) {
- result = insertText(insertPos, endPos - insertPos, source);
- }
- else {
- result = removeText(insertPos, endPos - insertPos);
- }
-
- int nRemains = fParser.cleanupUpdateContext();
-
- if (0 < nRemains && !(result instanceof NoChangeEvent)) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
-
- /*
- * int removeStart = -1; int removeEnd = -1; if (node instanceof
- * CSSStructuredDocumentRegionContainer) {
- * CSSStructuredDocumentRegionContainer container =
- * (CSSStructuredDocumentRegionContainer)node;
- * IStructuredDocumentRegion firstNode =
- * container.getFirstStructuredDocumentRegion();
- * IStructuredDocumentRegion lastNode =
- * container.getLastStructuredDocumentRegion(); if (firstNode != null &&
- * lastNode != null) { removeStart = firstNode.getStart(); removeEnd =
- * lastNode.getEnd(); } } else if (node instanceof CSSRegionContainer) {
- * CSSRegionContainer container = (CSSRegionContainer)node;
- * ITextRegion firstRegion = container.getFirstRegion(); ITextRegion
- * lastRegion = container.getLastRegion(); if (firstRegion != null &&
- * lastRegion != null) { removeStart = firstRegion.getStartOffset();
- * removeEnd = lastRegion.getEndOffset(); } } if (0 <= removeStart &&
- * 0 <= removeEnd) { removeText(removeStart, removeEnd - removeStart +
- * 1); }
- */
- }
-
- /**
- *
- */
- void childReplaced(CSSNodeImpl parentNode, CSSNodeImpl newChild, CSSNodeImpl oldChild) {
- if (parentNode == null) {
- return;
- }
-
- if (oldChild != null) {
- childRemoved(parentNode, oldChild);
- }
-
- if (newChild != null) {
- childInserted(parentNode, newChild);
- }
- }
-
- /**
- *
- */
- private StructuredDocumentEvent defaultInserted(CSSNodeImpl parentNode, CSSNodeImpl node) {
- int insertPos = -1;
- ICSSNode sibling;
- String preSpace = "", postSpace = "";//$NON-NLS-2$//$NON-NLS-1$
- int length = 0;
-
- if (insertPos < 0) {
- if ((sibling = node.getPreviousSibling()) != null) {
- // after previous child
- insertPos = getTextEnd(sibling);
- }
- }
-
- if (insertPos < 0) {
- if ((sibling = node.getNextSibling()) != null) {
- // before next child
- insertPos = getTextStart(sibling);
- }
- }
-
- if (insertPos < 0) {
- // position of parent
- insertPos = getChildInsertPos(parentNode);
- }
-
- if (insertPos < 0) {
- // firsttime
- insertPos = 0;
- }
-
- // format previous spaces
- length = nearestSpaceLengthBefore(parentNode, insertPos);
- insertPos -= length;
- preSpace = getSpaceBefore(parentNode, node, null);
- // format post spaces
- length += nearestSpaceLengthAfter(parentNode, insertPos + length);
- postSpace = getSpaceBefore(parentNode, node.getNextSibling(), null);
-
- // set text
- String text = preSpace + node.generateSource().trim() + postSpace;
- return insertText(insertPos, length, text);
- }
-
- /**
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private int getChildInsertPos(CSSNodeImpl node) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(node);
- if (formatter != null)
- return formatter.getChildInsertPos(node);
- else
- return node.getEndOffset();
- }
-
- /**
- *
- */
- // private int getDocumentEnd() {
- // int end = -1;
- // IStructuredDocument structuredDocument =
- // fModel.getStructuredDocument();
- // if (structuredDocument != null) {
- // if (structuredDocument instanceof
- // com.ibm.sed.structured.text.impl.BasicStructuredDocument) {
- // end =
- // ((com.ibm.sed.structured.text.impl.BasicStructuredDocument)structuredDocument).getLength();
- // }
- // }
- // return end;
- // }
- /**
- *
- */
- // private IStructuredDocument getStructuredDocument() {
- // return (fModel != null) ? getStructuredDocument() : null;
- // }
- /**
- * @return org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param parentNode
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private CSSNodeImpl getOldNext(CSSNodeImpl parentNode, CSSNodeImpl node) {
- CSSNodeImpl child = (CSSNodeImpl) parentNode.getLastChild();
- CSSNodeImpl ret = null;
- while (child != null) {
- if (node.getEndOffset() < child.getEndOffset())
- ret = child;
- else
- break;
- child = (CSSNodeImpl) child.getPreviousSibling();
- }
- return ret;
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param parentNode
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private CSSNodeImpl getOldPrevious(CSSNodeImpl parentNode, CSSNodeImpl node) {
- CSSNodeImpl child = (CSSNodeImpl) parentNode.getFirstChild();
- CSSNodeImpl ret = null;
- while (child != null) {
- if (child.getStartOffset() < node.getStartOffset())
- ret = child;
- else
- break;
- child = (CSSNodeImpl) child.getNextSibling();
- }
- return ret;
- }
-
- /**
- * @return java.lang.String
- * @param parentNode
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private String getSpaceBefore(ICSSNode parentNode, ICSSNode node, ICSSNode toRemove) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) parentNode);
-
- if (formatter != null) {
- org.eclipse.jface.text.IRegion exceptFor = null;
- if (toRemove != null) {
- CSSNodeImpl remove = (CSSNodeImpl) toRemove;
- exceptFor = new org.eclipse.jface.text.Region(remove.getStartOffset(), remove.getEndOffset() - remove.getStartOffset());
- }
- return formatter.formatBefore(parentNode, node, exceptFor).toString();
- }
- else
- return "";//$NON-NLS-1$
- }
-
- /**
- *
- */
- private int getTextEnd(ICSSNode node) {
- int end = -1;
- if (node != null) {
- if (node instanceof CSSStructuredDocumentRegionContainer) {
- end = ((CSSStructuredDocumentRegionContainer) node).getEndOffset();
- }
- else if (node instanceof CSSRegionContainer) {
- end = ((CSSRegionContainer) node).getEndOffset();
- }
- }
- return end;
- }
-
- /**
- *
- */
- private int getTextStart(ICSSNode node) {
- int start = -1;
- if (node != null) {
- if (node instanceof CSSStructuredDocumentRegionContainer) {
- start = ((CSSStructuredDocumentRegionContainer) node).getStartOffset();
- }
- else if (node instanceof CSSRegionContainer) {
- start = ((CSSRegionContainer) node).getStartOffset();
- }
- }
- return start;
- }
-
- /**
- *
- */
- private StructuredDocumentEvent insertText(int start, int oldLength, String text) {
- StructuredDocumentEvent result = null;
- BasicStructuredDocument structuredDocument = (BasicStructuredDocument) fModel.getStructuredDocument();
- if (structuredDocument != null) {
- if (text != null && 0 < oldLength && start + oldLength <= structuredDocument.getLength()) {
- // minimize text change
- String delText = structuredDocument.get(start, oldLength);
- int newLength = text.length();
- int shorterLen = Math.min(oldLength, newLength);
- int stMatchLen;
- for (stMatchLen = 0; stMatchLen < shorterLen && text.charAt(stMatchLen) == delText.charAt(stMatchLen); stMatchLen++) {
- //
- }
- if (0 < stMatchLen && stMatchLen < shorterLen && text.charAt(stMatchLen - 1) == 0x000d && (text.charAt(stMatchLen) == 0x000a || delText.charAt(stMatchLen) == 0x000a)) {
- // must not divide 0d->0a sequence
- stMatchLen--;
- }
- if (stMatchLen == shorterLen) {
- if (oldLength < newLength) { // just insert
- oldLength = 0;
- start += stMatchLen;
- text = text.substring(stMatchLen);
- }
- else if (newLength < oldLength) { // just remove
- oldLength -= stMatchLen;
- start += stMatchLen;
- text = null;
- }
- else { // nothing to do
- oldLength = 0;
- text = null;
- }
- }
- else {
- int edMatchLen;
- for (edMatchLen = 0; stMatchLen + edMatchLen < shorterLen && text.charAt(newLength - edMatchLen - 1) == delText.charAt(oldLength - edMatchLen - 1); edMatchLen++) {
- //
- }
- if (0 < edMatchLen && text.charAt(newLength - edMatchLen) == 0x000a && ((edMatchLen < newLength && text.charAt(newLength - edMatchLen - 1) == 0x000d) || (edMatchLen < oldLength && delText.charAt(oldLength - edMatchLen - 1) == 0x000d))) {
- // must not divide 0d->0a sequence
- edMatchLen--;
- }
- oldLength -= stMatchLen + edMatchLen;
- start += stMatchLen;
- if (stMatchLen + edMatchLen < newLength) {
- text = text.substring(stMatchLen, newLength - edMatchLen);
- }
- else {
- text = null;
- }
- }
- }
- if (0 < oldLength || text != null) {
- // String delText = structuredDocument.get(start, oldLength);
- result = structuredDocument.replaceText(fModel, start, oldLength, text);
- }
- }
- return result;
- }
-
- /**
- * @return int
- * @param insertPos
- * int
- */
- private int nearestSpaceLengthAfter(CSSNodeImpl node, int insertPos) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(node);
- if (formatter != null) {
- return formatter.getLengthToReformatAfter(node, insertPos);
- }
- else
- return 0;
- }
-
- /**
- * @return int
- * @param insertPos
- * int
- */
- private int nearestSpaceLengthBefore(CSSNodeImpl node, int insertPos) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(node);
- if (formatter != null) {
- return formatter.getLengthToReformatBefore(node, insertPos);
- }
- else
- return 0;
- }
-
- /**
- *
- */
- private StructuredDocumentEvent removeText(int start, int length) {
- StructuredDocumentEvent result = null;
- IStructuredDocument structuredDocument = fModel.getStructuredDocument();
- if (structuredDocument != null) {
- result = structuredDocument.replaceText(fModel, start, length, new String(""));//$NON-NLS-1$
- }
- return result;
- }
-
- /**
- *
- */
- void setParser(CSSModelParser parser) {
- fParser = parser;
- }
-
- /**
- *
- */
- void valueChanged(CSSNodeImpl node, String oldValue) {
- if (!(node instanceof CSSRegionContainer)) {
- CSSUtil.debugOut("Too Bad.." + //$NON-NLS-1$
- ((node == null) ? "null" : node.getClass().toString()));//$NON-NLS-1$
- return;
- }
-
- int start = node.getStartOffset();
-
- if (node.getNodeType() == ICSSNode.ATTR_NODE) {
- ICSSAttr attr = (ICSSAttr) node;
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) attr.getOwnerCSSNode());
- if (formatter != null)
- start = formatter.getAttrInsertPos(attr.getOwnerCSSNode(), attr.getName());
- }
-
- int oldLength = (oldValue == null) ? 0 : oldValue.length();
- // flash old IStructuredDocumentRegion/ITextRegion
- if (node instanceof CSSStructuredDocumentRegionContainer) {
- ((CSSStructuredDocumentRegionContainer) node).setFirstStructuredDocumentRegion(null);
- ((CSSStructuredDocumentRegionContainer) node).setLastStructuredDocumentRegion(null);
- }
- else if (node instanceof CSSRegionContainer) {
- ((CSSRegionContainer) node).setRangeRegion(null, null, null);
- }
- // generate new source
- String newValue = node.generateSource();
-
- ICSSNode parent;
- if (node.getNodeType() == ICSSNode.ATTR_NODE) {
- parent = ((ICSSAttr) node).getOwnerCSSNode();
- }
- else {
- parent = node.getParentNode();
- }
-
- fParser.setupUpdateContext(CSSModelUpdateContext.UPDATE_CHANGE_RCONTAINER, parent, node);
-
- StructuredDocumentEvent result = insertText(start, oldLength, newValue);
-
- int nRemains = fParser.cleanupUpdateContext();
-
- if (0 < nRemains && !(result instanceof NoChangeEvent)) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java
deleted file mode 100644
index a2efd80e27..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSNodeList;
-import org.eclipse.wst.css.core.document.ICSSRuleContainer;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-/**
- *
- */
-class CSSModelUtil {
-
- /**
- *
- */
- static boolean canContainBrace(ICSSNode node) {
- return (node != null && (node instanceof ICSSRuleContainer || node instanceof CSSRuleDeclContainer)) ? true : false;
- }
-
- /**
- * @param parent
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- static void cleanupContainer(ICSSNode parent) {
- if (parent == null) {
- return;
- }
- for (ICSSNode child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
- cleanupContainer(child);
- }
- if (parent instanceof CSSStructuredDocumentRegionContainer) {
- ((CSSStructuredDocumentRegionContainer) parent).setRangeStructuredDocumentRegion(null, null);
- }
- else if (parent instanceof CSSRegionContainer) {
- ((CSSRegionContainer) parent).setRangeRegion(null, null, null);
- }
- }
-
- /**
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param structuredDocument
- * com.ibm.sed.structuredDocument.IStructuredDocument
- */
- static boolean diagnoseNode(ICSSNode parent, IStructuredDocument structuredDocument) {
- // check this
- Vector errors = new Vector();
- if (parent instanceof CSSStructuredDocumentRegionContainer) {
- CSSStructuredDocumentRegionContainer node = (CSSStructuredDocumentRegionContainer) parent;
- String nodeText = CSSUtil.getClassString(node) + ": ";//$NON-NLS-1$
- IStructuredDocumentRegion flatNode = node.getFirstStructuredDocumentRegion();
- if (flatNode == null && (!(node instanceof CSSStyleDeclarationImpl || node instanceof CSSStyleSheetImpl) || node.getFirstChild() != null)) {
- errors.add(CSSCorePlugin.getResourceString("%1concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first flat node is null."
- }
- else if (flatNode != null) {
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(flatNode.getStart());
- if (flatNode != modelNode) {
- errors.add(CSSCorePlugin.getResourceString("%2concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first flat node is not in model."
- }
- }
- flatNode = node.getLastStructuredDocumentRegion();
- if (flatNode == null && (!(node instanceof CSSStyleDeclarationImpl || node instanceof CSSStyleSheetImpl) || node.getFirstChild() != null)) {
- errors.add(CSSCorePlugin.getResourceString("%3concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last flat node is null."
- }
- else if (flatNode != null) {
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(flatNode.getStart());
- if (flatNode != modelNode) {
- errors.add(CSSCorePlugin.getResourceString("%4concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last flat node is not in model."
- }
- }
- }
- else if (parent instanceof CSSRegionContainer) {
- CSSRegionContainer node = (CSSRegionContainer) parent;
- String nodeText = CSSUtil.getClassString(node) + ": ";//$NON-NLS-1$
- ITextRegion region = node.getFirstRegion();
- IStructuredDocumentRegion parentRegion = node.getDocumentRegion();
- if (region == null && (!(node instanceof MediaListImpl) || node.getFirstChild() != null)) {
- errors.add(CSSCorePlugin.getResourceString("%25concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is null."
- }
- else if (region != null) {
- int offset = parentRegion.getStartOffset(region);
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
- ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
- if (region != modelRegion) {
- errors.add(CSSCorePlugin.getResourceString("%26concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is not in model."
- }
- }
- region = node.getLastRegion();
- if (region == null && (!(node instanceof MediaListImpl) || node.getFirstChild() != null)) {
- errors.add(CSSCorePlugin.getResourceString("%27concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is null."
- }
- else if (region != null) {
- int offset = parentRegion.getStartOffset(region);
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
- ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
- if (region != modelRegion) {
- errors.add(CSSCorePlugin.getResourceString("%28concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is not in model."
- }
- }
- }
-
- ICSSNodeList attrs = parent.getAttributes();
- int nAttrs = attrs.getLength();
- for (int i = 0; i < nAttrs; i++) {
- ICSSAttr attr = (ICSSAttr) attrs.item(i);
- CSSRegionContainer node = (CSSRegionContainer) attr;
- String nodeText = CSSUtil.getClassString(node) + "(" + attr.getName() + "): ";//$NON-NLS-2$//$NON-NLS-1$
- ITextRegion region = node.getFirstRegion();
- IStructuredDocumentRegion parentRegion = node.getDocumentRegion();
- if (region == null && 0 < attr.getValue().length()) {
- errors.add(CSSCorePlugin.getResourceString("%5concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is null."
- }
- else if (region != null) {
- int offset = parentRegion.getStartOffset(region);
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
- ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
- if (region != modelRegion) {
- errors.add(CSSCorePlugin.getResourceString("%6concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is not in model."
- }
- }
- region = node.getLastRegion();
- if (region == null && 0 < attr.getValue().length()) {
- errors.add(CSSCorePlugin.getResourceString("%7concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is null."
- }
- else if (region != null) {
- int offset = parentRegion.getStartOffset(region);
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
- ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
- if (region != modelRegion) {
- errors.add(CSSCorePlugin.getResourceString("%8concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is not in model."
- }
- }
- }
-
- if (!errors.isEmpty()) {
- Iterator i = errors.iterator();
- while (i.hasNext()) {
- CSSUtil.debugOut((String) i.next());
- }
- return false;
- }
- else {
- return true;
- }
- }
-
- /**
- * @return boolean
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- static boolean diagnoseTree(ICSSNode parent, IStructuredDocument structuredDocument) {
- if (parent == null) {
- return false;
- }
- // check children
- for (ICSSNode child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
- diagnoseTree(child, structuredDocument);
- }
-
- diagnoseNode(parent, structuredDocument);
-
- return true;
- }
-
- /**
- * If needed, modify last flat node
- */
- static void expandStructuredDocumentRegionContainer(CSSStructuredDocumentRegionContainer target, IStructuredDocumentRegion flatNode) {
- if (target == null || flatNode == null) {
- return;
- }
-
- IStructuredDocumentRegion lastNode = target.getLastStructuredDocumentRegion();
- if (lastNode == flatNode) {
- return;
- }
- if (lastNode == null || lastNode.getStart() < flatNode.getStart()) {
- target.setLastStructuredDocumentRegion(flatNode);
- }
- }
-
- /*
- *
- */
- static ICSSNode findBraceContainer(ICSSNode node) {
- for (ICSSNode i = node; i != null; i = i.getParentNode()) {
- if (CSSModelUtil.canContainBrace(i)) {
- return i;
- }
- }
- return null;
- }
-
- /**
- *
- */
- static int getDepth(ICSSNode node) {
- int depth = -1;
- while (node != null) {
- depth++;
- node = node.getParentNode();
- }
- return depth;
- }
-
- /**
- *
- */
- static boolean isBraceClosed(ICSSNode node) {
- boolean bClosed = true;
- if (!(node instanceof CSSStructuredDocumentRegionContainer)) {
- return bClosed;
- }
-
- IStructuredDocumentRegion first = ((CSSStructuredDocumentRegionContainer) node).getFirstStructuredDocumentRegion();
- IStructuredDocumentRegion last = ((CSSStructuredDocumentRegionContainer) node).getLastStructuredDocumentRegion();
- if (first == null || last == null) {
- return bClosed;
- }
- if (last.getStart() < first.getStart()) {
- return bClosed;
- }
-
- IStructuredDocumentRegion flatNode = first;
- int nOpen = 0;
- int nClose = 0;
- do {
- String type = CSSUtil.getStructuredDocumentRegionType(flatNode);
- if (type == CSSRegionContexts.CSS_LBRACE) {
- nOpen++;
- }
- else if (type == CSSRegionContexts.CSS_RBRACE) {
- nClose++;
- }
- flatNode = flatNode.getNext();
- }
- while (flatNode != null && flatNode != last);
-
- if ((nOpen == 0 && nClose == 0) || nClose < nOpen) {
- bClosed = false;
- }
-
- return bClosed;
- }
-
- /**
- * only for insertion..
- */
- static boolean isInterruption(CSSStructuredDocumentRegionContainer target, IStructuredDocumentRegion flatNode) {
- if (target == null || flatNode == null) {
- return false;
- }
- int start = flatNode.getStart();
- IStructuredDocumentRegion firstNode = target.getFirstStructuredDocumentRegion();
- IStructuredDocumentRegion lastNode = target.getLastStructuredDocumentRegion();
- if (firstNode != null && firstNode.getStart() < start && lastNode != null && start < lastNode.getStart()) {
- return true;
- }
- return false;
- }
-
- /**
- *
- */
- static boolean isParentOf(ICSSNode parent, ICSSNode child) {
- if (parent == null || child == null) {
- return false;
- }
-
- for (ICSSNode node = child; node != null; node = node.getParentNode()) {
- if (parent == node) {
- return true;
- }
- }
-
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNamedNodeMapImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNamedNodeMapImpl.java
deleted file mode 100644
index aa5eb3fc03..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNamedNodeMapImpl.java
+++ /dev/null
@@ -1,48 +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.css.core.internal.document;
-
-
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.document.ICSSNamedNodeMap;
-import org.eclipse.wst.css.core.document.ICSSNode;
-
-
-/**
- *
- */
-public class CSSNamedNodeMapImpl extends CSSNodeListImpl implements ICSSNamedNodeMap {
-
- /**
- * CSSNamedNodeMapImpl constructor comment.
- */
- CSSNamedNodeMapImpl() {
- super();
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param name
- * java.lang.String
- */
- public ICSSNode getNamedItem(String name) {
- Iterator it = nodes.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj instanceof CSSAttrImpl && ((CSSAttrImpl) obj).getName().compareToIgnoreCase(name) == 0) {
- return (ICSSNode) obj;
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeImpl.java
deleted file mode 100644
index 431b46008d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeImpl.java
+++ /dev/null
@@ -1,559 +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.css.core.internal.document;
-
-
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNamedNodeMap;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSNodeList;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceGenerator;
-import org.eclipse.wst.css.core.util.ImportRuleCollector;
-import org.eclipse.wst.sse.core.AbstractNotifier;
-import org.eclipse.wst.sse.core.IFactoryRegistry;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.w3c.dom.DOMException;
-
-
-/**
- *
- */
-abstract class CSSNodeImpl extends AbstractNotifier implements ICSSNode, IndexedRegion {
-
- private CSSDocumentImpl fOwnerDocument = null;
- private CSSNodeImpl fParentNode = null;
- private CSSNodeImpl fNextSibling = null;
- private CSSNodeImpl fPreviousSibling = null;
- private CSSNodeImpl fFirstChild = null;
- private CSSNodeImpl fLastChild = null;
- protected CSSNamedNodeMapImpl fAttrs = null;
-
- /**
- * CSSNodeImpl constructor comment.
- */
- CSSNodeImpl() {
- super();
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- */
- CSSNodeImpl(CSSNodeImpl that) {
- if (that != null) {
- this.fOwnerDocument = that.fOwnerDocument;
- if (that.fAttrs != null) {
- int nAttrs = that.fAttrs.getLength();
- for (int i = 0; i < nAttrs; i++) {
- CSSAttrImpl attr = (CSSAttrImpl) that.fAttrs.item(i);
- setAttribute(attr.getName(), attr.getValue());
- }
- }
- }
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param newChild
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- protected CSSNodeImpl appendChild(CSSNodeImpl newChild) throws org.w3c.dom.DOMException {
- return insertBefore(newChild, null);
- }
-
- /**
- * @param newParent
- * com.ibm.sed.css.interfaces.ICSSNode
- * @param deep
- * boolean
- */
- void cloneChildNodes(ICSSNode newParent, boolean deep) {
- if (newParent == null || newParent == this)
- return;
-
- CSSNodeImpl container = (CSSNodeImpl) newParent;
- container.removeChildNodes();
-
- for (ICSSNode child = getFirstChild(); child != null; child = child.getNextSibling()) {
- CSSNodeImpl cloned = (CSSNodeImpl) child.cloneNode(deep);
- if (cloned != null)
- container.appendChild(cloned);
- }
- }
-
- /**
- * @return boolean
- * @param offset
- * int
- */
- public boolean contains(int offset) {
- return (getStartOffset() <= offset && offset < getEndOffset());
- }
-
- /**
- * @return java.lang.String
- */
- String generateSource() {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(this);
- return formatter.format(this).toString();
- }
-
- /**
- * @return java.lang.String
- * @param name
- * java.lang.String
- */
- String getAttribute(String name) {
- CSSAttrImpl attr = getAttributeNode(name);
- if (attr != null)
- return attr.getValue();
- return null;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSAttrImpl
- * @param name
- * java.lang.String
- */
- protected CSSAttrImpl getAttributeNode(String name) {
- if (fAttrs == null)
- return null;
-
- int nAttrs = fAttrs.getLength();
- for (int i = 0; i < nAttrs; i++) {
- CSSAttrImpl attr = (CSSAttrImpl) fAttrs.item(i);
- if (attr.matchName(name))
- return attr;
- }
- return null;
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNamedNodeMap
- */
- public ICSSNamedNodeMap getAttributes() {
- if (fAttrs == null)
- fAttrs = new CSSNamedNodeMapImpl();
- return fAttrs;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNodeList
- */
- public ICSSNodeList getChildNodes() {
- CSSNodeListImpl list = new CSSNodeListImpl();
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- list.appendNode(node);
- }
- return list;
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSNode
- * @param node
- * com.ibm.sed.css.interfaces.ICSSNode
- */
- ICSSNode getCommonAncestor(ICSSNode node) {
- if (node == null)
- return null;
-
- for (ICSSNode na = node; na != null; na = na.getParentNode()) {
- for (ICSSNode ta = this; ta != null; ta = ta.getParentNode()) {
- if (ta == na)
- return ta;
- }
- }
-
- return null; // not found
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSDocumentImpl
- */
- CSSDocumentImpl getContainerDocument() {
- for (ICSSNode node = this; node != null; node = node.getParentNode()) {
- if (node instanceof CSSDocumentImpl) {
- CSSDocumentImpl doc = (CSSDocumentImpl) node;
- if (doc.isDocument())
- return doc;
- }
- }
- return null;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param offset
- * int
- */
- CSSNodeImpl getContainerNode(int offset) {
- if (!contains(offset))
- return null;
-
- for (ICSSNode child = getFirstChild(); child != null; child = child.getNextSibling()) {
- ICSSNode found = ((CSSNodeImpl) child).getContainerNode(offset);
- if (found != null)
- return (CSSNodeImpl) found;
- }
-
- return this;
- }
-
- /**
- */
- public IFactoryRegistry getFactoryRegistry() {
- ICSSModel model = getOwnerDocument().getModel();
- if (model != null) {
- IFactoryRegistry reg = model.getFactoryRegistry();
- if (reg != null)
- return reg;
- }
- return null;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNode
- */
- public ICSSNode getFirstChild() {
- return this.fFirstChild;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNode
- */
- public ICSSNode getLastChild() {
- return this.fLastChild;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNode
- */
- public ICSSNode getNextSibling() {
- return this.fNextSibling;
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSNode
- * @param offset
- * int
- */
- ICSSNode getNodeAt(int offset) {
- // the same as getContainerNode()
- return getContainerNode(offset);
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSDocument
- */
- public ICSSDocument getOwnerDocument() {
- return this.fOwnerDocument;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNode
- */
- public ICSSNode getParentNode() {
- return this.fParentNode;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNode
- */
- public ICSSNode getPreviousSibling() {
- return this.fPreviousSibling;
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSFactory
- */
- ICSSNode getRootNode() {
- CSSNodeImpl parent = (CSSNodeImpl) getParentNode();
- if (parent == null)
- return this;
- return parent.getRootNode();
- }
-
- /**
- * @return boolean
- */
- public boolean hasChildNodes() {
- return (this.fFirstChild != null);
- }
-
- /**
- * @return boolean
- */
- public boolean hasProperties() {
- return false;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param newChild
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param refChild
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- protected CSSNodeImpl insertBefore(CSSNodeImpl newChild, CSSNodeImpl refChild) throws org.w3c.dom.DOMException {
- if (newChild == null)
- return null;
-
- CSSNodeImpl child = newChild;
- CSSNodeImpl next = refChild;
- CSSNodeImpl prev = null;
- if (next == null) {
- prev = this.fLastChild;
- this.fLastChild = child;
- }
- else {
- prev = (CSSNodeImpl) next.getPreviousSibling();
- next.setPreviousSibling(child);
- }
-
- if (prev == null)
- this.fFirstChild = child;
- else
- prev.setNextSibling(child);
- child.setPreviousSibling(prev);
- child.setNextSibling(next);
- child.setParentNode(this);
-
- notifyChildReplaced(child, null);
-
- return newChild;
- }
-
- /**
- * @param newAttr
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param oldAttr
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- */
- protected void notifyAttrReplaced(CSSNodeImpl newAttr, CSSNodeImpl oldAttr) {
- // for model
- ICSSDocument doc = getContainerDocument();
- if (doc == null)
- return;
- CSSModelImpl model = (CSSModelImpl) doc.getModel();
- if (model == null)
- return;
- model.attrReplaced(this, newAttr, oldAttr);
-
- // for adapters
- int type = CHANGE;
- if (newAttr == null)
- type = REMOVE;
- else if (oldAttr == null)
- type = ADD;
- notify(type, oldAttr, oldAttr, newAttr, getStartOffset());
- }
-
- /**
- * @param newChild
- * com.ibm.sed.css.treemodel.CSSNode
- * @param oldChild
- * com.ibm.sed.css.treemodel.CSSNode
- */
- protected void notifyChildReplaced(CSSNodeImpl newChild, CSSNodeImpl oldChild) {
- // for model
- ICSSDocument doc = getContainerDocument();
- if (doc == null)
- return;
- CSSModelImpl model = (CSSModelImpl) doc.getModel();
- if (model == null)
- return;
- model.childReplaced(this, newChild, oldChild);
-
- // for adapters
- int type = CHANGE;
- if (newChild == null)
- type = REMOVE;
- else if (oldChild == null)
- type = ADD;
- notify(type, oldChild, oldChild, newChild, getStartOffset());
- }
-
- /**
- * @param attr
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- */
- void removeAttributeNode(CSSNodeImpl attr) {
- // find
- int nAttrs = fAttrs.getLength();
- for (int i = 0; i < nAttrs; i++) {
- if (fAttrs.item(i) == attr) {
- fAttrs.removeNode(i);
- notifyAttrReplaced(null, attr);
- return;
- }
- }
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param newChild
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- protected CSSNodeImpl removeChild(CSSNodeImpl oldChild) throws org.w3c.dom.DOMException {
- if (oldChild == null)
- return null;
- if (oldChild.getParentNode() != this)
- return null;
-
- // close import rules
- ImportRuleCollector trav = new ImportRuleCollector();
- trav.apply(oldChild);
- Iterator it = trav.getRules().iterator();
- while (it.hasNext()) {
- ((CSSImportRuleImpl) it.next()).closeStyleSheet();
- }
-
- CSSNodeImpl child = oldChild;
- CSSNodeImpl prev = (CSSNodeImpl) child.getPreviousSibling();
- CSSNodeImpl next = (CSSNodeImpl) child.getNextSibling();
-
- if (prev == null)
- this.fFirstChild = next;
- else
- prev.setNextSibling(next);
-
- if (next == null)
- this.fLastChild = prev;
- else
- next.setPreviousSibling(prev);
-
- child.setPreviousSibling(null);
- child.setNextSibling(null);
- child.setParentNode(null);
-
- notifyChildReplaced(null, child);
-
- return child;
- }
-
- /**
- *
- */
- void removeChildNodes() {
- ICSSNode nextChild = null;
- for (ICSSNode child = getFirstChild(); child != null; child = nextChild) {
- nextChild = child.getNextSibling();
- removeChild((CSSNodeImpl) child);
- }
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param newChild
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @param oldChild
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- protected CSSNodeImpl replaceChild(CSSNodeImpl newChild, CSSNodeImpl oldChild) throws org.w3c.dom.DOMException {
- if (oldChild == null)
- return newChild;
- if (newChild != null)
- insertBefore(newChild, oldChild);
- return removeChild(oldChild);
- }
-
- /**
- * @param name
- * java.lang.String
- * @param value
- * java.lang.String
- */
- void setAttribute(String name, String value) {
- if (name == null)
- return;
-
- CSSAttrImpl attr = getAttributeNode(name);
- if (attr != null) {
- String oldValue = attr.getValue();
- if (value != null && value.equals(oldValue))
- return;
- if (value == null) {
- if (oldValue != null) {
- removeAttributeNode(attr);
- }
- return;
- }
- }
- else {
- if (value == null)
- return;
- if (fAttrs == null)
- fAttrs = new CSSNamedNodeMapImpl();
- CSSDocumentImpl doc = (CSSDocumentImpl) getOwnerDocument();
- if (doc == null)
- return;
- attr = (CSSAttrImpl) doc.createCSSAttr(name);
- attr.setOwnerCSSNode(this);
- fAttrs.appendNode(attr);
- notifyAttrReplaced(attr, null);
- }
- attr.setValue(value);
- }
-
- /**
- * @param cssText
- * java.lang.String
- */
- public void setCssText(String cssText) {
- // TODO : call flat model parser and replace myself with new three!!
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
-
- /**
- * @param nextSibling
- * com.ibm.sed.css.interfaces.ICSSNode
- */
- private void setNextSibling(ICSSNode nextSibling) {
- this.fNextSibling = (CSSNodeImpl) nextSibling;
- }
-
- /**
- * @param ownerDocument
- * com.ibm.sed.css.interfaces.CSSDocument
- */
- void setOwnerDocument(ICSSDocument ownerDocument) {
- this.fOwnerDocument = (CSSDocumentImpl) ownerDocument;
- }
-
- /**
- * @param parentNode
- * com.ibm.sed.css.interfaces.ICSSNode
- */
- private void setParentNode(ICSSNode parentNode) {
- this.fParentNode = (CSSNodeImpl) parentNode;
- }
-
- /**
- * @param previousSibling
- * com.ibm.sed.css.interfaces.ICSSNode
- */
- private void setPreviousSibling(ICSSNode previousSibling) {
- this.fPreviousSibling = (CSSNodeImpl) previousSibling;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeListImpl.java
deleted file mode 100644
index 92c85597fa..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeListImpl.java
+++ /dev/null
@@ -1,38 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSNodeList;
-
-/**
- *
- */
-class CSSNodeListImpl extends AbstractCSSNodeList implements ICSSNodeList {
-
- /**
- * CSSNodeListImpl constructor comment.
- */
- CSSNodeListImpl() {
- super();
- }
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- * @param index
- * int
- */
- public ICSSNode item(int index) {
- return itemImpl(index);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPageRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPageRuleImpl.java
deleted file mode 100644
index c3c7d09f9f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPageRuleImpl.java
+++ /dev/null
@@ -1,110 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPageRule;
-import org.eclipse.wst.css.core.document.ICSSSelectorList;
-
-
-/**
- *
- */
-class CSSPageRuleImpl extends CSSRuleDeclContainer implements ICSSPageRule {
-
- ICSSSelectorList fSelectorList = new CSSSelectorListImpl(null);
-
- /**
- *
- */
- CSSPageRuleImpl() {
- super();
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSPageRuleImpl
- */
- CSSPageRuleImpl(CSSPageRuleImpl that) {
- super(that);
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSPageRuleImpl cloned = new CSSPageRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return java.lang.String
- */
- String extractPreString() {
- StringBuffer preStr = new StringBuffer("@page ");//$NON-NLS-1$
- preStr.append(getSelectorText());
-
- return preStr.toString();
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return PAGERULE_NODE;
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSSelectorList
- */
- public ICSSSelectorList getSelectors() {
- return fSelectorList;
- }
-
- /**
- * The parsable textual representation of the page selector for the rule.
- *
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the specified CSS string value has
- * a syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is
- * readonly.
- */
- public String getSelectorText() {
- return getAttribute(SELECTOR);
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return PAGE_RULE;
- }
-
- /**
- *
- */
- public void setSelectorText(String selectorText) throws org.w3c.dom.DOMException {
- setAttribute(SELECTOR, selectorText);
- fSelectorList = new CSSSelectorListImpl(selectorText);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveContainer.java
deleted file mode 100644
index ba20a24eff..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveContainer.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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSDocument;
-
-/**
- *
- */
-abstract class CSSPrimitiveContainer extends CSSPrimitiveValueImpl {
-
- /**
- * CSSRegionContainer constructor comment.
- *
- * @param that
- * com.ibm.sed.css.treemodel.CSSPrimitiveValueImpl
- */
- CSSPrimitiveContainer(CSSPrimitiveContainer that) {
- super(that);
- }
-
- /**
- * CSSRegionContainer constructor comment.
- *
- * @param primitiveType
- * short
- */
- CSSPrimitiveContainer(short primitiveType) {
- super(primitiveType);
- }
-
- /**
- *
- */
- protected abstract void initPrimitives();
-
- /**
- * @param ownerDocument
- * com.ibm.sed.css.interfaces.ICSSDocument
- */
- void setOwnerDocument(ICSSDocument ownerDocument) {
- super.setOwnerDocument(ownerDocument);
-
- initPrimitives();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveValueImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveValueImpl.java
deleted file mode 100644
index 285d4d0405..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveValueImpl.java
+++ /dev/null
@@ -1,374 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.Counter;
-import org.w3c.dom.css.RGBColor;
-import org.w3c.dom.css.Rect;
-
-
-/**
- *
- */
-class CSSPrimitiveValueImpl extends CSSRegionContainer implements ICSSPrimitiveValue {
-
- protected short fPrimitiveType = CSS_UNKNOWN;
- private float fFloatValue = 0.0f;
- private String fStringValue = null;
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSPrimitiveValueImpl
- */
- CSSPrimitiveValueImpl(CSSPrimitiveValueImpl that) {
- super(that);
-
- this.fPrimitiveType = that.fPrimitiveType;
- this.fFloatValue = that.fFloatValue;
- this.fStringValue = that.fStringValue;
- }
-
- /**
- *
- */
- CSSPrimitiveValueImpl(short primitiveType) {
- super();
- fPrimitiveType = primitiveType;
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSPrimitiveValueImpl cloned = new CSSPrimitiveValueImpl(this);
-
- return cloned;
- }
-
- /**
- * This method is used to get the Counter value. If this CSS value doesn't
- * contain a counter value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>Counter</code> interface.
- *
- * @return The Counter value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a Counter value (e.g. this is not
- * <code>CSS_COUNTER</code>).
- */
- public Counter getCounterValue() throws DOMException {
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
-
- /**
- * @return java.lang.String
- */
- public java.lang.String getCSSValueText() {
- return getCssText();
- }
-
- /**
- * A code defining the type of the value as defined above.
- */
- public short getCssValueType() {
- if (getPrimitiveType() == CSS_INHERIT_PRIMITIVE) {
- return CSS_INHERIT;
- }
- else {
- return CSS_PRIMITIVE_VALUE;
- }
- }
-
- /**
- * This method is used to get a float value in a specified unit. If this
- * CSS value doesn't contain a float value or can't be converted into the
- * specified unit, a <code>DOMException</code> is raised.
- *
- * @param unitType
- * A unit code to get the float value. The unit code can only
- * be a float unit type (i.e. <code>CSS_NUMBER</code>,
- * <code>CSS_PERCENTAGE</code>,<code>CSS_EMS</code>,
- * <code>CSS_EXS</code>,<code>CSS_PX</code>,
- * <code>CSS_CM</code>,<code>CSS_MM</code>,
- * <code>CSS_IN</code>,<code>CSS_PT</code>,
- * <code>CSS_PC</code>,<code>CSS_DEG</code>,
- * <code>CSS_RAD</code>,<code>CSS_GRAD</code>,
- * <code>CSS_MS</code>,<code>CSS_S</code>,
- * <code>CSS_HZ</code>,<code>CSS_KHZ</code>,
- * <code>CSS_DIMENSION</code>).
- * @return The float value in the specified unit.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a float value or if the float value can't be
- * converted into the specified unit.
- */
- public float getFloatValue(short unitType) throws DOMException {
- switch (fPrimitiveType) {
- case CSS_NUMBER :
- case CSS_PERCENTAGE :
- case CSS_EMS :
- case CSS_EXS :
- case CSS_PX :
- case CSS_CM :
- case CSS_MM :
- case CSS_IN :
- case CSS_PT :
- case CSS_PC :
- case CSS_DEG :
- case CSS_RAD :
- case CSS_GRAD :
- case CSS_MS :
- case CSS_S :
- case CSS_HZ :
- case CSS_KHZ :
- case CSS_DIMENSION :
- case CSS_INTEGER :
- case CSS_HASH :
- return fFloatValue;
- default :
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/01/17
- * 12:12:18)
- *
- * @return short
- */
- public short getNodeType() {
- return PRIMITIVEVALUE_NODE;
- }
-
- /**
- * The type of the value as defined by the constants specified above.
- */
- public short getPrimitiveType() {
- return fPrimitiveType;
- }
-
- /**
- * This method is used to get the Rect value. If this CSS value doesn't
- * contain a rect value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>Rect</code> interface.
- *
- * @return The Rect value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a Rect value. (e.g. this is not
- * <code>CSS_RECT</code>).
- */
- public Rect getRectValue() throws DOMException {
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
-
- /**
- * This method is used to get the RGB color. If this CSS value doesn't
- * contain a RGB color value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>RGBColor</code> interface.
- *
- * @return the RGB color value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the attached property
- * can't return a RGB color value (e.g. this is not
- * <code>CSS_RGBCOLOR</code>).
- */
- public RGBColor getRGBColorValue() throws DOMException {
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
-
- /**
- * This method is used to get the string value. If the CSS value doesn't
- * contain a string value, a <code>DOMException</code> is raised. Some
- * properties (like 'font-family' or 'voice-family') convert a whitespace
- * separated list of idents to a string.
- *
- * @return The string value in the current unit. The current
- * <code>primitiveType</code> can only be a string unit type
- * (i.e. <code>CSS_STRING</code>,<code>CSS_URI</code>,
- * <code>CSS_IDENT</code> and <code>CSS_ATTR</code>).
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a string value.
- */
- public String getStringValue() throws DOMException {
- switch (fPrimitiveType) {
- case CSS_STRING :
- case CSS_URI :
- case CSS_IDENT :
- case CSS_ATTR :
- case CSS_URANGE :
- case CSS_FORMAT :
- case CSS_LOCAL :
- case CSS_HASH :
- case CSS_COMMA :
- case CSS_SLASH :
- case CSS_INHERIT_PRIMITIVE :
- return fStringValue;
- default :
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void notifyValueChanged(String oldValue) {
- // for model
- ICSSDocument doc = getContainerDocument();
- if (doc == null)
- return;
- CSSModelImpl model = (CSSModelImpl) doc.getModel();
- if (model == null)
- return;
- model.valueChanged(this, oldValue);
-
- // for adapters
- notify(CHANGE, new Short(fPrimitiveType), null, null, getStartOffset());
- }
-
- /**
- * A method to set the float value with a specified unit. If the property
- * attached with this value can not accept the specified unit or the float
- * value, the value will be unchanged and a <code>DOMException</code>
- * will be raised.
- *
- * @param unitType
- * A unit code as defined above. The unit code can only be a
- * float unit type (i.e. <code>CSS_NUMBER</code>,
- * <code>CSS_PERCENTAGE</code>,<code>CSS_EMS</code>,
- * <code>CSS_EXS</code>,<code>CSS_PX</code>,
- * <code>CSS_CM</code>,<code>CSS_MM</code>,
- * <code>CSS_IN</code>,<code>CSS_PT</code>,
- * <code>CSS_PC</code>,<code>CSS_DEG</code>,
- * <code>CSS_RAD</code>,<code>CSS_GRAD</code>,
- * <code>CSS_MS</code>,<code>CSS_S</code>,
- * <code>CSS_HZ</code>,<code>CSS_KHZ</code>,
- * <code>CSS_DIMENSION</code>).
- * @param floatValue
- * The new float value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the attached property
- * doesn't support the float value or the unit type. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public void setFloatValue(short unitType, float floatValue) throws DOMException {
- switch (unitType) {
- case CSS_NUMBER :
- case CSS_PERCENTAGE :
- case CSS_EMS :
- case CSS_EXS :
- case CSS_PX :
- case CSS_CM :
- case CSS_MM :
- case CSS_IN :
- case CSS_PT :
- case CSS_PC :
- case CSS_DEG :
- case CSS_RAD :
- case CSS_GRAD :
- case CSS_MS :
- case CSS_S :
- case CSS_HZ :
- case CSS_KHZ :
- case CSS_DIMENSION :
- case CSS_INTEGER :
- String oldValue = getCSSValueText();
- fPrimitiveType = unitType;
- fFloatValue = floatValue;
- notifyValueChanged(oldValue);
- break;
- default :
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * A method to set the string value with the specified unit. If the
- * property attached to this value can't accept the specified unit or the
- * string value, the value will be unchanged and a
- * <code>DOMException</code> will be raised.
- *
- * @param stringType
- * A string code as defined above. The string code can only be
- * a string unit type (i.e. <code>CSS_STRING</code>,
- * <code>CSS_URI</code>,<code>CSS_IDENT</code>, and
- * <code>CSS_ATTR</code>).
- * @param stringValue
- * The new string value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a string value or if the string value can't be
- * converted into the specified unit. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public void setStringValue(short stringType, String stringValue) throws DOMException {
- switch (stringType) {
- case CSS_STRING :
- case CSS_URI :
- case CSS_IDENT :
- case CSS_ATTR :
- case CSS_URANGE :
- case CSS_FORMAT :
- case CSS_LOCAL :
- case CSS_HASH :
- case CSS_COMMA :
- case CSS_SLASH :
- case CSS_INHERIT_PRIMITIVE :
- String oldValue = getCSSValueText();
- fPrimitiveType = stringType;
- fStringValue = stringValue;
- notifyValueChanged(oldValue);
- break;
- default :
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/01/24
- * 15:06:25)
- *
- * @param floatValue
- * float
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setValue(float floatValue) throws org.w3c.dom.DOMException {
- setFloatValue(getPrimitiveType(), floatValue);
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/01/24
- * 15:06:25)
- *
- * @param stringValue
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setValue(java.lang.String stringValue) throws org.w3c.dom.DOMException {
- setStringValue(getPrimitiveType(), stringValue);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRegionContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRegionContainer.java
deleted file mode 100644
index e83c8ce051..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRegionContainer.java
+++ /dev/null
@@ -1,257 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-
-/**
- *
- */
-abstract class CSSRegionContainer extends CSSNodeImpl {
-
- private ITextRegion fFirstRegion = null;
- private ITextRegion fLastRegion = null;
- private IStructuredDocumentRegion fParentRegion = null;
-
- /**
- * CSSRegionContainer constructor comment.
- */
- CSSRegionContainer() {
- super();
- }
-
- /**
- * CSSRegionContainer constructor comment.
- *
- * @param that
- * com.ibm.sed.css.treemodel.CSSRegionContainer
- */
- CSSRegionContainer(CSSRegionContainer that) {
- super(that);
- }
-
- /**
- * @return java.lang.String
- */
- public String getCssText() {
- if (fFirstRegion == null || fLastRegion == null)
- return generateSource();
-
- ITextRegionList regions = fParentRegion.getRegions();
- StringBuffer source = new StringBuffer();
- boolean bIn = false;
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion current = regions.get(i);
- if (bIn) {
- source.append(fParentRegion.getText(current));
- if (current == fLastRegion)
- break;
- }
- else {
- if (current == fFirstRegion) {
- bIn = true;
- source.append(fParentRegion.getText(current));
- if (current == fLastRegion)
- break;
- }
- }
- }
-
- return source.toString();
- }
-
- /**
- * @return int
- */
- public int getEndOffset() {
- ITextRegion region = getLastRegion();
- if (region == null || fParentRegion == null) {
- return -1;
- }
- else {
- return fParentRegion.getEndOffset(region);
- }
- /*
- * int offset = 0; if (lastRegion != null) offset =
- * lastRegion.getEnd();
- *
- * CSSStructuredDocumentRegionContainer item = null; ICSSNode node =
- * getParentNode(); while (node != null) { if (node instanceof
- * CSSStructuredDocumentRegionContainer) item =
- * (CSSStructuredDocumentRegionContainer) node; node =
- * node.getParentNode(); } if (item != null) { // assumption: regions
- * are attached to FIRST node IStructuredDocumentRegion flatNode =
- * item.getFirstStructuredDocumentRegion(); if (flatNode != null)
- * return (flatNode.getStart() + offset); } return 0;
- */
- }
-
- IStructuredDocumentRegion getDocumentRegion() {
- return fParentRegion;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.ITextRegion
- */
- ITextRegion getFirstRegion() {
- return fFirstRegion;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.ITextRegion
- */
- ITextRegion getLastRegion() {
- return fLastRegion;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.ITextRegion
- * @param index
- * int
- */
- ITextRegion getRegion(int index) {
- if (getFirstRegion() == null)
- return null;
- ITextRegionList regions = fParentRegion.getRegions();
-
- for (int i = 0; i < regions.size(); i++) {
- if (regions.get(i) == getFirstRegion()) {
- if (i + index < regions.size()) {
- ITextRegion target = regions.get(i + index);
- if (target.getStart() <= getLastRegion().getStart())
- return target;
- }
- return null;
- }
- }
- return null;
- }
-
- /**
- * @return int
- */
- int getRegionCount() {
- validateRange();
-
- if (getFirstRegion() == null)
- return 0;
- if (getFirstRegion() == getLastRegion())
- return 1;
- ITextRegionList regions = fParentRegion.getRegions();
-
- int j = 0;
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion current = regions.get(i);
- if (j != 0 || current == getFirstRegion())
- j++;
- if (current == getLastRegion())
- break;
- }
- return j;
- }
-
- /**
- * @return int
- */
- public int getStartOffset() {
- ITextRegion region = getFirstRegion();
- if (region == null || fParentRegion == null) {
- return -1;
- }
- else {
- return fParentRegion.getStartOffset(region);
- }
- /*
- * int offset = 0; if (firstRegion != null) offset =
- * firstRegion.getStart();
- *
- * CSSStructuredDocumentRegionContainer item = null; ICSSNode node =
- * getParentNode(); while (node != null) { if (node instanceof
- * CSSStructuredDocumentRegionContainer) item =
- * (CSSStructuredDocumentRegionContainer) node; node =
- * node.getParentNode(); } if (item != null) { // assumption: regions
- * are attached to FIRST node IStructuredDocumentRegion flatNode =
- * item.getFirstStructuredDocumentRegion(); if (flatNode != null)
- * return (flatNode.getStart() + offset); } return 0;
- */
- }
-
- /**
- * @param region
- * com.ibm.sed.structuredDocument.ITextRegion
- * @deprecated
- */
- ITextRegion setFirstRegion(ITextRegion region) {
- this.fFirstRegion = region;
- return region;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.ITextRegion
- * @param lastRegion
- * com.ibm.sed.structuredDocument.ITextRegion
- * @deprecated
- */
- ITextRegion setLastRegion(ITextRegion lastRegion) {
- this.fLastRegion = lastRegion;
- return lastRegion;
- }
-
- /**
- * @param firstRegion
- * com.ibm.sed.structuredDocument.ITextRegion
- * @param lastRegion
- * com.ibm.sed.structuredDocument.ITextRegion
- */
- void setRangeRegion(IStructuredDocumentRegion parentRegion, ITextRegion firstRegion, ITextRegion lastRegion) {
- this.fParentRegion = parentRegion;
- this.fFirstRegion = firstRegion;
- this.fLastRegion = lastRegion;
-
- if (firstRegion == null && lastRegion == null) {
- setFirstRegion(null);
- setLastRegion(null);
- }
- else { // range validation
- validateRange();
- }
- }
-
- /**
- * @return boolean
- */
- private boolean validateRange() {
- boolean bModified = false;
-
- if (this.fFirstRegion != null || this.fLastRegion != null) {
- if (this.fFirstRegion == null) {
- this.fFirstRegion = this.fLastRegion;
- bModified = true;
- }
- else if (this.fLastRegion == null) {
- this.fLastRegion = this.fFirstRegion;
- bModified = true;
- }
- else if (this.fFirstRegion.getStart() > this.fLastRegion.getStart()) {
- // need to swap first for last
- ITextRegion reg = fFirstRegion;
- fFirstRegion = fLastRegion;
- fLastRegion = reg;
- bModified = true;
- }
- }
- return bModified;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleDeclContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleDeclContainer.java
deleted file mode 100644
index d983a425e6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleDeclContainer.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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-
-/**
- *
- */
-abstract class CSSRuleDeclContainer extends CSSRuleImpl {
-
- /**
- * CSSRuleDeclContainer constructor comment.
- */
- CSSRuleDeclContainer() {
- super();
- }
-
- /**
- * CSSRuleDeclContainer constructor comment.
- *
- * @param that
- * com.ibm.sed.css.treemodel.CSSRuleImpl
- */
- CSSRuleDeclContainer(CSSRuleDeclContainer that) {
- super(that);
- }
-
- /**
- * @return java.lang.String
- */
- abstract String extractPreString();
-
- /**
- * @return org.w3c.dom.css.CSSStyleDeclaration
- */
- public CSSStyleDeclaration getStyle() {
-
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSStyleDeclaration)
- return (CSSStyleDeclaration) node;
- }
-
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleImpl.java
deleted file mode 100644
index d6cf4aae79..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleImpl.java
+++ /dev/null
@@ -1,84 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSStyleSheet;
-
-
-/**
- *
- */
-abstract class CSSRuleImpl extends CSSStructuredDocumentRegionContainer implements CSSRule {
-
- /**
- *
- */
- CSSRuleImpl() {
- super();
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSRuleImpl
- */
- CSSRuleImpl(CSSRuleImpl that) {
- super(that);
- }
-
- /**
- * If this rule is contained inside another rule (e.g. a style rule inside
- * an
- *
- * @media block), this is the containing rule. If this rule is not nested
- * inside any other rules, this returns <code>null</code>.
- */
- public CSSRule getParentRule() {
- ICSSNode rule = getParentNode();
-
- // parent rule is used only if parent is media rule
- if (rule instanceof CSSMediaRuleImpl)
- return (CSSRule) rule;
-
- return null;
- }
-
- /**
- * The style sheet that contains this rule.
- */
- public CSSStyleSheet getParentStyleSheet() {
- ICSSNode parent = getParentNode();
- while (parent != null) {
- if (parent instanceof CSSStyleSheetImpl)
- return (CSSStyleSheet) parent;
- parent = parent.getParentNode();
- }
- return null;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public abstract short getType();
-
- /**
- * @return boolean
- */
- public boolean hasProperties() {
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleListImpl.java
deleted file mode 100644
index 51f15a490b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleListImpl.java
+++ /dev/null
@@ -1,45 +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.css.core.internal.document;
-
-
-
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSRuleList;
-
-/**
- *
- */
-public class CSSRuleListImpl extends AbstractCSSNodeList implements CSSRuleList {
-
- /**
- *
- */
- CSSRuleListImpl() {
- super();
- }
-
- /**
- * Used to retrieve a CSS rule by ordinal index. The order in this
- * collection represents the order of the rules in the CSS style sheet. If
- * index is greater than or equal to the number of rules in the list, this
- * returns <code>null</code>.
- *
- * @param indexIndex
- * into the collection
- * @return The style rule at the <code>index</code> position in the
- * <code>CSSRuleList</code>, or <code>null</code> if that is
- * not a valid index.
- */
- public CSSRule item(int index) {
- return (CSSRule) itemImpl(index);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelector.java
deleted file mode 100644
index e3cdea06a1..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelector.java
+++ /dev/null
@@ -1,427 +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.css.core.internal.document;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.wst.css.core.adapters.IStyleSelectorAdapter;
-import org.eclipse.wst.css.core.document.ICSSSelector;
-import org.eclipse.wst.css.core.document.ICSSSelectorCombinator;
-import org.eclipse.wst.css.core.document.ICSSSelectorItem;
-import org.eclipse.wst.css.core.document.ICSSSimpleSelector;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.xml.core.NameValidator;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- *
- */
-class CSSSelector implements ICSSSelector {
-
- private int fSpecificity = -1;
- private String fCachedString = null;
- private List fTokens = null;
- private List fItems = null;
- private List fParseErrors = null;
- private List fNameErrors = null;
-
- CSSSelector(List tokens) {
- fTokens = new ArrayList(tokens);
- }
-
- /**
- * @return boolean
- * @param obj
- * java.lang.Object
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null || this.getClass() != obj.getClass())
- return false;
-
- CSSSelector foreign = (CSSSelector) obj;
-
- // if (fSpecificity != foreign.fSpecificity) return false;
-
- if (getLength() != foreign.getLength())
- return false;
-
- for (int i = 0; i < getLength(); i++) {
- if (!getItem(i).equals(foreign.getItem(i)))
- return false;
- }
-
- return true;
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSSelectorItem
- * @param index
- * int
- */
- public ICSSSelectorItem getItem(int index) {
- if (fItems == null) {
- fItems = parseSelector(fTokens);
- }
- if (fItems != null && 0 <= index && index < fItems.size()) {
- return (ICSSSelectorItem) fItems.get(index);
- }
- else {
- return null;
- }
- }
-
- /**
- * @return java.util.Iterator
- */
- public Iterator getIterator() {
- if (fItems == null) {
- fItems = parseSelector(fTokens);
- }
- return (fItems != null) ? fItems.iterator() : null;
- }
-
- /**
- * @return int
- */
- public int getLength() {
- if (fItems == null) {
- fItems = parseSelector(fTokens);
- }
- return (fItems != null) ? fItems.size() : 0;
- }
-
- /**
- * @return org.w3c.dom.Element
- */
- private Element getParentElement(Element element) {
- try {
- element = (Element) element.getParentNode();
- }
- catch (Exception ex) {
- // cast error or null pointer ...
- element = null;
- }
- return element;
- }
-
- /**
- * @return org.w3c.dom.Element
- */
- private Element getPreviousElement(Element element) {
- Element p = null;
- for (Node node = element.getPreviousSibling(); node != null; node = node.getPreviousSibling()) {
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- p = (Element) node;
- break;
- }
- }
- return p;
- }
-
- /**
- * Calculate a selector's specificity a = the number of ID attributes in
- * the selector b = the number of other attributes and pseudo-classes in
- * the selector c = the number of element names in the selector (ignore
- * pseudo-elements) Concatenating the three numbers a-b-c (in a number
- * system with a large base) gives the specificity.
- *
- * @return int
- */
- public int getSpecificity() {
- if (fSpecificity < 0) {
- int nIDs = 0;
- int nAttributes = 0;
- int nElements = 0;
- Iterator i = getIterator();
- while (i.hasNext()) {
- ICSSSelectorItem item = (ICSSSelectorItem) i.next();
- if (item instanceof CSSSimpleSelector) {
- CSSSimpleSelector selector = (CSSSimpleSelector) item;
- nIDs += selector.getNumOfIDs();
- nAttributes += selector.getNumOfAttributes();
- nAttributes += selector.getNumOfClasses();
- nAttributes += selector.getNumOfPseudoNames();
- if (!selector.isUniversal()) {
- nElements++;
- }
- }
- }
- fSpecificity = nIDs * 10000 + nAttributes * 100 + nElements;
- }
-
- return fSpecificity;
- }
-
- /**
- * @return java.lang.String
- */
- public String getString() {
- if (fCachedString == null) {
- StringBuffer buf = new StringBuffer();
- Iterator i = getIterator();
- while (i.hasNext()) {
- ICSSSelectorItem item = (ICSSSelectorItem) i.next();
- if (item instanceof CSSSelectorCombinator) {
- // If item is DESCENDANT combinator, it is just single
- // space.
- // Then, you dont have to append string..
- if (((CSSSelectorCombinator) item).getCombinatorType() != ICSSSelectorCombinator.DESCENDANT) {
- buf.append(" ");//$NON-NLS-1$
- buf.append(item.getString());
- }
- buf.append(" ");//$NON-NLS-1$
- }
- else {
- buf.append(item.getString());
- }
- }
- fCachedString = buf.toString();
- }
-
- return fCachedString;
- }
-
- /**
- * @return boolean
- * @param element
- * org.w3c.dom.Element
- */
- public boolean match(org.w3c.dom.Element element, java.lang.String pseudoName) {
- Element target = element;
- char combinatorType = ICSSSelectorCombinator.UNKNOWN;
- Element chunkStartElement = null; // for CHILD and ADJACENT
- // combinator
- int chunkStartItem = -1; // for CHILD and ADJACENT combinator
- int numItems = getLength();
- for (int iItem = numItems - 1; iItem >= 0; iItem--) {
- // Check Selector Items
- ICSSSelectorItem item = getItem(iItem);
- if (item instanceof ICSSSimpleSelector) {
- // Simple Selector
- if (target == null)
- return false;
- if (!matchExactly((ICSSSimpleSelector) item, target, pseudoName)) {
- switch (combinatorType) {
- case ICSSSelectorCombinator.DESCENDANT :
- do {
- target = getParentElement(target);
- if (target == null)
- return false;
- }
- while (!matchExactly((ICSSSimpleSelector) item, target, pseudoName));
- break;
- case ICSSSelectorCombinator.CHILD :
- case ICSSSelectorCombinator.ADJACENT :
- if (chunkStartElement != null && chunkStartElement != element) {
- // previous conbinator must be DESCENDENT.
- // goto parent
- target = getParentElement(chunkStartElement);
- iItem = chunkStartItem + 1;
- chunkStartElement = null;
- chunkStartItem = -1;
- break;
- }
- default :
- // other combinators are not supported yet.
- return false;
- }
- }
- }
- else if (item instanceof ICSSSelectorCombinator) {
- // Combinator ( "+", ">", " ", ...)
- if (iItem == numItems - 1)
- return false; // last item is combinator
-
- ICSSSelectorCombinator sc = (ICSSSelectorCombinator) item;
- combinatorType = sc.getCombinatorType();
- switch (combinatorType) {
- case ICSSSelectorCombinator.DESCENDANT :
- target = getParentElement(target);
- break;
- case ICSSSelectorCombinator.CHILD :
- case ICSSSelectorCombinator.ADJACENT :
- if (chunkStartElement == null) {
- chunkStartElement = target;
- chunkStartItem = iItem + 1; // safe because this
- // is not a last item.
- }
- if (combinatorType == ICSSSelectorCombinator.CHILD) {
- target = getParentElement(target);
- }
- else {
- target = getPreviousElement(target);
- }
- break;
- }
- }
- else {
- // what is this item ???
- return false;
- }
- }
- // OK this selector maches the element.
- return true;
-
- }
-
- /**
- * @return boolean
- */
- private boolean matchExactly(ICSSSimpleSelector selector, Element element, String pseudoName) {
- IStyleSelectorAdapter adapter = (IStyleSelectorAdapter) ((INodeNotifier) element).getAdapterFor(IStyleSelectorAdapter.class);
- if (adapter != null) {
- return adapter.match(selector, element, pseudoName);
- }
-
- if (element == null)
- return false;
- int i;
- String key;
-
- // TODO: PseudoName
-
- // check tag name
- if (!selector.isUniversal() && !element.getNodeName().equals(selector.getName()))
- return false;
-
- // check id
- i = selector.getNumOfIDs();
- if (i > 0) {
- if (i > 1)
- return false;
- key = element.getAttribute("id");//$NON-NLS-1$
- if (key == null)
- return false;
- if (!selector.getID(0).equals(key))
- return false;
- }
-
- // check class
- i = selector.getNumOfClasses();
- if (i > 0) {
- key = element.getAttribute("class");//$NON-NLS-1$
- if (key == null)
- return false;
- StringTokenizer tokenizer = new StringTokenizer(key);
- for (i = i - 1; i >= 0; i--) {
- boolean ok = false;
- while (tokenizer.hasMoreTokens()) {
- if (selector.getClass(i).equals(tokenizer.nextToken())) {
- ok = true;
- break;
- }
- }
- if (!ok)
- return false;
- }
- }
-
- // check attributes
- for (i = selector.getNumOfAttributes() - 1; i >= 0; i--) {
- StringTokenizer tokenizer = new StringTokenizer(selector.getAttribute(i), "=~| \t\r\n\f");//$NON-NLS-1$
- int countTokens = tokenizer.countTokens();
- if (countTokens > 0) {
- String attrValue = element.getAttribute(tokenizer.nextToken());
- if (attrValue == null)
- return false;
- if (countTokens > 1) {
- String token = tokenizer.nextToken("= \t\r\n\f");//$NON-NLS-1$
- StringTokenizer attrValueTokenizer = null;
- if (token.equals("~")) {//$NON-NLS-1$
- attrValueTokenizer = new StringTokenizer(attrValue);
- }
- else if (token.equals("|")) {//$NON-NLS-1$
- attrValueTokenizer = new StringTokenizer(attrValue, "-");//$NON-NLS-1$
- }
- if (attrValueTokenizer != null) {
- if (tokenizer.hasMoreTokens()) {
- token = tokenizer.nextToken();
- boolean ok = false;
- while (attrValueTokenizer.hasMoreTokens()) {
- if (token.equals(attrValueTokenizer.nextToken())) {
- ok = true;
- break;
- }
- }
- if (!ok)
- return false;
- }
- }
- else {
- if (!attrValue.equals(token))
- return false;
- }
- }
- }
- }
-
- return true;
- }
-
- private List parseSelector(List tokens) {
- CSSSelectorParser parser = new CSSSelectorParser(tokens);
- List selector = parser.getSelector();
- Iterator i = parser.getErrors();
- fParseErrors = new ArrayList();
- while (i.hasNext()) {
- fParseErrors.add(i.next());
- }
- return selector;
- }
-
- public Iterator getErrors() {
- if (fNameErrors == null) {
- fNameErrors = new ArrayList();
- Iterator iItem = getIterator();
- while (iItem.hasNext()) {
- ICSSSelectorItem item = (ICSSSelectorItem) iItem.next();
- if (item instanceof ICSSSimpleSelector) {
- if (!((ICSSSimpleSelector) item).isUniversal()) {
- String name = ((ICSSSimpleSelector) item).getName();
- if (!NameValidator.isValid(name)) {
- fNameErrors.add(item);
- }
- }
- }
- }
- }
- List errors = new ArrayList(fParseErrors);
- errors.addAll(fNameErrors);
- return errors.iterator();
- }
-
- public String toString() {
- return getString();
- }
-
- /**
- * @see ICSSSelector#getErrorCount()
- */
- public int getErrorCount() {
- int nErrors = 0;
- Iterator i = getErrors();
- while (i.hasNext()) {
- nErrors++;
- i.next();
- }
- return nErrors;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorCombinator.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorCombinator.java
deleted file mode 100644
index 895ecb2343..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorCombinator.java
+++ /dev/null
@@ -1,76 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSSelectorCombinator;
-
-/**
- *
- */
-class CSSSelectorCombinator extends CSSSelectorItem implements ICSSSelectorCombinator {
-
- char fType = ICSSSelectorCombinator.UNKNOWN;
-
- /**
- * CSSSelectorCombinator constructor comment.
- */
- public CSSSelectorCombinator(char type) {
- super();
- setCombinatorType(type);
- }
-
- /**
- * @return boolean
- * @param obj
- * java.lang.Object
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null || this.getClass() != obj.getClass())
- return false;
-
- CSSSelectorCombinator foreign = (CSSSelectorCombinator) obj;
-
- return (getCombinatorType() == foreign.getCombinatorType());
-
- }
-
- /**
- * @return int
- */
- public char getCombinatorType() {
- return fType;
- }
-
- /**
- * @return int
- */
- public int getItemType() {
- return COMBINATOR;
- }
-
- /**
- * @return java.lang.String
- */
- public String getString() {
- StringBuffer buf = new StringBuffer();
- buf.append(fType);
- return buf.toString();
- }
-
- void setCombinatorType(char type) {
- fType = type;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorItem.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorItem.java
deleted file mode 100644
index 721b3a31a6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorItem.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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSSelectorItem;
-
-/**
- *
- */
-abstract class CSSSelectorItem implements ICSSSelectorItem {
-
- /**
- * CSSSelectorItem constructor comment.
- */
- public CSSSelectorItem() {
- super();
- }
-
- /**
- * @return int
- */
- public int getItemType() {
- return 0;
- }
-
- /**
- * @return java.lang.String
- */
- public String getString() {
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java
deleted file mode 100644
index f6faac4d92..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java
+++ /dev/null
@@ -1,212 +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.css.core.internal.document;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.document.ICSSSelector;
-import org.eclipse.wst.css.core.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-import org.w3c.dom.Element;
-
-
-/**
- *
- */
-public class CSSSelectorListImpl implements ICSSSelectorList {
-
- private String fText = null;
- private String fCachedString = null; // normalized string
- private List fSelectors = null;
-
- public CSSSelectorListImpl(String cssText) {
- super();
- fText = cssText;
- parseSelectorText();
- }
-
- /**
- * @return boolean
- * @param obj
- * java.lang.Object
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null || this.getClass() != obj.getClass())
- return false;
-
- CSSSelectorListImpl foreign = (CSSSelectorListImpl) obj;
-
- if (getLength() != foreign.getLength())
- return false;
-
- for (int i = 0; i < getLength(); i++) {
- if (!getSelector(i).equals(foreign.getSelector(i)))
- return false;
- }
-
- return true;
- }
-
- /**
- * @return java.util.Iterator
- */
- public Iterator getIterator() {
- return getSelectors().iterator();
- }
-
- /**
- * @return int
- */
- public int getLength() {
- return getSelectors().size();
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSSelector
- * @param index
- * int
- */
- public ICSSSelector getSelector(int index) {
- List selectors = getSelectors();
- if (0 <= index && index < selectors.size()) {
- return (ICSSSelector) selectors.get(index);
- }
- else {
- return null;
- }
- }
-
- private List getSelectors() {
- if (fSelectors == null) {
- parseSelectorText();
- }
- return fSelectors;
- }
-
- /**
- * @return java.lang.String
- */
- public String getString() {
- if (fCachedString == null) {
- StringBuffer buf = new StringBuffer();
- boolean bFirst = true;
- // groups is list of comma-separated selectors
- Iterator i = getSelectors().iterator();
- while (i.hasNext()) {
- if (!bFirst) {
- buf.append(", ");//$NON-NLS-1$
- }
- ICSSSelector item = (ICSSSelector) i.next();
- buf.append(item.getString());
- bFirst = false;
- }
- fCachedString = buf.toString();
- }
- return fCachedString;
- }
-
- /**
- * @return boolean
- * @param element
- * org.w3c.dom.Element
- */
- public boolean match(Element element, String pseudoName) {
- int nSelectors = getLength();
- selectorListLoop : for (int iSelector = 0; iSelector < nSelectors; iSelector++) {
- // Check each Selector Lists
- ICSSSelector selector = getSelector(iSelector);
- if (selector.match(element, pseudoName))
- return true;
- }
- return false;
- }
-
- /**
- *
- */
- private void parseSelectorText() {
- fSelectors = new ArrayList();
- if (fText == null) {
- return;
- }
-
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_STYLESHEET, fText);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return;
- }
-
- List tokenGroup = new ArrayList();
- for (int i = 0; i < tokens.length; i++) {
- CSSTextToken token = tokens[i];
- if (token.kind == CSSRegionContexts.CSS_SELECTOR_SEPARATOR && 0 < tokenGroup.size()) {
- ICSSSelector selector = new CSSSelector(tokenGroup);
- if (selector != null) {
- fSelectors.add(selector);
- }
- tokenGroup.clear();
- }
- else {
- tokenGroup.add(tokens[i]);
- }
- }
- if (0 < tokenGroup.size()) {
- ICSSSelector selector = new CSSSelector(tokenGroup);
- if (selector != null) {
- fSelectors.add(selector);
- }
- }
- }
-
- /**
- *
- */
- public String toString() {
- return getString();
- }
-
- /**
- *
- */
- public Iterator getErrors() {
- List errors = new ArrayList();
- Iterator iSelector = getSelectors().iterator();
- while (iSelector.hasNext()) {
- Iterator iError = ((ICSSSelector) iSelector.next()).getErrors();
- while (iError.hasNext()) {
- errors.add(iError.next());
- }
- }
- return errors.iterator();
- }
-
- /**
- *
- */
- public int getErrorCount() {
- int nErrors = 0;
- Iterator i = getErrors();
- while (i.hasNext()) {
- nErrors++;
- i.next();
- }
- return nErrors;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorParser.java
deleted file mode 100644
index 1e9117e4c2..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorParser.java
+++ /dev/null
@@ -1,335 +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.css.core.internal.document;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.document.ICSSSelectorCombinator;
-import org.eclipse.wst.css.core.document.ICSSSelectorItem;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- *
- */
-public class CSSSelectorParser {
-
- private final static int IDLE = 0;
- private final static int ATTRIBUTE = 1;
- private final static int SIMPLE = 2;
-
- private List fTokens = null;
- private List fItems = null;
- private List fErrors = null;
-
- /**
- *
- */
- CSSSelectorParser(List tokens) {
- super();
- fTokens = new ArrayList(tokens);
- }
-
- /**
- *
- */
- List getSelector() {
- if (fItems == null) {
- parseSelector();
- }
- return fItems;
- }
-
- /**
- *
- */
- private void parseSelector() {
- fItems = new ArrayList();
-
- List attrBuf = null;
- CSSSimpleSelector item = null;
-
- int status = IDLE;
- Iterator i = fTokens.iterator();
- while (i.hasNext()) {
- CSSTextToken token = (CSSTextToken) i.next();
- if (token == null || token.kind == CSSRegionContexts.CSS_S || token.kind == CSSRegionContexts.CSS_COMMENT) {
- continue;
- }
- switch (status) {
- case IDLE :
- if (isTag(token)) {
- item = createSimple();
- appendTag(item, token);
- status = SIMPLE;
- }
- else if (isID(token)) {
- item = createSimple();
- appendID(item, token);
- status = SIMPLE;
- }
- else if (isClass(token)) {
- item = createSimple();
- appendClass(item, token);
- status = SIMPLE;
- }
- else if (isPseudo(token)) {
- item = createSimple();
- appendPseudo(item, token);
- status = SIMPLE;
- }
- else if (isAttributeBegin(token)) {
- item = createSimple();
- status = ATTRIBUTE;
- }
- else {
- addError(token);
- }
- break;
- case SIMPLE :
- if (isID(token)) {
- appendID(item, token);
- }
- else if (isClass(token)) {
- appendClass(item, token);
- }
- else if (isPseudo(token)) {
- appendPseudo(item, token);
- }
- else if (isAttributeBegin(token)) {
- status = ATTRIBUTE;
- }
- else if (isCombinator(token)) { // combinator
- closeItem(item);
- closeItem(createCombinator(token));
- status = IDLE;
- }
- else {
- addError(token);
- }
- break;
- case ATTRIBUTE :
- if (isAttributeEnd(token)) {
- appendAttribute(item, attrBuf);
- attrBuf = null;
- status = SIMPLE;
- }
- else {
- if (attrBuf == null) {
- attrBuf = new ArrayList();
- }
- attrBuf.add(token);
- if (!isAttributeContent(token)) {
- addError(token);
- }
- }
- break;
- default :
- break;
- }
- }
-
- closeItem(item);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isAttributeContent(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_OPERATOR || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isAttributeEnd(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isAttributeBegin(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isCombinator(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_COMBINATOR);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isPseudo(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_PSEUDO);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isClass(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_CLASS);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isID(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_ID);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isTag(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || type == CSSRegionContexts.CSS_SELECTOR_UNIVERSAL || type == CSSRegionContexts.CSS_UNKNOWN);
- }
-
- private CSSSimpleSelector createSimple() {
- return new CSSSimpleSelector();
- }
-
- /**
- * if " " or "+" or ">" appeared, close simpleselector and add new
- * combinator
- */
- private CSSSelectorCombinator createCombinator(CSSTextToken token) {
- char type = 0;
-
- String str = token.image;
- if (str.trim().length() == 0) { // space
- type = ICSSSelectorCombinator.DESCENDANT;
- }
- else if (str.equals("+")) { //$NON-NLS-1$
- type = ICSSSelectorCombinator.ADJACENT;
- }
- else if (str.equals(">")) { //$NON-NLS-1$
- type = ICSSSelectorCombinator.CHILD;
- }
-
- if (0 < type) {
- return new CSSSelectorCombinator(type);
- }
- else {
- return null;
- }
- }
-
- /**
- *
- */
- private void closeItem(ICSSSelectorItem item) {
- if (item != null) {
- fItems.add(item);
- }
- }
-
- private void appendTag(CSSSimpleSelector item, CSSTextToken token) {
- item.setName(token.image);
- if (token.kind == CSSRegionContexts.CSS_UNKNOWN) {
- addError(token);
- }
- }
-
- /**
- * if "#xxxx" appeared, add ID to current selector
- */
- private void appendID(CSSSimpleSelector item, CSSTextToken token) {
- String text = token.toString();
- String idContent = text.substring(1, text.length());
- item.addID(idContent);
- }
-
- /**
- * if ".xxxx" appeared, add Class to current selector
- */
- private void appendClass(CSSSimpleSelector item, CSSTextToken token) {
- String text = token.toString();
- String classContent = text.substring(1, text.length());
- item.addClass(classContent);
- if (Character.isDigit(classContent.charAt(0))) {
- addError(token);
- }
- }
-
- /**
- * if ":xxxx" appeared, add Pseudo(element/class) to current selector
- */
- private void appendPseudo(CSSSimpleSelector item, CSSTextToken token) {
- String text = token.toString();
- String pseudoContent = text.substring(1, text.length());
- item.addPseudoName(pseudoContent);
- }
-
- /**
- *
- */
- private void appendAttribute(CSSSimpleSelector item, List tokens) {
- StringBuffer buf = new StringBuffer();
-
- CSSTextToken token;
- Iterator i = tokens.iterator();
- while (i.hasNext()) {
- token = (CSSTextToken) i.next();
- buf.append(token.image);
- }
-
- item.addAttribute(buf.toString());
- }
-
- /**
- *
- */
- List getSelectorTags() {
- List tagList = new ArrayList();
- return tagList;
- }
-
- /**
- *
- */
- private void addError(CSSTextToken token) {
- if (fErrors == null) {
- fErrors = new ArrayList();
- }
- fErrors.add(token);
- }
-
- /**
- *
- */
- Iterator getErrors() {
- return (fErrors == null) ? Collections.EMPTY_LIST.iterator() : fErrors.iterator();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSimpleSelector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSimpleSelector.java
deleted file mode 100644
index b7d3f4e63e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSimpleSelector.java
+++ /dev/null
@@ -1,281 +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.css.core.internal.document;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.css.core.document.ICSSSimpleSelector;
-
-
-/**
- *
- */
-class CSSSimpleSelector extends CSSSelectorItem implements ICSSSimpleSelector {
-
- private String fName = null;
- private String fCachedString = null;
- private StringBuffer fStringBuf = null;
- private List fPseudoName = null;
- private List fAttribute = null;
- private List fClass = null;
- private List fID = null;
-
- /**
- * CSSSimpleSelector constructor comment.
- */
- public CSSSimpleSelector() {
- super();
- }
-
- /**
- *
- */
- void addAttribute(String attribute) {
- if (fAttribute == null) {
- fAttribute = new ArrayList();
- }
- fAttribute.add(attribute);
- addToBuf("[");//$NON-NLS-1$
- addToBuf(attribute);
- addToBuf("]");//$NON-NLS-1$
- fCachedString = null;
- }
-
- /**
- *
- */
- void addClass(String cls) {
- if (fClass == null) {
- fClass = new ArrayList();
- }
- fClass.add(cls);
- addToBuf(".");//$NON-NLS-1$
- addToBuf(cls);
- fCachedString = null;
- }
-
- /**
- *
- */
- void addID(String id) {
- if (fID == null) {
- fID = new ArrayList();
- }
- fID.add(id);
- addToBuf("#");//$NON-NLS-1$
- addToBuf(id);
- fCachedString = null;
- }
-
- /**
- *
- */
- void addPseudoName(String cls) {
- if (fPseudoName == null) {
- fPseudoName = new ArrayList();
- }
- fPseudoName.add(cls);
- addToBuf(":");//$NON-NLS-1$
- addToBuf(cls);
- fCachedString = null;
- }
-
- /**
- *
- */
- private void addToBuf(String str) {
- if (fStringBuf == null) {
- fStringBuf = new StringBuffer();
- }
- fStringBuf.append(str);
- }
-
- /**
- * @return boolean
- * @param obj
- * java.lang.Object
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null || this.getClass() != obj.getClass())
- return false;
-
- CSSSimpleSelector foreign = (CSSSimpleSelector) obj;
-
- if (getName().compareToIgnoreCase(foreign.getName()) != 0)
- return false;
-
- int i;
-
- // compare pseudo-classes / pseudo-elements
- if (getNumOfPseudoNames() != foreign.getNumOfPseudoNames())
- return false;
- for (i = 0; i < getNumOfPseudoNames(); i++) {
- if (getPseudoName(i).compareToIgnoreCase(foreign.getPseudoName(i)) != 0)
- return false;
- }
-
- // compare classes
- if (getNumOfClasses() != foreign.getNumOfClasses())
- return false;
- for (i = 0; i < getNumOfClasses(); i++) {
- if (getClass(i).compareToIgnoreCase(foreign.getClass(i)) != 0)
- return false;
- }
-
- // compare IDs
- if (getNumOfIDs() != foreign.getNumOfIDs())
- return false;
- for (i = 0; i < getNumOfIDs(); i++) {
- if (getID(i).compareToIgnoreCase(foreign.getID(i)) != 0)
- return false;
- }
-
- // compare Attributes
- if (getNumOfAttributes() != foreign.getNumOfAttributes())
- return false;
- for (i = 0; i < getNumOfAttributes(); i++) {
- if (getAttribute(i).compareToIgnoreCase(foreign.getAttribute(i)) != 0)
- return false;
- }
- return true;
- }
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- public String getAttribute(int index) {
- if (fAttribute != null && 0 <= index && index < fAttribute.size()) {
- return (String) fAttribute.get(index);
- }
- else {
- return "";//$NON-NLS-1$
- }
- }
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- public String getClass(int index) {
- if (fClass != null && 0 <= index && index < fClass.size()) {
- return (String) fClass.get(index);
- }
- else {
- return "";//$NON-NLS-1$
- }
- }
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- public String getID(int index) {
- if (fID != null && 0 <= index && index < fID.size()) {
- return (String) fID.get(index);
- }
- else {
- return "";//$NON-NLS-1$
- }
- }
-
- /**
- * @return int
- */
- public int getItemType() {
- return SIMPLE;
- }
-
- /**
- * @return java.lang.String
- */
- public String getName() {
- return (fName != null) ? fName : "";//$NON-NLS-1$
- }
-
- /**
- * @return boolean
- */
- public int getNumOfAttributes() {
- return (fAttribute != null) ? fAttribute.size() : 0;
- }
-
- /**
- * @return boolean
- */
- public int getNumOfClasses() {
- return (fClass != null) ? fClass.size() : 0;
- }
-
- /**
- * @return boolean
- */
- public int getNumOfIDs() {
- return (fID != null) ? fID.size() : 0;
- }
-
- /**
- * @return boolean
- */
- public int getNumOfPseudoNames() {
- return (fPseudoName != null) ? fPseudoName.size() : 0;
- }
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- public String getPseudoName(int index) {
- if (fPseudoName != null && 0 <= index && index < fPseudoName.size()) {
- return (String) fPseudoName.get(index);
- }
- else {
- return "";//$NON-NLS-1$
- }
- }
-
- /**
- * @return java.lang.String
- */
- public String getString() {
- if (fCachedString == null) {
- StringBuffer buf = new StringBuffer(getName());
- if (fStringBuf != null) {
- buf.append(fStringBuf.toString());
- }
- fCachedString = buf.toString();
- }
- return fCachedString;
- }
-
- /**
- * @return boolean
- */
- public boolean isUniversal() {
- return (fName == null || fName.equals("*"));//$NON-NLS-1$
- }
-
- /**
- *
- */
- void setName(String name) {
- fName = name;
- fCachedString = null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStructuredDocumentRegionContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStructuredDocumentRegionContainer.java
deleted file mode 100644
index 946c66afc5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStructuredDocumentRegionContainer.java
+++ /dev/null
@@ -1,265 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-/**
- *
- */
-abstract class CSSStructuredDocumentRegionContainer extends CSSNodeImpl {
-
- private IStructuredDocumentRegion firstStructuredDocumentRegion = null;
- private IStructuredDocumentRegion lastStructuredDocumentRegion = null;
-
- /**
- * CSSContainer constructor comment.
- */
- CSSStructuredDocumentRegionContainer() {
- super();
- }
-
- /**
- * CSSContainer constructor comment.
- *
- * @param that
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- */
- CSSStructuredDocumentRegionContainer(CSSStructuredDocumentRegionContainer that) {
- super(that);
- }
-
- /**
- * @return java.lang.String
- */
- public String getCssText() {
- if (getFirstStructuredDocumentRegion() == null)
- return generateSource();
-
- StringBuffer str = new StringBuffer(getFirstStructuredDocumentRegion().getText());
- IStructuredDocumentRegion node = getFirstStructuredDocumentRegion();
-
- while (node != getLastStructuredDocumentRegion()) {
- node = node.getNext();
- str.append(node.getText());
- }
-
- return str.toString();
- }
-
- /**
- * @return int
- */
- public int getEndOffset() {
- IStructuredDocumentRegion flatNode = getLastStructuredDocumentRegion();
- if (flatNode != null)
- return flatNode.getEnd();
- return -1;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.IStructuredDocumentRegion
- */
- IStructuredDocumentRegion getFirstStructuredDocumentRegion() {
- return firstStructuredDocumentRegion;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.IStructuredDocumentRegion
- * @param index
- * int
- */
- IStructuredDocumentRegion getStructuredDocumentRegion(int index) {
- IStructuredDocumentRegion node = firstStructuredDocumentRegion;
- for (int i = index; i > 0; i--) {
- if (node == null)
- return null;
- node = node.getNext();
- }
- return node;
- }
-
- /**
- * @return int
- */
- int getStructuredDocumentRegionCount() {
- if (firstStructuredDocumentRegion == null)
- return 0;
-
- IStructuredDocumentRegion node = firstStructuredDocumentRegion;
- int i = 0;
- for (; node != null; i++)
- node = node.getNext();
- return i;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.IStructuredDocumentRegion
- */
- IStructuredDocumentRegion getLastStructuredDocumentRegion() {
- return lastStructuredDocumentRegion;
- }
-
- /**
- * @return int
- */
- public int getStartOffset() {
- IStructuredDocumentRegion flatNode = getFirstStructuredDocumentRegion();
- if (flatNode != null)
- return flatNode.getStart();
- return -1;
- }
-
- /**
- * @param first
- * com.ibm.sed.structuredDocument.core.IStructuredDocumentRegion
- * @param last
- * com.ibm.sed.structuredDocument.core.IStructuredDocumentRegion
- */
- boolean includeRangeStructuredDocumentRegion(IStructuredDocumentRegion first, IStructuredDocumentRegion last) {
- boolean bModified = false;
-
- // validate range of parameters
- if (first != null && last != null) {
- if (first.getStart() > last.getStart()) {
- IStructuredDocumentRegion node = first;
- first = last;
- last = node;
- }
- }
-
- // validate mine
- boolean b = validateRange();
- bModified = b || bModified;
-
- if (first != null) {
- if (getFirstStructuredDocumentRegion() == null || getFirstStructuredDocumentRegion().getStart() > first.getStart()) {
- setFirstStructuredDocumentRegion(first);
- bModified = true;
- }
- }
-
- if (last != null) {
- if (getLastStructuredDocumentRegion() == null || getLastStructuredDocumentRegion().getStart() < last.getStart()) {
- setLastStructuredDocumentRegion(last);
- bModified = true;
- }
- }
-
- // re-validate
- if (bModified)
- validateRange();
-
- return bModified;
- }
-
- /**
- *
- */
- boolean propagateRangeStructuredDocumentRegion() {
- boolean bModified = false;
-
- CSSStructuredDocumentRegionContainer parent = (CSSStructuredDocumentRegionContainer) getParentNode();
- if (parent == null)
- return bModified;
-
- boolean b = parent.includeRangeStructuredDocumentRegion(getFirstStructuredDocumentRegion(), getLastStructuredDocumentRegion());
- bModified = b || bModified;
-
- if (b)
- parent.propagateRangeStructuredDocumentRegion();
- // else need not update range of ancestors
-
- return bModified;
- }
-
- /**
- * @param cssText
- * java.lang.String
- */
- public void setCssText(String cssText) {
- if (firstStructuredDocumentRegion != null) {
- getOwnerDocument().getModel().getStructuredDocument().replaceText(this, getStartOffset(), getEndOffset() - getStartOffset(), cssText);
- }
- else
- super.setCssText(cssText);
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.core.IStructuredDocumentRegion
- * @param node
- * com.ibm.sed.structuredDocument.core.IStructuredDocumentRegion
- */
- IStructuredDocumentRegion setFirstStructuredDocumentRegion(IStructuredDocumentRegion node) {
- firstStructuredDocumentRegion = node;
- return node;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.core.IStructuredDocumentRegion
- * @param node
- * com.ibm.sed.structuredDocument.core.IStructuredDocumentRegion
- */
- IStructuredDocumentRegion setLastStructuredDocumentRegion(IStructuredDocumentRegion node) {
- lastStructuredDocumentRegion = node;
- return node;
- }
-
- /**
- * @param firstNode
- * com.ibm.sed.structuredDocument.core.IStructuredDocumentRegion
- * @param lastNode
- * com.ibm.sed.structuredDocument.core.IStructuredDocumentRegion
- */
- void setRangeStructuredDocumentRegion(IStructuredDocumentRegion firstNode, IStructuredDocumentRegion lastNode) {
- if (firstNode != null)
- setFirstStructuredDocumentRegion(firstNode);
- if (lastNode != null)
- setLastStructuredDocumentRegion(lastNode);
-
- if (firstNode == null && lastNode == null) {
- setFirstStructuredDocumentRegion(null);
- setLastStructuredDocumentRegion(null);
- }
- else { // range validation
- validateRange();
- }
- }
-
- /**
- * @return boolean
- */
- private boolean validateRange() {
- boolean bModified = false;
-
- if (firstStructuredDocumentRegion != null || lastStructuredDocumentRegion != null) {
- if (this.firstStructuredDocumentRegion == null) {
- this.firstStructuredDocumentRegion = this.lastStructuredDocumentRegion;
- bModified = true;
- }
- else if (this.lastStructuredDocumentRegion == null) {
- this.lastStructuredDocumentRegion = this.firstStructuredDocumentRegion;
- bModified = true;
- }
- else if (this.firstStructuredDocumentRegion.getStart() > this.lastStructuredDocumentRegion.getStart()) {
- // need to swap first for last
- IStructuredDocumentRegion node = firstStructuredDocumentRegion;
- firstStructuredDocumentRegion = lastStructuredDocumentRegion;
- lastStructuredDocumentRegion = node;
- bModified = true;
- }
- }
-
- return bModified;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclItemImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclItemImpl.java
deleted file mode 100644
index 0bd3c4c03d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclItemImpl.java
+++ /dev/null
@@ -1,258 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentLoader;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceGenerator;
-import org.eclipse.wst.css.core.internal.formatter.StyleDeclItemFormatter;
-import org.eclipse.wst.css.core.internal.parser.CSSSourceParser;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- *
- */
-class CSSStyleDeclItemImpl extends CSSStructuredDocumentRegionContainer implements ICSSStyleDeclItem {
-
- private java.lang.String fPropertyName;
-
- /**
- * CSSStyleDeclItemImpl constructor comment.
- *
- * @param that
- * com.ibm.sed.css.treemodel.CSSNodeImpl
- */
- CSSStyleDeclItemImpl(CSSStyleDeclItemImpl that) {
- super(that);
- this.fPropertyName = that.fPropertyName;
- }
-
- /**
- * CSSStyleDeclItemImpl constructor comment.
- */
- CSSStyleDeclItemImpl(String propertyName) {
- super();
- this.fPropertyName = propertyName;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- public ICSSPrimitiveValue appendValue(ICSSPrimitiveValue value) throws DOMException {
- return insertValueBefore(value, null);
- }
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSStyleDeclItemImpl cloned = new CSSStyleDeclItemImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return java.lang.String
- */
- String generateValueSource() {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(this);
- if (formatter != null && formatter instanceof StyleDeclItemFormatter)
- return ((StyleDeclItemFormatter) formatter).formatValue(this).toString();
- else
- return "";//$NON-NLS-1$
- }
-
- /**
- * @return org.w3c.dom.css.CSSValue
- */
- public CSSValue getCSSValue() {
- int nValue = getLength();
- if (nValue <= 0)
- return null;
- else if (nValue == 1)
- return item(0);
- else
- return this;
- }
-
- /**
- * @return java.lang.String
- */
- public java.lang.String getCSSValueText() {
- if (getFirstChild() == null)
- return "";//$NON-NLS-1$
- // check whether children has flatnodes
- ICSSNode child = getFirstChild();
- while (child != null) {
- if (((IndexedRegion) child).getEndOffset() <= 0)
- return generateValueSource();
- child = child.getNextSibling();
- }
-
- IStructuredDocumentRegion node = getFirstStructuredDocumentRegion();
- int start = ((IndexedRegion) getFirstChild()).getStartOffset() - node.getStartOffset();
- int end = ((IndexedRegion) getLastChild()).getEndOffset() - node.getStartOffset();
- return node.getText().substring(start, end);
- }
-
- /**
- * @return short
- */
- public short getCssValueType() {
- return CSS_VALUE_LIST;
- }
-
- /**
- * @return int
- */
- public int getLength() {
- int i = 0;
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSPrimitiveValueImpl)
- i++;
- }
- return i;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return STYLEDECLITEM_NODE;
- }
-
- /**
- * @return java.lang.String
- */
- public java.lang.String getPriority() {
- return getAttribute(IMPORTANT);
- }
-
- /**
- * @return java.lang.String
- */
- public String getPropertyName() {
- return fPropertyName.trim().toLowerCase();
- }
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param newValue
- * org.w3c.dom.css.CSSPrimitiveValue
- * @param refValue
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- ICSSPrimitiveValue insertValueBefore(ICSSPrimitiveValue newValue, ICSSPrimitiveValue refValue) {
- ICSSNode node = insertBefore((CSSNodeImpl) newValue, (CSSNodeImpl) refValue);
- return (ICSSPrimitiveValue) node;
- }
-
- /**
- * @return org.w3c.dom.css.CSSValue
- * @param index
- * int
- */
- public CSSValue item(int index) {
- int i = 0;
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSPrimitiveValueImpl) {
- if (i++ == index)
- return (CSSValue) node;
- }
- }
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- public ICSSPrimitiveValue removeValue(ICSSPrimitiveValue value) throws DOMException {
- ICSSNode node = removeChild((CSSNodeImpl) value);
- return (ICSSPrimitiveValue) node;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param newValue
- * org.w3c.dom.css.CSSPrimitiveValue
- * @param oldValue
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- public ICSSPrimitiveValue replaceValue(ICSSPrimitiveValue newValue, ICSSPrimitiveValue oldValue) throws DOMException {
- if (oldValue == null)
- return newValue;
- if (newValue != null)
- insertValueBefore(newValue, oldValue);
- return removeValue(oldValue);
- }
-
- /**
- * @param value
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setCssValueText(String value) throws DOMException {
- ICSSNode child = getFirstChild();
- while (child != null) {
- ICSSNode next = child.getNextSibling();
- if (child instanceof ICSSPrimitiveValue) {
- removeChild((CSSNodeImpl) child);
- }
- child = next;
- }
-
- // use temporary document
- IDocumentLoader loader = new CSSDocumentLoader();
- IStructuredDocument structuredDocument = (IStructuredDocument) loader.createNewStructuredDocument();
- ((CSSSourceParser) structuredDocument.getParser()).setParserMode(CSSSourceParser.MODE_DECLARATION_VALUE);
- structuredDocument.set(value);
- IStructuredDocumentRegion node = structuredDocument.getFirstStructuredDocumentRegion();
- if (node == null) {
- return;
- }
- if (node.getNext() != null) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
-
- CSSDeclarationItemParser itemParser = new CSSDeclarationItemParser(getOwnerDocument());
- itemParser.setStructuredDocumentTemporary(true);
- itemParser.setupValues(this, node, node.getRegions());
- }
-
- /**
- * @param newPriority
- * java.lang.String
- */
- public void setPriority(java.lang.String newPriority) throws DOMException {
- setAttribute(IMPORTANT, newPriority);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java
deleted file mode 100644
index bda0b4dd22..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java
+++ /dev/null
@@ -1,69 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-
-public abstract class CSSStyleDeclarationFactoryContext {
-
- protected ICSSDocument fOwnerDocument = null;
-
- /**
- *
- */
- protected void cloneChildNodes(ICSSNode src, ICSSNode dest) {
- if (fOwnerDocument == null) {
- return;
- }
- if (!(dest instanceof CSSNodeImpl)) {
- return;
- }
-
- CSSNodeImpl container = (CSSNodeImpl) dest;
- container.removeChildNodes();
-
- for (ICSSNode child = src.getFirstChild(); child != null; child = child.getNextSibling()) {
- if (child instanceof CSSStyleDeclItemImpl) {
- // extract shorthand property ..
- // --> Temp
- ICSSNode cloned = child.cloneNode(false);
- if (cloned instanceof CSSNodeImpl) {
- ((CSSNodeImpl) cloned).setOwnerDocument(fOwnerDocument);
- container.appendChild((CSSNodeImpl) cloned);
- cloneChildNodes(child, cloned);
- }
- // <-- Temp
- }
- else {
- ICSSNode cloned = child.cloneNode(false);
- if (cloned instanceof CSSNodeImpl) {
- ((CSSNodeImpl) cloned).setOwnerDocument(fOwnerDocument);
- container.appendChild((CSSNodeImpl) cloned);
- cloneChildNodes(child, cloned);
- }
- }
- }
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSStyleDeclaration
- */
- public ICSSStyleDeclaration createStyleDeclaration() {
- CSSStyleDeclarationImpl decl = new CSSStyleDeclarationImpl(true);
- decl.setOwnerDocument(decl);
- return decl;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationImpl.java
deleted file mode 100644
index 9d2c6db06b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationImpl.java
+++ /dev/null
@@ -1,306 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.document.ICSSValue;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- *
- */
-class CSSStyleDeclarationImpl extends CSSDocumentImpl implements ICSSStyleDeclaration {
-
- private boolean fIsDocument;
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSStyleDeclBlockImpl
- */
- CSSStyleDeclarationImpl(CSSStyleDeclarationImpl that) {
- super(that);
- this.fIsDocument = that.fIsDocument;
- if (fIsDocument) {
- setOwnerDocument(this);
- }
- }
-
- /**
- *
- */
- CSSStyleDeclarationImpl(boolean isDocument) {
- super();
- fIsDocument = isDocument;
- if (fIsDocument) {
- setOwnerDocument(this);
- }
- }
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSStyleDeclarationImpl cloned = new CSSStyleDeclarationImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @param propertyName
- * java.lang.String
- */
- public ICSSStyleDeclItem getDeclItemNode(String propertyName) {
- ICSSNode node = getLastChild();
- propertyName = propertyName.trim();
- while (node != null) {
- if (node instanceof CSSStyleDeclItemImpl) {
- ICSSStyleDeclItem item = (ICSSStyleDeclItem) node;
- if (propertyName.compareToIgnoreCase(item.getPropertyName().trim()) == 0)
- return item;
- }
- node = node.getPreviousSibling();
- }
- return null;
- }
-
- /**
- * @return int
- */
- public int getLength() {
- int i = 0;
- ICSSNode node = getFirstChild();
- while (node != null) {
- if (node instanceof CSSStyleDeclItemImpl)
- i++;
- node = node.getNextSibling();
- }
- return i;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return STYLEDECLARATION_NODE;
- }
-
- /**
- * The CSS rule that contains this declaration block or <code>null</code>
- * if this <code>CSSStyleDeclaration</code> is not attached to a
- * <code>CSSRule</code>.
- */
- public CSSRule getParentRule() {
- ICSSNode parent = getParentNode();
- if (parent instanceof CSSRule)
- return (CSSRule) parent;
- return null;
- }
-
- /**
- * Used to retrieve the object representation of the value of a CSS
- * property if it has been explicitly set within this declaration block.
- * This method returns <code>null</code> if the property is a shorthand
- * property. Shorthand property values can only be accessed and modified
- * as strings, using the <code>getPropertyValue</code> and
- * <code>setProperty</code> methods.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return Returns the value of the property if it has been explicitly set
- * for this declaration block. Returns <code>null</code> if the
- * property has not been set.
- */
- public CSSValue getPropertyCSSValue(String propertyName) {
- ICSSStyleDeclItem item = getDeclItemNode(propertyName);
- if (item != null)
- return item.getCSSValue();
- return null;
- }
-
- /**
- * Used to retrieve the priority of a CSS property (e.g. the
- * <code>"important"</code> qualifier) if the property has been
- * explicitly set in this declaration block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return A string representing the priority (e.g.
- * <code>"important"</code>) if one exists. The empty string if
- * none exists.
- */
- public String getPropertyPriority(String propertyName) {
- ICSSStyleDeclItem item = getDeclItemNode(propertyName);
- if (item != null)
- return item.getPriority();
- return null;
- }
-
- /**
- * Used to retrieve the value of a CSS property if it has been explicitly
- * set within this declaration block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return Returns the value of the property if it has been explicitly set
- * for this declaration block. Returns the empty string if the
- * property has not been set.
- */
- public String getPropertyValue(String propertyName) {
- CSSValue value = getPropertyCSSValue(propertyName);
- if (value != null)
- return ((ICSSValue) value).getCSSValueText();
- return null;
- }
-
- /**
- * @return boolean
- */
- public boolean isDocument() {
- return fIsDocument;
- }
-
- /**
- * Used to retrieve the properties that have been explicitly set in this
- * declaration block. The order of the properties retrieved using this
- * method does not have to be the order in which they were set. This
- * method can be used to iterate over all properties in this declaration
- * block.
- *
- * @param index
- * Index of the property name to retrieve.
- * @return The name of the property at this ordinal position. The empty
- * string if no property exists at this position.
- */
- public String item(int index) {
- if (index < 0)
- return null;
-
- int i = 0;
- ICSSNode node = getFirstChild();
- while (node != null) {
- if (node instanceof CSSStyleDeclItemImpl) {
- if (i != index)
- i++;
- else {
- CSSStyleDeclItemImpl item = (CSSStyleDeclItemImpl) node;
- return item.getPropertyName();
- }
- }
- node = node.getNextSibling();
- }
- return null;
- }
-
- /**
- * @return com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @param oldDecl
- * com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public ICSSStyleDeclItem removeDeclItemNode(ICSSStyleDeclItem oldDecl) throws DOMException {
- return (ICSSStyleDeclItem) removeChild((CSSNodeImpl) oldDecl);
- }
-
- /**
- * Used to remove a CSS property if it has been explicitly set within this
- * declaration block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return Returns the value of the property if it has been explicitly set
- * for this declaration block. Returns the empty string if the
- * property has not been set or the property name does not
- * correspond to a known CSS property.
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration
- * is readonly or the property is readonly.
- */
- public String removeProperty(String propertyName) throws DOMException {
- ICSSStyleDeclItem item = getDeclItemNode(propertyName);
- if (item != null) {
- removeChild((CSSNodeImpl) item);
- return item.getCssText();
- }
- return null;
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/01/16
- * 23:18:51)
- *
- * @return com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @param newDecl
- * com.ibm.sed.treemodel.cei.CSSStyleDeclItem
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public ICSSStyleDeclItem setDeclItemNode(ICSSStyleDeclItem newDecl) throws DOMException {
- if (newDecl == null)
- return null;
-
- ICSSStyleDeclItem item = getDeclItemNode(newDecl.getPropertyName());
- if (item != null)
- return (ICSSStyleDeclItem) replaceChild((CSSNodeImpl) newDecl, (CSSNodeImpl) item);
- else
- return (ICSSStyleDeclItem) appendChild((CSSNodeImpl) newDecl);
- }
-
- /**
- * Used to set a property value and priority within this declaration
- * block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @param value
- * The new value of the property.
- * @param priority
- * The new priority of the property (e.g.
- * <code>"important"</code>).
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified value has a syntax
- * error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration
- * is readonly or the property is readonly.
- */
- public void setProperty(String propertyName, String value, String priority) throws DOMException {
- if (propertyName.equals("")) //$NON-NLS-1$
- throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, ""); //$NON-NLS-1$
-
- // You can use this only if CSSValue.setCssText() is implemented
- CSSStyleDeclItemImpl item = (CSSStyleDeclItemImpl) getDeclItemNode(propertyName);
- if (item == null) {
- item = (CSSStyleDeclItemImpl) getOwnerDocument().createCSSStyleDeclItem(propertyName);
- appendChild(item);
- }
-
- // ICSSNode next = item.getNextSibling();
- // removeChild(item);
-
- item.setCssValueText(value);
- item.setPriority(priority);
-
- // insertBefore(item, (CSSNodeImpl)next);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleRuleImpl.java
deleted file mode 100644
index 73bbe7f217..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleRuleImpl.java
+++ /dev/null
@@ -1,110 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.w3c.dom.DOMException;
-
-
-/**
- *
- */
-class CSSStyleRuleImpl extends CSSRuleDeclContainer implements ICSSStyleRule {
-
- ICSSSelectorList fSelectorList = new CSSSelectorListImpl(null);
-
- /**
- *
- */
- CSSStyleRuleImpl() {
- super();
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSStyleRuleImpl
- */
- CSSStyleRuleImpl(CSSStyleRuleImpl that) {
- super(that);
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSStyleRuleImpl cloned = new CSSStyleRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return java.lang.String
- */
- String extractPreString() {
- return getSelectorText();
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return STYLERULE_NODE;
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.ICSSSelectorList
- */
- public ICSSSelectorList getSelectors() {
- return fSelectorList;
- }
-
- /**
- * The textual representation of the selector for the rule set. The
- * implementation may have stripped out insignificant whitespace while
- * parsing the selector.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified CSS string value has
- * a syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is
- * readonly.
- */
- public String getSelectorText() {
- return getAttribute(SELECTOR);
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return STYLE_RULE;
- }
-
- /**
- *
- */
- public void setSelectorText(String selectorText) throws DOMException {
- setAttribute(SELECTOR, selectorText);
- fSelectorList = new CSSSelectorListImpl(selectorText);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java
deleted file mode 100644
index aa4c29af00..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java
+++ /dev/null
@@ -1,625 +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.css.core.internal.document;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.adapters.IStyleSheetAdapter;
-import org.eclipse.wst.css.core.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPageRule;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.document.ICSSStyleSheet;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentLoader;
-import org.eclipse.wst.css.core.util.ImportRuleCollector;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.util.Assert;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.css.CSSFontFaceRule;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSRuleList;
-import org.w3c.dom.css.CSSUnknownRule;
-import org.w3c.dom.stylesheets.MediaList;
-import org.w3c.dom.stylesheets.StyleSheet;
-import org.w3c.dom.stylesheets.StyleSheetList;
-
-/**
- *
- */
-class CSSStyleSheetImpl extends CSSDocumentImpl implements ICSSStyleSheet {
-
-
- class InternalNodeList implements NodeList {
-
- Vector nodes = new Vector();
-
- public int getLength() {
- if (nodes == null)
- return 0;
- else
- return nodes.size();
- }
-
- public Node item(int i) {
- if (nodes == null)
- return null;
- if (i < 0 || nodes.size() <= i)
- return null;
- return (Node) nodes.get(i);
- }
- }
-
- class InternalStyleSheetList extends AbstractCSSNodeList implements StyleSheetList {
-
- public ICSSNode appendNode(ICSSNode node) {
- if (nodes == null || !nodes.contains(node))
- return super.appendNode(node);
- else
- return node;
- }
-
- public StyleSheet item(int i) {
- return (StyleSheet) itemImpl(i);
- }
- }
-
- private boolean fDisabled = false;
-
- /**
- *
- */
- CSSStyleSheetImpl() {
- super();
- setOwnerDocument(this);
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSStyleSheetImpl
- */
- CSSStyleSheetImpl(CSSStyleSheetImpl that) {
- super(that);
- setOwnerDocument(this);
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule appendRule(org.w3c.dom.css.CSSRule rule) throws org.w3c.dom.DOMException {
- if (rule == null)
- return null;
-
- CSSRule ret = (CSSRule) appendChild((CSSNodeImpl) rule);
- return ret;
- }
-
- /**
- * @return com.ibm.sed.treemodel.css.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSStyleSheetImpl cloned = new CSSStyleSheetImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return org.w3c.dom.css.CSSCharsetRule
- */
- public ICSSCharsetRule createCSSCharsetRule() {
- CSSCharsetRuleImpl rule = new CSSCharsetRuleImpl();
- rule.setOwnerDocument(this);
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.CSSFontFaceRule
- */
- public CSSFontFaceRule createCSSFontFaceRule() {
- CSSFontFaceRuleImpl rule = new CSSFontFaceRuleImpl();
- CSSStyleDeclarationImpl style = (CSSStyleDeclarationImpl) createCSSStyleDeclaration();
-
- rule.appendChild(style);
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.CSSImportRule
- */
- public ICSSImportRule createCSSImportRule() {
- CSSImportRuleImpl rule = new CSSImportRuleImpl();
- MediaListImpl media = (MediaListImpl) createMediaList();
-
- rule.appendChild(media);
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.ICSSMediaRule
- */
- public ICSSMediaRule createCSSMediaRule() {
- CSSMediaRuleImpl rule = new CSSMediaRuleImpl();
- MediaListImpl media = (MediaListImpl) createMediaList();
-
- rule.insertBefore(media, (CSSNodeImpl) rule.getFirstChild()); // media
- // must
- // be
- // the
- // top
- // of
- // children
- // list
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPageRule
- */
- public ICSSPageRule createCSSPageRule() {
- CSSPageRuleImpl rule = new CSSPageRuleImpl();
- CSSStyleDeclarationImpl style = (CSSStyleDeclarationImpl) createCSSStyleDeclaration();
-
- rule.appendChild(style);
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * java.lang.String
- */
- public CSSRule createCSSRule(String rule) {
- CSSDocumentLoader loader = new CSSDocumentLoader();
- IStructuredDocument structuredDocument = (IStructuredDocument) loader.createNewStructuredDocument();
- structuredDocument.set(rule);
-
- CSSModelParser modelParser = new CSSModelParser((CSSDocumentImpl) getOwnerDocument());
- return modelParser.createCSSRule(structuredDocument.getRegionList());
- }
-
- /**
- * @return org.w3c.dom.css.CSSStyleDeclaration
- */
- public ICSSStyleDeclaration createCSSStyleDeclaration() {
- CSSStyleDeclarationImpl decl = new CSSStyleDeclarationImpl(false);
- decl.setOwnerDocument(this);
-
- return decl;
- }
-
- /**
- * @return org.w3c.dom.css.CSSStyleRule
- */
- public ICSSStyleRule createCSSStyleRule() {
- CSSStyleRuleImpl rule = new CSSStyleRuleImpl();
- CSSStyleDeclarationImpl style = (CSSStyleDeclarationImpl) createCSSStyleDeclaration();
-
- rule.appendChild(style);
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.CSSUnknownRule
- */
- public CSSUnknownRule createCSSUnknownRule() {
- CSSUnknownRuleImpl rule = new CSSUnknownRuleImpl();
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.stylesheets.MediaList
- */
- public MediaList createMediaList() {
- MediaListImpl media = new MediaListImpl();
- media.setOwnerDocument(this);
-
- return media;
- }
-
- /**
- * Used to delete a rule from the style sheet.
- *
- * @param index
- * The index within the style sheet's rule list of the rule to
- * remove.
- * @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified index does not
- * correspond to a rule in the style sheet's rule list.
- * <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet
- * is readonly.
- */
- public void deleteRule(int index) throws DOMException {
- CSSNodeImpl node = getIndexedRule(index);
- if (node != null)
- removeChild(node);
- }
-
- /**
- * The list of all CSS rules contained within the style sheet. This
- * includes both rule sets and at-rules.
- */
- public CSSRuleList getCssRules() {
- CSSRuleListImpl list = new CSSRuleListImpl();
-
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSRule) {
- list.appendNode(node);
- }
- }
-
- return list;
- }
-
- /**
- * <code>false</code> if the style sheet is applied to the document.
- * <code>true</code> if it is not. Modifying this attribute may cause a
- * new resolution of style for the document. A stylesheet only applies if
- * both an appropriate medium definition is present and the disabled
- * attribute is false. So, if the media doesn't apply to the current user
- * agent, the <code>disabled</code> attribute is ignored.
- */
- public boolean getDisabled() {
- return fDisabled;
- }
-
- /**
- * If the style sheet is a linked style sheet, the value of its attribute
- * is its location. For inline style sheets, the value of this attribute
- * is <code>null</code>. See the href attribute definition for the
- * <code>LINK</code> element in HTML 4.0, and the href pseudo-attribute
- * for the XML style sheet processing instruction.
- */
- public String getHref() {
- ICSSModel model = getModel();
- if (model != null && model.getStyleSheetType() == ICSSModel.EXTERNAL) {
- return model.getBaseLocation();
- /*
- * Object id = model.getId(); if (id != null) { if (id instanceof
- * IResource) { // TODO: need to check whether this is correct or
- * not, later. return ((IResource)id).getFullPath().toString(); }
- * return id.toString(); }
- */}
- return null;
- }
-
- /**
- * @return com.ibm.sed.css.treemodel.CSSRuleImpl
- * @param index
- * int
- */
- CSSRuleImpl getIndexedRule(int index) {
- if (index < 0)
- return null;
-
- int i = 0;
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSRule) {
- if (i++ == index)
- return (CSSRuleImpl) node;
- }
- }
- return null;
- }
-
- /**
- * The intended destination media for style information. The media is
- * often specified in the <code>ownerNode</code>. If no media has been
- * specified, the <code>MediaList</code> will be empty. See the media
- * attribute definition for the <code>LINK</code> element in HTML 4.0,
- * and the media pseudo-attribute for the XML style sheet processing
- * instruction . Modifying the media list may cause a change to the
- * attribute <code>disabled</code>.
- */
- public MediaList getMedia() {
- return null;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return STYLESHEET_NODE;
- }
-
- /**
- * The node that associates this style sheet with the document. For HTML,
- * this may be the corresponding <code>LINK</code> or <code>STYLE</code>
- * element. For XML, it may be the linking processing instruction. For
- * style sheets that are included by other style sheets, the value of this
- * attribute is <code>null</code>.
- */
- public Node getOwnerNode() {
- // for <LINK> tag or <STYLE> tag
- ICSSModel model = getModel();
- if (model != null)
- return model.getOwnerDOMNode();
- return null;
- }
-
- /**
- * @return org.w3c.dom.NodeList
- */
- public org.w3c.dom.NodeList getOwnerNodes() {
- List list = (getModel().getStyleListeners() != null) ? new Vector(getModel().getStyleListeners()) : null;
- if (list == null)
- return null;
- InternalNodeList nodes = new InternalNodeList();
- Iterator it = list.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj instanceof IStyleSheetAdapter) {
- nodes.nodes.add(((IStyleSheetAdapter) obj).getElement());
- }
- }
- if (nodes.getLength() > 0)
- return nodes;
- else
- return null;
- }
-
- /**
- * @return org.w3c.dom.NodeList
- * @param doc
- * org.w3c.dom.Document
- */
- public NodeList getOwnerNodes(Document doc) {
- List list = (getModel().getStyleListeners() != null) ? new Vector(getModel().getStyleListeners()) : null;
- if (list == null)
- return null;
- InternalNodeList nodes = new InternalNodeList();
- Iterator it = list.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj instanceof IStyleSheetAdapter) {
- Element ele = ((IStyleSheetAdapter) obj).getElement();
- if (ele.getOwnerDocument() == doc)
- nodes.nodes.add(ele);
- }
- }
- if (nodes.getLength() > 0)
- return nodes;
- else
- return null;
- }
-
- /**
- * If this style sheet comes from an <code>@import</code> rule, the <code>ownerRule</code> attribute will
- * contain the <code>CSSImportRule</code>. In that case, the
- * <code>ownerNode</code> attribute in the
- * <code>StyleSheet</code> interface will be <code>null</code>.
- * If the style sheet comes from an element or a processing
- * instruction, the <code>ownerRule</code> attribute will be
- * <code>null</code> and the <code>ownerNode</code> attribute
- * will contain the <code>Node</code>.
- */
- public CSSRule getOwnerRule() {
- Assert.isTrue(false, CSSCorePlugin.getResourceString("%You_cannot_use_CSSStyleShe_UI_")); //$NON-NLS-1$ = "You cannot use CSSStyleSheet.getOwnerRule() because of many referencers of this rule\nPlease use getOnwerRules()"
- // for @import
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRuleList
- */
- public org.w3c.dom.css.CSSRuleList getOwnerRules() {
- StyleSheetList list = getParentStyleSheets();
- if (list == null)
- return null;
- CSSRuleListImpl ruleList = new CSSRuleListImpl();
- for (int i = 0; i < list.getLength(); i++) {
- ImportRuleCollector trav = new ImportRuleCollector(this);
- trav.apply((ICSSStyleSheet) list.item(i));
- ruleList.nodes.addAll(trav.getRules());
- }
- return ruleList;
- }
-
- /**
- * For style sheet languages that support the concept of style sheet
- * inclusion, this attribute represents the including style sheet, if one
- * exists. If the style sheet is a top-level style sheet, or the style
- * sheet language does not support inclusion, the value of this attribute
- * is <code>null</code>.
- */
- public StyleSheet getParentStyleSheet() {
- CSSRule owner = getOwnerRule();
- if (owner != null)
- return owner.getParentStyleSheet();
- return null;
- }
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheetList
- */
- public org.w3c.dom.stylesheets.StyleSheetList getParentStyleSheets() {
- List list = (getModel().getStyleListeners() != null) ? new Vector(getModel().getStyleListeners()) : null;
- if (list == null)
- return null;
- InternalStyleSheetList sheets = new InternalStyleSheetList();
- Iterator it = list.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj instanceof ICSSModel) {
- sheets.appendNode(((ICSSModel) obj).getDocument());
- }
- }
- if (sheets.getLength() > 0)
- return sheets;
- else
- return null;
- }
-
- /**
- * The advisory title. The title is often specified in the
- * <code>ownerNode</code>. See the title attribute definition for the
- * <code>LINK</code> element in HTML 4.0, and the title pseudo-attribute
- * for the XML style sheet processing instruction.
- */
- public String getTitle() {
- Node node = getOwnerNode();
- if (node instanceof Element) {
- return ((Element) node).getAttribute("TITLE");//$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * This specifies the style sheet language for this style sheet. The style
- * sheet language is specified as a content type (e.g. "text/css"). The
- * content type is often specified in the <code>ownerNode</code>. Also
- * see the type attribute definition for the <code>LINK</code> element
- * in HTML 4.0, and the type pseudo-attribute for the XML style sheet
- * processing instruction.
- */
- public String getType() {
- Node node = getOwnerNode();
- if (node instanceof Element) {
- return ((Element) node).getAttribute("TYPE");//$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Used to insert a new rule into the style sheet. The new rule now
- * becomes part of the cascade.
- *
- * @param rule
- * The parsable text representing the rule. For rule sets this
- * contains both the selector and the style declaration. For
- * at-rules, this specifies both the at-identifier and the rule
- * content.
- * @param index
- * The index within the style sheet's rule list of the rule
- * before which to insert the specified rule. If the specified
- * index is equal to the length of the style sheet's rule
- * collection, the rule will be added to the end of the style
- * sheet.
- * @return The index within the style sheet's rule collection of the newly
- * inserted rule.
- * @exception DOMException
- * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be
- * inserted at the specified index e.g. if an
- * <code>@import</code> rule is inserted after a standard rule set or other
- * at-rule. <br>
- * INDEX_SIZE_ERR: Raised if the specified index is not a valid
- * insertion point. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is
- * readonly. <br>
- * SYNTAX_ERR: Raised if the specified rule has a syntax error and
- * is unparsable.
- */
- public int insertRule(String rule, int index) throws DOMException {
- int length = getCssRules().getLength();
- if (index < 0 || length < index)
- throw new DOMException(DOMException.INDEX_SIZE_ERR, "");//$NON-NLS-1$
-
- IStructuredDocument doc = getModel().getStructuredDocument();
- CSSRuleImpl refRule = (length != index) ? getIndexedRule(index) : null;
- int offset = (refRule != null) ? refRule.getStartOffset() : doc.getLength();
- doc.replaceText(this, offset, 0, rule);
-
- // insertBefore((CSSNodeImpl) createCSSRule(rule),refRule);
- return index;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newRule
- * org.w3c.dom.css.CSSRule
- * @param refRule
- * org.w3c.dom.css.CSSRule
- */
- public org.w3c.dom.css.CSSRule insertRuleBefore(org.w3c.dom.css.CSSRule newRule, org.w3c.dom.css.CSSRule refRule) throws org.w3c.dom.DOMException {
- if (newRule == null && refRule == null)
- return null;
-
- CSSRule ret = (CSSRule) insertBefore((CSSNodeImpl) newRule, (CSSNodeImpl) refRule);
- return ret;
- }
-
- /**
- * @return boolean
- */
- public boolean isDocument() {
- return true;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule removeRule(org.w3c.dom.css.CSSRule rule) throws org.w3c.dom.DOMException {
- if (rule == null)
- return null;
-
- CSSRule ret = (CSSRule) removeChild((CSSNodeImpl) rule);
- return ret;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newChild
- * org.w3c.dom.css.CSSRule
- * @param oldChild
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule replaceRule(org.w3c.dom.css.CSSRule newRule, org.w3c.dom.css.CSSRule oldRule) throws org.w3c.dom.DOMException {
- if (newRule == null && oldRule == null)
- return null;
-
- CSSRule ret = (CSSRule) replaceChild((CSSNodeImpl) newRule, (CSSNodeImpl) oldRule);
- return ret;
- }
-
- /**
- * setDisabled method comment.
- */
- public void setDisabled(boolean disabled) {
- this.fDisabled = disabled;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSUnknownRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSUnknownRuleImpl.java
deleted file mode 100644
index cfbd98116e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSUnknownRuleImpl.java
+++ /dev/null
@@ -1,79 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.w3c.dom.css.CSSUnknownRule;
-
-
-/**
- *
- */
-class CSSUnknownRuleImpl extends CSSRuleImpl implements CSSUnknownRule {
-
- // TODO: This field is never read
- String fCssText = null;
-
- /**
- *
- */
- CSSUnknownRuleImpl() {
- super();
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CSSUnknownRuleImpl
- */
- CSSUnknownRuleImpl(CSSUnknownRuleImpl that) {
- super(that);
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSUnknownRuleImpl cloned = new CSSUnknownRuleImpl(this);
-
- return cloned;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return UNKNOWNRULE_NODE;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return UNKNOWN_RULE;
- }
-
- /**
- * @param cssText
- * java.lang.String
- */
- public void setCssText(String cssText) {
- this.fCssText = cssText;
-
- super.setCssText(cssText);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CounterImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CounterImpl.java
deleted file mode 100644
index e715cda50b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CounterImpl.java
+++ /dev/null
@@ -1,128 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICounter;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.Counter;
-
-
-/**
- *
- */
-class CounterImpl extends CSSPrimitiveContainer implements ICounter {
-
- /**
- *
- */
- CounterImpl() {
- super(CSS_COUNTER);
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.CounterImpl
- */
- CounterImpl(CounterImpl that) {
- super(that);
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CounterImpl cloned = new CounterImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * This method is used to get the Counter value. If this CSS value doesn't
- * contain a counter value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>Counter</code> interface.
- *
- * @return The Counter value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a Counter value (e.g. this is not
- * <code>CSS_COUNTER</code>).
- */
- public Counter getCounterValue() throws DOMException {
- return this;
- }
-
- /**
- * This attribute is used for the identifier of the counter.
- */
- public String getIdentifier() {
- return getAttribute(IDENTIFIER);
- }
-
- /**
- * This attribute is used for the style of the list.
- */
- public String getListStyle() {
- return getAttribute(LISTSTYLE);
- }
-
- /**
- * This attribute is used for the separator of the nested counters.
- */
- public String getSeparator() {
- return getAttribute(SEPARATOR);
- }
-
- /**
- *
- */
- protected void initPrimitives() {
- return;
- }
-
- /**
- * @param identifier
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setIdentifier(String identifier) throws DOMException {
- setAttribute(IDENTIFIER, identifier);
- }
-
- /**
- * @param listStyle
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setListStyle(String listStyle) throws DOMException {
- setAttribute(LISTSTYLE, listStyle);
- }
-
- /**
- * @param Separator
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setSeparator(String Separator) throws org.w3c.dom.DOMException {
- setAttribute(SEPARATOR, Separator);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/DOMCSSImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/DOMCSSImpl.java
deleted file mode 100644
index 4b0e3e7c06..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/DOMCSSImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.w3c.dom.css.CSSStyleSheet;
-
-
-/**
- *
- */
-public class DOMCSSImpl {
-
- /**
- * DOMCSSImpl constructor comment.
- */
- public DOMCSSImpl() {
- super();
- }
-
- /**
- * @return com.ibm.sed.css.interfaces.CSSStyleDeclBlock
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public static ICSSStyleDeclaration createCSSStyleDeclaration() throws org.w3c.dom.DOMException {
- CSSStyleDeclarationImpl document = new CSSStyleDeclarationImpl(true);
-
- return document;
- }
-
- /**
- * @return org.w3c.dom.css.CSSStyleSheet
- * @param title
- * java.lang.String
- * @param media
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public static CSSStyleSheet createCSSStyleSheet(String title, String media) throws org.w3c.dom.DOMException {
- return new CSSStyleSheetImpl();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/MediaListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/MediaListImpl.java
deleted file mode 100644
index c7a30c0ae9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/MediaListImpl.java
+++ /dev/null
@@ -1,166 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.stylesheets.MediaList;
-
-
-/**
- *
- */
-class MediaListImpl extends CSSRegionContainer implements MediaList {
-
- int mediumCounter;
-
- /**
- * MediaListImpl constructor comment.
- */
- MediaListImpl() {
- super();
- }
-
- /**
- * MediaListImpl constructor comment.
- *
- * @param that
- * com.ibm.sed.css.treemodel.CSSContainer
- */
- MediaListImpl(MediaListImpl that) {
- super(that);
- }
-
- /**
- * Adds the medium <code>newMedium</code> to the end of the list. If the
- * <code>newMedium</code> is already used, it is first removed.
- *
- * @param newMediumThe
- * new medium to add.
- * @exception DOMException
- * INVALID_CHARACTER_ERR: If the medium contains characters
- * that are invalid in the underlying style language. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this list is
- * readonly.
- */
- public void appendMedium(String newMedium) throws DOMException {
- if (newMedium == null)
- return;
-
- CSSNodeListImpl m = getMedia();
- for (int i = 0; i != m.getLength(); i++) {
- if (newMedium.equals(item(i)))
- return;
- }
-
- setAttribute("medium" + Integer.toString(mediumCounter++), newMedium);//$NON-NLS-1$
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/01/17
- * 18:50:29)
- *
- * @return com.ibm.sed.treemodel.css.CSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- MediaListImpl cloned = new MediaListImpl(this);
- return cloned;
- }
-
- /**
- * Deletes the medium indicated by <code>oldMedium</code> from the list.
- *
- * @param oldMediumThe
- * medium to delete in the media list.
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this list is
- * readonly. <br>
- * NOT_FOUND_ERR: Raised if <code>oldMedium</code> is not
- * in the list.
- */
- public void deleteMedium(String oldMedium) throws DOMException {
- for (int i = 0; i != getLength(); i++) {
- if (oldMedium.equals(item(i))) {
- removeAttributeNode((CSSAttrImpl) fAttrs.item(i));
- }
- }
- }
-
- /**
- * The number of media in the list. The range of valid media is
- * <code>0</code> to <code>length-1</code> inclusive.
- */
- public int getLength() {
- return getMedia().getLength();
- }
-
- /**
- * @return CSSNodeListImpl
- */
- CSSNodeListImpl getMedia() {
- if (fAttrs == null)
- fAttrs = new CSSNamedNodeMapImpl();
- return fAttrs;
- }
-
- /**
- * The parsable textual representation of the media list. This is a
- * comma-separated list of media.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified string value has a
- * syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this media list
- * is readonly.
- */
- public String getMediaText() {
- return getCssText();
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/01/17
- * 18:50:29)
- *
- * @return short
- */
- public short getNodeType() {
- return MEDIALIST_NODE;
- }
-
- /**
- * Returns the <code>index</code> th in the list. If <code>index</code>
- * is greater than or equal to the number of media in the list, this
- * returns <code>null</code>.
- *
- * @param index
- * Index into the collection.
- * @return The medium at the <code>index</code> th position in the
- * <code>MediaList</code>, or <code>null</code> if that is
- * not a valid index.
- */
- public String item(int index) {
- if (index < 0 || getLength() <= index)
- return null;
-
- return ((CSSAttrImpl) getMedia().item(index)).getValue();
- }
-
- /**
- * setMediaText method comment.
- */
- public void setMediaText(String mediaText) throws DOMException {
- setCssText(mediaText);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RGBColorImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RGBColorImpl.java
deleted file mode 100644
index 4120fc25f5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RGBColorImpl.java
+++ /dev/null
@@ -1,108 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.RGBColor;
-
-
-/**
- *
- */
-class RGBColorImpl extends CSSPrimitiveContainer implements RGBColor {
-
- private CSSPrimitiveValueImpl fRed;
- private CSSPrimitiveValueImpl fGreen;
- private CSSPrimitiveValueImpl fBlue;
-
- /**
- *
- */
- RGBColorImpl() {
- super(CSS_RGBCOLOR);
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.RGBColorImpl
- */
- RGBColorImpl(RGBColorImpl that) {
- super(that);
-
- fRed = new CSSPrimitiveValueImpl(that.fRed);
- appendChild(fRed);
-
- fGreen = new CSSPrimitiveValueImpl(that.fGreen);
- appendChild(fGreen);
-
- fBlue = new CSSPrimitiveValueImpl(that.fBlue);
- appendChild(fBlue);
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- RGBColorImpl cloned = new RGBColorImpl(this);
-
- return cloned;
- }
-
- /**
- * This attribute is used for the blue value of the RGB color.
- */
- public CSSPrimitiveValue getBlue() {
- return fBlue;
- }
-
- /**
- * This attribute is used for the green value of the RGB color.
- */
- public CSSPrimitiveValue getGreen() {
- return fGreen;
- }
-
- /**
- * This attribute is used for the red value of the RGB color.
- */
- public CSSPrimitiveValue getRed() {
- return fRed;
- }
-
- /**
- * @return org.w3c.dom.css.RGBColor
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public RGBColor getRGBColorValue() throws org.w3c.dom.DOMException {
- return this;
- }
-
- /**
- *
- */
- protected void initPrimitives() {
-
- fRed = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fRed);
-
- fGreen = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fGreen);
-
- fBlue = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fBlue);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RectImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RectImpl.java
deleted file mode 100644
index 83880274f1..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RectImpl.java
+++ /dev/null
@@ -1,122 +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.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.Rect;
-
-
-/**
- *
- */
-class RectImpl extends CSSPrimitiveContainer implements Rect {
-
- private CSSPrimitiveValueImpl fTop;
- private CSSPrimitiveValueImpl fRight;
- private CSSPrimitiveValueImpl fBottom;
- private CSSPrimitiveValueImpl fLeft;
-
- /**
- *
- */
- RectImpl() {
- super(CSS_RECT);
- }
-
- /**
- * @param that
- * com.ibm.sed.css.treemodel.RectImpl
- */
- RectImpl(RectImpl that) {
- super(that);
-
- fTop = new CSSPrimitiveValueImpl(that.fTop);
- appendChild(fTop);
-
- fRight = new CSSPrimitiveValueImpl(that.fRight);
- appendChild(fRight);
-
- fBottom = new CSSPrimitiveValueImpl(that.fBottom);
- appendChild(fBottom);
-
- fLeft = new CSSPrimitiveValueImpl(that.fLeft);
- appendChild(fLeft);
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- RectImpl cloned = new RectImpl(this);
-
- return cloned;
- }
-
- /**
- * This attribute is used for the bottom of the rect.
- */
- public CSSPrimitiveValue getBottom() {
- return fBottom;
- }
-
- /**
- * This attribute is used for the left of the rect.
- */
- public CSSPrimitiveValue getLeft() {
- return fLeft;
- }
-
- /**
- * @return org.w3c.dom.css.Rect
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public Rect getRectValue() throws org.w3c.dom.DOMException {
- return this;
- }
-
- /**
- * This attribute is used for the right of the rect.
- */
- public CSSPrimitiveValue getRight() {
- return fRight;
- }
-
- /**
- * This attribute is used for the top of the rect.
- */
- public CSSPrimitiveValue getTop() {
- return fTop;
- }
-
- /**
- *
- */
- protected void initPrimitives() {
-
- fTop = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fTop);
-
- fRight = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fRight);
-
- fBottom = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fBottom);
-
- fLeft = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fLeft);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/StyleSheetListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/StyleSheetListImpl.java
deleted file mode 100644
index fea1bfca15..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/StyleSheetListImpl.java
+++ /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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.w3c.dom.stylesheets.StyleSheet;
-import org.w3c.dom.stylesheets.StyleSheetList;
-
-/**
- *
- */
-class StyleSheetListImpl extends AbstractCSSNodeList implements StyleSheetList {
-
- /**
- * StyleSheetListImpl constructor comment.
- */
- StyleSheetListImpl() {
- super();
- }
-
- /**
- * Used to retrieve a style sheet by ordinal index. If index is greater
- * than or equal to the number of style sheets in the list, this returns
- * <code>null</code>.
- *
- * @param indexIndex
- * into the collection
- * @return The style sheet at the <code>index</code> position in the
- * <code>StyleSheetList</code>, or <code>null</code> if that
- * is not a valid index.
- */
- public StyleSheet item(int index) {
- return (StyleSheet) itemImpl(index);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/ByteUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/ByteUtil.java
deleted file mode 100644
index 635e388b5c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/ByteUtil.java
+++ /dev/null
@@ -1,228 +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.css.core.internal.encoding;
-
-
-
-public class ByteUtil {
-
-
- public static void main(String[] args) {
- String bigString = "\n<@ page\n"; //$NON-NLS-1$
- String target = "<@ PAGE"; //$NON-NLS-1$
- int match = findIfMatch(stringToByteArray(bigString), 7, 0, stringToByteArray(target));
- System.out.println(match);
- }
-
- /**
- * ByteUtil constructor comment.
- */
- public ByteUtil() {
- super();
- }
-
- /**
- * @return int
- * @param s1
- * byte[]
- * @param s2
- * byte[]
- * @param n
- * int
- *
- * Compare bytes. If same, return 0. Otherwise non-zero.
- */
- private static int _cmp(byte[] s1, int starts1pos, byte[] s2, int starts2pos, int complen, boolean ignorecase) {
- if ((s1 == null) || (s2 == null))
- return 1;
- int len_s1 = s1.length - starts1pos;
- int len_s2 = s2.length - starts2pos;
- if ((len_s1 <= 0) || (len_s2 <= 0))
- return 1;
- if ((len_s1 < complen) || (len_s2 < complen))
- return 1;
-
- int len = complen;
- int offset = 0;
- byte c1 = (byte) 0, c2 = (byte) 0;
- while (offset < len) {
- if (ignorecase == true) {
- c1 = _toUpper(s1[starts1pos + offset]);
- c2 = _toUpper(s2[starts2pos + offset]);
- }
- else {
- c1 = s1[starts1pos + offset];
- c2 = s2[starts2pos + offset];
- }
- if (c1 == c2) {
- offset++;
- continue;
- }
- else {
- break;
- }
- }
-
- return (offset == len ? 0 : (int) (c1 - c2));
- }
-
- /**
- * @return byte
- * @param c1
- * byte
- *
- * Convert to upper case letter. It's for ASCII only
- */
- private static byte _toUpper(byte c1) {
- if ((c1 >= (byte) 0x61) && (c1 <= (byte) 0x7a))
- c1 -= 0x20;
- return c1;
- }
-
- /**
- * @return int
- * @param string
- * byte[]
- * @param target
- * byte[]
- *
- * Look for the index of 2nd byte[] within 1st byte[]. If being found,
- * return the pos. Otherwise, return -1. This is case-insensitive. It's
- * simlar to String.indexOf().
- */
- public static int findIfMatch(byte[] container, int length, int startpos, byte[] target) {
- int container_len = length - startpos;
- int target_len = target.length;
-
- // Clearly different
- if ((container_len <= 0) || (target_len <= 0))
- return -1;
- if (target_len > container_len)
- return -1;
-
- // Look for the same bytes as 'target' in 'container' from startpos
- int pos;
- for (pos = startpos; pos < length; pos++) {
- if (strCaseCmp(container, pos, target, 0, target_len) == 0) {
- // matched.
- return pos;
- }
- }
-
- return -1;
- }
-
- /**
- * Let the conversion be done in code since it's easier to reuse and
- * verify than converting them by hand.
- */
- private static byte[] stringToByteArray(String string) {
- byte[] bytes = new byte[string.length()];
- for (int i = 0; i < string.length(); i++)
- bytes[i] = (byte) string.charAt(i); // typecast to number using
- // lower 8 bits only
- return bytes;
- }
-
- /**
- * @return int
- * @param container
- * byte[]
- * @param startpos
- * int
- * @param target
- * byte
- *
- * This is case-insensitive.
- */
- public static int findIfMatch(byte[] container, int length, int startpos, byte target) {
- int container_len = length - startpos;
-
- if (container_len <= 0)
- return -1;
-
- // Look for the same byte as 'target' in 'container' from startpos
- int pos;
- for (pos = startpos; pos < length; pos++) {
- if (_toUpper(container[pos]) == _toUpper(target))
- return pos;
- }
-
- return -1;
- }
-
- /**
- * @return int
- * @param container
- * byte[]
- * @param length
- * int
- * @param startpos
- * int
- * @param target
- * byte
- *
- * Skip same bytes as target. Return the position. If goes to end, return
- * -1
- */
- public static int skipIfMatch(byte[] container, int length, int startpos, byte target) {
- int container_len = length - startpos;
-
- // Clearly error
- if (container_len <= 0)
- return -1;
-
- int pos;
- for (pos = startpos; pos < length; pos++) {
- if (container[pos] != target)
- break;
- }
- if (pos == length) {
- // I found everything is target
- pos = -1;
- }
- return pos;
- }
-
- /**
- * @return int
- * @param s1
- * byte[]
- * @param starts1pos
- * int
- * @param s2
- * byte[]
- * @param starts2pos
- * int
- *
- * It's similar to XPG4's strcasecmp()
- */
- public static int strCaseCmp(byte[] s1, int starts1pos, byte[] s2, int starts2pos, int complen) {
- return _cmp(s1, starts1pos, s2, starts2pos, complen, true);
- }
-
- /**
- * @return int
- * @param s1
- * byte[]
- * @param starts1pos
- * int
- * @param s2
- * byte[]
- * @param starts2pos
- * int
- *
- * It's similar to XPG4's strcmp()
- */
- public static int strCmp(byte[] s1, int starts1pos, byte[] s2, int starts2pos, int complen) {
- return _cmp(s1, starts1pos, s2, starts2pos, complen, false);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentCharsetDetector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentCharsetDetector.java
deleted file mode 100644
index a7262809d7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentCharsetDetector.java
+++ /dev/null
@@ -1,126 +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.css.core.internal.encoding;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.css.core.internal.content.CSSResourceEncodingDetector;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.sse.core.document.DocumentReader;
-import org.eclipse.wst.sse.core.document.IDocumentCharsetDetector;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.core.util.StringUtils;
-
-
-public class CSSDocumentCharsetDetector extends CSSResourceEncodingDetector implements IDocumentCharsetDetector {
-
- public String getEncodingName(IStructuredDocument structuredDocument) {
- String result = null;
- // if the document is empty, then there will be no nodes,
- // so no need to continue.
- IStructuredDocumentRegionList nodes = structuredDocument.getRegionList();
- if (nodes.getLength() > 0) {
- IStructuredDocumentRegion node = null;
- // skip any initial whitespace
- // Note that @charset "encodingname";
- // must appear at very beginning of document,
- // to be valid.
- // May have to test with "damaged" files (e.g.
- // beginning EOLs, etc., to verify this works
- // as expected.
- for (int i = 0; i < nodes.getLength(); i++) {
- node = nodes.item(i);
- if (getType(node) != CSSRegionContexts.CSS_S) {
- break;
- }
- }
- Iterator regions = node.getRegions().iterator();
- ITextRegion region = getNextRegionOfType(CSSRegionContexts.CSS_CHARSET, regions);
- if (region != null) {
- ITextRegion valueRegion = getNextRegionOfType(CSSRegionContexts.CSS_STRING, regions);
- if (valueRegion == null) {
- // if didn't find the region, its probably due to ill
- // formed input, such as
- // @charset "ISO-8859-6;
- // so we'll try again for "unknown" region.
- // If that fails, we'll give up?
- regions = node.getRegions().iterator();
- region = getNextRegionOfType(CSSRegionContexts.CSS_CHARSET, regions);
- if (region != null) {
- valueRegion = getNextRegionOfType(CSSRegionContexts.CSS_UNKNOWN, regions);
- if (valueRegion != null) {
- result = node.getText(valueRegion);
- }
- }
- }
- else {
- result = node.getText(valueRegion);
- }
- result = StringUtils.stripNonLetterDigits(result);
- }
- }
- return result;
- }
-
- public String getEncodingName(IDocument document) {
- String enc = null;
- if (document instanceof IStructuredDocument) {
- enc = getEncodingName((IStructuredDocument) document);
- }
- else {
- // TODO Important: need to implement some "raw" parser for
- // IDocument level
- }
- return enc;
- }
-
- private String getType(IStructuredDocumentRegion node) {
- if (node == null)
- return null;
- ITextRegionList regions = node.getRegions();
- if (regions == null || regions.size() == 0)
- return null;
- ITextRegion region = regions.get(0);
- String result = region.getType();
- return result;
- }
-
- private ITextRegion getNextRegionOfType(String type, Iterator regions) {
- if (type == null)
- return null;
- if (regions == null)
- return null;
- ITextRegion result = null;
- while (regions.hasNext()) {
- ITextRegion region = (ITextRegion) regions.next();
- if (region.getType() == type) {
- result = region;
- break;
- }
- }
- return result;
- }
-
- /**
- *
- */
-
- public void set(IDocument document) {
- set(new DocumentReader(document, 0));
-
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentLoader.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentLoader.java
deleted file mode 100644
index 1f9a69f9ec..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentLoader.java
+++ /dev/null
@@ -1,87 +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.css.core.internal.encoding;
-
-
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.wst.common.encoding.ContentTypeEncodingPreferences;
-import org.eclipse.wst.common.encoding.EncodingGuesser;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.css.core.internal.parser.CSSSourceParser;
-import org.eclipse.wst.css.core.internal.text.CSSStructuredDocumentReParser;
-import org.eclipse.wst.css.core.internal.text.rules.StructuredTextPartitionerForCSS;
-import org.eclipse.wst.sse.core.document.AbstractDocumentLoader;
-import org.eclipse.wst.sse.core.document.IDocumentCharsetDetector;
-import org.eclipse.wst.sse.core.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.document.IEncodedDocument;
-import org.eclipse.wst.sse.core.document.StructuredDocumentFactory;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
-import org.eclipse.wst.sse.core.parser.RegionParser;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-
-
-public class CSSDocumentLoader extends AbstractDocumentLoader {
- private final static String CSS_ID = IContentTypeIdentifier.ContentTypeID_CSS;
- private IDocumentCharsetDetector documentEncodingDetector;
-
-
- public CSSDocumentLoader() {
- super();
- }
-
- protected String getEncodingNameByGuess(byte[] string, int length) {
- String ianaEnc = null;
- ianaEnc = EncodingGuesser.guessEncoding(string, length);
- return ianaEnc;
- }
-
- /**
- * Default encoding. For CSS there is no spec'd default.
- */
- protected String getSpecDefaultEncoding() {
- return null;
- }
-
- protected IEncodedDocument newEncodedDocument() {
- // DMW: I copied this from CSSModelImple ...
- // but am not sure its right
- IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
- CSSStructuredDocumentReParser reParser = new CSSStructuredDocumentReParser();
- reParser.setStructuredDocument(structuredDocument);
- ((BasicStructuredDocument) structuredDocument).setReParser(reParser);
- return structuredDocument;
- }
-
- public RegionParser getParser() {
- // return new CSSRegionParser();
- return new CSSSourceParser();
- }
-
- protected String getPreferredNewLineDelimiter() {
- return ContentTypeEncodingPreferences.getPreferredNewLineDelimiter(CSS_ID);
- }
-
- public IDocumentCharsetDetector getDocumentEncodingDetector() {
- if (documentEncodingDetector == null) {
- documentEncodingDetector = new CSSDocumentCharsetDetector();
- }
- return documentEncodingDetector;
- }
-
- public IDocumentPartitioner getDefaultDocumentPartitioner() {
- return new StructuredTextPartitionerForCSS();
- }
-
- public IDocumentLoader newInstance() {
- return new CSSDocumentLoader();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSEmbededStyleNotifyAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSEmbededStyleNotifyAdapter.java
deleted file mode 100644
index e48e31ec2c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSEmbededStyleNotifyAdapter.java
+++ /dev/null
@@ -1,60 +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.css.core.internal.event;
-
-
-
-import org.eclipse.wst.css.core.adapters.IStyleSheetAdapter;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSSelector;
-import org.eclipse.wst.css.core.event.ICSSStyleListener;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.xml.core.document.XMLNode;
-
-
-public class CSSEmbededStyleNotifyAdapter extends CSSStyleNotifyAdapter {
-
- /**
- * CSSEmbeddedStyleNotifyAdapter constructor comment.
- *
- * @param model
- * org.eclipse.wst.css.core.model.interfaces.ICSSModel
- */
- public CSSEmbededStyleNotifyAdapter(ICSSModel model) {
- super(model);
- }
-
- /**
- *
- */
- public void styleChanged(ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media) {
- XMLNode node = (XMLNode) model.getOwnerDOMNode();
- if (node != null)
- return;
- INodeAdapter adapter = node.getAdapterFor(IStyleSheetAdapter.class);
- if (adapter instanceof ICSSStyleListener) {
- ((ICSSStyleListener) adapter).styleChanged(srcModel, removed, added, media);
- }
- }
-
- /**
- *
- */
- public void styleUpdate(ICSSModel srcModel) {
- XMLNode node = (XMLNode) model.getOwnerDOMNode();
- if (node != null)
- return;
- INodeAdapter adapter = node.getAdapterFor(IStyleSheetAdapter.class);
- if (adapter instanceof ICSSStyleListener) {
- ((ICSSStyleListener) adapter).styleUpdate(srcModel);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSStyleEventDeliverer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSStyleEventDeliverer.java
deleted file mode 100644
index 0675a511e3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSStyleEventDeliverer.java
+++ /dev/null
@@ -1,155 +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.css.core.internal.event;
-
-
-
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSSelector;
-import org.eclipse.wst.css.core.event.ICSSStyleListener;
-import org.eclipse.wst.css.core.event.ICSSStyleNotifier;
-
-
-/**
- *
- */
-public class CSSStyleEventDeliverer {
-
- private Vector fVisited = new Vector();
- private ICSSModel fSrcModel;
- private ICSSSelector[] fRemoved;
- private ICSSSelector[] fAdded;
- private String fMedia;
-
- /**
- *
- */
- public CSSStyleEventDeliverer() {
- super();
- }
-
- /**
- *
- */
- public void fire(ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media) {
- if (srcModel == null || srcModel.getStyleListeners() == null)
- return;
-
- this.fSrcModel = srcModel;
- this.fRemoved = removed;
- this.fAdded = added;
- this.fMedia = media;
-
- // prohibit delivering to srcModel
- fVisited.clear();
- fVisited.add(srcModel);
- Object[] listeners = srcModel.getStyleListeners().toArray();
- for (int i = 0; i < listeners.length; i++) {
- visit((ICSSStyleListener) listeners[i]);
- }
- }
-
- /**
- *
- */
- public void fireTo(ICSSStyleListener listener, ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media) {
- this.fSrcModel = srcModel;
- this.fRemoved = removed;
- this.fAdded = added;
- this.fMedia = media;
-
- // prohibit delivering to srcModel
- fVisited.clear();
- // visited.add(srcModel); : because looping problem
- visit(listener);
- }
-
- /**
- *
- */
- public void fireUpdate(ICSSModel srcModel) {
- if (srcModel == null || srcModel.getStyleListeners() == null)
- return;
-
- this.fSrcModel = srcModel;
-
- // prohibit delivering to srcModel
- fVisited.clear();
- fVisited.add(srcModel);
- Object[] listeners = srcModel.getStyleListeners().toArray();
- for (int i = 0; i < listeners.length; i++) {
- visitUpdate((ICSSStyleListener) listeners[i]);
- }
- }
-
- /**
- *
- */
- public void fireUpdateTo(ICSSStyleListener listener, ICSSModel srcModel) {
- if (srcModel == null || srcModel.getStyleListeners() == null)
- return;
-
- this.fSrcModel = srcModel;
-
- // prohibit delivering to srcModel
- fVisited.clear();
- // visited.add(srcModel);
- visitUpdate(listener);
- }
-
- /**
- *
- */
- protected void visit(ICSSStyleListener listener) {
- if (listener == null || fVisited.contains(listener))
- return;
-
- // fire event to listener
- listener.styleChanged(fSrcModel, fRemoved, fAdded, fMedia);
- fVisited.add(listener);
-
- // traverse notifier
- if (listener instanceof ICSSStyleNotifier) {
- ICSSStyleNotifier notifier = (ICSSStyleNotifier) listener;
- if (notifier.getStyleListeners() != null) {
- Object[] listeners = notifier.getStyleListeners().toArray();
- for (int i = 0; i < listeners.length; i++) {
- visit((ICSSStyleListener) listeners[i]);
- }
- }
- }
- }
-
- /**
- *
- */
- protected void visitUpdate(ICSSStyleListener listener) {
- if (listener == null || fVisited.contains(listener))
- return;
-
- // fire event to listener
- listener.styleUpdate(fSrcModel);
- fVisited.add(listener);
-
- // traverse notifier
- if (listener instanceof ICSSStyleNotifier) {
- ICSSStyleNotifier notifier = (ICSSStyleNotifier) listener;
- if (notifier.getStyleListeners() != null) {
- Object[] listeners = notifier.getStyleListeners().toArray();
- for (int i = 0; i < listeners.length; i++) {
- visitUpdate((ICSSStyleListener) listeners[i]);
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSStyleNotifyAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSStyleNotifyAdapter.java
deleted file mode 100644
index b1d03be7ca..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSStyleNotifyAdapter.java
+++ /dev/null
@@ -1,174 +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.css.core.internal.event;
-
-
-
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSSelector;
-import org.eclipse.wst.css.core.document.ICSSStyleSheet;
-import org.eclipse.wst.css.core.event.ICSSStyleListener;
-import org.eclipse.wst.css.core.event.ICSSStyleNotifier;
-import org.eclipse.wst.css.core.util.ImportedCollector;
-import org.eclipse.wst.css.core.util.SelectorsCollector;
-
-
-/**
- *
- */
-public class CSSStyleNotifyAdapter implements ICSSStyleNotifier {
-
- protected java.util.Vector listeners;
- protected final org.eclipse.wst.css.core.document.ICSSModel model;
- protected boolean recording = false;
-
- /**
- *
- */
- public CSSStyleNotifyAdapter(ICSSModel model) {
- super();
- this.model = model;
- }
-
- /**
- *
- */
- public void addStyleListener(ICSSStyleListener listener) {
- if (listener == null)
- return;
-
- if (listeners == null)
- listeners = new Vector();
- if (!listeners.contains(listener)) {
-
- // send new selectors event to listener
- ImportedCollector trav = new ImportedCollector();
- trav.apply(model.getDocument());
- Iterator it = trav.getExternals().iterator();
- while (it.hasNext()) {
- ICSSStyleSheet sheet = (ICSSStyleSheet) it.next();
- // collect selectors
- SelectorsCollector selTrav = new SelectorsCollector();
- selTrav.apply(sheet);
- int nSel = selTrav.getSelectors().size();
- ICSSSelector[] added = new ICSSSelector[nSel];
- for (int i = 0; i < nSel; i++)
- added[i] = (ICSSSelector) selTrav.getSelectors().get(i);
-
- // fire event
- CSSStyleEventDeliverer deliverer = new CSSStyleEventDeliverer();
- deliverer.fireTo(listener, sheet.getModel(), null, added, null/*
- * media
- * will
- * be
- * implemented
- * in
- * the
- * future
- */);
- }
-
- // add listener
- listeners.add(listener);
- }
- }
-
- /**
- *
- */
- public void beginRecording() {
- recording = true;
- }
-
- /**
- *
- */
- public void endRecording() {
- recording = false;
- }
-
- /**
- *
- */
- public void fire(ICSSSelector[] removed, ICSSSelector[] added, String media) {
- // send selector changed event
- CSSStyleEventDeliverer deliv = new CSSStyleEventDeliverer();
- deliv.fire(model, removed, added, null);
-
- }
-
- /**
- *
- */
- public java.util.List getStyleListeners() {
- return listeners;
- }
-
- /**
- */
- public boolean isRecording() {
- return recording;
- }
-
- /**
- *
- */
- public void removeStyleListener(ICSSStyleListener listener) {
- if (listener == null)
- return;
-
- if (listeners.contains(listener)) {
- listeners.remove(listener);
-
- // send old selectors event to listener
- ImportedCollector trav = new ImportedCollector();
- trav.apply(model.getDocument());
- Iterator it = trav.getExternals().iterator();
- while (it.hasNext()) {
- ICSSStyleSheet sheet = (ICSSStyleSheet) it.next();
- // collect selectors
- SelectorsCollector selTrav = new SelectorsCollector();
- selTrav.apply(sheet);
- int nSel = selTrav.getSelectors().size();
- ICSSSelector[] removed = new ICSSSelector[nSel];
- for (int i = 0; i < nSel; i++)
- removed[i] = (ICSSSelector) selTrav.getSelectors().get(i);
-
- // fire event
- CSSStyleEventDeliverer deliverer = new CSSStyleEventDeliverer();
- deliverer.fireTo(listener, sheet.getModel(), removed, null, null/*
- * media
- * will
- * be
- * implemented
- * in
- * the
- * future
- */);
- }
- }
- }
-
- /**
- *
- */
- public void styleChanged(org.eclipse.wst.css.core.document.ICSSModel srcModel, org.eclipse.wst.css.core.document.ICSSSelector[] removed, org.eclipse.wst.css.core.document.ICSSSelector[] added, java.lang.String media) {
- }
-
- /**
- *
- */
- public void styleUpdate(org.eclipse.wst.css.core.document.ICSSModel srcModel) {
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java
deleted file mode 100644
index bdb74b058e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java
+++ /dev/null
@@ -1,974 +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.css.core.internal.formatter;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.jface.text.DefaultLineTracker;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategyImpl;
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.document.ICSSStyleSheet;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.CSSLinkConverter;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.core.util.Assert;
-
-/**
- *
- */
-public abstract class AbstractCSSSourceFormatter implements CSSSourceGenerator {
-
- protected final static short GENERATE = 0;
- protected final static short FORMAT = 1;
- protected final static short CLEANUP = 2;
- protected static short strategy;
-
- /**
- *
- */
- AbstractCSSSourceFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void appendDelimBefore(ICSSNode node, CompoundRegion toAppend, StringBuffer source) {
- if (node == null || source == null)
- return;
- if (isCleanup() && !getCleanupStrategy(node).isFormatSource())
- return; // for not formatting case on cleanup action
- String delim = getLineDelimiter(node);
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- boolean needIndent = !(node instanceof ICSSStyleSheet);
- if (toAppend == null) {
- source.append(delim);
- source.append(getIndent(node));
- if (needIndent)
- source.append(mgr.getIndentString());
- }
- else {
- String type = toAppend.getType();
- if (type == CSSRegionContexts.CSS_COMMENT) {
- RegionIterator it = new RegionIterator(toAppend.getDocumentRegion(), toAppend.getTextRegion());
- it.prev();
- ITextRegion prev = it.prev();
- if (prev == null || (prev.getType() == CSSRegionContexts.CSS_S && TextUtilities.indexOf(DefaultLineTracker.DELIMITERS, it.getStructuredDocumentRegion().getText(prev), 0)[0] >= 0)) {
- source.append(delim);
- source.append(getIndent(node));
- if (needIndent)
- source.append(mgr.getIndentString());
- }
- else {
- appendSpaceBefore(node, toAppend.getText(), source);
- }
- }
- else if (type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- RegionIterator it = new RegionIterator(toAppend.getDocumentRegion(), toAppend.getTextRegion());
- it.prev();
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S && TextUtilities.indexOf(DefaultLineTracker.DELIMITERS, it.getStructuredDocumentRegion().getText(prev), 0)[0] >= 0) {
- source.append(delim);
- source.append(getIndent(node));
- if (needIndent)
- source.append(mgr.getIndentString());
- }
- else if (mgr.getMaxLineWidth() > 0 && (!mgr.isProhibitWrapOnAttr() || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int length = getLastLineLength(node, source);
- int append = 1;
- if (length + append > mgr.getMaxLineWidth()) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- if (needIndent)
- source.append(mgr.getIndentString());
- }
- }
- }
- else if (type == CSSRegionContexts.CSS_RBRACE || type == CSSRegionContexts.CSS_LBRACE) {
- source.append(delim);
- source.append(getIndent(node));
- }
- else {
- source.append(delim);
- source.append(getIndent(node));
- if (needIndent)
- source.append(mgr.getIndentString());
- }
- }
- }
-
- /**
- *
- */
- protected void appendSpaceBefore(ICSSNode node, CompoundRegion toAppend, StringBuffer source) {
- if (node == null || toAppend == null || source == null)
- return;
- if (isCleanup() && !getCleanupStrategy(node).isFormatSource())
- return; // for not formatting case on cleanup action
- String type = toAppend.getType();
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- boolean needIndent = !(node instanceof ICSSStyleSheet);
- if (type == CSSRegionContexts.CSS_COMMENT) {
- // check whether previous region is 'S' and has CR-LF
- String delim = getLineDelimiter(node);
- RegionIterator it = new RegionIterator(toAppend.getDocumentRegion(), toAppend.getTextRegion());
- it.prev();
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S && TextUtilities.indexOf(DefaultLineTracker.DELIMITERS, it.getStructuredDocumentRegion().getText(prev), 0)[0] >= 0) {
- source.append(delim);
- source.append(getIndent(node));
- if (needIndent)
- source.append(mgr.getIndentString());
- }
- else {
- appendSpaceBefore(node, toAppend.getText(), source);
- }
- }
- else if (type == CSSRegionContexts.CSS_LBRACE && mgr.isNewLineOnOpenBrace()) {
- String delim = getLineDelimiter(node);
- source.append(delim);
- source.append(getIndent(node));
- // } else if (type == CSSRegionContexts.CSS_CURLY_BRACE_CLOSE) {
- // } else if (type == CSSRegionContexts.CSS_INCLUDES || type ==
- // CSSRegionContexts.CSS_DASHMATCH) {
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_SEPARATOR && node instanceof ICSSStyleDeclItem) {
- int n = mgr.getSpacesPreDelimiter();
- if (mgr.getMaxLineWidth() > 0 && (!mgr.isProhibitWrapOnAttr() || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int length = getLastLineLength(node, source);
- int append = 1;
- if (length + n + append > mgr.getMaxLineWidth()) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- if (needIndent)
- source.append(mgr.getIndentString());
- n = 0; // no space is necessary
- }
- }
- // no delimiter case
- while (n-- > 0)
- source.append(" ");//$NON-NLS-1$
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR || type == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE) {
- if (mgr.getMaxLineWidth() > 0 && (!mgr.isProhibitWrapOnAttr() || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int length = getLastLineLength(node, source);
- int append = 1;
- if (length + append > mgr.getMaxLineWidth()) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- if (needIndent)
- source.append(mgr.getIndentString());
- }
- }
- }
- else
- appendSpaceBefore(node, toAppend.getText(), source);
- }
-
- /**
- *
- */
- protected void appendSpaceBefore(ICSSNode node, String toAppend, StringBuffer source) {
- if (node == null || source == null)
- return;
- if (isCleanup() && !getCleanupStrategy(node).isFormatSource())
- return; // for not formatting case on cleanup action
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- if (toAppend != null && toAppend.startsWith("{") && mgr.isNewLineOnOpenBrace()) {//$NON-NLS-1$
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- return;
- }
- else if (/* ! mgr.isOnePropertyPerLine() && */mgr.getMaxLineWidth() > 0 && (!mgr.isProhibitWrapOnAttr() || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int n = getLastLineLength(node, source);
- int append = (toAppend != null) ? TextUtilities.indexOf(DefaultLineTracker.DELIMITERS, toAppend, 0)[0] : 0;
- if (toAppend != null)
- append = (append < 0) ? toAppend.length() : append;
- if (n + append + 1 > mgr.getMaxLineWidth()) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- source.append(mgr.getIndentString());
- return;
- }
- }
- source.append(" ");//$NON-NLS-1$
- }
-
- /**
- *
- */
- public final StringBuffer cleanup(ICSSNode node) {
- short oldStrategy = strategy;
- strategy = CLEANUP;
- StringBuffer source = formatProc(node);
- strategy = oldStrategy;
-
- return source;
- }
-
- /**
- *
- */
- public final StringBuffer cleanup(ICSSNode node, IRegion region) {
- short oldStrategy = strategy;
- strategy = CLEANUP;
- StringBuffer source = formatProc(node, region);
- strategy = oldStrategy;
-
- return source;
- }
-
- /**
- *
- */
- protected String decoratedIdentRegion(CompoundRegion region, CSSCleanupStrategy stgy) {
- if (isFormat())
- return region.getText();
-
- String text = region.getText();
- if (region.getType() == CSSRegionContexts.CSS_STRING || region.getType() == CSSRegionContexts.CSS_URI)
- return decoratedRegion(region, 0, stgy);
-
- if (isCleanup()) {
- if (stgy.getIdentCase() == CSSCleanupStrategy.ASIS || region.getType() == CSSRegionContexts.CSS_COMMENT)
- return text;
- else if (stgy.getIdentCase() == CSSCleanupStrategy.UPPER)
- return text.toUpperCase();
- else
- return text.toLowerCase();
- }
- else {
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
-
- if (mgr.isPreserveCase() || region.getType() == CSSRegionContexts.CSS_COMMENT)
- return text;
- else if (mgr.isIdentUpperCase())
- return text.toUpperCase();
- else
- return text.toLowerCase();
- }
- }
-
- /**
- *
- */
- protected String decoratedPropNameRegion(CompoundRegion region, CSSCleanupStrategy stgy) {
- if (isFormat())
- return region.getText();
-
- String text = region.getText();
- if (region.getType() == CSSRegionContexts.CSS_STRING || region.getType() == CSSRegionContexts.CSS_URI)
- return decoratedRegion(region, 1, stgy);
- if (isCleanup()) {
- if (stgy.getPropNameCase() == CSSCleanupStrategy.ASIS || region.getType() != CSSRegionContexts.CSS_DECLARATION_PROPERTY)
- return text;
- else if (stgy.getPropNameCase() == CSSCleanupStrategy.UPPER)
- return text.toUpperCase();
- else
- return text.toLowerCase();
- }
- else {
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
-
- if (mgr.isPreserveCase() || region.getType() != CSSRegionContexts.CSS_DECLARATION_PROPERTY)
- return text;
- else if (mgr.isPropNameUpperCase())
- return text.toUpperCase();
- else
- return text.toLowerCase();
- }
- }
-
- /**
- *
- */
- protected String decoratedPropValueRegion(CompoundRegion region, CSSCleanupStrategy stgy) {
- if (isFormat())
- return region.getText();
-
- String text = region.getText();
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_STRING || type == CSSRegionContexts.CSS_URI)
- return decoratedRegion(region, 2, stgy);
- if (isCleanup()) {
- if (stgy.getPropValueCase() != CSSCleanupStrategy.ASIS) {
- if (type == CSSRegionContexts.CSS_COMMENT) {
- }
- else {
- if (stgy.getPropValueCase() == CSSCleanupStrategy.UPPER)
- text = text.toUpperCase();
- else
- text = text.toLowerCase();
- }
- }
- }
- else {
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
-
- if (!mgr.isPreserveCase()) {
- if (type == CSSRegionContexts.CSS_COMMENT) {
- }
- else {
- if (mgr.isPropValueUpperCase())
- text = text.toUpperCase();
- else
- text = text.toLowerCase();
- }
- }
- }
- return text;
- }
-
- /**
- *
- */
- protected String decoratedRegion(CompoundRegion region, int type, CSSCleanupStrategy stgy) {
- if (isFormat())
- return region.getText();
-
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- String text = region.getText();
- if (region.getType() == CSSRegionContexts.CSS_URI) {
- String uri = CSSLinkConverter.stripFunc(text);
- boolean upper = (type == 0) ? mgr.isIdentUpperCase() : ((type == 1) ? mgr.isPropNameUpperCase() : mgr.isPropValueUpperCase());
- String func = mgr.isPreserveCase() ? text.substring(0, 4) : (upper ? "URL(" : "url(");//$NON-NLS-2$//$NON-NLS-1$
- if (isCleanup()) {
- upper = ((type == 0) ? stgy.getIdentCase() : ((type == 1) ? stgy.getPropNameCase() : stgy.getPropValueCase())) == CSSCleanupStrategy.UPPER;
- func = ((type == 0) ? stgy.getIdentCase() : ((type == 1) ? stgy.getPropNameCase() : stgy.getPropValueCase())) == CSSCleanupStrategy.ASIS ? text.substring(0, 4) : (upper ? "URL(" : "url(");//$NON-NLS-2$//$NON-NLS-1$
- }
- if ((!isCleanup() && mgr.isQuoteInURI()) || (isCleanup() && stgy.isQuoteValues())) {
- String quote = mgr.getQuoteString(null /* reserved parameter */);
- quote = CSSUtil.detectQuote(uri, quote);
- text = func + quote + uri + quote + ")";//$NON-NLS-1$
- }
- else if (isCleanup() && !stgy.isQuoteValues()) {
- text = func + CSSLinkConverter.removeFunc(text) + ")";//$NON-NLS-1$
- }
- else {
- text = func + uri + ")";//$NON-NLS-1$
- }
- }
- else if (region.getType() == CSSRegionContexts.CSS_STRING && (!isCleanup() || stgy.isQuoteValues())) {
- String quote = mgr.getQuoteString(null /* reserved parameter */);
- // begginning
- if (!text.startsWith(quote)) {
- if (text.startsWith("\"") || text.startsWith("\'")) //$NON-NLS-1$ //$NON-NLS-2$
- text = quote + text.substring(1);
- else
- text = quote + text;
- }
- // ending
- if (!text.endsWith(quote)) {
- if (text.endsWith("\"") || text.endsWith("\'")) //$NON-NLS-1$ //$NON-NLS-2$
- text = text.substring(0, text.length() - 1) + quote;
- else
- text = text + quote;
- }
- }
- return text;
- }
-
- /**
- *
- */
- public final StringBuffer format(ICSSNode node) {
- short oldStrategy = strategy;
- strategy = FORMAT;
- StringBuffer source = formatProc(node);
- strategy = oldStrategy;
-
- return source;
- }
-
- /**
- *
- */
- public final StringBuffer format(ICSSNode node, IRegion region) {
- short oldStrategy = strategy;
- strategy = FORMAT;
- StringBuffer source = formatProc(node, region);
- strategy = oldStrategy;
-
- return source;
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- return new StringBuffer(insert && (attr != null) ? attr.getValue() : "");//$NON-NLS-1$
- }
-
- /**
- * Generate or format source between children('child' and its previous
- * sibling) and append to string buffer
- */
- abstract protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor);
-
- /**
- * Generate or format source between children('child' and its previous
- * sibling) and append to string buffer
- */
- public final StringBuffer formatBefore(ICSSNode node, ICSSNode child, IRegion exceptFor) {
- Assert.isTrue(child == null || child.getParentNode() == node);
- StringBuffer buf = new StringBuffer();
- formatBefore(node, child, /* (child != null) ? (child.getCssText()) : */"", buf, exceptFor);//$NON-NLS-1$
- return buf;
- }
-
- /**
- * Generate or format source between children('child' and its previous
- * sibling) and append to string buffer
- */
- protected abstract void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source);
-
- /**
- *
- */
- protected final void formatChildren(ICSSNode node, StringBuffer source) {
- ICSSNode child = node.getFirstChild();
- boolean first = true;
- while (child != null) {
- // append child
- CSSSourceFormatter formatter = (CSSSourceFormatter) ((INodeNotifier) child).getAdapterFor(CSSSourceFormatter.class);
- if (formatter == null) {
- formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) child);
- }
- StringBuffer childSource = ((AbstractCSSSourceFormatter) formatter).formatProc(child);
- if (!first) {
- formatBefore(node, child, new String(childSource), source, null);
- }
- source.append(childSource);
- // append between children
- child = child.getNextSibling();
- first = false;
- }
- }
-
- /**
- *
- */
- protected final void formatChildren(ICSSNode node, IRegion region, StringBuffer source) {
- ICSSNode child = node.getFirstChild();
- int start = region.getOffset();
- int end = region.getOffset() + region.getLength();
- boolean first = true;
- while (child != null) {
- int curEnd = ((IndexedRegion) child).getEndOffset();
- StringBuffer childSource = null;
- boolean toFinish = false;
- if (start < curEnd) {
- int curStart = ((IndexedRegion) child).getStartOffset();
- if (curStart < end) {
- // append child
- CSSSourceFormatter formatter = (CSSSourceFormatter) ((INodeNotifier) child).getAdapterFor(CSSSourceFormatter.class);
- if (formatter == null) {
- formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) child);
- }
- if (includes(region, curStart, curEnd))
- childSource = ((AbstractCSSSourceFormatter) formatter).formatProc(child);
- else
- childSource = ((AbstractCSSSourceFormatter) formatter).formatProc(child, overlappedRegion(region, curStart, curEnd));
- }
- else
- toFinish = true;
- }
- // append between children
- if (!first) {
- curEnd = ((IndexedRegion) child).getStartOffset(); // change
- // only
- // start
- if (start < curEnd) {
- int curStart = ((IndexedRegion) child.getPreviousSibling()).getEndOffset();
- if (curStart < end) {
- String toAppend = (childSource != null) ? new String(childSource) : "";//$NON-NLS-1$
- if (includes(region, curStart, curEnd))
- formatBefore(node, child, toAppend, source, null);
- else
- formatBefore(node, child, overlappedRegion(region, curStart, curEnd), toAppend, source);
- }
- }
- }
- if (childSource != null) {
- source.append(childSource);
- }
- first = false;
- if (toFinish)
- break;
- child = child.getNextSibling();
- }
- }
-
- /**
- * Generate or format source after the last child and append to string
- * buffer
- */
- protected abstract void formatPost(ICSSNode node, StringBuffer source);
-
- /**
- * Generate or format source after the last child and append to string
- * buffer
- */
- protected abstract void formatPost(ICSSNode node, IRegion region, StringBuffer source);
-
- /**
- * Generate or format source before the first child and append to string
- * buffer
- */
- protected abstract void formatPre(ICSSNode node, StringBuffer source);
-
- /**
- * Generate or format source before the first child and append to string
- * buffer
- */
- abstract protected void formatPre(ICSSNode node, IRegion region, StringBuffer source);
-
- /**
- *
- * @return java.lang.StringBuffer
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- protected final StringBuffer formatProc(ICSSNode node) {
- StringBuffer source = new StringBuffer();
- formatPre(node, source);
- formatChildren(node, source);
- formatPost(node, source);
- return source;
- }
-
- /**
- *
- * @return java.lang.StringBuffer
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param region
- * org.eclipse.jface.text.IRegion
- */
- protected final StringBuffer formatProc(ICSSNode node, IRegion region) {
- StringBuffer source = new StringBuffer();
- int curStart = ((IndexedRegion) node).getStartOffset();
- int curEnd = ((IndexedRegion) node).getEndOffset();
- if (node.getChildNodes().getLength() > 0) {
- curEnd = ((IndexedRegion) node.getFirstChild()).getStartOffset();
- if (overlaps(region, curStart, curEnd)) {
- if (includes(region, curStart, curEnd))
- formatPre(node, source);
- else
- formatPre(node, overlappedRegion(region, curStart, curEnd), source);
- }
- curStart = curEnd;
- curEnd = ((IndexedRegion) node.getLastChild()).getEndOffset();
- if (overlaps(region, curStart, curEnd)) {
- if (includes(region, curStart, curEnd))
- formatChildren(node, source);
- else
- formatChildren(node, overlappedRegion(region, curStart, curEnd), source);
- }
- curStart = curEnd;
- curEnd = ((IndexedRegion) node).getEndOffset();
- if (overlaps(region, curStart, curEnd)) {
- if (includes(region, curStart, curEnd))
- formatPost(node, source);
- else
- formatPost(node, overlappedRegion(region, curStart, curEnd), source);
- }
- }
- else {
- curEnd = getChildInsertPos(node);
- if (overlaps(region, curStart, curEnd)) {
- if (includes(region, curStart, curEnd))
- formatPre(node, source);
- else
- formatPre(node, overlappedRegion(region, curStart, curEnd), source);
- }
- curStart = curEnd;
- curEnd = ((IndexedRegion) node).getEndOffset();
- if (overlaps(region, curStart, curEnd)) {
- if (includes(region, curStart, curEnd))
- formatPost(node, source);
- else
- formatPost(node, overlappedRegion(region, curStart, curEnd), source);
- }
- }
- return source;
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- return -1;
- }
-
- /**
- * Insert the method's description here.
- *
- * @return org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- protected CSSCleanupStrategy getCleanupStrategy(ICSSNode node) {
- CSSCleanupStrategy strategy = CSSCleanupStrategyImpl.getInstance();
- ICSSDocument doc = node.getOwnerDocument();
- if (doc == null)
- return strategy;
- ICSSModel model = doc.getModel();
- if (model == null)
- return strategy;
- if (model.getStyleSheetType() != ICSSModel.EXTERNAL) {
- // TODO - TRANSITION Nakamori-san, or Kit, how can we move to
- // "HTML" plugin?
- // can we subclass?
- // strategy = CSSInHTMLCleanupStrategyImpl.getInstance();
- }
- return strategy;
- }
-
- /**
- *
- */
- protected String getIndent(ICSSNode node) {
- if (node == null)
- return "";//$NON-NLS-1$
- ICSSNode parent = node.getParentNode();
- if (node instanceof ICSSAttr)
- parent = ((ICSSAttr) node).getOwnerCSSNode();
- if (parent == null)
- return "";//$NON-NLS-1$
- if (node instanceof org.w3c.dom.css.CSSStyleDeclaration)
- parent = parent.getParentNode();
- if (parent == null)
- return "";//$NON-NLS-1$
-
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- String parentIndent = getIndent(parent);
- if (parent instanceof org.w3c.dom.css.CSSRule)
- return parentIndent + mgr.getIndentString();
- if (node.getParentNode() instanceof ICSSStyleDeclaration)
- return parentIndent + mgr.getIndentString();
- return parentIndent;
- }
-
- /**
- *
- */
- protected int getLastLineLength(ICSSNode node, StringBuffer source) {
- if (node == null || source == null)
- return 0;
- String delim = getLineDelimiter(node);
- String str = new String(source);
- int n = str.lastIndexOf(delim);
- if (n < 0)
- return str.length();
- else
- return str.length() - n - delim.length();
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatAfter(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos < 0 || !nnode.contains(insertPos))
- return 0;
-
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(insertPos);
- if (flatNode == null)
- return 0;
- ITextRegion region = flatNode.getRegionAtCharacterOffset(insertPos);
- if (region == null)
- return 0;
- RegionIterator it = new RegionIterator(flatNode, region);
- boolean found = false;
- while (it.hasNext()) {
- region = it.next();
- // if (region.getType() != CSSRegionContexts.CSS_S &&
- // region.getType() != CSSRegionContexts.CSS_DELIMITER &&
- // region.getType() !=
- // CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- if (region.getType() != CSSRegionContexts.CSS_S) {
- found = true;
- break;
- }
- }
- int pos = (found ? it.getStructuredDocumentRegion().getStartOffset(region) : it.getStructuredDocumentRegion().getTextEndOffset(region)) - insertPos;
- return (pos >= 0) ? pos : 0;
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatBefore(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos <= 0 || !nnode.contains(insertPos - 1))
- return 0;
-
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(insertPos - 1);
- if (flatNode == null)
- return 0;
- ITextRegion region = flatNode.getRegionAtCharacterOffset(insertPos - 1);
- if (region == null)
- return 0;
- RegionIterator it = new RegionIterator(flatNode, region);
- boolean found = false;
- while (it.hasPrev()) {
- region = it.prev();
- // if (region.getType() != CSSRegionContexts.CSS_S &&
- // region.getType() != CSSRegionContexts.CSS_DELIMITER &&
- // region.getType() !=
- // CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- if (region.getType() != CSSRegionContexts.CSS_S) {
- found = true;
- break;
- }
- }
- int pos = insertPos - (found ? it.getStructuredDocumentRegion().getTextEndOffset(region) : it.getStructuredDocumentRegion().getStartOffset(region));
- // flatNode = it.getStructuredDocumentRegion();
- // if (found) {
- // if (region.getLength() != region.getTextLength()) {
- // pos = insertPos - flatNode.getTextEndOffset(region);
- // } else {
- // pos = insertPos - flatNode.getEndOffset(region);
- // }
- // } else {
- // pos = insertPos - flatNode.getStartOffset(region);
- // }
- return (pos >= 0) ? pos : 0;
- }
-
- /**
- *
- */
- String getLineDelimiter(ICSSNode node) {
- ICSSModel model = (node != null) ? node.getOwnerDocument().getModel() : null;
- return (model != null) ? model.getStructuredDocument().getLineDelimiter() : "\n" /*
- * default
- * delimiter
- */;//$NON-NLS-1$
-
- // TODO : check whether to use model.getLineDelimiter() or
- // model.getStructuredDocument().getLineDelimiter()
- }
-
- /**
- *
- */
- protected CompoundRegion[] getOutsideRegions(IStructuredDocument model, IRegion reg) {
- CompoundRegion[] ret = new CompoundRegion[2];
- RegionIterator it = new RegionIterator(model, reg.getOffset());
- it.prev();
- if (it.hasPrev()) {
- ITextRegion textRegion = it.prev();
- IStructuredDocumentRegion documentRegion = it.getStructuredDocumentRegion();
- ret[0] = new CompoundRegion(documentRegion, textRegion);
- }
- else {
- ret[0] = null;
- }
- it.reset(model, reg.getOffset() + reg.getLength());
- if (it.hasNext()) {
- ITextRegion textRegion = it.next();
- IStructuredDocumentRegion documentRegion = it.getStructuredDocumentRegion();
- ret[1] = new CompoundRegion(documentRegion, textRegion);
- }
- else {
- ret[1] = null;
- }
- return ret;
- }
-
- /**
- */
- protected CSSSourceGenerator getParentFormatter(ICSSNode node) {
- ICSSNode parent = node.getParentNode();
- if (parent != null) {
- CSSSourceGenerator formatter = (CSSSourceGenerator) ((INodeNotifier) parent).getAdapterFor(CSSSourceFormatter.class);
- if (formatter == null) {
- formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) parent);
- }
- return formatter;
- }
- return null;
- }
-
- /**
- *
- */
- protected CompoundRegion[] getRegions(IStructuredDocument model, IRegion reg, IRegion exceptFor, String pickupType) {
- int start = reg.getOffset();
- int end = reg.getOffset() + reg.getLength();
- int startE = (exceptFor != null) ? exceptFor.getOffset() : -1;
- int endE = (exceptFor != null) ? exceptFor.getOffset() + exceptFor.getLength() : 0;
-
- ArrayList list = new ArrayList();
- IStructuredDocumentRegion flatNode = model.getRegionAtCharacterOffset(start);
- boolean pickuped = false;
- while (flatNode != null && flatNode.getStartOffset() < end) {
- ITextRegionList regionList = flatNode.getRegions();
- Iterator it = regionList.iterator();
- while (it.hasNext()) {
- ITextRegion region = (ITextRegion) it.next();
- if (flatNode.getStartOffset(region) < start)
- continue;
- if (end <= flatNode.getStartOffset(region))
- break;
- if (startE >= 0 && startE <= flatNode.getStartOffset(region) && flatNode.getEndOffset(region) <= endE)
- continue;
- if (region.getType() == CSSRegionContexts.CSS_COMMENT || region.getType() == CSSRegionContexts.CSS_CDC || region.getType() == CSSRegionContexts.CSS_CDO)
- list.add(new CompoundRegion(flatNode, region));
- else if (!pickuped && region.getType() == pickupType) {
- list.add(new CompoundRegion(flatNode, region));
- pickuped = true;
- }
- }
- flatNode = flatNode.getNext();
- }
- if (list.size() > 0) {
- CompoundRegion[] regions = new CompoundRegion[list.size()];
- list.toArray(regions);
- return regions;
- }
- else
- return new CompoundRegion[0];
- }
-
- /**
- *
- */
- protected CompoundRegion[] getRegionsWithoutWhiteSpaces(IStructuredDocument model, IRegion reg, CSSCleanupStrategy stgy) {
- int start = reg.getOffset();
- int end = reg.getOffset() + reg.getLength() - 1;
- ArrayList list = new ArrayList();
- IStructuredDocumentRegion flatNode = model.getRegionAtCharacterOffset(start);
- while (flatNode != null && flatNode.getStartOffset() <= end) {
- ITextRegionList regionList = flatNode.getRegions();
- Iterator it = regionList.iterator();
- while (it.hasNext()) {
- ITextRegion region = (ITextRegion) it.next();
- if (flatNode.getStartOffset(region) < start)
- continue;
- if (end < flatNode.getStartOffset(region))
- break;
- if (region.getType() != CSSRegionContexts.CSS_S || (isCleanup() && !stgy.isFormatSource())) // for
- // not
- // formatting
- // case
- // on
- // cleanup
- // action
- list.add(new CompoundRegion(flatNode, region));
- }
- flatNode = flatNode.getNext();
- }
- if (list.size() > 0) {
- CompoundRegion[] regions = new CompoundRegion[list.size()];
- list.toArray(regions);
- return regions;
- }
- else
- return new CompoundRegion[0];
- }
-
- /**
- *
- */
- public static boolean includes(IRegion region, int start, int end) {
- if (region == null)
- return false;
- else
- return (region.getOffset() <= start) && (end <= region.getOffset() + region.getLength());
- }
-
- /**
- *
- * @return boolean
- */
- protected static boolean isCleanup() {
- return strategy == CLEANUP;
- }
-
- /**
- *
- * @return boolean
- */
- protected static boolean isFormat() {
- return strategy == FORMAT;
- }
-
- /**
- *
- */
- protected boolean isIncludesPreEnd(ICSSNode node, IRegion region) {
- return (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getStartOffset() == (region.getOffset() + region.getLength()));
- }
-
- /**
- *
- */
- static protected boolean needS(CompoundRegion region) {
- return (region != null && region.getType() != CSSRegionContexts.CSS_S);
- }
-
- /**
- *
- */
- public static IRegion overlappedRegion(IRegion region, int start, int end) {
- if (overlaps(region, start, end)) {
- int offset = (region.getOffset() <= start) ? start : region.getOffset();
- int length = ((end <= region.getOffset() + region.getLength()) ? end : region.getOffset() + region.getLength()) - offset;
- return new FormatRegion(offset, length);
- }
- return null;
- }
-
- /**
- *
- */
- public static boolean overlaps(IRegion region, int start, int end) {
- if (region == null)
- return false;
- else
- return (start < region.getOffset() + region.getLength()) && (region.getOffset() < end);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrChangeContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrChangeContext.java
deleted file mode 100644
index 924a73e7b6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrChangeContext.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.css.core.internal.formatter;
-
-
-
-/**
- *
- */
-public class AttrChangeContext {
-
- public int start, end;
-
- /**
- *
- */
- public AttrChangeContext() {
- super();
- start = end = 0;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrFormatter.java
deleted file mode 100644
index b3eab4454b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrFormatter.java
+++ /dev/null
@@ -1,165 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPageRule;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-
-
-/**
- *
- */
-public class AttrFormatter extends DefaultCSSSourceFormatter {
-
- private static AttrFormatter instance;
-
- /**
- *
- */
- AttrFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- ICSSAttr attr = (ICSSAttr) node;
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int end = ((IndexedRegion) node).getEndOffset();
- if (end > 0) { // format source
- int start = ((IndexedRegion) node).getStartOffset();
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
-
- if (attr.getName().equals(ICSSStyleRule.SELECTOR) || attr.getName().equals(ICSSPageRule.SELECTOR)) {
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBetween(node, regions[i - 1], regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
- else if (attr.getName().equals(ICSSImportRule.HREF)) {
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- }
- else if (attr.getName().equals(ICSSCharsetRule.ENCODING)) {
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else if (attr.getName().equals(ICSSStyleDeclItem.IMPORTANT)) {
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- }
- else if (attr.getName() == null || attr.getName().length() == 0) {
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else {
- // counter attributes
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- }
- }
- else { // generate source
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- String value = attr.getValue();
- if (value == null)
- value = "";//$NON-NLS-1$
- if (attr.getName().equals(ICSSStyleRule.SELECTOR) || attr.getName().equals(ICSSPageRule.SELECTOR)) {
- }
- else if (attr.getName().equals(ICSSImportRule.HREF)) {
- String uri = org.eclipse.wst.css.core.util.CSSLinkConverter.stripFunc(value);
- String func = mgr.isPropValueUpperCase() ? "URL(" : "url(";//$NON-NLS-2$//$NON-NLS-1$
- if (mgr.isQuoteInURI()) {
- String quote = mgr.getQuoteString(attr.getOwnerDocument().getModel());
- quote = CSSUtil.detectQuote(uri, quote);
- value = func + quote + uri + quote + ")";//$NON-NLS-1$
- }
- else {
- value = func + uri + ")";//$NON-NLS-1$
- }
- }
- else if (attr.getName().equals(ICSSCharsetRule.ENCODING)) {
- String quote = mgr.getQuoteString(attr.getOwnerDocument().getModel());
- if (!value.startsWith("\"") && !value.startsWith("\'"))//$NON-NLS-2$//$NON-NLS-1$
- value = quote + value;
- if (!value.endsWith("\"") && !value.endsWith("\'"))//$NON-NLS-2$//$NON-NLS-1$
- value = value + quote;
- }
- else if (attr.getName().equals(ICSSStyleDeclItem.IMPORTANT)) {
- if (mgr.isPropValueUpperCase())
- value = value.toUpperCase();
- else
- value = value.toLowerCase();
- }
- else if (attr.getName() == null || attr.getName().length() == 0) {
- if (mgr.isIdentUpperCase())
- value = value.toUpperCase();
- else
- value = value.toLowerCase();
- }
- else {
- if (mgr.isPropValueUpperCase())
- value = value.toUpperCase();
- else
- value = value.toLowerCase();
- }
- source.append(value);
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- formatPre(node, source);
- }
-
- /**
- *
- */
- public synchronized static AttrFormatter getInstance() {
- if (instance == null) {
- instance = new AttrFormatter();
- }
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSFormatUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSFormatUtil.java
deleted file mode 100644
index 1dbdc01d32..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSFormatUtil.java
+++ /dev/null
@@ -1,165 +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.css.core.internal.formatter;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.css.core.adapters.ICSSModelAdapter;
-import org.eclipse.wst.css.core.adapters.IStyleDeclarationAdapter;
-import org.eclipse.wst.css.core.adapters.IStyleSheetAdapter;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-
-public class CSSFormatUtil {
- public List collectCSSNodes(IStructuredModel model, int start, int length) {
- List nodes = new ArrayList();
-
- IndexedRegion startNode = model.getIndexedRegion(start);
- IndexedRegion endNode = model.getIndexedRegion(start + length - 1);
-
- if (startNode == null || endNode == null) {
- return nodes;
- }
-
- if (model instanceof ICSSModel && startNode instanceof ICSSNode && endNode instanceof ICSSNode) {
- // CSS model
- ICSSNode ca = getCommonAncestor((ICSSNode) startNode, (ICSSNode) endNode);
- if (ca != null) {
- for (ICSSNode node = ca.getFirstChild(); node != null && start + length < ((IndexedRegion) node).getStartOffset(); node = node.getNextSibling()) {
- if (start < ((IndexedRegion) node).getEndOffset()) {
- nodes.add(node);
- }
- }
- }
- }
- else if (model instanceof XMLModel && startNode instanceof XMLNode && endNode instanceof XMLNode) {
- if (startNode instanceof Text) {
- startNode = (IndexedRegion) ((Text) startNode).getParentNode();
- }
- if (endNode instanceof Text) {
- endNode = (IndexedRegion) ((Text) endNode).getParentNode();
- }
- // HTML model, maybe
- XMLNode ca = (XMLNode) getCommonAncestor((Node) startNode, (Node) endNode);
- findCSS(nodes, ca);
- }
-
- return nodes;
- }
-
- /**
- * getCommonAncestor method
- *
- * @return org.w3c.dom.Node
- * @param node
- * org.w3c.dom.Node
- */
- private Node getCommonAncestor(Node node1, Node node2) {
- if (node1 == null || node2 == null)
- return null;
-
- for (Node na = node2; na != null; na = na.getParentNode()) {
- for (Node ta = node1; ta != null; ta = ta.getParentNode()) {
- if (ta == na)
- return ta;
- }
- }
- return null; // not found
- }
-
- private void findCSS(List cssNodes, XMLNode node) {
- ICSSModelAdapter adapter;
- adapter = (ICSSModelAdapter) node.getAdapterFor(IStyleSheetAdapter.class);
- if (adapter != null) {
- ICSSModel model = adapter.getModel();
- if (model != null && model.getStyleSheetType() == ICSSModel.EMBEDDED) {
- cssNodes.add(model.getDocument());
- }
- }
- else {
- adapter = (ICSSModelAdapter) node.getAdapterFor(IStyleDeclarationAdapter.class);
- if (adapter != null) {
- ICSSModel model = adapter.getModel();
- if (model != null && model.getStyleSheetType() == ICSSModel.INLINE) {
- cssNodes.add(model.getDocument());
- }
- }
- }
-
- for (XMLNode child = (XMLNode) node.getFirstChild(); child != null; child = (XMLNode) child.getNextSibling()) {
- findCSS(cssNodes, child);
- }
- }
-
- private ICSSNode getCommonAncestor(ICSSNode nodeA, ICSSNode nodeB) {
- if (nodeA == null || nodeB == null) {
- return null;
- }
-
- for (ICSSNode na = nodeA; na != null; na = na.getParentNode()) {
- for (ICSSNode ta = nodeB; ta != null; ta = ta.getParentNode()) {
- if (ta == na) {
- return ta;
- }
- }
- }
-
- return null; // not found
- }
-
- /**
- */
- public void replaceSource(IStructuredModel model, int offset, int length, String source) {
- if (model == null)
- return;
- IStructuredDocument structuredDocument = model.getStructuredDocument();
- if (structuredDocument == null)
- return;
- if (offset >= 0 && length >= 0 && offset + length <= structuredDocument.getLength()) {
- if (structuredDocument.containsReadOnly(offset, length))
- return;
- if (source == null)
- source = new String();
- // We use 'structuredDocument' as the requester object just so
- // this and the other
- // format-related 'repalceText' (in replaceSource) can use the
- // same requester.
- // Otherwise, if requester is not identical,
- // the undo group gets "broken" into multiple pieces based
- // on the requesters being different. Technically, any unique,
- // common
- // requester object would work.
- structuredDocument.replaceText(structuredDocument, offset, length, source);
- }
- }
-
- public synchronized static CSSFormatUtil getInstance() {
- if (fInstance == null) {
- fInstance = new CSSFormatUtil();
- }
- return fInstance;
- }
-
- private CSSFormatUtil() {
- super();
- }
-
- private static CSSFormatUtil fInstance;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatter.java
deleted file mode 100644
index a132fe5497..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatter.java
+++ /dev/null
@@ -1,48 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.document.ICSSNode;
-
-
-/**
- *
- */
-public interface CSSSourceFormatter {
-
- /**
- *
- */
- StringBuffer cleanup(ICSSNode node);
-
- /**
- *
- * @return java.lang.StringBuffer
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param region
- * org.eclipse.jface.text.IRegion
- */
- StringBuffer cleanup(ICSSNode node, IRegion region);
-
- /**
- *
- */
- StringBuffer format(ICSSNode node);
-
- /**
- *
- */
- StringBuffer format(ICSSNode node, IRegion region);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatterFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatterFactory.java
deleted file mode 100644
index 5d5bca8b27..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatterFactory.java
+++ /dev/null
@@ -1,81 +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.css.core.internal.formatter;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.sse.core.INodeNotifier;
-
-
-/**
- *
- */
-public class CSSSourceFormatterFactory {
- /**
- *
- */
- private CSSSourceFormatterFactory() {
- super();
- }
-
- /**
- *
- */
- public CSSSourceGenerator getSourceFormatter(INodeNotifier target) {
- ICSSNode node = (ICSSNode) target;
- short type = node.getNodeType();
- switch (type) {
- case ICSSNode.CHARSETRULE_NODE :
- return CharsetRuleFormatter.getInstance();
- case ICSSNode.FONTFACERULE_NODE :
- return FontFaceRuleFormatter.getInstance();
- case ICSSNode.IMPORTRULE_NODE :
- return ImportRuleFormatter.getInstance();
- case ICSSNode.MEDIALIST_NODE :
- return MediaListFormatter.getInstance();
- case ICSSNode.MEDIARULE_NODE :
- return MediaRuleFormatter.getInstance();
- case ICSSNode.PRIMITIVEVALUE_NODE :
- ICSSPrimitiveValue value = (ICSSPrimitiveValue) node;
- if (value.getPrimitiveType() == org.w3c.dom.css.CSSPrimitiveValue.CSS_COUNTER)
- return CounterFormatter.getInstance();
- else if (value.getPrimitiveType() == org.w3c.dom.css.CSSPrimitiveValue.CSS_RECT)
- return RectFormatter.getInstance();
- else if (value.getPrimitiveType() == org.w3c.dom.css.CSSPrimitiveValue.CSS_RGBCOLOR)
- return RGBFormatter.getInstance();
- else
- return PrimitiveValueFormatter.getInstance();
- case ICSSNode.PAGERULE_NODE :
- return PageRuleFormatter.getInstance();
- case ICSSNode.STYLEDECLARATION_NODE :
- return StyleDeclarationFormatter.getInstance();
- case ICSSNode.STYLEDECLITEM_NODE :
- return StyleDeclItemFormatter.getInstance();
- case ICSSNode.STYLERULE_NODE :
- return StyleRuleFormatter.getInstance();
- case ICSSNode.STYLESHEET_NODE :
- return StyleSheetFormatter.getInstance();
- case ICSSNode.ATTR_NODE :
- return AttrFormatter.getInstance();
- default :
- return UnknownRuleFormatter.getInstance();
- }
- }
-
- public synchronized static CSSSourceFormatterFactory getInstance() {
- if (fInstance == null) {
- fInstance = new CSSSourceFormatterFactory();
- }
- return fInstance;
- }
-
- private static CSSSourceFormatterFactory fInstance;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceGenerator.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceGenerator.java
deleted file mode 100644
index ed8d1246a4..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceGenerator.java
+++ /dev/null
@@ -1,61 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSNode;
-
-
-public interface CSSSourceGenerator extends CSSSourceFormatter {
-
- /**
- *
- */
- StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext region);
-
- /**
- *
- */
- StringBuffer formatBefore(ICSSNode node, ICSSNode child, IRegion exceptFor);
-
- /**
- *
- */
- int getAttrInsertPos(ICSSNode node, String attrName);
-
- /**
- *
- */
- int getChildInsertPos(ICSSNode node);
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- int getLengthToReformatAfter(ICSSNode node, int insertPos);
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- int getLengthToReformatBefore(ICSSNode node, int insertPos);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CharsetRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CharsetRuleFormatter.java
deleted file mode 100644
index 2d0605d532..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CharsetRuleFormatter.java
+++ /dev/null
@@ -1,188 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/**
- *
- */
-public class CharsetRuleFormatter extends DefaultCSSSourceFormatter {
-
- public final static java.lang.String CHARSET = "@charset";//$NON-NLS-1$
- private static CharsetRuleFormatter instance;
-
- /**
- *
- */
- CharsetRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- if (!ICSSCharsetRule.ENCODING.equalsIgnoreCase(attr.getName()))
- return buf;
-
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- RegionIterator it = new RegionIterator(flatNode, region);
- it.prev();
- if (it.hasPrev()) {
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S)
- context.start = it.getStructuredDocumentRegion().getStartOffset(prev);
- else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- }
- else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- }
- else {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- if (region.getType() == CSSRegionContexts.CSS_S) {
- context.start = flatNode.getStartOffset(region);
- context.end = flatNode.getStartOffset(region);
- }
- else {
- context.start = flatNode.getEndOffset() + 1;
- context.end = flatNode.getEndOffset();
- }
- }
- }
- // generate text
- if (insert) {
- appendSpaceBefore(node, attr.getValue(), buf);
- buf.append(attr.getValue());
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int end = ((IndexedRegion) node).getEndOffset();
- if (end > 0) { // format source
- int start = ((IndexedRegion) node).getStartOffset();
- formatPre(node, new FormatRegion(start, end - start), source);
- }
- else { // generate source
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- String quote = mgr.getQuoteString(node.getOwnerDocument().getModel());
- String str = CHARSET;
- if (mgr.isIdentUpperCase())
- str = CHARSET.toUpperCase();
- source.append(str);
- String enc = ((ICSSCharsetRule) node).getEncoding();
- quote = CSSUtil.detectQuote(enc, quote);
- str = quote + ((enc != null) ? enc : "") + quote;//$NON-NLS-1$
- appendSpaceBefore(node, str, source);
- source.append(str);
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- if (!ICSSCharsetRule.ENCODING.equalsIgnoreCase(attrName))
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICSSCharsetRule.ENCODING);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- else {
- IndexedRegion iNode = (IndexedRegion) node;
- if (iNode.getEndOffset() <= 0)
- return -1;
-
- CompoundRegion regions[] = getRegionsWithoutWhiteSpaces(node.getOwnerDocument().getModel().getStructuredDocument(), new FormatRegion(iNode.getStartOffset(), iNode.getEndOffset() - iNode.getStartOffset()), stgy);
- for (int i = regions.length - 1; i >= 0; i--) {
- if (regions[i].getType() != CSSRegionContexts.CSS_COMMENT)
- return regions[i].getStartOffset();
- }
- return iNode.getEndOffset();
- }
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode.getRegionAtCharacterOffset(n - 1).getType() == CSSRegionContexts.CSS_DELIMITER)
- return n - 1;
- else
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- public synchronized static CharsetRuleFormatter getInstance() {
- if (instance == null)
- instance = new CharsetRuleFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CompoundRegion.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CompoundRegion.java
deleted file mode 100644
index 1f75fb543d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CompoundRegion.java
+++ /dev/null
@@ -1,52 +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.css.core.internal.formatter;
-
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-class CompoundRegion {
-
- CompoundRegion(IStructuredDocumentRegion documentRegion, ITextRegion textRegion) {
- super();
- this.fDocumentRegion = documentRegion;
- this.fTextRegion = textRegion;
- }
-
- IStructuredDocumentRegion getDocumentRegion() {
- return fDocumentRegion;
- }
-
- ITextRegion getTextRegion() {
- return fTextRegion;
- }
-
- String getType() {
- return fTextRegion.getType();
- }
-
- String getText() {
- return fDocumentRegion.getText(fTextRegion);
- }
-
- int getStartOffset() {
- return fDocumentRegion.getStartOffset(fTextRegion);
- }
-
- int getEndOffset() {
- return fDocumentRegion.getEndOffset(fTextRegion);
- }
-
-
- private IStructuredDocumentRegion fDocumentRegion;
- private ITextRegion fTextRegion;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CounterFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CounterFormatter.java
deleted file mode 100644
index acb7749fac..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CounterFormatter.java
+++ /dev/null
@@ -1,316 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICounter;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/**
- *
- */
-public class CounterFormatter extends DefaultCSSSourceFormatter {
-
- private static CounterFormatter instance;
-
- /**
- *
- */
- CounterFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer source = new StringBuffer();
- if (node == null || attr == null)
- return source;
-
- if (!ICounter.IDENTIFIER.equalsIgnoreCase(attr.getName()) && !ICounter.LISTSTYLE.equalsIgnoreCase(attr.getName()) && !ICounter.SEPARATOR.equalsIgnoreCase(attr.getName()))
- return source;
-
- // get region to replace
- IndexedRegion iNode = (IndexedRegion) node;
- context.start = iNode.getStartOffset();
- context.end = iNode.getEndOffset();
-
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
-
- ICounter counter = (ICounter) node;
- String quote = mgr.getQuoteString(node.getOwnerDocument().getModel());
- String sep = counter.getSeparator();
- String ident = counter.getIdentifier();
- String style = counter.getListStyle();
-
- if (ICounter.IDENTIFIER.equalsIgnoreCase(attr.getName())) {
- if (insert)
- ident = attr.getValue();
- else
- ident = "";//$NON-NLS-1$
- }
- else if (ICounter.LISTSTYLE.equalsIgnoreCase(attr.getName())) {
- if (insert)
- style = attr.getValue();
- else
- style = null;
- }
- else if (ICounter.SEPARATOR.equalsIgnoreCase(attr.getName())) {
- if (insert)
- sep = attr.getValue();
- else
- sep = null;
- }
-
- quote = CSSUtil.detectQuote(sep, quote);
- sep = (sep == null || sep.length() == 0) ? null : (quote + sep + quote);
-
- String func = (sep == null || sep.length() == 0) ? "counter(" : "counters(";//$NON-NLS-2$//$NON-NLS-1$
- if (mgr.isPropValueUpperCase()) {
- ident = ident.toUpperCase();
- style = style.toUpperCase();
- func = func.toUpperCase();
- }
- else {
- ident = ident.toLowerCase();
- style = style.toLowerCase();
- }
- if (sep == null || sep.length() == 0) {
- source.append(func);
- appendSpaceBefore(node, ident, source);
- source.append(ident);
- }
- else {
- source.append(func);
- appendSpaceBefore(node, ident, source);
- source.append(ident);
- source.append(",");//$NON-NLS-1$
- appendSpaceBefore(node, sep, source);
- source.append(sep);
- }
-
- if (style != null && style.length() != 0) {
- source.append(",");//$NON-NLS-1$
- appendSpaceBefore(node, style, source);
- }
- source.append(")");//$NON-NLS-1$
-
- /*
- * IStructuredDocument structuredDocument =
- * node.getOwnerDocument().getModel().getStructuredDocument();
- * ITextRegion[] regions =
- * getRegionsWithoutWhiteSpaces(structuredDocument, new
- * FormatRegion(context.start, context.end - context.start + 1)); int
- * commas[2]; int numComma = 0; for(int j = 0; j <regions.length; j++) {
- * if (regions[j].getType() == CSSRegionContexts.COMMA) {
- * commas[numComma++] = j; if (numComma > 1) break; } }
- *
- * if (ICounter.IDENTIFIER.equalsIgnoreCase(attr.getName())) { } else
- * if (ICounter.LISTSTYLE.equalsIgnoreCase(attr.getName())) { } else
- * if (ICounter.SEPARATOR.equalsIgnoreCase(attr.getName())) { boolean
- * skipSpace = false; String func = insert ? "counters(" : "counter(";
- * if (mgr.isPropValueUpperCase()) func = func.toUpperCase();
- *
- * for(int i=0; i <regions.length; i++) { if (regions[i].getType() ==
- * CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- * source.append(func); else { if (numComma == 2 && commas[1] < i) {
- * } else if (numComma == 1 && commas[0] < i && insert) {
- * } else if (numComma == 1 && commas[0] < i && ! insert) { } else if
- * (numComma == 0 && insert && regions[i].getType ==
- * CSSRegionContexts.PARENTHESIS_CLOSE) { source.append(",");
- * appendSpaceBefore(node,attr.getValue(),source);
- * source.append(attr.getValue()); }
- *
- * if (i != 0 && !skipSpace)
- * appendSpaceBefore(node,regions[i],source);
- * source.append(decoratedPropValueRegion(regions[i])); } skipSpace =
- * false;
- *
- * if (regions[i].getType() ==
- * CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) skipSpace = true; } }
- */
- return source;
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = ((IndexedRegion) node).getEndOffset();
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- boolean skipSpace = false;
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 && !skipSpace)
- appendSpaceBefore(node, regions[i], source);
- skipSpace = false;
- source.append(decoratedPropValueRegion(regions[i], stgy));
- if (regions[i].getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- skipSpace = true;
- }
- }
- else { // generate source
- ICounter counter = (ICounter) node;
- String quote = mgr.getQuoteString(node.getOwnerDocument().getModel());
- String separator = counter.getSeparator();
- quote = CSSUtil.detectQuote(separator, quote);
- String sep = (separator == null || separator.length() == 0) ? null : (quote + separator + quote);
- String ident = counter.getIdentifier();
- String style = counter.getListStyle();
- String func = (sep == null || sep.length() == 0) ? "counter(" : "counters(";//$NON-NLS-2$//$NON-NLS-1$
- // normalize
- if (ident == null)
- ident = "";//$NON-NLS-1$
- if (style == null)
- style = "";//$NON-NLS-1$
-
- if (mgr.isPropValueUpperCase()) {
- ident = ident.toUpperCase();
- style = style.toUpperCase();
- func = func.toUpperCase();
- }
- else {
- ident = ident.toLowerCase();
- style = style.toLowerCase();
- }
- if (sep == null || sep.length() == 0) {
- source.append(func);
- appendSpaceBefore(node, ident, source);
- source.append(ident);
- }
- else {
- source.append(func);
- appendSpaceBefore(node, ident, source);
- source.append(ident);
- source.append(",");//$NON-NLS-1$
- appendSpaceBefore(node, sep, source);
- source.append(sep);
- }
-
- if (style != null && style.length() != 0) {
- source.append(",");//$NON-NLS-1$
- appendSpaceBefore(node, style, source);
- }
- source.append(")");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- IndexedRegion iNode = (IndexedRegion) node;
- if (ICounter.IDENTIFIER.equalsIgnoreCase(attrName)) {
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICounter.IDENTIFIER);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- if (iNode.getEndOffset() <= 0)
- return -1;
-
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(iNode.getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, flatNode.getRegionAtCharacterOffset(iNode.getEndOffset() - 1));
- while (it.hasPrev()) {
- ITextRegion region = it.prev();
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- return it.getStructuredDocumentRegion().getEndOffset(region);
- }
- return ((IndexedRegion) node).getEndOffset();
- }
- else if (ICounter.LISTSTYLE.equalsIgnoreCase(attrName)) {
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICounter.LISTSTYLE);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
-
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(iNode.getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, flatNode.getRegionAtCharacterOffset(iNode.getEndOffset() - 1));
- while (it.hasPrev()) {
- ITextRegion region = it.prev();
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR)
- return it.getStructuredDocumentRegion().getEndOffset(region);
- else if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- return it.getStructuredDocumentRegion().getEndOffset(region);
- }
- return ((IndexedRegion) node).getEndOffset();
- }
- else if (ICounter.SEPARATOR.equalsIgnoreCase(attrName)) {
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICounter.SEPARATOR);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
-
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(iNode.getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, flatNode.getRegionAtCharacterOffset(iNode.getEndOffset() - 1));
- boolean hasComma = false;
- while (it.hasPrev()) {
- ITextRegion region = it.prev();
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR) {
- if (!hasComma)
- hasComma = true;
- else
- return it.getStructuredDocumentRegion().getEndOffset(region);
- }
- else if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- return it.getStructuredDocumentRegion().getEndOffset(region);
- }
- return ((IndexedRegion) node).getEndOffset();
- }
- else
- return -1;
- }
-
- /**
- *
- */
- public synchronized static CounterFormatter getInstance() {
- if (instance == null)
- instance = new CounterFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DeclContainerFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DeclContainerFormatter.java
deleted file mode 100644
index 8ce53613b3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DeclContainerFormatter.java
+++ /dev/null
@@ -1,118 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-
-/**
- *
- */
-public class DeclContainerFormatter extends DefaultCSSSourceFormatter {
-
- /**
- *
- */
- DeclContainerFormatter() {
- super();
- }
-
- /**
- *
- * @return java.lang.String
- * @param region
- * com.ibm.sed.structuredDocument.ITextRegion
- * @param prevRegion
- * com.ibm.sed.structuredDocument.ITextRegion
- */
- protected String decoratedSelectorRegion(CompoundRegion region, CompoundRegion prevRegion, CSSCleanupStrategy stgy) {
- String text = region.getText();
- if (isFormat())
- return text;
-
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE || type == CSSRegionContexts.CSS_SELECTOR_CLASS || type == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || type == CSSRegionContexts.CSS_SELECTOR_ID || type == CSSRegionContexts.CSS_SELECTOR_PSEUDO) {
- short selCase = stgy.getSelectorTagCase();
- if (selCase == org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy.UPPER) {
- return text.toUpperCase();
- }
- else if (selCase == org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy.LOWER) {
- return text.toLowerCase();
- }
- return text;
- }
-
- return decoratedRegion(region, 0, stgy);
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
- else { // generate source
- String delim = getLineDelimiter(node);
- source.append(delim);
- source.append(getIndent(node));
- source.append("}");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode.getRegionAtCharacterOffset(n - 1).getType() == CSSRegionContexts.CSS_RBRACE)
- return n - 1;
- else
- return n;
- }
- return -1;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DefaultCSSSourceFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DefaultCSSSourceFormatter.java
deleted file mode 100644
index 7c5fd981e2..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DefaultCSSSourceFormatter.java
+++ /dev/null
@@ -1,126 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.sse.core.IndexedRegion;
-
-
-/**
- *
- */
-public class DefaultCSSSourceFormatter extends AbstractCSSSourceFormatter {
-
- /**
- *
- */
- DefaultCSSSourceFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void appendSpaceBetween(ICSSNode node, CompoundRegion prev, CompoundRegion next, StringBuffer source) {
- if (isCleanup() && !getCleanupStrategy(node).isFormatSource())
- return; // for not formatting case on cleanup action
-
- // in selector
- String prevType = prev.getType();
- String nextType = next.getType();
- if (CSSRegionUtil.isSelectorBegginingType(prevType) && CSSRegionUtil.isSelectorBegginingType(nextType)) {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=73990
- // Formatting CSS file splits element.class into element . class
- if ((prevType == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME && (nextType == CSSRegionContexts.CSS_SELECTOR_CLASS || nextType == CSSRegionContexts.CSS_SELECTOR_ID)) || ((prevType == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || prevType == CSSRegionContexts.CSS_SELECTOR_CLASS) && nextType == CSSRegionContexts.CSS_SELECTOR_PSEUDO)) {
- // Individually, SELECTOR_ELEMENT_NAME, SELECTOR_CLASS, and SELECTOR_ID can all be beginning types.
- // But, we should not insert a space in between when SELECTOR_ELEMENT_NAME is followed by SELECTOR_CLASS, or when
- // SELECTOR_ELEMENT_NAME is followed by SELECTOR_ID.
- // For example: H1.pastoral and H1#z98y
- //
- // Also, space is now not inserted in between when SELECTOR_ELEMENT_NAME is followed by SELECTOR_PSEUDO, or when
- // SELECTOR_CLASS is followed by SELECTOR_PSEUDO.
- // For example: P:first-letter and A.external:visited
- }
- else
- appendSpaceBefore(node, next, source);
- return;
- }
-
- if (prevType == CSSRegionContexts.CSS_PAGE || prevType == CSSRegionContexts.CSS_CHARSET || prevType == CSSRegionContexts.CSS_ATKEYWORD || prevType == CSSRegionContexts.CSS_FONT_FACE || prevType == CSSRegionContexts.CSS_IMPORT || prevType == CSSRegionContexts.CSS_MEDIA) {
- appendSpaceBefore(node, next, source);
- return;
- }
-
- if (prevType == CSSRegionContexts.CSS_UNKNOWN && nextType != CSSRegionContexts.CSS_COMMENT) {
- if (prev.getEndOffset() != next.getStartOffset()) { // not
- // sequential
- appendSpaceBefore(node, next, source);
- }
- return;
- }
-
- if (prevType == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR || prevType == CSSRegionContexts.CSS_COMMENT || nextType == CSSRegionContexts.CSS_COMMENT || nextType == CSSRegionContexts.CSS_LBRACE || nextType == CSSRegionContexts.CSS_UNKNOWN) {
- appendSpaceBefore(node, next, source);
- return;
- }
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0)
- return n;
- return -1;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FontFaceRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FontFaceRuleFormatter.java
deleted file mode 100644
index 66eec7d7f0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FontFaceRuleFormatter.java
+++ /dev/null
@@ -1,97 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-
-
-/**
- *
- */
-public class FontFaceRuleFormatter extends DeclContainerFormatter {
-
- public final static java.lang.String FONT_FACE = "@font-face";//$NON-NLS-1$
- private static FontFaceRuleFormatter instance;
-
- /**
- *
- */
- FontFaceRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatPre(org.eclipse.wst.css.core.document.ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- if (end > 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else {
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- String str = FONT_FACE;
- if (mgr.isIdentUpperCase())
- str = FONT_FACE.toUpperCase();
- source.append(str);
- appendSpaceBefore(node, "{", source);//$NON-NLS-1$
- source.append("{");//$NON-NLS-1$
- }
- appendDelimBefore(node, null, source);
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- if (needS(outside[1])) {
- if (isIncludesPreEnd(node, region))
- appendDelimBefore(node, null, source);
- else
- appendSpaceBefore(node, outside[1], source);
- }
- }
-
- /**
- *
- */
- public synchronized static FontFaceRuleFormatter getInstance() {
- if (instance == null)
- instance = new FontFaceRuleFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FormatRegion.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FormatRegion.java
deleted file mode 100644
index ff0c9d322a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FormatRegion.java
+++ /dev/null
@@ -1,71 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-
-/**
- *
- */
-class FormatRegion implements IRegion {
-
- private int fOffset, fLength;
-
- /**
- *
- */
- FormatRegion(int offset, int length) {
- super();
- set(offset, length);
- }
-
- /**
- * Returns the length of the region.
- *
- * @return the length of the region
- */
- public int getLength() {
- return fLength;
- }
-
- /**
- * Returns the offset of the region.
- *
- * @return the offset of the region
- */
- public int getOffset() {
- return fOffset;
- }
-
- /**
- *
- */
- void set(int offset, int length) {
- this.fOffset = offset;
- this.fLength = length;
- }
-
- /**
- *
- */
- void setLength(int newLength) {
- fLength = newLength;
- }
-
- /**
- *
- */
- void setOffset(int newOffset) {
- fOffset = newOffset;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FunctionFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FunctionFormatter.java
deleted file mode 100644
index 91711d3890..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FunctionFormatter.java
+++ /dev/null
@@ -1,187 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-
-/**
- *
- */
-abstract public class FunctionFormatter extends AbstractCSSSourceFormatter {
-
- /**
- *
- */
- FunctionFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
- if (start > 0 && start < end) { // format source
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- String pickupType = CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR;
- if (prev == null || child == null)
- pickupType = null;
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, pickupType);
- }
- // extract source
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy));
- }
- }
- else if (prev != null && child != null) { // generate source between
- // parameters
- source.append(",");//$NON-NLS-1$
- }
- appendSpaceBefore(node, toAppend, source);
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPost(org.eclipse.wst.css.core.document.ICSSNode node, java.lang.StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy));
- }
- }
- else { // generate source
- source.append(")");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- if (end > 0) { // format source
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- }
- else { // generate source
- String func = getFunc();
- if (mgr.isPropValueUpperCase())
- func = func.toUpperCase();
- source.append(func);
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode.getRegionAtCharacterOffset(n - 1).getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- return n - 1;
- else
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- protected abstract String getFunc();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/ImportRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/ImportRuleFormatter.java
deleted file mode 100644
index afc1419da1..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/ImportRuleFormatter.java
+++ /dev/null
@@ -1,345 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/**
- *
- */
-public class ImportRuleFormatter extends AbstractCSSSourceFormatter {
-
- public final static java.lang.String IMPORT = "@import";//$NON-NLS-1$
- private static ImportRuleFormatter instance;
-
- /**
- *
- */
- ImportRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- if (!ICSSImportRule.HREF.equalsIgnoreCase(attr.getName()))
- return buf;
-
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- RegionIterator it = new RegionIterator(flatNode, region);
- it.prev();
- if (it.hasPrev()) {
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S)
- context.start = it.getStructuredDocumentRegion().getStartOffset(prev);
- else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- it.next();
- }
- else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- it.next();
- it.next();
- if (it.hasNext()) {
- ITextRegion next = it.next();
- if (next.getType() == CSSRegionContexts.CSS_S)
- context.end = it.getStructuredDocumentRegion().getEndOffset(next);
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- }
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- }
- else {
- ICSSNode child = node.getFirstChild();
- IStructuredDocumentRegion flatNode = null;
- ITextRegion region = null;
- if (child == null) {
- flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- }
- else {
- flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) child).getStartOffset() - 1);
- region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) child).getStartOffset() - 1);
- }
- if (region.getType() == CSSRegionContexts.CSS_S) {
- context.start = flatNode.getStartOffset(region);
- context.end = flatNode.getEndOffset(region);
- }
- else {
- context.start = flatNode.getEndOffset();
- context.end = flatNode.getEndOffset();
- }
- }
- }
- // generate text
- if (insert && attr.getValue() != null && attr.getValue().length() > 0) {
- appendSpaceBefore(node, attr.getValue(), buf);
- buf.append(attr.getValue());
- appendSpaceBefore(node, "", buf);//$NON-NLS-1$
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- // for media-type
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
- if (start > 0 && start < end) { // format source
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- String pickupType = CSSRegionContexts.CSS_MEDIA_SEPARATOR;
- if (prev == null || child == null)
- pickupType = null;
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, pickupType);
- }
- // extract source
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- appendSpaceBefore(node, toAppend, source);
- }
- else if (prev != null && child != null) { // generate source : ????
- source.append(",");//$NON-NLS-1$
- appendSpaceBefore(node, toAppend, source);
- }
- else if (child != null) { // generate source : between 'url()' and
- // media types
- appendSpaceBefore(node, toAppend, source);
- }
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must be
- // comments
- }
- if (needS(outside[1])) {
- if (((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength())
- appendSpaceBefore(node, toAppend, source);
- else
- appendSpaceBefore(node, outside[1], source);
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- if (end > 0) { // format source
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- String str = regions[i].getText();
- if (regions[i].getType() == CSSRegionContexts.CSS_IMPORT)
- str = decoratedIdentRegion(regions[i], stgy);
- else
- str = decoratedPropValueRegion(regions[i], stgy);
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(str);
- }
- }
- else { // generate source
- String str = IMPORT;
- if (mgr.isIdentUpperCase())
- str = IMPORT.toUpperCase();
- String quote = mgr.getQuoteString(node.getOwnerDocument().getModel());
- source.append(str);
- str = "url(";//$NON-NLS-1$
- if (mgr.isPropValueUpperCase())
- str = str.toUpperCase();
- String href = ((ICSSImportRule) node).getHref();
- quote = CSSUtil.detectQuote(href, quote);
- str = str + quote + href + quote + ")";//$NON-NLS-1$
- appendSpaceBefore(node, str, source);
- source.append(str);
- }
- ICSSNode child = node.getFirstChild();
- if (child != null && (child instanceof org.w3c.dom.stylesheets.MediaList) && ((org.w3c.dom.stylesheets.MediaList) child).getLength() > 0) {
- appendSpaceBefore(node, "", source);//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- String str = regions[i].getText();
- if (regions[i].getType() == CSSRegionContexts.CSS_IMPORT)
- str = decoratedIdentRegion(regions[i], stgy);
- else
- str = decoratedPropValueRegion(regions[i], stgy);
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(str);
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- if (!ICSSImportRule.HREF.equalsIgnoreCase(attrName))
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICSSImportRule.HREF);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- else {
- IndexedRegion iNode = (IndexedRegion) node;
- if (iNode.getEndOffset() <= 0)
- return -1;
-
- FormatRegion formatRegion = null;
- ICSSNode child = node.getFirstChild();
- if (child != null && ((IndexedRegion) child).getEndOffset() > 0)
- formatRegion = new FormatRegion(iNode.getStartOffset(), ((IndexedRegion) child).getStartOffset() - iNode.getStartOffset());
- else
- formatRegion = new FormatRegion(iNode.getStartOffset(), iNode.getEndOffset() - iNode.getStartOffset());
- CompoundRegion regions[] = getRegionsWithoutWhiteSpaces(node.getOwnerDocument().getModel().getStructuredDocument(), formatRegion, getCleanupStrategy(node));
-
- boolean atrule = false;
- for (int i = 0; i < regions.length; i++) {
- if (regions[i].getType() == CSSRegionContexts.CSS_IMPORT) {
- atrule = true;
- continue;
- }
- else if (!atrule)
- continue;
- if (regions[i].getType() != CSSRegionContexts.CSS_COMMENT)
- return regions[i].getStartOffset();
- }
- return (child != null && ((IndexedRegion) child).getEndOffset() > 0) ? ((IndexedRegion) child).getStartOffset() : iNode.getEndOffset();
- }
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode.getRegionAtCharacterOffset(n - 1).getType() == CSSRegionContexts.CSS_DELIMITER)
- return n - 1;
- else
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- public synchronized static ImportRuleFormatter getInstance() {
- if (instance == null)
- instance = new ImportRuleFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaListFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaListFormatter.java
deleted file mode 100644
index 4a8ef605aa..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaListFormatter.java
+++ /dev/null
@@ -1,216 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.IndexedRegion;
-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.w3c.dom.stylesheets.MediaList;
-
-
-/**
- *
- */
-public class MediaListFormatter extends DefaultCSSSourceFormatter {
-
- private static MediaListFormatter instance;
-
- /**
- *
- */
- MediaListFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- boolean first = false, last = false;
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- RegionIterator it = new RegionIterator(flatNode, region);
- it.prev();
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- while (it.hasPrev()) {
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S || prev.getType() == CSSRegionContexts.CSS_MEDIA_SEPARATOR || prev.getType() == CSSRegionContexts.CSS_COMMENT)
- context.start = it.getStructuredDocumentRegion().getStartOffset(prev);
- else
- break;
- }
- if (context.start < ((IndexedRegion) node).getStartOffset()) {
- context.start = ((IndexedRegion) node).getStartOffset();
- first = true;
-
- }
- it.reset(flatNode, region);
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- while (it.hasNext()) {
- ITextRegion next = it.next();
- if (next.getType() == CSSRegionContexts.CSS_S || next.getType() == CSSRegionContexts.CSS_MEDIA_SEPARATOR || next.getType() == CSSRegionContexts.CSS_COMMENT)
- context.end = it.getStructuredDocumentRegion().getEndOffset(next);
- else
- break;
- }
- if (((IndexedRegion) node).getEndOffset() < context.end) {
- context.end = ((IndexedRegion) node).getEndOffset();
- last = true;
- }
- }
- else {
- last = true;
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, region);
- context.start = it.getStructuredDocumentRegion().getEndOffset(region);
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- while (it.hasPrev()) {
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S || prev.getType() == CSSRegionContexts.CSS_MEDIA_SEPARATOR || prev.getType() == CSSRegionContexts.CSS_COMMENT)
- context.start = it.getStructuredDocumentRegion().getStartOffset(prev);
- else
- break;
- }
- if (context.start < ((IndexedRegion) node).getStartOffset()) {
- context.start = ((IndexedRegion) node).getStartOffset();
- first = true;
- }
- }
- }
- // generate text
- if (insert && attr.getValue() != null && attr.getValue().length() > 0) {
- if (!first)
- buf.append(","); //$NON-NLS-1$
- appendSpaceBefore(node, attr.getValue(), buf);
- buf.append(attr.getValue());
- if (!last) {
- buf.append(","); //$NON-NLS-1$
- appendSpaceBefore(node, "", buf); //$NON-NLS-1$
- }
- }
- else if (!first && !last) {
- buf.append(","); //$NON-NLS-1$
- appendSpaceBefore(node, "", buf); //$NON-NLS-1$
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int start = ((IndexedRegion) node).getStartOffset();
- int end = ((IndexedRegion) node).getEndOffset();
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else { // generate source
- MediaList list = (MediaList) node;
- int n = list.getLength();
- for (int i = 0; i < n; i++) {
- String medium = list.item(i);
- if (mgr.isIdentUpperCase())
- medium = medium.toUpperCase();
- else
- medium = medium.toLowerCase();
-
- if (i != 0) {
- source.append(","); //$NON-NLS-1$
- appendSpaceBefore(node, medium, source);
- }
- source.append(medium);
- }
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(attrName);
-
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- else {
- IndexedRegion iNode = (IndexedRegion) node;
- if (iNode.getEndOffset() <= 0)
- return -1;
-
- /*
- * ITextRegion regions[] =
- * getRegionsWithoutWhiteSpaces(node.getOwnerDocument().getModel().getStructuredDocument(),
- * new FormatRegion(iNode.getStartOffset(), iNode.getEndOffset() -
- * iNode.getStartOffset() + 1)); for(int i=regions.length - 1; i >=
- * 0; i--) { if (regions[i].getType() ==
- * CSSRegionContexts.IMPORTANT_SYM) return
- * regions[i].getStartOffset(); }
- */
- return iNode.getEndOffset();
- }
- }
-
- /**
- *
- */
- public synchronized static MediaListFormatter getInstance() {
- if (instance == null)
- instance = new MediaListFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaRuleFormatter.java
deleted file mode 100644
index c46afcea08..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaRuleFormatter.java
+++ /dev/null
@@ -1,394 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/**
- *
- */
-public class MediaRuleFormatter extends AbstractCSSSourceFormatter {
-
- public final static java.lang.String MEDIA = "@media";//$NON-NLS-1$
- private static MediaRuleFormatter instance;
-
- /**
- *
- */
- MediaRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
- if (start > 0 && start < end) { // source formatting
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- String pickupType = null;
- if ((prev != null && prev.getNodeType() == ICSSNode.MEDIALIST_NODE) || (prev == null && (child == null || child.getNodeType() != ICSSNode.MEDIALIST_NODE))) {
- pickupType = CSSRegionContexts.CSS_LBRACE;
- }
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, pickupType);
- }
- // extract source
- if (child != null && child.getNodeType() == ICSSNode.MEDIALIST_NODE) { // between
- // "@media"
- // and
- // mediatype
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- appendSpaceBefore(node, toAppend, source);
- }
- else if (child != null && (child.getPreviousSibling() == null || child.getPreviousSibling().getNodeType() == ICSSNode.MEDIALIST_NODE)) { // between
- // mediatype
- // and
- // the
- // first
- // style
- // rule
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- appendDelimBefore(node, null, source);
- }
- else { // between styles
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- appendDelimBefore(node, null, source);
- }
- }
- else { // source generation
- if (child == null && prev != null && prev.getNodeType() != ICSSNode.MEDIALIST_NODE) { // after
- // the
- // last
- // style
- // rule
- appendDelimBefore(node.getParentNode(), null, source);
- }
- else if (child != null && child.getNodeType() == ICSSNode.MEDIALIST_NODE) { // between
- // "@media"
- // and
- // mediatype
- appendSpaceBefore(node, toAppend, source);
- }
- else if (prev != null && prev.getNodeType() == ICSSNode.MEDIALIST_NODE) { // between
- // mediatype
- // and
- // the
- // first
- // style
- // rule
- appendSpaceBefore(node, "{", source);//$NON-NLS-1$
- source.append("{");//$NON-NLS-1$
- if (child != null)
- appendDelimBefore(node, null, source);
- else
- appendDelimBefore(node.getParentNode(), null, source);
- }
- else { // normal case
- appendDelimBefore(node, null, source);
- }
- }
-
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- if (child != null && child.getNodeType() == ICSSNode.MEDIALIST_NODE) { // between
- // "@media"
- // and
- // mediatype
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- if (needS(outside[1]) && ((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength()) {
- appendSpaceBefore(node, toAppend, source);
- }
- }
- else if (child != null && (child.getPreviousSibling() == null || child.getPreviousSibling().getNodeType() == ICSSNode.MEDIALIST_NODE)) { // between
- // mediatype
- // and
- // the
- // first
- // style
- // rule
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- if (needS(outside[1]) && ((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength()) {
- appendDelimBefore(node, null, source);
- }
- }
- else { // between styles
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- if (needS(outside[1]) && ((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength()) {
- appendDelimBefore(node, null, source);
- }
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) { // source formatting
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- if (node.getLastChild() == null || node.getLastChild().getNodeType() != ICSSNode.MEDIALIST_NODE) {
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
- else {
- boolean bInCurlyBrace = false;
- for (int i = 0; i < regions.length; i++) {
- if (!bInCurlyBrace)
- appendSpaceBefore(node, regions[i], source);
- else
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- if (regions[i].getType() == CSSRegionContexts.CSS_LBRACE)
- bInCurlyBrace = true;
- }
- }
- }
- else { // source generation
- String delim = getLineDelimiter(node);
- if (node.getLastChild() != null && node.getLastChild().getNodeType() == ICSSNode.MEDIALIST_NODE) {
- appendSpaceBefore(node, "{", source);//$NON-NLS-1$
- source.append("{");//$NON-NLS-1$
- }
-
- source.append(delim);
- source.append(getIndent(node));
- source.append("}");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- if (end > 0) { // source formatting
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else { // source generation
- String str = MEDIA;
- if (mgr.isIdentUpperCase())
- str = MEDIA.toUpperCase();
- source.append(str);
- }
- ICSSNode child = node.getFirstChild();
- if (child != null && (child instanceof org.w3c.dom.stylesheets.MediaList) && ((org.w3c.dom.stylesheets.MediaList) child).getLength() > 0) {
- appendSpaceBefore(node, "", source);//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode.getRegionAtCharacterOffset(n - 1).getType() == CSSRegionContexts.CSS_LBRACE)
- return n - 1;
- else
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- public synchronized static MediaRuleFormatter getInstance() {
- if (instance == null)
- instance = new MediaRuleFormatter();
- return instance;
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatAfter(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos <= 0 || !nnode.contains(insertPos - 1))
- return 0;
-
- if (node.getFirstChild().getNextSibling() == node.getLastChild()) { // inserted
- // first
- // style
- // rule
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(insertPos);
- if (flatNode == null)
- return 0;
- ITextRegion region = flatNode.getRegionAtCharacterOffset(insertPos);
- if (region == null)
- return 0;
- RegionIterator it = new RegionIterator(flatNode, region);
- while (it.hasNext()) {
- region = it.next();
- if (region.getType() == CSSRegionContexts.CSS_LBRACE)
- break;
- if (nnode.getEndOffset() <= it.getStructuredDocumentRegion().getEndOffset(region))
- break;
- }
- int pos = it.getStructuredDocumentRegion().getStartOffset(region) - insertPos;
- return (pos >= 0) ? pos : 0;
-
- }
- return super.getLengthToReformatAfter(node, insertPos);
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatBefore(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos <= 0 || !nnode.contains(insertPos - 1))
- return 0;
-
- if (node.getFirstChild().getNextSibling() == node.getLastChild()) { // inserted
- // first
- // style
- // rule
- int pos = ((IndexedRegion) node.getFirstChild()).getEndOffset();
- if (pos <= 0)
- pos = ((IndexedRegion) node).getStartOffset() + 6 /*
- * length
- * of
- * "@media"
- */;
- return insertPos - pos;
- }
- return super.getLengthToReformatBefore(node, insertPos);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PageRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PageRuleFormatter.java
deleted file mode 100644
index 8d199dbaa9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PageRuleFormatter.java
+++ /dev/null
@@ -1,193 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPageRule;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/**
- *
- */
-public class PageRuleFormatter extends DeclContainerFormatter {
-
- public final static java.lang.String PAGE = "@page";//$NON-NLS-1$
- private static PageRuleFormatter instance;
-
- /**
- *
- */
- PageRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- if (!ICSSPageRule.SELECTOR.equalsIgnoreCase(attr.getName()))
- return buf;
-
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getEndOffset() - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, region);
- it.next();
- if (it.hasNext()) {
- ITextRegion next = it.next();
- if (next.getType() == CSSRegionContexts.CSS_S)
- context.end = it.getStructuredDocumentRegion().getEndOffset(next);
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- }
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- }
- else {
- int pos = getAttrInsertPos(node, attr.getName());
- context.start = pos;
- context.end = pos;
- /*
- * IStructuredDocumentRegion flatNode =
- * node.getOwnerDocument().getModel().getStructuredDocument().getNodeAtCharacterOffset(((IndexedRegion)node).getStartOffset());
- * ITextRegion region =
- * flatNode.getRegionAtCharacterOffset(((IndexedRegion)node).getStartOffset());
- * if (region.getType() == CSSRegionContexts.S) {
- * context.start = region.getStartOffset(); context.end =
- * region.getEndOffset(); } else { context.start =
- * flatNode.getEndOffset() + 1; context.end =
- * flatNode.getEndOffset(); }
- */}
- }
- // generate text
- if (insert) {
- String val = attr.getValue();
- if (val != null && val.length() > 0) {
- buf.append(val);
- appendSpaceBefore(node, "", buf);//$NON-NLS-1$
- }
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBetween(node, regions[i - 1], regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else { // generate source
- String str = PAGE;
- if (mgr.isIdentUpperCase())
- str = PAGE.toUpperCase();
- source.append(str);
- str = ((ICSSPageRule) node).getSelectorText();
- if (str != null && str.length() > 0) {
- appendSpaceBefore(node, str, source);
- source.append(str);
- }
- appendSpaceBefore(node, "{", source);//$NON-NLS-1$
- source.append("{");//$NON-NLS-1$
- }
- appendDelimBefore(node, null, source);
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBetween(node, (i == 0) ? outside[0] : regions[i - 1], regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- if (needS(outside[1])) {
- if (isIncludesPreEnd(node, region))
- appendDelimBefore(node, null, source);
- else
- appendSpaceBetween(node, regions[regions.length - 1], outside[1], source);
- }
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- if (!ICSSPageRule.SELECTOR.equalsIgnoreCase(attrName))
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICSSPageRule.SELECTOR);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- else if (((IndexedRegion) node).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getStartOffset());
- RegionIterator it = new RegionIterator(flatNode, region);
- while (it.hasNext()) {
- region = it.next();
- if (region.getType() == CSSRegionContexts.CSS_LBRACE) {
- return it.getStructuredDocumentRegion().getStartOffset(region);
- }
- if (it.getStructuredDocumentRegion().getEndOffset(region) >= ((IndexedRegion) node).getEndOffset())
- break;
- }
- }
- return ((IndexedRegion) node).getStartOffset();
- }
-
- /**
- *
- */
- public synchronized static PageRuleFormatter getInstance() {
- if (instance == null)
- instance = new PageRuleFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PrimitiveValueFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PrimitiveValueFormatter.java
deleted file mode 100644
index d1a1542b3d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PrimitiveValueFormatter.java
+++ /dev/null
@@ -1,271 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.w3c.dom.css.CSSPrimitiveValue;
-
-
-/**
- *
- */
-public class PrimitiveValueFormatter extends DefaultCSSSourceFormatter {
-
- private static PrimitiveValueFormatter instance;
-
- /**
- *
- */
- PrimitiveValueFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = ((IndexedRegion) node).getEndOffset();
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- boolean appendQuote = regions.length > 1 && node.getParentNode() instanceof ICSSStyleDeclItem && isCleanup() && getCleanupStrategy(node).isQuoteValues() && (((ICSSStyleDeclItem) node.getParentNode()).getPropertyName().equals(PropCMProperty.P_FONT) || ((ICSSStyleDeclItem) node.getParentNode()).getPropertyName().equals(PropCMProperty.P_FONT_FAMILY) || ((ICSSStyleDeclItem) node.getParentNode()).getPropertyName().equals(PropCMProperty.P_VOICE_FAMILY));
- String quote = mgr.getQuoteString(node.getOwnerDocument().getModel());
-
- StringBuffer strBuf = new StringBuffer();
- boolean skipSpace = false;
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 && !skipSpace)
- appendSpaceBefore(node, regions[i], strBuf);
- skipSpace = false;
- strBuf.append(decoratedPropValueRegion(regions[i], stgy));
- if (regions[i].getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- skipSpace = true;
- }
-
- if (appendQuote) {
- source.append(quote);
- String str = strBuf.toString();
- str = str.replace('\'', ' ');
- str = str.replace('\"', ' ');
- str = str.trim();
- source.append(str);
- source.append(quote);
- }
- else {
- source.append(strBuf);
- }
- }
- else { // generate source
- ICSSPrimitiveValue value = (ICSSPrimitiveValue) node;
- short type = value.getPrimitiveType();
- String quote = mgr.getQuoteString(node.getOwnerDocument().getModel());
-
- String str = null;
- switch (type) {
- case CSSPrimitiveValue.CSS_NUMBER :
- case CSSPrimitiveValue.CSS_PERCENTAGE :
- case CSSPrimitiveValue.CSS_EMS :
- case CSSPrimitiveValue.CSS_EXS :
- case CSSPrimitiveValue.CSS_PX :
- case CSSPrimitiveValue.CSS_CM :
- case CSSPrimitiveValue.CSS_MM :
- case CSSPrimitiveValue.CSS_IN :
- case CSSPrimitiveValue.CSS_PT :
- case CSSPrimitiveValue.CSS_PC :
- case CSSPrimitiveValue.CSS_DEG :
- case CSSPrimitiveValue.CSS_RAD :
- case CSSPrimitiveValue.CSS_GRAD :
- case CSSPrimitiveValue.CSS_MS :
- case CSSPrimitiveValue.CSS_S :
- case CSSPrimitiveValue.CSS_HZ :
- case CSSPrimitiveValue.CSS_KHZ :
- case CSSPrimitiveValue.CSS_DIMENSION :
- case ICSSPrimitiveValue.CSS_INTEGER :
- if (value.getFloatValue(type) == ((int) value.getFloatValue(type))) {
- str = Integer.toString((int) value.getFloatValue(type));
- }
- else {
- str = Float.toString(value.getFloatValue(type));
- }
- break;
- case CSSPrimitiveValue.CSS_IDENT :
- case ICSSPrimitiveValue.CSS_HASH :
- case ICSSPrimitiveValue.CSS_INHERIT_PRIMITIVE :
- str = value.getStringValue();
- if (str != null) {
- if (mgr.isPropValueUpperCase())
- str = str.toUpperCase();
- else
- str.toLowerCase();
- }
- break;
- case CSSPrimitiveValue.CSS_STRING :
- case CSSPrimitiveValue.CSS_URI :
- case CSSPrimitiveValue.CSS_ATTR :
- case ICSSPrimitiveValue.CSS_URANGE :
- case ICSSPrimitiveValue.CSS_FORMAT :
- case ICSSPrimitiveValue.CSS_LOCAL :
- case ICSSPrimitiveValue.CSS_COMMA :
- case ICSSPrimitiveValue.CSS_SLASH :
- str = value.getStringValue();
- }
-
- String preStr = null, postStr = null;
- switch (type) {
- case CSSPrimitiveValue.CSS_ATTR :
- preStr = "attr(";//$NON-NLS-1$
- postStr = ")";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_CM :
- postStr = "cm";//$NON-NLS-1$
- break;
- // case ICSSPrimitiveValue.CSS_COUNTER:
- case CSSPrimitiveValue.CSS_DEG :
- postStr = "deg";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_EMS :
- postStr = "em";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_EXS :
- postStr = "ex";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_GRAD :
- postStr = "grad";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_HZ :
- postStr = "Hz";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_IN :
- postStr = "in";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_KHZ :
- postStr = "kHz";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_MM :
- postStr = "mm";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_MS :
- postStr = "ms";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_PC :
- postStr = "pc";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_PERCENTAGE :
- postStr = "%";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_PT :
- postStr = "pt";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_PX :
- postStr = "px";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_RAD :
- postStr = "rad";//$NON-NLS-1$
- break;
- // case ICSSPrimitiveValue.CSS_RECT:
- // case ICSSPrimitiveValue.CSS_RGBCOLOR:
- case CSSPrimitiveValue.CSS_S :
- postStr = "s";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_STRING :
- quote = CSSUtil.detectQuote(str, quote);
- preStr = quote;
- postStr = quote;
- break;
- case CSSPrimitiveValue.CSS_URI :
- quote = CSSUtil.detectQuote(str, quote);
- preStr = "url(" + quote;//$NON-NLS-1$
- postStr = quote + ")";//$NON-NLS-1$
- break;
- // the followings are original primitive values
- case CSSPrimitiveValue.CSS_IDENT :
- case CSSPrimitiveValue.CSS_UNKNOWN :
- // use str
- case ICSSPrimitiveValue.CSS_INTEGER :
- case ICSSPrimitiveValue.CSS_HASH :
- case ICSSPrimitiveValue.CSS_SLASH :
- case ICSSPrimitiveValue.CSS_COMMA :
- case CSSPrimitiveValue.CSS_DIMENSION :
- case CSSPrimitiveValue.CSS_NUMBER :
- case ICSSPrimitiveValue.CSS_INHERIT_PRIMITIVE :
- break;
- case ICSSPrimitiveValue.CSS_URANGE :
- preStr = "U+";//$NON-NLS-1$
- break;
- case ICSSPrimitiveValue.CSS_FORMAT :
- quote = CSSUtil.detectQuote(str, quote);
- preStr = "format(" + quote;//$NON-NLS-1$
- postStr = quote + ")";//$NON-NLS-1$
- break;
- case ICSSPrimitiveValue.CSS_LOCAL :
- quote = CSSUtil.detectQuote(str, quote);
- preStr = "local(" + quote;//$NON-NLS-1$
- postStr = quote + ")";//$NON-NLS-1$
- break;
- }
- if (mgr.isPropValueUpperCase()) {
- if (preStr != null)
- preStr = preStr.toUpperCase();
- if (postStr != null)
- postStr = postStr.toUpperCase();
- }
- if (preStr != null)
- source.append(preStr);
- if (str != null)
- source.append(str);
- if (postStr != null)
- source.append(postStr);
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public synchronized static PrimitiveValueFormatter getInstance() {
- if (instance == null)
- instance = new PrimitiveValueFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RGBFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RGBFormatter.java
deleted file mode 100644
index a6909db3fe..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RGBFormatter.java
+++ /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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-/**
- *
- */
-public class RGBFormatter extends FunctionFormatter {
-
- private static RGBFormatter instance;
-
- /**
- *
- */
- RGBFormatter() {
- super();
- }
-
- /**
- *
- */
- protected String getFunc() {
- return "rgb(";//$NON-NLS-1$
- }
-
- /**
- *
- */
- public synchronized static RGBFormatter getInstance() {
- if (instance == null)
- instance = new RGBFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RectFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RectFormatter.java
deleted file mode 100644
index f3ec832dfc..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RectFormatter.java
+++ /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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-/**
- *
- */
-public class RectFormatter extends FunctionFormatter {
-
- private static RectFormatter instance;
-
- /**
- *
- */
- RectFormatter() {
- super();
- }
-
- /**
- *
- */
- protected String getFunc() {
- return "rect(";//$NON-NLS-1$
- }
-
- /**
- *
- */
- public synchronized static RectFormatter getInstance() {
- if (instance == null)
- instance = new RectFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclItemFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclItemFormatter.java
deleted file mode 100644
index e85f0b6ee3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclItemFormatter.java
+++ /dev/null
@@ -1,394 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/**
- *
- */
-public class StyleDeclItemFormatter extends DefaultCSSSourceFormatter {
-
- private static StyleDeclItemFormatter instance;
-
- /**
- *
- */
- StyleDeclItemFormatter() {
- super();
- }
-
- /**
- *
- */
- private void appendAfterColonSpace(ICSSNode node, StringBuffer source) {
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- int n = mgr.getSpacesPostDelimiter();
-
- if (mgr.getMaxLineWidth() > 0 && (!mgr.isProhibitWrapOnAttr() || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int length = getLastLineLength(node, source);
- int append = getFirstChildRegionLength(node);
- if (length + n + append > mgr.getMaxLineWidth()) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- source.append(mgr.getIndentString());
- n = 0; // no space is necessary
- }
- }
- // no delimiter case
- while (n-- > 0)
- source.append(" ");//$NON-NLS-1$
- }
-
- /**
- *
- */
- private int getFirstChildRegionLength(ICSSNode node) {
- ICSSNode firstChild = node.getFirstChild();
- if (firstChild == null)
- return 1;
- int start = ((IndexedRegion) firstChild).getStartOffset();
- RegionIterator itr = new RegionIterator(node.getOwnerDocument().getModel().getStructuredDocument(), start);
- while (itr.hasNext()) {
- ITextRegion reg = itr.next();
- if (reg != null && reg.getType() != CSSRegionContexts.CSS_S)
- return reg.getTextLength();
- }
- return 1;
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- if (!ICSSStyleDeclItem.IMPORTANT.equalsIgnoreCase(attr.getName()))
- return buf;
-
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- RegionIterator it = new RegionIterator(flatNode, region);
- it.prev();
- if (it.hasPrev()) {
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S)
- context.start = it.getStructuredDocumentRegion().getStartOffset(prev);
- else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- }
- else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- }
- else {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- if (region.getType() == CSSRegionContexts.CSS_S) {
- context.start = flatNode.getStartOffset(region);
- context.end = flatNode.getEndOffset(region);
- }
- else {
- context.start = flatNode.getEndOffset();
- context.end = flatNode.getEndOffset();
- }
- }
- }
- // generate text
- if (insert && attr.getValue() != null && attr.getValue().length() > 0) {
- appendSpaceBefore(node, attr.getValue(), buf);
- buf.append(attr.getValue());
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
- if (start > 0 && start < end) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, null);
- }
- // generate source
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy)); // must
- // be
- // comments
- }
- }
- if (child != null && child instanceof ICSSPrimitiveValue) {
- if (((ICSSPrimitiveValue) child).getPrimitiveType() == ICSSPrimitiveValue.CSS_COMMA)
- toAppend = ",";//$NON-NLS-1$
- else if (((ICSSPrimitiveValue) child).getPrimitiveType() == ICSSPrimitiveValue.CSS_SLASH)
- toAppend = "/";//$NON-NLS-1$
- }
- if (child != null && toAppend != null && !toAppend.equals(",") && !toAppend.equals("/")) //$NON-NLS-1$ //$NON-NLS-2$
- appendSpaceBefore(node, toAppend, source);
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy)); // must be
- // comments
- }
- if (needS(outside[1])) {
- if (((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength()) {
- if (toAppend != "," && toAppend != "/") //$NON-NLS-1$ //$NON-NLS-2$
- appendSpaceBefore(node, toAppend, source);
- }
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else { // generate source
- // append "!important"
- String priority = ((ICSSStyleDeclItem) node).getPriority();
- if (priority != null && priority.length() > 0) {
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- if (!mgr.isPreserveCase()) {
- if (mgr.isIdentUpperCase())
- priority = priority.toUpperCase();
- else
- priority = priority.toLowerCase();
- }
- appendSpaceBefore(node, priority, source);
- source.append(priority);
- }
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- if (end > 0) { // format source
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropNameRegion(regions[i], stgy));
- }
- }
- else { // generatoe source
- ICSSStyleDeclItem item = (ICSSStyleDeclItem) node;
- if (mgr.isPropNameUpperCase())
- source.append(item.getPropertyName().toUpperCase());
- else
- source.append(item.getPropertyName());
-
- int k = mgr.getSpacesPreDelimiter();
- if (mgr.getMaxLineWidth() > 0 && (!mgr.isProhibitWrapOnAttr() || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int length = getLastLineLength(node, source);
- int append = 1;
- if (length + k + append > mgr.getMaxLineWidth()) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- source.append(mgr.getIndentString());
- k = 0; // no space is necessary
- }
- }
- // no delimiter case
- while (k-- > 0)
- source.append(" ");//$NON-NLS-1$
- source.append(":");//$NON-NLS-1$
- }
- if (!isCleanup() || getCleanupStrategy(node).isFormatSource()) {
- appendAfterColonSpace(node, source);
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropNameRegion(regions[i], stgy));
- }
- if (needS(outside[1])) {
- if (isIncludesPreEnd(node, region) && (!isCleanup() || getCleanupStrategy(node).isFormatSource())) {
- appendAfterColonSpace(node, source);
- }
- else
- appendSpaceBefore(node, outside[1], source);
- }
- }
-
- /**
- *
- */
- public StringBuffer formatValue(ICSSNode node) {
- StringBuffer source = new StringBuffer();
- formatChildren(node, source);
-
- return source;
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- if (!ICSSStyleDeclItem.IMPORTANT.equalsIgnoreCase(attrName))
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICSSStyleDeclItem.IMPORTANT);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- else {
- IndexedRegion iNode = (IndexedRegion) node;
- if (iNode.getEndOffset() <= 0)
- return -1;
-
- CompoundRegion regions[] = getRegionsWithoutWhiteSpaces(node.getOwnerDocument().getModel().getStructuredDocument(), new FormatRegion(iNode.getStartOffset(), iNode.getEndOffset() - iNode.getStartOffset()), getCleanupStrategy(node));
- for (int i = regions.length - 1; i >= 0; i--) {
- if (regions[i].getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT)
- return regions[i].getStartOffset();
- }
- return iNode.getEndOffset();
- }
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n < 0) {
- return -1;
- }
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode != null && flatNode.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- n -= flatNode.getLength();
- }
- if (n > 0) {
- String important = ((ICSSStyleDeclItem) node).getPriority();
- if (important != null && important.length() > 0) {
- // find before "!important" position
- flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- RegionIterator it = new RegionIterator(flatNode, flatNode.getRegionAtCharacterOffset(n - 1));
- while (it.hasPrev()) {
- ITextRegion region = it.prev();
- if (it.getStructuredDocumentRegion() != flatNode)
- break;
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT)
- return it.getStructuredDocumentRegion().getStartOffset(region);
- }
- }
- // skip last space
- flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(n - 1);
- if (region != null) {
- n -= region.getLength() - region.getTextLength();
- }
-
- return n;
- }
- else
- return -1;
- }
-
- /**
- *
- */
- public synchronized static StyleDeclItemFormatter getInstance() {
- if (instance == null)
- instance = new StyleDeclItemFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclarationFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclarationFormatter.java
deleted file mode 100644
index 2278b43a63..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclarationFormatter.java
+++ /dev/null
@@ -1,253 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/**
- *
- */
-public class StyleDeclarationFormatter extends DefaultCSSSourceFormatter {
-
- private static StyleDeclarationFormatter instance;
-
- /**
- *
- */
- StyleDeclarationFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
-
- // check no child
- if (child == null && prev == null)
- return;
-
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- if (start > 0 && start < end) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- String pickupType = CSSRegionContexts.CSS_DECLARATION_DELIMITER;
- if (prev == null || child == null)
- pickupType = null;
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, pickupType);
- }
- // extract source
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- }
- else if (prev != null && child != null) { // generate source :
- // between two
- // declarations
- source.append(";");//$NON-NLS-1$
- }
- else if (prev == null) { // generate source : before the first
- // declaration
- org.eclipse.wst.css.core.util.RegionIterator it = null;
- if (end > 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- it = new org.eclipse.wst.css.core.util.RegionIterator(structuredDocument, end - 1);
- }
- else {
- int pos = getChildInsertPos(node);
- if (pos >= 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- it = new org.eclipse.wst.css.core.util.RegionIterator(structuredDocument, pos - 1);
- }
- }
- if (it != null) {
- int limit = ((IndexedRegion) ((node.getParentNode() != null) ? node.getParentNode() : node)).getStartOffset();
- while (it.hasPrev()) {
- ITextRegion curReg = it.prev();
- if (curReg.getType() == CSSRegionContexts.CSS_LBRACE || curReg.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER)
- break;
- if (curReg.getType() != CSSRegionContexts.CSS_S && curReg.getType() != CSSRegionContexts.CSS_COMMENT) {
- source.append(";");//$NON-NLS-1$
- break;
- }
- if (it.getStructuredDocumentRegion().getStartOffset(curReg) <= limit)
- break;
- }
- }
- }
- else if (child == null) { // generate source : after the last
- // declaration
- org.eclipse.wst.css.core.util.RegionIterator it = null;
- if (start > 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- it = new org.eclipse.wst.css.core.util.RegionIterator(structuredDocument, start);
- }
- else {
- int pos = getChildInsertPos(node);
- if (pos >= 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- it = new org.eclipse.wst.css.core.util.RegionIterator(structuredDocument, pos);
- }
- }
- if (it != null) {
- int limit = ((IndexedRegion) ((node.getParentNode() != null) ? node.getParentNode() : node)).getEndOffset();
- while (it.hasNext()) {
- ITextRegion curReg = it.next();
- if (curReg.getType() == CSSRegionContexts.CSS_RBRACE || curReg.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER)
- break;
- if (curReg.getType() != CSSRegionContexts.CSS_S && curReg.getType() != CSSRegionContexts.CSS_COMMENT) {
- source.append(";");//$NON-NLS-1$
- break;
- }
- if (limit <= it.getStructuredDocumentRegion().getEndOffset(curReg))
- break;
- }
- }
- }
- if (child == null) {
- if (((IndexedRegion) node).getEndOffset() <= 0) {
- // get next region
- int pos = getChildInsertPos(node);
- CompoundRegion toAppendRegion = null;
- if (pos >= 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- IStructuredDocumentRegion flatNode = structuredDocument.getRegionAtCharacterOffset(pos);
- toAppendRegion = new CompoundRegion(flatNode, flatNode.getRegionAtCharacterOffset(pos));
- }
- appendDelimBefore(node.getParentNode(), toAppendRegion, source);
- }
- }
- else if ((prev != null || ((IndexedRegion) node).getEndOffset() <= 0)) {
- if (mgr.isOnePropertyPerLine() && (node.getOwnerDocument() != node || !mgr.isProhibitWrapOnAttr()))
- appendDelimBefore(node, null, source);
- else if (prev != null || node.getOwnerDocument() != node)
- appendSpaceBefore(node, toAppend, source);
- }
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must be
- // comments
- }
- if (needS(outside[1])) {
- if (((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength() && mgr.isOnePropertyPerLine() && (node.getOwnerDocument() != node || !mgr.isProhibitWrapOnAttr())) {
- appendDelimBefore(node, null, source);
- }
- else
- appendSpaceBefore(node, toAppend, source);
- }
- }
-
- /**
- * Insert the method's description here.
- */
- public int getChildInsertPos(ICSSNode node) {
- if (node == null)
- return -1;
- int pos = super.getChildInsertPos(node);
- if (pos < 0) {
- CSSSourceGenerator formatter = getParentFormatter(node);
- return (formatter != null) ? formatter.getChildInsertPos(node.getParentNode()) : -1;
- }
- else
- return pos;
- }
-
- /**
- *
- */
- public synchronized static StyleDeclarationFormatter getInstance() {
- if (instance == null)
- instance = new StyleDeclarationFormatter();
- return instance;
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatAfter(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos < 0 || !nnode.contains(insertPos)) {
- if (node.getParentNode() != null && nnode.getEndOffset() <= 0) {
- CSSSourceGenerator pntFormatter = getParentFormatter(node);
- if (pntFormatter != null)
- return pntFormatter.getLengthToReformatAfter(node.getParentNode(), insertPos);
- }
- return 0;
- }
- return super.getLengthToReformatAfter(node, insertPos);
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatBefore(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos <= 0 || !nnode.contains(insertPos - 1)) {
- if (node.getParentNode() != null && nnode.getEndOffset() <= 0) {
- CSSSourceGenerator pntFormatter = getParentFormatter(node);
- if (pntFormatter != null)
- return pntFormatter.getLengthToReformatBefore(node.getParentNode(), insertPos);
- }
- return 0;
- }
- return super.getLengthToReformatBefore(node, insertPos);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleRuleFormatter.java
deleted file mode 100644
index ac955bd33b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleRuleFormatter.java
+++ /dev/null
@@ -1,166 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSAttr;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/**
- *
- */
-public class StyleRuleFormatter extends DeclContainerFormatter {
-
- private static StyleRuleFormatter instance;
-
- /**
- *
- */
- StyleRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- if (!ICSSStyleRule.SELECTOR.equalsIgnoreCase(attr.getName()))
- return buf;
-
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getEndOffset() - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, region);
- it.next();
- if (it.hasNext()) {
- ITextRegion next = it.next();
- if (next.getType() == CSSRegionContexts.CSS_S)
- context.end = it.getStructuredDocumentRegion().getEndOffset(next);
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- }
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- }
- else {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getStartOffset());
- if (region.getType() == CSSRegionContexts.CSS_S) {
- context.start = flatNode.getStartOffset(region);
- context.end = flatNode.getEndOffset(region);
- }
- else {
- context.start = flatNode.getEndOffset();
- context.end = flatNode.getEndOffset();
- }
- }
- }
- // generate text
- if (insert) {
- buf.append(attr.getValue());
- appendSpaceBefore(node, "", buf);//$NON-NLS-1$
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBetween(node, regions[i - 1], regions[i], source);
- source.append(decoratedSelectorRegion(regions[i], (i != 0) ? regions[i - 1] : null, stgy));
- }
- }
- else { // generate source
- String str = ((ICSSStyleRule) node).getSelectorText();
- // appendSpaceBefore(node,str,source);
- source.append(str);
- appendSpaceBefore(node, "{", source);//$NON-NLS-1$
- source.append("{");//$NON-NLS-1$
- }
- appendDelimBefore(node, null, source);
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBetween(node, (i == 0) ? outside[0] : regions[i - 1], regions[i], source);
- source.append(decoratedSelectorRegion(regions[i], (i != 0) ? regions[i - 1] : null, stgy));
- }
- if (needS(outside[1])) {
- if (isIncludesPreEnd(node, region))
- appendDelimBefore(node, null, source);
- else
- appendSpaceBetween(node, regions[regions.length - 1], outside[1], source);
- }
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- if (!ICSSStyleRule.SELECTOR.equalsIgnoreCase(attrName))
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICSSStyleRule.SELECTOR);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- else
- return ((IndexedRegion) node).getStartOffset();
- }
-
- /**
- *
- */
- public synchronized static StyleRuleFormatter getInstance() {
- if (instance == null)
- instance = new StyleRuleFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleSheetFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleSheetFormatter.java
deleted file mode 100644
index c97dfe20b8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleSheetFormatter.java
+++ /dev/null
@@ -1,273 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/**
- *
- */
-public class StyleSheetFormatter extends AbstractCSSSourceFormatter {
-
- private static StyleSheetFormatter instance;
-
- /**
- *
- */
- StyleSheetFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- String delim = getLineDelimiter(node);
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- if (prev == null && child == null)
- return;
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
- if (start > 0 && start < end) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- String pickupType = CSSRegionContexts.CSS_DELIMITER;
- if (prev == null)
- pickupType = null;
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, pickupType);
- }
- // generate source
- if (prev != null) {
- appendDelimBefore(node, (regions.length > 0) ? regions[0] : null, source);
- }
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- // or
- // semi_colon
- if (regions[i].getType() == CSSRegionContexts.CSS_DELIMITER) {
- // append delim after
- appendDelimBefore(node, null, source);
- }
- }
- if (prev != null)
- appendDelimBefore(node, null, source);
- }
- else if (prev != null && child != null) { // source generation :
- // between two rules
- if (prev.getNodeType() == ICSSNode.IMPORTRULE_NODE || prev.getNodeType() == ICSSNode.CHARSETRULE_NODE || prev.getNodeType() == ICSSNode.UNKNOWNRULE_NODE)
- source.append(";");//$NON-NLS-1$
- source.append(delim);
- source.append(delim);
- }
- else if (((IndexedRegion) node).getEndOffset() > 0) {
- if (prev == null) { // source formatting : before the first rule
- ICSSNode next = child.getNextSibling();
- int pos = getChildInsertPos(node);
- if (next != null && ((IndexedRegion) next).getEndOffset() > 0)
- pos = ((IndexedRegion) next).getStartOffset();
- if (pos != 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] prevRegions = getRegions(structuredDocument, new FormatRegion(0, pos), null, null);
- if (prevRegions != null && prevRegions.length > 0)
- appendDelimBefore(node, null, source);
- }
- }
- else if (child == null) { // source formatting : after the last
- // rule
- if (prev.getNodeType() == ICSSNode.IMPORTRULE_NODE || prev.getNodeType() == ICSSNode.CHARSETRULE_NODE || prev.getNodeType() == ICSSNode.UNKNOWNRULE_NODE)
- source.append(";");//$NON-NLS-1$
- if (start > 0 && start <= ((IndexedRegion) node).getEndOffset()) {
- appendDelimBefore(node, null, source);
- }
- else if (start <= 0) {
- int pos = getChildInsertPos(node);
- if (pos < ((IndexedRegion) node).getEndOffset()) {
- appendDelimBefore(node, null, source);
- }
- }
- }
- }
- else if (prev != null && child == null) { // source generation :
- // after the last rule
- if (prev.getNodeType() == ICSSNode.IMPORTRULE_NODE || prev.getNodeType() == ICSSNode.CHARSETRULE_NODE || prev.getNodeType() == ICSSNode.UNKNOWNRULE_NODE)
- source.append(";");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must be
- // comments
- }
- if (needS(outside[1])) {
- if (((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength())
- appendDelimBefore(node, null, source);
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- if ((regions != null && regions.length > 0 && regions[regions.length - 1].getType() == CSSRegionContexts.CSS_CDC) || node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED)
- appendDelimBefore(node, null, source);
- }
- else { // source generation
- ICSSNode lastChild = node.getLastChild();
- if (lastChild != null && (lastChild.getNodeType() == ICSSNode.CHARSETRULE_NODE || lastChild.getNodeType() == ICSSNode.IMPORTRULE_NODE || lastChild.getNodeType() == ICSSNode.UNKNOWNRULE_NODE)) {
- source.append(";");//$NON-NLS-1$
- }
- if (node.getOwnerDocument().getModel() != null && node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED)
- appendDelimBefore(node, null, source);
- return; // nothing
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPre(org.eclipse.wst.css.core.document.ICSSNode node, java.lang.StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- if (end > 0) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || regions[i].getType() == CSSRegionContexts.CSS_CDO || node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED)
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- if (node.getLastChild() != null && (source.length() > 0 || node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED)) {
- appendDelimBefore(node, null, source);
- }
- }
- else if (node.getOwnerDocument().getModel() != null && node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED) {
- appendDelimBefore(node, null, source);
- // source.append("<!--");
- // appendDelimBefore(node,null, source);
- }
- else
- return; // nothing
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, java.lang.StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]) || regions[i].getType() == CSSRegionContexts.CSS_CDO || node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED)
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- if (needS(outside[1])) {
- if (isIncludesPreEnd(node, region)) {
- if (source.length() > 0 || node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED) {
- String delim = getLineDelimiter(node);
- source.append(delim);
- }
- }
- }
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- IStructuredDocumentRegion flatNode = structuredDocument.getRegionAtCharacterOffset(n - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(n - 1);
- RegionIterator it = new RegionIterator(flatNode, region);
- while (it.hasPrev()) {
- ITextRegion reg = it.prev();
- if (reg.getType() == CSSRegionContexts.CSS_CDC)
- return it.getStructuredDocumentRegion().getStartOffset(reg);
- }
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- public synchronized static StyleSheetFormatter getInstance() {
- if (instance == null)
- instance = new StyleSheetFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/UnknownRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/UnknownRuleFormatter.java
deleted file mode 100644
index a3dcad1ead..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/UnknownRuleFormatter.java
+++ /dev/null
@@ -1,86 +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.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.w3c.dom.css.CSSUnknownRule;
-
-
-/**
- *
- */
-public class UnknownRuleFormatter extends DefaultCSSSourceFormatter {
-
- private static UnknownRuleFormatter instance;
-
- /**
- *
- */
- UnknownRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int start = ((IndexedRegion) node).getStartOffset();
- int end = ((IndexedRegion) node).getEndOffset();
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- }
- else { // generate source
- CSSUnknownRule rule = (CSSUnknownRule) node;
- source.append(rule.getCssText());
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public synchronized static UnknownRuleFormatter getInstance() {
- if (instance == null)
- instance = new UnknownRuleFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCategoryImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCategoryImpl.java
deleted file mode 100644
index db07505586..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCategoryImpl.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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMCategory;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-class CSSMMCategoryImpl extends CSSMMNodeImpl implements CSSMMCategory {
-
- public CSSMMCategoryImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_CATEGORY;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- public String getCaption() {
- return fCaption;
- }
-
- void setCaption(String caption) {
- fCaption = caption;
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getCaption() == null) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getCaption();
- }
-
-
- private String fCaption = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCharsetRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCharsetRuleImpl.java
deleted file mode 100644
index 6e11efbf38..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCharsetRuleImpl.java
+++ /dev/null
@@ -1,45 +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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMCharsetRule;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-class CSSMMCharsetRuleImpl extends CSSMMNodeImpl implements CSSMMCharsetRule {
-
-
- public CSSMMCharsetRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_CHARSET_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- return MetaModelErrors.NO_ERROR;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMContainerImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMContainerImpl.java
deleted file mode 100644
index 5903c55902..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMContainerImpl.java
+++ /dev/null
@@ -1,63 +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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMContainer;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-class CSSMMContainerImpl extends CSSMMNodeImpl implements CSSMMContainer {
-
-
- public CSSMMContainerImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_CONTAINER;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_NUMBER || type == TYPE_KEYWORD || type == TYPE_FUNCTION || type == TYPE_CONTAINER);
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMDescriptorImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMDescriptorImpl.java
deleted file mode 100644
index b3410691f7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMDescriptorImpl.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.css.core.internal.metamodel;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMDescriptor;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-
-class CSSMMDescriptorImpl extends CSSMMNodeImpl implements CSSMMDescriptor {
-
-
- public CSSMMDescriptorImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_DESCRIPTOR;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_NUMBER || type == TYPE_KEYWORD || type == TYPE_FUNCTION || type == TYPE_CONTAINER || type == TYPE_STRING || type == TYPE_SEPARATOR);
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
- /*
- * @see CSSMMDescriptor#getValues()
- */
- public Iterator getValues() {
- ValueCollector collector = new ValueCollector();
- collector.apply(this);
- return collector.getNodes();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFontFaceRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFontFaceRuleImpl.java
deleted file mode 100644
index 2e1c22fc58..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFontFaceRuleImpl.java
+++ /dev/null
@@ -1,45 +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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMFontFaceRule;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-class CSSMMFontFaceRuleImpl extends CSSMMNodeImpl implements CSSMMFontFaceRule {
-
-
- public CSSMMFontFaceRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_FONT_FACE_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return (child != null && child.getType() == TYPE_DESCRIPTOR);
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- return MetaModelErrors.NO_ERROR;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFunctionImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFunctionImpl.java
deleted file mode 100644
index 0be028ee58..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFunctionImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMFunction;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-class CSSMMFunctionImpl extends CSSMMNodeImpl implements CSSMMFunction {
-
- public CSSMMFunctionImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_FUNCTION;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- public String getFunctionString() {
- return fValue;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMNodeImpl#postSetAttribute()
- */
- // void postSetAttribute() throws BadInitializationException {
- // super.postSetAttribute();
- // String name = getName();
- // if (name == null) { throw new BadInitializationException(); }
- //
- // List list = new ArrayList();
- // list.add(CSSFunctionID.F_ATTR);
- // list.add(CSSFunctionID.F_COUNTER);
- // list.add(CSSFunctionID.F_RGB);
- // list.add(CSSFunctionID.F_RECT);
- // list.add(CSSFunctionID.F_URI);
- // list.add(CSSFunctionID.F_FORMAT);
- // list.add(CSSFunctionID.F_LOCAL);
- //
- // if (! list.contains(name.toLowerCase())) {
- // throw new BadInitializationException();
- // }
- // }
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getFunctionString();
- }
-
- void setFunctionString(String value) {
- fValue = value;
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getFunctionString() == null) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
-
- private String fValue = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMImportRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMImportRuleImpl.java
deleted file mode 100644
index 0f40141d07..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMImportRuleImpl.java
+++ /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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMImportRule;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-class CSSMMImportRuleImpl extends CSSMMNodeImpl implements CSSMMImportRule {
-
-
- public CSSMMImportRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_IMPORT_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- return MetaModelErrors.NO_ERROR;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMKeywordImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMKeywordImpl.java
deleted file mode 100644
index f82b67b456..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMKeywordImpl.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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMKeyword;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-class CSSMMKeywordImpl extends CSSMMNodeImpl implements CSSMMKeyword {
-
- public CSSMMKeywordImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_KEYWORD;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMKeyword#getKeywordString()
- */
- public String getKeywordString() {
- return fValue;
- }
-
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getKeywordString();
- }
-
- void setKeywordString(String value) {
- fValue = value;
- }
-
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getKeywordString() == null) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
-
- private String fValue = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMMediaRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMMediaRuleImpl.java
deleted file mode 100644
index 4a60ce6701..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMMediaRuleImpl.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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMMediaRule;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-class CSSMMMediaRuleImpl extends CSSMMNodeImpl implements CSSMMMediaRule {
-
-
- public CSSMMMediaRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_MEDIA_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- short getError() {
- return MetaModelErrors.NO_ERROR;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNodeImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNodeImpl.java
deleted file mode 100644
index 06c73a67e8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNodeImpl.java
+++ /dev/null
@@ -1,148 +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.css.core.internal.metamodel;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-
-abstract class CSSMMNodeImpl implements CSSMMNode {
-
- public CSSMMNodeImpl() {
- super();
- }
-
- public abstract String getType();
-
- public String getDescription() {
- return fDescription;
- }
-
- public String getAttribute(String name) {
- if (fAttributes == null) {
- return null;
- }
- return (String) fAttributes.get(name);
- }
-
- public Iterator getChildNodes() {
- if (fChildNodes == null) {
- return Collections.EMPTY_LIST.iterator();
- }
- else {
- return Collections.unmodifiableCollection(fChildNodes).iterator();
- }
- }
-
- public Iterator getDescendants() {
- List descendants = new ArrayList();
- Iterator iChild = getChildNodes();
- while (iChild.hasNext()) {
- CSSMMNode child = (CSSMMNode) iChild.next();
- Iterator iDescendant = child.getDescendants();
- if (iDescendant.hasNext()) {
- while (iDescendant.hasNext()) {
- CSSMMNode descendant = (CSSMMNode) iDescendant.next();
- if (!descendants.contains(descendant)) {
- descendants.add(descendant);
- }
- }
- }
- else {
- if (!descendants.contains(child)) {
- descendants.add(child);
- }
- }
- }
- return Collections.unmodifiableCollection(descendants).iterator();
- }
-
- void appendChild(CSSMMNode child) {
- if (child == null) {
- return;
- }
- if (fChildNodes == null) {
- fChildNodes = new ArrayList();
- }
- if (!fChildNodes.contains(child)) {
- fChildNodes.add(child);
- ((CSSMMNodeImpl) child).fRefCount++;
- }
- }
-
- void removeChild(CSSMMNode child) {
- if (child == null || fChildNodes == null) {
- return;
- }
- Iterator i = fChildNodes.iterator();
- while (i.hasNext()) {
- if (i.next() == child) {
- i.remove();
- ((CSSMMNodeImpl) child).fRefCount--;
- return;
- }
- }
- }
-
- void removeAllChildNodes() {
- if (fChildNodes == null) {
- return;
- }
- Iterator i = fChildNodes.iterator();
- while (i.hasNext()) {
- ((CSSMMNodeImpl) i.next()).fRefCount--;
- }
- fChildNodes.clear();
- }
-
- abstract boolean canContain(CSSMMNode child);
-
- void initializeAttribute(Map attributes) throws IllegalArgumentException {
- if (fAttributes == null) {
- fAttributes = new HashMap();
- }
- fAttributes.putAll(attributes);
- postSetAttribute();
- }
-
- void setDescription(String description) {
- fDescription = description;
- }
-
- void postSetAttribute() throws IllegalArgumentException {
- // default : nop
- }
-
- abstract short getError();
-
- int getChildCount() {
- return (fChildNodes != null) ? fChildNodes.size() : 0;
- }
-
- int getReferenceCount() {
- return fRefCount;
- }
-
-
- private List fChildNodes = null;
- private String fDescription = null;
- private Map fAttributes = null;
- private int fRefCount = 0; // for error check
-
- static final String ATTR_NAME = "name"; //$NON-NLS-1$
- static final String NAME_NOT_AVAILABLE = ""; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNumberImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNumberImpl.java
deleted file mode 100644
index 037c1f6ef3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNumberImpl.java
+++ /dev/null
@@ -1,52 +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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMNumber;
-
-class CSSMMNumberImpl extends CSSMMNodeImpl implements CSSMMNumber {
-
-
- public CSSMMNumberImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_NUMBER;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return (child != null && child.getType() == TYPE_UNIT);
- }
-
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPageRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPageRuleImpl.java
deleted file mode 100644
index 3bbe54e62f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPageRuleImpl.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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMPageRule;
-
-class CSSMMPageRuleImpl extends CSSMMNodeImpl implements CSSMMPageRule {
-
-
- public CSSMMPageRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_PAGE_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_PROPERTY || type == TYPE_SELECTOR);
- }
-
- short getError() {
- if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPropertyImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPropertyImpl.java
deleted file mode 100644
index a9f7c3afe7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPropertyImpl.java
+++ /dev/null
@@ -1,76 +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.css.core.internal.metamodel;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMProperty;
-
-
-class CSSMMPropertyImpl extends CSSMMNodeImpl implements CSSMMProperty {
- public CSSMMPropertyImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_PROPERTY;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_NUMBER || type == TYPE_KEYWORD || type == TYPE_FUNCTION || type == TYPE_CONTAINER || type == TYPE_STRING || type == TYPE_SEPARATOR || type == TYPE_PROPERTY);
- }
-
- /*
- * @see CSSMMProperty#getCategoryName()
- */
- public String getCategoryName() {
- return getAttribute(ATTR_CATEGORY);
- }
-
- public Iterator getValues() {
- ValueCollector collector = new ValueCollector();
- collector.apply(this);
- return collector.getNodes();
- }
-
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
-
- static final String ATTR_CATEGORY = "category"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPseudoClassImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPseudoClassImpl.java
deleted file mode 100644
index ae8f81e12c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPseudoClassImpl.java
+++ /dev/null
@@ -1,33 +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.css.core.internal.metamodel;
-
-class CSSMMPseudoClassImpl extends CSSMMSelectorImpl {
-
-
- /**
- * Constructor for CSSMMPseudoClassImpl.
- */
- public CSSMMPseudoClassImpl() {
- super();
- }
-
- /*
- * @see CSSMMSelector#getSelectorType()
- */
- public String getSelectorType() {
- return TYPE_PSEUDO_CLASS;
- }
-
- void setSelectorString(String value) {
- fValue = ":" + value; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPseudoElementImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPseudoElementImpl.java
deleted file mode 100644
index d047156399..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPseudoElementImpl.java
+++ /dev/null
@@ -1,33 +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.css.core.internal.metamodel;
-
-public class CSSMMPseudoElementImpl extends CSSMMSelectorImpl {
-
-
- /**
- * Constructor for CSSMMPseudoElementImpl.
- */
- public CSSMMPseudoElementImpl() {
- super();
- }
-
- /*
- * @see CSSMMSelector#getSelectorType()
- */
- public String getSelectorType() {
- return TYPE_PSEUDO_ELEMENT;
- }
-
- void setSelectorString(String value) {
- fValue = ":" + value; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelectorExpressionImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelectorExpressionImpl.java
deleted file mode 100644
index 1d1e11e99f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelectorExpressionImpl.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.css.core.internal.metamodel;
-
-import java.util.HashMap;
-import java.util.Map;
-
-
-class CSSMMSelectorExpressionImpl extends CSSMMSelectorImpl {
-
- public CSSMMSelectorExpressionImpl() {
- super();
- }
-
- /*
- * @see CSSMMSelector#getSelectorType()
- */
- public String getSelectorType() {
- return TYPE_EXPRESSION;
- }
-
- void postSetAttribute() throws IllegalArgumentException {
- super.postSetAttribute();
- String name = getName();
- if (name == null) {
- throw new IllegalArgumentException();
- }
-
- Map map = new HashMap();
- map.put(EXPRESSION_ADJACENT.toLowerCase(), "+"); //$NON-NLS-1$
- map.put(EXPRESSION_ATTRIBUTE.toLowerCase(), "[]"); //$NON-NLS-1$
- map.put(EXPRESSION_CHILD.toLowerCase(), ">"); //$NON-NLS-1$
- map.put(EXPRESSION_DESCENDANT.toLowerCase(), "' '"); //$NON-NLS-1$
- map.put(EXPRESSION_UNIVERSAL.toLowerCase(), "*"); //$NON-NLS-1$
-
- fValue = (String) map.get(name.toLowerCase());
- if (fValue == null) {
- throw new IllegalArgumentException();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelectorImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelectorImpl.java
deleted file mode 100644
index 590b3fe608..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelectorImpl.java
+++ /dev/null
@@ -1,81 +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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMSelector;
-
-
-abstract class CSSMMSelectorImpl extends CSSMMNodeImpl implements CSSMMSelector {
-
- /**
- * Constructor for CSSMMSelectorImpl.
- */
- public CSSMMSelectorImpl() {
- super();
- }
-
- /*
- * @see CSSMMNode#getName()
- */
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNode#getType()
- */
- public String getType() {
- return TYPE_SELECTOR;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
- /*
- * @see CSSMMSelector#getSelectorString()
- */
- public String getSelectorString() {
- return fValue;
- }
-
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getSelectorString();
- }
-
-
- protected String fValue = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStringImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStringImpl.java
deleted file mode 100644
index 39ab26ca0b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStringImpl.java
+++ /dev/null
@@ -1,86 +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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMString;
-
-class CSSMMStringImpl extends CSSMMNodeImpl implements CSSMMString {
-
-
- public CSSMMStringImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_STRING;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
- /*
- * @see CSSMMNodeImpl#postSetAttribute()
- */
- // void postSetAttribute() throws BadInitializationException {
- // super.postSetAttribute();
- // String name = getName();
- // if (name == null) { throw new BadInitializationException(); }
- //
- // Map map = new HashMap();
- // map.put(CSSStringID.S_ANY.toLowerCase(), "<any>"); //$NON-NLS-1$
- // map.put(CSSStringID.S_COUNTER_IDENTIFIER.toLowerCase(), "<counter>");
- // //$NON-NLS-1$
- // map.put(CSSStringID.S_FAMILY_NAME.toLowerCase(), "<family-name>");
- // //$NON-NLS-1$
- // map.put(CSSStringID.S_FONT_FACE_NAME.toLowerCase(),
- // "<font-face-name>"); //$NON-NLS-1$
- // map.put(CSSStringID.S_PAGE_IDENTIFIER.toLowerCase(),
- // "<page-identifier>"); //$NON-NLS-1$
- // map.put(CSSStringID.S_SPECIFIC_VOICE.toLowerCase(),
- // "<specific-voice>"); //$NON-NLS-1$
- // map.put(CSSStringID.S_URANGE.toLowerCase(), "<urange>"); //$NON-NLS-1$
- //
- // fValue = (String)map.get(name.toLowerCase());
- // if (fValue == null) { throw new BadInitializationException(); }
- // }
- //
- // /*
- // * @see Object#toString()
- // */
- // public String toString() {
- // return fValue;
- // }
- //
- // private String fValue = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleRuleImpl.java
deleted file mode 100644
index f1919eeaf9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleRuleImpl.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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMStyleRule;
-
-class CSSMMStyleRuleImpl extends CSSMMNodeImpl implements CSSMMStyleRule {
-
-
- public CSSMMStyleRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_STYLE_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_PROPERTY || type == TYPE_SELECTOR);
- }
-
- short getError() {
- if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleSheetImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleSheetImpl.java
deleted file mode 100644
index a276d2dfde..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleSheetImpl.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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMStyleSheet;
-
-class CSSMMStyleSheetImpl extends CSSMMNodeImpl implements CSSMMStyleSheet {
-
-
- public CSSMMStyleSheetImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_STYLE_SHEET;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_CHARSET_RULE || type == TYPE_IMPORT_RULE || type == TYPE_PAGE_RULE || type == TYPE_MEDIA_RULE || type == TYPE_FONT_FACE_RULE || type == TYPE_STYLE_RULE);
- }
-
- short getError() {
- if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMUnitImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMUnitImpl.java
deleted file mode 100644
index 7e90766f29..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMUnitImpl.java
+++ /dev/null
@@ -1,108 +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.css.core.internal.metamodel;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMUnit;
-
-/**
- * CSSMMUnit : embedded type
- */
-class CSSMMUnitImpl extends CSSMMNodeImpl implements CSSMMUnit {
-
- public CSSMMUnitImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_UNIT;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMUnit#getUnitString()
- */
- public String getUnitString() {
- return fValue;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMNodeImpl#postSetAttribute()
- */
- // void postSetAttribute() throws BadInitializationException {
- // super.postSetAttribute();
- // String name = getName();
- // if (name == null) { throw new BadInitializationException(); }
- // Map map = new HashMap();
- // map.put(CSSUnitID.U_CM.toLowerCase(), "cm");//$NON-NLS-1$
- // map.put(CSSUnitID.U_DEG.toLowerCase(), "deg");//$NON-NLS-1$
- // map.put(CSSUnitID.U_EMS.toLowerCase(), "em");//$NON-NLS-1$
- // map.put(CSSUnitID.U_EXS.toLowerCase(), "ex");//$NON-NLS-1$
- // map.put(CSSUnitID.U_GRAD.toLowerCase(), "grad");//$NON-NLS-1$
- // map.put(CSSUnitID.U_HASH.toLowerCase(), "#");//$NON-NLS-1$
- // map.put(CSSUnitID.U_HZ.toLowerCase(), "Hz");//$NON-NLS-1$
- // map.put(CSSUnitID.U_IN.toLowerCase(), "in");//$NON-NLS-1$
- // // map.put(CSSUnitID.U_INTEGER.toLowerCase(),
- // "(integer)");//$NON-NLS-1$
- // map.put(CSSUnitID.U_KHZ.toLowerCase(), "kHz");//$NON-NLS-1$
- // map.put(CSSUnitID.U_MM.toLowerCase(), "mm");//$NON-NLS-1$
- // map.put(CSSUnitID.U_MS.toLowerCase(), "ms");//$NON-NLS-1$
- // // map.put(CSSUnitID.U_NUMBER.toLowerCase(), "(number)");//$NON-NLS-1$
- // map.put(CSSUnitID.U_PC.toLowerCase(), "pc");//$NON-NLS-1$
- // map.put(CSSUnitID.U_PERCENTAGE.toLowerCase(), "%");//$NON-NLS-1$
- // map.put(CSSUnitID.U_PT.toLowerCase(), "pt");//$NON-NLS-1$
- // map.put(CSSUnitID.U_PX.toLowerCase(), "px");//$NON-NLS-1$
- // map.put(CSSUnitID.U_RAD.toLowerCase(), "rad");//$NON-NLS-1$
- // map.put(CSSUnitID.U_S.toLowerCase(), "s");//$NON-NLS-1$
- // fValue = (String)map.get(name.toLowerCase());
- // if (fValue == null) { throw new BadInitializationException(); }
- // }
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getUnitString();
- }
-
- void setUnitString(String value) {
- fValue = value;
- }
-
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getUnitString() == null) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
- private String fValue = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMetaModelImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMetaModelImpl.java
deleted file mode 100644
index 8ae89dfa82..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMetaModelImpl.java
+++ /dev/null
@@ -1,95 +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.css.core.internal.metamodel;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMStyleSheet;
-import org.eclipse.wst.css.core.metamodel.CSSMetaModel;
-
-
-class CSSMetaModelImpl extends CSSMMNodeImpl implements CSSMetaModel {
- // class CSSMetaModelImpl implements CSSMetaModel {
- public CSSMetaModelImpl() {
- super();
- fNodePool = new NodePool();
- }
-
- public String getType() {
- return TYPE_META_MODEL;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_STYLE_SHEET || type == TYPE_CATEGORY);
- }
-
- public CSSMMStyleSheet getStyleSheet() {
- Iterator i = getChildNodes();
- while (i.hasNext()) {
- CSSMMNode node = (CSSMMNode) i.next();
- if (node.getType() == TYPE_STYLE_SHEET) {
- return (CSSMMStyleSheet) node;
- }
- }
- return null;
- // return fStyleSheet;
- }
-
- public Iterator getCategories() {
- List categories = new ArrayList();
- Iterator i = getChildNodes();
- while (i.hasNext()) {
- CSSMMNode node = (CSSMMNode) i.next();
- if (node.getType() == TYPE_CATEGORY) {
- categories.add(node);
- }
- }
- return categories.iterator();
- }
-
- void loadCompleted() {
- fNodePool = null;
- }
-
- // List fCategories = null;
- /*
- * @see CSSMMNodeImpl#isValid()
- */
- short getError() {
- if (getStyleSheet() != null) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
- NodePool getNodePool() {
- return fNodePool;
- }
-
-
- private NodePool fNodePool = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileImpl.java
deleted file mode 100644
index 09fdbe745a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileImpl.java
+++ /dev/null
@@ -1,158 +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.css.core.internal.metamodel;
-
-
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.metamodel.CSSProfile;
-import org.osgi.framework.Bundle;
-
-
-
-class CSSProfileImpl implements CSSProfile {
-
- /**
- * Constructor for CSSMetaModelProfileInfoImpl.
- */
- private CSSProfileImpl() {
- super();
- }
-
- /**
- * Constructor for CSSMetaModelProfileInfoImpl.
- */
- public CSSProfileImpl(String id, URL url) {
- super();
- fID = id;
- fURL = url;
- }
-
- /*
- * @see CSSMetaModelProfileInfo#getProfileID()
- */
- public String getProfileID() {
- return fID;
- }
-
- /*
- * @see CSSMetaModelProfileInfo#getProfileName()
- */
- public String getProfileName() {
- return (fName == null) ? fID : fName;
- }
-
- public CSSMetaModel getMetaModel() {
- if (fMetaModel == null) {
- try {
- InputStream input = getProfileURL().openStream();
- ProfileLoader loader = new ProfileLoader(getResourceBundle(), getLogging());
- fMetaModel = loader.loadProfile(input);
- }
- catch (IOException e) {
- Logger.logException("Cannot open stream for profile", e); //$NON-NLS-1$
- }
- }
- return fMetaModel;
- }
-
- private ResourceBundle getResourceBundle() {
- ClassLoader targetLoader = null;
- String pluginID = getOwnerPluginID();
- if (pluginID != null) {
- Bundle bundle = Platform.getBundle(pluginID);
- if (bundle != null) {
- targetLoader = bundle.getClass().getClassLoader();
- }
- }
- if (targetLoader == null) {
- targetLoader = this.getClass().getClassLoader();
- }
-
- String profileURLString = getProfileURL().toString();
- int lastSlashPos = profileURLString.lastIndexOf('/');
- if (1 < lastSlashPos) {
- String profileURLBase = profileURLString.substring(0, lastSlashPos + 1);
- try {
- URL[] urls = new URL[]{new URL(profileURLBase)};
- targetLoader = URLClassLoader.newInstance(urls, targetLoader);
- }
- catch (MalformedURLException e) {
- }
- }
-
- try {
- return ResourceBundle.getBundle("cssprofile", //$NON-NLS-1$
- Locale.getDefault(), targetLoader);
- }
- catch (MissingResourceException e) {
- return null;
- }
- }
-
- /*
- * @see CSSMetaModelProfileInfo#getProfileURL()
- */
- public URL getProfileURL() {
- return fURL;
- }
-
- void setProfileName(String name) {
- fName = name;
- }
-
- public boolean isDefault() {
- return fDefault;
- }
-
- void setDefault(boolean isDefault) {
- fDefault = isDefault;
- }
-
- public String getOwnerPluginID() {
- return fOwnerPluginID;
- }
-
- void setOwnerPluginID(String pluginID) {
- fOwnerPluginID = pluginID;
- }
-
- /**
- * hidden option : logging
- */
- void setLogging(boolean logging) {
- fLogging = logging;
- }
-
- boolean getLogging() {
- return fLogging;
- }
-
-
- String fID = null;
- String fName = null;
- URL fURL = null;
- CSSMetaModel fMetaModel = null;
- String fOwnerPluginID = null;
- boolean fDefault = false;
- boolean fLogging = false;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileTest.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileTest.java
deleted file mode 100644
index f1b8777221..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileTest.java
+++ /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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.metamodel.CSSProfile;
-
-
-class CSSProfileTest {
-
-
- /**
- * Test use only
- */
- public static void main(String[] args) {
- if (args.length == 0)
- return;
- CSSMetaModel metamodel = null;
- try {
- CSSProfile profile = new CSSProfileImpl("test", new URL(args[0])); //$NON-NLS-1$
- metamodel = profile.getMetaModel();
- }
- catch (MalformedURLException e) {
- Logger.logException(e);
- }
- if (metamodel == null) {
- return;
- }
- /*
- * CSSMMTypeCollector collector = new CSSMMTypeCollector();
- * collector.apply(metamodel, CSSMMNode.TYPE_PROPERTY); Iterator
- * iProperty = collector.getNodes(); while (iProperty.hasNext()) {
- * CSSMMNode node = (CSSMMNode)iProperty.next();
- * System.out.println("Property " + node.getName() + " can contain:");
- * //$NON-NLS-2$ //$NON-NLS-1$ Iterator iValue =
- * node.getDescendants(); while (iValue.hasNext()) {
- * debugOut((CSSMMNode)iValue.next(), 0, false); } }
- */
- debugOut(metamodel, 0, true);
- }
-
- static void debugOut(CSSMMNode node, int depth, boolean recursive) {
- String type = node.getType();
- for (int i = 0; i < depth; i++) {
- System.out.print("\t"); //$NON-NLS-1$
- }
- System.out.print("[ " + node.getName() + "(" + type + ") ]"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- if (type == CSSMMNode.TYPE_UNIT || type == CSSMMNode.TYPE_KEYWORD || type == CSSMMNode.TYPE_FUNCTION || type == CSSMMNode.TYPE_SELECTOR) {
- System.out.print(" -> " + node.toString()); //$NON-NLS-1$
- }
- System.out.println();
-
- if (recursive) {
- java.util.Iterator iNode = node.getChildNodes();
- while (iNode.hasNext()) {
- debugOut((CSSMMNode) iNode.next(), depth + 1, true);
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/MetaModelErrors.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/MetaModelErrors.java
deleted file mode 100644
index aaae5587f9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/MetaModelErrors.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.css.core.internal.metamodel;
-
-interface MetaModelErrors {
-
- static final short NO_ERROR = 0;
-
- // MASK
- static final short MASK_WARNING = 0x1000;
- static final short MASK_ERROR = 0x2000;
-
- // ERROR
- static final short ERROR_NOT_DEFINED = MASK_ERROR + 0x01;
- static final short ERROR_INVALID_NAME = MASK_ERROR + 0x04;
- static final short ERROR_INVAILD_CHILD = MASK_ERROR + 0x02;
- static final short ERROR_NO_CHILD = MASK_ERROR + 0x08;
- // static final short ERROR_NO_ESSENTIAL_CHILD = MASK_ERROR + 0x10
-
- // WARNING
- static final short WARNING_HAS_NO_CHILD = MASK_WARNING + 0x01;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/NodePool.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/NodePool.java
deleted file mode 100644
index 635bf5bd07..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/NodePool.java
+++ /dev/null
@@ -1,171 +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.css.core.internal.metamodel;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.wst.css.core.internal.Logger;
-
-
-
-class NodePool {
-
- NodePool() {
- super();
- initializeClassNameTable();
- }
-
- CSSMMNodeImpl getNode(String tagName, String nodeName) {
- if (nodeName != null) {
- nodeName = nodeName.toLowerCase();
- }
- String className = (String) classNames.get(tagName);
- if (className == null) {
- return null;
- }
- Map nodes = (Map) nodeRegistry.get(className);
- if (nodes == null) {
- nodes = new HashMap();
- nodeRegistry.put(className, nodes);
- }
- CSSMMNodeImpl node = (CSSMMNodeImpl) nodes.get(nodeName);
- if (node == null) {
- node = createNewNode(className);
- nodes.put(nodeName, node);
- }
- return node;
- }
-
- private CSSMMNodeImpl createNewNode(String className) {
- CSSMMNodeImpl node = null;
- if (className != null) {
- className = getPackageName() + "." + className; //$NON-NLS-1$
- try {
- node = (CSSMMNodeImpl) Class.forName(className).newInstance();
- }
- catch (IllegalAccessException e) {
- Logger.logException(e);
- }
- catch (InstantiationException e) {
- Logger.logException(e);
- }
- catch (ClassNotFoundException e) {
- Logger.logException(e);
- }
- }
- // System.out.println(className + " is Created");
- return node;
- }
-
- /**
- * Error check function: find nodes that are not referred by any node
- */
- Iterator getStrayNodes() {
- List strayNodes = new ArrayList();
- Iterator iMap = nodeRegistry.values().iterator();
- while (iMap.hasNext()) {
- Map nodes = (Map) iMap.next();
- Iterator iNode = nodes.values().iterator();
- while (iNode.hasNext()) {
- CSSMMNodeImpl node = (CSSMMNodeImpl) iNode.next();
- if (node.getReferenceCount() == 0) {
- strayNodes.add(node);
- }
- }
- }
- return strayNodes.iterator();
- }
-
- // This class must not be inner class :)
- private String getPackageName() {
- if (fPackageName == null) {
- String className = getClass().getName();
- int pos = className.lastIndexOf('.');
- if (0 < pos) {
- fPackageName = className.substring(0, pos);
- }
- else {
- fPackageName = ""; //$NON-NLS-1$
- }
- }
- return fPackageName;
- }
-
- void initializeClassNameTable() {
- classNames.put(ProfileKeywords.STYLESHEET_DEF, CLASS_STYLE_SHEET);
- classNames.put(ProfileKeywords.CHARSET_RULE_DEF, CLASS_CHARSET_RULE);
- classNames.put(ProfileKeywords.CHARSET_RULE, CLASS_CHARSET_RULE);
- classNames.put(ProfileKeywords.FONTFACE_RULE_DEF, CLASS_FONT_FACE_RULE);
- classNames.put(ProfileKeywords.FONTFACE_RULE, CLASS_FONT_FACE_RULE);
- classNames.put(ProfileKeywords.IMPORT_RULE_DEF, CLASS_IMPORT_RULE);
- classNames.put(ProfileKeywords.IMPORT_RULE, CLASS_IMPORT_RULE);
- classNames.put(ProfileKeywords.MEDIA_RULE_DEF, CLASS_MEDIA_RULE);
- classNames.put(ProfileKeywords.MEDIA_RULE, CLASS_MEDIA_RULE);
- classNames.put(ProfileKeywords.PAGE_RULE_DEF, CLASS_PAGE_RULE);
- classNames.put(ProfileKeywords.PAGE_RULE, CLASS_PAGE_RULE);
- classNames.put(ProfileKeywords.STYLE_RULE_DEF, CLASS_STYLE_RULE);
- classNames.put(ProfileKeywords.STYLE_RULE, CLASS_STYLE_RULE);
- classNames.put(ProfileKeywords.PROPERTY_DEF, CLASS_PROPERTY);
- classNames.put(ProfileKeywords.PROPERTY, CLASS_PROPERTY);
- classNames.put(ProfileKeywords.DESCRIPTOR_DEF, CLASS_DESCRIPTOR);
- classNames.put(ProfileKeywords.DESCRIPTOR, CLASS_DESCRIPTOR);
- classNames.put(ProfileKeywords.CONTAINER_DEF, CLASS_CONTAINER);
- classNames.put(ProfileKeywords.CONTAINER, CLASS_CONTAINER);
- classNames.put(ProfileKeywords.NUMBER_DEF, CLASS_NUMBER);
- classNames.put(ProfileKeywords.NUMBER, CLASS_NUMBER);
- classNames.put(ProfileKeywords.KEYWORD_DEF, CLASS_KEYWORD);
- classNames.put(ProfileKeywords.KEYWORD, CLASS_KEYWORD);
- classNames.put(ProfileKeywords.UNIT, CLASS_UNIT);
- classNames.put(ProfileKeywords.UNIT_DEF, CLASS_UNIT);
- classNames.put(ProfileKeywords.FUNCTION, CLASS_FUNCTION);
- classNames.put(ProfileKeywords.FUNCTION_DEF, CLASS_FUNCTION);
- classNames.put(ProfileKeywords.SELECTOR_EXPRESSION, CLASS_SELECTOR_EXPRESSION);
- classNames.put(ProfileKeywords.PSEUDO_ELEMENT, CLASS_PSEUDO_ELEMENT);
- classNames.put(ProfileKeywords.PSEUDO_ELEMENT_DEF, CLASS_PSEUDO_ELEMENT);
- classNames.put(ProfileKeywords.PSEUDO_CLASS, CLASS_PSEUDO_CLASS);
- classNames.put(ProfileKeywords.PSEUDO_CLASS_DEF, CLASS_PSEUDO_CLASS);
- classNames.put(ProfileKeywords.STRING, CLASS_STRING);
- classNames.put(ProfileKeywords.CATEGORY_DEF, CLASS_CATEGORY);
- }
-
-
- private String fPackageName;
- /*
- * Conversion Tables nodeRegistry : class name -> hash of node instances
- * classNames : Profile Tag name -> java class name
- */
- private Map nodeRegistry = new HashMap();
- private Map classNames = new HashMap();
-
- private final static String CLASS_STYLE_SHEET = "CSSMMStyleSheetImpl"; //$NON-NLS-1$
- private final static String CLASS_CHARSET_RULE = "CSSMMCharsetRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_FONT_FACE_RULE = "CSSMMFontFaceRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_IMPORT_RULE = "CSSMMImportRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_MEDIA_RULE = "CSSMMMediaRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_PAGE_RULE = "CSSMMPageRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_STYLE_RULE = "CSSMMStyleRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_PROPERTY = "CSSMMPropertyImpl"; //$NON-NLS-1$
- private final static String CLASS_DESCRIPTOR = "CSSMMDescriptorImpl"; //$NON-NLS-1$
- private final static String CLASS_CONTAINER = "CSSMMContainerImpl"; //$NON-NLS-1$
- private final static String CLASS_NUMBER = "CSSMMNumberImpl"; //$NON-NLS-1$
- private final static String CLASS_KEYWORD = "CSSMMKeywordImpl"; //$NON-NLS-1$
- private final static String CLASS_UNIT = "CSSMMUnitImpl"; //$NON-NLS-1$
- private final static String CLASS_FUNCTION = "CSSMMFunctionImpl"; //$NON-NLS-1$
- private final static String CLASS_STRING = "CSSMMStringImpl"; //$NON-NLS-1$
- private final static String CLASS_CATEGORY = "CSSMMCategoryImpl"; //$NON-NLS-1$
- private final static String CLASS_SELECTOR_EXPRESSION = "CSSMMSelectorExpressionImpl"; //$NON-NLS-1$
- private final static String CLASS_PSEUDO_CLASS = "CSSMMPseudoClassImpl"; //$NON-NLS-1$
- private final static String CLASS_PSEUDO_ELEMENT = "CSSMMPseudoElementImpl"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileHandler.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileHandler.java
deleted file mode 100644
index c9481a66c5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileHandler.java
+++ /dev/null
@@ -1,283 +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.css.core.internal.metamodel;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.Stack;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMSelector;
-import org.eclipse.wst.css.core.metamodel.CSSProfile;
-import org.eclipse.wst.css.core.metamodel.CSSProfileRegistry;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-
-class ProfileHandler extends DefaultHandler {
-
- public ProfileHandler(CSSMetaModelImpl metamodel, ResourceBundle resourceBundle, boolean logging) {
- super();
- fMetaModel = metamodel;
- fNodePool = metamodel.getNodePool();
- fResourceBundle = resourceBundle;
- fLogging = logging;
- }
-
- public ProfileHandler(CSSMetaModelImpl metamodel, ResourceBundle resourceBundle) {
- super();
- fMetaModel = metamodel;
- fNodePool = metamodel.getNodePool();
- fResourceBundle = resourceBundle;
- fLogging = false;
- }
-
- private String getResourceString(String key) {
- if (key.equals("%")) { //$NON-NLS-1$
- return key;
- }
- if (!key.startsWith("%")) { //$NON-NLS-1$
- return key;
- }
- if (key.startsWith("%%")) { //$NON-NLS-1$
- return key.substring(1);
- }
-
- if (fResourceBundle != null) {
- return fResourceBundle.getString(key.substring(1));
- }
- else {
- return key;
- }
- }
-
- public void startDocument() throws SAXException {
- // System.out.println("startDocument");
- // fNodeStack.push(metamodel);
- // fCurrentNode = null;
- }
-
- public void endDocument() throws SAXException {
- new ErrorCorrector().doCorrect(fMetaModel);
- if (fLogging) {
- Iterator i = fNodePool.getStrayNodes();
- while (i.hasNext()) {
- CSSMMNode node = (CSSMMNode) i.next();
- String str = "[CSSProfile Warning] " + node.getName(); //$NON-NLS-1$
- str += "(" + node.getType() + ") is not referred by any node."; //$NON-NLS-1$ //$NON-NLS-2$
- Logger.log(Logger.WARNING, str);
- // System.out.println(str);
- }
- }
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- TagNode tagNode = null;
- CSSMMNodeImpl parentNode = null;
- if (0 < fNodeStack.size()) {
- tagNode = (TagNode) fNodeStack.peek();
- parentNode = tagNode.node;
- }
-
- CSSMMNodeImpl node = null;
- if (qName.equals(ProfileKeywords.PROFILE_IMPORT)) { // import
- String profileName = attributes.getValue(ATTR_NAME_REFERENCE);
- importProfile(profileName);
- }
- else if (isDefinition(qName)) { // node creation
- String nodeName = attributes.getValue(ATTR_NAME_DEFINITION);
- node = fNodePool.getNode(qName, nodeName);
- if (node != null) {
- String overwrite = attributes.getValue(ATTR_OVERWRITE);
- if (overwrite == null || overwrite.equals(ATTR_VALUE_OVERWRITE_FALSE)) {
- node.removeAllChildNodes();
- }
- Map attrMap = new HashMap();
- for (int i = 0; i < attributes.getLength(); i++) {
- attrMap.put(attributes.getQName(i), attributes.getValue(i));
- }
- try {
- node.initializeAttribute(attrMap);
- }
- catch (IllegalArgumentException e) {
- Logger.logException(e);
- }
- }
- }
- else if (node == null) { // node reference
- String nodeName = attributes.getValue(ATTR_NAME_REFERENCE);
- node = fNodePool.getNode(qName, nodeName);
- }
-
- if (node != null) {
- if (parentNode != null && parentNode.canContain(node)) {
- String enabled = attributes.getValue(ATTR_ENABLED);
- if (enabled != null && enabled.equals(ATTR_VALUE_ENABLED_FALSE)) {
- parentNode.removeChild(node);
- }
- else {
- parentNode.appendChild(node);
- }
- }
- else if (node.getType() == CSSMMNode.TYPE_STYLE_SHEET || node.getType() == CSSMMNode.TYPE_CATEGORY) {
- fMetaModel.appendChild(node);
- }
- else {
- if (fLogging && parentNode != null) {
- Logger.log(Logger.ERROR, parentNode.getType() + " cannot contain " + //$NON-NLS-1$
- node.getType() + " (" + qName + ")"); //$NON-NLS-2$//$NON-NLS-1$
- }
- }
- }
-
- fNodeStack.push(new TagNode(qName, (node != null) ? node : parentNode));
- }
-
- public void endElement(String uri, String localName, String qName) throws SAXException {
- fNodeStack.pop();
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- TagNode tagNode = (TagNode) fNodeStack.peek();
- String tagName = tagNode.tag;
- if (tagName.equals(ProfileKeywords.KEYWORD_VALUE) || tagName.equals(ProfileKeywords.UNIT_VALUE) || tagName.equals(ProfileKeywords.FUNCTION_VALUE) || tagName.equals(ProfileKeywords.SELECTOR_VALUE) || tagName.equals(ProfileKeywords.DESCRIPTION) || tagName.equals(ProfileKeywords.CAPTION)) {
- StringBuffer buf = new StringBuffer(length);
- for (int i = 0; i < length; i++) {
- buf.append(ch[start + i]);
- }
- String value = getResourceString(buf.toString().trim());
- CSSMMNodeImpl node = tagNode.node;
- if (node != null) {
- if (node.getType() == CSSMMNode.TYPE_KEYWORD && tagName.equals(ProfileKeywords.KEYWORD_VALUE)) {
- ((CSSMMKeywordImpl) node).setKeywordString(value);
- }
- else if (node.getType() == CSSMMNode.TYPE_UNIT && tagName.equals(ProfileKeywords.UNIT_VALUE)) {
- ((CSSMMUnitImpl) node).setUnitString(value);
- }
- else if (node.getType() == CSSMMNode.TYPE_FUNCTION && tagName.equals(ProfileKeywords.FUNCTION_VALUE)) {
- ((CSSMMFunctionImpl) node).setFunctionString(value);
- }
- else if (node.getType() == CSSMMNode.TYPE_SELECTOR && ((CSSMMSelector) node).getSelectorType() == CSSMMSelector.TYPE_PSEUDO_ELEMENT) {
- ((CSSMMPseudoElementImpl) node).setSelectorString(value);
- }
- else if (node.getType() == CSSMMNode.TYPE_SELECTOR && ((CSSMMSelector) node).getSelectorType() == CSSMMSelector.TYPE_PSEUDO_CLASS) {
- ((CSSMMPseudoClassImpl) node).setSelectorString(value);
- }
- else if (node.getType() == CSSMMNode.TYPE_CATEGORY && tagName.equals(ProfileKeywords.CAPTION)) {
- ((CSSMMCategoryImpl) node).setCaption(value);
- }
- else if (tagName.equals(ProfileKeywords.DESCRIPTION)) {
- node.setDescription(value);
- }
- }
- }
- }
-
- private boolean isDefinition(String tagName) {
- return (tagName.equals(ProfileKeywords.STYLESHEET_DEF) || tagName.equals(ProfileKeywords.CHARSET_RULE_DEF) || tagName.equals(ProfileKeywords.IMPORT_RULE_DEF) || tagName.equals(ProfileKeywords.PAGE_RULE_DEF) || tagName.equals(ProfileKeywords.MEDIA_RULE_DEF) || tagName.equals(ProfileKeywords.FONTFACE_RULE_DEF) || tagName.equals(ProfileKeywords.STYLE_RULE_DEF) || tagName.equals(ProfileKeywords.KEYWORD_DEF) || tagName.equals(ProfileKeywords.NUMBER_DEF) || tagName.equals(ProfileKeywords.PROPERTY_DEF) || tagName.equals(ProfileKeywords.DESCRIPTOR_DEF) || tagName.equals(ProfileKeywords.CONTAINER_DEF) || tagName.equals(ProfileKeywords.UNIT_DEF) || tagName.equals(ProfileKeywords.FUNCTION_DEF) || tagName.equals(ProfileKeywords.STRING) || tagName.equals(ProfileKeywords.CATEGORY_DEF) || tagName.equals(ProfileKeywords.PSEUDO_CLASS_DEF) || tagName.equals(ProfileKeywords.PSEUDO_ELEMENT_DEF) || tagName.equals(ProfileKeywords.SELECTOR_EXPRESSION) || tagName.equals(ProfileKeywords.SEPARATOR));
- }
-
- private void importProfile(String profileName) {
- URL profileURL = null;
- CSSProfileRegistry reg = CSSProfileRegistry.getInstance();
- CSSProfile profile = reg.getProfile(profileName);
- if (profile != null) {
- // first: find URL by ID
- profileURL = profile.getProfileURL();
- }
- else {
- // second: find URL by filename of profile URL
- Iterator i = reg.getProfiles();
- while (i.hasNext()) {
- profile = (CSSProfile) i.next();
- URL url = profile.getProfileURL();
- if (url.getFile().endsWith(profileName)) {
- profileURL = url;
- break;
- }
- }
- }
- if (profileURL == null) {
- // final: it may be url itself
- try {
- profileURL = new URL(profileName);
- }
- catch (MalformedURLException e) {
- Logger.logException(e);
- }
- }
- if (profileURL != null) {
- try {
- ProfileLoader.loadProfile(fMetaModel, profileURL.openStream(), fResourceBundle, fLogging);
- }
- catch (IOException e) {
- Logger.logException("Cannot open stream for profile", //$NON-NLS-1$
- e);
- }
- }
- }
-
- class TagNode {
-
- String tag = null;
- CSSMMNodeImpl node = null;
-
- TagNode(String tag, CSSMMNodeImpl node) {
- this.tag = tag;
- this.node = node;
- }
- }
-
- class ErrorCorrector {
-
- void doCorrect(CSSMMNodeImpl node) {
- Iterator i = node.getChildNodes();
- while (i.hasNext()) {
- CSSMMNodeImpl child = (CSSMMNodeImpl) i.next();
- doCorrect(child);
- short error = child.getError();
- if (error != MetaModelErrors.NO_ERROR) {
- node.removeChild(child);
-
- String str = "[CSSProfile Error] " + node.getName(); //$NON-NLS-1$
- str += "(" + node.getType() + ") contains error node: "; //$NON-NLS-1$ //$NON-NLS-2$
- str += child.getName() + "(" + child.getType() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- str += " - error code = " + error; //$NON-NLS-1$
- if (fLogging) {
- Logger.log(Logger.ERROR, str);
- // System.out.println(str);
- }
- }
- }
- }
- }
-
-
- private CSSMetaModelImpl fMetaModel = null;
- private NodePool fNodePool = null;
- private Stack fNodeStack = new Stack();
- private boolean fLogging = false;
- private ResourceBundle fResourceBundle = null;
-
- private final static String ATTR_NAME_DEFINITION = "name"; //$NON-NLS-1$
- private final static String ATTR_NAME_REFERENCE = "name"; //$NON-NLS-1$
- private final static String ATTR_OVERWRITE = "overwrite"; //$NON-NLS-1$
- private final static String ATTR_ENABLED = "enabled"; //$NON-NLS-1$
- private final static String ATTR_VALUE_OVERWRITE_FALSE = "false"; //$NON-NLS-1$
- private final static String ATTR_VALUE_ENABLED_FALSE = "false"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileKeywords.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileKeywords.java
deleted file mode 100644
index 47f8dee96e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileKeywords.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.css.core.internal.metamodel;
-
-interface ProfileKeywords {
-
- final static String CSS_PROFILE = "css-profile"; //$NON-NLS-1$
- final static String PROFILE_IMPORT = "profile-import"; //$NON-NLS-1$
- final static String STYLESHEET_DEF = "stylesheet-def"; //$NON-NLS-1$
- final static String CHARSET_RULE = "charset-rule"; //$NON-NLS-1$
- final static String IMPORT_RULE = "import-rule"; //$NON-NLS-1$
- final static String PAGE_RULE = "page-rule"; //$NON-NLS-1$
- final static String MEDIA_RULE = "media-rule"; //$NON-NLS-1$
- final static String FONTFACE_RULE = "fontface-rule"; //$NON-NLS-1$
- final static String STYLE_RULE = "style-rule"; //$NON-NLS-1$
- final static String CHARSET_RULE_DEF = "charset-rule-def"; //$NON-NLS-1$
- final static String IMPORT_RULE_DEF = "import-rule-def"; //$NON-NLS-1$
- final static String PAGE_RULE_DEF = "page-rule-def"; //$NON-NLS-1$
- final static String MEDIA_RULE_DEF = "media-rule-def"; //$NON-NLS-1$
- final static String FONTFACE_RULE_DEF = "fontface-rule-def"; //$NON-NLS-1$
- final static String STYLE_RULE_DEF = "style-rule-def"; //$NON-NLS-1$
- final static String FUNCTION_DEF = "function-def"; //$NON-NLS-1$
- final static String FUNCTION_VALUE = "function-value"; //$NON-NLS-1$
- final static String KEYWORD_DEF = "keyword-def"; //$NON-NLS-1$
- final static String KEYWORD_VALUE = "keyword-value"; //$NON-NLS-1$
- final static String DESCRIPTION = "description"; //$NON-NLS-1$
- final static String NUMBER_DEF = "number-def"; //$NON-NLS-1$
- final static String UNIT = "unit"; //$NON-NLS-1$
- final static String UNIT_DEF = "unit-def"; //$NON-NLS-1$
- final static String UNIT_VALUE = "unit-value"; //$NON-NLS-1$
- final static String CONTAINER_DEF = "container-def"; //$NON-NLS-1$
- final static String CATEGORY_DEF = "category-def"; //$NON-NLS-1$
- final static String CAPTION = "caption"; //$NON-NLS-1$
- final static String PROPERTY_DEF = "property-def"; //$NON-NLS-1$
- final static String DESCRIPTOR_DEF = "descriptor-def"; //$NON-NLS-1$
- final static String SELECTOR_EXPRESSION = "selector-expression"; //$NON-NLS-1$
- final static String PSEUDO_CLASS = "pseudo-class"; //$NON-NLS-1$
- final static String PSEUDO_ELEMENT = "pseudo-element"; //$NON-NLS-1$
- final static String PSEUDO_CLASS_DEF = "pseudo-class-def"; //$NON-NLS-1$
- final static String PSEUDO_ELEMENT_DEF = "pseudo-element-def"; //$NON-NLS-1$
- final static String SELECTOR_VALUE = "selector-value"; //$NON-NLS-1$
- final static String NUMBER = "number"; //$NON-NLS-1$
- final static String KEYWORD = "keyword"; //$NON-NLS-1$
- final static String FUNCTION = "function"; //$NON-NLS-1$
- final static String CONTAINER = "container"; //$NON-NLS-1$
- final static String STRING = "string"; //$NON-NLS-1$
- final static String SEPARATOR = "separator"; //$NON-NLS-1$
- final static String PROPERTY = "property"; //$NON-NLS-1$
- final static String DESCRIPTOR = "descriptor"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileLoader.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileLoader.java
deleted file mode 100644
index e1b5315376..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ProfileLoader.java
+++ /dev/null
@@ -1,72 +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.css.core.internal.metamodel;
-
-
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ResourceBundle;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.metamodel.CSSMetaModel;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-
-
-class ProfileLoader {
-
-
- /**
- * Constructor for ProfileLoader.
- */
- private ProfileLoader() {
- super();
- }
-
- ProfileLoader(ResourceBundle resourceBundle, boolean logging) {
- super();
- fResourceBundle = resourceBundle;
- fLogging = logging;
- }
-
- static void loadProfile(CSSMetaModelImpl metamodel, InputStream input, ResourceBundle resourceBundle, boolean logging) {
- try {
- XMLReader xmlReader = XMLReaderUtil.createXMLReader(PARSER_NAME);
- // XMLReaderFactory.createXMLReader(PARSER_NAME);
- xmlReader.setContentHandler(new ProfileHandler(metamodel, resourceBundle, logging));
- xmlReader.parse(new InputSource(input));
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- catch (SAXException e) {
- Logger.logException(e);
- }
- }
-
- CSSMetaModel loadProfile(InputStream input) {
- if (fMetaModel == null) {
- fMetaModel = new CSSMetaModelImpl();
- }
- loadProfile(fMetaModel, input, fResourceBundle, fLogging);
- fMetaModel.loadCompleted();
- return fMetaModel;
- }
-
-
- CSSMetaModelImpl fMetaModel = null;
- private final static String PARSER_NAME = "org.apache.xerces.parsers.SAXParser"; //$NON-NLS-1$
- private ResourceBundle fResourceBundle = null;
- private boolean fLogging = false;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/RegistryReader.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/RegistryReader.java
deleted file mode 100644
index 489b288f37..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/RegistryReader.java
+++ /dev/null
@@ -1,112 +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.css.core.internal.metamodel;
-
-
-
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.metamodel.CSSProfile;
-import org.osgi.framework.Bundle;
-
-
-
-public class RegistryReader {
-
- //
- private String PLUGIN_ID = "org.eclipse.wst.sse.core"; //$NON-NLS-1$
- private String EXTENSION_POINT_ID = "cssprofile"; //$NON-NLS-1$
- private String TAG_NAME = "profile"; //$NON-NLS-1$
- private String ATT_ID = "id"; //$NON-NLS-1$
- private String ATT_NAME = "name"; //$NON-NLS-1$
- private String ATT_URI = "uri"; //$NON-NLS-1$
- private String ATT_DEFAULT = "default"; //$NON-NLS-1$
- private String ATT_LOGGING = "logging"; // Hidden Option //$NON-NLS-1$
-
- /**
- * Constructor for CSSMetaModelRegistryReader.
- */
- public RegistryReader() {
- super();
- }
-
- /**
- *
- */
- protected CSSProfile readElement(IConfigurationElement element) {
- CSSProfileImpl info = null;
- if (element.getName().equals(TAG_NAME)) {
- String strID = element.getAttribute(ATT_ID);
- String strNAME = element.getAttribute(ATT_NAME);
- String strURI = element.getAttribute(ATT_URI);
-
- if (strID != null || strURI != null) {
- Bundle bundle = null;
- String pluginId = element.getDeclaringExtension().getNamespace();
- bundle = Platform.getBundle(pluginId);
- if (bundle != null) {
- Path path = new Path(strURI);
- URL url = Platform.find(bundle, path);
- if (url != null) {
- try {
- url = Platform.asLocalURL(url);
- info = new CSSProfileImpl(strID, url);
- info.setProfileName(strNAME);
- info.setDefault((element.getAttribute(ATT_DEFAULT) != null));
- info.setLogging((element.getAttribute(ATT_LOGGING) != null));
- info.setOwnerPluginID(pluginId);
- }
- catch (java.io.IOException e) {
- // through
- }
- }
- }
- }
-
- if (info == null) {
- Logger.log(Logger.ERROR, "Error reading CSS Profile: " + strID); //$NON-NLS-1$
- }
- }
- return info;
- }
-
- /**
- * We simply require an 'add' method, of what ever it is we are to read
- * into
- */
- public Iterator enumProfiles() {
- Set set = new HashSet();
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint point = registry.getExtensionPoint(PLUGIN_ID, EXTENSION_POINT_ID);
- if (point != null) {
- IConfigurationElement[] elements = point.getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- CSSProfile info = readElement(elements[i]);
- // null can be returned if there's an error reading the
- // element
- if (info != null) {
- set.add(info);
- }
- }
- }
- return set.iterator();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ValueCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ValueCollector.java
deleted file mode 100644
index e92f3993fd..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/ValueCollector.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.css.core.internal.metamodel;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelTraverser;
-
-
-
-class ValueCollector extends CSSMetaModelTraverser {
- public void begin(CSSMMNode node) {
- fNodes = new ArrayList();
- }
-
- protected short preNode(CSSMMNode node) {
- short rc = TRAV_CONT;
- if (node != null) {
- String type = node.getType();
- if (type == CSSMMNode.TYPE_PROPERTY || type == CSSMMNode.TYPE_DESCRIPTOR || type == CSSMMNode.TYPE_CONTAINER) {
- rc = TRAV_CONT;
- }
- else {
- if (!fNodes.contains(node)) {
- fNodes.add(node);
- rc = TRAV_PRUNE;
- }
- }
- }
- return rc;
- }
-
- public Iterator getNodes() {
- return fNodes.iterator();
- }
-
-
- private List fNodes = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/XMLReaderUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/XMLReaderUtil.java
deleted file mode 100644
index a22aa7cfd9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/XMLReaderUtil.java
+++ /dev/null
@@ -1,38 +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.css.core.internal.metamodel;
-
-
-
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-
-class XMLReaderUtil {
-
- static public XMLReader createXMLReader(String className) throws SAXException {
- try {
- return SAXParserFactory.newInstance().newSAXParser().getXMLReader();
- }
- catch (ParserConfigurationException e) {
- Logger.logException(e);
- }
- catch (FactoryConfigurationError e) {
- Logger.logException(e);
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSRegionUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSRegionUtil.java
deleted file mode 100644
index ace7fa6f6f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSRegionUtil.java
+++ /dev/null
@@ -1,51 +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.css.core.internal.parser;
-
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-
-
-public class CSSRegionUtil {
-
- /**
- */
- public static boolean isDeclarationValueType(String type) {
- return (type == CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION || type == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION || type == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH || type == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || type == CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT || type == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR || type == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE || type == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE || type == CSSRegionContexts.CSS_DECLARATION_VALUE_S || type == CSSRegionContexts.CSS_DECLARATION_VALUE_STRING || type == CSSRegionContexts.CSS_DECLARATION_VALUE_UNICODE_RANGE || type == CSSRegionContexts.CSS_DECLARATION_VALUE_URI);
- }
-
- /**
- * these type can be beggining of selector
- */
- public static boolean isSelectorBegginingType(String type) {
- return (type == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || type == CSSRegionContexts.CSS_SELECTOR_UNIVERSAL || type == CSSRegionContexts.CSS_SELECTOR_PSEUDO || type == CSSRegionContexts.CSS_SELECTOR_CLASS || type == CSSRegionContexts.CSS_SELECTOR_ID || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START);
- }
-
-
- /**
- *
- * @param type
- * @return
- */
- public static boolean isDeclarationType(String type) {
- return (type == CSSRegionContexts.CSS_DECLARATION_PROPERTY || type == CSSRegionContexts.CSS_DECLARATION_SEPARATOR || isDeclarationValueType(type) || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER);
- }
-
- /**
- * These types consist selector region
- *
- * @param type
- * @return
- */
- public static boolean isSelectorType(String type) {
- return (type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_OPERATOR || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE || type == CSSRegionContexts.CSS_SELECTOR_CLASS || type == CSSRegionContexts.CSS_SELECTOR_COMBINATOR || type == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || type == CSSRegionContexts.CSS_SELECTOR_ID || type == CSSRegionContexts.CSS_SELECTOR_PSEUDO || type == CSSRegionContexts.CSS_SELECTOR_SEPARATOR || type == CSSRegionContexts.CSS_SELECTOR_UNIVERSAL);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSSourceParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSSourceParser.java
deleted file mode 100644
index 1d1337f5f2..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSSourceParser.java
+++ /dev/null
@@ -1,284 +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.css.core.internal.parser;
-
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.sse.core.parser.RegionParser;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.core.util.Debug;
-
-
-public class CSSSourceParser implements RegionParser {
- public static final int MODE_STYLESHEET = 0;
- public static final int MODE_DECLARATION = 1;
- public static final int MODE_DECLARATION_VALUE = 2;
-
- private long fStartTime;
- private long fStopTime;
- private CSSTokenizer fTokenizer;
-
- public void setParserMode(int mode) {
- int initialState;
- int bufsize;
- switch (mode) {
- case MODE_STYLESHEET :
- initialState = CSSTokenizer.YYINITIAL;
- bufsize = CSSTokenizer.BUFFER_SIZE_NORMAL;
- break;
- case MODE_DECLARATION :
- initialState = CSSTokenizer.ST_DECLARATION;
- bufsize = CSSTokenizer.BUFFER_SIZE_NORMAL;
- break;
- case MODE_DECLARATION_VALUE :
- initialState = CSSTokenizer.ST_DECLARATION_PRE_VALUE;
- bufsize = CSSTokenizer.BUFFER_SIZE_SMALL;
- break;
- default :
- return;
- }
- if (0 < initialState) {
- CSSTokenizer tokenizer = getTokenizer();
- tokenizer.setInitialState(initialState);
- tokenizer.setInitialBufferSize(bufsize);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.parser.RegionParser#getNodes()
- */
- public IStructuredDocumentRegion getDocumentRegions() {
- IStructuredDocumentRegion headnode = null;
- if (headnode == null) {
- if (Debug.perfTest) {
- fStartTime = System.currentTimeMillis();
- }
- headnode = parseNodes();
- if (Debug.perfTest) {
- fStopTime = System.currentTimeMillis();
- System.out.println(" -- creating nodes of IStructuredDocument -- "); //$NON-NLS-1$
- System.out.println(" Time parse and init all regions: " + (fStopTime - fStartTime) + " (msecs)"); //$NON-NLS-2$//$NON-NLS-1$
- // System.out.println(" for " + fRegions.size() + "
- // Regions");//$NON-NLS-2$//$NON-NLS-1$
- System.out.println(" and " + _countNodes(headnode) + " Nodes"); //$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return headnode;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.parser.RegionParser#getRegions()
- */
- public List getRegions() {
- IStructuredDocumentRegion headNode = null;
- if (!getTokenizer().isEOF()) {
- headNode = getDocumentRegions();
- // throw new IllegalStateException("parsing has not finished");
- }
- // for memory recovery, we assume if someone
- // requests all regions, we can reset our big
- // memory consuming objects
- // but the new "getRegions" method is then more expensive.
- // I don't think its used much, though.
- List localRegionsList = getRegions(headNode);
- primReset();
- return localRegionsList;
- }
-
- /**
- * Method getRegions.
- *
- * @param headNode
- * @return List
- */
- protected List getRegions(IStructuredDocumentRegion headNode) {
- List allRegions = new ArrayList();
- IStructuredDocumentRegion currentNode = headNode;
- while (currentNode != null) {
- ITextRegionList nodeRegions = currentNode.getRegions();
- for (int i = 0; i < nodeRegions.size(); i++) {
- allRegions.add(nodeRegions.get(i));
- }
- currentNode = currentNode.getNext();
- }
- return allRegions;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.parser.RegionParser#reset(java.io.Reader)
- */
- public void reset(Reader reader) {
- primReset();
- getTokenizer().reset(reader, 0);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.parser.RegionParser#reset(java.io.Reader, int)
- */
- public void reset(Reader reader, int offset) {
- reset(reader);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.parser.RegionParser#reset(java.lang.String)
- */
- public void reset(String input) {
- reset(new StringReader(input));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.parser.RegionParser#reset(java.lang.String, int)
- */
- public void reset(String input, int offset) {
- reset(input);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.parser.RegionParser#newInstance()
- */
- public RegionParser newInstance() {
- return new CSSSourceParser();
- }
-
- private IStructuredDocumentRegion parseNodes() {
- // regions are initially reported as complete offsets within the
- // scanned input
- // they are adjusted here to be indexes from the currentNode's start
- // offset
- IStructuredDocumentRegion headNode = null;
- IStructuredDocumentRegion lastNode = null;
- ITextRegion region = null;
- IStructuredDocumentRegion currentNode = null;
- String type = null;
- String currentRegionType = null;
-
- while ((region = getNextRegion()) != null) {
- type = region.getType();
- if (mustBeStart(type, currentRegionType) && currentNode != null) {
- currentNode.setEnded(true);
- }
-
- if ((currentNode != null && currentNode.isEnded()) || currentNode == null) {
- if (currentNode != null && !currentNode.isEnded()) {
- currentNode.setEnded(true);
- }
- lastNode = currentNode;
- currentNode = createStructuredDocumentRegion(type);
- currentRegionType = type;
- if (lastNode != null) {
- lastNode.setNext(currentNode);
- }
- currentNode.setPrevious(lastNode);
- currentNode.setStart(region.getStart());
- }
-
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
-
- if (mustBeEnd(type)) {
- currentNode.setEnded(true);
- }
-
- if (headNode == null && currentNode != null) {
- headNode = currentNode;
- }
- }
-
- if (currentNode != null && !currentNode.isEnded()) {
- currentNode.setEnded(true);
- }
-
- primReset();
- return headNode;
- }
-
- private IStructuredDocumentRegion createStructuredDocumentRegion(String type) {
- return CSSStructuredDocumentRegionFactory.createRegion(type);
- }
-
- private boolean mustBeStart(String type, String docRegionType) {
- return ((type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_LBRACE || type == CSSRegionContexts.CSS_RBRACE || type == CSSRegionContexts.CSS_IMPORT || type == CSSRegionContexts.CSS_PAGE || type == CSSRegionContexts.CSS_MEDIA || type == CSSRegionContexts.CSS_FONT_FACE || type == CSSRegionContexts.CSS_CHARSET || type == CSSRegionContexts.CSS_ATKEYWORD || type == CSSRegionContexts.CSS_DECLARATION_PROPERTY || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) || (docRegionType == CSSRegionContexts.CSS_DECLARATION_PROPERTY && type == CSSRegionContexts.CSS_S) || (!CSSRegionUtil.isSelectorBegginingType(docRegionType) && (type == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || type == CSSRegionContexts.CSS_SELECTOR_UNIVERSAL || type == CSSRegionContexts.CSS_SELECTOR_PSEUDO || type == CSSRegionContexts.CSS_SELECTOR_CLASS || type == CSSRegionContexts.CSS_SELECTOR_ID || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START)));
- }
-
- private boolean mustBeEnd(String type) {
- return (type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_LBRACE || type == CSSRegionContexts.CSS_RBRACE || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER);
- }
-
- private ITextRegion getNextRegion() {
- ITextRegion region = null;
- try {
- region = getTokenizer().getNextToken();
- // DMW: 2/12/03 Removed state
- // if (region != null) {
- // fRegions.add(region);
- // }
- return region;
- }
- catch (StackOverflowError e) {
- Logger.logException(getClass().getName() + ": input could not be parsed correctly at position " + getTokenizer().getOffset(), e); //$NON-NLS-1$
- throw e;
- }
- catch (Exception e) {
- Logger.logException(getClass().getName() + ": input could not be parsed correctly at position " + getTokenizer().getOffset() + " (" + e.getLocalizedMessage() + ")", e); //$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- }
- return null;
- }
-
- private void primReset() {
-
- getTokenizer().reset(new char[0]);
- }
-
- private CSSTokenizer getTokenizer() {
- if (fTokenizer == null) {
- fTokenizer = new CSSTokenizer();
- }
- return fTokenizer;
- }
-
-
- /**
- * This is a simple utility to count nodes. Used only for debug
- * statements.
- */
- private int _countNodes(IStructuredDocumentRegion nodes) {
- int result = 0;
- IStructuredDocumentRegion countNode = nodes;
- while (countNode != null) {
- result++;
- countNode = countNode.getNext();
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSStructuredDocumentRegionFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSStructuredDocumentRegionFactory.java
deleted file mode 100644
index cd90d9f724..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSStructuredDocumentRegionFactory.java
+++ /dev/null
@@ -1,27 +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.css.core.internal.parser;
-
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-public class CSSStructuredDocumentRegionFactory {
- public static IStructuredDocumentRegion createRegion(String type) {
- IStructuredDocumentRegion instance = null;
- if (type != null) {
- instance = new BasicStructuredDocumentRegion();
- }
- else {
-
- }
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSTokenizer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSTokenizer.java
deleted file mode 100644
index b5318f3e72..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSTokenizer.java
+++ /dev/null
@@ -1,1220 +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 code was generated by JFlex 1.2.2 on 04/10/01 22:53 */
-
-/*nlsXXX*/
-package org.eclipse.wst.css.core.internal.parser;
-
-import java.io.CharArrayReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.parser.regions.CSSTextRegionFactory;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-
-/**
- * This class is a scanner generated by <a
- * href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex </a> 1.2.2
- */
-public class CSSTokenizer implements CSSRegionContexts {
-
- /** this character denotes the end of file */
- final public static int YYEOF = -1;
-
- /** lexical states */
- final public static int ST_SELECTOR_ATTRIBUTE_NAME = 11;
- final public static int ST_IMPORT_DELIMITER = 5;
- final public static int ST_DECLARATION_PRE_VALUE = 17;
- final public static int ST_SELECTOR = 0;
- final public static int ST_CHARSET_DELIMITER = 2;
- final public static int ST_DECLARATION_VALUE = 18;
- final public static int ST_PAGE_PSEUDO_PAGE = 8;
- final public static int ST_IMPORT_URI = 3;
- final public static int ST_SELECTOR_ATTRIBUTE_END = 14;
- final public static int ST_SELECTOR_ATTRIBUTE_OPERATOR = 12;
- final public static int ST_DECLARATION = 15;
- final public static int ST_PAGE_DELIMITER = 9;
- final public static int ST_SELECTOR_ATTRIBUTE_VALUE = 13;
- final public static int ST_MEDIA_MEDIUM = 6;
- final public static int ST_CHARSET_NAME = 1;
- final public static int ST_IMPORT_MEDIUM = 4;
- final public static int ST_DECLARATION_SEPARATOR = 16;
- final public static int ST_FONT_FACE_DELIMITER = 9;
- final public static int ST_MEDIA_DELIMITER = 7;
- final public static int ST_SELECTOR_MODIFIER = 10;
- final public static int YYINITIAL = 0;
-
- /**
- * Translates characters to character classes
- */
- final private static String yycmap_packed = "\11\0\1\11\1\17\1\0\1\4\1\20\22\0\1\6\1\31\1\10" + "\1\22\1\16\1\72\1\16\1\5\1\26\1\12\1\35\1\14\1\55" + "\1\13\1\15\1\34\12\1\1\62\1\50\1\30\1\67\1\32\1\21" + "\1\36\1\43\1\27\1\40\1\57\1\46\1\64\1\61\1\41\1\51" + "\2\2\1\25\1\52\1\65\1\54\1\53\1\2\1\24\1\44\1\47" + "\1\23\5\2\1\66\1\3\1\71\1\16\1\2\1\16\1\42\1\7" + "\1\37\1\56\1\45\1\63\1\61\1\41\1\51\2\2\1\25\1\52" + "\1\65\1\54\1\53\1\2\1\24\1\44\1\47\1\23\5\2\1\60" + "\1\70\1\33\1\70\1\0\uff80\2";
-
- /**
- * Translates characters to character classes
- */
- final private static char[] yycmap = yy_unpack_cmap(yycmap_packed);
-
- /**
- * Translates a state to a row index in the transition table
- */
- final private static int yy_rowMap[] = {0, 59, 118, 177, 236, 295, 354, 413, 472, 531, 590, 649, 708, 767, 826, 885, 944, 1003, 1062, 1121, 1180, 1239, 1298, 1357, 1416, 1475, 1534, 1121, 1593, 1121, 1652, 1711, 1121, 1770, 1829, 1888, 1121, 1947, 2006, 2065, 2124, 2183, 2242, 1121, 2301, 2360, 2419, 1121, 1121, 2478, 2537, 2596, 1121, 2655, 2714, 1121, 1121, 2773, 2832, 2891, 1121, 2950, 1121, 3009, 3068, 3127, 3186, 3245, 3304, 3363, 3422, 1121, 1121, 3481, 3540, 3599, 3658, 3717, 1121, 3776, 3835, 3894, 3953, 4012, 4071, 1593, 1121, 4130, 1239, 4189, 4248, 1416, 4307, 1475, 4366, 4425, 4484, 4543, 4602, 4661, 4720, 4779, 4838, 4897, 1770, 4956, 1121, 1829, 5015, 5074, 1947, 5133, 1121, 2006, 5192, 5251, 2183, 5310, 5369, 2360, 5428, 5487, 2537, 5546, 5605, 1121, 2714, 2832, 5664, 5723, 3068, 5782, 3127, 5841, 1121, 3186, 5900, 5959, 3363, 6018, 6077, 6136, 6195, 3894, 1121, 3599, 1121, 6254, 3658, 6313, 1121, 3717, 6372, 6431, 6490, 6549, 3953, 6608, 6667, 6726, 4071, 6785,
- 1121, 4130, 6844, 1121, 6903, 6962, 7021, 7080, 7139, 7198, 7257, 7316, 7375, 7434, 7493, 7552, 1770, 7611, 7670, 1829, 7729, 7788, 1947, 7847, 7906, 2006, 7965, 8024, 8083, 8142, 8201, 8260, 8319, 8378, 3127, 8437, 8496, 3186, 8555, 8614, 8673, 8732, 8791, 3658, 8850, 8909, 3717, 8968, 9027, 9086, 9145, 9204, 9263, 9322, 9381, 1121, 1121, 9440, 9499, 9558, 9617, 9676, 9735, 9794, 9853, 9912, 9971, 10030, 10089, 10148, 10207, 10266, 10325, 10384, 10443, 10502, 10561, 10620, 10679, 10738, 10797, 10856, 10915, 10974, 11033, 11092, 11151, 11210, 11269, 11328, 11387, 11446, 11505, 1121, 11564, 11623, 1121, 11682, 11741, 11800, 11859, 11918, 11977, 12036, 12095, 12154, 12213, 1121, 12272, 12331, 12390, 12449, 12508, 12567, 12626, 12685, 12744, 12803, 12862, 12921, 12980, 13039, 13098, 13157, 13216, 11092, 13275, 13334, 1121, 13393, 13452, 13511, 13570, 13629, 13688, 1121, 13747, 13806, 13865, 13924, 13983, 14042, 14101, 14160, 14219, 12036, 14278, 14337, 14396, 14455,
- 14514, 14573, 14632, 14691, 14750, 14809, 14868, 14927, 14986, 15045, 15104, 15163, 15222, 15281, 15340, 13157, 15399, 15458, 15517, 15576, 15635, 15694, 15753, 1121, 15812, 15871, 15930, 15989, 16048, 16107, 16166, 16225, 16284, 16343, 16402, 16461, 16520, 16579, 16638, 16697, 16756, 16815, 16874, 16933, 16992, 17051, 17110, 17169, 17228, 17287, 17346, 17405, 17464, 17523, 17582, 17641, 17700, 17759, 17818, 17877, 17936, 17995, 18054, 1121, 18113, 18172, 18231, 18290, 18349, 18408, 18467, 18526, 18585, 12154, 18644, 12213, 18703, 18762, 18821, 18880, 18939, 18998, 19057, 19116, 19175, 19234, 13275, 19293, 13334, 19352, 19411, 19470, 19529, 19588, 19647, 19706, 19765, 19824, 19883, 19942, 1121, 20001, 20060, 20119, 20178, 1121, 20237, 20296, 20355, 1121, 20414, 20473, 20532, 20591, 20650, 20709, 20768, 20827, 20886, 20945};
-
- /**
- * The packed transition table of the DFA
- */
- final private static String yy_packed = "\2\24\1\25\1\26\1\27\1\24\1\27\1\25\1\24" + "\1\27\1\24\1\30\1\24\1\31\1\24\2\27\1\24" + "\1\32\3\25\1\24\1\25\1\33\2\24\1\34\1\35" + "\1\36\1\37\11\25\1\24\4\25\1\24\2\25\1\24" + "\1\25\1\40\3\25\1\41\10\24\1\27\1\42\1\27" + "\1\24\1\43\1\27\1\24\1\44\3\24\2\27\7\24" + "\1\33\2\24\1\34\1\35\1\24\1\37\40\24\1\27" + "\1\24\1\27\2\24\1\27\1\24\1\44\3\24\2\27" + "\7\24\1\33\2\24\1\34\1\35\1\24\1\37\11\24" + "\1\45\26\24\1\27\1\46\1\27\1\24\1\47\1\27" + "\1\24\1\44\3\24\2\27\2\24\1\50\4\24\1\33" + "\2\24\1\34\1\35\1\24\1\37\11\24\1\45\24\24" + "\1\51\1\52\1\27\1\24\1\27\1\51\1\24\1\27" + "\1\24\1\53\3\24\2\27\2\24\3\51\1\24\1\51" + "\1\33\2\24\1\34\1\35\1\24\1\37\11\51\1\45" + "\4\51\1\24\2\51\1\24\1\51\1\24\3\51\11\24" + "\1\27\1\24\1\27\2\24\1\27\1\24\1\44\3\24" + "\2\27\7\24\1\33\2\24\1\34\1\35\1\24\1\37" + "\11\24\1\45\4\24\1\54\17\24\1\55\1\56\1\27" + "\1\24\1\27\1\55\1\24\1\27\1\24\1\57\3\24" + "\2\27\2\24\3\55\1\24\1\55\1\33\2\24\1\34"
- + "\1\35\1\24\1\37\11\55\1\24\4\55\1\24\2\55" + "\1\24\1\55\1\24\3\55\11\24\1\27\1\24\1\27" + "\2\24\1\27\1\24\1\44\3\24\2\27\7\24\1\33" + "\2\24\1\34\1\35\1\24\1\37\16\24\1\60\2\24" + "\1\61\14\24\1\62\1\63\1\27\1\24\1\27\1\62" + "\1\24\1\27\1\24\1\64\3\24\2\27\2\24\3\62" + "\1\24\1\62\1\33\2\24\1\34\1\35\1\24\1\37" + "\11\62\1\24\4\62\1\24\2\62\1\65\1\62\1\66" + "\3\62\11\24\1\27\1\24\1\27\2\24\1\27\1\24" + "\1\44\3\24\2\27\7\24\1\33\2\24\1\34\1\35" + "\1\24\1\37\21\24\1\65\16\24\1\67\1\24\1\67" + "\2\24\1\67\1\24\1\44\1\70\1\31\1\24\2\67" + "\1\24\1\32\5\24\1\33\1\24\1\70\1\34\1\35" + "\1\36\1\37\16\24\1\71\2\24\1\65\1\24\1\40" + "\3\24\1\41\6\24\1\72\1\73\1\27\1\24\1\27" + "\1\72\1\24\1\27\1\24\1\74\3\24\2\27\2\24" + "\3\72\1\24\1\72\1\33\2\24\1\34\1\35\1\24" + "\1\37\11\72\1\24\4\72\1\24\2\72\1\24\1\72" + "\1\24\3\72\11\24\1\27\1\24\1\27\2\24\1\27" + "\1\24\1\44\3\24\2\27\7\24\1\33\2\24\1\34" + "\1\35\1\24\1\37\30\24\1\75\1\76\1\77\3\24"
- + "\1\100\1\101\1\27\1\102\1\27\1\100\1\103\1\27" + "\1\24\1\104\3\24\2\27\2\24\3\100\1\24\1\100" + "\1\33\2\24\1\34\1\35\1\24\1\37\11\100\1\24" + "\4\100\1\24\2\100\1\24\1\100\1\24\3\100\11\24" + "\1\27\1\24\1\27\2\24\1\27\1\24\1\44\3\24" + "\2\27\7\24\1\33\2\24\1\34\1\35\1\24\1\37" + "\32\24\1\77\3\24\1\105\1\106\1\27\1\24\1\27" + "\1\105\1\24\1\27\1\24\1\107\3\24\2\27\2\24" + "\3\105\1\24\1\105\1\33\2\24\1\34\1\35\1\24" + "\1\37\11\105\1\110\4\105\1\24\2\105\1\24\1\105" + "\1\24\3\105\11\24\1\27\1\24\1\27\2\24\1\27" + "\1\24\1\44\3\24\2\27\7\24\1\33\2\24\1\34" + "\1\35\1\24\1\37\11\24\1\110\11\24\1\111\11\24" + "\1\112\1\113\1\114\1\27\1\115\1\27\1\113\1\116" + "\1\27\1\117\1\120\1\121\1\122\1\24\2\27\1\24" + "\1\123\1\124\2\113\1\24\1\113\1\33\1\125\1\24" + "\1\34\1\126\1\24\1\37\11\113\1\110\4\113\1\127" + "\2\113\1\24\1\113\1\24\3\113\6\24\1\112\1\113" + "\1\114\1\130\1\115\1\130\1\113\1\116\1\130\1\117" + "\1\120\1\121\1\122\1\24\2\130\1\24\1\123\1\124"
- + "\2\113\1\24\1\113\1\33\1\125\1\24\1\34\1\126" + "\1\24\1\37\11\113\1\110\4\113\1\127\2\113\1\24" + "\1\113\1\24\3\113\5\24\74\0\2\25\1\131\3\0" + "\1\25\3\0\1\25\7\0\3\25\1\0\1\25\7\0" + "\11\25\1\0\4\25\1\0\2\25\1\0\1\25\1\0" + "\3\25\6\0\1\132\2\25\1\0\2\25\1\132\1\25" + "\1\0\5\25\2\0\16\25\1\132\2\25\1\132\2\25" + "\1\132\10\25\1\132\4\25\1\132\7\25\4\0\1\27" + "\1\0\1\27\2\0\1\27\5\0\2\27\53\0\2\25" + "\1\131\3\0\1\25\3\0\1\133\7\0\3\25\1\0" + "\1\25\7\0\11\25\1\0\4\25\1\0\2\25\1\0" + "\1\25\1\0\3\25\6\0\2\134\1\135\3\0\1\134" + "\3\0\1\134\7\0\3\134\1\0\1\134\7\0\11\134" + "\1\0\4\134\1\0\2\134\1\0\1\134\1\0\3\134" + "\6\0\2\136\1\137\3\0\1\136\3\0\1\136\7\0" + "\3\136\1\0\1\136\7\0\11\136\1\0\4\136\1\0" + "\2\136\1\0\1\136\1\0\3\136\36\0\1\140\76\0" + "\1\141\74\0\2\142\10\0\1\143\1\144\1\145\7\0" + "\2\146\10\0\1\147\1\150\3\0\1\147\3\0\1\147" + "\7\0\3\147\1\0\1\147\7\0\11\147\1\0\4\147" + "\1\0\2\147\1\0\1\147\1\0\3\147\6\0\2\151"
- + "\1\152\1\0\1\153\11\151\2\0\52\151\1\0\2\154" + "\1\155\1\0\3\154\1\153\6\154\2\0\52\154\13\0" + "\1\156\60\0\2\157\1\160\1\0\1\161\11\157\2\0" + "\52\157\1\0\2\162\1\163\1\0\3\162\1\161\6\162" + "\2\0\52\162\24\0\1\164\47\0\2\51\1\165\3\0" + "\1\51\3\0\1\51\7\0\3\51\1\0\1\51\7\0" + "\11\51\1\0\4\51\1\0\2\51\1\0\1\51\1\0" + "\3\51\6\0\1\166\2\51\1\0\2\51\1\166\1\51" + "\1\0\5\51\2\0\16\51\1\166\2\51\1\166\2\51" + "\1\166\10\51\1\166\4\51\1\166\7\51\1\0\2\51" + "\1\165\3\0\1\51\3\0\1\167\7\0\3\51\1\0" + "\1\51\7\0\11\51\1\0\4\51\1\0\2\51\1\0" + "\1\51\1\0\3\51\6\0\2\55\1\170\3\0\1\55" + "\3\0\1\55\7\0\3\55\1\0\1\55\7\0\11\55" + "\1\0\4\55\1\0\2\55\1\0\1\55\1\0\3\55" + "\6\0\1\171\2\55\1\0\2\55\1\171\1\55\1\0" + "\5\55\2\0\16\55\1\171\2\55\1\171\2\55\1\171" + "\10\55\1\171\4\55\1\171\7\55\1\0\2\55\1\170" + "\3\0\1\55\3\0\1\172\7\0\3\55\1\0\1\55" + "\7\0\11\55\1\0\4\55\1\0\2\55\1\0\1\55" + "\1\0\3\55\6\0\2\62\1\173\3\0\1\62\3\0"
- + "\1\62\7\0\3\62\1\0\1\62\7\0\11\62\1\0" + "\4\62\1\0\2\62\1\0\1\62\1\0\3\62\6\0" + "\1\174\2\62\1\0\2\62\1\174\1\62\1\0\5\62" + "\2\0\16\62\1\174\2\62\1\174\2\62\1\174\10\62" + "\1\174\4\62\1\174\7\62\1\0\2\62\1\173\3\0" + "\1\62\3\0\1\175\7\0\3\62\1\0\1\62\7\0" + "\11\62\1\0\4\62\1\0\2\62\1\0\1\62\1\0" + "\3\62\7\0\1\62\1\173\3\0\1\62\3\0\1\62" + "\7\0\3\62\1\0\1\62\7\0\11\62\1\0\4\62" + "\1\0\2\62\1\0\1\62\1\0\3\62\5\0\4\176" + "\1\177\1\176\1\177\2\176\1\177\2\176\1\0\2\176" + "\2\177\11\176\1\0\25\176\1\0\12\176\1\0\2\72" + "\1\200\3\0\1\72\3\0\1\72\7\0\3\72\1\0" + "\1\72\7\0\11\72\1\0\4\72\1\0\2\72\1\0" + "\1\72\1\0\3\72\6\0\1\201\2\72\1\0\2\72" + "\1\201\1\72\1\0\5\72\2\0\16\72\1\201\2\72" + "\1\201\2\72\1\201\10\72\1\201\4\72\1\201\7\72" + "\1\0\2\72\1\200\3\0\1\72\3\0\1\202\7\0" + "\3\72\1\0\1\72\7\0\11\72\1\0\4\72\1\0" + "\2\72\1\0\1\72\1\0\3\72\74\0\1\75\4\0" + "\2\100\1\203\3\0\1\100\3\0\1\100\7\0\3\100" + "\1\0\1\100\7\0\11\100\1\0\4\100\1\0\2\100"
- + "\1\0\1\100\1\0\3\100\6\0\1\204\2\100\1\0" + "\2\100\1\204\1\100\1\0\5\100\2\0\16\100\1\204" + "\2\100\1\204\2\100\1\204\10\100\1\204\4\100\1\204" + "\7\100\1\0\2\205\1\206\1\0\1\207\11\205\2\0" + "\52\205\1\0\2\210\1\211\1\0\3\210\1\207\6\210" + "\2\0\52\210\1\0\2\100\1\203\3\0\1\100\3\0" + "\1\212\7\0\3\100\1\0\1\100\7\0\11\100\1\0" + "\4\100\1\0\2\100\1\0\1\100\1\0\3\100\6\0" + "\2\105\1\213\3\0\1\105\3\0\1\105\7\0\3\105" + "\1\0\1\105\7\0\11\105\1\0\4\105\1\0\2\105" + "\1\0\1\105\1\0\3\105\6\0\1\214\2\105\1\0" + "\2\105\1\214\1\105\1\0\5\105\2\0\16\105\1\214" + "\2\105\1\214\2\105\1\214\10\105\1\214\4\105\1\214" + "\7\105\1\0\2\105\1\213\3\0\1\105\3\0\1\215" + "\7\0\3\105\1\0\1\105\7\0\11\105\1\0\4\105" + "\1\0\2\105\1\0\1\105\1\0\3\105\6\0\1\112" + "\1\216\1\217\3\0\1\216\3\0\1\216\1\0\1\220" + "\5\0\3\216\1\0\1\216\7\0\11\216\1\0\4\216" + "\1\0\2\216\1\0\1\216\1\0\3\216\4\0\1\221" + "\1\0\2\113\1\222\3\0\1\113\3\0\1\113\7\0"
- + "\3\113\1\223\1\113\7\0\11\113\1\0\4\113\1\0" + "\2\113\1\0\1\113\1\0\3\113\6\0\1\224\2\113" + "\1\0\2\113\1\224\1\113\1\0\5\113\2\0\16\113" + "\1\224\2\113\1\224\2\113\1\224\10\113\1\224\4\113" + "\1\224\7\113\1\0\2\225\1\226\1\0\1\227\11\225" + "\2\0\52\225\1\0\2\230\1\231\1\0\3\230\1\227" + "\6\230\2\0\52\230\1\0\1\232\1\113\1\222\3\0" + "\1\113\3\0\1\233\1\0\1\220\5\0\3\113\1\223" + "\1\113\7\0\11\113\1\0\4\113\1\0\2\113\1\0" + "\1\113\1\0\3\113\6\0\1\112\13\0\1\220\56\0" + "\1\234\72\0\2\235\1\236\3\0\1\235\3\0\1\235" + "\7\0\3\235\1\0\1\235\7\0\11\235\1\0\4\235" + "\1\0\2\235\1\0\1\235\1\0\3\235\6\0\2\113" + "\1\222\3\0\1\113\3\0\1\113\1\237\6\0\1\113" + "\1\240\1\113\1\223\1\113\7\0\11\113\1\0\4\113" + "\1\0\2\113\1\0\1\113\1\0\3\113\11\0\1\241" + "\1\0\1\241\2\0\1\241\5\0\2\241\30\0\1\242" + "\21\0\4\243\1\244\1\243\1\244\2\243\1\244\5\243" + "\2\244\12\243\1\0\14\243\1\0\22\243\1\0\1\245" + "\1\25\1\131\1\25\1\0\1\25\1\245\1\0\1\25"
- + "\1\0\1\25\3\0\2\25\2\0\3\25\1\0\1\25" + "\7\0\1\245\2\25\1\245\2\25\1\245\2\25\1\0" + "\4\25\1\0\1\245\1\25\1\0\1\25\1\0\1\245" + "\2\25\6\0\2\25\1\131\3\0\1\25\3\0\1\25" + "\7\0\3\25\1\0\1\25\2\0\1\246\4\0\11\25" + "\1\0\4\25\1\0\2\25\1\0\1\25\1\0\3\25" + "\6\0\1\247\2\134\1\0\2\134\1\247\1\134\1\0" + "\5\134\2\0\16\134\1\247\2\134\1\247\2\134\1\247" + "\10\134\1\247\4\134\1\247\7\134\1\0\1\250\2\136" + "\1\0\2\136\1\250\1\136\1\0\5\136\2\0\16\136" + "\1\250\2\136\1\250\2\136\1\250\10\136\1\250\4\136" + "\1\250\7\136\13\0\1\251\57\0\35\141\1\252\35\141" + "\41\0\1\253\103\0\1\254\65\0\2\255\66\0\2\256" + "\103\0\1\257\17\0\2\147\1\150\3\0\1\147\3\0" + "\1\147\7\0\3\147\1\260\1\147\7\0\11\147\1\0" + "\4\147\1\0\2\147\1\0\1\147\1\0\3\147\6\0" + "\1\261\2\147\1\0\2\147\1\261\1\147\1\0\5\147" + "\2\0\16\147\1\261\2\147\1\261\2\147\1\261\10\147" + "\1\261\4\147\1\261\7\147\1\0\1\262\1\151\1\152" + "\1\151\1\263\1\151\1\262\10\151\1\264\16\151\1\262"
- + "\2\151\1\262\2\151\1\262\10\151\1\262\4\151\1\262" + "\7\151\1\0\1\265\1\154\1\155\3\154\1\265\1\266" + "\7\154\1\267\16\154\1\265\2\154\1\265\2\154\1\265" + "\10\154\1\265\4\154\1\265\7\154\32\0\1\246\41\0" + "\1\270\1\157\1\160\1\157\1\271\1\157\1\270\10\157" + "\1\272\16\157\1\270\2\157\1\270\2\157\1\270\10\157" + "\1\270\4\157\1\270\7\157\1\0\1\273\1\162\1\163" + "\3\162\1\273\1\274\7\162\1\275\16\162\1\273\2\162" + "\1\273\2\162\1\273\10\162\1\273\4\162\1\273\7\162" + "\25\0\1\276\46\0\1\277\1\51\1\165\1\51\1\0" + "\1\51\1\277\1\0\1\51\1\0\1\51\3\0\2\51" + "\2\0\3\51\1\0\1\51\7\0\1\277\2\51\1\277" + "\2\51\1\277\2\51\1\0\4\51\1\0\1\277\1\51" + "\1\0\1\51\1\0\1\277\2\51\6\0\2\51\1\165" + "\3\0\1\51\3\0\1\51\7\0\3\51\1\0\1\51" + "\2\0\1\246\4\0\11\51\1\0\4\51\1\0\2\51" + "\1\0\1\51\1\0\3\51\6\0\1\300\1\55\1\170" + "\1\55\1\0\1\55\1\300\1\0\1\55\1\0\1\55" + "\3\0\2\55\2\0\3\55\1\0\1\55\7\0\1\300" + "\2\55\1\300\2\55\1\300\2\55\1\0\4\55\1\0"
- + "\1\300\1\55\1\0\1\55\1\0\1\300\2\55\6\0" + "\2\55\1\170\3\0\1\55\3\0\1\55\7\0\3\55" + "\1\0\1\55\2\0\1\246\4\0\11\55\1\0\4\55" + "\1\0\2\55\1\0\1\55\1\0\3\55\6\0\1\301" + "\1\62\1\173\1\62\1\0\1\62\1\301\1\0\1\62" + "\1\0\1\62\3\0\2\62\2\0\3\62\1\0\1\62" + "\7\0\1\301\2\62\1\301\2\62\1\301\2\62\1\0" + "\4\62\1\0\1\301\1\62\1\0\1\62\1\0\1\301" + "\2\62\6\0\2\62\1\173\3\0\1\62\3\0\1\62" + "\7\0\3\62\1\0\1\62\2\0\1\246\4\0\11\62" + "\1\0\4\62\1\0\2\62\1\0\1\62\1\0\3\62" + "\6\0\1\302\1\72\1\200\1\72\1\0\1\72\1\302" + "\1\0\1\72\1\0\1\72\3\0\2\72\2\0\3\72" + "\1\0\1\72\7\0\1\302\2\72\1\302\2\72\1\302" + "\2\72\1\0\4\72\1\0\1\302\1\72\1\0\1\72" + "\1\0\1\302\2\72\6\0\2\72\1\200\3\0\1\72" + "\3\0\1\72\7\0\3\72\1\0\1\72\2\0\1\246" + "\4\0\11\72\1\0\4\72\1\0\2\72\1\0\1\72" + "\1\0\3\72\6\0\1\303\1\100\1\203\1\100\1\0" + "\1\100\1\303\1\0\1\100\1\0\1\100\3\0\2\100" + "\2\0\3\100\1\0\1\100\7\0\1\303\2\100\1\303" + "\2\100\1\303\2\100\1\0\4\100\1\0\1\303\1\100"
- + "\1\0\1\100\1\0\1\303\2\100\6\0\1\304\1\205" + "\1\206\1\205\1\305\1\205\1\304\10\205\1\306\16\205" + "\1\304\2\205\1\304\2\205\1\304\10\205\1\304\4\205" + "\1\304\7\205\1\0\1\307\1\210\1\211\3\210\1\307" + "\1\310\7\210\1\311\16\210\1\307\2\210\1\307\2\210" + "\1\307\10\210\1\307\4\210\1\307\7\210\1\0\2\100" + "\1\203\3\0\1\100\3\0\1\100\7\0\3\100\1\0" + "\1\100\2\0\1\246\4\0\11\100\1\0\4\100\1\0" + "\2\100\1\0\1\100\1\0\3\100\6\0\1\312\1\105" + "\1\213\1\105\1\0\1\105\1\312\1\0\1\105\1\0" + "\1\105\3\0\2\105\2\0\3\105\1\0\1\105\7\0" + "\1\312\2\105\1\312\2\105\1\312\2\105\1\0\4\105" + "\1\0\1\312\1\105\1\0\1\105\1\0\1\312\2\105" + "\6\0\2\105\1\213\3\0\1\105\3\0\1\105\7\0" + "\3\105\1\0\1\105\2\0\1\246\4\0\11\105\1\0" + "\4\105\1\0\2\105\1\0\1\105\1\0\3\105\6\0" + "\2\216\1\217\3\0\1\216\3\0\1\216\7\0\3\216" + "\1\0\1\216\7\0\11\216\1\0\4\216\1\0\2\216" + "\1\0\1\216\1\0\3\216\6\0\1\313\2\216\1\0" + "\2\216\1\313\1\216\1\0\5\216\2\0\16\216\1\313"
- + "\2\216\1\313\2\216\1\313\10\216\1\313\4\216\1\313" + "\7\216\1\0\1\314\1\113\1\222\1\113\1\0\1\113" + "\1\314\1\0\1\113\1\0\1\113\3\0\2\113\2\0" + "\3\113\1\223\1\113\7\0\1\314\2\113\1\314\2\113" + "\1\314\2\113\1\0\4\113\1\0\1\314\1\113\1\0" + "\1\113\1\0\1\314\2\113\6\0\1\315\1\225\1\226" + "\1\225\1\316\1\225\1\315\10\225\1\317\16\225\1\315" + "\2\225\1\315\2\225\1\315\10\225\1\315\4\225\1\315" + "\7\225\1\0\1\320\1\230\1\231\3\230\1\320\1\321" + "\7\230\1\322\16\230\1\320\2\230\1\320\2\230\1\320" + "\10\230\1\320\4\230\1\320\7\230\1\0\1\232\1\113" + "\1\222\3\0\1\113\3\0\1\113\1\0\1\220\5\0" + "\3\113\1\223\1\113\7\0\11\113\1\0\4\113\1\0" + "\2\113\1\0\1\113\1\0\3\113\4\0\1\221\1\0" + "\2\113\1\222\3\0\1\113\3\0\1\113\7\0\3\113" + "\1\223\1\113\2\0\1\246\4\0\11\113\1\0\4\113" + "\1\0\2\113\1\0\1\113\1\0\3\113\6\0\1\234" + "\1\216\1\217\3\0\1\216\3\0\1\216\7\0\3\216" + "\1\0\1\216\7\0\11\216\1\0\4\216\1\0\2\216" + "\1\0\1\216\1\0\3\216\4\0\1\221\1\0\1\323"
- + "\2\235\1\0\2\235\1\323\1\235\1\0\5\235\2\0" + "\16\235\1\323\2\235\1\323\2\235\1\323\10\235\1\323" + "\4\235\1\323\7\235\1\0\1\324\5\0\1\324\11\0" + "\1\324\5\0\1\324\7\0\2\324\1\0\2\324\1\0" + "\2\324\7\0\2\324\3\0\2\324\7\0\2\113\1\222" + "\3\0\1\113\3\0\1\113\7\0\2\113\1\325\1\223" + "\1\113\7\0\11\113\1\0\4\113\1\0\2\113\1\0" + "\1\113\1\0\3\113\57\0\1\326\21\0\1\327\1\25" + "\1\131\1\25\1\0\1\25\1\327\1\0\1\25\1\0" + "\1\25\3\0\2\25\2\0\3\25\1\0\1\25\7\0" + "\1\327\2\25\1\327\2\25\1\327\2\25\1\0\4\25" + "\1\0\1\327\1\25\1\0\1\25\1\0\1\327\2\25" + "\6\0\1\330\1\134\1\135\1\134\1\0\1\134\1\330" + "\1\0\1\134\1\0\1\134\3\0\2\134\2\0\3\134" + "\1\0\1\134\7\0\1\330\2\134\1\330\2\134\1\330" + "\2\134\1\0\4\134\1\0\1\330\1\134\1\0\1\134" + "\1\0\1\330\2\134\6\0\1\331\1\136\1\137\1\136" + "\1\0\1\136\1\331\1\0\1\136\1\0\1\136\3\0" + "\2\136\2\0\3\136\1\0\1\136\7\0\1\331\2\136" + "\1\331\2\136\1\331\2\136\1\0\4\136\1\0\1\331"
- + "\1\136\1\0\1\136\1\0\1\331\2\136\20\0\1\332" + "\57\0\34\141\1\333\1\252\35\141\42\0\2\334\102\0" + "\1\335\75\0\2\336\74\0\1\337\76\0\1\340\7\0" + "\1\341\1\342\1\260\1\0\1\260\1\341\1\0\1\260" + "\1\0\1\341\3\0\2\260\2\0\3\341\1\0\1\341" + "\7\0\11\341\1\0\4\341\1\0\2\341\1\0\1\341" + "\1\0\3\341\6\0\1\343\1\147\1\150\1\147\1\0" + "\1\147\1\343\1\0\1\147\1\0\1\147\3\0\2\147" + "\2\0\3\147\1\260\1\147\7\0\1\343\2\147\1\343" + "\2\147\1\343\2\147\1\0\4\147\1\0\1\343\1\147" + "\1\0\1\147\1\0\1\343\2\147\6\0\1\344\1\151" + "\1\152\1\151\1\153\1\151\1\344\27\151\1\344\2\151" + "\1\344\2\151\1\344\10\151\1\344\4\151\1\344\7\151" + "\1\0\2\151\1\152\1\0\1\153\12\151\1\0\52\151" + "\1\0\1\345\1\154\1\155\3\154\1\345\1\153\26\154" + "\1\345\2\154\1\345\2\154\1\345\10\154\1\345\4\154" + "\1\345\7\154\1\0\2\154\1\155\1\0\3\154\1\153" + "\7\154\1\0\52\154\1\0\1\346\1\157\1\160\1\157" + "\1\161\1\157\1\346\27\157\1\346\2\157\1\346\2\157"
- + "\1\346\10\157\1\346\4\157\1\346\7\157\1\0\2\157" + "\1\160\1\0\1\161\12\157\1\0\52\157\1\0\1\347" + "\1\162\1\163\3\162\1\347\1\161\26\162\1\347\2\162" + "\1\347\2\162\1\347\10\162\1\347\4\162\1\347\7\162" + "\1\0\2\162\1\163\1\0\3\162\1\161\7\162\1\0" + "\52\162\26\0\1\350\45\0\1\351\1\51\1\165\1\51" + "\1\0\1\51\1\351\1\0\1\51\1\0\1\51\3\0" + "\2\51\2\0\3\51\1\0\1\51\7\0\1\351\2\51" + "\1\351\2\51\1\351\2\51\1\0\4\51\1\0\1\351" + "\1\51\1\0\1\51\1\0\1\351\2\51\6\0\1\352" + "\1\55\1\170\1\55\1\0\1\55\1\352\1\0\1\55" + "\1\0\1\55\3\0\2\55\2\0\3\55\1\0\1\55" + "\7\0\1\352\2\55\1\352\2\55\1\352\2\55\1\0" + "\4\55\1\0\1\352\1\55\1\0\1\55\1\0\1\352" + "\2\55\6\0\1\353\1\62\1\173\1\62\1\0\1\62" + "\1\353\1\0\1\62\1\0\1\62\3\0\2\62\2\0" + "\3\62\1\0\1\62\7\0\1\353\2\62\1\353\2\62" + "\1\353\2\62\1\0\4\62\1\0\1\353\1\62\1\0" + "\1\62\1\0\1\353\2\62\6\0\1\354\1\72\1\200" + "\1\72\1\0\1\72\1\354\1\0\1\72\1\0\1\72" + "\3\0\2\72\2\0\3\72\1\0\1\72\7\0\1\354"
- + "\2\72\1\354\2\72\1\354\2\72\1\0\4\72\1\0" + "\1\354\1\72\1\0\1\72\1\0\1\354\2\72\6\0" + "\1\355\1\100\1\203\1\100\1\0\1\100\1\355\1\0" + "\1\100\1\0\1\100\3\0\2\100\2\0\3\100\1\0" + "\1\100\7\0\1\355\2\100\1\355\2\100\1\355\2\100" + "\1\0\4\100\1\0\1\355\1\100\1\0\1\100\1\0" + "\1\355\2\100\6\0\1\356\1\205\1\206\1\205\1\207" + "\1\205\1\356\27\205\1\356\2\205\1\356\2\205\1\356" + "\10\205\1\356\4\205\1\356\7\205\1\0\2\205\1\206" + "\1\0\1\207\12\205\1\0\52\205\1\0\1\357\1\210" + "\1\211\3\210\1\357\1\207\26\210\1\357\2\210\1\357" + "\2\210\1\357\10\210\1\357\4\210\1\357\7\210\1\0" + "\2\210\1\211\1\0\3\210\1\207\7\210\1\0\52\210" + "\1\0\1\360\1\105\1\213\1\105\1\0\1\105\1\360" + "\1\0\1\105\1\0\1\105\3\0\2\105\2\0\3\105" + "\1\0\1\105\7\0\1\360\2\105\1\360\2\105\1\360" + "\2\105\1\0\4\105\1\0\1\360\1\105\1\0\1\105" + "\1\0\1\360\2\105\6\0\1\361\1\216\1\217\1\216" + "\1\0\1\216\1\361\1\0\1\216\1\0\1\216\3\0" + "\2\216\2\0\3\216\1\0\1\216\7\0\1\361\2\216"
- + "\1\361\2\216\1\361\2\216\1\0\4\216\1\0\1\361" + "\1\216\1\0\1\216\1\0\1\361\2\216\6\0\1\362" + "\1\113\1\222\1\113\1\0\1\113\1\362\1\0\1\113" + "\1\0\1\113\3\0\2\113\2\0\3\113\1\223\1\113" + "\7\0\1\362\2\113\1\362\2\113\1\362\2\113\1\0" + "\4\113\1\0\1\362\1\113\1\0\1\113\1\0\1\362" + "\2\113\6\0\1\363\1\225\1\226\1\225\1\227\1\225" + "\1\363\27\225\1\363\2\225\1\363\2\225\1\363\10\225" + "\1\363\4\225\1\363\7\225\1\0\2\225\1\226\1\0" + "\1\227\12\225\1\0\52\225\1\0\1\364\1\230\1\231" + "\3\230\1\364\1\227\26\230\1\364\2\230\1\364\2\230" + "\1\364\10\230\1\364\4\230\1\364\7\230\1\0\2\230" + "\1\231\1\0\3\230\1\227\7\230\1\0\52\230\1\0" + "\1\365\1\235\1\236\1\235\1\0\1\235\1\365\1\0" + "\1\235\1\0\1\235\3\0\2\235\2\0\3\235\1\0" + "\1\235\7\0\1\365\2\235\1\365\2\235\1\365\2\235" + "\1\0\4\235\1\0\1\365\1\235\1\0\1\235\1\0" + "\1\365\2\235\6\0\1\366\5\0\1\366\3\0\1\367" + "\5\0\1\366\5\0\1\366\7\0\2\366\1\0\2\366" + "\1\0\2\366\7\0\2\366\3\0\2\366\7\0\2\113"
- + "\1\222\3\0\1\113\3\0\1\113\7\0\3\113\1\370" + "\1\113\7\0\11\113\1\0\4\113\1\0\2\113\1\0" + "\1\113\1\0\3\113\60\0\1\371\20\0\1\372\1\25" + "\1\131\1\25\1\0\1\25\1\372\1\0\1\25\1\0" + "\1\25\3\0\2\25\2\0\3\25\1\0\1\25\7\0" + "\1\372\2\25\1\372\2\25\1\372\2\25\1\0\4\25" + "\1\0\1\372\1\25\1\0\1\25\1\0\1\372\2\25" + "\6\0\1\373\1\134\1\135\1\134\1\0\1\134\1\373" + "\1\0\1\134\1\0\1\134\3\0\2\134\2\0\3\134" + "\1\0\1\134\7\0\1\373\2\134\1\373\2\134\1\373" + "\2\134\1\0\4\134\1\0\1\373\1\134\1\0\1\134" + "\1\0\1\373\2\134\6\0\1\374\1\136\1\137\1\136" + "\1\0\1\136\1\374\1\0\1\136\1\0\1\136\3\0" + "\2\136\2\0\3\136\1\0\1\136\7\0\1\374\2\136" + "\1\374\2\136\1\374\2\136\1\0\4\136\1\0\1\374" + "\1\136\1\0\1\136\1\0\1\374\2\136\31\0\1\375" + "\122\0\1\376\67\0\1\377\66\0\2\u0100\73\0\1\u0101" + "\24\0\2\341\1\342\1\u0102\1\0\1\u0102\1\341\1\0" + "\1\u0102\1\u0103\1\341\3\0\2\u0102\2\0\3\341\1\0" + "\1\341\7\0\11\341\1\0\4\341\1\0\2\341\1\0"
- + "\1\341\1\0\3\341\6\0\1\u0104\2\341\1\0\2\341" + "\1\u0104\1\341\1\0\5\341\2\0\16\341\1\u0104\2\341" + "\1\u0104\2\341\1\u0104\10\341\1\u0104\4\341\1\u0104\7\341" + "\1\0\1\u0105\1\147\1\150\1\147\1\0\1\147\1\u0105" + "\1\0\1\147\1\0\1\147\3\0\2\147\2\0\3\147" + "\1\260\1\147\7\0\1\u0105\2\147\1\u0105\2\147\1\u0105" + "\2\147\1\0\4\147\1\0\1\u0105\1\147\1\0\1\147" + "\1\0\1\u0105\2\147\6\0\1\u0106\1\151\1\152\1\151" + "\1\153\1\151\1\u0106\27\151\1\u0106\2\151\1\u0106\2\151" + "\1\u0106\10\151\1\u0106\4\151\1\u0106\7\151\1\0\1\u0107" + "\1\154\1\155\3\154\1\u0107\1\153\26\154\1\u0107\2\154" + "\1\u0107\2\154\1\u0107\10\154\1\u0107\4\154\1\u0107\7\154" + "\1\0\1\u0108\1\157\1\160\1\157\1\161\1\157\1\u0108" + "\27\157\1\u0108\2\157\1\u0108\2\157\1\u0108\10\157\1\u0108" + "\4\157\1\u0108\7\157\1\0\1\u0109\1\162\1\163\3\162" + "\1\u0109\1\161\26\162\1\u0109\2\162\1\u0109\2\162\1\u0109" + "\10\162\1\u0109\4\162\1\u0109\7\162\1\0\2\u010a\1\u010b"
- + "\1\350\1\u010c\1\350\1\u010a\1\u010d\1\350\1\u010e\4\u010a" + "\2\350\5\u010a\1\0\44\u010a\1\0\1\u010f\1\51\1\165" + "\1\51\1\0\1\51\1\u010f\1\0\1\51\1\0\1\51" + "\3\0\2\51\2\0\3\51\1\0\1\51\7\0\1\u010f" + "\2\51\1\u010f\2\51\1\u010f\2\51\1\0\4\51\1\0" + "\1\u010f\1\51\1\0\1\51\1\0\1\u010f\2\51\6\0" + "\1\u0110\1\55\1\170\1\55\1\0\1\55\1\u0110\1\0" + "\1\55\1\0\1\55\3\0\2\55\2\0\3\55\1\0" + "\1\55\7\0\1\u0110\2\55\1\u0110\2\55\1\u0110\2\55" + "\1\0\4\55\1\0\1\u0110\1\55\1\0\1\55\1\0" + "\1\u0110\2\55\6\0\1\u0111\1\62\1\173\1\62\1\0" + "\1\62\1\u0111\1\0\1\62\1\0\1\62\3\0\2\62" + "\2\0\3\62\1\0\1\62\7\0\1\u0111\2\62\1\u0111" + "\2\62\1\u0111\2\62\1\0\4\62\1\0\1\u0111\1\62" + "\1\0\1\62\1\0\1\u0111\2\62\6\0\1\u0112\1\72" + "\1\200\1\72\1\0\1\72\1\u0112\1\0\1\72\1\0" + "\1\72\3\0\2\72\2\0\3\72\1\0\1\72\7\0" + "\1\u0112\2\72\1\u0112\2\72\1\u0112\2\72\1\0\4\72" + "\1\0\1\u0112\1\72\1\0\1\72\1\0\1\u0112\2\72" + "\6\0\1\u0113\1\100\1\203\1\100\1\0\1\100\1\u0113"
- + "\1\0\1\100\1\0\1\100\3\0\2\100\2\0\3\100" + "\1\0\1\100\7\0\1\u0113\2\100\1\u0113\2\100\1\u0113" + "\2\100\1\0\4\100\1\0\1\u0113\1\100\1\0\1\100" + "\1\0\1\u0113\2\100\6\0\1\u0114\1\205\1\206\1\205" + "\1\207\1\205\1\u0114\27\205\1\u0114\2\205\1\u0114\2\205" + "\1\u0114\10\205\1\u0114\4\205\1\u0114\7\205\1\0\1\u0115" + "\1\210\1\211\3\210\1\u0115\1\207\26\210\1\u0115\2\210" + "\1\u0115\2\210\1\u0115\10\210\1\u0115\4\210\1\u0115\7\210" + "\1\0\1\u0116\1\105\1\213\1\105\1\0\1\105\1\u0116" + "\1\0\1\105\1\0\1\105\3\0\2\105\2\0\3\105" + "\1\0\1\105\7\0\1\u0116\2\105\1\u0116\2\105\1\u0116" + "\2\105\1\0\4\105\1\0\1\u0116\1\105\1\0\1\105" + "\1\0\1\u0116\2\105\6\0\1\u0117\1\216\1\217\1\216" + "\1\0\1\216\1\u0117\1\0\1\216\1\0\1\216\3\0" + "\2\216\2\0\3\216\1\0\1\216\7\0\1\u0117\2\216" + "\1\u0117\2\216\1\u0117\2\216\1\0\4\216\1\0\1\u0117" + "\1\216\1\0\1\216\1\0\1\u0117\2\216\6\0\1\u0118" + "\1\113\1\222\1\113\1\0\1\113\1\u0118\1\0\1\113"
- + "\1\0\1\113\3\0\2\113\2\0\3\113\1\223\1\113" + "\7\0\1\u0118\2\113\1\u0118\2\113\1\u0118\2\113\1\0" + "\4\113\1\0\1\u0118\1\113\1\0\1\113\1\0\1\u0118" + "\2\113\6\0\1\u0119\1\225\1\226\1\225\1\227\1\225" + "\1\u0119\27\225\1\u0119\2\225\1\u0119\2\225\1\u0119\10\225" + "\1\u0119\4\225\1\u0119\7\225\1\0\1\u011a\1\230\1\231" + "\3\230\1\u011a\1\227\26\230\1\u011a\2\230\1\u011a\2\230" + "\1\u011a\10\230\1\u011a\4\230\1\u011a\7\230\1\0\1\u011b" + "\1\235\1\236\1\235\1\0\1\235\1\u011b\1\0\1\235" + "\1\0\1\235\3\0\2\235\2\0\3\235\1\0\1\235" + "\7\0\1\u011b\2\235\1\u011b\2\235\1\u011b\2\235\1\0" + "\4\235\1\0\1\u011b\1\235\1\0\1\235\1\0\1\u011b" + "\2\235\6\0\1\u011c\5\0\1\u011c\3\0\1\367\5\0" + "\1\u011c\5\0\1\u011c\7\0\2\u011c\1\0\2\u011c\1\0" + "\2\u011c\7\0\2\u011c\3\0\2\u011c\7\0\1\u011d\5\0" + "\1\u011d\11\0\1\u011d\5\0\1\u011d\7\0\2\u011d\1\0" + "\2\u011d\1\0\2\u011d\7\0\2\u011d\3\0\2\u011d\7\0" + "\2\u011e\1\u011f\1\u0120\1\u0121\1\u0120\1\u011e\1\u0122\1\u0120"
- + "\1\u0123\4\u011e\2\u0120\5\u011e\1\0\44\u011e\54\0\1\u0124" + "\17\0\1\u0125\1\25\1\131\1\25\1\0\1\25\1\u0125" + "\1\0\1\25\1\0\1\25\3\0\2\25\2\0\3\25" + "\1\0\1\25\7\0\1\u0125\2\25\1\u0125\2\25\1\u0125" + "\2\25\1\0\4\25\1\0\1\u0125\1\25\1\0\1\25" + "\1\0\1\u0125\2\25\6\0\1\u0126\1\134\1\135\1\134" + "\1\0\1\134\1\u0126\1\0\1\134\1\0\1\134\3\0" + "\2\134\2\0\3\134\1\0\1\134\7\0\1\u0126\2\134" + "\1\u0126\2\134\1\u0126\2\134\1\0\4\134\1\0\1\u0126" + "\1\134\1\0\1\134\1\0\1\u0126\2\134\6\0\1\u0127" + "\1\136\1\137\1\136\1\0\1\136\1\u0127\1\0\1\136" + "\1\0\1\136\3\0\2\136\2\0\3\136\1\0\1\136" + "\7\0\1\u0127\2\136\1\u0127\2\136\1\u0127\2\136\1\0" + "\4\136\1\0\1\u0127\1\136\1\0\1\136\1\0\1\u0127" + "\2\136\51\0\1\u0128\52\0\1\u0129\110\0\2\u012a\42\0" + "\1\u012b\63\0\1\u0102\1\0\1\u0102\2\0\1\u0102\1\u0103" + "\4\0\2\u0102\53\0\1\u012c\1\341\1\342\1\341\1\0" + "\1\341\1\u012c\1\0\1\341\1\u0103\1\341\3\0\2\341" + "\2\0\3\341\1\0\1\341\7\0\1\u012c\2\341\1\u012c"
- + "\2\341\1\u012c\2\341\1\0\4\341\1\0\1\u012c\1\341" + "\1\0\1\341\1\0\1\u012c\2\341\6\0\1\u012d\1\147" + "\1\150\1\147\1\0\1\147\1\u012d\1\0\1\147\1\0" + "\1\147\3\0\2\147\2\0\3\147\1\260\1\147\7\0" + "\1\u012d\2\147\1\u012d\2\147\1\u012d\2\147\1\0\4\147" + "\1\0\1\u012d\1\147\1\0\1\147\1\0\1\u012d\2\147" + "\6\0\1\u012e\1\151\1\152\1\151\1\153\1\151\1\u012e" + "\27\151\1\u012e\2\151\1\u012e\2\151\1\u012e\10\151\1\u012e" + "\4\151\1\u012e\7\151\1\0\1\u012f\1\154\1\155\3\154" + "\1\u012f\1\153\26\154\1\u012f\2\154\1\u012f\2\154\1\u012f" + "\10\154\1\u012f\4\154\1\u012f\7\154\1\0\1\u0130\1\157" + "\1\160\1\157\1\161\1\157\1\u0130\27\157\1\u0130\2\157" + "\1\u0130\2\157\1\u0130\10\157\1\u0130\4\157\1\u0130\7\157" + "\1\0\1\u0131\1\162\1\163\3\162\1\u0131\1\161\26\162" + "\1\u0131\2\162\1\u0131\2\162\1\u0131\10\162\1\u0131\4\162" + "\1\u0131\7\162\1\0\2\u010a\1\u010b\1\u0132\1\0\2\u010a" + "\1\0\1\u0132\1\u010e\4\u010a\2\u0132\5\u010a\1\0\44\u010a"
- + "\1\0\1\u0133\1\u010a\1\u010b\1\u0132\2\u010a\1\u0133\1\u010a" + "\1\u0132\1\u0134\4\u010a\2\u0132\16\u010a\1\u0133\2\u010a\1\u0133" + "\2\u010a\1\u0133\10\u010a\1\u0133\4\u010a\1\u0133\7\u010a\1\0" + "\2\u010c\1\u0135\1\0\1\u0132\11\u010c\2\0\52\u010c\1\0" + "\2\u010d\1\u0136\1\0\3\u010d\1\u0132\6\u010d\2\0\52\u010d" + "\1\0\1\u0137\1\51\1\165\1\51\1\0\1\51\1\u0137" + "\1\0\1\51\1\0\1\51\3\0\2\51\2\0\3\51" + "\1\0\1\51\7\0\1\u0137\2\51\1\u0137\2\51\1\u0137" + "\2\51\1\0\4\51\1\0\1\u0137\1\51\1\0\1\51" + "\1\0\1\u0137\2\51\6\0\1\u0138\1\55\1\170\1\55" + "\1\0\1\55\1\u0138\1\0\1\55\1\0\1\55\3\0" + "\2\55\2\0\3\55\1\0\1\55\7\0\1\u0138\2\55" + "\1\u0138\2\55\1\u0138\2\55\1\0\4\55\1\0\1\u0138" + "\1\55\1\0\1\55\1\0\1\u0138\2\55\6\0\1\u0139" + "\1\62\1\173\1\62\1\0\1\62\1\u0139\1\0\1\62" + "\1\0\1\62\3\0\2\62\2\0\3\62\1\0\1\62" + "\7\0\1\u0139\2\62\1\u0139\2\62\1\u0139\2\62\1\0" + "\4\62\1\0\1\u0139\1\62\1\0\1\62\1\0\1\u0139"
- + "\2\62\6\0\1\u013a\1\72\1\200\1\72\1\0\1\72" + "\1\u013a\1\0\1\72\1\0\1\72\3\0\2\72\2\0" + "\3\72\1\0\1\72\7\0\1\u013a\2\72\1\u013a\2\72" + "\1\u013a\2\72\1\0\4\72\1\0\1\u013a\1\72\1\0" + "\1\72\1\0\1\u013a\2\72\6\0\1\u013b\1\100\1\203" + "\1\100\1\0\1\100\1\u013b\1\0\1\100\1\0\1\100" + "\3\0\2\100\2\0\3\100\1\0\1\100\7\0\1\u013b" + "\2\100\1\u013b\2\100\1\u013b\2\100\1\0\4\100\1\0" + "\1\u013b\1\100\1\0\1\100\1\0\1\u013b\2\100\6\0" + "\1\u013c\1\205\1\206\1\205\1\207\1\205\1\u013c\27\205" + "\1\u013c\2\205\1\u013c\2\205\1\u013c\10\205\1\u013c\4\205" + "\1\u013c\7\205\1\0\1\u013d\1\210\1\211\3\210\1\u013d" + "\1\207\26\210\1\u013d\2\210\1\u013d\2\210\1\u013d\10\210" + "\1\u013d\4\210\1\u013d\7\210\1\0\1\u013e\1\105\1\213" + "\1\105\1\0\1\105\1\u013e\1\0\1\105\1\0\1\105" + "\3\0\2\105\2\0\3\105\1\0\1\105\7\0\1\u013e" + "\2\105\1\u013e\2\105\1\u013e\2\105\1\0\4\105\1\0" + "\1\u013e\1\105\1\0\1\105\1\0\1\u013e\2\105\6\0"
- + "\1\u013f\1\216\1\217\1\216\1\0\1\216\1\u013f\1\0" + "\1\216\1\0\1\216\3\0\2\216\2\0\3\216\1\0" + "\1\216\7\0\1\u013f\2\216\1\u013f\2\216\1\u013f\2\216" + "\1\0\4\216\1\0\1\u013f\1\216\1\0\1\216\1\0" + "\1\u013f\2\216\6\0\1\u0140\1\113\1\222\1\113\1\0" + "\1\113\1\u0140\1\0\1\113\1\0\1\113\3\0\2\113" + "\2\0\3\113\1\223\1\113\7\0\1\u0140\2\113\1\u0140" + "\2\113\1\u0140\2\113\1\0\4\113\1\0\1\u0140\1\113" + "\1\0\1\113\1\0\1\u0140\2\113\6\0\1\u0141\1\225" + "\1\226\1\225\1\227\1\225\1\u0141\27\225\1\u0141\2\225" + "\1\u0141\2\225\1\u0141\10\225\1\u0141\4\225\1\u0141\7\225" + "\1\0\1\u0142\1\230\1\231\3\230\1\u0142\1\227\26\230" + "\1\u0142\2\230\1\u0142\2\230\1\u0142\10\230\1\u0142\4\230" + "\1\u0142\7\230\1\0\1\u0143\1\235\1\236\1\235\1\0" + "\1\235\1\u0143\1\0\1\235\1\0\1\235\3\0\2\235" + "\2\0\3\235\1\0\1\235\7\0\1\u0143\2\235\1\u0143" + "\2\235\1\u0143\2\235\1\0\4\235\1\0\1\u0143\1\235" + "\1\0\1\235\1\0\1\u0143\2\235\6\0\1\u0144\5\0"
- + "\1\u0144\3\0\1\367\5\0\1\u0144\5\0\1\u0144\7\0" + "\2\u0144\1\0\2\u0144\1\0\2\u0144\7\0\2\u0144\3\0" + "\2\u0144\7\0\1\u0145\5\0\1\u0145\11\0\1\u0145\5\0" + "\1\u0145\7\0\2\u0145\1\0\2\u0145\1\0\2\u0145\7\0" + "\2\u0145\3\0\2\u0145\7\0\2\u011e\1\u011f\1\u0146\1\0" + "\2\u011e\1\0\1\u0146\1\u0123\4\u011e\2\u0146\5\u011e\1\0" + "\44\u011e\1\0\1\u0147\1\u011e\1\u011f\1\u0146\2\u011e\1\u0147" + "\1\u011e\1\u0146\1\u0148\4\u011e\2\u0146\16\u011e\1\u0147\2\u011e" + "\1\u0147\2\u011e\1\u0147\10\u011e\1\u0147\4\u011e\1\u0147\7\u011e" + "\1\0\2\u0121\1\u0149\1\0\1\u0146\11\u0121\2\0\52\u0121" + "\1\0\2\u0122\1\u014a\1\0\3\u0122\1\u0146\6\u0122\2\0" + "\52\u0122\24\0\1\u014b\47\0\1\u014c\1\25\1\131\1\25" + "\1\0\1\25\1\u014c\1\0\1\25\1\0\1\25\3\0" + "\2\25\2\0\3\25\1\0\1\25\7\0\1\u014c\2\25" + "\1\u014c\2\25\1\u014c\2\25\1\0\4\25\1\0\1\u014c" + "\1\25\1\0\1\25\1\0\1\u014c\2\25\6\0\1\u014d" + "\1\134\1\135\1\134\1\0\1\134\1\u014d\1\0\1\134"
- + "\1\0\1\134\3\0\2\134\2\0\3\134\1\0\1\134" + "\7\0\1\u014d\2\134\1\u014d\2\134\1\u014d\2\134\1\0" + "\4\134\1\0\1\u014d\1\134\1\0\1\134\1\0\1\u014d" + "\2\134\6\0\1\u014e\1\136\1\137\1\136\1\0\1\136" + "\1\u014e\1\0\1\136\1\0\1\136\3\0\2\136\2\0" + "\3\136\1\0\1\136\7\0\1\u014e\2\136\1\u014e\2\136" + "\1\u014e\2\136\1\0\4\136\1\0\1\u014e\1\136\1\0" + "\1\136\1\0\1\u014e\2\136\52\0\2\u014f\73\0\1\u0150" + "\106\0\2\u0151\7\0\1\u0152\1\341\1\342\1\341\1\0" + "\1\341\1\u0152\1\0\1\341\1\u0103\1\341\3\0\2\341" + "\2\0\3\341\1\0\1\341\7\0\1\u0152\2\341\1\u0152" + "\2\341\1\u0152\2\341\1\0\4\341\1\0\1\u0152\1\341" + "\1\0\1\341\1\0\1\u0152\2\341\6\0\1\u0153\1\147" + "\1\150\1\147\1\0\1\147\1\u0153\1\0\1\147\1\0" + "\1\147\3\0\2\147\2\0\3\147\1\260\1\147\7\0" + "\1\u0153\2\147\1\u0153\2\147\1\u0153\2\147\1\0\4\147" + "\1\0\1\u0153\1\147\1\0\1\147\1\0\1\u0153\2\147" + "\6\0\1\u0154\1\151\1\152\1\151\1\153\1\151\1\u0154"
- + "\27\151\1\u0154\2\151\1\u0154\2\151\1\u0154\10\151\1\u0154" + "\4\151\1\u0154\7\151\1\0\1\u0155\1\154\1\155\3\154" + "\1\u0155\1\153\26\154\1\u0155\2\154\1\u0155\2\154\1\u0155" + "\10\154\1\u0155\4\154\1\u0155\7\154\1\0\1\u0156\1\157" + "\1\160\1\157\1\161\1\157\1\u0156\27\157\1\u0156\2\157" + "\1\u0156\2\157\1\u0156\10\157\1\u0156\4\157\1\u0156\7\157" + "\1\0\1\u0157\1\162\1\163\3\162\1\u0157\1\161\26\162" + "\1\u0157\2\162\1\u0157\2\162\1\u0157\10\162\1\u0157\4\162" + "\1\u0157\7\162\4\0\1\u0132\1\0\1\u0132\2\0\1\u0132" + "\1\u010e\4\0\2\u0132\53\0\1\u0158\1\u010a\1\u010b\1\u010a" + "\1\0\1\u010a\1\u0158\1\0\1\u010a\1\u010e\13\u010a\1\0" + "\10\u010a\1\u0158\2\u010a\1\u0158\2\u010a\1\u0158\10\u010a\1\u0158" + "\4\u010a\1\u0158\7\u010a\1\0\1\u0159\1\u010c\1\u0135\1\u010c" + "\1\u015a\1\u010c\1\u0159\10\u010c\1\u015b\16\u010c\1\u0159\2\u010c" + "\1\u0159\2\u010c\1\u0159\10\u010c\1\u0159\4\u010c\1\u0159\7\u010c"
- + "\1\0\1\u015c\1\u010d\1\u0136\3\u010d\1\u015c\1\u015d\7\u010d" + "\1\u015e\16\u010d\1\u015c\2\u010d\1\u015c\2\u010d\1\u015c\10\u010d" + "\1\u015c\4\u010d\1\u015c\7\u010d\1\0\1\u015f\1\51\1\165" + "\1\51\1\0\1\51\1\u015f\1\0\1\51\1\0\1\51" + "\3\0\2\51\2\0\3\51\1\0\1\51\7\0\1\u015f" + "\2\51\1\u015f\2\51\1\u015f\2\51\1\0\4\51\1\0" + "\1\u015f\1\51\1\0\1\51\1\0\1\u015f\2\51\6\0" + "\1\u0160\1\55\1\170\1\55\1\0\1\55\1\u0160\1\0" + "\1\55\1\0\1\55\3\0\2\55\2\0\3\55\1\0" + "\1\55\7\0\1\u0160\2\55\1\u0160\2\55\1\u0160\2\55" + "\1\0\4\55\1\0\1\u0160\1\55\1\0\1\55\1\0" + "\1\u0160\2\55\6\0\1\u0161\1\62\1\173\1\62\1\0" + "\1\62\1\u0161\1\0\1\62\1\0\1\62\3\0\2\62" + "\2\0\3\62\1\0\1\62\7\0\1\u0161\2\62\1\u0161" + "\2\62\1\u0161\2\62\1\0\4\62\1\0\1\u0161\1\62" + "\1\0\1\62\1\0\1\u0161\2\62\6\0\1\u0162\1\72" + "\1\200\1\72\1\0\1\72\1\u0162\1\0\1\72\1\0" + "\1\72\3\0\2\72\2\0\3\72\1\0\1\72\7\0" + "\1\u0162\2\72\1\u0162\2\72\1\u0162\2\72\1\0\4\72"
- + "\1\0\1\u0162\1\72\1\0\1\72\1\0\1\u0162\2\72" + "\6\0\1\u0163\1\100\1\203\1\100\1\0\1\100\1\u0163" + "\1\0\1\100\1\0\1\100\3\0\2\100\2\0\3\100" + "\1\0\1\100\7\0\1\u0163\2\100\1\u0163\2\100\1\u0163" + "\2\100\1\0\4\100\1\0\1\u0163\1\100\1\0\1\100" + "\1\0\1\u0163\2\100\6\0\1\u0164\1\205\1\206\1\205" + "\1\207\1\205\1\u0164\27\205\1\u0164\2\205\1\u0164\2\205" + "\1\u0164\10\205\1\u0164\4\205\1\u0164\7\205\1\0\1\u0165" + "\1\210\1\211\3\210\1\u0165\1\207\26\210\1\u0165\2\210" + "\1\u0165\2\210\1\u0165\10\210\1\u0165\4\210\1\u0165\7\210" + "\1\0\1\u0166\1\105\1\213\1\105\1\0\1\105\1\u0166" + "\1\0\1\105\1\0\1\105\3\0\2\105\2\0\3\105" + "\1\0\1\105\7\0\1\u0166\2\105\1\u0166\2\105\1\u0166" + "\2\105\1\0\4\105\1\0\1\u0166\1\105\1\0\1\105" + "\1\0\1\u0166\2\105\6\0\1\u0167\1\216\1\217\1\216" + "\1\0\1\216\1\u0167\1\0\1\216\1\0\1\216\3\0" + "\2\216\2\0\3\216\1\0\1\216\7\0\1\u0167\2\216" + "\1\u0167\2\216\1\u0167\2\216\1\0\4\216\1\0\1\u0167"
- + "\1\216\1\0\1\216\1\0\1\u0167\2\216\6\0\1\u0168" + "\1\113\1\222\1\113\1\0\1\113\1\u0168\1\0\1\113" + "\1\0\1\113\3\0\2\113\2\0\3\113\1\223\1\113" + "\7\0\1\u0168\2\113\1\u0168\2\113\1\u0168\2\113\1\0" + "\4\113\1\0\1\u0168\1\113\1\0\1\113\1\0\1\u0168" + "\2\113\6\0\1\u0169\1\225\1\226\1\225\1\227\1\225" + "\1\u0169\27\225\1\u0169\2\225\1\u0169\2\225\1\u0169\10\225" + "\1\u0169\4\225\1\u0169\7\225\1\0\1\u016a\1\230\1\231" + "\3\230\1\u016a\1\227\26\230\1\u016a\2\230\1\u016a\2\230" + "\1\u016a\10\230\1\u016a\4\230\1\u016a\7\230\1\0\1\u016b" + "\1\235\1\236\1\235\1\0\1\235\1\u016b\1\0\1\235" + "\1\0\1\235\3\0\2\235\2\0\3\235\1\0\1\235" + "\7\0\1\u016b\2\235\1\u016b\2\235\1\u016b\2\235\1\0" + "\4\235\1\0\1\u016b\1\235\1\0\1\235\1\0\1\u016b" + "\2\235\6\0\1\u016c\5\0\1\u016c\3\0\1\367\5\0" + "\1\u016c\5\0\1\u016c\7\0\2\u016c\1\0\2\u016c\1\0" + "\2\u016c\7\0\2\u016c\3\0\2\u016c\7\0\1\u016d\5\0" + "\1\u016d\11\0\1\u016d\5\0\1\u016d\7\0\2\u016d\1\0"
- + "\2\u016d\1\0\2\u016d\7\0\2\u016d\3\0\2\u016d\12\0" + "\1\u0146\1\0\1\u0146\2\0\1\u0146\1\u0123\4\0\2\u0146" + "\53\0\1\u016e\1\u011e\1\u011f\1\u011e\1\0\1\u011e\1\u016e" + "\1\0\1\u011e\1\u0123\13\u011e\1\0\10\u011e\1\u016e\2\u011e" + "\1\u016e\2\u011e\1\u016e\10\u011e\1\u016e\4\u011e\1\u016e\7\u011e" + "\1\0\1\u016f\1\u0121\1\u0149\1\u0121\1\u0170\1\u0121\1\u016f" + "\10\u0121\1\u0171\16\u0121\1\u016f\2\u0121\1\u016f\2\u0121\1\u016f" + "\10\u0121\1\u016f\4\u0121\1\u016f\7\u0121\1\0\1\u0172\1\u0122" + "\1\u014a\3\u0122\1\u0172\1\u0173\7\u0122\1\u0174\16\u0122\1\u0172" + "\2\u0122\1\u0172\2\u0122\1\u0172\10\u0122\1\u0172\4\u0122\1\u0172" + "\7\u0122\47\0\1\u0175\24\0\2\25\1\131\1\25\1\0" + "\2\25\1\0\1\25\1\0\1\25\3\0\2\25\2\0" + "\3\25\1\0\1\25\7\0\11\25\1\0\4\25\1\0" + "\2\25\1\0\1\25\1\0\3\25\6\0\1\u0176\1\134" + "\1\135\1\134\1\0\1\134\1\u0176\1\0\1\134\1\0" + "\1\134\3\0\2\134\2\0\3\134\1\0\1\134\7\0" + "\1\u0176\2\134\1\u0176\2\134\1\u0176\2\134\1\0\4\134"
- + "\1\0\1\u0176\1\134\1\0\1\134\1\0\1\u0176\2\134" + "\6\0\1\u0177\1\136\1\137\1\136\1\0\1\136\1\u0177" + "\1\0\1\136\1\0\1\136\3\0\2\136\2\0\3\136" + "\1\0\1\136\7\0\1\u0177\2\136\1\u0177\2\136\1\u0177" + "\2\136\1\0\4\136\1\0\1\u0177\1\136\1\0\1\136" + "\1\0\1\u0177\2\136\54\0\1\u0178\65\0\2\u0179\30\0" + "\1\u017a\1\341\1\342\1\341\1\0\1\341\1\u017a\1\0" + "\1\341\1\u0103\1\341\3\0\2\341\2\0\3\341\1\0" + "\1\341\7\0\1\u017a\2\341\1\u017a\2\341\1\u017a\2\341" + "\1\0\4\341\1\0\1\u017a\1\341\1\0\1\341\1\0" + "\1\u017a\2\341\6\0\1\u017b\1\147\1\150\1\147\1\0" + "\1\147\1\u017b\1\0\1\147\1\0\1\147\3\0\2\147" + "\2\0\3\147\1\260\1\147\7\0\1\u017b\2\147\1\u017b" + "\2\147\1\u017b\2\147\1\0\4\147\1\0\1\u017b\1\147" + "\1\0\1\147\1\0\1\u017b\2\147\6\0\1\u017c\1\151" + "\1\152\1\151\1\153\1\151\1\u017c\27\151\1\u017c\2\151" + "\1\u017c\2\151\1\u017c\10\151\1\u017c\4\151\1\u017c\7\151" + "\1\0\1\u017d\1\154\1\155\3\154\1\u017d\1\153\26\154"
- + "\1\u017d\2\154\1\u017d\2\154\1\u017d\10\154\1\u017d\4\154" + "\1\u017d\7\154\1\0\1\u017e\1\157\1\160\1\157\1\161" + "\1\157\1\u017e\27\157\1\u017e\2\157\1\u017e\2\157\1\u017e" + "\10\157\1\u017e\4\157\1\u017e\7\157\1\0\1\u017f\1\162" + "\1\163\3\162\1\u017f\1\161\26\162\1\u017f\2\162\1\u017f" + "\2\162\1\u017f\10\162\1\u017f\4\162\1\u017f\7\162\1\0" + "\1\u0180\1\u010a\1\u010b\1\u010a\1\0\1\u010a\1\u0180\1\0" + "\1\u010a\1\u010e\13\u010a\1\0\10\u010a\1\u0180\2\u010a\1\u0180" + "\2\u010a\1\u0180\10\u010a\1\u0180\4\u010a\1\u0180\7\u010a\1\0" + "\1\u0181\1\u010c\1\u0135\1\u010c\1\u0132\1\u010c\1\u0181\27\u010c" + "\1\u0181\2\u010c\1\u0181\2\u010c\1\u0181\10\u010c\1\u0181\4\u010c" + "\1\u0181\7\u010c\1\0\2\u010c\1\u0135\2\u0132\1\u015a\2\u010c" + "\1\u015a\1\u0182\4\u010c\2\u0132\52\u010c\1\0\2\u010c\1\u0135" + "\1\0\1\u0132\12\u010c\1\0\52\u010c\1\0\1\u0183\1\u010d" + "\1\u0136\3\u010d\1\u0183\1\u0132\26\u010d\1\u0183\2\u010d\1\u0183"
- + "\2\u010d\1\u0183\10\u010d\1\u0183\4\u010d\1\u0183\7\u010d\1\0" + "\2\u010d\1\u0136\1\u0132\1\u010d\1\u015d\1\u010d\1\u0132\1\u015d" + "\1\u0184\4\u010d\2\u0132\52\u010d\1\0\2\u010d\1\u0136\1\0" + "\3\u010d\1\u0132\7\u010d\1\0\52\u010d\1\0\2\51\1\165" + "\1\51\1\0\2\51\1\0\1\51\1\0\1\51\3\0" + "\2\51\2\0\3\51\1\0\1\51\7\0\11\51\1\0" + "\4\51\1\0\2\51\1\0\1\51\1\0\3\51\6\0" + "\2\55\1\170\1\55\1\0\2\55\1\0\1\55\1\0" + "\1\55\3\0\2\55\2\0\3\55\1\0\1\55\7\0" + "\11\55\1\0\4\55\1\0\2\55\1\0\1\55\1\0" + "\3\55\6\0\2\62\1\173\1\62\1\0\2\62\1\0" + "\1\62\1\0\1\62\3\0\2\62\2\0\3\62\1\0" + "\1\62\7\0\11\62\1\0\4\62\1\0\2\62\1\0" + "\1\62\1\0\3\62\6\0\2\72\1\200\1\72\1\0" + "\2\72\1\0\1\72\1\0\1\72\3\0\2\72\2\0" + "\3\72\1\0\1\72\7\0\11\72\1\0\4\72\1\0" + "\2\72\1\0\1\72\1\0\3\72\6\0\2\100\1\203" + "\1\100\1\0\2\100\1\0\1\100\1\0\1\100\3\0" + "\2\100\2\0\3\100\1\0\1\100\7\0\11\100\1\0" + "\4\100\1\0\2\100\1\0\1\100\1\0\3\100\6\0"
- + "\1\u0185\1\205\1\206\1\205\1\207\1\205\1\u0185\27\205" + "\1\u0185\2\205\1\u0185\2\205\1\u0185\10\205\1\u0185\4\205" + "\1\u0185\7\205\1\0\1\u0186\1\210\1\211\3\210\1\u0186" + "\1\207\26\210\1\u0186\2\210\1\u0186\2\210\1\u0186\10\210" + "\1\u0186\4\210\1\u0186\7\210\1\0\2\105\1\213\1\105" + "\1\0\2\105\1\0\1\105\1\0\1\105\3\0\2\105" + "\2\0\3\105\1\0\1\105\7\0\11\105\1\0\4\105" + "\1\0\2\105\1\0\1\105\1\0\3\105\6\0\1\u0187" + "\1\216\1\217\1\216\1\0\1\216\1\u0187\1\0\1\216" + "\1\0\1\216\3\0\2\216\2\0\3\216\1\0\1\216" + "\7\0\1\u0187\2\216\1\u0187\2\216\1\u0187\2\216\1\0" + "\4\216\1\0\1\u0187\1\216\1\0\1\216\1\0\1\u0187" + "\2\216\6\0\2\113\1\222\1\113\1\0\2\113\1\0" + "\1\113\1\0\1\113\3\0\2\113\2\0\3\113\1\223" + "\1\113\7\0\11\113\1\0\4\113\1\0\2\113\1\0" + "\1\113\1\0\3\113\6\0\1\u0188\1\225\1\226\1\225" + "\1\227\1\225\1\u0188\27\225\1\u0188\2\225\1\u0188\2\225" + "\1\u0188\10\225\1\u0188\4\225\1\u0188\7\225\1\0\1\u0189"
- + "\1\230\1\231\3\230\1\u0189\1\227\26\230\1\u0189\2\230" + "\1\u0189\2\230\1\u0189\10\230\1\u0189\4\230\1\u0189\7\230" + "\1\0\1\u018a\1\235\1\236\1\235\1\0\1\235\1\u018a" + "\1\0\1\235\1\0\1\235\3\0\2\235\2\0\3\235" + "\1\0\1\235\7\0\1\u018a\2\235\1\u018a\2\235\1\u018a" + "\2\235\1\0\4\235\1\0\1\u018a\1\235\1\0\1\235" + "\1\0\1\u018a\2\235\6\0\1\u018b\5\0\1\u018b\3\0" + "\1\367\5\0\1\u018b\5\0\1\u018b\7\0\2\u018b\1\0" + "\2\u018b\1\0\2\u018b\7\0\2\u018b\3\0\2\u018b\7\0" + "\1\u018c\5\0\1\u018c\11\0\1\u018c\5\0\1\u018c\7\0" + "\2\u018c\1\0\2\u018c\1\0\2\u018c\7\0\2\u018c\3\0" + "\2\u018c\7\0\1\u018d\1\u011e\1\u011f\1\u011e\1\0\1\u011e" + "\1\u018d\1\0\1\u011e\1\u0123\13\u011e\1\0\10\u011e\1\u018d" + "\2\u011e\1\u018d\2\u011e\1\u018d\10\u011e\1\u018d\4\u011e\1\u018d" + "\7\u011e\1\0\1\u018e\1\u0121\1\u0149\1\u0121\1\u0146\1\u0121" + "\1\u018e\27\u0121\1\u018e\2\u0121\1\u018e\2\u0121\1\u018e\10\u0121" + "\1\u018e\4\u0121\1\u018e\7\u0121\1\0\2\u0121\1\u0149\2\u0146"
- + "\1\u0170\2\u0121\1\u0170\1\u018f\4\u0121\2\u0146\52\u0121\1\0" + "\2\u0121\1\u0149\1\0\1\u0146\12\u0121\1\0\52\u0121\1\0" + "\1\u0190\1\u0122\1\u014a\3\u0122\1\u0190\1\u0146\26\u0122\1\u0190" + "\2\u0122\1\u0190\2\u0122\1\u0190\10\u0122\1\u0190\4\u0122\1\u0190" + "\7\u0122\1\0\2\u0122\1\u014a\1\u0146\1\u0122\1\u0173\1\u0122" + "\1\u0146\1\u0173\1\u0191\4\u0122\2\u0146\52\u0122\1\0\2\u0122" + "\1\u014a\1\0\3\u0122\1\u0146\7\u0122\1\0\52\u0122\42\0" + "\2\u0192\30\0\2\134\1\135\1\134\1\0\2\134\1\0" + "\1\134\1\0\1\134\3\0\2\134\2\0\3\134\1\0" + "\1\134\7\0\11\134\1\0\4\134\1\0\2\134\1\0" + "\1\134\1\0\3\134\6\0\2\136\1\137\1\136\1\0" + "\2\136\1\0\1\136\1\0\1\136\3\0\2\136\2\0" + "\3\136\1\0\1\136\7\0\11\136\1\0\4\136\1\0" + "\2\136\1\0\1\136\1\0\3\136\44\0\2\u0193\33\0" + "\1\u0194\1\341\1\342\1\341\1\0\1\341\1\u0194\1\0" + "\1\341\1\u0103\1\341\3\0\2\341\2\0\3\341\1\0" + "\1\341\7\0\1\u0194\2\341\1\u0194\2\341\1\u0194\2\341"
- + "\1\0\4\341\1\0\1\u0194\1\341\1\0\1\341\1\0" + "\1\u0194\2\341\6\0\2\147\1\150\1\147\1\0\2\147" + "\1\0\1\147\1\0\1\147\3\0\2\147\2\0\3\147" + "\1\260\1\147\7\0\11\147\1\0\4\147\1\0\2\147" + "\1\0\1\147\1\0\3\147\6\0\2\151\1\152\1\151" + "\1\153\65\151\1\0\2\154\1\155\4\154\1\153\62\154" + "\1\0\2\157\1\160\1\157\1\161\65\157\1\0\2\162" + "\1\163\4\162\1\161\62\162\1\0\1\u0195\1\u010a\1\u010b" + "\1\u010a\1\0\1\u010a\1\u0195\1\0\1\u010a\1\u010e\13\u010a" + "\1\0\10\u010a\1\u0195\2\u010a\1\u0195\2\u010a\1\u0195\10\u010a" + "\1\u0195\4\u010a\1\u0195\7\u010a\1\0\1\u0196\1\u010c\1\u0135" + "\1\u010c\1\u0132\1\u010c\1\u0196\27\u010c\1\u0196\2\u010c\1\u0196" + "\2\u010c\1\u0196\10\u010c\1\u0196\4\u010c\1\u0196\7\u010c\1\0" + "\1\u0197\1\u010d\1\u0136\3\u010d\1\u0197\1\u0132\26\u010d\1\u0197" + "\2\u010d\1\u0197\2\u010d\1\u0197\10\u010d\1\u0197\4\u010d\1\u0197" + "\7\u010d\1\0\2\205\1\206\1\205\1\207\65\205\1\0" + "\2\210\1\211\4\210\1\207\62\210\1\0\2\216\1\217"
- + "\1\216\1\0\2\216\1\0\1\216\1\0\1\216\3\0" + "\2\216\2\0\3\216\1\0\1\216\7\0\11\216\1\0" + "\4\216\1\0\2\216\1\0\1\216\1\0\3\216\6\0" + "\2\225\1\226\1\225\1\227\65\225\1\0\2\230\1\231" + "\4\230\1\227\62\230\1\0\2\235\1\236\1\235\1\0" + "\2\235\1\0\1\235\1\0\1\235\3\0\2\235\2\0" + "\3\235\1\0\1\235\7\0\11\235\1\0\4\235\1\0" + "\2\235\1\0\1\235\1\0\3\235\20\0\1\367\60\0" + "\1\u0198\5\0\1\u0198\11\0\1\u0198\5\0\1\u0198\7\0" + "\2\u0198\1\0\2\u0198\1\0\2\u0198\7\0\2\u0198\3\0" + "\2\u0198\7\0\1\u0199\1\u011e\1\u011f\1\u011e\1\0\1\u011e" + "\1\u0199\1\0\1\u011e\1\u0123\13\u011e\1\0\10\u011e\1\u0199" + "\2\u011e\1\u0199\2\u011e\1\u0199\10\u011e\1\u0199\4\u011e\1\u0199" + "\7\u011e\1\0\1\u019a\1\u0121\1\u0149\1\u0121\1\u0146\1\u0121" + "\1\u019a\27\u0121\1\u019a\2\u0121\1\u019a\2\u0121\1\u019a\10\u0121" + "\1\u019a\4\u0121\1\u019a\7\u0121\1\0\1\u019b\1\u0122\1\u014a" + "\3\u0122\1\u019b\1\u0146\26\u0122\1\u019b\2\u0122\1\u019b\2\u0122"
- + "\1\u019b\10\u0122\1\u019b\4\u0122\1\u019b\7\u0122\65\0\1\u019c" + "\52\0\2\u019d\25\0\1\u019e\1\341\1\342\1\341\1\0" + "\1\341\1\u019e\1\0\1\341\1\u0103\1\341\3\0\2\341" + "\2\0\3\341\1\0\1\341\7\0\1\u019e\2\341\1\u019e" + "\2\341\1\u019e\2\341\1\0\4\341\1\0\1\u019e\1\341" + "\1\0\1\341\1\0\1\u019e\2\341\6\0\1\u019f\1\u010a" + "\1\u010b\1\u010a\1\0\1\u010a\1\u019f\1\0\1\u010a\1\u010e" + "\13\u010a\1\0\10\u010a\1\u019f\2\u010a\1\u019f\2\u010a\1\u019f" + "\10\u010a\1\u019f\4\u010a\1\u019f\7\u010a\1\0\1\u01a0\1\u010c" + "\1\u0135\1\u010c\1\u0132\1\u010c\1\u01a0\27\u010c\1\u01a0\2\u010c" + "\1\u01a0\2\u010c\1\u01a0\10\u010c\1\u01a0\4\u010c\1\u01a0\7\u010c" + "\1\0\1\u01a1\1\u010d\1\u0136\3\u010d\1\u01a1\1\u0132\26\u010d" + "\1\u01a1\2\u010d\1\u01a1\2\u010d\1\u01a1\10\u010d\1\u01a1\4\u010d" + "\1\u01a1\7\u010d\1\0\1\u01a2\5\0\1\u01a2\11\0\1\u01a2" + "\5\0\1\u01a2\7\0\2\u01a2\1\0\2\u01a2\1\0\2\u01a2" + "\7\0\2\u01a2\3\0\2\u01a2\7\0\1\u01a3\1\u011e\1\u011f"
- + "\1\u011e\1\0\1\u011e\1\u01a3\1\0\1\u011e\1\u0123\13\u011e" + "\1\0\10\u011e\1\u01a3\2\u011e\1\u01a3\2\u011e\1\u01a3\10\u011e" + "\1\u01a3\4\u011e\1\u01a3\7\u011e\1\0\1\u01a4\1\u0121\1\u0149" + "\1\u0121\1\u0146\1\u0121\1\u01a4\27\u0121\1\u01a4\2\u0121\1\u01a4" + "\2\u0121\1\u01a4\10\u0121\1\u01a4\4\u0121\1\u01a4\7\u0121\1\0" + "\1\u01a5\1\u0122\1\u014a\3\u0122\1\u01a5\1\u0146\26\u0122\1\u01a5" + "\2\u0122\1\u01a5\2\u0122\1\u01a5\10\u0122\1\u01a5\4\u0122\1\u01a5" + "\7\u0122\47\0\1\u01a6\24\0\2\341\1\342\1\341\1\0" + "\2\341\1\0\1\341\1\u0103\1\341\3\0\2\341\2\0" + "\3\341\1\0\1\341\7\0\11\341\1\0\4\341\1\0" + "\2\341\1\0\1\341\1\0\3\341\6\0\1\u01a7\1\u010a" + "\1\u010b\1\u010a\1\0\1\u010a\1\u01a7\1\0\1\u010a\1\u010e" + "\13\u010a\1\0\10\u010a\1\u01a7\2\u010a\1\u01a7\2\u010a\1\u01a7" + "\10\u010a\1\u01a7\4\u010a\1\u01a7\7\u010a\1\0\1\u01a8\1\u010c" + "\1\u0135\1\u010c\1\u0132\1\u010c\1\u01a8\27\u010c\1\u01a8\2\u010c"
- + "\1\u01a8\2\u010c\1\u01a8\10\u010c\1\u01a8\4\u010c\1\u01a8\7\u010c" + "\1\0\1\u01a9\1\u010d\1\u0136\3\u010d\1\u01a9\1\u0132\26\u010d" + "\1\u01a9\2\u010d\1\u01a9\2\u010d\1\u01a9\10\u010d\1\u01a9\4\u010d" + "\1\u01a9\7\u010d\1\0\1\u01aa\1\u011e\1\u011f\1\u011e\1\0" + "\1\u011e\1\u01aa\1\0\1\u011e\1\u0123\13\u011e\1\0\10\u011e" + "\1\u01aa\2\u011e\1\u01aa\2\u011e\1\u01aa\10\u011e\1\u01aa\4\u011e" + "\1\u01aa\7\u011e\1\0\1\u01ab\1\u0121\1\u0149\1\u0121\1\u0146" + "\1\u0121\1\u01ab\27\u0121\1\u01ab\2\u0121\1\u01ab\2\u0121\1\u01ab" + "\10\u0121\1\u01ab\4\u0121\1\u01ab\7\u0121\1\0\1\u01ac\1\u0122" + "\1\u014a\3\u0122\1\u01ac\1\u0146\26\u0122\1\u01ac\2\u0122\1\u01ac" + "\2\u0122\1\u01ac\10\u0122\1\u01ac\4\u0122\1\u01ac\7\u0122\1\0" + "\2\u010a\1\u010b\1\u010a\1\0\2\u010a\1\0\1\u010a\1\u010e" + "\13\u010a\1\0\44\u010a\1\0\1\u01ad\1\u010c\1\u0135\1\u010c" + "\1\u0132\1\u010c\1\u01ad\27\u010c\1\u01ad\2\u010c\1\u01ad\2\u010c"
- + "\1\u01ad\10\u010c\1\u01ad\4\u010c\1\u01ad\7\u010c\1\0\1\u01ae" + "\1\u010d\1\u0136\3\u010d\1\u01ae\1\u0132\26\u010d\1\u01ae\2\u010d" + "\1\u01ae\2\u010d\1\u01ae\10\u010d\1\u01ae\4\u010d\1\u01ae\7\u010d" + "\1\0\2\u011e\1\u011f\1\u011e\1\0\2\u011e\1\0\1\u011e" + "\1\u0123\13\u011e\1\0\44\u011e\1\0\1\u01af\1\u0121\1\u0149" + "\1\u0121\1\u0146\1\u0121\1\u01af\27\u0121\1\u01af\2\u0121\1\u01af" + "\2\u0121\1\u01af\10\u0121\1\u01af\4\u0121\1\u01af\7\u0121\1\0" + "\1\u01b0\1\u0122\1\u014a\3\u0122\1\u01b0\1\u0146\26\u0122\1\u01b0" + "\2\u0122\1\u01b0\2\u0122\1\u01b0\10\u0122\1\u01b0\4\u0122\1\u01b0" + "\7\u0122\1\0\2\u010c\1\u0135\1\u010c\1\u0132\65\u010c\1\0" + "\2\u010d\1\u0136\4\u010d\1\u0132\62\u010d\1\0\2\u0121\1\u0149" + "\1\u0121\1\u0146\65\u0121\1\0\2\u0122\1\u014a\4\u0122\1\u0146" + "\62\u0122";
-
- /**
- * The transition table of the DFA
- */
- final private static int yytrans[] = yy_unpack(yy_packed);
-
-
- /* error codes */
- final private static int YY_UNKNOWN_ERROR = 0;
- final private static int YY_ILLEGAL_STATE = 1;
- final private static int YY_NO_MATCH = 2;
- final private static int YY_PUSHBACK_2BIG = 3;
-
- /* error messages for the codes above */
- final private static String YY_ERROR_MSG[] = {"Unkown internal scanner error", "Internal error: unknown state", "Error: could not match input", "Error: pushback value was too large"};
-
- /**
- * YY_ATTRIBUTE[aState] contains the attributes of state
- * <code>aState</code>
- */
- private final static byte YY_ATTRIBUTE[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 1, 1, 1, 1, 1, 1, 9, 1, 9, 1, 1, 9, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 9, 9, 1, 1, 1, 9, 1, 3, 9, 9, 1, 1, 1, 9, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 9, 3, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 13, 7, 0, 1, 1, 0, 1, 0, 0, 9, 0, 0, 1, 0, 1, 1, 1, 0, 0, 9, 0, 9, 1, 0, 0, 9, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 13, 7, 1, 9, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 9, 9, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 9, 0, 0, 9, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 9, 0, 1, 1, 1, 0, 0, 9, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0,
- 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 9, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 9, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 9, 0, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
- /** the input device */
- private java.io.Reader yy_reader;
-
- /** the current state of the DFA */
- private int yy_state;
-
- /** the current lexical state */
- private int yy_lexical_state = YYINITIAL;
-
- /**
- * this buffer contains the current text to be matched and is the source
- * of the yytext() string
- */
- private char yy_buffer[] = new char[16384];
-
- /** the textposition at the last accepting state */
- private int yy_markedPos;
-
- /** the textposition at the last state to be included in yytext */
- private int yy_pushbackPos;
-
- /** the current text position in the buffer */
- private int yy_currentPos;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int yy_startRead;
-
- /**
- * endRead marks the last character in the buffer, that has been read from
- * input
- */
- private int yy_endRead;
-
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
-
- /** the number of characters up to the start of the matched text */
- private int yychar;
-
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
-
- /**
- * yy_atBOL == true <=>the scanner is currently at the beginning of a
- * line
- */
- private boolean yy_atBOL;
-
- /** yy_atEOF == true <=>the scanner has returned a value for EOF */
- private boolean yy_atEOF;
-
- /* user code: */
- private final static String UNDEFINED = "undefined";
- private String fBufferedContext = null;
- private int fBufferedStart;
- // private int fBufferedTextLength;
- private int fBufferedLength;
- // private StringBuffer fBufferedText = null;
- private CSSTextRegionFactory fRegionFactory = CSSTextRegionFactory.getInstance();
- private int fInitialState = YYINITIAL;
- public final static int BUFFER_SIZE_NORMAL = 16384;
- public final static int BUFFER_SIZE_SMALL = 256;
- private int fInitialBufferSize = BUFFER_SIZE_NORMAL;
-
- public void setInitialState(int state) {
- fInitialState = state;
- }
-
- public void setInitialBufferSize(int size) {
- fInitialBufferSize = size;
- }
-
- /* user method */
- public final ITextRegion getNextToken() throws IOException {
- String context;
- String nextTokenType;
- boolean spaceFollows;
- // StringBuffer text;
- int start;
- int textLength;
- int length;
- if (fBufferedContext != null) {
- context = fBufferedContext;
- // text = fBufferedText;
- start = fBufferedStart;
- textLength = length = fBufferedLength;
-
- fBufferedContext = null;
- }
- else {
- context = primGetNextToken();
- // text = new StringBuffer(yytext());
- start = yychar;
- textLength = length = yylength();
- }
-
- if (context != null) {
- if (context == UNDEFINED) {
- // undef -> concatenate undef's
- nextTokenType = primGetNextToken();
- while (nextTokenType == UNDEFINED) {
- // text.append(yytext());
- textLength += yylength();
- length = textLength;
- nextTokenType = primGetNextToken();
- }
- fBufferedContext = nextTokenType;
- // fBufferedText = new StringBuffer(yytext());
- fBufferedStart = yychar;
- fBufferedLength = yylength();
- }
- else {
- nextTokenType = null;
- spaceFollows = false;
- if (CSSRegionUtil.isDeclarationValueType(context)) { // declaration
- // value
- // can
- // contain
- // VALUE_S
- nextTokenType = primGetNextToken();
- spaceFollows = (nextTokenType == CSS_DECLARATION_VALUE_S);
- }
- else if (canContainSpace(context)) {
- nextTokenType = primGetNextToken();
- spaceFollows = (nextTokenType == CSS_S);
- }
- if (nextTokenType != null) { // nextToken is retrieved
- if (spaceFollows) {
- // next is space -> append
- // text.append(yytext());
- length += yylength();
- }
- else {
- // next is NOT space -> push this for next time,
- // return itself
- fBufferedContext = nextTokenType;
- // fBufferedText = new StringBuffer(yytext());
- fBufferedStart = yychar;
- fBufferedLength = yylength();
- }
- }
- }
- }
-
- if (context != null) {
- if (context == UNDEFINED) {
- context = CSS_UNKNOWN;
- }
- return fRegionFactory.createRegion(context, start, textLength, length);
- }
- else {
- return null;
- }
- }
-
- /* user method */
- /* for standalone use */
- public final List parseText() throws IOException {
- List tokens = new ArrayList();
-
- CSSTextToken token;
- for (String kind = primGetNextToken(); kind != null; kind = primGetNextToken()) {
- token = new CSSTextToken();
- token.kind = kind;
- token.start = yychar;
- token.length = yylength();
- token.image = yytext();
- tokens.add(token);
- }
-
- return tokens;
- }
-
- /* user method */
- private boolean canContainSpace(String type) {
- if (type == CSS_DELIMITER || type == CSS_RBRACE || type == CSS_DECLARATION_DELIMITER) {
- return false;
- }
- else {
- return true;
- }
- }
-
- /* user method */
- public final int getOffset() {
- return yychar;
- }
-
- /* user method */
- public final boolean isEOF() {
- return yy_atEOF;
- }
-
- /* user method */
- public void reset(char[] charArray) {
- reset(new CharArrayReader(charArray), 0);
- }
-
- /* user method */
- public final void reset(java.io.Reader in, int newOffset) {
- /** the input device */
- yy_reader = in;
-
- /** the current state of the DFA */
- yy_state = 0;
-
- /** the current lexical state */
- yy_lexical_state = fInitialState; // YYINITIAL;
-
- /**
- * this buffer contains the current text to be matched and is the
- * source of the yytext() string
- */
- if (yy_buffer.length != fInitialBufferSize) {
- yy_buffer = new char[fInitialBufferSize];
- }
- java.util.Arrays.fill(yy_buffer, (char) 0);
-
- /** the textposition at the last accepting state */
- yy_markedPos = 0;
-
- /** the textposition at the last state to be included in yytext */
- yy_pushbackPos = 0;
-
- /** the current text position in the buffer */
- yy_currentPos = 0;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- yy_startRead = 0;
-
- /**
- * endRead marks the last character in the buffer, that has been read
- * from input
- */
- yy_endRead = 0;
-
- /** number of newlines encountered up to the start of the matched text */
- yyline = 0;
-
- /** the number of characters up to the start of the matched text */
- yychar = 0;
-
- /**
- * the number of characters from the last newline up to the start of
- * the matched text
- */
- yycolumn = 0;
-
- /**
- * yy_atBOL == true <=>the scanner is currently at the beginning of a
- * line
- */
- yy_atBOL = false;
-
- /** yy_atEOF == true <=>the scanner has returned a value for EOF */
- yy_atEOF = false;
-
- /* user variables */
- // fUndefined.delete(0, fUndefined.length());
- }
-
- /* user method */
- public CSSTokenizer() {
- super();
- }
-
-
-
- /**
- * Creates a new scanner There is also a java.io.InputStream version of
- * this constructor.
- *
- * @param in
- * the java.io.Reader to read input from.
- */
- public CSSTokenizer(java.io.Reader in) {
- this.yy_reader = in;
- }
-
- /**
- * Creates a new scanner. There is also java.io.Reader version of this
- * constructor.
- *
- * @param in
- * the java.io.Inputstream to read input from.
- */
- public CSSTokenizer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the compressed DFA transition table.
- *
- * @param packed
- * the packed transition table
- * @return the unpacked transition table
- */
- private static int[] yy_unpack(String packed) {
- int[] trans = new int[21004];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 13906) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- value--;
- do
- trans[j++] = value;
- while (--count > 0);
- }
- return trans;
- }
-
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed
- * the packed character translation table
- * @return the unpacked character translation table
- */
- private static char[] yy_unpack_cmap(String packed) {
- char[] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 170) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do
- map[j++] = value;
- while (--count > 0);
- }
- return map;
- }
-
-
- /**
- * Gets the next input character.
- *
- * @return the next character of the input stream, EOF if the end of the
- * stream is reached.
- * @exception IOException
- * if any I/O-Error occurs
- */
- private int yy_advance() throws java.io.IOException {
-
- /* standard case */
- if (yy_currentPos < yy_endRead)
- return yy_buffer[yy_currentPos++];
-
- /* if the eof is reached, we don't need to work hard */
- if (yy_atEOF)
- return YYEOF;
-
- /* otherwise: need to refill the buffer */
-
- /* first: make room (if you can) */
- if (yy_startRead > 0) {
- System.arraycopy(yy_buffer, yy_startRead, yy_buffer, 0, yy_endRead - yy_startRead);
-
- /* translate stored positions */
- yy_endRead -= yy_startRead;
- yy_currentPos -= yy_startRead;
- yy_markedPos -= yy_startRead;
- yy_pushbackPos -= yy_startRead;
- yy_startRead = 0;
- }
-
- /* is the buffer big enough? */
- if (yy_currentPos >= yy_buffer.length) {
- /* if not: blow it up */
- char newBuffer[] = new char[yy_currentPos * 2];
- System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length);
- yy_buffer = newBuffer;
- }
-
- /* finally: fill the buffer with new input */
- int numRead = yy_reader.read(yy_buffer, yy_endRead, yy_buffer.length - yy_endRead);
-
- if (numRead == -1)
- return YYEOF;
-
- yy_endRead += numRead;
-
- return yy_buffer[yy_currentPos++];
- }
-
-
- /**
- * Closes the input stream.
- */
- final public void yyclose() throws java.io.IOException {
- yy_atEOF = true; /* indicate end of file */
- yy_endRead = yy_startRead; /* invalidate buffer */
- yy_reader.close();
- }
-
-
- /**
- * Returns the current lexical state.
- */
- final public int yystate() {
- return yy_lexical_state;
- }
-
- /**
- * Enters a new lexical state
- *
- * @param newState
- * the new lexical state
- */
- final public void yybegin(int newState) {
- yy_lexical_state = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- final public String yytext() {
- return new String(yy_buffer, yy_startRead, yy_markedPos - yy_startRead);
- }
-
- /**
- * Returns the length of the matched text region.
- */
- final public int yylength() {
- return yy_markedPos - yy_startRead;
- }
-
-
- /**
- * Reports an error that occured while scanning.
- *
- * @param errorCode
- * the code of the errormessage to display
- */
- private void yy_ScanError(int errorCode) {
- try {
- System.out.println(YY_ERROR_MSG[errorCode]);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- System.out.println(YY_ERROR_MSG[YY_UNKNOWN_ERROR]);
- e.printStackTrace();
-
- }
-
- // System.exit(1);
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number
- * the number of characters to be read again. This number must
- * not be greater than yylength()!
- */
- private void yypushback(int number) {
- if (number > yylength())
- yy_ScanError(YY_PUSHBACK_2BIG);
-
- yy_markedPos -= number;
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched, the end
- * of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception IOException
- * if any I/O-Error occurs
- */
- public String primGetNextToken() throws java.io.IOException {
- int yy_input;
- int yy_action;
-
- yy_pushbackPos = -1;
- boolean yy_was_pushback;
-
- while (true) {
-
- yychar += yylength();
-
- boolean yy_counted = false;
- for (yy_currentPos = yy_startRead; yy_currentPos < yy_markedPos; yy_currentPos++) {
- switch (yy_buffer[yy_currentPos]) {
- case '\r' :
- yyline++;
- yy_counted = true;
- break;
- case '\n' :
- if (yy_counted)
- yy_counted = false;
- else {
- yyline++;
- }
- break;
- default :
- yy_counted = false;
- }
- }
-
- if (yy_counted) {
- if (yy_advance() == '\n')
- yyline--;
- if (!yy_atEOF)
- yy_currentPos--;
- }
-
- yy_action = -1;
-
- yy_currentPos = yy_startRead = yy_markedPos;
-
- yy_state = yy_lexical_state;
-
- yy_was_pushback = false;
-
- yy_forAction : {
- while (true) {
-
- yy_input = yy_advance();
-
- if (yy_input == YYEOF)
- break yy_forAction;
-
- int yy_next = yytrans[yy_rowMap[yy_state] + yycmap[yy_input]];
- if (yy_next == -1)
- break yy_forAction;
- yy_state = yy_next;
-
- int yy_attributes = YY_ATTRIBUTE[yy_state];
- if ((yy_attributes & 2) > 0)
- yy_pushbackPos = yy_currentPos;
-
- if ((yy_attributes & 1) > 0) {
- yy_was_pushback = (yy_attributes & 4) > 0;
- yy_action = yy_state;
- yy_markedPos = yy_currentPos;
- if ((yy_attributes & 8) > 0)
- break yy_forAction;
- }
-
- }
- }
-
- if (yy_was_pushback)
- yy_markedPos = yy_pushbackPos;
-
- switch (yy_action) {
-
- case 421 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_IMPORTANT;
- }
- case 433 :
- break;
- case 412 : {
- yybegin(ST_FONT_FACE_DELIMITER);
- return CSS_FONT_FACE;
- }
- case 434 :
- break;
- case 375 : {
- yybegin(ST_CHARSET_NAME);
- return CSS_CHARSET;
- }
- case 435 :
- break;
- case 335 : {
- yybegin(ST_IMPORT_URI);
- return CSS_IMPORT;
- }
- case 436 :
- break;
- case 297 : {
- yybegin(ST_MEDIA_MEDIUM);
- return CSS_MEDIA;
- }
- case 437 :
- break;
- case 290 :
- case 327 :
- case 398 :
- case 400 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_URI;
- }
- case 438 :
- break;
- case 269 :
- case 307 :
- case 385 :
- case 387 : {
- yybegin(ST_IMPORT_MEDIUM);
- return CSS_URI;
- }
- case 439 :
- break;
- case 255 : {
- yybegin(ST_PAGE_PSEUDO_PAGE);
- return CSS_PAGE;
- }
- case 440 :
- break;
- case 218 : {
- return CSS_COMMENT;
- }
- case 441 :
- break;
- case 217 : {
- return CSS_CDO;
- }
- case 442 :
- break;
- case 211 :
- case 245 :
- case 283 :
- case 284 :
- case 323 :
- case 324 :
- case 363 :
- case 364 :
- case 394 :
- case 395 :
- case 407 :
- case 417 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_UNICODE_RANGE;
- }
- case 443 :
- break;
- case 165 : {
- return CSS_CDC;
- }
- case 444 :
- break;
- case 162 : {
- return CSS_DECLARATION_VALUE_S;
- }
- case 445 :
- break;
- case 156 :
- case 210 :
- case 244 :
- case 282 :
- case 322 :
- case 362 :
- case 393 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_HASH;
- }
- case 446 :
- break;
- case 150 :
- case 205 :
- case 208 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_STRING;
- }
- case 447 :
- break;
- case 57 :
- case 59 :
- case 128 :
- case 129 :
- case 193 :
- case 235 :
- case 273 :
- case 313 :
- case 353 : {
- yybegin(ST_SELECTOR_ATTRIBUTE_OPERATOR);
- return CSS_SELECTOR_ATTRIBUTE_NAME;
- }
- case 448 :
- break;
- case 56 : {
- yybegin(ST_SELECTOR);
- return CSS_SELECTOR_SEPARATOR;
- }
- case 449 :
- break;
- case 55 :
- case 125 : {
- yybegin(ST_SELECTOR);
- return CSS_SELECTOR_COMBINATOR;
- }
- case 450 :
- break;
- case 52 : {
- yybegin(ST_DECLARATION);
- return CSS_LBRACE;
- }
- case 451 :
- break;
- case 49 :
- case 51 :
- case 123 :
- case 124 :
- case 192 :
- case 234 :
- case 272 :
- case 312 :
- case 352 : {
- yybegin(ST_PAGE_DELIMITER);
- return CSS_PAGE_SELECTOR;
- }
- case 452 :
- break;
- case 48 : {
- yybegin(YYINITIAL);
- return CSS_LBRACE;
- }
- case 453 :
- break;
- case 47 : {
- yybegin(ST_MEDIA_MEDIUM);
- return CSS_MEDIA_SEPARATOR;
- }
- case 454 :
- break;
- case 44 :
- case 46 :
- case 120 :
- case 121 :
- case 191 :
- case 233 :
- case 271 :
- case 311 :
- case 351 : {
- yybegin(ST_MEDIA_DELIMITER);
- return CSS_MEDIUM;
- }
- case 455 :
- break;
- case 43 : {
- yybegin(ST_IMPORT_MEDIUM);
- return CSS_MEDIA_SEPARATOR;
- }
- case 456 :
- break;
- case 20 :
- case 23 :
- case 89 :
- case 90 :
- case 164 :
- case 214 :
- case 249 :
- case 292 :
- case 331 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_ELEMENT_NAME;
- }
- case 457 :
- break;
- case 22 :
- case 54 :
- case 87 :
- case 126 :
- case 163 : {
- return CSS_S;
- }
- case 458 :
- break;
- case 27 : {
- yybegin(YYINITIAL);
- return CSS_RBRACE;
- }
- case 459 :
- break;
- case 29 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_UNIVERSAL;
- }
- case 460 :
- break;
- case 32 : {
- yybegin(ST_SELECTOR_ATTRIBUTE_NAME);
- return CSS_SELECTOR_ATTRIBUTE_START;
- }
- case 461 :
- break;
- case 36 : {
- yybegin(YYINITIAL);
- return CSS_DELIMITER;
- }
- case 462 :
- break;
- case 40 :
- case 42 :
- case 117 :
- case 118 :
- case 190 :
- case 232 :
- case 270 :
- case 310 :
- case 350 : {
- yybegin(ST_IMPORT_DELIMITER);
- return CSS_MEDIUM;
- }
- case 463 :
- break;
- case 60 : {
- yybegin(ST_SELECTOR_ATTRIBUTE_VALUE);
- return CSS_SELECTOR_ATTRIBUTE_OPERATOR;
- }
- case 464 :
- break;
- case 62 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_ATTRIBUTE_END;
- }
- case 465 :
- break;
- case 63 :
- case 67 :
- case 131 :
- case 134 :
- case 137 :
- case 194 :
- case 196 :
- case 199 :
- case 236 :
- case 274 :
- case 314 :
- case 354 : {
- yybegin(ST_SELECTOR_ATTRIBUTE_END);
- return CSS_SELECTOR_ATTRIBUTE_VALUE;
- }
- case 466 :
- break;
- case 68 :
- case 70 :
- case 139 :
- case 140 :
- case 201 :
- case 239 :
- case 277 :
- case 317 :
- case 357 : {
- yybegin(ST_DECLARATION_SEPARATOR);
- return CSS_DECLARATION_PROPERTY;
- }
- case 467 :
- break;
- case 71 : {
- yybegin(ST_DECLARATION);
- return CSS_DECLARATION_DELIMITER;
- }
- case 468 :
- break;
- case 72 : {
- yybegin(ST_DECLARATION_PRE_VALUE);
- return CSS_DECLARATION_SEPARATOR;
- }
- case 469 :
- break;
- case 73 :
- case 155 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_NUMBER;
- }
- case 470 :
- break;
- case 74 :
- case 79 :
- case 83 :
- case 147 :
- case 153 :
- case 154 :
- case 159 :
- case 203 :
- case 212 :
- case 241 :
- case 279 :
- case 319 :
- case 359 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_IDENT;
- }
- case 471 :
- break;
- case 78 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE;
- }
- case 472 :
- break;
- case 85 :
- case 86 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_OPERATOR;
- }
- case 473 :
- break;
- case 91 :
- case 166 :
- case 215 :
- case 250 :
- case 293 :
- case 332 :
- case 373 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_CLASS;
- }
- case 474 :
- break;
- case 93 :
- case 167 :
- case 216 :
- case 251 :
- case 294 :
- case 333 :
- case 374 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_ID;
- }
- case 475 :
- break;
- case 102 :
- case 176 :
- case 226 :
- case 258 :
- case 260 :
- case 300 :
- case 338 :
- case 378 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_PSEUDO;
- }
- case 476 :
- break;
- case 106 :
- case 178 :
- case 181 : {
- yybegin(ST_CHARSET_DELIMITER);
- return CSS_STRING;
- }
- case 477 :
- break;
- case 112 :
- case 184 :
- case 187 : {
- yybegin(ST_IMPORT_MEDIUM);
- return CSS_STRING;
- }
- case 478 :
- break;
- case 141 :
- case 202 :
- case 240 :
- case 278 :
- case 318 :
- case 358 :
- case 390 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_DIMENSION;
- }
- case 479 :
- break;
- case 144 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_PERCENTAGE;
- }
- case 480 :
- break;
- case 146 :
- case 247 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_FUNCTION;
- }
- case 481 :
- break;
- case 19 :
- case 21 :
- case 24 :
- case 25 :
- case 26 :
- case 28 :
- case 30 :
- case 31 :
- case 33 :
- case 34 :
- case 35 :
- case 37 :
- case 38 :
- case 39 :
- case 41 :
- case 45 :
- case 50 :
- case 53 :
- case 58 :
- case 61 :
- case 64 :
- case 65 :
- case 66 :
- case 69 :
- case 75 :
- case 76 :
- case 77 :
- case 80 :
- case 81 :
- case 82 :
- case 84 : {
- return UNDEFINED;
- }
- case 482 :
- break;
- default :
- if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
- yy_atEOF = true;
- return null;
- }
- else {
- yy_ScanError(YY_NO_MATCH);
- }
- }
- }
- }
-
- /**
- * Runs the scanner on input files.
- *
- * This main method is the debugging routine for the scanner. It prints
- * each returned token to System.out until the end of file is reached, or
- * an error occured.
- *
- * @param argv
- * the command line, contains the filenames to run the scanner
- * on.
- */
- public static void main(String argv[]) {
- for (int i = 0; i < argv.length; i++) {
- CSSTokenizer scanner = null;
- try {
- scanner = new CSSTokenizer(new java.io.FileReader(argv[i]));
- }
- catch (java.io.FileNotFoundException e) {
- System.out.println("File not found : \"" + argv[i] + "\"");
- System.exit(1);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- System.out.println("Usage : java CSSTokenizer <inputfile>");
- System.exit(1);
- }
-
- try {
- do {
- System.out.println(scanner.primGetNextToken());
- }
- while (!scanner.yy_atEOF);
-
- }
- catch (java.io.IOException e) {
- System.out.println("An I/O error occured while scanning :");
- System.out.println(e);
- System.exit(1);
- }
- catch (Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
- }
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSContextRegion.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSContextRegion.java
deleted file mode 100644
index 1548f41cab..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSContextRegion.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.css.core.internal.parser.regions;
-
-import org.eclipse.wst.sse.core.internal.parser.ContextRegion;
-
-public class CSSContextRegion extends ContextRegion {
- public CSSContextRegion(String context, int start, int textLength, int length) {
- fType = context;
- fStart = start;
- fTextLength = textLength;
- fLength = length;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSTextRegionFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSTextRegionFactory.java
deleted file mode 100644
index 2fcfa760c5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSTextRegionFactory.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.css.core.internal.parser.regions;
-
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-public class CSSTextRegionFactory {
- public synchronized static CSSTextRegionFactory getInstance() {
- if (fInstance == null) {
- fInstance = new CSSTextRegionFactory();
- }
- return fInstance;
- }
-
- public ITextRegion createRegion(String context, int start, int textLength, int length) {
- ITextRegion region = null;
- region = new CSSContextRegion(context, start, textLength, length);
- return region;
- }
-
- private CSSTextRegionFactory() {
- super();
- }
-
- private static CSSTextRegionFactory fInstance = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/tasks/CSSTaskTagSeeker.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/tasks/CSSTaskTagSeeker.java
deleted file mode 100644
index 95bb82eb73..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/tasks/CSSTaskTagSeeker.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.css.core.internal.tasks;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.sse.core.participants.TaskTagSeeker;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-public class CSSTaskTagSeeker extends TaskTagSeeker {
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.builder.participants.TaskTagSeeker#getCommentedText(org.eclipse.jface.text.IDocument,
- * int, int)
- */
- protected String getCommentedText(IDocument document, int begin, int length) throws BadLocationException {
- String text = super.getCommentedText(document, begin, length);
- if (text != null && text.endsWith("*/")) { //$NON-NLS-1$
- text = text.substring(0, text.length() - 2);
- }
- return text;
- }
-
- protected boolean isCommentRegion(IStructuredDocumentRegion region, ITextRegion textRegion) {
- return textRegion.getType().equals(CSSRegionContexts.CSS_COMMENT);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentReParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentReParser.java
deleted file mode 100644
index 804b480b4d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentReParser.java
+++ /dev/null
@@ -1,451 +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.css.core.internal.text;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredTextReParser;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/**
- * This class provides a centralized place to put "reparsing" logic. This is
- * the logic that reparses the text incrementally, as a user types in new
- * characters, or DOM nodes are inserted or deleted. Note: it is not a thread
- * safe class.
- */
-public class CSSStructuredDocumentReParser extends StructuredDocumentReParser {
-
- class ReparseRange {
- ReparseRange() {
- reset();
- }
-
- ReparseRange(int start, int end) {
- fRangeStart = start;
- fRangeEnd = end;
- }
-
- void setStart(int start) {
- fRangeStart = start;
- }
-
- void setEnd(int end) {
- fRangeEnd = end;
- }
-
- int getStart() {
- return fRangeStart;
- }
-
- int getEnd() {
- return fRangeEnd;
- }
-
- boolean isValid() {
- return (0 < fRangeEnd - fRangeStart) ? true : false;
- }
-
- void reset() {
- fRangeStart = Integer.MAX_VALUE;
- fRangeEnd = 0;
- }
-
- void expand(ReparseRange range) {
- if (range == null || !range.isValid()) {
- return;
- }
- int start = range.getStart();
- if (start < fRangeStart) {
- fRangeStart = start;
- }
- int end = range.getEnd();
- if (fRangeEnd < end) {
- fRangeEnd = end;
- }
- }
-
- private int fRangeStart;
- private int fRangeEnd;
- }
-
- /**
- *
- */
- public CSSStructuredDocumentReParser() {
- super();
- }
-
- /**
- *
- */
- // public StructuredDocumentEvent
- // checkForCrossStructuredDocumentRegionBoundryCases2() {
- // StructuredDocumentEvent result = specialPositionUpdate(fStart, fStart +
- // fLengthToReplace - 1);
- // if (result == null) {
- // result = checkInsideBrace();
- // }
- // return result;
- // }
- protected StructuredDocumentEvent checkForCrossStructuredDocumentRegionSyntax() {
- int checkStart = fStart;
- int checkEnd = fStart + fLengthToReplace - 1;
- IStructuredDocumentRegion endRegion = fStructuredDocument.getRegionAtCharacterOffset(checkEnd);
- if (endRegion != null) {
- checkEnd = endRegion.getEndOffset();
- }
-
- ReparseRange range = new ReparseRange(checkStart, checkEnd);
-
- range.expand(getUpdateRangeForDelimiter(range.getStart(), range.getEnd()));
- range.expand(getUpdateRangeForUnknownRegion(range.getStart(), range.getEnd()));
-
- range.expand(getUpdateRangeForQuotes(range.getStart(), range.getEnd()));
- range.expand(getUpdateRangeForComments(range.getStart(), range.getEnd()));
- range.expand(getUpdateRangeForBraces(range.getStart(), range.getEnd()));
-
- StructuredDocumentEvent result;
-
- result = checkInsideBrace(range.getStart(), range.getEnd());
-
- if (result == null) {
- result = reparse(range.getStart(), range.getEnd());
- }
-
- return result;
- }
-
- private ReparseRange getUpdateRangeForUnknownRegion(int start, int end) {
- int newStart = start;
- RegionIterator iterator = new RegionIterator(fStructuredDocument, start - 1);
- if (iterator.hasPrev()) {
- iterator.prev(); // skip myself
- }
- while (iterator.hasPrev()) {
- ITextRegion region = iterator.prev();
- if (region != null && region.getType() == CSSRegionContexts.CSS_UNKNOWN) {
- newStart = iterator.getStructuredDocumentRegion().getStartOffset(region);
- }
- else {
- break;
- }
- }
-
- if (start != newStart) {
- return new ReparseRange(newStart, end);
- }
-
- return null;
- }
-
- private ReparseRange getUpdateRangeForDelimiter(int start, int end) {
- if (dirtyStart != null && dirtyStart.getStart() < start) {
- start = dirtyStart.getStart();
- }
- IStructuredDocumentRegion docRegion = fStructuredDocument.getRegionAtCharacterOffset(start);
- if (docRegion == null) {
- return null;
- }
- if (docRegion.getType() == CSSRegionContexts.CSS_DELIMITER) {
- IStructuredDocumentRegion prevRegion = docRegion.getPrevious();
- if (prevRegion != null) {
- return new ReparseRange(prevRegion.getStart(), end);
- }
- }
-
- return null;
- }
-
- private ReparseRange getUpdateRangeForQuotes(int start, int end) {
- ReparseRange range = new ReparseRange();
-
- range.expand(getUpdateRangeForPair(start, end, "\"", "\"")); //$NON-NLS-2$//$NON-NLS-1$
- range.expand(getUpdateRangeForPair(start, end, "\'", "\'")); //$NON-NLS-2$//$NON-NLS-1$
-
- return (range.isValid()) ? range : null;
- }
-
- private ReparseRange getUpdateRangeForComments(int start, int end) {
- ReparseRange range = new ReparseRange();
-
- range.expand(getUpdateRangeForPair(start, end, "/*", "*/")); //$NON-NLS-2$//$NON-NLS-1$
- range.expand(getUpdateRangeForPair(start, end, "<%", "%>")); //$NON-NLS-2$//$NON-NLS-1$
-
- return (range.isValid()) ? range : null;
- }
-
- private ReparseRange getUpdateRangeForBraces(int start, int end) {
- ReparseRange range = new ReparseRange();
-
- range.expand(getUpdateRangeForPair(start, end, "[", "]")); //$NON-NLS-2$//$NON-NLS-1$
- range.expand(getUpdateRangeForPair(start, end, "(", ")")); //$NON-NLS-2$//$NON-NLS-1$
- range.expand(getUpdateRangeForPair(start, end, "{", "}")); //$NON-NLS-2$//$NON-NLS-1$
-
- return (range.isValid()) ? range : null;
- }
-
- private StructuredDocumentEvent checkInsideBrace(int start, int end) {
- StructuredDocumentEvent result = null;
- IStructuredDocumentRegion region = fStructuredDocument.getRegionAtCharacterOffset(start);
- if (region == null) {
- return null;
- }
- boolean bDeclaration = false;
- String type = region.getType();
- if (CSSRegionUtil.isDeclarationType(type) || type == CSSRegionContexts.CSS_LBRACE || type == CSSRegionContexts.CSS_RBRACE) {
- bDeclaration = true;
- }
- if (!bDeclaration) {
- IStructuredDocumentRegion prevRegion = CSSUtil.findPreviousSignificantNode(region);
- if (prevRegion != null) {
- type = prevRegion.getType();
- if (CSSRegionUtil.isDeclarationType(type) || type == CSSRegionContexts.CSS_LBRACE) {
- bDeclaration = true;
- }
- }
- }
- if (!bDeclaration) {
- IStructuredDocumentRegion nextRegion = CSSUtil.findNextSignificantNode(region);
- if (nextRegion != null) {
- type = nextRegion.getType();
- if (CSSRegionUtil.isDeclarationType(type) || type == CSSRegionContexts.CSS_RBRACE) {
- bDeclaration = true;
- }
- }
- }
-
- if (bDeclaration) {
- IStructuredDocumentRegion startRegion = findRuleStart(region);
- if (startRegion != null) {
- IStructuredDocumentRegion endRegion = fStructuredDocument.getRegionAtCharacterOffset(end);
- if (endRegion != null) {
- result = reparse(startRegion, endRegion);
- }
- }
- }
- return result;
- }
-
- private IStructuredDocumentRegion findRuleStart(IStructuredDocumentRegion startRegion) {
- IStructuredDocumentRegion region = startRegion;
- // find '{'
- while (region != null && region.getType() != CSSRegionContexts.CSS_LBRACE) {
- region = region.getPrevious();
- }
- // if (region == startRegion) {
- // return null;
- // }
- // else
- if (region != null) { // '{' is found
- region = region.getPrevious();
- if (isLeadingDeclarationType(region.getType())) {
- return region;
- }
- }
- return null;
- }
-
- private boolean isLeadingDeclarationType(String type) {
- return (type == CSSRegionContexts.CSS_PAGE || type == CSSRegionContexts.CSS_FONT_FACE || CSSRegionUtil.isSelectorType(type));
- }
-
- // public StructuredDocumentEvent
- // checkForCrossStructuredDocumentRegionBoundryCases() {
- // return specialPositionUpdate(fStart, fStart + fLengthToReplace - 1);
- // }
- /**
- *
- */
- private ReparseRange getUpdateRangeForPair(int start, int end, String opener, String closer) {
- StringBuffer deletionBuf = new StringBuffer();
- StringBuffer insertionBuf = new StringBuffer();
- int quoteLen = Math.max(opener.length(), closer.length());
- if (1 < quoteLen) {
- /**
- * ex) opener = "ABC", closer = "XYZ" model: ABCDEF.......UVWXYZ
- * deletion: CDEF.......UVWX pre/post: AB / YZ
- */
- int addStart = start - (quoteLen - 1);
- if (0 <= addStart) {
- String addStr = fStructuredDocument.get(addStart, quoteLen - 1);
- deletionBuf.append(addStr);
- insertionBuf.append(addStr);
- }
- deletionBuf.append(fDeletedText);
- insertionBuf.append(fChanges);
- if (end + (quoteLen - 1) < fStructuredDocument.getLength()) {
- String addStr = fStructuredDocument.get(end + 1, quoteLen - 1);
- deletionBuf.append(addStr);
- insertionBuf.append(addStr);
- }
- }
- else {
- deletionBuf.append(fDeletedText);
- insertionBuf.append(fChanges);
- }
- String deletion = deletionBuf.toString();
- String insertion = insertionBuf.toString();
-
- int rangeStart = start;
- int rangeEnd = end;
-
- if (0 <= deletion.indexOf(opener) || 0 <= deletion.indexOf(closer) || 0 <= insertion.indexOf(opener) || 0 <= insertion.indexOf(closer)) {
- int s, e;
- try {
- if (start <= fStructuredDocument.getLength()) {
- IRegion startRegion = getFindReplaceDocumentAdapter().find(start - 1, opener, false, false, false, false);
- if (startRegion != null) {
- s = startRegion.getOffset();
- }
- else {
- s = -1;
- }
- }
- else {
- s = -1;
- }
- if (end < fStructuredDocument.getLength() - 1) {
- IRegion endRegion = getFindReplaceDocumentAdapter().find(end + 1, closer, true, false, false, false);
- if (endRegion != null) {
- e = endRegion.getOffset();
- }
- else {
- e = -1;
- }
- }
- else {
- e = -1;
- }
- }
- catch (BadLocationException ex) {
- Logger.logException(ex);
- return null;
- }
- if (0 <= s) {
- rangeStart = Math.min(rangeStart, s);
- }
- if (0 <= e) {
- rangeEnd = Math.max(rangeEnd, e);
- }
- }
-
- if (rangeStart < start || end < rangeEnd) {
- return new ReparseRange(rangeStart, rangeEnd);
- }
- else {
- return null;
- }
- }
-
- // /**
- // * A method to allow any heuristic "quick checks" that might cover many
- // * many cases, before expending the time on a full reparse.
- // *
- // */
- // public StructuredDocumentEvent quickCheck2() {
- // StructuredDocumentEvent result = null;
- // int end = fStart + fLengthToReplace - 1;
- //
- // result = specialNodeUpdate(fStart, end);
- //
- // if (result == null) {
- // result = super.quickCheck();
- // }
- //
- // return result;
- // }
-
- // /**
- // *
- // */
- // private StructuredDocumentEvent specialNodeUpdate(int start, int end) {
- // int reparseStart = start;
- // int reparseEnd = end;
- // IStructuredDocumentRegion targetNode;
- // IStructuredDocumentRegion node;
- // // targetNode = skipLeadingBlank(node);
- // // if (targetNode != null && targetNode != node &&
- // // (targetNode instanceof
- // // com.ibm.sed.structuredDocument.impl.IStructuredDocumentRegion)) {
- // node = fStructuredDocument.getRegionAtCharacterOffset(start);
- // targetNode = CSSUtil.findPreviousSignificantNode(node);
- // if (targetNode != null && targetNode != node) {
- // reparseStart = Math.min(reparseStart, targetNode.getStart());
- // }
- //
- // // targetNode = skipTrailingBlank(node);
- // // if (targetNode != null && targetNode != node &&
- // // (targetNode instanceof
- // // com.ibm.sed.structuredDocument.impl.IStructuredDocumentRegion)) {
- // node = fStructuredDocument.getRegionAtCharacterOffset(end);
- // targetNode = CSSUtil.findNextSignificantNode(node);
- // if (targetNode != null && targetNode != node) {
- // reparseEnd = Math.max(reparseEnd, targetNode.getEnd());
- // }
- //
- // if (reparseStart != start || reparseEnd != end) {
- // return reparse(reparseStart, reparseEnd);
- // } else {
- // return null;
- // }
- // }
- // /**
- // * If following charater(s) is in changes, It is necessary to parse
- // nodes
- // * which are in forward and/or backward.
- // *
- // * openers : [, (, \/\* closers : ], ), \*\/ quotes : ", '
- // */
- // private StructuredDocumentEvent specialPositionUpdate(int start, int
- // end) {
- // String[] openers = { "[", "(", "/*", "\"", "'", "<%" };
- // //$NON-NLS-6$//$NON-NLS-5$//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- // String[] closers = { "]", ")", "*/", "\"", "'", "%>" };
- // //$NON-NLS-6$//$NON-NLS-5$//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- //
- // int rangeStart = Integer.MAX_VALUE;
- // int rangeEnd = 0;
- //
- // for (int i = 0; i < openers.length && i < closers.length; i++) {
- // ReparseRange range = getUpdateRangeForPair(start, end, openers[i],
- // closers[i]);
- // if (range != null) {
- // rangeStart = Math.min(rangeStart, range.getStart());
- // rangeEnd = Math.max(rangeEnd, range.getEnd());
- // break;
- // }
- // }
- //
- // if (rangeStart < rangeEnd) {
- // return reparse(rangeStart, rangeEnd);
- // } else {
- // return null;
- // }
- // }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.model.internal.text.StructuredDocumentReParser#newInstance()
- */
- public IStructuredTextReParser newInstance() {
- return new CSSStructuredDocumentReParser();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentRegionFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentRegionFactory.java
deleted file mode 100644
index ad51596563..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentRegionFactory.java
+++ /dev/null
@@ -1,39 +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.css.core.internal.text;
-
-
-
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-/**
- *
- */
-public class CSSStructuredDocumentRegionFactory {
-
- public static final int CSS_GENERIC = 101109;
-
- /**
- *
- */
- public static IStructuredDocumentRegion createStructuredDocumentRegion(int type) {
- IStructuredDocumentRegion instance = null;
- switch (type) {
- case CSS_GENERIC :
- instance = new BasicStructuredDocumentRegion();
- break;
- default :
- break;
- }
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredDocumentWalker.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredDocumentWalker.java
deleted file mode 100644
index bab57dd336..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredDocumentWalker.java
+++ /dev/null
@@ -1,169 +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.css.core.internal.text;
-
-
-
-import java.util.Enumeration;
-
-import org.eclipse.wst.sse.core.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.events.StructuredDocumentRegionsReplacedEvent;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.util.Utilities;
-
-public class StructuredDocumentWalker {
-
- IStructuredDocumentRegionList fOldStructuredDocumentRegionList = null;
- IStructuredDocument fStructuredDocument = null;
- String fOriginalChanges = null;
- int fOriginalOffset = 0;
- int fOriginalLengthToReplace = 0;
- int fLengthDifference = 0;
-
- /**
- *
- */
- public StructuredDocumentWalker() {
- }
-
- /**
- *
- */
- public StructuredDocumentWalker(StructuredDocumentEvent event) {
- initialize(event);
- }
-
- /**
- *
- */
- public IStructuredDocument getStructuredDocument() {
- return fStructuredDocument;
- }
-
- /**
- * Old Nodes: --[O1]--[O2]--[O3]--- : / \ Current Nodes:
- * ---[C1]-----[C2]-----[C3]-----[C4]---
- *
- * Input: O1 -> Output: O2 Input: O2 -> Output: O3 Input: O3 -> Output: C4
- * Input: Cn -> Output: Cn+1
- */
- public IStructuredDocumentRegion getNextNode(IStructuredDocumentRegion node) {
- IStructuredDocumentRegion nextNode = null;
- if (node != null) {
- nextNode = node.getNext();
- if (nextNode == null) {
- if (isOldNode(node)) {
- // this may be the end of old flatnodes
- int newStart = node.getEnd() - fLengthDifference;
- nextNode = fStructuredDocument.getRegionAtCharacterOffset(newStart);
- }
- }
- }
- return nextNode;
- }
-
- /**
- * Old Nodes: --[O1]--[O2]--[O3]--- : / \ Current Nodes:
- * ---[C1]-----[C2]-----[C3]-----[C4]---
- *
- * Input: O* -> Output: C4 Input: Cn -> Output: Cn+1
- */
- public IStructuredDocumentRegion getNextNodeInCurrent(IStructuredDocumentRegion node) {
- IStructuredDocumentRegion nextNode = null;
- if (isOldNode(node)) {
- IStructuredDocumentRegion oldEndNode = fOldStructuredDocumentRegionList.item(fOldStructuredDocumentRegionList.getLength() - 1);
- int newStart = oldEndNode.getEnd() - fLengthDifference;
- nextNode = fStructuredDocument.getRegionAtCharacterOffset(newStart);
- }
- else if (node != null) {
- nextNode = node.getNext();
- }
- return nextNode;
- }
-
- /**
- * Old Nodes: --[O1]--[O2]--[O3]--- : / \ Current Nodes:
- * ---[C1]-----[C2]-----[C3]-----[C4]---
- *
- * Input: O1 -> Output: C1 Input: O2 -> Output: O1 Input: O3 -> Output: O2
- * Input: Cn -> Output: Cn-1
- */
- public IStructuredDocumentRegion getPrevNode(IStructuredDocumentRegion node) {
- IStructuredDocumentRegion prevNode = null;
- if (node != null) {
- prevNode = node.getPrevious();
- if (prevNode == null) {
- if (isOldNode(node)) {
- // this may be the start of old flatnodes
- int newEnd = node.getStart() - 1;
- prevNode = fStructuredDocument.getRegionAtCharacterOffset(newEnd);
- }
- }
- }
- return prevNode;
- }
-
- /**
- * Old Nodes: --[O1]--[O2]--[O3]--- : / \ Current Nodes:
- * ---[C1]-----[C2]-----[C3]-----[C4]---
- *
- * Input: O* -> Output: C1 Input: Cn -> Output: Cn-1
- */
- public IStructuredDocumentRegion getPrevNodeInCurrent(IStructuredDocumentRegion node) {
- IStructuredDocumentRegion prevNode = null;
- if (isOldNode(node)) {
- IStructuredDocumentRegion oldStartNode = fOldStructuredDocumentRegionList.item(0);
- int newEnd = oldStartNode.getStart() - 1;
- prevNode = fStructuredDocument.getRegionAtCharacterOffset(newEnd);
- }
- else if (node != null) {
- prevNode = node.getPrevious();
- }
- return prevNode;
- }
-
- /**
- *
- */
- public void initialize(StructuredDocumentEvent event) {
- fStructuredDocument = event.getStructuredDocument();
- fOriginalChanges = event.getText();
- fOriginalOffset = event.getOriginalStart();
- fOriginalLengthToReplace = event.getLength();
- fLengthDifference = Utilities.calculateLengthDifference(fOriginalChanges, fOriginalLengthToReplace);
-
- if (event instanceof StructuredDocumentRegionsReplacedEvent) {
- fOldStructuredDocumentRegionList = ((StructuredDocumentRegionsReplacedEvent) event).getOldStructuredDocumentRegions();
- }
- else {
- fOldStructuredDocumentRegionList = null;
- }
- }
-
- /**
- *
- */
- public boolean isOldNode(IStructuredDocumentRegion node) {
- boolean bOld = false;
- if (fOldStructuredDocumentRegionList != null) {
- Enumeration e = fOldStructuredDocumentRegionList.elements();
- while (e.hasMoreElements()) {
- if (e.nextElement() == node) {
- bOld = true;
- break;
- }
- }
- }
- return bOld;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/rules/StructuredTextPartitionerForCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/rules/StructuredTextPartitionerForCSS.java
deleted file mode 100644
index 7366a2118b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/rules/StructuredTextPartitionerForCSS.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.css.core.internal.text.rules;
-
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner;
-
-public class StructuredTextPartitionerForCSS extends StructuredTextPartitioner {
- public final static String ST_STYLE = "org.eclipse.wst.css.STYLE"; //$NON-NLS-1$
- public final static String[] legalTypes = new String[]{ST_STYLE, StructuredTextPartitioner.ST_DEFAULT_PARTITION};
-
- public StructuredTextPartitionerForCSS() {
- super();
- }
-
- public String getDefault() {
- return ST_STYLE;
- }
-
- public String[] getLegalContentTypes() {
- return legalTypes;
- }
-
- public IDocumentPartitioner newInstance() {
- return new StructuredTextPartitionerForCSS();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMCategory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMCategory.java
deleted file mode 100644
index 86a57db021..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMCategory.java
+++ /dev/null
@@ -1,16 +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.css.core.metamodel;
-
-public interface CSSMMCategory extends CSSMMNode {
-
- String getCaption();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMCharsetRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMCharsetRule.java
deleted file mode 100644
index 226f26abd3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMCharsetRule.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMCharsetRule extends CSSMMNode {
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMContainer.java
deleted file mode 100644
index 0dfe14c32d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMContainer.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMContainer extends CSSMMNode {
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMDescriptor.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMDescriptor.java
deleted file mode 100644
index 91364d5da6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMDescriptor.java
+++ /dev/null
@@ -1,20 +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.css.core.metamodel;
-
-
-
-import java.util.Iterator;
-
-public interface CSSMMDescriptor extends CSSMMNode {
-
- Iterator getValues();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMFontFaceRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMFontFaceRule.java
deleted file mode 100644
index 6a96552c84..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMFontFaceRule.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMFontFaceRule extends CSSMMNode {
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMFunction.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMFunction.java
deleted file mode 100644
index 6b79c6c835..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMFunction.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMFunction extends CSSMMNode {
-
- String getFunctionString();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMImportRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMImportRule.java
deleted file mode 100644
index ab0a0f3ccc..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMImportRule.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMImportRule extends CSSMMNode {
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMKeyword.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMKeyword.java
deleted file mode 100644
index 143a1de83b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMKeyword.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMKeyword extends CSSMMNode {
-
- String getKeywordString();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMMediaRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMMediaRule.java
deleted file mode 100644
index 637c38bf7f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMMediaRule.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMMediaRule extends CSSMMNode {
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMNode.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMNode.java
deleted file mode 100644
index 2432fac4a0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMNode.java
+++ /dev/null
@@ -1,51 +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.css.core.metamodel;
-
-
-
-import java.util.Iterator;
-
-public interface CSSMMNode {
- String getType();
-
- String getName();
-
- String getDescription();
-
- String getAttribute(String name);
-
- Iterator getChildNodes();
-
- Iterator getDescendants();
-
-
- static final String _PREFIX = "CSSMM."; //$NON-NLS-1$
- static final String TYPE_KEYWORD = _PREFIX + "Keyword"; //$NON-NLS-1$
- static final String TYPE_UNIT = _PREFIX + "Unit"; //$NON-NLS-1$
- static final String TYPE_FUNCTION = _PREFIX + "Function"; //$NON-NLS-1$
- static final String TYPE_STRING = _PREFIX + "String"; //$NON-NLS-1$
- static final String TYPE_STYLE_SHEET = _PREFIX + "StyleSheet"; //$NON-NLS-1$
- static final String TYPE_PROPERTY = _PREFIX + "Property"; //$NON-NLS-1$
- static final String TYPE_DESCRIPTOR = _PREFIX + "Descriptor"; //$NON-NLS-1$
- static final String TYPE_CONTAINER = _PREFIX + "Container"; //$NON-NLS-1$
- static final String TYPE_NUMBER = _PREFIX + "Number"; //$NON-NLS-1$
- static final String TYPE_SEPARATOR = _PREFIX + "Separator"; //$NON-NLS-1$
- static final String TYPE_CHARSET_RULE = _PREFIX + "CharsetRule"; //$NON-NLS-1$
- static final String TYPE_IMPORT_RULE = _PREFIX + "ImportRule"; //$NON-NLS-1$
- static final String TYPE_STYLE_RULE = _PREFIX + "StyleRule"; //$NON-NLS-1$
- static final String TYPE_MEDIA_RULE = _PREFIX + "MediaRule"; //$NON-NLS-1$
- static final String TYPE_PAGE_RULE = _PREFIX + "PageRule"; //$NON-NLS-1$
- static final String TYPE_FONT_FACE_RULE = _PREFIX + "FontFaceRule"; //$NON-NLS-1$
- static final String TYPE_CATEGORY = _PREFIX + "Category"; //$NON-NLS-1$
- static final String TYPE_META_MODEL = _PREFIX + "MetaModel"; //$NON-NLS-1$
- static final String TYPE_SELECTOR = _PREFIX + "Selector"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMNumber.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMNumber.java
deleted file mode 100644
index ab80143f45..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMNumber.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMNumber extends CSSMMNode {
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMPageRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMPageRule.java
deleted file mode 100644
index 5018390b4d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMPageRule.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMPageRule extends CSSMMNode {
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMProperty.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMProperty.java
deleted file mode 100644
index 6b9a6b016a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMProperty.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.css.core.metamodel;
-
-
-
-import java.util.Iterator;
-
-public interface CSSMMProperty extends CSSMMNode {
-
- String getCategoryName();
-
- Iterator getValues();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMSelector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMSelector.java
deleted file mode 100644
index 058c9e889f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMSelector.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.css.core.metamodel;
-
-public interface CSSMMSelector extends CSSMMNode {
- String getSelectorType();
-
- String getSelectorString();
-
-
- static final String TYPE_EXPRESSION = "Expression"; //$NON-NLS-1$
- static final String TYPE_PSEUDO_CLASS = "PseudoClass"; //$NON-NLS-1$
- static final String TYPE_PSEUDO_ELEMENT = "PseudoElement"; //$NON-NLS-1$
-
- // embedded expression type
- static final String EXPRESSION_DESCENDANT = "descendant"; //$NON-NLS-1$
- static final String EXPRESSION_CHILD = "child"; //$NON-NLS-1$
- static final String EXPRESSION_ADJACENT = "adjacent"; //$NON-NLS-1$
- static final String EXPRESSION_UNIVERSAL = "universal"; //$NON-NLS-1$
- static final String EXPRESSION_ATTRIBUTE = "attribute"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMString.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMString.java
deleted file mode 100644
index 024a98aac1..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMString.java
+++ /dev/null
@@ -1,17 +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.css.core.metamodel;
-
-
-
-public interface CSSMMString extends CSSMMNode {
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMStyleRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMStyleRule.java
deleted file mode 100644
index 3257cc2229..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMStyleRule.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMStyleRule extends CSSMMNode {
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMStyleSheet.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMStyleSheet.java
deleted file mode 100644
index f37b11ca3a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMStyleSheet.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMStyleSheet extends CSSMMNode {
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMUnit.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMUnit.java
deleted file mode 100644
index 798591f086..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMMUnit.java
+++ /dev/null
@@ -1,18 +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.css.core.metamodel;
-
-
-
-public interface CSSMMUnit extends CSSMMNode {
-
- String getUnitString();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMetaModel.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMetaModel.java
deleted file mode 100644
index 1ced2a9fba..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSMetaModel.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.metamodel;
-
-
-
-import java.util.Iterator;
-
-public interface CSSMetaModel extends CSSMMNode {
-
- // public interface CSSMetaModel {
- CSSMMStyleSheet getStyleSheet();
-
- /*
- * Shortcut to access property node
- */
- // Iterator getProperties();
- // Iterator getDescriptors();
- // CSSMMProperty getProperty(String propertyName);
- /*
- * access to category information
- */
- Iterator getCategories();
-
- /*
- * Utilities
- */
- // Iterator collectNodesByType(String type);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSProfile.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSProfile.java
deleted file mode 100644
index 231504278d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSProfile.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.css.core.metamodel;
-
-
-
-import java.net.URL;
-
-
-public interface CSSProfile {
-
- String getProfileID();
-
- String getProfileName();
-
- URL getProfileURL();
-
- CSSMetaModel getMetaModel();
-
- boolean isDefault();
-
- String getOwnerPluginID();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSProfileRegistry.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSProfileRegistry.java
deleted file mode 100644
index 870b793804..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/CSSProfileRegistry.java
+++ /dev/null
@@ -1,69 +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.css.core.metamodel;
-
-
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.wst.css.core.internal.metamodel.RegistryReader;
-
-
-
-public class CSSProfileRegistry {
- public synchronized static CSSProfileRegistry getInstance() {
- if (fInstance == null) {
- fInstance = new CSSProfileRegistry();
- }
- return fInstance;
- }
-
- public Iterator getProfiles() {
- return Collections.unmodifiableCollection(fProfiles.values()).iterator();
- }
-
- public CSSProfile getProfile(String profileID) {
- return (CSSProfile) fProfiles.get(profileID);
- }
-
- public CSSProfile getDefaultProfile() {
- Iterator i = getProfiles();
- while (i.hasNext()) {
- CSSProfile profile = (CSSProfile) i.next();
- if (profile.isDefault()) {
- return profile;
- }
- }
- return null;
- }
-
- /**
- * Constructor for CSSProfileRegistry.
- */
- private CSSProfileRegistry() {
- super();
- fProfiles = new HashMap();
- Iterator i = new RegistryReader().enumProfiles();
- while (i.hasNext()) {
- Object profile = i.next();
- if (profile instanceof CSSProfile) {
- fProfiles.put(((CSSProfile) profile).getProfileID(), profile);
- }
- }
- }
-
-
- private static CSSProfileRegistry fInstance = null;
- private Map fProfiles = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSFunctionID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSFunctionID.java
deleted file mode 100644
index 9adc8da12c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSFunctionID.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.css.core.metamodel.util;
-
-public interface CSSFunctionID {
-
- final static String F_ATTR = "attr"; //$NON-NLS-1$
- final static String F_COUNTER = "counter"; //$NON-NLS-1$
- final static String F_RGB = "rgb"; //$NON-NLS-1$
- final static String F_RECT = "rect"; //$NON-NLS-1$
- final static String F_URI = "uri"; //$NON-NLS-1$
- final static String F_FORMAT = "format"; //$NON-NLS-1$
- final static String F_LOCAL = "local"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSKeywordID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSKeywordID.java
deleted file mode 100644
index f2e1ce123d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSKeywordID.java
+++ /dev/null
@@ -1,261 +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.css.core.metamodel.util;
-
-public interface CSSKeywordID {
-
- final static String K_100 = "100"; //$NON-NLS-1$
- final static String K_200 = "200"; //$NON-NLS-1$
- final static String K_300 = "300"; //$NON-NLS-1$
- final static String K_400 = "400"; //$NON-NLS-1$
- final static String K_500 = "500"; //$NON-NLS-1$
- final static String K_600 = "600"; //$NON-NLS-1$
- final static String K_700 = "700"; //$NON-NLS-1$
- final static String K_800 = "800"; //$NON-NLS-1$
- final static String K_900 = "900"; //$NON-NLS-1$
- final static String K_ABOVE = "above"; //$NON-NLS-1$
- final static String K_ABSOLUTE = "absolute"; //$NON-NLS-1$
- final static String K_ACTIVEBORDER = "ActiveBorder"; //$NON-NLS-1$
- final static String K_ACTIVECAPTION = "ActiveCaption"; //$NON-NLS-1$
- final static String K_ALL = "all"; //$NON-NLS-1$
- final static String K_ALWAYS = "always"; //$NON-NLS-1$
- final static String K_APPWORKSPACE = "AppWorkspace"; //$NON-NLS-1$
- final static String K_AQUA = "aqua"; //$NON-NLS-1$
- final static String K_ARMENIAN = "armenian"; //$NON-NLS-1$
- final static String K_AUTO = "auto"; //$NON-NLS-1$
- final static String K_AVOID = "avoid"; //$NON-NLS-1$
- final static String K_BACKGROUND = "Background"; //$NON-NLS-1$
- final static String K_BASELINE = "baseline"; //$NON-NLS-1$
- final static String K_BEHIND = "behind"; //$NON-NLS-1$
- final static String K_BELOW = "below"; //$NON-NLS-1$
- final static String K_BIDI_OVERRIDE = "bidi-override"; //$NON-NLS-1$
- final static String K_BLACK = "black"; //$NON-NLS-1$
- final static String K_BLINK = "blink"; //$NON-NLS-1$
- final static String K_BLOCK = "block"; //$NON-NLS-1$
- final static String K_BLUE = "blue"; //$NON-NLS-1$
- final static String K_BOLD = "bold"; //$NON-NLS-1$
- final static String K_BOLDER = "bolder"; //$NON-NLS-1$
- final static String K_BOTH = "both"; //$NON-NLS-1$
- final static String K_BOTTOM = "bottom"; //$NON-NLS-1$
- final static String K_BUTTONFACE = "ButtonFace"; //$NON-NLS-1$
- final static String K_BUTTONHIGHLIGHT = "ButtonHighlight"; //$NON-NLS-1$
- final static String K_BUTTONSHADOW = "ButtonShadow"; //$NON-NLS-1$
- final static String K_BUTTONTEXT = "ButtonText"; //$NON-NLS-1$
- final static String K_CAPITALIZE = "capitalize"; //$NON-NLS-1$
- final static String K_CAPTION = "caption"; //$NON-NLS-1$
- final static String K_CAPTIONTEXT = "CaptionText"; //$NON-NLS-1$
- final static String K_CENTER = "center"; //$NON-NLS-1$
- final static String K_CENTER_LEFT = "center-left"; //$NON-NLS-1$
- final static String K_CENTER_RIGHT = "center-right"; //$NON-NLS-1$
- final static String K_CHILD = "child"; //$NON-NLS-1$
- final static String K_CIRCLE = "circle"; //$NON-NLS-1$
- final static String K_CJK_IDEOGRAPHIC = "cjk-ideographic"; //$NON-NLS-1$
- final static String K_CLOSE_QUOTE = "close-quote"; //$NON-NLS-1$
- final static String K_CODE = "code"; //$NON-NLS-1$
- final static String K_CONDENSED = "condensed"; //$NON-NLS-1$
- final static String K_COLLAPSE = "collapse"; //$NON-NLS-1$
- final static String K_COMPACT = "compact"; //$NON-NLS-1$
- final static String K_CONTINUOUS = "continuous"; //$NON-NLS-1$
- final static String K_CROP = "crop"; //$NON-NLS-1$
- final static String K_CROSS = "cross"; //$NON-NLS-1$
- final static String K_CROSSHAIR = "crosshair"; //$NON-NLS-1$
- final static String K_CURSIVE = "cursive"; //$NON-NLS-1$
- final static String K_DASHED = "dashed"; //$NON-NLS-1$
- final static String K_DECIMAL = "decimal"; //$NON-NLS-1$
- final static String K_DECIMAL_LEADING_ZERO = "decimal-leading-zero"; //$NON-NLS-1$
- final static String K_DEFAULT = "default"; //$NON-NLS-1$
- final static String K_DIGITS = "digits"; //$NON-NLS-1$
- final static String K_DISC = "disc"; //$NON-NLS-1$
- final static String K_DOTTED = "dotted"; //$NON-NLS-1$
- final static String K_DOUBLE = "double"; //$NON-NLS-1$
- final static String K_E_RESIZE = "e-resize"; //$NON-NLS-1$
- final static String K_EMBED = "embed"; //$NON-NLS-1$
- final static String K_EXPANDED = "expanded"; //$NON-NLS-1$
- final static String K_EXTRA_CONDENSED = "extra-condensed"; //$NON-NLS-1$
- final static String K_EXTRA_EXPANDED = "extra-expanded"; //$NON-NLS-1$
- final static String K_FANTASY = "fantasy"; //$NON-NLS-1$
- final static String K_FAR_LEFT = "far-left"; //$NON-NLS-1$
- final static String K_FAR_RIGHT = "far-right"; //$NON-NLS-1$
- final static String K_FAST = "fast"; //$NON-NLS-1$
- final static String K_FASTER = "faster"; //$NON-NLS-1$
- final static String K_FEMALE = "female"; //$NON-NLS-1$
- final static String K_FIXED = "fixed"; //$NON-NLS-1$
- final static String K_FUCHSIA = "fuchsia"; //$NON-NLS-1$
- final static String K_GEORGIAN = "georgian"; //$NON-NLS-1$
- final static String K_GRAY = "gray"; //$NON-NLS-1$
- final static String K_GRAYTEXT = "GrayText"; //$NON-NLS-1$
- final static String K_GREEN = "green"; //$NON-NLS-1$
- final static String K_GROOVE = "groove"; //$NON-NLS-1$
- final static String K_HEBREW = "hebrew"; //$NON-NLS-1$
- final static String K_HELP = "help"; //$NON-NLS-1$
- final static String K_HIDDEN = "hidden"; //$NON-NLS-1$
- final static String K_HIDE = "hide"; //$NON-NLS-1$
- final static String K_HIGH = "high"; //$NON-NLS-1$
- final static String K_HIGHLIGHT = "Highlight"; //$NON-NLS-1$
- final static String K_HIGHLIGHTTEXT = "HighlightText"; //$NON-NLS-1$
- final static String K_HIGHER = "higher"; //$NON-NLS-1$
- final static String K_HIRAGANA = "hiragana"; //$NON-NLS-1$
- final static String K_HIRAGANA_IROHA = "hiragana-iroha"; //$NON-NLS-1$
- final static String K_ICON = "icon"; //$NON-NLS-1$
- final static String K_INACTIVEBORDER = "InactiveBorder"; //$NON-NLS-1$
- final static String K_INACTIVECAPTION = "InactiveCaption"; //$NON-NLS-1$
- final static String K_INACTIVECAPTIONTEXT = "InactiveCaptionText"; //$NON-NLS-1$
- final static String K_INFOBACKGROUND = "InfoBackground"; //$NON-NLS-1$
- final static String K_INFOTEXT = "InfoText"; //$NON-NLS-1$
- final static String K_INLINE = "inline"; //$NON-NLS-1$
- final static String K_INLINE_TABLE = "inline-table"; //$NON-NLS-1$
- final static String K_INSET = "inset"; //$NON-NLS-1$
- final static String K_INSIDE = "inside"; //$NON-NLS-1$
- final static String K_INVERT = "invert"; //$NON-NLS-1$
- final static String K_ITALIC = "italic"; //$NON-NLS-1$
- final static String K_JUSTIFY = "justify"; //$NON-NLS-1$
- final static String K_KATAKANA = "katakana"; //$NON-NLS-1$
- final static String K_KATAKANA_IROHA = "katakana-iroha"; //$NON-NLS-1$
- final static String K_LANDSCAPE = "landscape"; //$NON-NLS-1$
- final static String K_LARGE = "large"; //$NON-NLS-1$
- final static String K_LARGER = "larger"; //$NON-NLS-1$
- final static String K_LEFT = "left"; //$NON-NLS-1$
- final static String K_LEFT_SIDE = "left-side"; //$NON-NLS-1$
- final static String K_LEFTWARDS = "leftwards"; //$NON-NLS-1$
- final static String K_LEVEL = "level"; //$NON-NLS-1$
- final static String K_LIGHTER = "lighter"; //$NON-NLS-1$
- final static String K_LIME = "lime"; //$NON-NLS-1$
- final static String K_LINE_THROUGH = "line-through"; //$NON-NLS-1$
- final static String K_LIST_ITEM = "list-item"; //$NON-NLS-1$
- final static String K_LOUD = "loud"; //$NON-NLS-1$
- final static String K_LOW = "low"; //$NON-NLS-1$
- final static String K_LOWER = "lower"; //$NON-NLS-1$
- final static String K_LOWER_ALPHA = "lower-alpha"; //$NON-NLS-1$
- final static String K_LOWER_GREEK = "lower-greek"; //$NON-NLS-1$
- final static String K_LOWER_LATIN = "lower-latin"; //$NON-NLS-1$
- final static String K_LOWER_ROMAN = "lower-roman"; //$NON-NLS-1$
- final static String K_LOWERCASE = "lowercase"; //$NON-NLS-1$
- final static String K_LTR = "ltr"; //$NON-NLS-1$
- final static String K_MALE = "male"; //$NON-NLS-1$
- final static String K_MARKER = "marker"; //$NON-NLS-1$
- final static String K_MAROON = "maroon"; //$NON-NLS-1$
- final static String K_MEDIUM = "medium"; //$NON-NLS-1$
- final static String K_MENU = "menu"; //$NON-NLS-1$
- final static String K_MENUTEXT = "MenuText"; //$NON-NLS-1$
- final static String K_MESSAGE_BOX = "message-box"; //$NON-NLS-1$
- final static String K_MIDDLE = "middle"; //$NON-NLS-1$
- final static String K_MIX = "mix"; //$NON-NLS-1$
- final static String K_MONOSPACE = "monospace"; //$NON-NLS-1$
- final static String K_MOVE = "move"; //$NON-NLS-1$
- final static String K_N_RESIZE = "n-resize"; //$NON-NLS-1$
- final static String K_NARROWER = "narrower"; //$NON-NLS-1$
- final static String K_NAVY = "navy"; //$NON-NLS-1$
- final static String K_NE_RESIZE = "ne-resize"; //$NON-NLS-1$
- final static String K_NO_CLOSE_QUOTE = "no-close-quote"; //$NON-NLS-1$
- final static String K_NO_OPEN_QUOTE = "no-open-quote"; //$NON-NLS-1$
- final static String K_NO_REPEAT = "no-repeat"; //$NON-NLS-1$
- final static String K_NONE = "none"; //$NON-NLS-1$
- final static String K_NORMAL = "normal"; //$NON-NLS-1$
- final static String K_NOWRAP = "nowrap"; //$NON-NLS-1$
- final static String K_NW_RESIZE = "nw-resize"; //$NON-NLS-1$
- final static String K_OBLIQUE = "oblique"; //$NON-NLS-1$
- final static String K_OLIVE = "olive"; //$NON-NLS-1$
- final static String K_ONCE = "once"; //$NON-NLS-1$
- final static String K_OPEN_QUOTE = "open-quote"; //$NON-NLS-1$
- final static String K_OUTSET = "outset"; //$NON-NLS-1$
- final static String K_OUTSIDE = "outside"; //$NON-NLS-1$
- final static String K_OVERLINE = "overline"; //$NON-NLS-1$
- final static String K_POINTER = "pointer"; //$NON-NLS-1$
- final static String K_PORTRAIT = "portrait"; //$NON-NLS-1$
- final static String K_PRE = "pre"; //$NON-NLS-1$
- final static String K_PURPLE = "purple"; //$NON-NLS-1$
- final static String K_RED = "red"; //$NON-NLS-1$
- final static String K_RELATIVE = "relative"; //$NON-NLS-1$
- final static String K_REPEAT = "repeat"; //$NON-NLS-1$
- final static String K_REPEAT_X = "repeat-x"; //$NON-NLS-1$
- final static String K_REPEAT_Y = "repeat-y"; //$NON-NLS-1$
- final static String K_RIDGE = "ridge"; //$NON-NLS-1$
- final static String K_RIGHT = "right"; //$NON-NLS-1$
- final static String K_RIGHT_SIDE = "right-side"; //$NON-NLS-1$
- final static String K_RIGHTWARDS = "rightwards"; //$NON-NLS-1$
- final static String K_RTL = "rtl"; //$NON-NLS-1$
- final static String K_RUN_IN = "run-in"; //$NON-NLS-1$
- final static String K_S_RESIZE = "s-resize"; //$NON-NLS-1$
- final static String K_SANS_SERIF = "sans-serif"; //$NON-NLS-1$
- final static String K_SCROLL = "scroll"; //$NON-NLS-1$
- final static String K_SCROLLBAR = "Scrollbar"; //$NON-NLS-1$
- final static String K_SE_RESIZE = "se-resize"; //$NON-NLS-1$
- final static String K_SEMI_CONDENSED = "semi-condensed"; //$NON-NLS-1$
- final static String K_SEMI_EXPANDED = "semi-expanded"; //$NON-NLS-1$
- final static String K_SEPARATE = "separate"; //$NON-NLS-1$
- final static String K_SERIF = "serif"; //$NON-NLS-1$
- final static String K_SHOW = "show"; //$NON-NLS-1$
- final static String K_SILENT = "silent"; //$NON-NLS-1$
- final static String K_SILVER = "silver"; //$NON-NLS-1$
- final static String K_SLOW = "slow"; //$NON-NLS-1$
- final static String K_SLOWER = "slower"; //$NON-NLS-1$
- final static String K_SMALL = "small"; //$NON-NLS-1$
- final static String K_SMALL_CAPS = "small-caps"; //$NON-NLS-1$
- final static String K_SMALL_CAPTION = "small-caption"; //$NON-NLS-1$
- final static String K_SMALLER = "smaller"; //$NON-NLS-1$
- final static String K_SOFT = "soft"; //$NON-NLS-1$
- final static String K_SOLID = "solid"; //$NON-NLS-1$
- final static String K_SPELL_OUT = "spell-out"; //$NON-NLS-1$
- final static String K_SQUARE = "square"; //$NON-NLS-1$
- final static String K_STATIC = "static"; //$NON-NLS-1$
- final static String K_STATUS_BAR = "status-bar"; //$NON-NLS-1$
- final static String K_SUB = "sub"; //$NON-NLS-1$
- final static String K_SUPER = "super"; //$NON-NLS-1$
- final static String K_SW_RESIZE = "sw-resize"; //$NON-NLS-1$
- final static String K_TABLE = "table"; //$NON-NLS-1$
- final static String K_TABLE_CAPTION = "table-caption"; //$NON-NLS-1$
- final static String K_TABLE_CELL = "table-cell"; //$NON-NLS-1$
- final static String K_TABLE_COLUMN = "table-column"; //$NON-NLS-1$
- final static String K_TABLE_COLUMN_GROUP = "table-column-group"; //$NON-NLS-1$
- final static String K_TABLE_FOOTER_GROUP = "table-footer-group"; //$NON-NLS-1$
- final static String K_TABLE_HEADER_GROUP = "table-header-group"; //$NON-NLS-1$
- final static String K_TABLE_ROW = "table-row"; //$NON-NLS-1$
- final static String K_TABLE_ROW_GROUP = "table-row-group"; //$NON-NLS-1$
- final static String K_TEAL = "teal"; //$NON-NLS-1$
- final static String K_TEXT = "text"; //$NON-NLS-1$
- final static String K_TEXT_TOP = "text-top"; //$NON-NLS-1$
- final static String K_TEXT_BOTTOM = "text-bottom"; //$NON-NLS-1$
- final static String K_THICK = "thick"; //$NON-NLS-1$
- final static String K_THIN = "thin"; //$NON-NLS-1$
- final static String K_THREEDDARKSHADOW = "ThreeDDarkShadow"; //$NON-NLS-1$
- final static String K_THREEDFACE = "ThreeDFace"; //$NON-NLS-1$
- final static String K_THREEDHIGHLIGHT = "ThreeDHighlight"; //$NON-NLS-1$
- final static String K_THREEDLIGHTSHADOW = "ThreeDLightShadow"; //$NON-NLS-1$
- final static String K_THREEDSHADOW = "ThreeDShadow"; //$NON-NLS-1$
- final static String K_TOP = "top"; //$NON-NLS-1$
- final static String K_TRANSPARENT = "transparent"; //$NON-NLS-1$
- final static String K_ULTRA_CONDENSED = "ultra-condensed"; //$NON-NLS-1$
- final static String K_ULTRA_EXPANDED = "ultra-expanded"; //$NON-NLS-1$
- final static String K_UNDERLINE = "underline"; //$NON-NLS-1$
- final static String K_UPPER_ALPHA = "upper-alpha"; //$NON-NLS-1$
- final static String K_UPPER_LATIN = "upper-latin"; //$NON-NLS-1$
- final static String K_UPPER_ROMAN = "upper-roman"; //$NON-NLS-1$
- final static String K_UPPERCASE = "uppercase"; //$NON-NLS-1$
- final static String K_VISIBLE = "visible"; //$NON-NLS-1$
- final static String K_W_RESIZE = "w-resize"; //$NON-NLS-1$
- final static String K_WAIT = "wait"; //$NON-NLS-1$
- final static String K_WHITE = "white"; //$NON-NLS-1$
- final static String K_WIDER = "wider"; //$NON-NLS-1$
- final static String K_WINDOW = "Window"; //$NON-NLS-1$
- final static String K_WINDOWFRAME = "WindowFrame"; //$NON-NLS-1$
- final static String K_WINDOWTEXT = "WindowText"; //$NON-NLS-1$
- final static String K_X_FAST = "x-fast"; //$NON-NLS-1$
- final static String K_X_HIGH = "x-high"; //$NON-NLS-1$
- final static String K_X_LARGE = "x-large"; //$NON-NLS-1$
- final static String K_X_LOUD = "x-loud"; //$NON-NLS-1$
- final static String K_X_LOW = "x-low"; //$NON-NLS-1$
- final static String K_X_SLOW = "x-slow"; //$NON-NLS-1$
- final static String K_X_SMALL = "x-small"; //$NON-NLS-1$
- final static String K_X_SOFT = "x-soft"; //$NON-NLS-1$
- final static String K_XX_SMALL = "xx-small"; //$NON-NLS-1$
- final static String K_XX_LARGE = "xx-large"; //$NON-NLS-1$
- final static String K_YELLOW = "yellow"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMMTypeCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMMTypeCollector.java
deleted file mode 100644
index 881ca877fb..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMMTypeCollector.java
+++ /dev/null
@@ -1,62 +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.css.core.metamodel.util;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-
-public class CSSMMTypeCollector extends CSSMetaModelTraverser {
-
- /**
- * Constructor for TypeCollector.
- */
- public CSSMMTypeCollector() {
- super();
- }
-
- public void apply(CSSMMNode node, String type) {
- fType = type;
- fNodes = new ArrayList();
- apply(node);
- }
-
- public void collectNestedType(boolean nested) {
- fNested = nested;
- }
-
- protected short preNode(CSSMMNode node) {
- short rc = TRAV_CONT;
- if (node != null) {
- if (fType == node.getType()) {
- if (!fNodes.contains(node)) {
- fNodes.add(node);
- }
- if (!fNested) {
- rc = TRAV_PRUNE;
- }
- }
- }
- return rc;
- }
-
- public Iterator getNodes() {
- return fNodes.iterator();
- }
-
-
- private boolean fNested = false;
- private String fType = null;
- List fNodes = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMediaGroupID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMediaGroupID.java
deleted file mode 100644
index ee42d64687..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMediaGroupID.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.css.core.metamodel.util;
-
-public interface CSSMediaGroupID {
-
- final static String M_CONTINUOUS = "continuous"; //$NON-NLS-1$
- final static String M_PAGED = "paged"; //$NON-NLS-1$
-
- final static String M_VISUAL = "visual"; //$NON-NLS-1$
- final static String M_AURAL = "aural"; //$NON-NLS-1$
- final static String M_TACTILE = "tactile"; //$NON-NLS-1$
-
- final static String M_GRID = "grid"; //$NON-NLS-1$
- final static String M_BITMAP = "bitmap"; //$NON-NLS-1$
-
- final static String M_INTERACTIVE = "interactive"; //$NON-NLS-1$
- final static String M_STATIC = "static"; //$NON-NLS-1$
-
- final static String M_ALL = "all"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelFinder.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelFinder.java
deleted file mode 100644
index 934e05ec9b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelFinder.java
+++ /dev/null
@@ -1,51 +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.css.core.metamodel.util;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.metamodel.CSSMetaModel;
-import org.eclipse.wst.sse.core.IStructuredModel;
-
-
-public class CSSMetaModelFinder {
- /**
- * Constructor for CSSMetaModelFinder.
- */
- private CSSMetaModelFinder() {
- super();
- }
-
- static synchronized public CSSMetaModelFinder getInstance() {
- if (fInstance == null) {
- fInstance = new CSSMetaModelFinder();
- }
- return fInstance;
- }
-
- public CSSMetaModel findMetaModelFor(ICSSNode node) {
- return CSSProfileFinder.getInstance().findProfileFor(node).getMetaModel();
- }
-
- public CSSMetaModel findMetaModelFor(IStructuredModel model) {
- return CSSProfileFinder.getInstance().findProfileFor(model).getMetaModel();
-
- }
-
- // findMetaModelFor(Node) is not used.
- // Even if it is used, it can be replaced with
- // findMetaModelFor(IStructuredModel) easily
-
- public CSSMetaModel findMetaModelFor(String baseLocation) {
- return CSSProfileFinder.getInstance().findProfileFor(baseLocation).getMetaModel();
- }
-
- static private CSSMetaModelFinder fInstance = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelTraverser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelTraverser.java
deleted file mode 100644
index 436087008b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelTraverser.java
+++ /dev/null
@@ -1,92 +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.css.core.metamodel.util;
-
-import java.util.Iterator;
-import java.util.Stack;
-
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-
-
-
-abstract public class CSSMetaModelTraverser {
-
- /**
- * Constructor for Traverser.
- */
- public CSSMetaModelTraverser() {
- super();
- }
-
- public final void apply(CSSMMNode node) {
- fTravStack = new Stack();
-
- begin(node);
- traverse(node);
- end(node);
- }
-
- private final short traverse(CSSMMNode node) {
- if (node == null) {
- return TRAV_CONT;
- }
-
- fTravStack.push(node);
-
- short rc;
- rc = preNode(node);
-
- if (rc == TRAV_CONT) {
- Iterator i = node.getChildNodes();
- while (i.hasNext()) {
- CSSMMNode child = (CSSMMNode) i.next();
- short rcChild = traverse(child);
- if (rcChild == TRAV_STOP) {
- fTravStack.pop();
- return TRAV_STOP;
- }
- }
- }
- else if (rc == TRAV_STOP) {
- fTravStack.pop();
- return TRAV_STOP;
- }
-
- rc = postNode(node);
-
- fTravStack.pop();
- return (rc == TRAV_PRUNE) ? TRAV_CONT : rc;
- }
-
- protected void begin(CSSMMNode node) {
-
- }
-
- protected void end(CSSMMNode node) {
-
- }
-
- protected short preNode(CSSMMNode node) {
- return TRAV_CONT;
- }
-
- protected short postNode(CSSMMNode node) {
- return TRAV_CONT;
- }
-
-
- Stack fTravStack = null;
-
- protected static final short TRAV_CONT = 0;
- protected static final short TRAV_STOP = 1;
- protected static final short TRAV_PRUNE = 2;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelUtil.java
deleted file mode 100644
index 901a0cd3a3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSMetaModelUtil.java
+++ /dev/null
@@ -1,120 +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.css.core.metamodel.util;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.metamodel.CSSMMDescriptor;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMProperty;
-import org.eclipse.wst.css.core.metamodel.CSSMetaModel;
-import org.w3c.dom.css.CSSFontFaceRule;
-
-
-public class CSSMetaModelUtil {
- public CSSMetaModelUtil(CSSMetaModel metamodel) {
- super();
- fMetaModel = metamodel;
- }
-
- public Iterator getProperties() {
- return collectNodesByType(CSSMMNode.TYPE_PROPERTY);
- }
-
- public Iterator getDescriptors() {
- return collectNodesByType(CSSMMNode.TYPE_DESCRIPTOR);
- }
-
- public Iterator collectNodesByType(String type) {
- CSSMMTypeCollector collector = new CSSMMTypeCollector();
- collector.apply(fMetaModel, type);
- return collector.getNodes();
- }
-
- public CSSMMProperty getProperty(String propertyName) {
- Iterator iProperty = getProperties();
- while (iProperty.hasNext()) {
- CSSMMNode node = (CSSMMNode) iProperty.next();
- if (node.getName().equalsIgnoreCase(propertyName)) {
- return (CSSMMProperty) node;
- }
- }
- return null;
- }
-
- public CSSMMDescriptor getDescriptor(String descriptorName) {
- Iterator iDescriptor = getDescriptors();
- while (iDescriptor.hasNext()) {
- CSSMMNode node = (CSSMMNode) iDescriptor.next();
- if (node.getName().equalsIgnoreCase(descriptorName)) {
- return (CSSMMDescriptor) node;
- }
- }
- return null;
- }
-
- public CSSMMNode getMetaModelNodeFor(ICSSNode node) {
- if (node instanceof ICSSStyleDeclaration) {
- node = node.getParentNode();
- }
- if (node instanceof ICSSStyleDeclItem) {
- ICSSNode parent = node.getParentNode();
- if (parent != null) {
- parent = parent.getParentNode();
- }
- if (parent instanceof ICSSStyleRule) {
- return getProperty(((ICSSStyleDeclItem) node).getPropertyName());
- }
- else if (parent instanceof CSSFontFaceRule) {
- return getDescriptor(((ICSSStyleDeclItem) node).getPropertyName());
- }
- }
- if (node == null) {
- return null;
- }
-
- if (fTypeMap == null) {
- fTypeMap = new HashMap();
- fTypeMap.put(new Short(ICSSNode.STYLERULE_NODE), CSSMMNode.TYPE_STYLE_RULE);
- fTypeMap.put(new Short(ICSSNode.FONTFACERULE_NODE), CSSMMNode.TYPE_FONT_FACE_RULE);
- fTypeMap.put(new Short(ICSSNode.PAGERULE_NODE), CSSMMNode.TYPE_PAGE_RULE);
- }
-
- String nodeType = (String) fTypeMap.get(new Short(node.getNodeType()));
- if (nodeType == null) {
- return null;
- }
-
- Iterator iNodes = collectNodesByType(nodeType);
- if (iNodes.hasNext()) {
- CSSMMNode targetNode = (CSSMMNode) iNodes.next();
- if (!iNodes.hasNext()) { // it's only one
- return targetNode;
- }
- }
-
- return null;
- }
-
- public CSSMetaModel getMetaModel() {
- return fMetaModel;
- }
-
-
- private CSSMetaModel fMetaModel = null;
- private Map fTypeMap = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSNumberID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSNumberID.java
deleted file mode 100644
index 5bd9b1ed5a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSNumberID.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.css.core.metamodel.util;
-
-public interface CSSNumberID {
-
- final static java.lang.String N_ANGLE = "angle";//$NON-NLS-1$
- final static java.lang.String N_FREQUENCY = "frequency";//$NON-NLS-1$
- final static java.lang.String N_INTEGER = "integer";//$NON-NLS-1$
- final static java.lang.String N_LENGTH = "length";//$NON-NLS-1$
- final static java.lang.String N_PERCENTAGE = "percentage";//$NON-NLS-1$
- final static java.lang.String N_TIME = "time";//$NON-NLS-1$
- final static java.lang.String N_HASH = "hash"; //$NON-NLS-1$
- final static java.lang.String N_NUM = "number";//$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSProfileFinder.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSProfileFinder.java
deleted file mode 100644
index 6d6f9261e7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSProfileFinder.java
+++ /dev/null
@@ -1,105 +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.css.core.metamodel.util;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.metamodel.CSSProfile;
-import org.eclipse.wst.css.core.metamodel.CSSProfileRegistry;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.ui.contentproperties.ContentSettingsCreator;
-import org.eclipse.wst.sse.ui.contentproperties.IContentSettings;
-
-
-public class CSSProfileFinder {
-
- final static private String CSS_PROFILE = "css-profile"; //$NON-NLS-1$
-
- /**
- * Constructor for CSSProfileFinder.
- */
- private CSSProfileFinder() {
- super();
- }
-
- static synchronized public CSSProfileFinder getInstance() {
- if (fInstance == null) {
- fInstance = new CSSProfileFinder();
- }
- return fInstance;
- }
-
- public CSSProfile findProfileFor(ICSSNode node) {
- ICSSModel model = null;
- if (node != null) {
- ICSSDocument doc = node.getOwnerDocument();
- if (doc != null) {
- model = doc.getModel();
- }
- }
- return findProfileFor(model);
- }
-
- public CSSProfile findProfileFor(IStructuredModel model) {
- String baseLocation = null;
- if (model instanceof ICSSModel) {
- Object modelType = ((ICSSModel) model).getStyleSheetType();
- if (modelType == ICSSModel.EXTERNAL) {
- baseLocation = model.getBaseLocation();
- }
- else if (modelType == ICSSModel.EMBEDDED || modelType == ICSSModel.INLINE) {
- baseLocation = model.getBaseLocation(); // may be null
- }
- }
- else if (model != null) {
- baseLocation = model.getBaseLocation();
- }
- return findProfileFor(baseLocation);
- }
-
- public CSSProfile findProfileFor(String baseLocation) {
- CSSProfileRegistry reg = CSSProfileRegistry.getInstance();
- CSSProfile profile = null;
-
- if (baseLocation != null) {
- IContentSettings cs = ContentSettingsCreator.create();
- IPath path = new Path(baseLocation);
- IResource resource = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
- if (resource == null && path.segmentCount() > 1)
- resource = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- if (resource != null) {
- IProject project = resource.getProject();
- // at first, initialized with project settings
- if (project != null) {
- String profileID = cs.getProperty(project, CSS_PROFILE);
- if (profileID != null && 0 < profileID.length()) {
- profile = reg.getProfile(profileID);
- }
- }
- // if resource settings exist, overwrite with project settings
- String profileID = cs.getProperty(resource, CSS_PROFILE);
- if (profileID != null && 0 < profileID.length()) {
- profile = reg.getProfile(profileID);
- }
- }
- }
-
- return (profile != null) ? profile : reg.getDefaultProfile();
- }
-
- static private CSSProfileFinder fInstance = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSPropertyID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSPropertyID.java
deleted file mode 100644
index 252d6379f0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSPropertyID.java
+++ /dev/null
@@ -1,137 +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.css.core.metamodel.util;
-
-public interface CSSPropertyID {
-
- final static String P_AZIMUTH = "azimuth"; //$NON-NLS-1$
- final static String P_BG = "background"; //$NON-NLS-1$
- final static String P_BG_ATTACHMENT = "background-attachment"; //$NON-NLS-1$
- final static String P_BG_COLOR = "background-color"; //$NON-NLS-1$
- final static String P_BG_IMAGE = "background-image"; //$NON-NLS-1$
- final static String P_BG_POSITION = "background-position"; //$NON-NLS-1$
- final static String P_BG_REPEAT = "background-repeat"; //$NON-NLS-1$
- final static String P_BORDER = "border"; //$NON-NLS-1$
- final static String P_BORDER_COLLAPSE = "border-collapse"; //$NON-NLS-1$
- final static String P_BORDER_COLOR = "border-color"; //$NON-NLS-1$
- final static String P_BORDER_SPACING = "border-spacing"; //$NON-NLS-1$
- final static String P_BORDER_STYLE = "border-style"; //$NON-NLS-1$
- final static String P_BORDER_TOP = "border-top"; //$NON-NLS-1$
- final static String P_BORDER_RIGHT = "border-right"; //$NON-NLS-1$
- final static String P_BORDER_BOTTOM = "border-bottom"; //$NON-NLS-1$
- final static String P_BORDER_LEFT = "border-left"; //$NON-NLS-1$
- final static String P_BORDER_TOP_COLOR = "border-top-color"; //$NON-NLS-1$
- final static String P_BORDER_RIGHT_COLOR = "border-right-color"; //$NON-NLS-1$
- final static String P_BORDER_BOTTOM_COLOR = "border-bottom-color"; //$NON-NLS-1$
- final static String P_BORDER_LEFT_COLOR = "border-left-color"; //$NON-NLS-1$
- final static String P_BORDER_TOP_STYLE = "border-top-style"; //$NON-NLS-1$
- final static String P_BORDER_RIGHT_STYLE = "border-right-style"; //$NON-NLS-1$
- final static String P_BORDER_BOTTOM_STYLE = "border-bottom-style"; //$NON-NLS-1$
- final static String P_BORDER_LEFT_STYLE = "border-left-style"; //$NON-NLS-1$
- final static String P_BORDER_TOP_WIDTH = "border-top-width"; //$NON-NLS-1$
- final static String P_BORDER_RIGHT_WIDTH = "border-right-width"; //$NON-NLS-1$
- final static String P_BORDER_BOTTOM_WIDTH = "border-bottom-width"; //$NON-NLS-1$
- final static String P_BORDER_LEFT_WIDTH = "border-left-width"; //$NON-NLS-1$
- final static String P_BORDER_WIDTH = "border-width"; //$NON-NLS-1$
- final static String P_BOTTOM = "bottom"; //$NON-NLS-1$
- final static String P_CAPTION_SIDE = "caption-side"; //$NON-NLS-1$
- final static String P_CLEAR = "clear"; //$NON-NLS-1$
- final static String P_CLIP = "clip"; //$NON-NLS-1$
- final static String P_COLOR = "color"; //$NON-NLS-1$
- final static String P_CONTENT = "content"; //$NON-NLS-1$
- final static String P_COUNTER_INCREMENT = "counter-increment"; //$NON-NLS-1$
- final static String P_COUNTER_RESET = "counter-reset"; //$NON-NLS-1$
- final static String P_CUE = "cue"; //$NON-NLS-1$
- final static String P_CUE_AFTER = "cue-after"; //$NON-NLS-1$
- final static String P_CUE_BEFORE = "cue-before"; //$NON-NLS-1$
- final static String P_CURSOR = "cursor"; //$NON-NLS-1$
- final static String P_DIRECTION = "direction"; //$NON-NLS-1$
- final static String P_DISPLAY = "display"; //$NON-NLS-1$
- final static String P_ELEVATION = "elevation"; //$NON-NLS-1$
- final static String P_EMPTY_CELLS = "empty-cells"; //$NON-NLS-1$
- final static String P_FLOAT = "float"; //$NON-NLS-1$
- final static String P_FONT = "font"; //$NON-NLS-1$
- final static String P_FONT_FAMILY = "font-family"; //$NON-NLS-1$
- final static String P_FONT_SIZE = "font-size"; //$NON-NLS-1$
- final static String P_FONT_SIZE_ADJUST = "font-size-adjust"; //$NON-NLS-1$
- final static String P_FONT_STRETCH = "font-stretch"; //$NON-NLS-1$
- final static String P_FONT_STYLE = "font-style"; //$NON-NLS-1$
- final static String P_FONT_VARIANT = "font-variant"; //$NON-NLS-1$
- final static String P_FONT_WEIGHT = "font-weight"; //$NON-NLS-1$
- final static String P_HEIGHT = "height"; //$NON-NLS-1$
- final static String P_LEFT = "left"; //$NON-NLS-1$
- final static String P_LETTER_SPACING = "letter-spacing"; //$NON-NLS-1$
- final static String P_LINE_HEIGHT = "line-height"; //$NON-NLS-1$
- final static String P_LIST_STYLE = "list-style"; //$NON-NLS-1$
- final static String P_LIST_STYLE_IMAGE = "list-style-image"; //$NON-NLS-1$
- final static String P_LIST_STYLE_POSITION = "list-style-position"; //$NON-NLS-1$
- final static String P_LIST_STYLE_TYPE = "list-style-type"; //$NON-NLS-1$
- final static String P_MARGIN = "margin"; //$NON-NLS-1$
- final static String P_MARGIN_TOP = "margin-top"; //$NON-NLS-1$
- final static String P_MARGIN_RIGHT = "margin-right"; //$NON-NLS-1$
- final static String P_MARGIN_BOTTOM = "margin-bottom"; //$NON-NLS-1$
- final static String P_MARGIN_LEFT = "margin-left"; //$NON-NLS-1$
- final static String P_MARKER_OFFSET = "marker-offset"; //$NON-NLS-1$
- final static String P_MARKS = "marks"; //$NON-NLS-1$
- final static String P_MAX_HEIGHT = "max-height"; //$NON-NLS-1$
- final static String P_MAX_WIDTH = "max-width"; //$NON-NLS-1$
- final static String P_MIN_HEIGHT = "min-height"; //$NON-NLS-1$
- final static String P_MIN_WIDTH = "min-width"; //$NON-NLS-1$
- final static String P_ORPHANS = "orphans"; //$NON-NLS-1$
- final static String P_OUTLINE = "outline"; //$NON-NLS-1$
- final static String P_OUTLINE_COLOR = "outline-color"; //$NON-NLS-1$
- final static String P_OUTLINE_STYLE = "outline-style"; //$NON-NLS-1$
- final static String P_OUTLINE_WIDTH = "outline-width"; //$NON-NLS-1$
- final static String P_OVERFLOW = "overflow"; //$NON-NLS-1$
- final static String P_PADDING = "padding"; //$NON-NLS-1$
- final static String P_PADDING_TOP = "padding-top"; //$NON-NLS-1$
- final static String P_PADDING_RIGHT = "padding-right"; //$NON-NLS-1$
- final static String P_PADDING_BOTTOM = "padding-bottom"; //$NON-NLS-1$
- final static String P_PADDING_LEFT = "padding-left"; //$NON-NLS-1$
- final static String P_PAGE = "page"; //$NON-NLS-1$
- final static String P_PAGE_BREAK_AFTER = "page-break-after"; //$NON-NLS-1$
- final static String P_PAGE_BREAK_BEFORE = "page-break-before"; //$NON-NLS-1$
- final static String P_PAGE_BREAK_INSIDE = "page-break-inside"; //$NON-NLS-1$
- final static String P_PAUSE = "pause"; //$NON-NLS-1$
- final static String P_PAUSE_AFTER = "pause-after"; //$NON-NLS-1$
- final static String P_PAUSE_BEFORE = "pause-before"; //$NON-NLS-1$
- final static String P_PITCH = "pitch"; //$NON-NLS-1$
- final static String P_PITCH_RANGE = "pitch-range"; //$NON-NLS-1$
- final static String P_PLAY_DURING = "play-during"; //$NON-NLS-1$
- final static String P_POSITION = "position"; //$NON-NLS-1$
- final static String P_QUOTES = "quotes"; //$NON-NLS-1$
- final static String P_RICHNESS = "richness"; //$NON-NLS-1$
- final static String P_RIGHT = "right"; //$NON-NLS-1$
- final static String P_SIZE = "size"; //$NON-NLS-1$
- final static String P_SPEAK = "speak"; //$NON-NLS-1$
- final static String P_SPEAK_HEADER = "speak-header"; //$NON-NLS-1$
- final static String P_SPEAK_NUMERAL = "speak-numeral"; //$NON-NLS-1$
- final static String P_SPEAK_PUNCTUATION = "speak-punctuation"; //$NON-NLS-1$
- final static String P_SPEECH_RATE = "speech-rate"; //$NON-NLS-1$
- final static String P_STRESS = "stress"; //$NON-NLS-1$
- final static String P_TABLE_LAYOUT = "table-layout"; //$NON-NLS-1$
- final static String P_TEXT_ALIGN = "text-align"; //$NON-NLS-1$
- final static String P_TEXT_DECORATION = "text-decoration"; //$NON-NLS-1$
- final static String P_TEXT_INDENT = "text-indent"; //$NON-NLS-1$
- final static String P_TEXT_SHADOW = "text-shadow"; //$NON-NLS-1$
- final static String P_TEXT_TRANSFORM = "text-transform"; //$NON-NLS-1$
- final static String P_TOP = "top"; //$NON-NLS-1$
- final static String P_UNICODE_BIDI = "unicode-bidi"; //$NON-NLS-1$
- final static String P_VERTICAL_ALIGN = "vertical-align"; //$NON-NLS-1$
- final static String P_VISIBILITY = "visibility"; //$NON-NLS-1$
- final static String P_VOICE_FAMILY = "voice-family"; //$NON-NLS-1$
- final static String P_VOLUME = "volume"; //$NON-NLS-1$
- final static String P_WHITE_SPACE = "white-space"; //$NON-NLS-1$
- final static String P_WIDOWS = "widows"; //$NON-NLS-1$
- final static String P_WIDTH = "width"; //$NON-NLS-1$
- final static String P_WORD_SPACING = "word-spacing"; //$NON-NLS-1$
- final static String P_Z_INDEX = "z-index"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSStringID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSStringID.java
deleted file mode 100644
index 6157886591..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSStringID.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.css.core.metamodel.util;
-
-public interface CSSStringID {
-
- final static String S_ANY = "any"; //$NON-NLS-1$
- final static String S_COUNTER_IDENTIFIER = "counter-identifier"; //$NON-NLS-1$
- final static String S_FAMILY_NAME = "family-name"; //$NON-NLS-1$
- final static String S_FONT_FACE_NAME = "font-face-name"; //$NON-NLS-1$
- final static String S_PAGE_IDENTIFIER = "page-identifier"; //$NON-NLS-1$
- final static String S_SPECIFIC_VOICE = "specific-voice"; //$NON-NLS-1$
- final static String S_URANGE = "urange"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSUnitID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSUnitID.java
deleted file mode 100644
index 76cfac95ea..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/metamodel/util/CSSUnitID.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.css.core.metamodel.util;
-
-public interface CSSUnitID {
-
- final static String U_CM = "cm";//$NON-NLS-1$
- final static String U_DEG = "deg";//$NON-NLS-1$
- final static String U_EMS = "em";//$NON-NLS-1$
- final static String U_EXS = "ex";//$NON-NLS-1$
- final static String U_GRAD = "grad";//$NON-NLS-1$
- final static String U_HASH = "#";//$NON-NLS-1$
- final static String U_HZ = "Hz";//$NON-NLS-1$
- final static String U_IN = "in";//$NON-NLS-1$
- // final static String U_INTEGER = "INTEGER";//$NON-NLS-1$
- final static String U_KHZ = "kHz";//$NON-NLS-1$
- final static String U_MM = "mm";//$NON-NLS-1$
- final static String U_MS = "ms";//$NON-NLS-1$
- // final static String U_NUMBER = "NUMBER";//$NON-NLS-1$
- final static String U_PC = "pc";//$NON-NLS-1$
- final static String U_PERCENTAGE = "%";//$NON-NLS-1$
- final static String U_PT = "pt";//$NON-NLS-1$
- final static String U_PX = "px";//$NON-NLS-1$
- final static String U_RAD = "rad";//$NON-NLS-1$
- final static String U_S = "s";//$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/modelhandler/CSSModelLoader.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/modelhandler/CSSModelLoader.java
deleted file mode 100644
index 476b7b2116..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/modelhandler/CSSModelLoader.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.modelhandler;
-
-
-import org.eclipse.wst.css.core.internal.document.CSSModelImpl;
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentLoader;
-import org.eclipse.wst.sse.core.AbstractModelLoader;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.ModelLoader;
-import org.eclipse.wst.sse.core.document.IDocumentLoader;
-
-
-/**
- *
- */
-public class CSSModelLoader extends AbstractModelLoader {
- /**
- * CSSLoader constructor comment.
- */
- public CSSModelLoader() {
- super();
- }
-
- /*
- * @see ModelLoader#newModel()
- */
- public IStructuredModel newModel() {
- IStructuredModel model = new CSSModelImpl();
- // now done in create
- // model.setStructuredDocument(createNewStructuredDocument());
- // model.setFactoryRegistry(defaultFactoryRegistry());
- return model;
- }
-
- public ModelLoader newInstance() {
- return new CSSModelLoader();
- }
-
- public IDocumentLoader getDocumentLoader() {
- if (documentLoaderInstance == null) {
- documentLoaderInstance = new CSSDocumentLoader();
- }
- return documentLoaderInstance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/modelhandler/ModelHandlerForCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/modelhandler/ModelHandlerForCSS.java
deleted file mode 100644
index 27502e3b54..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/modelhandler/ModelHandlerForCSS.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.css.core.modelhandler;
-
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentCharsetDetector;
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentLoader;
-import org.eclipse.wst.sse.core.ModelLoader;
-import org.eclipse.wst.sse.core.document.IDocumentCharsetDetector;
-import org.eclipse.wst.sse.core.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.modelhandler.AbstractModelHandler;
-import org.eclipse.wst.sse.core.modelhandler.IModelHandler;
-
-
-public class ModelHandlerForCSS extends AbstractModelHandler implements IModelHandler {
-
- /**
- * Needs to match what's in plugin registry. In fact, can be overwritten
- * at run time with what's in registry! (so should never be 'final')
- */
- static String AssociatedContentTypeID = "org.eclipse.wst.css.core.csssource"; //$NON-NLS-1$
- /**
- * Needs to match what's in plugin registry. In fact, can be overwritten
- * at run time with what's in registry! (so should never be 'final')
- */
- private static String ModelHandlerID = "org.eclipse.wst.css.core.modelhandler"; //$NON-NLS-1$
-
- public ModelHandlerForCSS() {
- super();
- setId(ModelHandlerID);
- setAssociatedContentTypeId(AssociatedContentTypeID);
- }
-
- public IDocumentCharsetDetector getEncodingDetector() {
- return new CSSDocumentCharsetDetector();
- }
-
- public IDocumentLoader getDocumentLoader() {
- return new CSSDocumentLoader();
- }
-
- /*
- * @see ContentTypeDescription#getModelLoader()
- */
- public ModelLoader getModelLoader() {
- return new CSSModelLoader();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSRegionContexts.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSRegionContexts.java
deleted file mode 100644
index 8b43dfb216..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSRegionContexts.java
+++ /dev/null
@@ -1,76 +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.css.core.parser;
-
-/**
- */
-public interface CSSRegionContexts {
- public static final String CSS_COMMENT = "COMMENT"; //$NON-NLS-1$
- public static final String CSS_CDO = "CDO"; //$NON-NLS-1$
- public static final String CSS_CDC = "CDC"; //$NON-NLS-1$
- public static final String CSS_S = "S"; //$NON-NLS-1$
-
- public static final String CSS_DELIMITER = "DELIMITER"; //$NON-NLS-1$
- public static final String CSS_LBRACE = "LBRACE"; //$NON-NLS-1$
- public static final String CSS_RBRACE = "RBRACE"; //$NON-NLS-1$
-
- public static final String CSS_IMPORT = "IMPORT"; //$NON-NLS-1$
- public static final String CSS_PAGE = "PAGE"; //$NON-NLS-1$
- public static final String CSS_MEDIA = "MEDIA"; //$NON-NLS-1$
- public static final String CSS_FONT_FACE = "FONT_FACE"; //$NON-NLS-1$
- public static final String CSS_CHARSET = "CHARSET"; //$NON-NLS-1$
- public static final String CSS_ATKEYWORD = "ATKEYWORD"; //$NON-NLS-1$
-
- public static final String CSS_STRING = "STRING"; //$NON-NLS-1$
- public static final String CSS_URI = "URI"; //$NON-NLS-1$
- public static final String CSS_MEDIUM = "MEDIUM"; //$NON-NLS-1$
- public static final String CSS_MEDIA_SEPARATOR = "MEDIA_SEPARATOR"; //$NON-NLS-1$
-
- public static final String CSS_CHARSET_NAME = "CHARSET_NAME"; //$NON-NLS-1$
-
- public static final String CSS_PAGE_SELECTOR = "CSS_PAGE_SELECTOR"; //$NON-NLS-1$
-
- public static final String CSS_SELECTOR_ELEMENT_NAME = "SELECTOR_ELEMENT_NAME"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_UNIVERSAL = "SELECTOR_UNIVERSAL"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_PSEUDO = "SELECTOR_PSEUDO"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_CLASS = "SELECTOR_CLASS"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_ID = "SELECTOR_ID"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_COMBINATOR = "SELECTOR_COMBINATOR"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_SEPARATOR = "SELECTOR_SEPARATOR"; //$NON-NLS-1$
-
- public static final String CSS_SELECTOR_ATTRIBUTE_START = "SELECTOR_ATTRIBUTE_START"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_ATTRIBUTE_END = "SELECTOR_ATTRIBUTE_END"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_ATTRIBUTE_NAME = "SELECTOR_ATTRIBUTE_NAME"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_ATTRIBUTE_VALUE = "SELECTOR_ATTRIBUTE_VALUE"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_ATTRIBUTE_OPERATOR = "SELECTOR_ATTRIBUTE_OPERATOR"; //$NON-NLS-1$
-
- public static final String CSS_DECLARATION_PROPERTY = "DECLARATION_PROPERTY"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_SEPARATOR = "DECLARATION_SEPARATOR"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_DELIMITER = "DECLARATION_DELIMITER"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_IDENT = "DECLARATION_VALUE_IDENT"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_DIMENSION = "DECLARATION_VALUE_DIMENSION"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_PERCENTAGE = "DECLARATION_VALUE_PERCENTAGE"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_NUMBER = "DECLARATION_VALUE_NUMBER"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_FUNCTION = "DECLARATION_VALUE_FUNCTION"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE = "DECLARATION_VALUE_PARENTHESIS_CLOSE"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_STRING = "DECLARATION_VALUE_STRING"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_URI = "DECLARATION_VALUE_URI"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_HASH = "DECLARATION_VALUE_HASH"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_UNICODE_RANGE = "DECLARATION_VALUE_UNICODE_RANGE"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_IMPORTANT = "CSS_DECLARATION_VALUE_IMPORTANT"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_OPERATOR = "DECLARATION_VALUE_OPERATOR"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_S = "DECLARATION_VALUE_S"; //$NON-NLS-1$
-
- public static final String CSS_UNKNOWN = "UNKNOWN"; //$NON-NLS-1$
-
- // For null object : CSSTokenizer never set this value
- public static final String CSS_UNDEFINED = "UNDEFINED"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSTextParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSTextParser.java
deleted file mode 100644
index 20cba6c0da..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSTextParser.java
+++ /dev/null
@@ -1,101 +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.css.core.parser;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.parser.CSSTokenizer;
-
-
-
-public class CSSTextParser {
- public static final int MODE_STYLESHEET = 0;
- public static final int MODE_DECLARATION = 1;
- public static final int MODE_DECLARATION_VALUE = 2;
-
- public CSSTextParser(int parserMode) {
- initializeParserMode(parserMode);
- }
-
- public CSSTextParser(int parserMode, Reader reader) {
- initializeParserMode(parserMode);
- reset(reader);
- }
-
- public CSSTextParser(int parserMode, String input) {
- initializeParserMode(parserMode);
- reset(input);
- }
-
- public void reset(Reader reader) {
- getTokenizer().reset(reader, 0);
- }
-
- public void reset(String input) {
- getTokenizer().reset(new StringReader(input), 0);
- }
-
- public CSSTextToken[] getTokens() {
- List tokenList = getTokenList();
- CSSTextToken[] tokens = new CSSTextToken[tokenList.size()];
- return (CSSTextToken[]) tokenList.toArray(tokens);
- }
-
- public List getTokenList() {
- List tokens;
- try {
- tokens = getTokenizer().parseText();
- }
- catch (IOException e) {
- tokens = Collections.EMPTY_LIST;
- }
- return tokens;
- }
-
- private void initializeParserMode(int parserMode) {
- int initialState;
- int bufsize;
- switch (parserMode) {
- case MODE_STYLESHEET :
- initialState = CSSTokenizer.YYINITIAL;
- bufsize = CSSTokenizer.BUFFER_SIZE_NORMAL;
- break;
- case MODE_DECLARATION :
- initialState = CSSTokenizer.ST_DECLARATION;
- bufsize = CSSTokenizer.BUFFER_SIZE_NORMAL;
- break;
- case MODE_DECLARATION_VALUE :
- initialState = CSSTokenizer.ST_DECLARATION_PRE_VALUE;
- bufsize = CSSTokenizer.BUFFER_SIZE_SMALL;
- break;
- default :
- return;
- }
- if (0 < initialState) {
- CSSTokenizer tokenizer = getTokenizer();
- tokenizer.setInitialState(initialState);
- tokenizer.setInitialBufferSize(bufsize);
- }
- }
-
- private CSSTokenizer getTokenizer() {
- if (fTokenizer == null) {
- fTokenizer = new CSSTokenizer();
- }
- return fTokenizer;
- }
-
- private CSSTokenizer fTokenizer = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSTextToken.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSTextToken.java
deleted file mode 100644
index e68b858c8a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/parser/CSSTextToken.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.css.core.parser;
-
-
-public class CSSTextToken {
- public String kind;
- public String image;
- public int start;
- public int length;
-
- public String toString() {
- return (image != null) ? image : ""; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSModelPreferenceNames.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSModelPreferenceNames.java
deleted file mode 100644
index 69ca736e70..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSModelPreferenceNames.java
+++ /dev/null
@@ -1,32 +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.css.core.preferences;
-
-public interface CSSModelPreferenceNames {
- public static final String CASE_IDENTIFIER = "identifierCase"; //$NON-NLS-1$
- public static final String CASE_PRESERVE_CASE = "preserveCase"; //$NON-NLS-1$
- public static final String CASE_PROPERTY_NAME = "propNameCase"; //$NON-NLS-1$
- public static final String CASE_PROPERTY_VALUE = "propValueCase"; //$NON-NLS-1$
- public static final String FORMAT_BETWEEN_VALUE = "betweenValue"; //$NON-NLS-1$
- public static final String FORMAT_PROP_POST_DELIM = "postDelim"; //$NON-NLS-1$
- public static final String FORMAT_PROP_PRE_DELIM = "preDelim"; //$NON-NLS-1$
- public static final String FORMAT_QUOTE = "quote"; //$NON-NLS-1$
- public static final String FORMAT_QUOTE_IN_URI = "quoteInURI"; //$NON-NLS-1$
- public static final String WRAPPING_NEWLINE_ON_OPEN_BRACE = "newLineOnOpenBrace"; //$NON-NLS-1$
- public static final String WRAPPING_ONE_PER_LINE = "onePropertyPerLine"; //$NON-NLS-1$
- public static final String WRAPPING_PROHIBIT_WRAP_ON_ATTR = "prohibitWrapOnAttr"; //$NON-NLS-1$
-
- // CSS cleanup preference names
- public static final String CLEANUP_CASE_IDENTIFIER = "cleanupIdentifierCase"; //$NON-NLS-1$
- public static final String CLEANUP_CASE_PROPERTY_NAME = "cleanupPropNameCase"; //$NON-NLS-1$
- public static final String CLEANUP_CASE_PROPERTY_VALUE = "cleanupPropValueCase"; //$NON-NLS-1$
- public static final String CLEANUP_CASE_SELECTOR = "cleanupSelectorCase"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSPreferenceHelper.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSPreferenceHelper.java
deleted file mode 100644
index 2db57c4664..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSPreferenceHelper.java
+++ /dev/null
@@ -1,270 +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.css.core.preferences;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.sse.core.internal.SSECorePlugin;
-import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-
-/**
- * this a temp dummy class to map to ModelPreferences
- */
-public class CSSPreferenceHelper {
-
- /**
- *
- */
- public synchronized static CSSPreferenceHelper getInstance() {
- if (fInstance == null) {
- fInstance = new CSSPreferenceHelper();
- }
- return fInstance;
- }
-
- /**
- *
- */
- public static void createDefaultPreferences(Preferences prefs) {
- // setBooleanAttribute(COLOR_ENABLED, true);
- prefs.setDefault(CSSModelPreferenceNames.FORMAT_PROP_PRE_DELIM, 0);
- prefs.setDefault(CSSModelPreferenceNames.FORMAT_PROP_POST_DELIM, 1);
- prefs.setDefault(CSSModelPreferenceNames.FORMAT_QUOTE, "\"");//$NON-NLS-1$
- prefs.setDefault(CSSModelPreferenceNames.FORMAT_BETWEEN_VALUE, " ");//$NON-NLS-1$
- prefs.setDefault(CSSModelPreferenceNames.FORMAT_QUOTE_IN_URI, true);
- prefs.setDefault(CSSModelPreferenceNames.WRAPPING_ONE_PER_LINE, true);
- prefs.setDefault(CSSModelPreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR, true);
- prefs.setDefault(CSSModelPreferenceNames.WRAPPING_NEWLINE_ON_OPEN_BRACE, false);
- prefs.setDefault(CSSModelPreferenceNames.CASE_IDENTIFIER, CommonModelPreferenceNames.UPPER);
- prefs.setDefault(CSSModelPreferenceNames.CASE_PROPERTY_NAME, CommonModelPreferenceNames.LOWER);
- prefs.setDefault(CSSModelPreferenceNames.CASE_PROPERTY_VALUE, CommonModelPreferenceNames.LOWER);
- prefs.setDefault(CSSModelPreferenceNames.CASE_PRESERVE_CASE, true);
- // setBooleanAttribute(ASSIST_CATEGORIZE, true);
-
- // CSS cleanup preferences
- prefs.setDefault(CSSModelPreferenceNames.CLEANUP_CASE_IDENTIFIER, CommonModelPreferenceNames.ASIS);
- prefs.setDefault(CSSModelPreferenceNames.CLEANUP_CASE_PROPERTY_NAME, CommonModelPreferenceNames.ASIS);
- prefs.setDefault(CSSModelPreferenceNames.CLEANUP_CASE_PROPERTY_VALUE, CommonModelPreferenceNames.ASIS);
- prefs.setDefault(CSSModelPreferenceNames.CLEANUP_CASE_SELECTOR, CommonModelPreferenceNames.ASIS);
- }
-
- /**
- *
- */
- public String getBetweenValueString() {
- return getPreferences().getString(CSSModelPreferenceNames.FORMAT_BETWEEN_VALUE);
- }
-
- /**
- *
- */
- public String getIndentString() {
- Preferences prefs = getPreferences();
- boolean bUseTab = prefs.getBoolean(CommonModelPreferenceNames.INDENT_USING_TABS);
- if (bUseTab) {
- return "\t"; //$NON-NLS-1$
- }
- else {
- int n = SSECorePlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
- StringBuffer buf = new StringBuffer();
- while (0 < n--) {
- buf.append(" "); //$NON-NLS-1$
- }
- return buf.toString();
- }
- }
-
- /**
- *
- */
- public int getMaxLineWidth() {
- Preferences prefs = getPreferences();
- return prefs.getInt(CommonModelPreferenceNames.LINE_WIDTH);
- }
-
- /**
- *
- */
- public String getQuoteString(ICSSModel model) {
- // nakamori_TODO css pref transition
- return getPreferences().getString(CSSModelPreferenceNames.FORMAT_QUOTE);
- }
-
- /**
- *
- */
- public int getSpacesPostDelimiter() {
- return getPreferences().getInt(CSSModelPreferenceNames.FORMAT_PROP_POST_DELIM);
- }
-
- /**
- *
- */
- public int getSpacesPreDelimiter() {
- return getPreferences().getInt(CSSModelPreferenceNames.FORMAT_PROP_PRE_DELIM);
- }
-
- /**
- *
- */
- public boolean isIdentUpperCase() {
- if (getPreferences().getInt(CSSModelPreferenceNames.CASE_IDENTIFIER) == CommonModelPreferenceNames.UPPER)
- return true;
- else
- return false;
- }
-
- /**
- *
- */
- public boolean isNewLineOnOpenBrace() {
- return getPreferences().getBoolean(CSSModelPreferenceNames.WRAPPING_NEWLINE_ON_OPEN_BRACE);
- }
-
- /**
- *
- */
- public boolean isOnePropertyPerLine() {
- return getPreferences().getBoolean(CSSModelPreferenceNames.WRAPPING_ONE_PER_LINE);
- }
-
- /**
- *
- */
- public boolean isPreserveCase() {
- return getPreferences().getBoolean(CSSModelPreferenceNames.CASE_PRESERVE_CASE);
- }
-
- /**
- *
- */
- public boolean isProhibitWrapOnAttr() {
- return getPreferences().getBoolean(CSSModelPreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR);
- }
-
- /**
- *
- */
- public boolean isPropNameUpperCase() {
- if (getPreferences().getInt(CSSModelPreferenceNames.CASE_PROPERTY_NAME) == CommonModelPreferenceNames.UPPER)
- return true;
- else
- return false;
- }
-
- /**
- *
- */
- public boolean isPropValueUpperCase() {
- if (getPreferences().getInt(CSSModelPreferenceNames.CASE_PROPERTY_VALUE) == CommonModelPreferenceNames.UPPER)
- return true;
- else
- return false;
- }
-
- /**
- *
- */
- public boolean isQuoteInURI() {
- return getPreferences().getBoolean(CSSModelPreferenceNames.FORMAT_QUOTE_IN_URI);
- }
-
- /**
- *
- */
- protected void setBetweenValueString(String newBetweenValueString) {
- getPreferences().setValue(CSSModelPreferenceNames.FORMAT_BETWEEN_VALUE, newBetweenValueString);
- }
-
- /**
- *
- */
- protected void setIdentUpperCase(boolean newIdentUpperCase) {
- int theCase = CommonModelPreferenceNames.LOWER;
- if (newIdentUpperCase)
- theCase = CommonModelPreferenceNames.UPPER;
- getPreferences().setValue(CSSModelPreferenceNames.CASE_IDENTIFIER, theCase);
- }
-
- /**
- *
- */
- protected void setOnePropertyPerLine(boolean newOnePropertyPerLine) {
- getPreferences().setValue(CSSModelPreferenceNames.WRAPPING_ONE_PER_LINE, newOnePropertyPerLine);
- }
-
- /**
- *
- */
- protected void setPreserveCase(boolean newPreserveCase) {
- getPreferences().setValue(CSSModelPreferenceNames.CASE_PRESERVE_CASE, newPreserveCase);
- }
-
- /**
- *
- */
- protected void setProhibitWrapOnAttr(boolean newProhibitWrapOnAttr) {
- getPreferences().setValue(CSSModelPreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR, newProhibitWrapOnAttr);
- }
-
- /**
- *
- */
- protected void setPropNameUpperCase(boolean newPropNameUpperCase) {
- int theCase = CommonModelPreferenceNames.LOWER;
- if (newPropNameUpperCase)
- theCase = CommonModelPreferenceNames.UPPER;
- getPreferences().setValue(CSSModelPreferenceNames.CASE_PROPERTY_NAME, theCase);
- }
-
- /**
- *
- */
- protected void setPropValueUpperCase(boolean newPropValueUpperCase) {
- int theCase = CommonModelPreferenceNames.LOWER;
- if (newPropValueUpperCase)
- theCase = CommonModelPreferenceNames.UPPER;
- getPreferences().setValue(CSSModelPreferenceNames.CASE_PROPERTY_VALUE, theCase);
- }
-
- /**
- *
- */
- public void setQuoteString(String quote) {
- getPreferences().setValue(CSSModelPreferenceNames.FORMAT_QUOTE, quote);
- }
-
- /**
- *
- */
- public void setSpacesPostDelimiter(int num) {
- getPreferences().setValue(CSSModelPreferenceNames.FORMAT_PROP_POST_DELIM, num);
- }
-
- /**
- *
- */
- public void setSpacesPreDelimiter(int num) {
- getPreferences().setValue(CSSModelPreferenceNames.FORMAT_PROP_PRE_DELIM, num);
- }
-
- private Preferences getPreferences() {
- CSSCorePlugin cssModelPlugin = CSSCorePlugin.getDefault();
- return cssModelPlugin.getPluginPreferences();
- }
-
- private CSSPreferenceHelper() {
- super();
- }
-
- private static CSSPreferenceHelper fInstance = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/AbstractCssTraverser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/AbstractCssTraverser.java
deleted file mode 100644
index b418efe034..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/AbstractCssTraverser.java
+++ /dev/null
@@ -1,204 +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.css.core.util;
-
-import java.util.ArrayList;
-import java.util.Stack;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleSheet;
-
-
-
-/**
- *
- */
-public abstract class AbstractCssTraverser {
-
- public static short TRAV_CONT = 0;
- public static short TRAV_PRUNE = 1;
- public static short TRAV_STOP = 2;
- protected java.util.Stack travStack;
- private boolean fTraverseImported = false;
- private boolean fTraverseImportFirst = false;
- private java.util.Vector traversedSheets;
-
- /**
- * CssPropCMNode constructor comment.
- */
- public AbstractCssTraverser() {
- super();
- }
-
- /**
- * @param model
- * org.eclipse.wst.css.core.model.interfaces.ICSSModel
- */
- public final void apply(ICSSModel model) {
- apply(model.getDocument());
- }
-
- /**
- * @param root
- * com.ibm.sed.css.interfaces.ICSSNode
- */
- public final void apply(ICSSNode root) {
- travStack = new Stack();
- if (fTraverseImported) {
- traversedSheets = new Vector();
- if (root != null && root.getOwnerDocument() != null && root.getOwnerDocument().getNodeType() == ICSSNode.STYLESHEET_NODE) {
- traversedSheets.add(root.getOwnerDocument());
- }
- }
-
- // first call begin()
- begin(root);
-
- // traverse
- traverse(root);
-
- // last call end()
- end(root);
- }
-
- /**
- * @return short
- * @param node
- * com.ibm.sed.css.interfaces.ICSSNode
- */
- protected void begin(ICSSNode node) {
- }
-
- /**
- * @param node
- * com.ibm.sed.css.interfaces.ICSSNode
- */
- protected void end(ICSSNode node) {
- }
-
- /**
- * @return boolean
- */
- public final boolean isTraverseImported() {
- return fTraverseImported;
- }
-
- /**
- * @return short
- * @param node
- * com.ibm.sed.css.interfaces.ICSSNode
- */
- protected short postNode(ICSSNode node) {
- return (short) 0;
- }
-
- /**
- * @return short
- * @param node
- * com.ibm.sed.css.interfaces.ICSSNode
- */
- protected short preNode(ICSSNode node) {
- return (short) 0;
- }
-
- /**
- * @param newTraverseImported
- * boolean
- */
- public final void setTraverseImported(boolean newTraverseImported) {
- fTraverseImported = newTraverseImported;
- }
-
- /**
- * @param newTraverseImportFirst
- * boolean
- */
- public final void setTraverseImportFirst(boolean newTraverseImportFirst) {
- fTraverseImportFirst = newTraverseImportFirst;
- }
-
- /**
- * @return short
- * @param node
- * com.ibm.sed.css.interfaces.ICSSNode
- */
- private final short traverse(ICSSNode node) {
- if (node == null)
- return TRAV_CONT;
-
- travStack.push(node);
-
- // pre-action
- short ret = preNode(node);
-
- if (ret == TRAV_CONT) {
- if (fTraverseImported && (node.getNodeType() == ICSSNode.IMPORTRULE_NODE)) {
- ICSSImportRule rule = (ICSSImportRule) node;
- // traverse external style-sheet
- ICSSStyleSheet sheet = (ICSSStyleSheet) rule.getStyleSheet();
- if (sheet != null && !traversedSheets.contains(sheet)) { // prevent
- // loop
- traversedSheets.add(sheet);
- short retExt = traverse(sheet);
- if (retExt == TRAV_STOP) {
- travStack.pop();
- return retExt;
- }
- }
- }
-
- // collect children
- ArrayList children = new ArrayList();
- ICSSNode child = node.getFirstChild();
- if (fTraverseImportFirst) {
- ArrayList others = new ArrayList();
-
- while (child != null) {
- if (child.getNodeType() == ICSSNode.IMPORTRULE_NODE)
- children.add(child);
- else
- others.add(child);
- child = child.getNextSibling();
- }
- children.addAll(others);
- }
- else {
- while (child != null) {
- children.add(child);
- child = child.getNextSibling();
- }
- }
-
- // traverse children
- for (int i = 0; i < children.size(); i++) {
- child = (ICSSNode) children.get(i);
- short retChild = traverse(child);
- if (retChild == TRAV_STOP) {
- travStack.pop();
- return retChild;
- }
- }
- }
- else if (ret == TRAV_STOP) {
- travStack.pop();
- return ret;
- }
-
- // post-action
- ret = postNode(node);
-
- travStack.pop();
- return (ret == TRAV_PRUNE) ? TRAV_CONT : ret;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSClassTraverser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSClassTraverser.java
deleted file mode 100644
index 042a314d52..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSClassTraverser.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.css.core.util;
-
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSSelector;
-import org.eclipse.wst.css.core.document.ICSSSelectorItem;
-import org.eclipse.wst.css.core.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.document.ICSSSimpleSelector;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.document.ICSSStyleSheet;
-
-
-/**
- *
- */
-public class CSSClassTraverser extends AbstractCssTraverser {
-
- ArrayList fClassNames;
-
- /**
- *
- */
- public CSSClassTraverser() {
- super();
- }
-
- /**
- *
- */
- private void addClassNames(ICSSStyleRule rule) {
- ICSSSelectorList selectorList = rule.getSelectors();
- Iterator iSelector = selectorList.getIterator();
- while (iSelector.hasNext()) {
- ICSSSelector selector = (ICSSSelector) iSelector.next();
- Iterator iItem = selector.getIterator();
- while (iItem.hasNext()) {
- ICSSSelectorItem item = (ICSSSelectorItem) iItem.next();
- if (item.getItemType() == ICSSSelectorItem.SIMPLE) {
- ICSSSimpleSelector sel = (ICSSSimpleSelector) item;
- int nClasses = sel.getNumOfClasses();
- for (int iClass = 0; iClass < nClasses; iClass++) {
- String className = sel.getClass(iClass);
- if (!fClassNames.contains(className))
- fClassNames.add(className);
- }
- }
- }
- }
- }
-
- /**
- *
- */
- protected void begin(ICSSNode node) {
- if (fClassNames == null)
- fClassNames = new ArrayList();
- }
-
- /**
- *
- */
- protected void end(ICSSNode node) {
- }
-
- /**
- *
- */
- public Collection getClassNames() {
- return (fClassNames != null) ? fClassNames : Collections.EMPTY_LIST;
- }
-
- /**
- *
- */
- protected short postNode(ICSSNode node) {
- return TRAV_CONT;
- }
-
- /**
- *
- */
- protected short preNode(ICSSNode node) {
- short ret;
- if (node instanceof ICSSStyleRule) {
- addClassNames((ICSSStyleRule) node);
- ret = TRAV_PRUNE;
- }
- else if (node instanceof ICSSStyleSheet || node instanceof ICSSMediaRule || node instanceof ICSSImportRule) {
- ret = TRAV_CONT;
- }
- else {
- ret = TRAV_PRUNE;
- }
- return ret;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSLinkConverter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSLinkConverter.java
deleted file mode 100644
index 84a8a8168e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSLinkConverter.java
+++ /dev/null
@@ -1,191 +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.css.core.util;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- *
- */
-public class CSSLinkConverter extends org.eclipse.wst.css.core.util.AbstractCssTraverser {
- private static final String URL_BEGIN = "url("; //$NON-NLS-1$
- private static final String URL_END = ")"; //$NON-NLS-1$
- private static final String EMPTY = ""; //$NON-NLS-1$
- private static final String D_QUOTE = "\""; //$NON-NLS-1$
- private static final String S_QUOTE = "\'"; //$NON-NLS-1$
-
- IStructuredModel baseModel;
-
- /**
- *
- */
- public CSSLinkConverter(IStructuredModel model) {
- super();
- baseModel = model;
- if (model instanceof ICSSModel && ((ICSSModel) model).getStyleSheetType() != ICSSModel.EXTERNAL) {
- XMLNode node = (XMLNode) ((ICSSModel) model).getOwnerDOMNode();
- baseModel = node.getModel();
- }
- }
-
- /**
- *
- */
- public static String addFunc(String value) {
- if (!value.trim().toLowerCase().startsWith(URL_BEGIN)) {
- // pa_TODO css pref
- CSSPreferenceHelper mgr = CSSPreferenceHelper.getInstance();
- String quote = mgr.getQuoteString(null);
- value = CSSUtil.stripQuotes(value);
- quote = CSSUtil.detectQuote(value, quote);
- String str = URL_BEGIN;
- if (mgr.isPropValueUpperCase())
- str = str.toUpperCase();
- StringBuffer buf = new StringBuffer(str);
- buf.append(quote);
- buf.append(value);
- buf.append(quote);
- buf.append(URL_END);
- return buf.toString();
- }
- else
- return value;
- }
-
-
-
- /**
- *
- */
- protected void begin(ICSSNode node) {
- if (baseModel == null) {
- baseModel = node.getOwnerDocument().getModel();
- if (baseModel instanceof ICSSModel && ((ICSSModel) baseModel).getStyleSheetType() != ICSSModel.EXTERNAL) {
- XMLNode xmlNode = (XMLNode) ((ICSSModel) baseModel).getOwnerDOMNode();
- baseModel = xmlNode.getModel();
- }
- }
- }
-
- /**
- *
- */
- private static boolean isUrl(String source) {
- if (source == null)
- return false;
- source = source.trim().toLowerCase();
- return source.startsWith(URL_BEGIN);
- }
-
- /**
- *
- */
- protected short preNode(ICSSNode node) {
- if (node.getNodeType() == ICSSNode.PRIMITIVEVALUE_NODE) {
- toAbsolute((CSSValue) node);
- }
- else if (node.getNodeType() == ICSSNode.IMPORTRULE_NODE) {
- ICSSImportRule iRule = (ICSSImportRule) node;
- iRule.setHref(toAbsolute(addFunc(iRule.getHref())));
- }
- return TRAV_CONT;
- }
-
- /**
- *
- * @return java.lang.String
- * @param value
- * java.lang.String
- */
- public static String removeFunc(String value) {
- if (value == null)
- return EMPTY;
- String field = value.trim();
- // first : tear "url(....)"
- if (field.toLowerCase().startsWith(URL_BEGIN)) {
- int url = field.toLowerCase().indexOf(URL_BEGIN);
- int endParenthesis = field.lastIndexOf(URL_END);
- if (endParenthesis > url) {
- field = field.substring(url + 4, endParenthesis);
- }
- else
- field = field.substring(url + 4);
- }
- return field.trim();
- }
-
- /**
- *
- */
- public static String stripFunc(String value) {
- if (value == null)
- return EMPTY;
- // first : tear "url(....)"
- String field = removeFunc(value);
- // second : tear quotations
- if (field.toLowerCase().startsWith(D_QUOTE)) {
- int quote = field.indexOf(D_QUOTE);
- int end = field.lastIndexOf(D_QUOTE);
- if (end > quote) {
- field = field.substring(quote + 1, end);
- }
- else
- field = field.substring(quote + 1);
- }
- else if (field.toLowerCase().startsWith(S_QUOTE)) {
- int quote = field.indexOf(S_QUOTE);
- int end = field.lastIndexOf(S_QUOTE);
- if (end > quote) {
- field = field.substring(quote + 1, end);
- }
- else
- field = field.substring(quote + 1);
- }
-
- return field.trim();
- }
-
- /**
- *
- */
- public String toAbsolute(String source) {
- if (isUrl(source)) {
- String url = CSSPathService.getAbsoluteURL(baseModel, stripFunc(source));
- return (url != null) ? addFunc(url) : (URL_BEGIN + URL_END);
- }
- return source;
- }
-
- /**
- *
- */
- public boolean toAbsolute(CSSValue node) {
- if (node instanceof ICSSPrimitiveValue) {
- ICSSPrimitiveValue value = (ICSSPrimitiveValue) node;
- if (value.getPrimitiveType() == CSSPrimitiveValue.CSS_URI) {
- value.setValue(stripFunc(toAbsolute(URL_BEGIN + value.getStringValue() + URL_END)));
- return true;
- }
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSPathService.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSPathService.java
deleted file mode 100644
index 4d4af853ed..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSPathService.java
+++ /dev/null
@@ -1,81 +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.css.core.util;
-
-
-
-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.wst.sse.core.IStructuredModel;
-
-/**
- *
- */
-public class CSSPathService {
-
- // Constants
- private static final String FILEURLSCHEME = "file";//$NON-NLS-1$
- private static final String URLCOLON = ":"; //$NON-NLS-1$
- private static final String FILEURLPREFIX = FILEURLSCHEME + URLCOLON + "//";//$NON-NLS-1$
- private static final String URLSEPARATOR = "/"; //$NON-NLS-1$
-
- /**
- * @return java.lang.String
- * @param baseModel
- * com.ibm.sed.model.IStructuredModel
- * @param ref
- * java.lang.String
- */
- public static String getAbsoluteURL(IStructuredModel baseModel, String ref) {
- String absLink = URLModelProviderCSS.resolveURI(baseModel, ref, true);
- String url = absLink;
- if (absLink != null) { // if it has not scheme, we must add "file"
- // scheme
- try {
- new java.net.URL(absLink);
- }
- catch (java.net.MalformedURLException e) {
- IPath path = new Path(absLink);
- if (path != null)
- url = toURL(path);
- }
- }
- return url;
- }
-
- /**
- *
- * @return org.eclipse.core.resources.IFile
- * @param location
- * java.lang.String
- */
- public static IFile location2File(String location) {
- Path path = new Path(location);
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
- if (file == null && path.segmentCount() > 1)
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- return file;
- }
-
- /**
- * Gets a file URL for the path.
- */
- private static String toURL(IPath path) {
- path = new Path(path.toFile().getAbsolutePath());
- if (path.isUNC() == true) {
- // it's UNC. return file://host/foo/bar/baz.html
- return FILEURLSCHEME + URLCOLON + path.toString();
- }
- return FILEURLPREFIX + URLSEPARATOR + path.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSSelectorListFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSSelectorListFactory.java
deleted file mode 100644
index 633e1fc8c1..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSSelectorListFactory.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.css.core.util;
-
-import org.eclipse.wst.css.core.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.internal.document.CSSSelectorListImpl;
-
-
-public class CSSSelectorListFactory {
- static synchronized public CSSSelectorListFactory getInstance() {
- if (fInstance == null) {
- fInstance = new CSSSelectorListFactory();
- }
- return fInstance;
- }
-
- public ICSSSelectorList createSelectorList(String selectorString) {
- return new CSSSelectorListImpl(selectorString);
- }
-
-
- private CSSSelectorListFactory() {
- super();
- }
-
- private static CSSSelectorListFactory fInstance;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSStyleDeclarationFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSStyleDeclarationFactory.java
deleted file mode 100644
index 0aec11a558..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSStyleDeclarationFactory.java
+++ /dev/null
@@ -1,65 +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.css.core.util;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.document.CSSStyleDeclarationFactoryContext;
-
-
-/**
- *
- */
-public class CSSStyleDeclarationFactory extends CSSStyleDeclarationFactoryContext {
-
- private static CSSStyleDeclarationFactory fInstance = null;
-
- /**
- * CSSStyleDeclarationFactory constructor comment.
- */
- private CSSStyleDeclarationFactory() {
- super();
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSStyleDeclaration
- * @param decl
- * org.eclipse.wst.css.core.model.interfaces.ICSSStyleDeclaration
- */
- public ICSSStyleDeclaration createStyleDeclaration(ICSSStyleDeclaration decl) {
- if (decl == null) {
- return null;
- }
- // 11/22/2004, nsd, nothing's done with this variable
-// ICSSStyleDeclaration newNode = createStyleDeclaration();
-
- // 05/11/2004, dmw, unnecessary cast, looks like it was always
- // returning null!
- // so something is probably amiss
- // if (!(newNode instanceof ICSSDocument)) {
- return null;
- // }
- // fOwnerDocument = newNode;
- // cloneChildNodes(decl, newNode);
- // return newNode;
- }
-
- /**
- *
- */
- public synchronized static CSSStyleDeclarationFactory getInstance() {
- if (fInstance == null) {
- fInstance = new CSSStyleDeclarationFactory();
- }
- return fInstance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSUtil.java
deleted file mode 100644
index 34805eaaf4..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSUtil.java
+++ /dev/null
@@ -1,335 +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.css.core.util;
-
-
-
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-
-
-public class CSSUtil {
-
- /**
- *
- */
- public static void debugOut(String str) {
- Logger.log(Logger.WARNING, "css warning: " + str); //$NON-NLS-1$
- }
-
- /**
- *
- */
- // public static Vector extractMediaContents(Vector regions) {
- // Vector media = new Vector();
- // if (regions == null) { return media; }
- //
- // boolean bReady = true;
- // for (Iterator i = regions.iterator(); i.hasNext(); ) {
- // ITextRegion region = (ITextRegion)i.next();
- // if (region == null) { continue; }
- // String type = region.getType();
- // if (bReady) {
- // if (type == IDENT) {
- // media.addElement(region.getText());
- // bReady = false;
- // }
- // } else {
- // if (type == COMMA) {
- // bReady = true;
- // }
- // }
- // }
- //
- // return media;
- // }
- /**
- *
- */
- public static String extractStringContents(String text) {
- return stripQuotes(text);
- }
-
- /**
- *
- */
- public static String extractUriContents(String text) {
- String contents = text.trim();
- if (contents.toLowerCase().startsWith("url(") && //$NON-NLS-1$
- contents.toLowerCase().endsWith(")")) {//$NON-NLS-1$
- // strip "url(", ")"
- contents = contents.substring(4, contents.length() - 1);
- }
- contents = stripQuotes(contents);
-
- return contents;
- }
-
- /**
- *
- */
- public static IStructuredDocumentRegion findNextSignificantNode(IStructuredDocumentRegion startNode) {
- if (startNode == null) {
- return null;
- }
- IStructuredDocumentRegion node = startNode.getNext();
- while (node != null) {
- String type = getStructuredDocumentRegionType(node);
- if (type != CSSRegionContexts.CSS_S && type != CSSRegionContexts.CSS_COMMENT && type != CSSRegionContexts.CSS_CDO && type != CSSRegionContexts.CSS_CDC) {
- return node;
- }
- node = node.getNext();
- }
- return null;
- }
-
- /**
- *
- */
- public static IStructuredDocumentRegion findNodeBackward(IStructuredDocumentRegion startNode, IStructuredDocumentRegion endNode, String type) {
- IStructuredDocumentRegion node;
- for (node = startNode; node != null; node = node.getPrevious()) {
- if (node.getStartOffset() < endNode.getStartOffset()) {
- node = null;
- break;
- }
- else if (getStructuredDocumentRegionType(node) == type) {
- break;
- }
- }
- return node;
- }
-
- /**
- *
- */
- public static IStructuredDocumentRegion findNodeForward(IStructuredDocumentRegion startNode, IStructuredDocumentRegion endNode, String type) {
- IStructuredDocumentRegion node;
- for (node = startNode; node != null; node = node.getNext()) {
- if (endNode.getStartOffset() < node.getStartOffset()) {
- node = null;
- break;
- }
- else if (getStructuredDocumentRegionType(node) == type) {
- break;
- }
- }
- return node;
- }
-
- /**
- *
- */
- public static IStructuredDocumentRegion findPreviousSignificantNode(IStructuredDocumentRegion startNode) {
- if (startNode == null) {
- return null;
- }
- IStructuredDocumentRegion node = startNode.getPrevious();
- while (node != null) {
- String type = getStructuredDocumentRegionType(node);
- if (type != CSSRegionContexts.CSS_S && type != CSSRegionContexts.CSS_COMMENT && type != CSSRegionContexts.CSS_CDO && type != CSSRegionContexts.CSS_CDC) {
- return node;
- }
- node = node.getPrevious();
- }
- return null;
- }
-
- /**
- *
- */
- public static String getClassString(Object object) {
- if (object == null) {
- return "null"; //$NON-NLS-1$
- }
- else {
- String name = object.getClass().toString();
- int lastPeriod = name.lastIndexOf('.');
- return name.substring(lastPeriod + 1);
- }
- }
-
- /**
- *
- */
- public static String getStructuredDocumentRegionType(IStructuredDocumentRegion flatNode) {
- if (flatNode == null) {
- return CSSRegionContexts.CSS_UNDEFINED;
- }
- ITextRegionList regions = flatNode.getRegions();
- if (regions == null || regions.size() == 0) {
- return CSSRegionContexts.CSS_UNDEFINED;
- }
- ITextRegion region = regions.get(0);
- return region.getType();
- }
-
- /**
- *
- */
- public static int getLengthDifference(IStructuredDocumentRegionList newNodes, IStructuredDocumentRegionList oldNodes) {
- int newLen = getTextLength(newNodes);
- int oldLen = getTextLength(oldNodes);
- return newLen - oldLen;
- }
-
- /**
- *
- */
- public static String getRegionText(IStructuredDocumentRegion flatNode, ITextRegionList regions) {
- StringBuffer buf = new StringBuffer();
- if (regions != null) {
- for (Iterator i = regions.iterator(); i.hasNext();) {
- ITextRegion region = (ITextRegion) i.next();
- if (region == null) {
- continue;
- }
- buf.append(flatNode.getText(region));
- }
- }
-
- return buf.toString();
- }
-
- /**
- *
- */
- public static int getTextLength(IStructuredDocumentRegionList nodes) {
- int length = 0;
-
- if (nodes != null) {
- for (Enumeration e = nodes.elements(); e.hasMoreElements();) {
- IStructuredDocumentRegion flatNode = (IStructuredDocumentRegion) e.nextElement();
- if (flatNode != null) {
- length += flatNode.getText().length();
- }
- }
- }
-
- return length;
- }
-
- /**
- *
- * @param token
- * @return
- */
- public static boolean isLength(CSSTextToken token) {
- if (token == null)
- return false;
- if (token.kind == CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION)
- return true;
- if (token.kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- double number = Double.parseDouble(token.image);
- if (number == 0.0)
- return true;
- }
- return false;
- }
-
- /**
- *
- */
- public static boolean isSelectorText(IStructuredDocumentRegion region) {
- String type = getStructuredDocumentRegionType(region);
- if (CSSRegionUtil.isSelectorBegginingType(type)) {
- return true;
- }
- else if (type == CSSRegionContexts.CSS_UNKNOWN) {
- // String text = flatNode.getText();
- // if (text != null && text.indexOf('.') == 0) {
- return true;
- // }
- }
-
- return false;
- }
-
- /**
- *
- */
- public static String stripQuotes(String text) {
- if (text == null)
- return null;
- String contents = text.trim();
- if (2 <= contents.length()) {
- char first = contents.charAt(0);
- char last = contents.charAt(contents.length() - 1);
- if ((first == '\"' && last == '\"') || (first == '\'' && last == '\'')) {
- contents = contents.substring(1, contents.length() - 1);
- }
- }
- return contents;
- }
-
- public static String detectQuote(String source, String defaultQuote) {
- if (source == null)
- return defaultQuote;
- final String D_QUOTE = "\""; //$NON-NLS-1$
- final String S_QUOTE = "\'"; //$NON-NLS-1$
-
- int dIndex = source.indexOf(D_QUOTE);
- int sIndex = source.indexOf(S_QUOTE);
- if (dIndex < 0 && sIndex < 0) {
- return defaultQuote;
- }
- else if (dIndex < 0) {
- return D_QUOTE;
- }
- else if (sIndex < 0) {
- return S_QUOTE;
- }
- else if (dIndex < sIndex) {
- return S_QUOTE;
- }
- else {
- return D_QUOTE;
- }
- }
-
- /**
- *
- */
- public static void stripSurroundingSpace(ITextRegionList regions) {
- if (regions == null) {
- return;
- }
- while (!regions.isEmpty()) {
- ITextRegion region = regions.get(0);
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT) {
- regions.remove(0);
- }
- else {
- break;
- }
- }
- while (!regions.isEmpty()) {
- ITextRegion region = regions.get(regions.size() - 1);
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT) {
- regions.remove(region);
- }
- else {
- break;
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/ImportRuleCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/ImportRuleCollector.java
deleted file mode 100644
index 429f892e64..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/ImportRuleCollector.java
+++ /dev/null
@@ -1,71 +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.css.core.util;
-
-
-
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleSheet;
-
-
-/**
- *
- */
-public class ImportRuleCollector extends org.eclipse.wst.css.core.util.AbstractCssTraverser {
-
- protected java.util.Vector rules = new Vector();
- protected ICSSStyleSheet target = null;
-
- /**
- *
- */
- public ImportRuleCollector() {
- super();
- setTraverseImported(false);
- }
-
- /**
- *
- */
- public ImportRuleCollector(ICSSStyleSheet sheet) {
- super();
- target = sheet;
- }
-
- /**
- *
- */
- public java.util.Vector getRules() {
- return rules;
- }
-
- /**
- *
- */
- protected short preNode(ICSSNode node) {
- if (node.getNodeType() == ICSSNode.MEDIARULE_NODE || node.getNodeType() == ICSSNode.STYLESHEET_NODE) {
- return TRAV_CONT;
- }
- if (node.getNodeType() == ICSSNode.IMPORTRULE_NODE) {
- if (target != null) {
- ICSSImportRule imp = (ICSSImportRule) node;
- if (imp.getStyleSheet() != target)
- return TRAV_PRUNE;
- }
- if (!rules.contains(node))
- rules.add(node);
- }
- return TRAV_PRUNE;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/ImportedCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/ImportedCollector.java
deleted file mode 100644
index 86dfc67c3a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/ImportedCollector.java
+++ /dev/null
@@ -1,61 +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.css.core.util;
-
-
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-
-
-/**
- *
- */
-public class ImportedCollector extends org.eclipse.wst.css.core.util.AbstractCssTraverser {
-
- protected java.util.Vector externals = new Vector();
-
- /**
- *
- */
- public ImportedCollector() {
- super();
- setTraverseImported(true);
- }
-
- /**
- *
- */
- public List getExternals() {
- return externals;
- }
-
- /**
- *
- */
- protected short preNode(ICSSNode node) {
- if (node.getNodeType() == ICSSNode.MEDIARULE_NODE) {
- return TRAV_CONT;
- }
- if (node.getNodeType() == ICSSNode.STYLESHEET_NODE) {
- if (!externals.contains(node)) {
- externals.add(node);
- }
- return TRAV_CONT;
- }
- if (node.getNodeType() == ICSSNode.IMPORTRULE_NODE) {
- return TRAV_CONT;
- }
- return TRAV_PRUNE;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/RegionIterator.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/RegionIterator.java
deleted file mode 100644
index 572f87dcfe..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/RegionIterator.java
+++ /dev/null
@@ -1,140 +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.css.core.util;
-
-
-
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-/**
- *
- */
-public class RegionIterator {
-
- private IStructuredDocumentRegion documentRegion = null;
- private IStructuredDocumentRegion curDocumentRegion = null;
- private int current = -1;
-
- /**
- *
- */
- public RegionIterator(IStructuredDocument structuredDocument, int index) {
- super();
-
- reset(structuredDocument, index);
- }
-
- /**
- *
- */
- public RegionIterator(IStructuredDocumentRegion flatNode, ITextRegion region) {
- super();
- reset(flatNode, region);
- }
-
- /**
- *
- */
- public IStructuredDocumentRegion getStructuredDocumentRegion() {
- return curDocumentRegion;
- }
-
- /**
- *
- */
- public boolean hasNext() {
- if (documentRegion == null)
- return false;
- if (current < 0)
- return false;
- if (current < documentRegion.getRegions().size())
- return true;
- return false;
- }
-
- /**
- *
- */
- public boolean hasPrev() {
- // the same as hasNext()
- return hasNext();
- }
-
- /**
- *
- */
- public ITextRegion next() {
- if (documentRegion == null)
- return null;
- if (current < 0 || documentRegion.getRegions() == null || documentRegion.getRegions().size() <= current)
- return null;
-
- ITextRegion region = documentRegion.getRegions().get(current);
- curDocumentRegion = documentRegion;
-
- if (current >= documentRegion.getRegions().size() - 1) {
- documentRegion = documentRegion.getNext();
- current = -1;
- }
- current++;
-
- return region;
- }
-
- /**
- *
- */
- public ITextRegion prev() {
- if (documentRegion == null)
- return null;
- if (current < 0 || documentRegion.getRegions() == null || documentRegion.getRegions().size() <= current)
- return null;
-
- ITextRegion region = documentRegion.getRegions().get(current);
- curDocumentRegion = documentRegion;
-
- if (current == 0) {
- documentRegion = documentRegion.getPrevious();
- if (documentRegion != null)
- current = documentRegion.getRegions().size();
- else
- current = 0;
- }
- current--;
-
- return region;
- }
-
- /**
- *
- */
- public void reset(IStructuredDocument structuredDocument, int index) {
- documentRegion = structuredDocument.getRegionAtCharacterOffset(index);
- curDocumentRegion = documentRegion;
- if (documentRegion != null) {
- ITextRegion region = documentRegion.getRegionAtCharacterOffset(index);
- current = documentRegion.getRegions().indexOf(region);
- }
- }
-
- /**
- *
- */
- public void reset(IStructuredDocumentRegion flatNode, ITextRegion region) {
- if (region != null && flatNode != null) {
- this.documentRegion = flatNode;
- curDocumentRegion = flatNode;
- current = flatNode.getRegions().indexOf(region);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectionCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectionCollector.java
deleted file mode 100644
index 3f8dee934d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectionCollector.java
+++ /dev/null
@@ -1,76 +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.css.core.util;
-
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.sse.core.IndexedRegion;
-
-
-/**
- */
-public class SelectionCollector extends org.eclipse.wst.css.core.util.AbstractCssTraverser {
-
- int start, end;
- List selectedNodes;
-
- /**
- * SelectionCollector constructor comment.
- */
- public SelectionCollector() {
- super();
- }
-
- /**
- */
- protected void begin(ICSSNode node) {
- selectedNodes = new ArrayList();
- }
-
- /**
- */
- public List getSelectedNodes() {
- if (selectedNodes == null)
- return new ArrayList();
- else
- return new ArrayList(selectedNodes);
- }
-
- /**
- */
- protected short preNode(ICSSNode node) {
- IndexedRegion iNode = (IndexedRegion) node;
- if (iNode.getStartOffset() <= end && start < iNode.getEndOffset()) {
- if (node.getNodeType() != ICSSNode.STYLESHEET_NODE) {
- IndexedRegion iFirstChild = (IndexedRegion) node.getFirstChild();
- IndexedRegion iLastChild = (IndexedRegion) node.getLastChild();
- if (iFirstChild == null || start < iFirstChild.getStartOffset() || iLastChild.getEndOffset() <= end)
- selectedNodes.add(node);
- }
- return TRAV_CONT;
- }
- if (iNode.getStartOffset() > end)
- return TRAV_STOP;
- else
- return TRAV_PRUNE;
- }
-
- /**
- */
- public void setRegion(int newStart, int newEnd) {
- start = newStart;
- end = newEnd;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectorValidator.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectorValidator.java
deleted file mode 100644
index 80ca47728b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectorValidator.java
+++ /dev/null
@@ -1,97 +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.css.core.util;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSSelector;
-import org.eclipse.wst.css.core.document.ICSSSelectorItem;
-import org.eclipse.wst.css.core.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.document.ICSSSimpleSelector;
-import org.eclipse.wst.css.core.internal.document.CSSSelectorListImpl;
-
-
-public class SelectorValidator {
-
- /**
- * Constructor for SelectorValidator.
- */
- public SelectorValidator(String text) {
- super();
- fText = text;
- }
-
- /**
- * Returns true if the text consists of one CLASS selector. syntax check
- * is a little loose (.123 is passed)
- *
- * ".class" -> true ".123" -> true ".class , .class2" -> false
- * ".class.class2" -> false ".123{}" -> false
- */
- public boolean isClass() {
- ICSSSimpleSelector selector = getOnlyOneSimpleSelector();
- if (selector != null) {
- return (selector.getName().length() == 0 && selector.getNumOfAttributes() == 0 && selector.getNumOfClasses() == 1 && selector.getNumOfIDs() == 0 && selector.getNumOfPseudoNames() == 0);
- }
- return false;
- }
-
- /**
- * Returns true if the text consists of one ID selector.
- *
- * "#ID" -> true "H1#myID" -> false "#abc{}" -> false
- */
- public boolean isID() {
- ICSSSimpleSelector selector = getOnlyOneSimpleSelector();
- if (selector != null) {
- return (selector.getName().length() == 0 && selector.getNumOfAttributes() == 0 && selector.getNumOfClasses() == 0 && selector.getNumOfIDs() == 1 && selector.getNumOfPseudoNames() == 0);
- }
- return false;
- }
-
- /**
- * overall check
- *
- * "P#hoge98 + *:hover > A:link, A.external:visited" -> true "H1 H2 {}" ->
- * false
- */
- public boolean isValid() {
- parse();
- return (fSelectorList != null && fSelectorList.getErrorCount() == 0);
- }
-
- private ICSSSimpleSelector getOnlyOneSimpleSelector() {
- parse();
- if (fSelectorList != null && fSelectorList.getLength() == 1) {
- ICSSSelector selector = fSelectorList.getSelector(0);
- int nItem = selector.getLength();
- if (nItem == 1) {
- ICSSSelectorItem item = selector.getItem(0);
- if (item instanceof ICSSSimpleSelector) {
- return (ICSSSimpleSelector) item;
- }
- }
- }
- return null;
- }
-
- private void parse() {
- if (fSelectorList == null) {
- if (fText != null) {
- fSelectorList = new CSSSelectorListImpl(fText);
- }
- }
- }
-
-
- private String fText = null;
- private ICSSSelectorList fSelectorList = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectorsCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectorsCollector.java
deleted file mode 100644
index 26143c0c45..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/SelectorsCollector.java
+++ /dev/null
@@ -1,101 +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.css.core.util;
-
-
-
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSSelector;
-import org.eclipse.wst.css.core.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-
-
-/**
- *
- */
-public class SelectorsCollector extends AbstractCssTraverser {
-
- protected Vector selectors = new Vector();
- protected Vector selectorsToAvoid = null;
-
- /**
- *
- */
- public SelectorsCollector() {
- super();
- setTraverseImported(false);
- }
-
- /**
- *
- */
- public void addSelectorToAvoid(ICSSSelector selToAvoid) {
- if (selToAvoid == null)
- return;
- if (selectorsToAvoid == null)
- selectorsToAvoid = new Vector();
-
- if (!selectorsToAvoid.contains(selToAvoid))
- selectorsToAvoid.add(selToAvoid);
- }
-
- /**
- *
- */
- public void addSelectorToAvoid(ICSSStyleRule rule) {
- ICSSSelectorList list = rule.getSelectors();
- Iterator it = list.getIterator();
- while (it.hasNext()) {
- ICSSSelector sel = (ICSSSelector) it.next();
- addSelectorToAvoid(sel);
- }
- }
-
- /**
- *
- */
- public java.util.List getSelectors() {
- return selectors;
- }
-
- /**
- *
- */
- protected short preNode(ICSSNode node) {
- if (node.getNodeType() == ICSSNode.STYLERULE_NODE) {
- ICSSStyleRule rule = (ICSSStyleRule) node;
- ICSSSelectorList list = rule.getSelectors();
- Iterator it = list.getIterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (selectorsToAvoid != null && selectorsToAvoid.contains(obj))
- continue;
- if (!selectors.contains(obj))
- selectors.add(obj);
- }
- return TRAV_PRUNE;
- }
- else if (node.getNodeType() == ICSSNode.STYLESHEET_NODE) {
- return TRAV_CONT;
- }
- return TRAV_PRUNE;
- }
-
- /**
- *
- */
- public void setSelectorsToAvoid(java.util.Vector newSelectorsToAvoid) {
- selectorsToAvoid = newSelectorsToAvoid;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/URLHelper.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/URLHelper.java
deleted file mode 100644
index d4a3a0e776..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/URLHelper.java
+++ /dev/null
@@ -1,210 +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.css.core.util;
-
-
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.wst.sse.core.util.PathHelper;
-
-/**
- * Hyperlink manager. Proved useful services like link conversion An utility
- * class to help other parsre modules to convert links
- */
-public class URLHelper {
-
- private static final String FILE_PROTOCOL_SEARCH_SIG = "file:/";//$NON-NLS-1$
- private static final String FILE_PROTOCOL_SIG = "file:///";//$NON-NLS-1$
- private static String RELATIVE_PATH_SIG = "..";//$NON-NLS-1$
- private static final String FORWARD_SLASH = "/";//$NON-NLS-1$
- private URL fBaseUrl = null; // base url. assumed to a absulute url
- private String fBaseUrlString = null;
- private URL fDocRoot = null;
- private String fDocRootString = null;
-
- public URLHelper(String baseUrl) {
- initialize(baseUrl, null);
- }
-
- public URLHelper(String baseUrl, String docRoot) {
- initialize(baseUrl, docRoot);
- }
-
- /**
- * Special adujust for file url
- */
- public String adjustFileProtocolUrl(String url) {
- if (url.startsWith(FILE_PROTOCOL_SEARCH_SIG)) {
- url = FILE_PROTOCOL_SIG + url.substring(FILE_PROTOCOL_SEARCH_SIG.length());
- }
- return url;
- }
-
- private String convert(String url, URL baseUrl, String urlString) {
- String absUrl = url;
- if (baseUrl != null) {
- try {
- // do special thing file protocol
- if (baseUrl.getProtocol().equalsIgnoreCase("file")) {//$NON-NLS-1$
- // remove the fist
- if (url.startsWith("/"))//$NON-NLS-1$
- url = url.substring(1);
- // empty string causes malformed exception
- String tempUrl = url;
- if ("".equals(url))//$NON-NLS-1$
- tempUrl = " ";//$NON-NLS-1$
- URL newUrl = new URL(baseUrl, tempUrl);
- // do extra math for file protocol to support ie based
- absUrl = adjustFileProtocolUrl(newUrl.toString());
- }
- else {
- URL newUrl = new URL(fBaseUrl, url);
- absUrl = newUrl.toString();
- }
- }
- catch (MalformedURLException me) {
- }
- // convert everything to forward slash
- absUrl = PathHelper.switchToForwardSlashes(absUrl);
- }
- else {
- // the given may be based on file
- if (urlString != null) {
- // swich the url to proper direction
- url = PathHelper.removeLeadingSeparator(url);
- File fle = new File(urlString, url);
- absUrl = fle.getPath();
-
- }
- // convert everything to forward slash
- absUrl = PathHelper.switchToForwardSlashes(absUrl);
-
- // if the path ends with ".." we need to add a terminating slash
- // or
- // else the link will not be resolved correctly. (it will look
- // like
- // /url/path/to/somewhere/.. instead of /url/path/to/
- if (absUrl.endsWith(FORWARD_SLASH + RELATIVE_PATH_SIG)) {
- absUrl += FORWARD_SLASH;
- }
- }
-
- // resolve relative path to absolute
- absUrl = PathHelper.adjustPath(absUrl);
- return absUrl;
- }
-
- private void initialize(String baseUrl, String docRoot) {
- //
- // Find out whether baes url is a url or file name
- //
- try {
- String temp = PathHelper.appendTrailingURLSlash(baseUrl);
- fBaseUrl = new URL(temp);
- }
- catch (MalformedURLException mue) {
- }
- if (fBaseUrl == null) {
- // it is a file based url
- fBaseUrlString = baseUrl;
- }
-
- // do the same for doc root
- if (docRoot != null) {
- try {
- String temp = PathHelper.appendTrailingURLSlash(docRoot);
- fDocRoot = new URL(temp);
-
- }
- catch (MalformedURLException mue) {
- }
- if (fDocRoot == null) {
- // it is a file based url
- fDocRootString = docRoot;
- }
- }
- }
-
- /**
- * Convert the given url to a abolute url using the base url Input url can
- * be of any othe following format Absolute urls -------------- .
- * http://www.foo.com/ . http://www.foo.com . http://www.foo.com/folder .
- * http://www.foo.com/folder/ . http://www.foo.com/index.html .
- * http://www.foo.com/folder/index.html .
- * http://www.foo.com/folder/../index.html Url relative on document root
- * ------------------------- . / . /folder . /index.html .
- * /folder/index.html . /folder/../index.html
- *
- * Self relative ------------------------- . index.html . ./index.html .
- * ../index.html . folder/index.html . folder/../index.html
- *
- * file based url adds another dimension since it doesn't have a document
- * root So uses fDocRoot if provided
- */
- public String toAbsolute(String url) {
- String absUrl = url;
-
- URL newUrl = null;
- // try to see it is a absolute url
- try {
- newUrl = new URL(url);
- }
- catch (MalformedURLException me) {
- }
- // if document root is provided
- // do special case
- if (newUrl == null) {
- if (fDocRoot == null && fDocRootString == null) {
- // try to check relative url
- absUrl = convert(url, fBaseUrl, fBaseUrlString);
- }
- else {
- // doc root is provided
- // if the url is a doc root based use doc root
-
- if (url.startsWith("/"))//$NON-NLS-1$
- absUrl = convert(url, fDocRoot, fDocRootString);
- else
- absUrl = convert(url, fBaseUrl, fBaseUrlString);
-
- }
- }
- return absUrl;
- }
-
- /**
- * Convert from an absolute url to relative url based on the given url
- * Both are assumed to be ablsute url
- */
- public String toRelative(String url, String documentUrl) {
- String output = url;
- // assuming both urls are absolute
- try {
- URL inputUrl = new URL(url);
- URL docUrl = new URL(documentUrl);
- // filter out if the urls are not fro the same domain
- if (!inputUrl.getProtocol().equals(docUrl.getProtocol()) || !inputUrl.getHost().equals(docUrl.getHost()) || inputUrl.getPort() != docUrl.getPort())
- return output;
- // both url are coming form the same place
- // strip off the domain parts
- String inputName = inputUrl.getFile();
- String docName = docUrl.getFile();
- output = PathHelper.convertToRelative(inputName, docName);
- }
- catch (MalformedURLException me) {
- output = null;
- }
- return output;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/URLModelProviderCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/URLModelProviderCSS.java
deleted file mode 100644
index a11952d4d6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/URLModelProviderCSS.java
+++ /dev/null
@@ -1,388 +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.css.core.util;
-
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.nio.charset.UnsupportedCharsetException;
-
-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.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.common.encoding.EncodingRule;
-import org.eclipse.wst.sse.core.IModelManager;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.exceptions.ResourceAlreadyExists;
-import org.eclipse.wst.sse.core.exceptions.ResourceInUse;
-import org.eclipse.wst.sse.core.util.PathHelper;
-import org.eclipse.wst.sse.core.util.ProjectResolver;
-import org.eclipse.wst.sse.core.util.URIResolver;
-
-/**
- */
-public class URLModelProviderCSS {
-
- private static final int GET_MODEL_FOR_READ = 1;
- // private static final int GET_NEW_MODEL_FOR_READ = 2;
- private static final int GET_MODEL_FOR_EDIT = 3;
- // private static final int GET_NEW_MODEL_FOR_EDIT = 4;
- // private static final int READ_BUFFER_SIZE = 4096;
- // IModelManager
- private IModelManager modelManager = null;
-
- /**
- */
- public URLModelProviderCSS() {
- super();
-
- // obtain model manager
- modelManager = StructuredModelManager.getModelManager();
- }
-
- /**
- * Calculate ID from a filename. This must be same as
- * FileModelProvider.calculateId(IFile)
- */
- private static String calculateId(IPath fullIPath) {
- return fullIPath.toString();
- }
-
- /**
- * <code>baseModel</code>: the model containing the link
- * <code>ref</code>: the link URL string
- */
- private IStructuredModel getCommonModelFor(final IStructuredModel baseModel, final String ref, final int which) throws IOException {
- // first, create absolute url
- String absURL = resolveURI(baseModel, ref, true);
- if ((absURL == null) || (absURL.length() == 0)) {
- return null;
- }
-
- // need to remove file:// scheme if necessary
- // see com.ibm.sed.util.ProjectResolver.getLocationByURI()
- try {
- final URL aURL = new URL(absURL);
- // An actual URL was given, only file:/// is supported
- // resolve it by finding the file it points to
- if (!aURL.getProtocol().equals("platform")) { //$NON-NLS-1$
- if (aURL.getProtocol().equals("file") && (aURL.getHost().equals("localhost") || aURL.getHost().length() == 0)) { //$NON-NLS-2$//$NON-NLS-1$
- absURL = aURL.getFile();
- final IPath ipath = new Path(absURL);
- // if path has a device, and if it begins with
- // IPath.SEPARATOR, remove it
- final String device = ipath.getDevice();
- if ((device != null) && (device.length() > 0)) {
- if (device.charAt(0) == IPath.SEPARATOR) {
- final String newDevice = device.substring(1);
- absURL = ipath.setDevice(newDevice).toString();
- }
- }
-
- }
- }
- }
- catch (MalformedURLException mfuExc) {
- }
-
- // next, decide project
- IProject project = null;
- final IPath fullIPath = new Path(absURL);
- IWorkspaceRoot workspace = ResourcesPlugin.getWorkspace().getRoot();
- IContainer container = workspace.getContainerForLocation(fullIPath);
- if (container != null) {
- // fullIPath doesn't exist in workspace
- project = container.getProject();
- }
-
- // If HTML document has a link to an extern CSS which is not in
- // IProject
- // workspace.getContainerForLoation() may return null. We need to take
- // care
- // of this case
-
- // now, get absURL's IFile
- if ((project != null) && (project.getLocation().isPrefixOf(fullIPath) == false)) {
- // it's at outside of Project
- return null;
- }
-
- IStructuredModel model = null;
- if (project != null) {
- IPath filePath = fullIPath.removeFirstSegments(project.getLocation().segmentCount());
- IFile file = (filePath != null && !filePath.isEmpty()) ? project.getFile(filePath) : null;
- if (file == null) {
- return null;
- }
-
- // obtain model
- if (which == GET_MODEL_FOR_EDIT) {
- model = getModelForEdit(file);
- }
- else if (which == GET_MODEL_FOR_READ) {
- model = getModelForRead(file);
- }
-
- // setting synchronization stamp is IModelManager's client's
- // responsibility
- if (model != null && model.getSynchronizationStamp() == IResource.NULL_STAMP)
- model.resetSynchronizationStamp(file);
- }
- else {
- String id = null;
- InputStream inStream = null;
- // obtain resolver
- URIResolver resolver = (project != null) ? (URIResolver) project.getAdapter(URIResolver.class) : null;
- if (resolver == null) {
- // ProjectResolver can take care of the case if project is
- // null.
- resolver = new ProjectResolver(project);
- }
- if (resolver == null) {
- return null;
- }
-
- // there is no project. we can't expect IProject help to create
- // id/inputStream
- File file = fullIPath.toFile();
-
- // obatin id
- id = calculateId(fullIPath);
-
- // obtain InputStream
- try {
- inStream = new FileInputStream(file);
- }
- catch (FileNotFoundException fnfe) {
- // the file does not exist, or we don't have read permission
- return null;
- }
-
- // obtain model
- try {
- if (which == GET_MODEL_FOR_EDIT) {
- model = getModelManager().getModelForEdit(id, inStream, resolver);
- }
- else if (which == GET_MODEL_FOR_READ) {
- model = getModelManager().getModelForRead(id, inStream, resolver);
- }
- }
- catch (UnsupportedEncodingException ue) {
- }
- catch (IOException ioe) {
- }
- finally {
- // close now !
- if (inStream != null) {
- inStream.close();
- }
- }
- }
-
- // set locationid
- if (model != null && model.getBaseLocation() == null) {
- model.setBaseLocation(fullIPath.toString());
- }
-
- return model;
- }
-
- /**
- * <code>baseModel</code>: the model containing the link
- * <code>ref</code>: the link URL string
- */
- public IStructuredModel getModelForEdit(IStructuredModel baseModel, String ref) throws IOException {
- return getCommonModelFor(baseModel, ref, GET_MODEL_FOR_EDIT);
- }
-
- /**
- */
- private IStructuredModel getModelForEdit(IFile file) throws IOException {
- if (file == null)
- return null;
- IModelManager manager = getModelManager();
-
- // create a fake InputStream
- IStructuredModel model = null;
- try {
- model = manager.getModelForEdit(file);
- }
- catch (UnsupportedCharsetException ex) {
- try {
- model = manager.getModelForEdit(file, EncodingRule.FORCE_DEFAULT);
- }
- catch (IOException ioe) {
- }
- catch (CoreException ce) {
- }
- }
- catch (CoreException ce) {
- }
- return model;
- }
-
- /**
- * <code>baseModel</code>: the model containing the link
- * <code>ref</code>: the link URL string
- */
- public IStructuredModel getModelForRead(IStructuredModel baseModel, String ref) throws UnsupportedEncodingException, IOException {
- return getCommonModelFor(baseModel, ref, GET_MODEL_FOR_READ);
- }
-
- /**
- */
- private IStructuredModel getModelForRead(IFile file) throws IOException {
- if (file == null)
- return null;
- IModelManager manager = getModelManager();
-
- // create a fake InputStream
- IStructuredModel model = null;
- try {
- model = manager.getModelForRead(file);
- }
- catch (UnsupportedCharsetException ex) {
- try {
- model = manager.getModelForRead(file, EncodingRule.FORCE_DEFAULT);
- }
- catch (IOException ioe) {
- }
- catch (CoreException ce) {
- }
- }
- catch (CoreException ce) {
- }
- return model;
- }
-
- /**
- */
- private IModelManager getModelManager() {
- return modelManager;
- }
-
- public IStructuredModel getNewModelForEdit(IFile iFile) {
- if (iFile == null)
- return null;
- IModelManager manager = getModelManager();
- if (manager == null)
- return null;
-
- IStructuredModel model = null;
- try {
- model = manager.getNewModelForEdit(iFile, false);
- }
- catch (IOException ex) {
- }
- catch (ResourceInUse riu) {
- }
- catch (ResourceAlreadyExists rae) {
- }
- catch (CoreException ce) {
- }
- return model;
- }
-
- public IStructuredModel getNewModelForRead(IFile iFile) {
- if (iFile == null)
- return null;
- IModelManager manager = getModelManager();
- if (manager == null)
- return null;
-
- IStructuredModel model = null;
- try {
- model = manager.getNewModelForEdit(iFile, false);
- }
- catch (IOException ex) {
- }
- catch (ResourceInUse riu) {
- }
- catch (ResourceAlreadyExists rae) {
- }
- catch (CoreException ce) {
- }
- return model;
- }
-
- /**
- * <code>baseModel</code>: the model containing the link
- * <code>ref</code>: the link URL string
- * <code>resolveCrossProjectLinks</code>: If resolveCrossProjectLinks
- * is set to true, then this method will properly resolve the URI if it is
- * a valid URI pointing to another (appropriate) project.
- */
- public static String resolveURI(IStructuredModel baseModel, String ref, boolean resolveCrossProjectLinks) {
- if (baseModel == null)
- return null;
-
- // get resolver in Model
- final URIResolver resolver = baseModel.getResolver();
-
- // resolve to absolute url
- final String absurl = (resolver != null) ? resolver.getLocationByURI(ref, resolveCrossProjectLinks) : null;
- if ((resolver != null) && (absurl == null) && (ref != null) && (ref.trim().length() > 0) && (ref.trim().charAt(0) == '/')) {
- // to reach here means :
- // ref is a Docroot relative
- // resolver can't resolve ref
- // so that href is a broken and should not create model
- return null;
- }
- if ((absurl != null) && (absurl.length() > 0)) {
- return absurl;
- }
-
- // maybe ref is at outside of the Project
- // obtain docroot;
- final IContainer container = (resolver != null) ? resolver.getRootLocation() : null;
- String docroot = null;
- if (container != null) {
- docroot = container.getLocation().toString();
- }
- if (docroot == null) {
- docroot = baseModel.getBaseLocation();
- }
- if (docroot == null) {
- // should not be
- return null;
- }
-
- // obtain document url
- String modelBaseLocation = baseModel.getBaseLocation();
- if ((modelBaseLocation == null) || (modelBaseLocation.length() == 0)) {
- // fallback...
- modelBaseLocation = baseModel.getId();
- }
- if ((modelBaseLocation == null) || (modelBaseLocation.length() == 0)) {
- // i can't resolve uri !
- return null;
- }
-
- // resolve url
- URLHelper helper = new URLHelper(PathHelper.getContainingFolderPath(modelBaseLocation), PathHelper.getContainingFolderPath(PathHelper.appendTrailingURLSlash(docroot)));
- return helper.toAbsolute(ref);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundPositionXSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundPositionXSubStyleAdapter.java
deleted file mode 100644
index edf94f0d4b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundPositionXSubStyleAdapter.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.css.core.util.declaration;
-
-
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSValue;
-import org.eclipse.wst.css.core.document.ICSSValueList;
-import org.eclipse.wst.css.core.internal.contentmodel.IValID;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMUtil;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- * for horizontal value of 'background-position'
- */
-public class BackgroundPositionXSubStyleAdapter implements ISubPropertyAdapter {
-
- /**
- *
- */
- public BackgroundPositionXSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- protected CSSTextToken[] correctMeaningToken(CSSTextToken[] src) {
- java.util.ArrayList list = new java.util.ArrayList();
- for (int i = 0; i < src.length; i++) {
- if (src[i].kind != CSSRegionContexts.CSS_S && src[i].kind != CSSRegionContexts.CSS_DECLARATION_VALUE_S && src[i].kind != CSSRegionContexts.CSS_COMMENT)
- list.add(src[i]);
- }
- CSSTextToken[] ret = new CSSTextToken[list.size()];
- list.toArray(ret);
- return ret;
- }
-
- /**
- *
- */
- public String get(ICSS2Properties properties) {
- String str = null;
- Object obj = properties.get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION));
- if (obj != null) {
- PropCMProperty propX = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X);
- PropCMProperty propY = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y);
- if (obj instanceof ICSSValueList) {
- ICSSValueList list = (ICSSValueList) obj;
- ICSSValue value = (ICSSValue) list.item(0);
- if (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
- ICSSPrimitiveValue prim = (ICSSPrimitiveValue) value;
- if (prim.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) {
- // check not top or bottom
- if (!propX.canHave(prim.getStringValue()) && propY.canHave(prim.getStringValue())) {
- // case order is vertical -> horizontal
- value = (ICSSValue) list.item(1);
- }
- }
- }
- str = value.getCSSValueText();
- }
- else if (obj instanceof ICSSValue) {
- str = ((ICSSValue) obj).getCSSValueText();
- if (str.equalsIgnoreCase(IValID.V_BOTTOM) || str.equalsIgnoreCase(IValID.V_TOP))
- str = "";//$NON-NLS-1$
- }
- else {
- str = obj.toString();
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, str);
- CSSTextToken[] tokens = parser.getTokens();
-
- tokens = correctMeaningToken(tokens);
- if (tokens.length == 0)
- str = "";//$NON-NLS-1$
- else if (tokens.length == 1 && (tokens[0].image.equalsIgnoreCase(IValID.V_BOTTOM) || tokens[0].image.equalsIgnoreCase(IValID.V_TOP)))
- str = "";//$NON-NLS-1$
- else
- str = tokens[0].image;
- }
- }
- return (str != null) ? str : "";//$NON-NLS-1$
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String newValue = null;
- String valH = value;
- String valV = properties.getBackgroundPositionY();
- if (valV == null || valV.length() == 0)
- newValue = valH;
- else if (valH == null || valH.length() == 0) {
- Collection valX = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X).getValues();
- Collection valY = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y).getValues();
- PropCMUtil.minus(valY, valX);
- Iterator it = valY.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj.toString().equals(valV.toLowerCase())) {
- // need not compensate for ...
- newValue = valV;
- break;
- }
- }
- // compensate for Horizontal value
- if (newValue == null) {
- // check valV is length or not
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, valV.trim());
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens != null && tokens.length > 0 && tokens[0].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- newValue = IValID.V_LEFT + " " + valV;//$NON-NLS-1$
- }
- else
- newValue = "0% " + valV;//$NON-NLS-1$
- }
- }
- else
- newValue = valH + " " + valV;//$NON-NLS-1$
- properties.setBackgroundPosition(newValue);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundPositionYSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundPositionYSubStyleAdapter.java
deleted file mode 100644
index 4023462f08..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundPositionYSubStyleAdapter.java
+++ /dev/null
@@ -1,150 +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.css.core.util.declaration;
-
-
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSValue;
-import org.eclipse.wst.css.core.document.ICSSValueList;
-import org.eclipse.wst.css.core.internal.contentmodel.IValID;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMUtil;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- * for vertical value of 'background-position'
- */
-public class BackgroundPositionYSubStyleAdapter implements ISubPropertyAdapter {
-
- /**
- *
- */
- public BackgroundPositionYSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- protected CSSTextToken[] correctMeaningToken(CSSTextToken[] src) {
- java.util.ArrayList list = new java.util.ArrayList();
- for (int i = 0; i < src.length; i++) {
- if (src[i].kind != CSSRegionContexts.CSS_S && src[i].kind != CSSRegionContexts.CSS_DECLARATION_VALUE_S && src[i].kind != CSSRegionContexts.CSS_COMMENT)
- list.add(src[i]);
- }
- CSSTextToken[] ret = new CSSTextToken[list.size()];
- list.toArray(ret);
- return ret;
- }
-
- /**
- *
- */
- public String get(ICSS2Properties properties) {
- String str = null;
- Object obj = properties.get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION));
- if (obj != null) {
- PropCMProperty propX = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X);
- PropCMProperty propY = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y);
- if (obj instanceof ICSSValueList) {
- ICSSValueList list = (ICSSValueList) obj;
- int index = 1;
- ICSSValue value = (ICSSValue) list.item(0);
- if (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
- ICSSPrimitiveValue prim = (ICSSPrimitiveValue) value;
- if (prim.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) {
- // check not top or bottom
- if (!propX.canHave(prim.getStringValue()) && propY.canHave(prim.getStringValue())) {
- // case order is vertical -> horizontal
- index = 0;
- }
- }
- }
- str = ((ICSSValue) list.item(index)).getCSSValueText();
- }
- else if (obj instanceof ICSSValue) {
- str = ((ICSSValue) obj).getCSSValueText();
- if (!str.equalsIgnoreCase(IValID.V_BOTTOM) && !str.equalsIgnoreCase(IValID.V_TOP))
- str = "";//$NON-NLS-1$
- }
- else {
- str = obj.toString();
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, str);
- CSSTextToken[] tokens = parser.getTokens();
-
- tokens = correctMeaningToken(tokens);
- if (tokens.length == 1 && (tokens[0].image.equalsIgnoreCase(IValID.V_BOTTOM) || tokens[0].image.equalsIgnoreCase(IValID.V_TOP)))
- str = tokens[0].image;
- else if (tokens.length > 1)
- str = tokens[1].image;
- else
- str = "";//$NON-NLS-1$
- }
- }
- return (str != null) ? str : "";//$NON-NLS-1$
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String newValue = null;
- String valH = properties.getBackgroundPositionX();
- String valV = value;
- if (valH != null && (valH.trim().equals("0%") /* default value */|| //$NON-NLS-1$
- valH.trim().equalsIgnoreCase(IValID.V_LEFT) /*
- * another
- * default
- * value
- */))
- valH = null;
- if (valV == null || valV.length() == 0)
- newValue = valH;
- else if (valH == null || valH.length() == 0) {
- Collection valX = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X).getValues();
- Collection valY = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y).getValues();
- PropCMUtil.minus(valY, valX);
- Iterator it = valY.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj.toString().equals(valV.toLowerCase())) {
- // need not compensate for ...
- newValue = valV;
- break;
- }
- }
- // compensate for Horizontal value
- if (newValue == null) {
- // check valV is length or not
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, valV.trim());
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens != null && tokens.length > 0 && tokens[0].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- newValue = IValID.V_LEFT + " " + valV;//$NON-NLS-1$
- }
- else
- newValue = "0% " + valV;//$NON-NLS-1$
- }
- }
- else
- newValue = valH + " " + valV;//$NON-NLS-1$
- properties.setBackgroundPosition(newValue);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundShorthandAdapter.java
deleted file mode 100644
index bc42dd28e8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BackgroundShorthandAdapter.java
+++ /dev/null
@@ -1,179 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'background' property 'background' will be expanded to
- * 'background-attachment', 'background-color', 'background-image',
- * 'background-position', 'background-repeat',
- */
-public class BackgroundShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BackgroundShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", image = "", repeat = "", attach = "", pos = "";//$NON-NLS-5$//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR);
- PropCMProperty propImage = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE);
- PropCMProperty propRepeat = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT);
- PropCMProperty propAttach = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT);
- PropCMProperty propPos = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- else if (propImage.canHave(tokens[i].image))
- image = tokens[i].image;
- else if (propRepeat.canHave(tokens[i].image))
- repeat = tokens[i].image;
- else if (propAttach.canHave(tokens[i].image))
- attach = tokens[i].image;
- else if (propPos.canHave(tokens[i].image)) {
- if (pos == null || pos.length() <= 0)
- pos = tokens[i].image;
- else
- pos = pos + " " + tokens[i].image;//$NON-NLS-1$
- }
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE) {
- if (pos == null || pos.length() <= 0)
- pos = tokens[i].image;
- else
- pos = pos + " " + tokens[i].image;//$NON-NLS-1$
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- image = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propImage.getName(), image);
- dest.set(propRepeat.getName(), repeat);
- dest.set(propAttach.getName(), attach);
- dest.set(propPos.getName(), pos);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, image = null, repeat = null, attach = null, pos = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR);
- PropCMProperty propImage = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE);
- PropCMProperty propRepeat = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT);
- PropCMProperty propAttach = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT);
- PropCMProperty propPos = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- else if (propImage.canHave(tokens[i].image))
- image = tokens[i].image;
- else if (propRepeat.canHave(tokens[i].image))
- repeat = tokens[i].image;
- else if (propAttach.canHave(tokens[i].image))
- attach = tokens[i].image;
- else if (propPos.canHave(tokens[i].image)) {
- if (pos == null)
- pos = tokens[i].image;
- else
- pos = pos + " " + tokens[i].image;//$NON-NLS-1$
- }
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE) {
- if (pos == null)
- pos = tokens[i].image;
- else
- pos = pos + " " + tokens[i].image;//$NON-NLS-1$
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- image = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propImage == propDest)
- return image;
- else if (propRepeat == propDest)
- return repeat;
- else if (propAttach == propDest)
- return attach;
- else if (propPos == propDest)
- return pos;
- else
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderBottomShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderBottomShorthandAdapter.java
deleted file mode 100644
index 95f851c614..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderBottomShorthandAdapter.java
+++ /dev/null
@@ -1,140 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'border-bottom' property 'border-bottom' will be expanded to
- * 'border-bottom-color', 'border-bottom-style', 'border-bottom-width',
- */
-public class BorderBottomShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderBottomShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", style = "", width = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propStyle.getName(), style);
- dest.set(propWidth.getName(), width);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, style = null, width = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propStyle == propDest)
- return style;
- else if (propWidth == propDest)
- return width;
- else
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderColorShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderColorShorthandAdapter.java
deleted file mode 100644
index fe81a31766..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderColorShorthandAdapter.java
+++ /dev/null
@@ -1,158 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'border-color' property 'border-color' will be expanded to
- * 'border-top-color', 'border-right-color', 'border-bottom-color',
- * 'border-left-color',
- */
-public class BorderColorShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderColorShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH)
- idents[j++] = tokens[i].image;
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- idents[j++] = buf.toString();
- }
- if (j == 4)
- break;
- }
-
- String[] dests = new String[4];
- if (j == 0)
- return true;
- else if (j == 1) {
- dests[0] = dests[1] = dests[2] = dests[3] = idents[0];
- }
- else if (j == 2) {
- dests[0] = dests[2] = idents[0];
- dests[1] = dests[3] = idents[1];
- }
- else if (j == 3) {
- dests[0] = idents[0];
- dests[1] = dests[3] = idents[1];
- dests[2] = idents[2];
- }
- else {
- for (int k = 0; k < 4; k++)
- dests[k] = idents[k];
- }
- dest.set(PropCMProperty.P_BORDER_TOP_COLOR, dests[0]);
- dest.set(PropCMProperty.P_BORDER_RIGHT_COLOR, dests[1]);
- dest.set(PropCMProperty.P_BORDER_BOTTOM_COLOR, dests[2]);
- dest.set(PropCMProperty.P_BORDER_LEFT_COLOR, dests[3]);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH)
- idents[j++] = tokens[i].image;
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- idents[j++] = buf.toString();
- }
- if (j == 4)
- break;
- }
-
- if (j == 0)
- return null;
- else if (j == 1)
- return idents[0];
- else if (j == 2) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_COLOR || propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_COLOR)
- return idents[0];
- else
- return idents[1];
- }
- else if (j == 3) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_COLOR)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_COLOR)
- return idents[2];
- else
- return idents[1];
- }
- else {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_COLOR)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_RIGHT_COLOR)
- return idents[1];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_COLOR)
- return idents[2];
- else if (propDest.getName() == PropCMProperty.P_BORDER_LEFT_COLOR)
- return idents[3];
- else
- return null;
- }
-
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderLeftShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderLeftShorthandAdapter.java
deleted file mode 100644
index 23564e68c0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderLeftShorthandAdapter.java
+++ /dev/null
@@ -1,140 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'border-left' property 'border-left' will be expanded to
- * 'border-left-color', 'border-left-style', 'border-left-width',
- */
-public class BorderLeftShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderLeftShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", style = "", width = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propStyle.getName(), style);
- dest.set(propWidth.getName(), width);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, style = null, width = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propStyle == propDest)
- return style;
- else if (propWidth == propDest)
- return width;
- else
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderRightShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderRightShorthandAdapter.java
deleted file mode 100644
index a62197b4f7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderRightShorthandAdapter.java
+++ /dev/null
@@ -1,140 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'border-right' property 'border-right' will be expanded to
- * 'border-right-color', 'border-right-style', 'border-right-width',
- */
-public class BorderRightShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderRightShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", style = "", width = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propStyle.getName(), style);
- dest.set(propWidth.getName(), width);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, style = null, width = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propStyle == propDest)
- return style;
- else if (propWidth == propDest)
- return width;
- else
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderShorthandAdapter.java
deleted file mode 100644
index 6f82189ce4..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderShorthandAdapter.java
+++ /dev/null
@@ -1,140 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'border' property 'border' will be expanded to 'border-color',
- * 'border-style', 'border-width',
- */
-public class BorderShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", style = "", width = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propStyle.getName(), style);
- dest.set(propWidth.getName(), width);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, style = null, width = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propStyle == propDest)
- return style;
- else if (propWidth == propDest)
- return width;
- else
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderStyleShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderStyleShorthandAdapter.java
deleted file mode 100644
index 337560a1a0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderStyleShorthandAdapter.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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'border-style' property 'border-style' will be expanded to
- * 'border-top-style', 'border-right-style', 'border-bottom-style',
- * 'border-left-style',
- */
-public class BorderStyleShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderStyleShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- String[] dests = new String[4];
- if (j == 0)
- return true;
- else if (j == 1) {
- dests[0] = dests[1] = dests[2] = dests[3] = idents[0];
- }
- else if (j == 2) {
- dests[0] = dests[2] = idents[0];
- dests[1] = dests[3] = idents[1];
- }
- else if (j == 3) {
- dests[0] = idents[0];
- dests[1] = dests[3] = idents[1];
- dests[2] = idents[2];
- }
- else {
- for (int k = 0; k < 4; k++)
- dests[k] = idents[k];
- }
- dest.set(PropCMProperty.P_BORDER_TOP_STYLE, dests[0]);
- dest.set(PropCMProperty.P_BORDER_RIGHT_STYLE, dests[1]);
- dest.set(PropCMProperty.P_BORDER_BOTTOM_STYLE, dests[2]);
- dest.set(PropCMProperty.P_BORDER_LEFT_STYLE, dests[3]);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- if (j == 0)
- return null;
- else if (j == 1)
- return idents[0];
- else if (j == 2) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_STYLE || propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_STYLE)
- return idents[0];
- else
- return idents[1];
- }
- else if (j == 3) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_STYLE)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_STYLE)
- return idents[2];
- else
- return idents[1];
- }
- else {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_STYLE)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_RIGHT_STYLE)
- return idents[1];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_STYLE)
- return idents[2];
- else if (propDest.getName() == PropCMProperty.P_BORDER_LEFT_STYLE)
- return idents[3];
- else
- return null;
- }
-
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderTopShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderTopShorthandAdapter.java
deleted file mode 100644
index c619eebba9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderTopShorthandAdapter.java
+++ /dev/null
@@ -1,140 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'border-top' property 'border-top' will be expanded to
- * 'border-top-color', 'border-top-style', 'border-top-width',
- */
-public class BorderTopShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderTopShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", style = "", width = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propStyle.getName(), style);
- dest.set(propWidth.getName(), width);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, style = null, width = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propStyle == propDest)
- return style;
- else if (propWidth == propDest)
- return width;
- else
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderWidthShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderWidthShorthandAdapter.java
deleted file mode 100644
index 8c41ad739a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/BorderWidthShorthandAdapter.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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'border-width' property 'border-width' will be expanded to
- * 'border-top-width', 'border-right-width', 'border-bottom-width',
- * 'border-left-width',
- */
-public class BorderWidthShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderWidthShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- String[] dests = new String[4];
- if (j == 0)
- return true;
- else if (j == 1) {
- dests[0] = dests[1] = dests[2] = dests[3] = idents[0];
- }
- else if (j == 2) {
- dests[0] = dests[2] = idents[0];
- dests[1] = dests[3] = idents[1];
- }
- else if (j == 3) {
- dests[0] = idents[0];
- dests[1] = dests[3] = idents[1];
- dests[2] = idents[2];
- }
- else {
- for (int k = 0; k < 4; k++)
- dests[k] = idents[k];
- }
- dest.set(PropCMProperty.P_BORDER_TOP_WIDTH, dests[0]);
- dest.set(PropCMProperty.P_BORDER_RIGHT_WIDTH, dests[1]);
- dest.set(PropCMProperty.P_BORDER_BOTTOM_WIDTH, dests[2]);
- dest.set(PropCMProperty.P_BORDER_LEFT_WIDTH, dests[3]);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- if (j == 0)
- return null;
- else if (j == 1)
- return idents[0];
- else if (j == 2) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_WIDTH || propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_WIDTH)
- return idents[0];
- else
- return idents[1];
- }
- else if (j == 3) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_WIDTH)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_WIDTH)
- return idents[2];
- else
- return idents[1];
- }
- else {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_WIDTH)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_RIGHT_WIDTH)
- return idents[1];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_WIDTH)
- return idents[2];
- else if (propDest.getName() == PropCMProperty.P_BORDER_LEFT_WIDTH)
- return idents[3];
- else
- return null;
- }
-
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/CSSPropertyContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/CSSPropertyContext.java
deleted file mode 100644
index b01714576f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/CSSPropertyContext.java
+++ /dev/null
@@ -1,2997 +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.css.core.util.declaration;
-
-
-
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.document.ICSSValue;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- *
- */
-public class CSSPropertyContext implements ICSS2Properties {
-
- protected Hashtable fProperties = new Hashtable();
- HashSet fModified = null;
- private static java.util.Hashtable subPropertyAdapters;
- private static java.util.Hashtable shorthandAdapters;
-
- /**
- *
- */
- public CSSPropertyContext() {
- super();
- initShorthandAdapters();
- initSubPropertyAdapters();
- }
-
- /**
- *
- */
- public CSSPropertyContext(ICSSStyleDeclaration decl) {
- super();
- initShorthandAdapters();
- initSubPropertyAdapters();
- initialize(decl);
- }
-
- /**
- * This function exports all property/value pairs to 'decl' declaration
- */
- public void applyFull(ICSSStyleDeclaration decl) {
- if (decl == null)
- return;
- Enumeration keys = fProperties.keys();
- while (keys.hasMoreElements()) {
- Object key = keys.nextElement();
- Object val = fProperties.get(key);
- String value = (val instanceof ICSSValue) ? ((ICSSValue) val).getCSSValueText() : val.toString();
-
- if (value == null || value.length() <= 0)
- decl.removeProperty(key.toString());
- else
- decl.setProperty(key.toString(), value.trim(), (val instanceof ValueData && ((ValueData) val).important) ? "!important" : "");//$NON-NLS-2$//$NON-NLS-1$
- }
- }
-
- /**
- * This function exports modified property/value pairs to 'decl'
- * declaration
- */
- public void applyModified(ICSSStyleDeclaration decl) {
- if (decl == null || fModified == null)
- return;
- Iterator it = fModified.iterator();
- while (it.hasNext()) {
- Object key = it.next();
- Object val = fProperties.get(key);
- String value = (val instanceof ICSSValue) ? ((ICSSValue) val).getCSSValueText() : ((val != null) ? val.toString() : null);
-
- if (value == null || value.length() <= 0)
- decl.removeProperty(key.toString());
- else
- decl.setProperty(key.toString(), value.trim(), (val instanceof ValueData && ((ValueData) val).important) ? "!important" : "");//$NON-NLS-2$//$NON-NLS-1$
- }
- }
-
- /**
- * create clone of this context
- */
- public Object clone() {
- CSSPropertyContext clone = new CSSPropertyContext();
- if (this.fModified != null)
- clone.fModified = (HashSet) this.fModified.clone();
- else
- clone.fModified = null;
- clone.fProperties = (Hashtable) this.fProperties.clone();
- return clone;
- }
-
- /**
- * This function expands a short-hand property's value to each leaf
- * property's value and set them to 'foreign'
- *
- * For example, given [prop=border-top, value="solid 1px yellow"] will be
- * expanded to [border-top-color=yellow, border-top-style=solid,
- * border-top-width=1px] and they are stored to 'foreign' context.
- *
- * Note that recursively shorthanded property like 'border' will be
- * expanded to all descendant leaf properties like
- * 'border-[top/right/bottom/left]-[color/style/width]'
- *
- * @param prop
- * org.eclipse.wst.css.core.contentmodel.PropCMProperty
- * @param value
- * java.lang.String
- * @param foreign
- * org.eclipse.wst.css.core.util.declaration.CSSPropertyContext
- */
- protected static void expandToLeaf(PropCMProperty prop, String value, CSSPropertyContext foreign) {
- // expand shorthand property
- if (value != null && value.trim().length() > 0) {
- IShorthandAdapter adapter = (IShorthandAdapter) shorthandAdapters.get(prop);
- if (adapter != null) {
- adapter.expand(value, foreign);
- foreign.set(prop.getName(), "");//$NON-NLS-1$
- for (int i = 0; i < prop.getNumChild(); i++) {
- Object obj = prop.getChildAt(i);
- if (obj instanceof PropCMProperty && !(obj instanceof PropCMSubProperty)) {
- PropCMProperty expandedProp = (PropCMProperty) obj;
- value = foreign.get(expandedProp.getName());
- expandToLeaf(expandedProp, value, foreign);
- }
- }
- }
- else if (!value.equals(foreign.get(prop.getName()))) {
- foreign.set(prop.getName(), value);
- }
- }
- }
-
- /**
- * This function returns value of 'prop'. Querying value mechanism checks
- * short-hand properties.
- *
- * For example, given "background=fixed white" is set in this insatnce and
- * param "prop=background-color", the return value will be "white".
- *
- */
- public java.lang.String get(org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty prop) {
- if (prop instanceof PropCMSubProperty) {
- ISubPropertyAdapter adapter = (ISubPropertyAdapter) subPropertyAdapters.get(prop.getName());
- if (adapter != null)
- return adapter.get(this);
- }
- String str = get(prop.getName());
- if ((str == null || str.length() == 0) && prop.getShorthandContainerCount() > 0) {
- // get expanded property
- for (int i = 0; i < prop.getShorthandContainerCount(); i++) {
- PropCMProperty propParent = prop.shorthandContainerAt(i);
- String strParent = get(propParent);
- if (strParent != null && strParent.trim().length() > 0) {
- IShorthandAdapter adapter = (IShorthandAdapter) shorthandAdapters.get(propParent);
- if (adapter != null) {
- String extractedValue = adapter.extract(strParent, prop);
- return (extractedValue != null) ? extractedValue : "";//$NON-NLS-1$
- }
- }
- }
- }
- return str;
- }
-
- /**
- * This function returns value of 'prop'. Querying value mechanism does
- * not care shorthand properties.
- */
- protected String get(String propName) {
- String str = null;
- Object obj = fProperties.get(propName);
- if (obj != null) {
- if (obj instanceof ICSSValue)
- str = ((ICSSValue) obj).getCSSValueText();
- else
- str = obj.toString();
- }
- return (str != null) ? str : "";//$NON-NLS-1$
- }
-
- /**
- * See the azimuth property definition in CSS2.
- *
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getAzimuth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_AZIMUTH));
- }
-
- /**
- * See the background property definition in CSS2.
- *
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackground() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG));
- }
-
- /**
- * See the background-attachment property definition in CSS2.
- *
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundAttachment() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT));
- }
-
- /**
- * See the background-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR));
- }
-
- /**
- * See the background-image property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundImage() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE));
- }
-
- /**
- * See the background-position property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundPosition() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION));
- }
-
- /**
- *
- */
- public java.lang.String getBackgroundPositionX() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X));
- /*
- * String str = null; Object obj =
- * fProperties.get(PropCMProperty.P_BG_POSITION); if (obj != null) {
- * PropCMProperty propX =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X);
- * PropCMProperty propY =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y);
- * if (obj instanceof ICSSValueList) { ICSSValueList list =
- * (ICSSValueList) obj; ICSSValue value = (ICSSValue) list.item(0); if
- * (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
- * ICSSPrimitiveValue prim = (ICSSPrimitiveValue) value; if
- * (prim.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) { // check
- * not top or bottom if (!propX.canHave(prim.getStringValue()) &&
- * propY.canHave(prim.getStringValue())) { // case order is vertical ->
- * horizontal value = (ICSSValue) list.item(1); } } } str =
- * value.getCSSValueText(); } else if (obj instanceof ICSSValue) { str =
- * ((ICSSValue)obj).getCSSValueText(); } else str = obj.toString(); }
- * return (str != null) ? str : "";
- */
- }
-
- /**
- *
- */
- public java.lang.String getBackgroundPositionY() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y));
- /*
- * String str = null; Object obj =
- * fProperties.get(PropCMProperty.P_BG_POSITION); if (obj != null) {
- * PropCMProperty propX =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X);
- * PropCMProperty propY =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y);
- * if (obj instanceof ICSSValueList) { ICSSValueList list =
- * (ICSSValueList) obj; int index = 1; ICSSValue value = (ICSSValue)
- * list.item(0); if (value.getCssValueType() ==
- * CSSValue.CSS_PRIMITIVE_VALUE) { ICSSPrimitiveValue prim =
- * (ICSSPrimitiveValue) value; if (prim.getPrimitiveType() ==
- * CSSPrimitiveValue.CSS_IDENT) { // check not top or bottom if
- * (!propX.canHave(prim.getStringValue()) &&
- * propY.canHave(prim.getStringValue())) { // case order is vertical ->
- * horizontal index = 0; } } } str =
- * ((ICSSValue)list.item(index)).getCSSValueText(); } else if (obj
- * instanceof ICSSValue) { // do nothing --- value is null } else str =
- * obj.toString(); } return (str != null) ? str : "";
- */
- }
-
- /**
- * See the background-repeat property definition in CSS2.
- *
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundRepeat() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT));
- }
-
- /**
- * See the border property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorder() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER));
- }
-
- /**
- * See the border-bottom property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottom() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM));
- }
-
- /**
- * See the border-bottom-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottomColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR));
- }
-
- /**
- * See the border-bottom-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottomStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE));
- }
-
- /**
- * See the border-bottom-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottomWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH));
- }
-
- /**
- * See the border-collapse property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderCollapse() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLLAPSE));
- }
-
- /**
- * See the border-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR));
- }
-
- /**
- * See the border-left property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeft() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT));
- }
-
- /**
- * See the border-left-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeftColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR));
- }
-
- /**
- * See the border-left-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeftStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE));
- }
-
- /**
- * See the border-left-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeftWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH));
- }
-
- /**
- * See the border-right property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT));
- }
-
- /**
- * See the border-right-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRightColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR));
- }
-
- /**
- * See the border-right-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRightStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE));
- }
-
- /**
- * See the border-right-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRightWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH));
- }
-
- /**
- * See the border-spacing property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderSpacing() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_SPACING));
- }
-
- /**
- * See the border-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE));
- }
-
- /**
- * See the border-top property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTop() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP));
- }
-
- /**
- * See the border-top-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTopColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR));
- }
-
- /**
- * See the border-top-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTopStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE));
- }
-
- /**
- * See the border-top-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTopWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH));
- }
-
- /**
- * See the border-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH));
- }
-
- /**
- * See the bottom property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBottom() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BOTTOM));
- }
-
- /**
- * See the caption-side property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCaptionSide() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CAPTION_SIDE));
- }
-
- /**
- * See the clear property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getClear() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CLEAR));
- }
-
- /**
- * See the clip property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getClip() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- }
-
- /**
- *
- */
- public String getClipBottom() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM));
- }
-
- /**
- *
- */
- public String getClipLeft() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT));
- }
-
- /**
- *
- */
- public String getClipRight() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT));
- }
-
- /**
- *
- */
- public String getClipTop() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP));
- }
-
- /**
- * See the color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_COLOR));
- }
-
- /**
- * See the content property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getContent() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CONTENT));
- }
-
- /**
- * See the counter-increment property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCounterIncrement() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_INCREMENT));
- }
-
- /**
- * See the counter-reset property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCounterReset() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_RESET));
- }
-
- /**
- * See the float property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCssFloat() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FLOAT));
- }
-
- /**
- * See the cue property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCue() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE));
- }
-
- /**
- * See the cue-after property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCueAfter() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_AFTER));
- }
-
- /**
- * See the cue-before property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCueBefore() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_BEFORE));
- }
-
- /**
- * See the cursor property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCursor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CURSOR));
- }
-
- /**
- * See the direction property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getDirection() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_DIRECTION));
- }
-
- /**
- * See the display property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getDisplay() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_DISPLAY));
- }
-
- /**
- * See the elevation property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getElevation() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_ELEVATION));
- }
-
- /**
- * See the empty-cells property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getEmptyCells() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_EMPTY_CELLS));
- }
-
- /**
- * See the font property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFont() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT));
- }
-
- /**
- * See the font-family property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontFamily() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_FAMILY));
- }
-
- /**
- * See the font-size property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontSize() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE));
- }
-
- /**
- * See the font-size-adjust property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontSizeAdjust() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE_ADJUST));
- }
-
- /**
- * See the font-stretch property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontStretch() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STRETCH));
- }
-
- /**
- * See the font-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE));
- }
-
- /**
- * See the font-variant property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontVariant() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT));
- }
-
- /**
- * See the font-weight property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontWeight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT));
- }
-
- /**
- * See the height property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getHeight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_HEIGHT));
- }
-
- /**
- * See the left property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getLeft() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LEFT));
- }
-
- /**
- * See the letter-spacing property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getLetterSpacing() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LETTER_SPACING));
- }
-
- /**
- * See the line-height property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getLineHeight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LINE_HEIGHT));
- }
-
- /**
- * See the list-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE));
- }
-
- /**
- * See the list-style-image property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStyleImage() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE));
- }
-
- /**
- * See the list-style-position property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStylePosition() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION));
- }
-
- /**
- * See the list-style-type property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStyleType() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE));
- }
-
- /**
- * See the margin property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMargin() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN));
- }
-
- /**
- * See the margin-bottom property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginBottom() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_BOTTOM));
- }
-
- /**
- * See the margin-left property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginLeft() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_LEFT));
- }
-
- /**
- * See the margin-right property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginRight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_RIGHT));
- }
-
- /**
- * See the margin-top property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginTop() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_TOP));
- }
-
- /**
- * See the marker-offset property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarkerOffset() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARKER_OFFSET));
- }
-
- /**
- * See the marks property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarks() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARKS));
- }
-
- /**
- * See the max-height property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMaxHeight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_HEIGHT));
- }
-
- /**
- * See the max-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMaxWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_WIDTH));
- }
-
- /**
- * See the min-height property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMinHeight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_HEIGHT));
- }
-
- /**
- * See the min-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMinWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_WIDTH));
- }
-
- /**
- * See the orphans property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOrphans() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_ORPHANS));
- }
-
- /**
- * See the outline property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutline() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE));
- }
-
- /**
- * See the outline-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutlineColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_COLOR));
- }
-
- /**
- * See the outline-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutlineStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_STYLE));
- }
-
- /**
- * See the outline-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutlineWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_WIDTH));
- }
-
- /**
- * See the overflow property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOverflow() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_OVERFLOW));
- }
-
- /**
- * See the padding property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPadding() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING));
- }
-
- /**
- * See the padding-bottom property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingBottom() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_BOTTOM));
- }
-
- /**
- * See the padding-left property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingLeft() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_LEFT));
- }
-
- /**
- * See the padding-right property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingRight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_RIGHT));
- }
-
- /**
- * See the padding-top property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingTop() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_TOP));
- }
-
- /**
- * See the page property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPage() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE));
- }
-
- /**
- * See the page-break-after property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPageBreakAfter() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_AFTER));
- }
-
- /**
- * See the page-break-before property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPageBreakBefore() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_BEFORE));
- }
-
- /**
- * See the page-break-inside property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPageBreakInside() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_INSIDE));
- }
-
- /**
- * See the pause property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPause() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE));
- }
-
- /**
- * See the pause-after property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPauseAfter() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_AFTER));
- }
-
- /**
- * See the pause-before property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPauseBefore() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_BEFORE));
- }
-
- /**
- * See the pitch property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPitch() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH));
- }
-
- /**
- * See the pitch-range property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPitchRange() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH_RANGE));
- }
-
- /**
- * See the play-during property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPlayDuring() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PLAY_DURING));
- }
-
- /**
- * See the position property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPosition() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_POSITION));
- }
-
- /**
- * See the quotes property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getQuotes() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_QUOTES));
- }
-
- /**
- * See the richness property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getRichness() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_RICHNESS));
- }
-
- /**
- * See the right property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getRight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_RIGHT));
- }
-
- /**
- * @return org.eclipse.wst.css.core.util.declaration.IShorthandAdapter
- * @param org.eclipse.wst.css.core.contentmodel.PropCMProperty
- */
- public static IShorthandAdapter getShorthandAdapter(PropCMProperty prop) {
- return (IShorthandAdapter) shorthandAdapters.get(prop);
- }
-
- /**
- * See the size property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSize() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SIZE));
- }
-
- /**
- * See the speak property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeak() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK));
- }
-
- /**
- * See the speak-header property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeakHeader() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_HEADER));
- }
-
- /**
- * See the speak-numeral property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeakNumeral() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_NUMERAL));
- }
-
- /**
- * See the speak-punctuation property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeakPunctuation() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_PUNCTUATION));
- }
-
- /**
- * See the speech-rate property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeechRate() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEECH_RATE));
- }
-
- /**
- * See the stress property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getStress() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_STRESS));
- }
-
- /**
- * See the table-layout property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTableLayout() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TABLE_LAYOUT));
- }
-
- /**
- * See the text-align property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextAlign() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_ALIGN));
- }
-
- /**
- * See the text-decoration property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextDecoration() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_DECORATION));
- }
-
- /**
- * See the text-indent property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextIndent() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_INDENT));
- }
-
- /**
- * See the text-shadow property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextShadow() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_SHADOW));
- }
-
- /**
- * See the text-transform property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextTransform() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_TRANSFORM));
- }
-
- /**
- * See the top property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTop() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TOP));
- }
-
- /**
- * See the unicode-bidi property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getUnicodeBidi() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_UNICODE_BIDI));
- }
-
- /**
- * See the vertical-align property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVerticalAlign() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_VERTICAL_ALIGN));
- }
-
- /**
- * See the visibility property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVisibility() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_VISIBILITY));
- }
-
- /**
- * See the voice-family property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVoiceFamily() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_VOICE_FAMILY));
- }
-
- /**
- * See the volume property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVolume() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_VOLUME));
- }
-
- /**
- * See the white-space property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWhiteSpace() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_WHITE_SPACE));
- }
-
- /**
- * See the widows property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWidows() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_WIDOWS));
- }
-
- /**
- * See the width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_WIDTH));
- }
-
- /**
- * See the word-spacing property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWordSpacing() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_WORD_SPACING));
- }
-
- /**
- * See the z-index property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getZIndex() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_Z_INDEX));
- }
-
- /**
- *
- */
- public void initialize(ICSSStyleDeclaration decl) {
- fProperties.clear();
- if (fModified != null)
- fModified.clear();
- if (decl == null)
- return;
-
- int nProperties = decl.getLength();
- for (int i = 0; i < nProperties; i++) {
- String propName = decl.item(i);
- if (propName != null) {
- String propN = propName.trim().toLowerCase();
- if (propN.length() != 0) {
- CSSValue val = decl.getPropertyCSSValue(propName);
- if (val != null)
- fProperties.put(propN, val);
- }
- }
- }
- }
-
- /**
- *
- */
- static void initShorthandAdapters() {
- if (shorthandAdapters == null) {
- shorthandAdapters = new Hashtable();
- // register
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BG), new BackgroundShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER), new BorderShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR), new BorderColorShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE), new BorderStyleShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH), new BorderWidthShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP), new BorderTopShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT), new BorderRightShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM), new BorderBottomShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT), new BorderLeftShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT), new FontShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE), new ListStyleShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN), new MarginShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING), new PaddingShorthandAdapter());
-
- }
- }
-
- /**
- *
- */
- static void initSubPropertyAdapters() {
- if (subPropertyAdapters == null) {
- subPropertyAdapters = new Hashtable();
-
- // register
- subPropertyAdapters.put(PropCMSubProperty.PSUB_BG_POSITION_X, new BackgroundPositionXSubStyleAdapter());
- subPropertyAdapters.put(PropCMSubProperty.PSUB_BG_POSITION_Y, new BackgroundPositionYSubStyleAdapter());
- subPropertyAdapters.put(PropCMSubProperty.PSUB_CLIP_TOP, new ClipTopSubStyleAdapter());
- subPropertyAdapters.put(PropCMSubProperty.PSUB_CLIP_RIGHT, new ClipRightSubStyleAdapter());
- subPropertyAdapters.put(PropCMSubProperty.PSUB_CLIP_BOTTOM, new ClipBottomSubStyleAdapter());
- subPropertyAdapters.put(PropCMSubProperty.PSUB_CLIP_LEFT, new ClipLeftSubStyleAdapter());
- }
- }
-
- /**
- *
- */
- public boolean isModified() {
- return (fModified != null && fModified.size() != 0);
- }
-
- /**
- *
- */
- public Enumeration properties() {
- return fProperties.keys();
- }
-
- /**
- *
- */
- public Iterator propertiesModified() {
- if (fModified != null) {
- return ((Collection) fModified.clone()).iterator();
- }
- else
- return new Iterator() {
- public boolean hasNext() {
- return false;
- }
-
- public Object next() {
- return null;
- }
-
- public void remove() {
- }
- };
- }
-
- /**
- * This function expands the value of shorthand 'prop' to 'foreign'
- * context. Note that if this has parent shorthand properties of 'prop',
- * they are all expanded to 'foreign' context.
- */
- protected void recursiveExtract(PropCMProperty prop, CSSPropertyContext foreign) {
- // expand shorthand property
- for (int i = 0; i < prop.getShorthandContainerCount(); i++) {
- recursiveExtract(prop.shorthandContainerAt(i), foreign);
- }
- String str = get(prop.getName());
- if (str == null || str.trim().length() == 0)
- str = foreign.get(prop.getName());
- if (str != null && str.trim().length() > 0) {
- IShorthandAdapter adapter = (IShorthandAdapter) shorthandAdapters.get(prop);
- if (adapter != null) {
- adapter.expand(str, foreign);
- foreign.set(prop.getName(), "");//$NON-NLS-1$
- }
- }
- }
-
- /**
- *
- */
- protected void removeDescendants(PropCMProperty prop) {
- if (prop.isShorthand()) {
- // remove properties
- int n = prop.getNumChild();
- for (int i = 0; i < n; i++) {
- Object obj = prop.getChildAt(i);
- if (obj instanceof PropCMProperty) {
- removeDescendants((PropCMProperty) obj);
-
- String str = get(obj.toString());
- if (str != null && str.length() > 0)
- set(obj.toString(), "");//$NON-NLS-1$
- }
- }
- }
- }
-
- /**
- *
- */
- public void resetModified() {
- if (fModified != null)
- fModified.clear();
- }
-
- /**
- * This function sets the pair of 'prop'/'value'. If shorthand properties
- * related to 'prop' are already defined, they will be expanded to avoid
- * property confliction. If descendant properties of 'prop' are already
- * defined, they will be removed to avoid property confliction.
- *
- */
- public void set(org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty prop, java.lang.String value) throws org.w3c.dom.DOMException {
- if (prop instanceof PropCMSubProperty) {
- ISubPropertyAdapter adapter = (ISubPropertyAdapter) subPropertyAdapters.get(prop.getName());
- if (adapter != null) {
- adapter.set(this, value);
- return;
- }
- }
- if (prop.getShorthandContainerCount() > 0) {
- // expand shorthand property
- CSSPropertyContext context = new CSSPropertyContext();
- for (int i = 0; i < prop.getShorthandContainerCount(); i++) {
- recursiveExtract(prop.shorthandContainerAt(i), context);
- }
- Enumeration properties = context.properties();
- while (properties.hasMoreElements()) {
- String propForeign = properties.nextElement().toString();
- set(propForeign, context.get(propForeign));
- }
- }
-
- removeDescendants(prop);
-
- set(prop.getName(), value);
- }
-
- /**
- * This function sets the pair of 'propName'/'value' regardless of its
- * shorthand properties.
- */
- protected void set(String propName, String value) throws org.w3c.dom.DOMException {
- String key = propName;
- if (value == null)
- fProperties.remove(key);
- else
- fProperties.put(key, value);
- if (fModified == null)
- fModified = new HashSet();
- fModified.add(key);
- }
-
- /**
- *
- */
- public void setAzimuth(String azimuth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_AZIMUTH), azimuth);
- }
-
- /**
- *
- */
- public void setBackground(String background) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG), background);
- }
-
- /**
- *
- */
- public void setBackgroundAttachment(String backgroundAttachment) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT), backgroundAttachment);
- }
-
- /**
- *
- */
- public void setBackgroundColor(String backgroundColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR), backgroundColor);
- }
-
- /**
- *
- */
- public void setBackgroundImage(String backgroundImage) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE), backgroundImage);
- }
-
- /**
- *
- */
- public void setBackgroundPosition(String backgroundPosition) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION), backgroundPosition);
- }
-
- /**
- *
- */
- public void setBackgroundPositionX(java.lang.String backgroundPositionX) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X), backgroundPositionX);
- /*
- * String newValue = null; String valH = backgroundPositionX; String
- * valV = getBackgroundPositionY(); if (valV == null ||
- * valV.length()== 0) newValue = valH; else if (valH == null ||
- * valH.length() == 0) { Collection valX =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X).getValues();
- * Collection valY =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y).getValues();
- * PropCMUtil.minus(valY,valX); Iterator it = valY.iterator();
- * while(it.hasNext()) { Object obj = it.next(); if
- * (obj.toString().equals(valV.toLowerCase())) { // need not
- * compensate for ... newValue = valV; break; } } // compensate for
- * Horizontal value if (newValue == null) newValue = "0% " + valV; }
- * else newValue = valH + " " + valV; setBackgroundPosition(newValue);
- */
- }
-
- /**
- *
- */
- public void setBackgroundPositionY(java.lang.String backgroundPositionY) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y), backgroundPositionY);
- /*
- * String newValue = null; String valH = getBackgroundPositionX();
- * String valV = backgroundPositionY; if (valV == null ||
- * valV.length()== 0) newValue = valH; else if (valH == null ||
- * valH.length() == 0) { Collection valX =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X).getValues();
- * Collection valY =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y).getValues();
- * PropCMUtil.minus(valY,valX); Iterator it = valY.iterator();
- * while(it.hasNext()) { Object obj = it.next(); if
- * (obj.toString().equals(valV.toLowerCase())) { // need not
- * compensate for ... newValue = valV; break; } } // compensate for
- * Horizontal value if (newValue == null) newValue = "0% " + valV; }
- * else newValue = valH + " " + valV; setBackgroundPosition(newValue);
- */
- }
-
- /**
- *
- */
- public void setBackgroundRepeat(String backgroundRepeat) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT), backgroundRepeat);
- }
-
- /**
- *
- */
- public void setBorder(String border) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER), border);
- }
-
- /**
- *
- */
- public void setBorderBottom(String borderBottom) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM), borderBottom);
- }
-
- /**
- *
- */
- public void setBorderBottomColor(String borderBottomColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR), borderBottomColor);
- }
-
- /**
- *
- */
- public void setBorderBottomStyle(String borderBottomStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE), borderBottomStyle);
- }
-
- /**
- *
- */
- public void setBorderBottomWidth(String borderBottomWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH), borderBottomWidth);
- }
-
- /**
- *
- */
- public void setBorderCollapse(String borderCollapse) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLLAPSE), borderCollapse);
- }
-
- /**
- *
- */
- public void setBorderColor(String borderColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR), borderColor);
- }
-
- /**
- *
- */
- public void setBorderLeft(String borderLeft) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT), borderLeft);
- }
-
- /**
- *
- */
- public void setBorderLeftColor(String borderLeftColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR), borderLeftColor);
- }
-
- /**
- *
- */
- public void setBorderLeftStyle(String borderLeftStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE), borderLeftStyle);
- }
-
- /**
- *
- */
- public void setBorderLeftWidth(String borderLeftWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH), borderLeftWidth);
- }
-
- /**
- *
- */
- public void setBorderRight(String borderRight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT), borderRight);
- }
-
- /**
- *
- */
- public void setBorderRightColor(String borderRightColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR), borderRightColor);
- }
-
- /**
- *
- */
- public void setBorderRightStyle(String borderRightStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE), borderRightStyle);
- }
-
- /**
- *
- */
- public void setBorderRightWidth(String borderRightWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH), borderRightWidth);
- }
-
- /**
- *
- */
- public void setBorderSpacing(String borderSpacing) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_SPACING), borderSpacing);
- }
-
- /**
- *
- */
- public void setBorderStyle(String borderStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE), borderStyle);
- }
-
- /**
- *
- */
- public void setBorderTop(String borderTop) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP), borderTop);
- }
-
- /**
- *
- */
- public void setBorderTopColor(String borderTopColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR), borderTopColor);
- }
-
- /**
- *
- */
- public void setBorderTopStyle(String borderTopStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE), borderTopStyle);
- }
-
- /**
- *
- */
- public void setBorderTopWidth(String borderTopWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH), borderTopWidth);
- }
-
- /**
- *
- */
- public void setBorderWidth(String borderWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH), borderWidth);
- }
-
- /**
- *
- */
- public void setBottom(String bottom) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BOTTOM), bottom);
- }
-
- /**
- *
- */
- public void setCaptionSide(String captionSide) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CAPTION_SIDE), captionSide);
- }
-
- /**
- *
- */
- public void setClear(String clear) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CLEAR), clear);
- }
-
- /**
- *
- */
- public void setClip(String clip) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP), clip);
- }
-
- /**
- *
- */
- public void setClipBottom(java.lang.String clip) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM), clip);
- }
-
- /**
- *
- */
- public void setClipLeft(java.lang.String clip) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT), clip);
- }
-
- /**
- *
- */
- public void setClipRight(java.lang.String clip) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT), clip);
- }
-
- /**
- *
- */
- public void setClipTop(java.lang.String clip) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP), clip);
- }
-
- /**
- *
- */
- public void setColor(String color) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_COLOR), color);
- }
-
- /**
- *
- */
- public void setContent(String content) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CONTENT), content);
- }
-
- /**
- *
- */
- public void setCounterIncrement(String counterIncrement) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_INCREMENT), counterIncrement);
- }
-
- /**
- *
- */
- public void setCounterReset(String counterReset) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_RESET), counterReset);
- }
-
- /**
- *
- */
- public void setCssFloat(String cssFloat) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FLOAT), cssFloat);
- }
-
- /**
- *
- */
- public void setCue(String cue) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE), cue);
- }
-
- /**
- *
- */
- public void setCueAfter(String cueAfter) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_AFTER), cueAfter);
- }
-
- /**
- *
- */
- public void setCueBefore(String cueBefore) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_BEFORE), cueBefore);
- }
-
- /**
- *
- */
- public void setCursor(String cursor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CURSOR), cursor);
- }
-
- /**
- *
- */
- public void setDirection(String direction) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_DIRECTION), direction);
- }
-
- /**
- *
- */
- public void setDisplay(String display) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_DISPLAY), display);
- }
-
- /**
- *
- */
- public void setElevation(String elevation) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_ELEVATION), elevation);
- }
-
- /**
- *
- */
- public void setEmptyCells(String emptyCells) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_EMPTY_CELLS), emptyCells);
- }
-
- /**
- *
- */
- public void setFont(String font) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT), font);
- }
-
- /**
- *
- */
- public void setFontFamily(String fontFamily) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_FAMILY), fontFamily);
- }
-
- /**
- *
- */
- public void setFontSize(String fontSize) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE), fontSize);
- }
-
- /**
- *
- */
- public void setFontSizeAdjust(String fontSizeAdjust) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE_ADJUST), fontSizeAdjust);
- }
-
- /**
- *
- */
- public void setFontStretch(String fontStretch) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STRETCH), fontStretch);
- }
-
- /**
- *
- */
- public void setFontStyle(String fontStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE), fontStyle);
- }
-
- /**
- *
- */
- public void setFontVariant(String fontVariant) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT), fontVariant);
- }
-
- /**
- *
- */
- public void setFontWeight(String fontWeight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT), fontWeight);
- }
-
- /**
- *
- */
- public void setHeight(String height) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_HEIGHT), height);
- }
-
- /**
- *
- */
- public void setLeft(String left) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LEFT), left);
- }
-
- /**
- *
- */
- public void setLetterSpacing(String letterSpacing) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LETTER_SPACING), letterSpacing);
- }
-
- /**
- *
- */
- public void setLineHeight(String lineHeight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LINE_HEIGHT), lineHeight);
- }
-
- /**
- *
- */
- public void setListStyle(String listStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE), listStyle);
- }
-
- /**
- *
- */
- public void setListStyleImage(String listStyleImage) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE), listStyleImage);
- }
-
- /**
- *
- */
- public void setListStylePosition(String listStylePosition) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION), listStylePosition);
- }
-
- /**
- *
- */
- public void setListStyleType(String listStyleType) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE), listStyleType);
- }
-
- /**
- *
- */
- public void setMargin(String margin) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN), margin);
- }
-
- /**
- *
- */
- public void setMarginBottom(String marginBottom) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_BOTTOM), marginBottom);
- }
-
- /**
- *
- */
- public void setMarginLeft(String marginLeft) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_LEFT), marginLeft);
- }
-
- /**
- *
- */
- public void setMarginRight(String marginRight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_RIGHT), marginRight);
- }
-
- /**
- *
- */
- public void setMarginTop(String marginTop) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_TOP), marginTop);
- }
-
- /**
- *
- */
- public void setMarkerOffset(String markerOffset) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARKER_OFFSET), markerOffset);
- }
-
- /**
- *
- */
- public void setMarks(String marks) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARKS), marks);
- }
-
- /**
- *
- */
- public void setMaxHeight(String maxHeight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_HEIGHT), maxHeight);
- }
-
- /**
- *
- */
- public void setMaxWidth(String maxWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_WIDTH), maxWidth);
- }
-
- /**
- *
- */
- public void setMinHeight(String minHeight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_HEIGHT), minHeight);
- }
-
- /**
- *
- */
- public void setMinWidth(String minWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_WIDTH), minWidth);
- }
-
- /**
- *
- */
- public void setOrphans(String orphans) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_ORPHANS), orphans);
- }
-
- /**
- *
- */
- public void setOutline(String outline) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE), outline);
- }
-
- /**
- *
- */
- public void setOutlineColor(String outlineColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_COLOR), outlineColor);
- }
-
- /**
- *
- */
- public void setOutlineStyle(String outlineStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_STYLE), outlineStyle);
- }
-
- /**
- *
- */
- public void setOutlineWidth(String outlineWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_WIDTH), outlineWidth);
- }
-
- /**
- *
- */
- public void setOverflow(String overflow) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_OVERFLOW), overflow);
- }
-
- /**
- *
- */
- public void setPadding(String padding) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING), padding);
- }
-
- /**
- *
- */
- public void setPaddingBottom(String paddingBottom) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_BOTTOM), paddingBottom);
- }
-
- /**
- *
- */
- public void setPaddingLeft(String paddingLeft) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_LEFT), paddingLeft);
- }
-
- /**
- *
- */
- public void setPaddingRight(String paddingRight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_RIGHT), paddingRight);
- }
-
- /**
- *
- */
- public void setPaddingTop(String paddingTop) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_TOP), paddingTop);
- }
-
- /**
- *
- */
- public void setPage(String page) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE), page);
- }
-
- /**
- *
- */
- public void setPageBreakAfter(String pageBreakAfter) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_AFTER), pageBreakAfter);
- }
-
- /**
- *
- */
- public void setPageBreakBefore(String pageBreakBefore) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_BEFORE), pageBreakBefore);
- }
-
- /**
- *
- */
- public void setPageBreakInside(String pageBreakInside) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_INSIDE), pageBreakInside);
- }
-
- /**
- *
- */
- public void setPause(String pause) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE), pause);
- }
-
- /**
- *
- */
- public void setPauseAfter(String pauseAfter) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_AFTER), pauseAfter);
- }
-
- /**
- *
- */
- public void setPauseBefore(String pauseBefore) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_BEFORE), pauseBefore);
- }
-
- /**
- *
- */
- public void setPitch(String pitch) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH), pitch);
- }
-
- /**
- *
- */
- public void setPitchRange(String pitchRange) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH_RANGE), pitchRange);
- }
-
- /**
- *
- */
- public void setPlayDuring(String playDuring) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PLAY_DURING), playDuring);
- }
-
- /**
- *
- */
- public void setPosition(String position) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_POSITION), position);
- }
-
- /**
- *
- */
- public void setQuotes(String quotes) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_QUOTES), quotes);
- }
-
- /**
- *
- */
- public void setRichness(String richness) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_RICHNESS), richness);
- }
-
- /**
- *
- */
- public void setRight(String right) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_RIGHT), right);
- }
-
- /**
- *
- */
- public void setSize(String size) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SIZE), size);
- }
-
- /**
- *
- */
- public void setSpeak(String speak) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK), speak);
- }
-
- /**
- *
- */
- public void setSpeakHeader(String speakHeader) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_HEADER), speakHeader);
- }
-
- /**
- *
- */
- public void setSpeakNumeral(String speakNumeral) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_NUMERAL), speakNumeral);
- }
-
- /**
- *
- */
- public void setSpeakPunctuation(String speakPunctuation) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_PUNCTUATION), speakPunctuation);
- }
-
- /**
- *
- */
- public void setSpeechRate(String speechRate) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEECH_RATE), speechRate);
- }
-
- /**
- *
- */
- public void setStress(String stress) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_STRESS), stress);
- }
-
- /**
- *
- */
- public void setTableLayout(String tableLayout) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TABLE_LAYOUT), tableLayout);
- }
-
- /**
- *
- */
- public void setTextAlign(String textAlign) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_ALIGN), textAlign);
- }
-
- /**
- *
- */
- public void setTextDecoration(String textDecoration) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_DECORATION), textDecoration);
- }
-
- /**
- *
- */
- public void setTextIndent(String textIndent) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_INDENT), textIndent);
- }
-
- /**
- *
- */
- public void setTextShadow(String textShadow) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_SHADOW), textShadow);
- }
-
- /**
- *
- */
- public void setTextTransform(String textTransform) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_TRANSFORM), textTransform);
- }
-
- /**
- *
- */
- public void setTop(String top) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TOP), top);
- }
-
- /**
- *
- */
- public void setUnicodeBidi(String unicodeBidi) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_UNICODE_BIDI), unicodeBidi);
- }
-
- /**
- *
- */
- public void setVerticalAlign(String verticalAlign) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_VERTICAL_ALIGN), verticalAlign);
- }
-
- /**
- *
- */
- public void setVisibility(String visibility) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_VISIBILITY), visibility);
- }
-
- /**
- *
- */
- public void setVoiceFamily(String voiceFamily) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_VOICE_FAMILY), voiceFamily);
- }
-
- /**
- *
- */
- public void setVolume(String volume) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_VOLUME), volume);
- }
-
- /**
- *
- */
- public void setWhiteSpace(String whiteSpace) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_WHITE_SPACE), whiteSpace);
- }
-
- /**
- *
- */
- public void setWidows(String widows) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_WIDOWS), widows);
- }
-
- /**
- *
- */
- public void setWidth(String width) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_WIDTH), width);
- }
-
- /**
- *
- */
- public void setWordSpacing(String wordSpacing) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_WORD_SPACING), wordSpacing);
- }
-
- /**
- *
- */
- public void setZIndex(String zIndex) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_Z_INDEX), zIndex);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipBottomSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipBottomSubStyleAdapter.java
deleted file mode 100644
index dc3dfcc901..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipBottomSubStyleAdapter.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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-
-/**
- * For bottom value of 'clip' property's rect() function
- */
-public class ClipBottomSubStyleAdapter extends ClipSubStyleAdapter {
-
- /**
- *
- */
- public ClipBottomSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- String get(org.w3c.dom.css.Rect rect) {
- return rect.getBottom().getCssText();
- }
-
- /**
- *
- */
- int index() {
- return 2;
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String top = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP));
- String right = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT));
- String left = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT));
-
- set(properties, top, right, value, left, value == null || value.length() == 0);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipLeftSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipLeftSubStyleAdapter.java
deleted file mode 100644
index cf2110dfde..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipLeftSubStyleAdapter.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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-
-/**
- * For left value of 'clip' property's rect() function
- */
-public class ClipLeftSubStyleAdapter extends ClipSubStyleAdapter {
-
- /**
- *
- */
- public ClipLeftSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- String get(org.w3c.dom.css.Rect rect) {
- return rect.getLeft().getCssText();
- }
-
- /**
- *
- */
- int index() {
- return 3;
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String top = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP));
- String right = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT));
- String bottom = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM));
-
- set(properties, top, right, bottom, value, value == null || value.length() == 0);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipRightSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipRightSubStyleAdapter.java
deleted file mode 100644
index bd796745c9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipRightSubStyleAdapter.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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-
-/**
- * For right value of 'clip' property's rect() function
- */
-public class ClipRightSubStyleAdapter extends ClipSubStyleAdapter {
-
- /**
- *
- */
- public ClipRightSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- String get(org.w3c.dom.css.Rect rect) {
- return rect.getRight().getCssText();
- }
-
- /**
- *
- */
- int index() {
- return 1;
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String top = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP));
- String bottom = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM));
- String left = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT));
-
- set(properties, top, value, bottom, left, value == null || value.length() == 0);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipSubStyleAdapter.java
deleted file mode 100644
index dc7792f3ad..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipSubStyleAdapter.java
+++ /dev/null
@@ -1,132 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.document.ICSSValue;
-import org.eclipse.wst.css.core.internal.contentmodel.IValID;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.w3c.dom.css.Rect;
-
-
-/**
- * Abstract class for clip sub-properties
- */
-abstract public class ClipSubStyleAdapter implements ISubPropertyAdapter {
-
- /**
- *
- */
- public ClipSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- public String get(ICSS2Properties properties) {
- String str = null;
- Object obj = properties.get(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- if (obj != null) {
- if (obj instanceof org.w3c.dom.css.Rect) {
- str = get((org.w3c.dom.css.Rect) obj);
- }
- else {
- if (obj instanceof ICSSValue) {
- str = ((ICSSValue) obj).getCSSValueText();
- }
- else {
- str = obj.toString();
- }
- str = str.trim().toLowerCase();
- int pos = str.indexOf("rect(");//$NON-NLS-1$
- if (pos >= 0) {
- String subStr = null;
- pos += 5;
- int i = 0;
- do {
- int posEnd = str.indexOf(",", pos);//$NON-NLS-1$
- if (posEnd < 0)
- posEnd = str.indexOf(")", pos);//$NON-NLS-1$
- if (posEnd < 0 && pos < str.length())
- posEnd = str.length();
- if (posEnd >= pos) {
- subStr = str.substring(pos, posEnd);
- pos = posEnd + 1;
- }
- else
- pos = -1;
- }
- while (i++ < index() && pos > 0);
-
- if (pos > 0)
- str = subStr.trim();
- else
- str = null;
- }
- else
- str = null;
- }
- }
- return (str != null) ? str : "";//$NON-NLS-1$
- }
-
- /**
- *
- */
- abstract String get(Rect rect);
-
- /**
- *
- */
- abstract int index();
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/10/04
- * 19:25:46)
- *
- * @param properties
- * org.eclipse.wst.css.core.util.declaration.ICSS2Properties
- * @param top
- * java.lang.String
- * @param right
- * java.lang.String
- * @param bottom
- * java.lang.String
- * @param left
- * java.lang.String
- * @param removeCheck
- * boolean
- */
- void set(ICSS2Properties properties, String top, String right, String bottom, String left, boolean removeCheck) {
- if (top == null || top.length() == 0)
- top = IValID.V_AUTO;
- if (right == null || right.length() == 0)
- right = IValID.V_AUTO;
- if (bottom == null || bottom.length() == 0)
- bottom = IValID.V_AUTO;
- if (left == null || left.length() == 0)
- left = IValID.V_AUTO;
-
- if (removeCheck && top.trim().equalsIgnoreCase(IValID.V_AUTO) && right.trim().equalsIgnoreCase(IValID.V_AUTO) && bottom.trim().equalsIgnoreCase(IValID.V_AUTO) && left.trim().equalsIgnoreCase(IValID.V_AUTO)) {
- properties.set(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP), null);
- }
- else
- properties.set(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP), "rect(" + top + ", " + right + ", " + bottom + ", " + left + ")");//$NON-NLS-5$//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipTopSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipTopSubStyleAdapter.java
deleted file mode 100644
index 1786db845f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ClipTopSubStyleAdapter.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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-
-/**
- * For top value of 'clip' property's rect() function
- */
-public class ClipTopSubStyleAdapter extends ClipSubStyleAdapter {
-
- /**
- *
- */
- public ClipTopSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- String get(org.w3c.dom.css.Rect rect) {
- return rect.getTop().getCssText();
- }
-
- /**
- *
- */
- int index() {
- return 0;
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String right = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT));
- String bottom = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM));
- String left = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT));
-
- set(properties, value, right, bottom, left, value == null || value.length() == 0);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/FontShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/FontShorthandAdapter.java
deleted file mode 100644
index dbfbebd9db..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/FontShorthandAdapter.java
+++ /dev/null
@@ -1,240 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.IValID;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'font' property 'font' will be expanded to 'font-family', 'font-size',
- * 'font-style', 'font-variant', 'font-weight', 'line-height',
- */
-public class FontShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public FontShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String style = null, variant = null, weight = null, size = null, height = null, family = null;
- PropCMProperty propFont = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE);
- PropCMProperty propVariant = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT);
- PropCMProperty propWeight = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT);
- PropCMProperty propSize = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE);
- boolean bNormalSpecified = false;
-
- int i = 0;
- for (; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- // first of all, check font idents
- if (i == 0) {
- for (int j = 0; j < propFont.getNumChild(); j++) {
- Object obj = propFont.getChildAt(i);
- if (obj instanceof String && tokens[i].image.compareToIgnoreCase(obj.toString()) == 0)
- return false;
- }
- }
- // value "normal" is shared !!
- if (tokens[i].image.equalsIgnoreCase(IValID.V_NORMAL)) {
- bNormalSpecified = true;
- }
- else {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propVariant.canHave(tokens[i].image))
- variant = tokens[i].image;
- else if (propWeight.canHave(tokens[i].image))
- weight = tokens[i].image;
- else if (propSize.canHave(tokens[i].image)) {
- size = tokens[i].image;
- break; // if size found, break loop
- }
- }
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER && weight == null && propWeight.canHave(tokens[i].image)) {
- weight = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE) {
- size = tokens[i].image;
- break; // if size found, break loop
- }
- }
-
- if (bNormalSpecified) {
- if (style == null)
- style = IValID.V_NORMAL;
- if (variant == null)
- variant = IValID.V_NORMAL;
- if (weight == null)
- weight = IValID.V_NORMAL;
- }
-
- // skip whitespace
- for (i++; i < tokens.length; i++) {
- if (tokens[i].kind != CSSRegionContexts.CSS_S || tokens[i].kind != CSSRegionContexts.CSS_DECLARATION_VALUE_S)
- break;
- }
-
- // line-height ?
- if (i < tokens.length && tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && tokens[i].image.equals("/")) { //$NON-NLS-1$
- for (i++; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- height = tokens[i++].image;
- break;
- }
- }
- }
-
- // font-family
- StringBuffer buf = new StringBuffer();
- for (; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT)
- buf.append(" ");//$NON-NLS-1$
- else
- buf.append(tokens[i].image);
- }
- family = buf.toString().trim();
-
- dest.set(PropCMProperty.P_FONT_STYLE, style);
- dest.set(PropCMProperty.P_FONT_VARIANT, variant);
- dest.set(PropCMProperty.P_FONT_WEIGHT, weight);
- dest.set(PropCMProperty.P_FONT_SIZE, size);
- dest.set(PropCMProperty.P_LINE_HEIGHT, height);
- dest.set(PropCMProperty.P_FONT_FAMILY, family);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String style = null, variant = null, weight = null, size = null, height = null, family = null;
- PropCMProperty propFont = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE);
- PropCMProperty propVariant = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT);
- PropCMProperty propWeight = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT);
- PropCMProperty propSize = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE);
- PropCMProperty propHeight = PropCMProperty.getInstanceOf(PropCMProperty.P_LINE_HEIGHT);
- PropCMProperty propFamily = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_FAMILY);
- boolean bNormalSpecified = false;
-
- int i = 0;
- for (; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- // first of all, check font idents
- if (i == 0) {
- for (int j = 0; j < propFont.getNumChild(); j++) {
- Object obj = propFont.getChildAt(i);
- if (obj instanceof String && tokens[i].image.compareToIgnoreCase(obj.toString()) == 0)
- return null;
- }
- }
- // value "normal" is shared !!
- if (tokens[i].image.equalsIgnoreCase(IValID.V_NORMAL)) {
- bNormalSpecified = true;
- }
- else {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propVariant.canHave(tokens[i].image))
- variant = tokens[i].image;
- else if (propWeight.canHave(tokens[i].image))
- weight = tokens[i].image;
- else if (propSize.canHave(tokens[i].image)) {
- size = tokens[i].image;
- break; // if size found, break loop
- }
- }
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER && weight == null && propWeight.canHave(tokens[i].image)) {
- weight = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE) {
- size = tokens[i].image;
- break; // if size found, break loop
- }
- }
-
- if (bNormalSpecified) {
- if (style == null)
- style = IValID.V_NORMAL;
- if (variant == null)
- variant = IValID.V_NORMAL;
- if (weight == null)
- weight = IValID.V_NORMAL;
- }
-
- // skip whitespace
- for (i++; i < tokens.length; i++) {
- if (tokens[i].kind != CSSRegionContexts.CSS_S || tokens[i].kind != CSSRegionContexts.CSS_DECLARATION_VALUE_S)
- break;
- }
-
- // line-height ?
- if (i < tokens.length && tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && tokens[i].image.equals("/")) { //$NON-NLS-1$
- for (i++; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- height = tokens[i++].image;
- break;
- }
- }
- }
-
- // font-family
- StringBuffer buf = new StringBuffer();
- for (; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT)
- buf.append(" ");//$NON-NLS-1$
- else
- buf.append(tokens[i].image);
- }
- family = buf.toString().trim();
-
- if (propStyle == propDest)
- return style;
- else if (propVariant == propDest)
- return variant;
- else if (propWeight == propDest)
- return weight;
- else if (propSize == propDest)
- return size;
- else if (propHeight == propDest)
- return height;
- else if (propFamily == propDest)
- return family;
- else
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ICSS2Properties.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ICSS2Properties.java
deleted file mode 100644
index 743b1c13a5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ICSS2Properties.java
+++ /dev/null
@@ -1,127 +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.css.core.util.declaration;
-
-
-
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.w3c.dom.css.CSS2Properties;
-
-
-/**
- *
- */
-public interface ICSS2Properties extends CSS2Properties {
-
- /**
- *
- */
- void applyFull(ICSSStyleDeclaration decl);
-
- /**
- *
- */
- void applyModified(ICSSStyleDeclaration decl);
-
- /**
- *
- */
- String get(PropCMProperty prop);
-
- /**
- *
- */
- String getBackgroundPositionX();
-
- /**
- *
- */
- String getBackgroundPositionY();
-
- /**
- *
- */
- String getClipBottom();
-
- /**
- *
- */
- String getClipLeft();
-
- /**
- *
- */
- String getClipRight();
-
- /**
- *
- */
- String getClipTop();
-
- /**
- *
- */
- boolean isModified();
-
- /**
- *
- */
- Enumeration properties();
-
- /**
- *
- */
- Iterator propertiesModified();
-
- /**
- *
- */
- void resetModified();
-
- /**
- *
- */
- void set(PropCMProperty prop, String value) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setBackgroundPositionX(String backgroundPosition) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setBackgroundPositionY(String backgroundPosition) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setClipBottom(String backgroundPosition) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setClipLeft(String backgroundPosition) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setClipRight(String backgroundPosition) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setClipTop(String backgroundPosition) throws org.w3c.dom.DOMException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/IShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/IShorthandAdapter.java
deleted file mode 100644
index 1a03f2aad1..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/IShorthandAdapter.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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-
-/**
- *
- */
-public interface IShorthandAdapter {
-
- /**
- *
- */
- boolean expand(String source, CSSPropertyContext dest);
-
- /**
- *
- */
- String extract(String source, PropCMProperty propDest);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ISubPropertyAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ISubPropertyAdapter.java
deleted file mode 100644
index 90e19ce5f0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ISubPropertyAdapter.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.css.core.util.declaration;
-
-
-
-/**
- *
- */
-public interface ISubPropertyAdapter {
-
- /**
- *
- */
- String get(ICSS2Properties properties);
-
- /**
- *
- */
- void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ListStyleShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ListStyleShorthandAdapter.java
deleted file mode 100644
index dbf2018722..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ListStyleShorthandAdapter.java
+++ /dev/null
@@ -1,110 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'list-style' property 'list-style' will be expanded to
- * 'list-style-image', 'list-style-position', 'list-style-type',
- */
-public class ListStyleShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public ListStyleShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String image = "", pos = "", type = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propPos = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION);
- PropCMProperty propType = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE);
- PropCMProperty propImage = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propPos.canHave(tokens[i].image))
- pos = tokens[i].image;
- else { // value="none" is shared !!
- if (propType.canHave(tokens[i].image))
- type = tokens[i].image;
- if (propImage.canHave(tokens[i].image))
- image = tokens[i].image;
- }
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- image = tokens[i].image;
- }
- }
-
- dest.set(propPos.getName(), pos);
- dest.set(propType.getName(), type);
- dest.set(propImage.getName(), image);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String image = null, pos = null, type = null;
- PropCMProperty propPos = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION);
- PropCMProperty propType = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE);
- PropCMProperty propImage = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propPos.canHave(tokens[i].image))
- pos = tokens[i].image;
- else { // value="none" is shared !!
- if (propType.canHave(tokens[i].image))
- type = tokens[i].image;
- if (propImage.canHave(tokens[i].image))
- image = tokens[i].image;
- }
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- image = tokens[i].image;
- }
- }
-
- if (propPos == propDest)
- return pos;
- else if (propType == propDest)
- return type;
- else if (propImage == propDest)
- return image;
- else
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/MarginShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/MarginShorthandAdapter.java
deleted file mode 100644
index 287abb50b7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/MarginShorthandAdapter.java
+++ /dev/null
@@ -1,129 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'margin' property 'margin' will be expanded to 'margin-top',
- * 'margin-right', 'margin-bottom', 'margin-left',
- */
-public class MarginShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public MarginShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- String[] dests = new String[4];
- if (j == 0)
- return true;
- else if (j == 1) {
- dests[0] = dests[1] = dests[2] = dests[3] = idents[0];
- }
- else if (j == 2) {
- dests[0] = dests[2] = idents[0];
- dests[1] = dests[3] = idents[1];
- }
- else if (j == 3) {
- dests[0] = idents[0];
- dests[1] = dests[3] = idents[1];
- dests[2] = idents[2];
- }
- else {
- for (int k = 0; k < 4; k++)
- dests[k] = idents[k];
- }
- dest.set(PropCMProperty.P_MARGIN_TOP, dests[0]);
- dest.set(PropCMProperty.P_MARGIN_RIGHT, dests[1]);
- dest.set(PropCMProperty.P_MARGIN_BOTTOM, dests[2]);
- dest.set(PropCMProperty.P_MARGIN_LEFT, dests[3]);
-
- return true;
-
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- if (j == 0)
- return null;
- else if (j == 1)
- return idents[0];
- else if (j == 2) {
- if (propDest.getName() == PropCMProperty.P_MARGIN_TOP || propDest.getName() == PropCMProperty.P_MARGIN_BOTTOM)
- return idents[0];
- else
- return idents[1];
- }
- else if (j == 3) {
- if (propDest.getName() == PropCMProperty.P_MARGIN_TOP)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_MARGIN_BOTTOM)
- return idents[2];
- else
- return idents[1];
- }
- else {
- if (propDest.getName() == PropCMProperty.P_MARGIN_TOP)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_MARGIN_RIGHT)
- return idents[1];
- else if (propDest.getName() == PropCMProperty.P_MARGIN_BOTTOM)
- return idents[2];
- else if (propDest.getName() == PropCMProperty.P_MARGIN_LEFT)
- return idents[3];
- else
- return null;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/PaddingShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/PaddingShorthandAdapter.java
deleted file mode 100644
index 7e0dd4d184..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/PaddingShorthandAdapter.java
+++ /dev/null
@@ -1,129 +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.css.core.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-
-
-/**
- * For 'padding' property 'padding' will be expanded to 'padding-top',
- * 'padding-right', 'padding-bottom', 'padding-left',
- */
-public class PaddingShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public PaddingShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- String[] dests = new String[4];
- if (j == 0)
- return true;
- else if (j == 1) {
- dests[0] = dests[1] = dests[2] = dests[3] = idents[0];
- }
- else if (j == 2) {
- dests[0] = dests[2] = idents[0];
- dests[1] = dests[3] = idents[1];
- }
- else if (j == 3) {
- dests[0] = idents[0];
- dests[1] = dests[3] = idents[1];
- dests[2] = idents[2];
- }
- else {
- for (int k = 0; k < 4; k++)
- dests[k] = idents[k];
- }
- dest.set(PropCMProperty.P_PADDING_TOP, dests[0]);
- dest.set(PropCMProperty.P_PADDING_RIGHT, dests[1]);
- dest.set(PropCMProperty.P_PADDING_BOTTOM, dests[2]);
- dest.set(PropCMProperty.P_PADDING_LEFT, dests[3]);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- if (j == 0)
- return null;
- else if (j == 1)
- return idents[0];
- else if (j == 2) {
- if (propDest.getName() == PropCMProperty.P_PADDING_TOP || propDest.getName() == PropCMProperty.P_PADDING_BOTTOM)
- return idents[0];
- else
- return idents[1];
- }
- else if (j == 3) {
- if (propDest.getName() == PropCMProperty.P_PADDING_TOP)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_PADDING_BOTTOM)
- return idents[2];
- else
- return idents[1];
- }
- else {
- if (propDest.getName() == PropCMProperty.P_PADDING_TOP)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_PADDING_RIGHT)
- return idents[1];
- else if (propDest.getName() == PropCMProperty.P_PADDING_BOTTOM)
- return idents[2];
- else if (propDest.getName() == PropCMProperty.P_PADDING_LEFT)
- return idents[3];
- else
- return null;
- }
-
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ValueData.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ValueData.java
deleted file mode 100644
index 05a2079ff0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/declaration/ValueData.java
+++ /dev/null
@@ -1,45 +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.css.core.util.declaration;
-
-
-
-/**
- *
- */
-public class ValueData {
-
- public String value;
- public boolean important = false;
-
- /**
- *
- */
- public ValueData() {
- super();
- }
-
- /**
- *
- */
- public ValueData(String val, boolean imp) {
- super();
- value = val;
- important = imp;
- }
-
- /**
- *
- */
- public String toString() {
- return value;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSS2Properties.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSS2Properties.java
deleted file mode 100644
index 821e2a91ac..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSS2Properties.java
+++ /dev/null
@@ -1,1666 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-
-/**
- * The <code>CSS2Properties</code> interface represents a convenience
- * mechanism for retrieving and setting properties within a
- * <code>CSSStyleDeclaration</code>. The attributes of this interface
- * correspond to all the properties specified in CSS2. Getting an attribute of
- * this interface is equivalent to calling the <code>getPropertyValue</code>
- * method of the <code>CSSStyleDeclaration</code> interface. Setting an
- * attribute of this interface is equivalent to calling the
- * <code>setProperty</code> method of the <code>CSSStyleDeclaration</code>
- * interface.
- * <p>
- * A conformant implementation of the CSS module is not required to implement
- * the <code>CSS2Properties</code> interface. If an implementation does
- * implement this interface, the expectation is that language-specific methods
- * can be used to cast from an instance of the
- * <code>CSSStyleDeclaration</code> interface to the
- * <code>CSS2Properties</code> interface.
- * <p>
- * If an implementation does implement this interface, it is expected to
- * understand the specific syntax of the shorthand properties, and apply their
- * semantics; when the <code>margin</code> property is set, for example, the
- * <code>marginTop</code>,<code>marginRight</code>,
- * <code>marginBottom</code> and <code>marginLeft</code> properties are
- * actually being set by the underlying implementation.
- * <p>
- * When dealing with CSS "shorthand" properties, the shorthand properties
- * should be decomposed into their component longhand properties as
- * appropriate, and when querying for their value, the form returned should be
- * the shortest form exactly equivalent to the declarations made in the
- * ruleset. However, if there is no shorthand declaration that could be added
- * to the ruleset without changing in any way the rules already declared in
- * the ruleset (i.e., by adding longhand rules that were previously not
- * declared in the ruleset), then the empty string should be returned for the
- * shorthand property.
- * <p>
- * For example, querying for the <code>font</code> property should not
- * return "normal normal normal 14pt/normal Arial, sans-serif", when "14pt
- * Arial, sans-serif" suffices. (The normals are initial values, and are
- * implied by use of the longhand property.)
- * <p>
- * If the values for all the longhand properties that compose a particular
- * string are the initial values, then a string consisting of all the initial
- * values should be returned (e.g. a <code>border-width</code> value of
- * "medium" should be returned as such, not as "").
- * <p>
- * For some shorthand properties that take missing values from other sides,
- * such as the <code>margin</code>,<code>padding</code>, and
- * <code>border-[width|style|color]</code> properties, the minimum number of
- * sides possible should be used; i.e., "0px 10px" will be returned instead of
- * "0px 10px 0px 10px".
- * <p>
- * If the value of a shorthand property can not be decomposed into its
- * component longhand properties, as is the case for the <code>font</code>
- * property with a value of "menu", querying for the values of the component
- * longhand properties should return the empty string.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface CSS2Properties {
- /**
- * See the azimuth property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getAzimuth();
-
- public void setAzimuth(String azimuth) throws DOMException;
-
- /**
- * See the background property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackground();
-
- public void setBackground(String background) throws DOMException;
-
- /**
- * See the background-attachment property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundAttachment();
-
- public void setBackgroundAttachment(String backgroundAttachment) throws DOMException;
-
- /**
- * See the background-color property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundColor();
-
- public void setBackgroundColor(String backgroundColor) throws DOMException;
-
- /**
- * See the background-image property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundImage();
-
- public void setBackgroundImage(String backgroundImage) throws DOMException;
-
- /**
- * See the background-position property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundPosition();
-
- public void setBackgroundPosition(String backgroundPosition) throws DOMException;
-
- /**
- * See the background-repeat property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundRepeat();
-
- public void setBackgroundRepeat(String backgroundRepeat) throws DOMException;
-
- /**
- * See the border property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorder();
-
- public void setBorder(String border) throws DOMException;
-
- /**
- * See the border-collapse property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderCollapse();
-
- public void setBorderCollapse(String borderCollapse) throws DOMException;
-
- /**
- * See the border-color property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderColor();
-
- public void setBorderColor(String borderColor) throws DOMException;
-
- /**
- * See the border-spacing property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderSpacing();
-
- public void setBorderSpacing(String borderSpacing) throws DOMException;
-
- /**
- * See the border-style property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderStyle();
-
- public void setBorderStyle(String borderStyle) throws DOMException;
-
- /**
- * See the border-top property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTop();
-
- public void setBorderTop(String borderTop) throws DOMException;
-
- /**
- * See the border-right property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRight();
-
- public void setBorderRight(String borderRight) throws DOMException;
-
- /**
- * See the border-bottom property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottom();
-
- public void setBorderBottom(String borderBottom) throws DOMException;
-
- /**
- * See the border-left property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeft();
-
- public void setBorderLeft(String borderLeft) throws DOMException;
-
- /**
- * See the border-top-color property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTopColor();
-
- public void setBorderTopColor(String borderTopColor) throws DOMException;
-
- /**
- * See the border-right-color property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRightColor();
-
- public void setBorderRightColor(String borderRightColor) throws DOMException;
-
- /**
- * See the border-bottom-color property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottomColor();
-
- public void setBorderBottomColor(String borderBottomColor) throws DOMException;
-
- /**
- * See the border-left-color property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeftColor();
-
- public void setBorderLeftColor(String borderLeftColor) throws DOMException;
-
- /**
- * See the border-top-style property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTopStyle();
-
- public void setBorderTopStyle(String borderTopStyle) throws DOMException;
-
- /**
- * See the border-right-style property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRightStyle();
-
- public void setBorderRightStyle(String borderRightStyle) throws DOMException;
-
- /**
- * See the border-bottom-style property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottomStyle();
-
- public void setBorderBottomStyle(String borderBottomStyle) throws DOMException;
-
- /**
- * See the border-left-style property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeftStyle();
-
- public void setBorderLeftStyle(String borderLeftStyle) throws DOMException;
-
- /**
- * See the border-top-width property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTopWidth();
-
- public void setBorderTopWidth(String borderTopWidth) throws DOMException;
-
- /**
- * See the border-right-width property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRightWidth();
-
- public void setBorderRightWidth(String borderRightWidth) throws DOMException;
-
- /**
- * See the border-bottom-width property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottomWidth();
-
- public void setBorderBottomWidth(String borderBottomWidth) throws DOMException;
-
- /**
- * See the border-left-width property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeftWidth();
-
- public void setBorderLeftWidth(String borderLeftWidth) throws DOMException;
-
- /**
- * See the border-width property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderWidth();
-
- public void setBorderWidth(String borderWidth) throws DOMException;
-
- /**
- * See the bottom property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBottom();
-
- public void setBottom(String bottom) throws DOMException;
-
- /**
- * See the caption-side property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCaptionSide();
-
- public void setCaptionSide(String captionSide) throws DOMException;
-
- /**
- * See the clear property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getClear();
-
- public void setClear(String clear) throws DOMException;
-
- /**
- * See the clip property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getClip();
-
- public void setClip(String clip) throws DOMException;
-
- /**
- * See the color property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getColor();
-
- public void setColor(String color) throws DOMException;
-
- /**
- * See the content property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getContent();
-
- public void setContent(String content) throws DOMException;
-
- /**
- * See the counter-increment property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCounterIncrement();
-
- public void setCounterIncrement(String counterIncrement) throws DOMException;
-
- /**
- * See the counter-reset property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCounterReset();
-
- public void setCounterReset(String counterReset) throws DOMException;
-
- /**
- * See the cue property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCue();
-
- public void setCue(String cue) throws DOMException;
-
- /**
- * See the cue-after property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCueAfter();
-
- public void setCueAfter(String cueAfter) throws DOMException;
-
- /**
- * See the cue-before property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCueBefore();
-
- public void setCueBefore(String cueBefore) throws DOMException;
-
- /**
- * See the cursor property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCursor();
-
- public void setCursor(String cursor) throws DOMException;
-
- /**
- * See the direction property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getDirection();
-
- public void setDirection(String direction) throws DOMException;
-
- /**
- * See the display property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getDisplay();
-
- public void setDisplay(String display) throws DOMException;
-
- /**
- * See the elevation property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getElevation();
-
- public void setElevation(String elevation) throws DOMException;
-
- /**
- * See the empty-cells property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getEmptyCells();
-
- public void setEmptyCells(String emptyCells) throws DOMException;
-
- /**
- * See the float property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCssFloat();
-
- public void setCssFloat(String cssFloat) throws DOMException;
-
- /**
- * See the font property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFont();
-
- public void setFont(String font) throws DOMException;
-
- /**
- * See the font-family property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontFamily();
-
- public void setFontFamily(String fontFamily) throws DOMException;
-
- /**
- * See the font-size property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontSize();
-
- public void setFontSize(String fontSize) throws DOMException;
-
- /**
- * See the font-size-adjust property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontSizeAdjust();
-
- public void setFontSizeAdjust(String fontSizeAdjust) throws DOMException;
-
- /**
- * See the font-stretch property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontStretch();
-
- public void setFontStretch(String fontStretch) throws DOMException;
-
- /**
- * See the font-style property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontStyle();
-
- public void setFontStyle(String fontStyle) throws DOMException;
-
- /**
- * See the font-variant property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontVariant();
-
- public void setFontVariant(String fontVariant) throws DOMException;
-
- /**
- * See the font-weight property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontWeight();
-
- public void setFontWeight(String fontWeight) throws DOMException;
-
- /**
- * See the height property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getHeight();
-
- public void setHeight(String height) throws DOMException;
-
- /**
- * See the left property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getLeft();
-
- public void setLeft(String left) throws DOMException;
-
- /**
- * See the letter-spacing property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getLetterSpacing();
-
- public void setLetterSpacing(String letterSpacing) throws DOMException;
-
- /**
- * See the line-height property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getLineHeight();
-
- public void setLineHeight(String lineHeight) throws DOMException;
-
- /**
- * See the list-style property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStyle();
-
- public void setListStyle(String listStyle) throws DOMException;
-
- /**
- * See the list-style-image property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStyleImage();
-
- public void setListStyleImage(String listStyleImage) throws DOMException;
-
- /**
- * See the list-style-position property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStylePosition();
-
- public void setListStylePosition(String listStylePosition) throws DOMException;
-
- /**
- * See the list-style-type property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStyleType();
-
- public void setListStyleType(String listStyleType) throws DOMException;
-
- /**
- * See the margin property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMargin();
-
- public void setMargin(String margin) throws DOMException;
-
- /**
- * See the margin-top property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginTop();
-
- public void setMarginTop(String marginTop) throws DOMException;
-
- /**
- * See the margin-right property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginRight();
-
- public void setMarginRight(String marginRight) throws DOMException;
-
- /**
- * See the margin-bottom property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginBottom();
-
- public void setMarginBottom(String marginBottom) throws DOMException;
-
- /**
- * See the margin-left property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginLeft();
-
- public void setMarginLeft(String marginLeft) throws DOMException;
-
- /**
- * See the marker-offset property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarkerOffset();
-
- public void setMarkerOffset(String markerOffset) throws DOMException;
-
- /**
- * See the marks property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarks();
-
- public void setMarks(String marks) throws DOMException;
-
- /**
- * See the max-height property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMaxHeight();
-
- public void setMaxHeight(String maxHeight) throws DOMException;
-
- /**
- * See the max-width property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMaxWidth();
-
- public void setMaxWidth(String maxWidth) throws DOMException;
-
- /**
- * See the min-height property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMinHeight();
-
- public void setMinHeight(String minHeight) throws DOMException;
-
- /**
- * See the min-width property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMinWidth();
-
- public void setMinWidth(String minWidth) throws DOMException;
-
- /**
- * See the orphans property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOrphans();
-
- public void setOrphans(String orphans) throws DOMException;
-
- /**
- * See the outline property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutline();
-
- public void setOutline(String outline) throws DOMException;
-
- /**
- * See the outline-color property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutlineColor();
-
- public void setOutlineColor(String outlineColor) throws DOMException;
-
- /**
- * See the outline-style property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutlineStyle();
-
- public void setOutlineStyle(String outlineStyle) throws DOMException;
-
- /**
- * See the outline-width property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutlineWidth();
-
- public void setOutlineWidth(String outlineWidth) throws DOMException;
-
- /**
- * See the overflow property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOverflow();
-
- public void setOverflow(String overflow) throws DOMException;
-
- /**
- * See the padding property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPadding();
-
- public void setPadding(String padding) throws DOMException;
-
- /**
- * See the padding-top property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingTop();
-
- public void setPaddingTop(String paddingTop) throws DOMException;
-
- /**
- * See the padding-right property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingRight();
-
- public void setPaddingRight(String paddingRight) throws DOMException;
-
- /**
- * See the padding-bottom property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingBottom();
-
- public void setPaddingBottom(String paddingBottom) throws DOMException;
-
- /**
- * See the padding-left property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingLeft();
-
- public void setPaddingLeft(String paddingLeft) throws DOMException;
-
- /**
- * See the page property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPage();
-
- public void setPage(String page) throws DOMException;
-
- /**
- * See the page-break-after property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPageBreakAfter();
-
- public void setPageBreakAfter(String pageBreakAfter) throws DOMException;
-
- /**
- * See the page-break-before property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPageBreakBefore();
-
- public void setPageBreakBefore(String pageBreakBefore) throws DOMException;
-
- /**
- * See the page-break-inside property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPageBreakInside();
-
- public void setPageBreakInside(String pageBreakInside) throws DOMException;
-
- /**
- * See the pause property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPause();
-
- public void setPause(String pause) throws DOMException;
-
- /**
- * See the pause-after property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPauseAfter();
-
- public void setPauseAfter(String pauseAfter) throws DOMException;
-
- /**
- * See the pause-before property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPauseBefore();
-
- public void setPauseBefore(String pauseBefore) throws DOMException;
-
- /**
- * See the pitch property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPitch();
-
- public void setPitch(String pitch) throws DOMException;
-
- /**
- * See the pitch-range property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPitchRange();
-
- public void setPitchRange(String pitchRange) throws DOMException;
-
- /**
- * See the play-during property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPlayDuring();
-
- public void setPlayDuring(String playDuring) throws DOMException;
-
- /**
- * See the position property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPosition();
-
- public void setPosition(String position) throws DOMException;
-
- /**
- * See the quotes property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getQuotes();
-
- public void setQuotes(String quotes) throws DOMException;
-
- /**
- * See the richness property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getRichness();
-
- public void setRichness(String richness) throws DOMException;
-
- /**
- * See the right property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getRight();
-
- public void setRight(String right) throws DOMException;
-
- /**
- * See the size property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSize();
-
- public void setSize(String size) throws DOMException;
-
- /**
- * See the speak property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeak();
-
- public void setSpeak(String speak) throws DOMException;
-
- /**
- * See the speak-header property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeakHeader();
-
- public void setSpeakHeader(String speakHeader) throws DOMException;
-
- /**
- * See the speak-numeral property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeakNumeral();
-
- public void setSpeakNumeral(String speakNumeral) throws DOMException;
-
- /**
- * See the speak-punctuation property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeakPunctuation();
-
- public void setSpeakPunctuation(String speakPunctuation) throws DOMException;
-
- /**
- * See the speech-rate property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeechRate();
-
- public void setSpeechRate(String speechRate) throws DOMException;
-
- /**
- * See the stress property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getStress();
-
- public void setStress(String stress) throws DOMException;
-
- /**
- * See the table-layout property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTableLayout();
-
- public void setTableLayout(String tableLayout) throws DOMException;
-
- /**
- * See the text-align property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextAlign();
-
- public void setTextAlign(String textAlign) throws DOMException;
-
- /**
- * See the text-decoration property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextDecoration();
-
- public void setTextDecoration(String textDecoration) throws DOMException;
-
- /**
- * See the text-indent property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextIndent();
-
- public void setTextIndent(String textIndent) throws DOMException;
-
- /**
- * See the text-shadow property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextShadow();
-
- public void setTextShadow(String textShadow) throws DOMException;
-
- /**
- * See the text-transform property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextTransform();
-
- public void setTextTransform(String textTransform) throws DOMException;
-
- /**
- * See the top property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTop();
-
- public void setTop(String top) throws DOMException;
-
- /**
- * See the unicode-bidi property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getUnicodeBidi();
-
- public void setUnicodeBidi(String unicodeBidi) throws DOMException;
-
- /**
- * See the vertical-align property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVerticalAlign();
-
- public void setVerticalAlign(String verticalAlign) throws DOMException;
-
- /**
- * See the visibility property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVisibility();
-
- public void setVisibility(String visibility) throws DOMException;
-
- /**
- * See the voice-family property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVoiceFamily();
-
- public void setVoiceFamily(String voiceFamily) throws DOMException;
-
- /**
- * See the volume property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVolume();
-
- public void setVolume(String volume) throws DOMException;
-
- /**
- * See the white-space property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWhiteSpace();
-
- public void setWhiteSpace(String whiteSpace) throws DOMException;
-
- /**
- * See the widows property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWidows();
-
- public void setWidows(String widows) throws DOMException;
-
- /**
- * See the width property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWidth();
-
- public void setWidth(String width) throws DOMException;
-
- /**
- * See the word-spacing property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWordSpacing();
-
- public void setWordSpacing(String wordSpacing) throws DOMException;
-
- /**
- * See the z-index property definition in CSS2.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getZIndex();
-
- public void setZIndex(String zIndex) throws DOMException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSCharsetRule.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSCharsetRule.java
deleted file mode 100644
index cc44b3040f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSCharsetRule.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-
-/**
- * The <code>CSSCharsetRule</code> interface represents a
- *
- * @charset rule in a CSS style sheet. The value of the <code>encoding</code>
- * attribute does not affect the encoding of text data in the DOM
- * objects; this encoding is always UTF-16. After a stylesheet is
- * loaded, the value of the <code>encoding</code> attribute is the
- * value found in the <code>@charset</code> rule. If there was no <code>@charset</code> in the original document, then no
- * <code>CSSCharsetRule</code> is created. The value of the
- * <code>encoding</code> attribute may also be used as a hint for
- * the encoding used on serialization of the style sheet.
- * <p>
- * The value of the
- * @charset rule (and therefore of the <code>CSSCharsetRule</code>) may not
- * correspond to the encoding the document actually came in;
- * character encoding information e.g. in an HTTP header, has
- * priority (see CSS document representation) but this is not
- * reflected in the <code>CSSCharsetRule</code>.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- * @since DOM Level 2
- */
-public interface CSSCharsetRule extends CSSRule {
- /**
- * The encoding information used in this <code>@charset</code> rule.
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified encoding value has a
- * syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding
- * rule is readonly.
- */
- public String getEncoding();
-
- public void setEncoding(String encoding) throws DOMException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSFontFaceRule.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSFontFaceRule.java
deleted file mode 100644
index 48aff6e4ee..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSFontFaceRule.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-/**
- * The <code>CSSFontFaceRule</code> interface represents a
- *
- * @font-face rule in a CSS style sheet. The <code>@font-face</code> rule is used to hold a set of font descriptions.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- * @since DOM Level 2
- */
-public interface CSSFontFaceRule extends CSSRule {
- /**
- * The declaration-block of this rule.
- */
- public CSSStyleDeclaration getStyle();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSImportRule.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSImportRule.java
deleted file mode 100644
index 9708d084ee..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSImportRule.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.stylesheets.MediaList;
-
-/**
- * The <code>CSSImportRule</code> interface represents a
- *
- * @import rule within a CSS style sheet. The <code>@import</code> rule is used to import style rules from other style sheets.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- * @since DOM Level 2
- */
-public interface CSSImportRule extends CSSRule {
- /**
- * The location of the style sheet to be imported. The attribute will not
- * contain the <code>"url(...)"</code> specifier around the URI.
- */
- public String getHref();
-
- /**
- * A list of media types for which this style sheet may be used.
- */
- public MediaList getMedia();
-
- /**
- * The style sheet referred to by this rule, if it has been loaded. The
- * value of this attribute is <code>null</code> if the style sheet has
- * not yet been loaded or if it will not be loaded (e.g. if the style
- * sheet is for a media type not supported by the user agent).
- */
- public CSSStyleSheet getStyleSheet();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSMediaRule.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSMediaRule.java
deleted file mode 100644
index ce1c5aa1e7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSMediaRule.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.stylesheets.MediaList;
-
-/**
- * The <code>CSSMediaRule</code> interface represents a
- *
- * @media rule in a CSS style sheet. A <code>@media</code> rule can be used to delimit style rules for specific media
- * types.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- * @since DOM Level 2
- */
-public interface CSSMediaRule extends CSSRule {
- /**
- * A list of media types for this rule.
- */
- public MediaList getMedia();
-
- /**
- * A list of all CSS rules contained within the media block.
- */
- public CSSRuleList getCssRules();
-
- /**
- * Used to insert a new rule into the media block.
- *
- * @param rule
- * The parsable text representing the rule. For rule sets this
- * contains both the selector and the style declaration. For
- * at-rules, this specifies both the at-identifier and the rule
- * content.
- * @param index
- * The index within the media block's rule collection of the
- * rule before which to insert the specified rule. If the
- * specified index is equal to the length of the media blocks's
- * rule collection, the rule will be added to the end of the
- * media block.
- * @return The index within the media block's rule collection of the newly
- * inserted rule.
- * @exception DOMException
- * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be
- * inserted at the specified index, e.g., if an
- * <code>@import</code> rule is inserted after a standard rule set or other
- * at-rule. <br>
- * INDEX_SIZE_ERR: Raised if the specified index is not a valid
- * insertion point. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is
- * readonly. <br>
- * SYNTAX_ERR: Raised if the specified rule has a syntax error and
- * is unparsable.
- */
- public int insertRule(String rule, int index) throws DOMException;
-
- /**
- * Used to delete a rule from the media block.
- *
- * @param index
- * The index within the media block's rule collection of the
- * rule to remove.
- * @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified index does not
- * correspond to a rule in the media rule list. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule
- * is readonly.
- */
- public void deleteRule(int index) throws DOMException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSPageRule.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSPageRule.java
deleted file mode 100644
index 26cda33854..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSPageRule.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-
-/**
- * The <code>CSSPageRule</code> interface represents a
- *
- * @page rule within a CSS style sheet. The <code>@page</code> rule is used to specify the dimensions, orientation, margins,
- * etc. of a page box for paged media.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- * @since DOM Level 2
- */
-public interface CSSPageRule extends CSSRule {
- /**
- * The parsable textual representation of the page selector for the rule.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified CSS string value has
- * a syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is
- * readonly.
- */
- public String getSelectorText();
-
- public void setSelectorText(String selectorText) throws DOMException;
-
- /**
- * The declaration-block of this rule.
- */
- public CSSStyleDeclaration getStyle();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSPrimitiveValue.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSPrimitiveValue.java
deleted file mode 100644
index cf7f4ce589..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSPrimitiveValue.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-
-/**
- * The <code>CSSPrimitiveValue</code> interface represents a single CSS
- * value . This interface may be used to determine the value of a specific
- * style property currently set in a block or to set a specific style property
- * explicitly within the block. An instance of this interface might be
- * obtained from the <code>getPropertyCSSValue</code> method of the
- * <code>CSSStyleDeclaration</code> interface. A
- * <code>CSSPrimitiveValue</code> object only occurs in a context of a CSS
- * property.
- * <p>
- * Conversions are allowed between absolute values (from millimeters to
- * centimeters, from degrees to radians, and so on) but not between relative
- * values. (For example, a pixel value cannot be converted to a centimeter
- * value.) Percentage values can't be converted since they are relative to the
- * parent value (or another property value). There is one exception for color
- * percentage values: since a color percentage value is relative to the range
- * 0-255, a color percentage value can be converted to a number; (see also the
- * <code>RGBColor</code> interface).
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface CSSPrimitiveValue extends CSSValue {
- // UnitTypes
- /**
- * The value is not a recognized CSS2 value. The value can only be
- * obtained by using the <code>cssText</code> attribute.
- */
- public static final short CSS_UNKNOWN = 0;
- /**
- * The value is a simple number. The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_NUMBER = 1;
- /**
- * The value is a percentage. The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_PERCENTAGE = 2;
- /**
- * The value is a length (ems). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_EMS = 3;
- /**
- * The value is a length (exs). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_EXS = 4;
- /**
- * The value is a length (px). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_PX = 5;
- /**
- * The value is a length (cm). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_CM = 6;
- /**
- * The value is a length (mm). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_MM = 7;
- /**
- * The value is a length (in). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_IN = 8;
- /**
- * The value is a length (pt). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_PT = 9;
- /**
- * The value is a length (pc). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_PC = 10;
- /**
- * The value is an angle (deg). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_DEG = 11;
- /**
- * The value is an angle (rad). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_RAD = 12;
- /**
- * The value is an angle (grad). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_GRAD = 13;
- /**
- * The value is a time (ms). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_MS = 14;
- /**
- * The value is a time (s). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_S = 15;
- /**
- * The value is a frequency (Hz). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_HZ = 16;
- /**
- * The value is a frequency (kHz). The value can be obtained by using the
- * <code>getFloatValue</code> method.
- */
- public static final short CSS_KHZ = 17;
- /**
- * The value is a number with an unknown dimension. The value can be
- * obtained by using the <code>getFloatValue</code> method.
- */
- public static final short CSS_DIMENSION = 18;
- /**
- * The value is a STRING. The value can be obtained by using the
- * <code>getStringValue</code> method.
- */
- public static final short CSS_STRING = 19;
- /**
- * The value is a URI. The value can be obtained by using the
- * <code>getStringValue</code> method.
- */
- public static final short CSS_URI = 20;
- /**
- * The value is an identifier. The value can be obtained by using the
- * <code>getStringValue</code> method.
- */
- public static final short CSS_IDENT = 21;
- /**
- * The value is a attribute function. The value can be obtained by using
- * the <code>getStringValue</code> method.
- */
- public static final short CSS_ATTR = 22;
- /**
- * The value is a counter or counters function. The value can be obtained
- * by using the <code>getCounterValue</code> method.
- */
- public static final short CSS_COUNTER = 23;
- /**
- * The value is a rect function. The value can be obtained by using the
- * <code>getRectValue</code> method.
- */
- public static final short CSS_RECT = 24;
- /**
- * The value is a RGB color. The value can be obtained by using the
- * <code>getRGBColorValue</code> method.
- */
- public static final short CSS_RGBCOLOR = 25;
-
- /**
- * The type of the value as defined by the constants specified above.
- */
- public short getPrimitiveType();
-
- /**
- * A method to set the float value with a specified unit. If the property
- * attached with this value can not accept the specified unit or the float
- * value, the value will be unchanged and a <code>DOMException</code>
- * will be raised.
- *
- * @param unitType
- * A unit code as defined above. The unit code can only be a
- * float unit type (i.e. <code>CSS_NUMBER</code>,
- * <code>CSS_PERCENTAGE</code>,<code>CSS_EMS</code>,
- * <code>CSS_EXS</code>,<code>CSS_PX</code>,
- * <code>CSS_CM</code>,<code>CSS_MM</code>,
- * <code>CSS_IN</code>,<code>CSS_PT</code>,
- * <code>CSS_PC</code>,<code>CSS_DEG</code>,
- * <code>CSS_RAD</code>,<code>CSS_GRAD</code>,
- * <code>CSS_MS</code>,<code>CSS_S</code>,
- * <code>CSS_HZ</code>,<code>CSS_KHZ</code>,
- * <code>CSS_DIMENSION</code>).
- * @param floatValue
- * The new float value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the attached property
- * doesn't support the float value or the unit type. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public void setFloatValue(short unitType, float floatValue) throws DOMException;
-
- /**
- * This method is used to get a float value in a specified unit. If this
- * CSS value doesn't contain a float value or can't be converted into the
- * specified unit, a <code>DOMException</code> is raised.
- *
- * @param unitType
- * A unit code to get the float value. The unit code can only
- * be a float unit type (i.e. <code>CSS_NUMBER</code>,
- * <code>CSS_PERCENTAGE</code>,<code>CSS_EMS</code>,
- * <code>CSS_EXS</code>,<code>CSS_PX</code>,
- * <code>CSS_CM</code>,<code>CSS_MM</code>,
- * <code>CSS_IN</code>,<code>CSS_PT</code>,
- * <code>CSS_PC</code>,<code>CSS_DEG</code>,
- * <code>CSS_RAD</code>,<code>CSS_GRAD</code>,
- * <code>CSS_MS</code>,<code>CSS_S</code>,
- * <code>CSS_HZ</code>,<code>CSS_KHZ</code>,
- * <code>CSS_DIMENSION</code>).
- * @return The float value in the specified unit.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a float value or if the float value can't be
- * converted into the specified unit.
- */
- public float getFloatValue(short unitType) throws DOMException;
-
- /**
- * A method to set the string value with the specified unit. If the
- * property attached to this value can't accept the specified unit or the
- * string value, the value will be unchanged and a
- * <code>DOMException</code> will be raised.
- *
- * @param stringType
- * A string code as defined above. The string code can only be
- * a string unit type (i.e. <code>CSS_STRING</code>,
- * <code>CSS_URI</code>,<code>CSS_IDENT</code>, and
- * <code>CSS_ATTR</code>).
- * @param stringValue
- * The new string value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a string value or if the string value can't be
- * converted into the specified unit. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public void setStringValue(short stringType, String stringValue) throws DOMException;
-
- /**
- * This method is used to get the string value. If the CSS value doesn't
- * contain a string value, a <code>DOMException</code> is raised. Some
- * properties (like 'font-family' or 'voice-family') convert a whitespace
- * separated list of idents to a string.
- *
- * @return The string value in the current unit. The current
- * <code>primitiveType</code> can only be a string unit type
- * (i.e. <code>CSS_STRING</code>,<code>CSS_URI</code>,
- * <code>CSS_IDENT</code> and <code>CSS_ATTR</code>).
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a string value.
- */
- public String getStringValue() throws DOMException;
-
- /**
- * This method is used to get the Counter value. If this CSS value doesn't
- * contain a counter value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>Counter</code> interface.
- *
- * @return The Counter value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a Counter value (e.g. this is not
- * <code>CSS_COUNTER</code>).
- */
- public Counter getCounterValue() throws DOMException;
-
- /**
- * This method is used to get the Rect value. If this CSS value doesn't
- * contain a rect value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>Rect</code> interface.
- *
- * @return The Rect value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a Rect value. (e.g. this is not
- * <code>CSS_RECT</code>).
- */
- public Rect getRectValue() throws DOMException;
-
- /**
- * This method is used to get the RGB color. If this CSS value doesn't
- * contain a RGB color value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>RGBColor</code> interface.
- *
- * @return the RGB color value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the attached property
- * can't return a RGB color value (e.g. this is not
- * <code>CSS_RGBCOLOR</code>).
- */
- public RGBColor getRGBColorValue() throws DOMException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSRule.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSRule.java
deleted file mode 100644
index 18e3b29d11..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSRule.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-
-/**
- * The <code>CSSRule</code> interface is the abstract base interface for any
- * type of CSS statement. This includes both rule sets and at-rules. An
- * implementation is expected to preserve all rules specified in a CSS style
- * sheet, even if the rule is not recognized by the parser. Unrecognized rules
- * are represented using the <code>CSSUnknownRule</code> interface.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface CSSRule {
- // RuleType
- /**
- * The rule is a <code>CSSUnknownRule</code>.
- */
- public static final short UNKNOWN_RULE = 0;
- /**
- * The rule is a <code>CSSStyleRule</code>.
- */
- public static final short STYLE_RULE = 1;
- /**
- * The rule is a <code>CSSCharsetRule</code>.
- */
- public static final short CHARSET_RULE = 2;
- /**
- * The rule is a <code>CSSImportRule</code>.
- */
- public static final short IMPORT_RULE = 3;
- /**
- * The rule is a <code>CSSMediaRule</code>.
- */
- public static final short MEDIA_RULE = 4;
- /**
- * The rule is a <code>CSSFontFaceRule</code>.
- */
- public static final short FONT_FACE_RULE = 5;
- /**
- * The rule is a <code>CSSPageRule</code>.
- */
- public static final short PAGE_RULE = 6;
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType();
-
- /**
- * The parsable textual representation of the rule. This reflects the
- * current state of the rule and not its initial value.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified CSS string value has
- * a syntax error and is unparsable. <br>
- * INVALID_MODIFICATION_ERR: Raised if the specified CSS
- * string value represents a different type of rule than
- * the current one. <br>
- * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be
- * inserted at this point in the style sheet. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if the rule is
- * readonly.
- */
- public String getCssText();
-
- public void setCssText(String cssText) throws DOMException;
-
- /**
- * The style sheet that contains this rule.
- */
- public CSSStyleSheet getParentStyleSheet();
-
- /**
- * If this rule is contained inside another rule (e.g. a style rule inside
- * an
- *
- * @media block), this is the containing rule. If this rule is not nested
- * inside any other rules, this returns <code>null</code>.
- */
- public CSSRule getParentRule();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSRuleList.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSRuleList.java
deleted file mode 100644
index 8fed1c330f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSRuleList.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-/**
- * The <code>CSSRuleList</code> interface provides the abstraction of an
- * ordered collection of CSS rules.
- * <p>
- * The items in the <code>CSSRuleList</code> are accessible via an integral
- * index, starting from 0.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface CSSRuleList {
- /**
- * The number of <code>CSSRules</code> in the list. The range of valid
- * child rule indices is <code>0</code> to <code>length-1</code>
- * inclusive.
- */
- public int getLength();
-
- /**
- * Used to retrieve a CSS rule by ordinal index. The order in this
- * collection represents the order of the rules in the CSS style sheet. If
- * index is greater than or equal to the number of rules in the list, this
- * returns <code>null</code>.
- *
- * @param indexIndex
- * into the collection
- * @return The style rule at the <code>index</code> position in the
- * <code>CSSRuleList</code>, or <code>null</code> if that is
- * not a valid index.
- */
- public CSSRule item(int index);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleDeclaration.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleDeclaration.java
deleted file mode 100644
index c2c3b61661..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleDeclaration.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-
-/**
- * The <code>CSSStyleDeclaration</code> interface represents a single CSS
- * declaration block. This interface may be used to determine the style
- * properties currently set in a block or to set style properties explicitly
- * within the block.
- * <p>
- * While an implementation may not recognize all CSS properties within a CSS
- * declaration block, it is expected to provide access to all specified
- * properties in the style sheet through the <code>CSSStyleDeclaration</code>
- * interface. Furthermore, implementations that support a specific level of
- * CSS should correctly handle CSS shorthand properties for that level. For a
- * further discussion of shorthand properties, see the
- * <code>CSS2Properties</code> interface.
- * <p>
- * This interface is also used to provide a read-only access to the computed
- * values of an element. See also the <code>ViewCSS</code> interface. The
- * CSS Object Model doesn't provide an access to the specified or actual
- * values of the CSS cascade.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface CSSStyleDeclaration {
- /**
- * The parsable textual representation of the declaration block (excluding
- * the surrounding curly braces). Setting this attribute will result in
- * the parsing of the new value and resetting of all the properties in the
- * declaration block including the removal or addition of properties.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified CSS string value has
- * a syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration
- * is readonly or a property is readonly.
- */
- public String getCssText();
-
- public void setCssText(String cssText) throws DOMException;
-
- /**
- * Used to retrieve the value of a CSS property if it has been explicitly
- * set within this declaration block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return Returns the value of the property if it has been explicitly set
- * for this declaration block. Returns the empty string if the
- * property has not been set.
- */
- public String getPropertyValue(String propertyName);
-
- /**
- * Used to retrieve the object representation of the value of a CSS
- * property if it has been explicitly set within this declaration block.
- * This method returns <code>null</code> if the property is a shorthand
- * property. Shorthand property values can only be accessed and modified
- * as strings, using the <code>getPropertyValue</code> and
- * <code>setProperty</code> methods.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return Returns the value of the property if it has been explicitly set
- * for this declaration block. Returns <code>null</code> if the
- * property has not been set.
- */
- public CSSValue getPropertyCSSValue(String propertyName);
-
- /**
- * Used to remove a CSS property if it has been explicitly set within this
- * declaration block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return Returns the value of the property if it has been explicitly set
- * for this declaration block. Returns the empty string if the
- * property has not been set or the property name does not
- * correspond to a known CSS property.
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration
- * is readonly or the property is readonly.
- */
- public String removeProperty(String propertyName) throws DOMException;
-
- /**
- * Used to retrieve the priority of a CSS property (e.g. the
- * <code>"important"</code> qualifier) if the property has been
- * explicitly set in this declaration block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return A string representing the priority (e.g.
- * <code>"important"</code>) if one exists. The empty string if
- * none exists.
- */
- public String getPropertyPriority(String propertyName);
-
- /**
- * Used to set a property value and priority within this declaration
- * block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @param value
- * The new value of the property.
- * @param priority
- * The new priority of the property (e.g.
- * <code>"important"</code>).
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified value has a syntax
- * error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration
- * is readonly or the property is readonly.
- */
- public void setProperty(String propertyName, String value, String priority) throws DOMException;
-
- /**
- * The number of properties that have been explicitly set in this
- * declaration block. The range of valid indices is 0 to length-1
- * inclusive.
- */
- public int getLength();
-
- /**
- * Used to retrieve the properties that have been explicitly set in this
- * declaration block. The order of the properties retrieved using this
- * method does not have to be the order in which they were set. This
- * method can be used to iterate over all properties in this declaration
- * block.
- *
- * @param index
- * Index of the property name to retrieve.
- * @return The name of the property at this ordinal position. The empty
- * string if no property exists at this position.
- */
- public String item(int index);
-
- /**
- * The CSS rule that contains this declaration block or <code>null</code>
- * if this <code>CSSStyleDeclaration</code> is not attached to a
- * <code>CSSRule</code>.
- */
- public CSSRule getParentRule();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleRule.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleRule.java
deleted file mode 100644
index df24630611..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleRule.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-
-/**
- * The <code>CSSStyleRule</code> interface represents a single rule set in a
- * CSS style sheet.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface CSSStyleRule extends CSSRule {
- /**
- * The textual representation of the selector for the rule set. The
- * implementation may have stripped out insignificant whitespace while
- * parsing the selector.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified CSS string value has
- * a syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is
- * readonly.
- */
- public String getSelectorText();
-
- public void setSelectorText(String selectorText) throws DOMException;
-
- /**
- * The declaration-block of this rule set.
- */
- public CSSStyleDeclaration getStyle();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleSheet.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleSheet.java
deleted file mode 100644
index 20b593ea03..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSStyleSheet.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.stylesheets.StyleSheet;
-
-/**
- * The <code>CSSStyleSheet</code> interface is a concrete interface used to
- * represent a CSS style sheet i.e., a style sheet whose content type is
- * "text/css".
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface CSSStyleSheet extends StyleSheet {
- /**
- * If this style sheet comes from an <code>@import</code> rule, the <code>ownerRule</code> attribute will
- * contain the <code>CSSImportRule</code>. In that case, the
- * <code>ownerNode</code> attribute in the
- * <code>StyleSheet</code> interface will be <code>null</code>.
- * If the style sheet comes from an element or a processing
- * instruction, the <code>ownerRule</code> attribute will be
- * <code>null</code> and the <code>ownerNode</code> attribute
- * will contain the <code>Node</code>.
- */
- public CSSRule getOwnerRule();
-
- /**
- * The list of all CSS rules contained within the style sheet. This
- * includes both rule sets and at-rules.
- */
- public CSSRuleList getCssRules();
-
- /**
- * Used to insert a new rule into the style sheet. The new rule now
- * becomes part of the cascade.
- *
- * @param rule
- * The parsable text representing the rule. For rule sets this
- * contains both the selector and the style declaration. For
- * at-rules, this specifies both the at-identifier and the rule
- * content.
- * @param index
- * The index within the style sheet's rule list of the rule
- * before which to insert the specified rule. If the specified
- * index is equal to the length of the style sheet's rule
- * collection, the rule will be added to the end of the style
- * sheet.
- * @return The index within the style sheet's rule collection of the newly
- * inserted rule.
- * @exception DOMException
- * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be
- * inserted at the specified index e.g. if an
- * <code>@import</code> rule is inserted after a standard rule set or other
- * at-rule. <br>
- * INDEX_SIZE_ERR: Raised if the specified index is not a valid
- * insertion point. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is
- * readonly. <br>
- * SYNTAX_ERR: Raised if the specified rule has a syntax error and
- * is unparsable.
- */
- public int insertRule(String rule, int index) throws DOMException;
-
- /**
- * Used to delete a rule from the style sheet.
- *
- * @param index
- * The index within the style sheet's rule list of the rule to
- * remove.
- * @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified index does not
- * correspond to a rule in the style sheet's rule list.
- * <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet
- * is readonly.
- */
- public void deleteRule(int index) throws DOMException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSUnknownRule.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSUnknownRule.java
deleted file mode 100644
index c6e20e3c93..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSUnknownRule.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-/**
- * The <code>CSSUnknownRule</code> interface represents an at-rule not
- * supported by this user agent.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface CSSUnknownRule extends CSSRule {
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSValue.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSValue.java
deleted file mode 100644
index 6ba0466625..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSValue.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-
-/**
- * The <code>CSSValue</code> interface represents a simple or a complex
- * value. A <code>CSSValue</code> object only occurs in a context of a CSS
- * property.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface CSSValue {
- // UnitTypes
- /**
- * The value is inherited and the <code>cssText</code> contains
- * "inherit".
- */
- public static final short CSS_INHERIT = 0;
- /**
- * The value is a primitive value and an instance of the
- * <code>CSSPrimitiveValue</code> interface can be obtained by using
- * binding-specific casting methods on this instance of the
- * <code>CSSValue</code> interface.
- */
- public static final short CSS_PRIMITIVE_VALUE = 1;
- /**
- * The value is a <code>CSSValue</code> list and an instance of the
- * <code>CSSValueList</code> interface can be obtained by using
- * binding-specific casting methods on this instance of the
- * <code>CSSValue</code> interface.
- */
- public static final short CSS_VALUE_LIST = 2;
- /**
- * The value is a custom value.
- */
- public static final short CSS_CUSTOM = 3;
-
- /**
- * A string representation of the current value.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified CSS string value has
- * a syntax error (according to the attached property) or
- * is unparsable. <br>
- * INVALID_MODIFICATION_ERR: Raised if the specified CSS
- * string value represents a different type of values than
- * the values allowed by the CSS property. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this value is
- * readonly.
- */
- public String getCssText();
-
- public void setCssText(String cssText) throws DOMException;
-
- /**
- * A code defining the type of the value as defined above.
- */
- public short getCssValueType();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSValueList.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSValueList.java
deleted file mode 100644
index 1813cc0f35..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/CSSValueList.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-/**
- * The <code>CSSValueList</code> interface provides the abstraction of an
- * ordered collection of CSS values.
- * <p>
- * Some properties allow an empty list into their syntax. In that case, these
- * properties take the <code>none</code> identifier. So, an empty list means
- * that the property has the value <code>none</code>.
- * <p>
- * The items in the <code>CSSValueList</code> are accessible via an integral
- * index, starting from 0.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface CSSValueList extends CSSValue {
- /**
- * The number of <code>CSSValues</code> in the list. The range of valid
- * values of the indices is <code>0</code> to <code>length-1</code>
- * inclusive.
- */
- public int getLength();
-
- /**
- * Used to retrieve a <code>CSSValue</code> by ordinal index. The order
- * in this collection represents the order of the values in the CSS style
- * property. If index is greater than or equal to the number of values in
- * the list, this returns <code>null</code>.
- *
- * @param indexIndex
- * into the collection.
- * @return The <code>CSSValue</code> at the <code>index</code>
- * position in the <code>CSSValueList</code>, or
- * <code>null</code> if that is not a valid index.
- */
- public CSSValue item(int index);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/Counter.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/Counter.java
deleted file mode 100644
index aee88cf4f5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/Counter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-/**
- * The <code>Counter</code> interface is used to represent any counter or
- * counters function value. This interface reflects the values in the
- * underlying style property.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface Counter {
- /**
- * This attribute is used for the identifier of the counter.
- */
- public String getIdentifier();
-
- /**
- * This attribute is used for the style of the list.
- */
- public String getListStyle();
-
- /**
- * This attribute is used for the separator of the nested counters.
- */
- public String getSeparator();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/DOMImplementationCSS.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/DOMImplementationCSS.java
deleted file mode 100644
index 7cbdf98600..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/DOMImplementationCSS.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-
-/**
- * This interface allows the DOM user to create a <code>CSSStyleSheet</code>
- * outside the context of a document. There is no way to associate the new
- * <code>CSSStyleSheet</code> with a document in DOM Level 2.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface DOMImplementationCSS extends DOMImplementation {
- /**
- * Creates a new <code>CSSStyleSheet</code>.
- *
- * @param title
- * The advisory title. See also the section.
- * @param media
- * The comma-separated list of media associated with the new
- * style sheet. See also the section.
- * @return A new CSS style sheet.
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified media string value
- * has a syntax error and is unparsable.
- */
- public CSSStyleSheet createCSSStyleSheet(String title, String media) throws DOMException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/DocumentCSS.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/DocumentCSS.java
deleted file mode 100644
index 60d34510f8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/DocumentCSS.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.stylesheets.DocumentStyle;
-
-/**
- * This interface represents a document with a CSS view.
- * <p>
- * The <code>getOverrideStyle</code> method provides a mechanism through
- * which a DOM author could effect immediate change to the style of an element
- * without modifying the explicitly linked style sheets of a document or the
- * inline style of elements in the style sheets. This style sheet comes after
- * the author style sheet in the cascade algorithm and is called override
- * style sheet. The override style sheet takes precedence over author style
- * sheets. An "!important" declaration still takes precedence over a normal
- * declaration. Override, author, and user style sheets all may contain
- * "!important" declarations. User "!important" rules take precedence over
- * both override and author "!important" rules, and override "!important"
- * rules take precedence over author "!important" rules.
- * <p>
- * The expectation is that an instance of the <code>DocumentCSS</code>
- * interface can be obtained by using binding-specific casting methods on an
- * instance of the <code>Document</code> interface.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface DocumentCSS extends DocumentStyle {
- /**
- * This method is used to retrieve the override style declaration for a
- * specified element and a specified pseudo-element.
- *
- * @param elt
- * The element whose style is to be modified. This parameter
- * cannot be null.
- * @param pseudoElt
- * The pseudo-element or <code>null</code> if none.
- * @return The override style declaration.
- */
- public CSSStyleDeclaration getOverrideStyle(Element elt, String pseudoElt);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/ElementCSSInlineStyle.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/ElementCSSInlineStyle.java
deleted file mode 100644
index ba90ee412d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/ElementCSSInlineStyle.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-/**
- * Inline style information attached to elements is exposed through the
- * <code>style</code> attribute. This represents the contents of the STYLE
- * attribute for HTML elements (or elements in other schemas or DTDs which use
- * the STYLE attribute in the same way). The expectation is that an instance
- * of the ElementCSSInlineStyle interface can be obtained by using
- * binding-specific casting methods on an instance of the Element interface
- * when the element supports inline CSS style informations.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface ElementCSSInlineStyle {
- /**
- * The style attribute.
- */
- public CSSStyleDeclaration getStyle();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/RGBColor.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/RGBColor.java
deleted file mode 100644
index 5766f1af99..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/RGBColor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-/**
- * The <code>RGBColor</code> interface is used to represent any RGB color
- * value. This interface reflects the values in the underlying style property.
- * Hence, modifications made to the <code>CSSPrimitiveValue</code> objects
- * modify the style property.
- * <p>
- * A specified RGB color is not clipped (even if the number is outside the
- * range 0-255 or 0%-100%). A computed RGB color is clipped depending on the
- * device.
- * <p>
- * Even if a style sheet can only contain an integer for a color value, the
- * internal storage of this integer is a float, and this can be used as a
- * float in the specified or the computed style.
- * <p>
- * A color percentage value can always be converted to a number and vice
- * versa.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface RGBColor {
- /**
- * This attribute is used for the red value of the RGB color.
- */
- public CSSPrimitiveValue getRed();
-
- /**
- * This attribute is used for the green value of the RGB color.
- */
- public CSSPrimitiveValue getGreen();
-
- /**
- * This attribute is used for the blue value of the RGB color.
- */
- public CSSPrimitiveValue getBlue();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/Rect.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/Rect.java
deleted file mode 100644
index c745c92b6c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/Rect.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-/**
- * The <code>Rect</code> interface is used to represent any rect value. This
- * interface reflects the values in the underlying style property. Hence,
- * modifications made to the <code>CSSPrimitiveValue</code> objects modify
- * the style property.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface Rect {
- /**
- * This attribute is used for the top of the rect.
- */
- public CSSPrimitiveValue getTop();
-
- /**
- * This attribute is used for the right of the rect.
- */
- public CSSPrimitiveValue getRight();
-
- /**
- * This attribute is used for the bottom of the rect.
- */
- public CSSPrimitiveValue getBottom();
-
- /**
- * This attribute is used for the left of the rect.
- */
- public CSSPrimitiveValue getLeft();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/ViewCSS.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/ViewCSS.java
deleted file mode 100644
index cf5739f1e3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/css/ViewCSS.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.css;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.views.AbstractView;
-
-/**
- * This interface represents a CSS view. The <code>getComputedStyle</code>
- * method provides a read only access to the computed values of an element.
- * <p>
- * The expectation is that an instance of the <code>ViewCSS</code> interface
- * can be obtained by using binding-specific casting methods on an instance of
- * the <code>AbstractView</code> interface.
- * <p>
- * Since a computed style is related to an <code>Element</code> node, if
- * this element is removed from the document, the associated
- * <code>CSSStyleDeclaration</code> and <code>CSSValue</code> related to
- * this declaration are no longer valid.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface ViewCSS extends AbstractView {
- /**
- * This method is used to get the computed style as it is defined in .
- *
- * @param elt
- * The element whose style is to be computed. This parameter
- * cannot be null.
- * @param pseudoElt
- * The pseudo-element or <code>null</code> if none.
- * @return The computed style. The <code>CSSStyleDeclaration</code> is
- * read-only and contains only absolute values.
- */
- public CSSStyleDeclaration getComputedStyle(Element elt, String pseudoElt);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/DocumentStyle.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/DocumentStyle.java
deleted file mode 100644
index 9cc04d1cda..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/DocumentStyle.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.stylesheets;
-
-/**
- * The <code>DocumentStyle</code> interface provides a mechanism by which
- * the style sheets embedded in a document can be retrieved. The expectation
- * is that an instance of the <code>DocumentStyle</code> interface can be
- * obtained by using binding-specific casting methods on an instance of the
- * <code>Document</code> interface.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface DocumentStyle {
- /**
- * A list containing all the style sheets explicitly linked into or
- * embedded in a document. For HTML documents, this includes external
- * style sheets, included via the HTML LINK element, and inline STYLE
- * elements. In XML, this includes external style sheets, included via
- * style sheet processing instructions (see ).
- */
- public StyleSheetList getStyleSheets();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/LinkStyle.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/LinkStyle.java
deleted file mode 100644
index b71119b659..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/LinkStyle.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.stylesheets;
-
-/**
- * The <code>LinkStyle</code> interface provides a mechanism by which a
- * style sheet can be retrieved from the node responsible for linking it into
- * a document. An instance of the <code>LinkStyle</code> interface can be
- * obtained using binding-specific casting methods on an instance of a linking
- * node (<code>HTMLLinkElement</code>,<code>HTMLStyleElement</code> or
- * <code>ProcessingInstruction</code> in DOM Level 2).
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface LinkStyle {
- /**
- * The style sheet.
- */
- public StyleSheet getSheet();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/MediaList.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/MediaList.java
deleted file mode 100644
index 1df07c2468..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/MediaList.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.stylesheets;
-
-import org.w3c.dom.DOMException;
-
-/**
- * The <code>MediaList</code> interface provides the abstraction of an
- * ordered collection of media, without defining or constraining how this
- * collection is implemented. An empty list is the same as a list that
- * contains the medium <code>"all"</code>.
- * <p>
- * The items in the <code>MediaList</code> are accessible via an integral
- * index, starting from 0.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface MediaList {
- /**
- * The parsable textual representation of the media list. This is a
- * comma-separated list of media.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified string value has a
- * syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this media list
- * is readonly.
- */
- public String getMediaText();
-
- public void setMediaText(String mediaText) throws DOMException;
-
- /**
- * The number of media in the list. The range of valid media is
- * <code>0</code> to <code>length-1</code> inclusive.
- */
- public int getLength();
-
- /**
- * Returns the <code>index</code> th in the list. If <code>index</code>
- * is greater than or equal to the number of media in the list, this
- * returns <code>null</code>.
- *
- * @param index
- * Index into the collection.
- * @return The medium at the <code>index</code> th position in the
- * <code>MediaList</code>, or <code>null</code> if that is
- * not a valid index.
- */
- public String item(int index);
-
- /**
- * Deletes the medium indicated by <code>oldMedium</code> from the list.
- *
- * @param oldMediumThe
- * medium to delete in the media list.
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this list is
- * readonly. <br>
- * NOT_FOUND_ERR: Raised if <code>oldMedium</code> is not
- * in the list.
- */
- public void deleteMedium(String oldMedium) throws DOMException;
-
- /**
- * Adds the medium <code>newMedium</code> to the end of the list. If the
- * <code>newMedium</code> is already used, it is first removed.
- *
- * @param newMediumThe
- * new medium to add.
- * @exception DOMException
- * INVALID_CHARACTER_ERR: If the medium contains characters
- * that are invalid in the underlying style language. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this list is
- * readonly.
- */
- public void appendMedium(String newMedium) throws DOMException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/StyleSheet.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/StyleSheet.java
deleted file mode 100644
index bccea60b1d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/StyleSheet.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.stylesheets;
-
-import org.w3c.dom.Node;
-
-/**
- * The <code>StyleSheet</code> interface is the abstract base interface for
- * any type of style sheet. It represents a single style sheet associated with
- * a structured document. In HTML, the StyleSheet interface represents either
- * an external style sheet, included via the HTML LINK element, or an inline
- * STYLE element. In XML, this interface represents an external style sheet,
- * included via a style sheet processing instruction.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface StyleSheet {
- /**
- * This specifies the style sheet language for this style sheet. The style
- * sheet language is specified as a content type (e.g. "text/css"). The
- * content type is often specified in the <code>ownerNode</code>. Also
- * see the type attribute definition for the <code>LINK</code> element
- * in HTML 4.0, and the type pseudo-attribute for the XML style sheet
- * processing instruction.
- */
- public String getType();
-
- /**
- * <code>false</code> if the style sheet is applied to the document.
- * <code>true</code> if it is not. Modifying this attribute may cause a
- * new resolution of style for the document. A stylesheet only applies if
- * both an appropriate medium definition is present and the disabled
- * attribute is false. So, if the media doesn't apply to the current user
- * agent, the <code>disabled</code> attribute is ignored.
- */
- public boolean getDisabled();
-
- public void setDisabled(boolean disabled);
-
- /**
- * The node that associates this style sheet with the document. For HTML,
- * this may be the corresponding <code>LINK</code> or <code>STYLE</code>
- * element. For XML, it may be the linking processing instruction. For
- * style sheets that are included by other style sheets, the value of this
- * attribute is <code>null</code>.
- */
- public Node getOwnerNode();
-
- /**
- * For style sheet languages that support the concept of style sheet
- * inclusion, this attribute represents the including style sheet, if one
- * exists. If the style sheet is a top-level style sheet, or the style
- * sheet language does not support inclusion, the value of this attribute
- * is <code>null</code>.
- */
- public StyleSheet getParentStyleSheet();
-
- /**
- * If the style sheet is a linked style sheet, the value of its attribute
- * is its location. For inline style sheets, the value of this attribute
- * is <code>null</code>. See the href attribute definition for the
- * <code>LINK</code> element in HTML 4.0, and the href pseudo-attribute
- * for the XML style sheet processing instruction.
- */
- public String getHref();
-
- /**
- * The advisory title. The title is often specified in the
- * <code>ownerNode</code>. See the title attribute definition for the
- * <code>LINK</code> element in HTML 4.0, and the title pseudo-attribute
- * for the XML style sheet processing instruction.
- */
- public String getTitle();
-
- /**
- * The intended destination media for style information. The media is
- * often specified in the <code>ownerNode</code>. If no media has been
- * specified, the <code>MediaList</code> will be empty. See the media
- * attribute definition for the <code>LINK</code> element in HTML 4.0,
- * and the media pseudo-attribute for the XML style sheet processing
- * instruction . Modifying the media list may cause a change to the
- * attribute <code>disabled</code>.
- */
- public MediaList getMedia();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/StyleSheetList.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/StyleSheetList.java
deleted file mode 100644
index a791de6e7a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/stylesheets/StyleSheetList.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.stylesheets;
-
-/**
- * The <code>StyleSheetList</code> interface provides the abstraction of an
- * ordered collection of style sheets.
- * <p>
- * The items in the <code>StyleSheetList</code> are accessible via an
- * integral index, starting from 0.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document
- * Object Model (DOM) Level 2 Style Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface StyleSheetList {
- /**
- * The number of <code>StyleSheets</code> in the list. The range of
- * valid child stylesheet indices is <code>0</code> to
- * <code>length-1</code> inclusive.
- */
- public int getLength();
-
- /**
- * Used to retrieve a style sheet by ordinal index. If index is greater
- * than or equal to the number of style sheets in the list, this returns
- * <code>null</code>.
- *
- * @param indexIndex
- * into the collection
- * @return The style sheet at the <code>index</code> position in the
- * <code>StyleSheetList</code>, or <code>null</code> if that
- * is not a valid index.
- */
- public StyleSheet item(int index);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/views/AbstractView.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/views/AbstractView.java
deleted file mode 100644
index 799ce7e70a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/views/AbstractView.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.views;
-
-/**
- * A base interface that all views shall derive from.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113'>Document
- * Object Model (DOM) Level 2 Views Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface AbstractView {
- /**
- * The source <code>DocumentView</code> of which this is an
- * <code>AbstractView</code>.
- */
- public DocumentView getDocument();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/views/DocumentView.java b/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/views/DocumentView.java
deleted file mode 100644
index ce63f7b21d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/w3c/dom/views/DocumentView.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.views;
-
-/**
- * The <code>DocumentView</code> interface is implemented by
- * <code>Document</code> objects in DOM implementations supporting DOM
- * Views. It provides an attribute to retrieve the default view of a document.
- * <p>
- * See also the <a
- * href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113'>Document
- * Object Model (DOM) Level 2 Views Specification </a>.
- *
- * @since DOM Level 2
- */
-public interface DocumentView {
- /**
- * The default <code>AbstractView</code> for this <code>Document</code>,
- * or <code>null</code> if none available.
- */
- public AbstractView getDefaultView();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/.classpath b/bundles/org.eclipse.wst.css.ui/.classpath
deleted file mode 100644
index df094ee4a7..0000000000
--- a/bundles/org.eclipse.wst.css.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <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.css.ui/.compatibility b/bundles/org.eclipse.wst.css.ui/.compatibility
deleted file mode 100644
index 6fcfaf32fb..0000000000
--- a/bundles/org.eclipse.wst.css.ui/.compatibility
+++ /dev/null
@@ -1,2 +0,0 @@
-#Wed Mar 24 13:53:52 EST 2004
-.project=3769
diff --git a/bundles/org.eclipse.wst.css.ui/.cvsignore b/bundles/org.eclipse.wst.css.ui/.cvsignore
deleted file mode 100644
index 4295133bac..0000000000
--- a/bundles/org.eclipse.wst.css.ui/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-csseditor.jar
-temp.folder
-build.xml
-dev.properties
-bin
diff --git a/bundles/org.eclipse.wst.css.ui/.project b/bundles/org.eclipse.wst.css.ui/.project
deleted file mode 100644
index d42035fc37..0000000000
--- a/bundles/org.eclipse.wst.css.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.css.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.css.ui/build.properties b/bundles/org.eclipse.wst.css.ui/build.properties
deleted file mode 100644
index 07de39b935..0000000000
--- a/bundles/org.eclipse.wst.css.ui/build.properties
+++ /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
-###############################################################################
-bin.includes = plugin.xml,\
- *.jar,\
- css.jar,\
- icons/,\
- plugin.properties
-src.includes = plugin.xml,\
- plugin.properties,\
- icons/,\
- build.xml,\
- build.properties,\
- README.txt
-source.csseditor.jar = src/
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/aural_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/aural_props.gif
deleted file mode 100644
index df1704e435..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/aural_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/boxmodel_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/boxmodel_props.gif
deleted file mode 100644
index 7c050f5090..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/boxmodel_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/charset_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/charset_rule.gif
deleted file mode 100644
index 0e93844d92..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/charset_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/class_selector.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/class_selector.gif
deleted file mode 100644
index f924d7a684..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/class_selector.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/colback_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/colback_props.gif
deleted file mode 100644
index 5ca230b289..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/colback_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/content_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/content_props.gif
deleted file mode 100644
index 2133ded0bd..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/content_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyname.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyname.gif
deleted file mode 100644
index ede58abb89..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyname.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_function.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_function.gif
deleted file mode 100644
index 6cd12dada0..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_function.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_identifier.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_identifier.gif
deleted file mode 100644
index 2adbdd83b2..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_identifier.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_unit.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_unit.gif
deleted file mode 100644
index 308a3ae841..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_unit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/font_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/font_props.gif
deleted file mode 100644
index aca5f8920b..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/font_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/fontface_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/fontface_rule.gif
deleted file mode 100644
index 71f59e8b7a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/fontface_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/id_selector.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/id_selector.gif
deleted file mode 100644
index f0857d284f..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/id_selector.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_rule.gif
deleted file mode 100644
index 94d89cd59e..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_selector.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_selector.gif
deleted file mode 100644
index d85b78f29d..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_selector.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/media_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/media_rule.gif
deleted file mode 100644
index 3391f19bee..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/media_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/other_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/other_props.gif
deleted file mode 100644
index 920c228d4a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/other_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/page_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/page_rule.gif
deleted file mode 100644
index 525f64bc57..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/page_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pagedmedia_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pagedmedia_props.gif
deleted file mode 100644
index 6b635b03d8..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pagedmedia_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pseudo.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pseudo.gif
deleted file mode 100644
index 1b6a6dc6aa..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pseudo.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/sort.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/sort.gif
deleted file mode 100644
index 23c5d0b11c..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/sort.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/style_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/style_rule.gif
deleted file mode 100644
index 3176ff8c5c..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/style_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/stylesheet.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/stylesheet.gif
deleted file mode 100644
index d8fde00545..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/stylesheet.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/table_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/table_props.gif
deleted file mode 100644
index bcc76cd635..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/table_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag_selector.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag_selector.gif
deleted file mode 100644
index 69850faf9a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag_selector.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/text_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/text_props.gif
deleted file mode 100644
index abf63f8568..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/text_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/ui_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/ui_props.gif
deleted file mode 100644
index 99a8b96f98..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/ui_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/unknown_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/unknown_rule.gif
deleted file mode 100644
index 857e4e50ee..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/unknown_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/visual_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/visual_props.gif
deleted file mode 100644
index c1a8b34ed8..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/visual_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/sourceEditor.gif b/bundles/org.eclipse.wst.css.ui/icons/sourceEditor.gif
deleted file mode 100644
index 75ebdb8586..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/sourceEditor.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/plugin.properties b/bundles/org.eclipse.wst.css.ui/plugin.properties
deleted file mode 100644
index e5c874c9ff..0000000000
--- a/bundles/org.eclipse.wst.css.ui/plugin.properties
+++ /dev/null
@@ -1,21 +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 CSS Source Editor
-nlFeatureName=SSE CSS Source Editor NL Support
-CSS_Source_Page_Editor.name=CSS Source Page Editor
-CSS_Files.name=CSS Files
-CSS_Source.name=CSS Source
-CSS_Styles.name=CSS Styles
-WebContentSettings.name=Web Content Settings
-###############################################################################
-# The following property keys maybe unused. Commented out on 12/7/2004. Uncomment if needed.
-#CSS_Annotations.name=CSS Annotations
diff --git a/bundles/org.eclipse.wst.css.ui/plugin.xml b/bundles/org.eclipse.wst.css.ui/plugin.xml
deleted file mode 100644
index 77ed1a42f7..0000000000
--- a/bundles/org.eclipse.wst.css.ui/plugin.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.css.ui"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.wst.css.ui.internal.CSSUIPlugin">
-
- <runtime>
- <library name="csseditor.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.xml.ui"/>
- <import plugin="org.eclipse.wst.sse.ui"/>
- <import plugin="org.eclipse.wst.css.core"/>
- <import plugin="org.eclipse.wst.sse.core"/>
- <import plugin="org.eclipse.wst.common.contentmodel"/>
- <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.wst.common.encoding"/>
- </requires>
-
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- name="%CSS_Source_Page_Editor.name"
- icon="icons/sourceEditor.gif"
- extensions="css"
- contributorClass="org.eclipse.wst.css.ui.ActionContributorCSS"
- class="org.eclipse.wst.css.ui.StructuredTextEditorCSS"
- symbolicFontName="org.eclipse.wst.sse.ui.textfont"
- id="org.eclipse.wst.css.ui.StructuredTextEditorCSS">
- </editor>
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.extendedconfiguration">
- <configuration
- type="contentoutlineconfiguration"
- class="org.eclipse.wst.css.ui.views.contentoutline.CSSContentOutlineConfiguration"
- target="org.eclipse.wst.css.core.csssource"/>
- <configuration
- type="textviewerconfiguration"
- class="org.eclipse.wst.css.ui.StructuredTextViewerConfigurationCSS"
- target="org.eclipse.wst.css.core.csssource"/>
- <configuration
- type="propertysheetconfiguration"
- class="org.eclipse.wst.css.ui.views.properties.CSSPropertySheetConfiguration"
- target="org.eclipse.wst.css.core.csssource"/>
- <configuration
- type="characterpairmatcher"
- class="org.eclipse.wst.css.ui.text.CSSDocumentRegionEdgeMatcher"
- target="org.eclipse.wst.css.core.csssource"/>
- <definition
- type="preferencepages"
- value="org.eclipse.wst.sse.ui.preferences/org.eclipse.wst.sse.ui.preferences.css"
- target="org.eclipse.wst.css.core.csssource"/>
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.adapterFactoryDescription">
- <adapterFactoryDescription
- class="org.eclipse.wst.css.ui.registry.AdapterFactoryProviderCSS">
- <contentType id="org.eclipse.wst.css.core.csssource"/>
- </adapterFactoryDescription>
- </extension>
- <extension
- point="org.eclipse.core.filebuffers.annotationModelCreation">
- <factory
- contentTypeId="org.eclipse.wst.css.core.csssource"
- class="org.eclipse.wst.sse.ui.StructuredResourceMarkerAnnotationModelFactory"/>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%CSS_Files.name"
- category="org.eclipse.wst.sse.ui.preferences"
- class="org.eclipse.wst.css.ui.preferences.ui.CSSFilesPreferencePage"
- id="org.eclipse.wst.sse.ui.preferences.css">
- </page>
- <page
- name="%CSS_Source.name"
- category="org.eclipse.wst.sse.ui.preferences.css"
- class="org.eclipse.wst.css.ui.preferences.ui.CSSSourcePreferencePage"
- id="org.eclipse.wst.sse.ui.preferences.css.source">
- </page>
- <page
- name="%CSS_Styles.name"
- category="org.eclipse.wst.sse.ui.preferences.css"
- class="org.eclipse.wst.css.ui.preferences.ui.CSSColorPage"
- id="org.eclipse.wst.sse.ui.preferences.css.styles">
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- name="%WebContentSettings.name"
- nameFilter="*.css"
- class="org.eclipse.wst.css.ui.contentproperties.ui.CSSContentSettingsPropertyPage"
- id="org.eclipse.wst.css.ui.csspropertypage">
- </page>
- </extension>
-<!-- Editor actionsets -->
- <extension
- point="org.eclipse.ui.actionSetPartAssociations">
- <actionSetPartAssociation
- targetID="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
- <part
- id="org.eclipse.wst.css.ui.StructuredTextEditorCSS">
- </part>
- </actionSetPartAssociation>
- <actionSetPartAssociation
- targetID="org.eclipse.ui.NavigateActionSet">
- <part
- id="org.eclipse.wst.css.ui.StructuredTextEditorCSS">
- </part>
- </actionSetPartAssociation>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/ActionContributorCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/ActionContributorCSS.java
deleted file mode 100644
index 9ac7e57773..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/ActionContributorCSS.java
+++ /dev/null
@@ -1,121 +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.css.ui;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-import org.eclipse.ui.texteditor.RetargetTextEditorAction;
-import org.eclipse.wst.sse.ui.edit.util.ActionContributor;
-import org.eclipse.wst.sse.ui.edit.util.ActionDefinitionIds;
-import org.eclipse.wst.sse.ui.edit.util.StructuredTextEditorActionConstants;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-
-/**
- * ActionContributorCSS
- *
- * This class should not be used inside multi page editor's
- * ActionBarContributor, since cascaded init() call from the
- * ActionBarContributor will causes exception and it leads to lose whole
- * toolbars.
- *
- * Instead, use SourcePageActionContributor for source page contributor of
- * multi page editor.
- *
- * Note that this class is still valid for single page editor.
- */
-public class ActionContributorCSS extends ActionContributor {
- private static final String[] EDITOR_IDS = {"org.eclipse.wst.css.ui.StructuredTextEditorCSS", "org.eclipse.wst.sse.ui.StructuredTextEditor"}; //$NON-NLS-1$ //$NON-NLS-2$
-
- protected RetargetTextEditorAction fContentAssist = null;
- protected RetargetTextEditorAction fCleanupDocument = null;
- protected MenuManager fFormatMenu = null;
- protected RetargetTextEditorAction fFormatDocument = null;
- protected RetargetTextEditorAction fFormatActiveElements = null;
-
- public ActionContributorCSS() {
- super();
-
- ResourceBundle resourceBundle = SSEUIPlugin.getDefault().getResourceBundle();
-
- // edit commands
- fContentAssist = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
- fContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
-
- // source commands
- fCleanupDocument = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
- fCleanupDocument.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT);
-
- fFormatDocument = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
- fFormatDocument.setActionDefinitionId(ActionDefinitionIds.FORMAT_DOCUMENT);
-
- fFormatActiveElements = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
- fFormatActiveElements.setActionDefinitionId(ActionDefinitionIds.FORMAT_ACTIVE_ELEMENTS);
-
- fFormatMenu = new MenuManager(SSEUIPlugin.getResourceString("%FormatMenu.label")); //$NON-NLS-1$
- fFormatMenu.add(fFormatDocument);
- fFormatMenu.add(fFormatActiveElements);
- }
-
- protected String[] getExtensionIDs() {
- return EDITOR_IDS;
- }
-
- protected void addToMenu(IMenuManager menu) {
- // edit commands
- IMenuManager editMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
- if (editMenu != null) {
- editMenu.add(fCommandsSeparator);
- editMenu.add(fToggleInsertModeAction);
- editMenu.add(fCommandsSeparator);
- editMenu.add(fExpandSelectionToMenu);
- editMenu.add(fCommandsSeparator);
- editMenu.add(fContentAssist);
- editMenu.add(fMenuAdditionsGroupMarker);
- }
-
- // source commands
- String sourceMenuLabel = SSEUIPlugin.getResourceString("%SourceMenu.label"); //$NON-NLS-1$
- String sourceMenuId = "sourceMenuId"; // This is just a menu id. No
- // need to translate.
- // //$NON-NLS-1$
- IMenuManager sourceMenu = new MenuManager(sourceMenuLabel, sourceMenuId);
- menu.insertAfter(IWorkbenchActionConstants.M_EDIT, sourceMenu);
- if (sourceMenu != null) {
- sourceMenu.add(fCommandsSeparator);
- sourceMenu.add(fShiftRight);
- sourceMenu.add(fShiftLeft);
- sourceMenu.add(fCleanupDocument);
- sourceMenu.add(fFormatMenu);
- sourceMenu.add(fCommandsSeparator);
- }
- }
-
- public void setActiveEditor(IEditorPart activeEditor) {
- super.setActiveEditor(activeEditor);
-
- ITextEditor textEditor = getTextEditor(activeEditor);
-
- fContentAssist.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS));
-
- fCleanupDocument.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT));
- fFormatDocument.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT));
- fFormatActiveElements.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS));
- fCleanupDocument.setEnabled(textEditor != null && textEditor.isEditable());
- fFormatDocument.setEnabled(textEditor != null && textEditor.isEditable());
- fFormatActiveElements.setEnabled(textEditor != null && textEditor.isEditable());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/CSSEditorPlugin.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/CSSEditorPlugin.java
deleted file mode 100644
index 87f1a9dd81..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/CSSEditorPlugin.java
+++ /dev/null
@@ -1,21 +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.css.ui;
-
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-
-
-/**
- * @deprecated use internal CSSUIPlugin class instead if possible
- */
-public class CSSEditorPlugin extends CSSUIPlugin {
- // see org.eclipse.wst.css.ui.internal.CSSUIPlugin
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextEditorCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextEditorCSS.java
deleted file mode 100644
index 4757c8ab18..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextEditorCSS.java
+++ /dev/null
@@ -1,60 +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.css.ui;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.wst.css.ui.edit.ui.CleanupActionCSS;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.css.ui.internal.selection.StructureSelectEnclosingCSSAction;
-import org.eclipse.wst.css.ui.internal.selection.StructureSelectNextCSSAction;
-import org.eclipse.wst.css.ui.internal.selection.StructureSelectPreviousCSSAction;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.edit.util.ActionDefinitionIds;
-import org.eclipse.wst.sse.ui.edit.util.StructuredTextEditorActionConstants;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory;
-import org.eclipse.wst.sse.ui.internal.selection.StructureSelectHistoryAction;
-
-public class StructuredTextEditorCSS extends StructuredTextEditor {
- protected void createActions() {
- super.createActions();
-
- ResourceBundle resourceBundle = CSSUIPlugin.getDefault().getResourceBundle();
-
- Action action = new CleanupActionCSS(SSEUIPlugin.getDefault().getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT + DOT, this);
- action.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT);
- setAction(StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT, action);
-
- SelectionHistory selectionHistory = new SelectionHistory(this);
- action = new StructureSelectEnclosingCSSAction(this, selectionHistory);
- action.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_ENCLOSING);
- setAction(StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_ENCLOSING, action);
-
- action = new StructureSelectNextCSSAction(this, selectionHistory);
- action.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_NEXT);
- setAction(StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_NEXT, action);
-
- action = new StructureSelectPreviousCSSAction(this, selectionHistory);
- action.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_PREVIOUS);
- setAction(StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_PREVIOUS, action);
-
- action = new StructureSelectHistoryAction(this, selectionHistory);
- action.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_HISTORY);
- setAction(StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_HISTORY, action);
- selectionHistory.setHistoryAction((StructureSelectHistoryAction) action);
- }
-
- protected void initializeEditor() {
- super.initializeEditor();
- setHelpContextId(IHelpContextIds.CSS_SOURCEVIEW_HELPID);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextViewerConfigurationCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextViewerConfigurationCSS.java
deleted file mode 100644
index 5e6dfea5eb..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextViewerConfigurationCSS.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.css.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jface.text.IAutoEditStrategy;
-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.source.ISourceViewer;
-import org.eclipse.wst.css.core.format.FormatProcessorCSS;
-import org.eclipse.wst.css.core.internal.text.rules.StructuredTextPartitionerForCSS;
-import org.eclipse.wst.css.ui.autoedit.StructuredAutoEditStrategyCSS;
-import org.eclipse.wst.css.ui.contentassist.CSSContentAssistProcessor;
-import org.eclipse.wst.css.ui.style.LineStyleProviderForCSS;
-import org.eclipse.wst.css.ui.taginfo.CSSBestMatchHoverProcessor;
-import org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.format.StructuredFormattingStrategy;
-import org.eclipse.wst.sse.ui.style.IHighlighter;
-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;
-
-public class StructuredTextViewerConfigurationCSS extends StructuredTextViewerConfiguration {
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.editor.StructuredTextViewerConfiguration#getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer)
- */
- public Map getAutoEditStrategies(ISourceViewer sourceViewer) {
- Map result = super.getAutoEditStrategies(sourceViewer);
-
- if (result.get(StructuredTextPartitionerForCSS.ST_STYLE) == null)
- result.put(StructuredTextPartitionerForCSS.ST_STYLE, new ArrayList(1));
-
- IAutoEditStrategy autoEditStrategy = new StructuredAutoEditStrategyCSS();
- List strategies = (List) result.get(StructuredTextPartitionerForCSS.ST_STYLE);
- strategies.add(autoEditStrategy);
-
- return result;
- }
-
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- if (configuredContentTypes == null) {
- configuredContentTypes = new String[]{StructuredTextPartitionerForCSS.ST_STYLE, StructuredTextPartitioner.ST_DEFAULT_PARTITION, StructuredTextPartitioner.ST_UNKNOWN_PARTITION};
- }
- return configuredContentTypes;
- }
-
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- IContentAssistant contentAssistant = super.getContentAssistant(sourceViewer);
-
- if (contentAssistant != null && contentAssistant instanceof ContentAssistant) {
- //((ContentAssistant)
- // contentAssistant).setContentAssistProcessor(new
- // CSSContentAssistProcessor(),
- // StructuredTextPartitionerForCSS.ST_STYLE);
- IContentAssistProcessor cssProcessor = new CSSContentAssistProcessor();
- addContentAssistProcessor((ContentAssistant) contentAssistant, cssProcessor, StructuredTextPartitionerForCSS.ST_STYLE);
- addContentAssistProcessor((ContentAssistant) contentAssistant, cssProcessor, StructuredTextPartitioner.ST_UNKNOWN_PARTITION);
- }
-
- return contentAssistant;
- }
-
- public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
- final MultiPassContentFormatter formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), StructuredTextPartitionerForCSS.ST_STYLE);
-
- formatter.setMasterStrategy(new StructuredFormattingStrategy(new FormatProcessorCSS()));
-
- return formatter;
- }
-
- public IHighlighter getHighlighter(ISourceViewer sourceViewer) {
- IHighlighter highlighter = super.getHighlighter(sourceViewer);
-
- if (highlighter != null) {
- highlighter.addProvider(StructuredTextPartitionerForCSS.ST_STYLE, new LineStyleProviderForCSS());
- }
-
- return highlighter;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getTextHover(org.eclipse.jface.text.source.ISourceViewer,
- * java.lang.String, int)
- */
- public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) {
- // content type does not really matter since only combo, problem,
- // annotation hover is available
- TextHoverManager.TextHoverDescriptor[] hoverDescs = getTextHovers();
- int i = 0;
- while (i < hoverDescs.length) {
- if (hoverDescs[i].isEnabled() && EditorUtility.computeStateMask(hoverDescs[i].getModifierString()) == stateMask) {
- String hoverType = hoverDescs[i].getId();
- if (TextHoverManager.COMBINATION_HOVER.equalsIgnoreCase(hoverType))
- return new CSSBestMatchHoverProcessor();
- else if (TextHoverManager.PROBLEM_HOVER.equalsIgnoreCase(hoverType))
- return new ProblemAnnotationHoverProcessor();
- else if (TextHoverManager.ANNOTATION_HOVER.equalsIgnoreCase(hoverType))
- return new AnnotationHoverProcessor();
- }
- i++;
- }
- return super.getTextHover(sourceViewer, contentType, stateMask);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/autoedit/StructuredAutoEditStrategyCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/autoedit/StructuredAutoEditStrategyCSS.java
deleted file mode 100644
index de3b80885d..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/autoedit/StructuredAutoEditStrategyCSS.java
+++ /dev/null
@@ -1,501 +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.css.ui.autoedit;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentCommand;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ui.texteditor.ITextEditorExtension3;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.css.ui.internal.Logger;
-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.ui.edit.util.BasicAutoEditStrategy;
-
-public class StructuredAutoEditStrategyCSS extends BasicAutoEditStrategy {
- protected IStructuredDocument structuredDocument = null;
-
- class CompoundRegion {
-
- CompoundRegion(IStructuredDocumentRegion documentRegion, ITextRegion textRegion) {
- super();
- this.documentRegion = documentRegion;
- this.textRegion = textRegion;
- }
-
- IStructuredDocumentRegion getDocumentRegion() {
- return documentRegion;
- }
-
- ITextRegion getTextRegion() {
- return textRegion;
- }
-
- int getStart() {
- return textRegion.getStart();
- }
-
- int getEnd() {
- return textRegion.getEnd();
- }
-
- String getType() {
- return textRegion.getType();
- }
-
- String getText() {
- return documentRegion.getText(textRegion);
- }
-
- int getStartOffset() {
- return documentRegion.getStartOffset(textRegion);
- }
-
- int getEndOffset() {
- return documentRegion.getEndOffset(textRegion);
- }
-
- private IStructuredDocumentRegion documentRegion;
- private ITextRegion textRegion;
-
- }
-
- /**
- */
- protected void autoIndentAfterClose(DocumentCommand command, String regionType) {
- if (!setRangeForClose(command))
- return;
-
- int position = command.offset + command.length;
-
- if (position == -1 || structuredDocument.getLength() == 0) {
- return;
- }
-
- // get open brace region
- CompoundRegion region = prevCorrespondence(position, regionType);
-
- // get indentation
- String str = getIndentFor(region, false);
-
- // append to input
- if (str != null)
- command.text = str + command.text;
- }
-
- /**
- * Copies the indentation of the previous line.
- */
- protected void autoIndentAfterNewLine(DocumentCommand command) {
- // select nearest white spaces to replace with new-line
- setRangeForNewLine(command);
-
- // get position
- int position = command.offset;
-
- if (position == -1 || structuredDocument.getLength() == 0) {
- return;
- }
-
- // get current region
- CompoundRegion currentRegion = getRegion(command.offset + command.length);
-
- // get key region
- CompoundRegion keyRegion = getPrevKeyRegion(position, currentRegion);
-
- // get indent string
- String str = getIndentFor(keyRegion, true);
-
- // check another indentation
- int shift = needShift(keyRegion, command.offset + command.length);
-
- // create text to replace
- StringBuffer buf = new StringBuffer(command.text);
- if (str != null)
- buf.append(str);
- while (shift-- != 0)
- buf.append(CSSPreferenceHelper.getInstance().getIndentString());
- command.text = buf.toString();
-
- }
-
- /**
- */
- public void customizeDocumentCommand(IDocument document, DocumentCommand command) {
- Object textEditor = getActiveTextEditor();
- if (!(textEditor instanceof ITextEditorExtension3 && ((ITextEditorExtension3) textEditor).getInsertMode() == ITextEditorExtension3.SMART_INSERT))
- return;
-
- //return;
- ///*
- structuredDocument = (IStructuredDocument) document;
-
- if (command.length == 0 && command.text != null) {
- if (endsWith(document.getLegalLineDelimiters(), command.text) != -1) {
- autoIndentAfterNewLine(command);
- } else if (command.text.equals("}")) {//$NON-NLS-1$
- autoIndentAfterClose(command, CSSRegionContexts.CSS_RBRACE);
- } else if (command.text.equals("]")) {//$NON-NLS-1$
- autoIndentAfterClose(command, CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END);
- } else if (command.text.equals(")")) {//$NON-NLS-1$
- autoIndentAfterClose(command, CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE);
- }
- }
- //*/
- }
-
- /**
- */
- protected String getIndentFor(CompoundRegion region, boolean indentForNextRegion) {
- if (region == null)
- return null;
- IStructuredDocumentRegion flatNode = region.getDocumentRegion();
- if (flatNode == null)
- return null;
-
- try {
- if (region.getType() == CSSRegionContexts.CSS_LBRACE || region.getType() == CSSRegionContexts.CSS_DELIMITER || region.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- // get meanful flat node
- RegionIterator it = new RegionIterator(flatNode, region.getTextRegion());
- it.prev();
- while (it.hasPrev()) {
- ITextRegion r = it.prev();
- region = new CompoundRegion(it.getStructuredDocumentRegion(), r);
- if (region.getType() != CSSRegionContexts.CSS_S)
- break;
- }
- flatNode = region.getDocumentRegion();
- // get indent string
- int position = flatNode.getStart();
- int line = structuredDocument.getLineOfOffset(position);
- int start = structuredDocument.getLineOffset(line);
- int end = findEndOfWhiteSpace(structuredDocument, start, position);
- return structuredDocument.get(start, end - start);
- } else if (region.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START ||
- //region.getType() == CSSRegionContexts.CSS_PARENTHESIS_OPEN ||
- region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION || region.getType() == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- int position = flatNode.getStart() + region.getStart();
- int line = structuredDocument.getLineOfOffset(position);
- int start = structuredDocument.getLineOffset(line);
- int end = findEndOfWhiteSpace(structuredDocument, start, position);
- StringBuffer buf = new StringBuffer(structuredDocument.get(start, end - start));
- position += region.getText().length();
- if (indentForNextRegion) {
- int tokenStart = findEndOfWhiteSpace(structuredDocument, position, structuredDocument.getLineOffset(line) + structuredDocument.getLineLength(line) - 1);
- if (tokenStart < structuredDocument.getLineOffset(line) + structuredDocument.getLineLength(line) - 1) {
- position = tokenStart;
- }
- }
- while (position - end > 0) {
- buf.append(" ");//$NON-NLS-1$
- end++;
- }
- return buf.toString();
- } else
- return "";//$NON-NLS-1$
- } catch (BadLocationException excp) {
- Logger.logException(excp);
- }
- return null;
- }
-
- /**
- */
- protected CompoundRegion getPrevKeyRegion(int position, CompoundRegion currentRegion) {
- if (currentRegion == null) {
- if (structuredDocument.getLastStructuredDocumentRegion() == null)
- return null;
- }
-
- if (currentRegion != null && (currentRegion.getType() == CSSRegionContexts.CSS_RBRACE || currentRegion.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END || currentRegion.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)) {
- return prevCorrespondence(currentRegion);
- }
-
- RegionIterator it = new RegionIterator(structuredDocument, position - 1);
- while (it.hasPrev()) {
- ITextRegion r = it.prev();
- CompoundRegion region = new CompoundRegion(it.getStructuredDocumentRegion(), r);
- if (region.getType() == CSSRegionContexts.CSS_LBRACE ||
- // region.getType() == CSSRegionContexts.CSS_RBRACE ||
- region.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START ||
- // region.getType() ==
- // CSSRegionContexts.CSS_BRACKET_CLOSE ||
- //// region.getType() ==
- // CSSRegionContexts.CSS_PARENTHESIS_OPEN ||
- // region.getType() ==
- // CSSRegionContexts.CSS_PARENTHESIS_CLOSE ||
- region.getType() == CSSRegionContexts.CSS_DELIMITER || region.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER ||
- // region.getType() == CSSRegionContexts.CSS_COLON ||
- // region.getType() == CSSRegionContexts.CSS_COMMENT
- // ||
- region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- return region;
- } else if (region.getType() == CSSRegionContexts.CSS_RBRACE || region.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END || region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE) {
- // skip to LBRACE
- CompoundRegion pc = prevCorrespondence(region);
- it.reset(pc.getDocumentRegion(), pc.getTextRegion());
- it.prev();
- } else if (region.getType() == CSSRegionContexts.CSS_STRING) {
- RegionIterator itTmp = new RegionIterator(structuredDocument, position);
- if (region == itTmp.prev())
- return region; // position is inside of string
- } else if (region.getType() == CSSRegionContexts.CSS_COMMENT) {
- RegionIterator itTmp = new RegionIterator(structuredDocument, position);
- if (region == itTmp.prev())
- return region; // position is inside of comment
- } else if (region.getType() == CSSRegionContexts.CSS_UNKNOWN) {
- String str = region.getText();
- if (str.charAt(str.length() - 1) == '\\')
- return region;
- } else if (region.getType() == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- RegionIterator itPrev = new RegionIterator(region.getDocumentRegion(), region.getTextRegion());
- while (itPrev.hasPrev()) {
- ITextRegion regionPrev = itPrev.prev();
- if (regionPrev.getType() == CSSRegionContexts.CSS_RBRACE) {
- break;
- } else if (regionPrev.getType() == CSSRegionContexts.CSS_DELIMITER || regionPrev.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- return region;
- } else if (regionPrev.getType() == CSSRegionContexts.CSS_LBRACE) {
- while (itPrev.hasPrev()) {
- regionPrev = itPrev.prev();
- if (regionPrev.getType() == CSSRegionContexts.CSS_MEDIA)
- break;
- if (regionPrev.getType() == CSSRegionContexts.CSS_LBRACE || regionPrev.getType() == CSSRegionContexts.CSS_RBRACE || regionPrev.getType() == CSSRegionContexts.CSS_DELIMITER || regionPrev.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER)
- return region;
- }
- if (regionPrev.getType() == CSSRegionContexts.CSS_MEDIA)
- break;
- else
- return region;
- }
- }
- }
- }
- return null;
- }
-
- /**
- */
- protected CompoundRegion getRegion(int position) {
- IStructuredDocumentRegion flatNode = structuredDocument.getRegionAtCharacterOffset(position);
- if (flatNode != null)
- return new CompoundRegion(flatNode, flatNode.getRegionAtCharacterOffset(position));
- return null;
- }
-
- /**
- */
- protected int needShift(CompoundRegion region, int position) {
- int shift = 0;
- if (region == null || region.getType() == CSSRegionContexts.CSS_DELIMITER || region.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER || region.getType() == CSSRegionContexts.CSS_LBRACE) {
- // get non space region
- CompoundRegion cr = getRegion(position - 1);
- RegionIterator it = new RegionIterator(cr.getDocumentRegion(), cr.getTextRegion());
- ITextRegion nearestRegion = null;
- while (it.hasPrev()) {
- nearestRegion = it.prev();
- if (nearestRegion.getType() != CSSRegionContexts.CSS_S && nearestRegion.getType() != CSSRegionContexts.CSS_COMMENT)
- break;
- }
- if (nearestRegion != null && (nearestRegion.getType() == CSSRegionContexts.CSS_LBRACE || nearestRegion.getType() == CSSRegionContexts.CSS_RBRACE || nearestRegion.getType() == CSSRegionContexts.CSS_DELIMITER || nearestRegion.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER))
- shift--;
- else if (region == null)
- shift--;
- shift++;
- }
- if (region != null && region.getType() == CSSRegionContexts.CSS_LBRACE) {
- RegionIterator it = new RegionIterator(structuredDocument, position);
- if (!it.hasPrev() || it.prev().getType() != CSSRegionContexts.CSS_RBRACE)
- shift++;
- else
- shift = 0;
- }
- return shift;
- }
-
- /**
- */
- protected CompoundRegion prevCorrespondence(int position, String regionType) {
- RegionIterator it = new RegionIterator(structuredDocument, position - 1);
- ITextRegion region = null;
- int nest = 1;
- if (regionType == CSSRegionContexts.CSS_RBRACE) {
- // skip to LBRACE
- while (it.hasPrev()) {
- region = it.prev();
- if (region.getType() == CSSRegionContexts.CSS_LBRACE)
- nest--;
- else if (region.getType() == CSSRegionContexts.CSS_RBRACE)
- nest++;
- if (nest <= 0)
- break;
- }
- if (nest == 0)
- return new CompoundRegion(it.getStructuredDocumentRegion(), region);
- }
- if (regionType == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END) {
- // skip to BRACKET_OPEN
- while (it.hasPrev()) {
- region = it.prev();
- if (region.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START)
- nest--;
- else if (region.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END)
- nest++;
- if (nest <= 0)
- break;
- }
- if (nest == 0)
- return new CompoundRegion(it.getStructuredDocumentRegion(), region);
- }
- if (regionType == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE) {
- // skip to PARENTHESIS_OPEN
- while (it.hasPrev()) {
- region = it.prev();
- if (//region.getType() ==
- // CSSRegionContexts.CSS_PARENTHESIS_OPEN ||
- region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- nest--;
- else if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- nest++;
- if (nest <= 0)
- break;
- }
- if (nest == 0)
- return new CompoundRegion(it.getStructuredDocumentRegion(), region);
- }
- return null;
- }
-
- /**
- */
- protected CompoundRegion prevCorrespondence(CompoundRegion region) {
- if (region == null)
- return null;
-
- IStructuredDocumentRegion flatNode = region.getDocumentRegion();
- int position = flatNode.getStart() + region.getStart();
- return prevCorrespondence(position, region.getType());
- }
-
- /**
- * Insert the method's description here.
- *
- * @return boolean
- * @param command
- * org.eclipse.jface.text.DocumentCommand
- */
- protected boolean setRangeForClose(DocumentCommand command) {
- int position = command.offset;
-
- if (position == -1 || structuredDocument.getLength() == 0) {
- return false;
- }
-
- try {
- // find start of line
- int p = (position == structuredDocument.getLength() ? position - 1 : position);
-
- int line = structuredDocument.getLineOfOffset(p);
- int start = structuredDocument.getLineOffset(line);
- RegionIterator it = new RegionIterator(structuredDocument, start);
- boolean allWhiteSpace = false;
- // check whether the text from lStart to position is white space
- // or not
- while (it.hasNext()) {
- ITextRegion region = it.next();
- if (region.getType() != CSSRegionContexts.CSS_S)
- break;
- if (it.getStructuredDocumentRegion().getEndOffset(region) > p) {
- allWhiteSpace = true;
- break;
- }
- }
- if (allWhiteSpace) {
- command.length = command.length - (start - command.offset);
- command.offset = start;
- return true;
- }
- } catch (BadLocationException excp) {
- Logger.logException(excp);
- }
- return false;
- }
-
- /**
- */
- protected void setRangeForNewLine(DocumentCommand command) {
- int position = command.offset;
-
- if (position == -1 || structuredDocument.getLength() == 0) {
- return;
- }
-
- try {
- // add pre-nearest white spaces to replace target
- if (position > 0) {
- IStructuredDocumentRegion flatNode = structuredDocument.getRegionAtCharacterOffset(position - 1);
- if (flatNode != null) {
- ITextRegion region = flatNode.getRegionAtCharacterOffset(position - 1);
- if (region.getType() == CSSRegionContexts.CSS_S) {
- int end = command.offset + command.length;
- int nLine = structuredDocument.getLineOfOffset(position);
- int nStartPos = structuredDocument.getLineOffset(nLine);
- if (nStartPos < flatNode.getStartOffset(region))
- nStartPos = flatNode.getStartOffset(region);
- command.offset = nStartPos;
- command.length = end - command.offset;
- }
- }
- }
-
- // add post-nearest white spaces to replace target
- if (position < structuredDocument.getLength()) {
- IStructuredDocumentRegion flatNode = structuredDocument.getRegionAtCharacterOffset(position);
- if (flatNode != null) {
- ITextRegion region = flatNode.getRegionAtCharacterOffset(position);
- if (region.getType() == CSSRegionContexts.CSS_S) {
- int nLine = structuredDocument.getLineOfOffset(position);
- String currentLineDelim = structuredDocument.getLineDelimiter(nLine);
- int nEndPos = structuredDocument.getLineOffset(nLine) + structuredDocument.getLineLength(nLine) - ((currentLineDelim != null) ? currentLineDelim.length() : 0);
- if (nEndPos > flatNode.getEndOffset(region))
- nEndPos = flatNode.getEndOffset(region);
- command.length = nEndPos - command.offset;
- }
- }
- }
- } catch (BadLocationException e) {
- // do not customize command
- }
-
- }
-
- private static int endsWith(String[] searchStrings, String text) {
- for (int i = 0; i < searchStrings.length; i++) {
- if (text.endsWith(searchStrings[i]))
- return i;
- }
- return -1;
- }
-
- private static int findEndOfWhiteSpace(IDocument document, int offset, int end) throws BadLocationException {
- while (offset < end) {
- char c = document.getChar(offset);
- if (c != ' ' && c != '\t') {
- return offset;
- }
- offset++;
- }
- return end;
- }
-
-}
-
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSCACandidate.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSCACandidate.java
deleted file mode 100644
index 2987933e44..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSCACandidate.java
+++ /dev/null
@@ -1,102 +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.css.ui.contentassist;
-
-
-
-import org.eclipse.wst.css.ui.image.CSSImageType;
-
-class CSSCACandidate {
-
- private String fReplacementString = null;
- private int fCursorPosition = 0;
- private String fDisplayString = null;
- private CSSImageType fImageType = null;
-
- /**
- * CSSCACandidate constructor comment.
- */
- CSSCACandidate() {
- super();
- }
-
- /**
- *
- */
- int getCursorPosition() {
- return fCursorPosition;
- }
-
- /**
- *
- */
- String getDisplayString() {
- return fDisplayString;
- }
-
- /**
- *
- */
- CSSImageType getImageType() {
- return fImageType;
- }
-
- /**
- *
- */
- String getReplacementString() {
- return fReplacementString;
- }
-
- /**
- *
- */
- void setCursorPosition(int cursorPosition) {
- fCursorPosition = cursorPosition;
- }
-
- /**
- *
- */
- void setDisplayString(String displayString) {
- fDisplayString = displayString;
- }
-
- /**
- *
- */
- void setImageType(CSSImageType imageType) {
- fImageType = imageType;
- }
-
- /**
- *
- */
- void setReplacementString(String replacementString) {
- fReplacementString = replacementString;
- }
-
- /**
- * Returns a String that represents the value of this object.
- *
- * @return a string representation of the receiver
- */
- public String toString() {
- StringBuffer buf = new StringBuffer();
- buf.append(getReplacementString());
- buf.append("\"");//$NON-NLS-1$
- buf.append(getDisplayString());
- buf.append("\"");//$NON-NLS-1$
- buf.append("(");//$NON-NLS-1$
- buf.append(getCursorPosition());
- buf.append(")");//$NON-NLS-1$
-
- return buf.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSContentAssistContext.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSContentAssistContext.java
deleted file mode 100644
index 3d1baeda6e..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSContentAssistContext.java
+++ /dev/null
@@ -1,454 +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.css.ui.contentassist;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelFinder;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-class CSSContentAssistContext {
-
- private int fReplaceBegin = -1;
- private String fTextToReplace = null;
- private String fTextToCompare = null;
- private int fTargetPos = -1;
- private ICSSNode fTargetNode = null;
- private int fCursorPos = -1;
- private IStructuredDocument fStructuredDocument = null;
- private int fDocumentOffset = 0;
- private char fQuote = 0;
- private ICSSModel fModel = null;
-
- /**
- *
- */
- private CSSContentAssistContext() {
- super();
- }
-
- /**
- *
- */
- CSSContentAssistContext(int documentPosition, ICSSNode node, int documentOffset, char quote) {
- super();
- fCursorPos = documentPosition;
- fDocumentOffset = documentOffset;
- fQuote = quote;
- initialize(node.getOwnerDocument());
- }
-
- /**
- * @return int
- */
- int getCursorPos() {
- return fCursorPos;
- }
-
- /**
- * @return int
- */
- int getDocumentOffset() {
- return fDocumentOffset;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.IStructuredDocument
- */
- IStructuredDocument getStructuredDocument() {
- return fStructuredDocument;
- }
-
- /**
- * @return com.ibm.sse.model.css.model.ICSSModel
- */
- ICSSModel getModel() {
- return fModel;
- }
-
- private ICSSNode getNodeAt(int offset) {
- return (ICSSNode) ((fModel != null) ? fModel.getIndexedRegion(offset) : null);
- }
-
- /**
- *
- * @return char
- */
- char getQuoteOfStyleAttribute() {
- return fQuote;
- }
-
- /**
- *
- */
- ITextRegion getRegionByOffset(int offset) {
- ITextRegion region = null;
- if (fStructuredDocument != null) {
- IStructuredDocumentRegion flatNode = fStructuredDocument.getRegionAtCharacterOffset(offset);
- if (flatNode != null) {
- region = flatNode.getRegionAtCharacterOffset(offset);
- }
- }
- return region;
- }
-
- /**
- *
- */
- // String getRegionText() {
- // ITextRegion targetRegion = getTargetRegion();
- // if (targetRegion != null) {
- // return targetRegion.getText();
- // } else {
- // return ""; //$NON-NLS-1$
- // }
- // }
- /**
- *
- */
- int getReplaceBegin() {
- return fReplaceBegin;
- }
-
- /**
- *
- * @return com.ibm.sed.structuredDocument.ITextRegion
- */
- // ITextRegion getSignificantTargetRegion() {
- // ITextRegion targetRegion = getTargetRegion();
- // RegionIterator iterator = null;
- // if (targetRegion == null) {
- // if (0 < fCursorPos) {
- // iterator = new RegionIterator(fStructuredDocument, fCursorPos - 1);
- // }
- // } else {
- // iterator = getRegionIterator();
- // }
- // if (iterator != null) {
- // while (iterator.hasPrev()) {
- // ITextRegion region = iterator.prev();
- // String type = region.getType();
- // if (type != CSSRegionContexts.CSS_S && type !=
- // CSSRegionContexts.CSS_COMMENT &&
- // type != CSSRegionContexts.CSS_CDO && type != CSSRegionContexts.CSS_CDC)
- // {
- // targetRegion = region;
- // break;
- // }
- // }
- // }
- //
- // return targetRegion;
- // }
- /**
- *
- */
- ICSSNode getTargetNode() {
- return fTargetNode;
- }
-
- /**
- *
- */
- private int getTargetPos() {
- return fTargetPos;
- }
-
- /**
- * @return com.ibm.sed.structuredDocument.ITextRegion
- */
- ITextRegion getTargetRegion() {
- return getRegionByOffset(getTargetPos());
- }
-
- private IStructuredDocumentRegion getTargetDocumentRegion() {
- return getDocumentRegionByOffset(getTargetPos());
- }
-
- private IStructuredDocumentRegion getDocumentRegionByOffset(int offset) {
- return (fStructuredDocument != null) ? fStructuredDocument.getRegionAtCharacterOffset(offset) : null;
- }
-
- /**
- *
- * @return com.ibm.sed.structuredDocument.ITextRegion
- */
- ITextRegion getTargetRegionPrevious() {
- ITextRegion previousRegion = null;
- ITextRegion targetRegion = getTargetRegion();
- RegionIterator iterator = null;
- if (targetRegion == null) {
- if (0 < fCursorPos) {
- iterator = new RegionIterator(fStructuredDocument, fCursorPos - 1);
- }
- } else {
- iterator = getRegionIterator();
- if (iterator.hasPrev()) {
- iterator.prev();
- } else {
- iterator = null;
- }
- }
- if (iterator != null) {
- while (iterator.hasPrev()) {
- ITextRegion region = iterator.prev();
- String type = region.getType();
- if (type != CSSRegionContexts.CSS_S && type != CSSRegionContexts.CSS_COMMENT && type != CSSRegionContexts.CSS_CDO && type != CSSRegionContexts.CSS_CDC) {
- previousRegion = region;
- break;
- }
- }
- }
-
- return previousRegion;
- }
-
- /**
- * @return java.lang.String
- */
- String getTextToCompare() {
- return fTextToCompare;
- }
-
- /**
- *
- */
- String getTextToReplace() {
- return fTextToReplace;
- }
-
- /**
- *
- */
- private void initialize(ICSSDocument doc) {
- if (doc == null) {
- return;
- }
- ICSSModel model = doc.getModel();
- fModel = model;
- fStructuredDocument = model.getStructuredDocument();
-
- initializeTargetPos();
- initializeTargetText();
- initializeTargetNode();
- }
-
- /**
- *
- */
- private void initializeTargetNode() {
- if (fCursorPos == 0) {
- fTargetNode = fModel.getDocument();
- return;
- }
-
- // find edge of tree node
- ICSSNode cursorNode = getNodeAt(fCursorPos);
- if (cursorNode == null) { // end of document
- cursorNode = fModel.getDocument();
- }
- ICSSNode node = null;
- IStructuredDocumentRegion flatNode = fStructuredDocument.getRegionAtCharacterOffset(fCursorPos - 1);
- while (flatNode != null && (node = getNodeAt(flatNode.getStartOffset())) == cursorNode && ((IndexedRegion) node).getStartOffset() != flatNode.getStartOffset()) {
- flatNode = flatNode.getPrevious();
- }
- if (flatNode == null) { // top of document
- fTargetNode = (node == null) ? fModel.getDocument() : node;
- return;
- }
- // v<--|
- // AAAAAA
- // BBBBBBBBBB cursorNode:A , node:B -> target is A
- if (cursorNode != null) {
- for (ICSSNode parent = cursorNode.getParentNode(); parent != null; parent = parent.getParentNode()) {
- if (parent == cursorNode) {
- fTargetNode = cursorNode;
- return;
- }
- }
- }
- // v<--|
- // AAA
- // BBBBBBBBBB cursorNode:B , node:A -> depend on A's node type
- short nodeType = node.getNodeType();
- if (nodeType == ICSSNode.STYLEDECLITEM_NODE || nodeType == ICSSNode.CHARSETRULE_NODE || nodeType == ICSSNode.IMPORTRULE_NODE) {
- String type = CSSUtil.getStructuredDocumentRegionType(flatNode);
- if (type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- fTargetNode = node.getParentNode();
- } else {
- fTargetNode = node;
- }
- // fTargetNode = (bOverSemiColon) ? node.getParentNode() : node;
- } else if (CSSUtil.getStructuredDocumentRegionType(flatNode) == CSSRegionContexts.CSS_RBRACE) {
- fTargetNode = node.getParentNode();
- } else {
- fTargetNode = node;
- }
-
- return;
- }
-
- /**
- *
- */
- private void initializeTargetPos() {
- if (fCursorPos == 0 || isSpecialDelimiterRegion(fCursorPos - 1)) {
- fTargetPos = fCursorPos;
- } else {
- fTargetPos = fCursorPos - 1;
- }
- }
-
- /**
- *
- */
- private void initializeTargetText() {
- ITextRegion targetRegion = getTargetRegion();
- IStructuredDocumentRegion documentRegion = getTargetDocumentRegion();
- if (targetRegion == null) {
- fReplaceBegin = fCursorPos;
- fTextToReplace = ""; //$NON-NLS-1$
- fTextToCompare = ""; //$NON-NLS-1$
- } else {
- String regionText = documentRegion.getText(targetRegion);
- int regionStart = documentRegion.getStartOffset(targetRegion);
- if (regionStart == fCursorPos || regionText.trim().length() == 0 || regionStart + regionText.length() - 1 < fTargetPos) {
- // to insertion
- fReplaceBegin = fCursorPos;
- fTextToReplace = ""; //$NON-NLS-1$
- fTextToCompare = ""; //$NON-NLS-1$
- } else {
- // to replace
- fReplaceBegin = regionStart;
- fTextToReplace = regionText;
- fTextToCompare = regionText.substring(0, fCursorPos - fReplaceBegin);
- }
- }
- }
-
- /**
- *
- */
- private boolean isSpecialDelimiterRegion(int pos) {
- ITextRegion region = getRegionByOffset(pos);
- String type = region.getType();
- return (type == CSSRegionContexts.CSS_LBRACE || type == CSSRegionContexts.CSS_RBRACE || type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_SEPARATOR || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR);
- }
-
- /**
- *
- */
- boolean isTargetPosAfterOf(String regionType) {
- int start = ((IndexedRegion) fTargetNode).getStartOffset();
- if (start < 0 || ((IndexedRegion) fTargetNode).getEndOffset() <= 0) {
- return false;
- }
-
- RegionIterator iRegion = new RegionIterator(fStructuredDocument, start);
- while (iRegion.hasNext()) {
- ITextRegion region = iRegion.next();
- if (fTargetPos < iRegion.getStructuredDocumentRegion().getTextEndOffset(region)) {
- break;
- }
- if (region.getType() == regionType) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- *
- */
- boolean isTargetPosBeforeOf(String regionType) {
- return !isTargetPosAfterOf(regionType);
- }
-
- /**
- * @return boolean
- * @param regionType
- * java.lang.String
- */
- boolean targetFollows(String regionType) {
- RegionIterator iRegion;
- ITextRegion region = null;
- if (fStructuredDocument.getLength() <= fTargetPos) {
- iRegion = new RegionIterator(fStructuredDocument, fStructuredDocument.getLength() - 1);
- } else {
- iRegion = new RegionIterator(fStructuredDocument, fTargetPos);
- try {
- if (!Character.isWhitespace(fStructuredDocument.getChar(fTargetPos)) && iRegion.hasPrev()) {
- region = iRegion.prev();
- }
- } catch (BadLocationException e) {
- iRegion = new RegionIterator(fStructuredDocument, fStructuredDocument.getLength() - 1);
- }
- }
- while (iRegion.hasPrev()) {
- region = iRegion.prev();
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT) {
- continue;
- } else {
- break;
- }
- }
- if (region != null && region.getType() == regionType) {
- return true;
- } else {
- return false;
- }
- }
-
- /**
- *
- */
- boolean targetHas(String regionType) {
- int start = ((IndexedRegion) fTargetNode).getStartOffset();
- int end = ((IndexedRegion) fTargetNode).getEndOffset();
- if (start < 0 || end <= 0) {
- return false;
- }
- RegionIterator iRegion = new RegionIterator(fStructuredDocument, start);
- while (iRegion.hasNext()) {
- ITextRegion region = iRegion.next();
- if (end <= iRegion.getStructuredDocumentRegion().getStartOffset(region)) {
- break;
- }
- if (region.getType() == regionType) {
- return true;
- }
- }
- return false;
- }
-
- RegionIterator getRegionIterator() {
- return new RegionIterator(getStructuredDocument(), getTargetPos());
- }
-
- /**
- *
- */
- CSSMetaModel getMetaModel() {
- CSSMetaModelFinder finder = CSSMetaModelFinder.getInstance();
- return finder.findMetaModelFor(getModel());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSContentAssistProcessor.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSContentAssistProcessor.java
deleted file mode 100644
index 50f1d6ddec..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSContentAssistProcessor.java
+++ /dev/null
@@ -1,273 +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.css.ui.contentassist;
-
-
-
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.wst.css.core.adapters.ICSSModelAdapter;
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.html.core.htmlcss.StyleAdapterFactory;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.ui.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.ui.contentassist.XMLContentAssistUtilities;
-import org.eclipse.wst.xml.ui.util.SharedXMLEditorPluginImageHelper;
-
-public class CSSContentAssistProcessor implements IContentAssistProcessor {
-
- private int fDocumentOffset = 0;
- private char fQuote = 0;
-
- /**
- * 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 viewer, int documentPosition) {
-
- IndexedRegion indexedNode = ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, documentPosition + fDocumentOffset);
- IndexedRegion keyIndexedNode = null;
- XMLNode xNode = null;
- XMLNode parent = null;
- IStructuredModel cssModel = null;
- CSSProposalArranger arranger = null;
-
- // bail if we couldn't get an indexed node
- //if(indexedNode == null) return new ICompletionProposal[0];
- if (indexedNode instanceof XMLNode) {
- xNode = (XMLNode) indexedNode;
- parent = (XMLNode) xNode.getParentNode();
- }
- // need to get in here if there in the no 0 region <style>|</style>
- // case
- if (xNode != null && xNode.getNodeName().equalsIgnoreCase(HTML40Namespace.ElementName.STYLE)) {
- // now we know the cursor is in a <style> tag w/out region
- cssModel = getCSSModel(xNode);
- if (cssModel == null)
- return new ICompletionProposal[0];
-
- // adjust offsets for embedded style
- int offset = documentPosition;
- int pos = 0;
- keyIndexedNode = cssModel.getIndexedRegion(pos);
- if (keyIndexedNode == null) {
- keyIndexedNode = (IndexedRegion) ((ICSSModel) cssModel).getDocument();
- }
- arranger = new CSSProposalArranger(pos, (ICSSNode) keyIndexedNode, offset, (char) 0);
-
- } else if (parent != null && parent.getNodeName().equalsIgnoreCase(HTML40Namespace.ElementName.STYLE)) {
- // now we know the cursor is in a <style> tag with a region
- // use the parent because that will be the <style> tag
- cssModel = getCSSModel(parent);
- if (cssModel == null)
- return new ICompletionProposal[0];
-
- // adjust offsets for embedded style
- int offset = indexedNode.getStartOffset();
- int pos = documentPosition - offset;
- keyIndexedNode = cssModel.getIndexedRegion(pos);
- if (keyIndexedNode == null) {
- keyIndexedNode = (IndexedRegion) ((ICSSModel) cssModel).getDocument();
- }
- arranger = new CSSProposalArranger(pos, (ICSSNode) keyIndexedNode, offset, (char) 0);
- } else if (indexedNode instanceof XMLNode) {
- // get model for node w/ style attribute
- cssModel = getCSSModel((XMLNode) indexedNode);
- } else if (indexedNode instanceof ICSSNode) {
- // when editing external CSS using CSS Designer, ICSSNode is
- // passed.
- ICSSDocument cssdoc = ((ICSSNode) indexedNode).getOwnerDocument();
- if (cssdoc != null) {
- cssModel = cssdoc.getModel();
- }
- } else if (indexedNode == null && isViewerEmpty(viewer) && viewer instanceof StructuredTextViewer) {
- // the top of empty CSS Document
- IStructuredModel model = ((StructuredTextViewer) viewer).getModel();
- if (model instanceof ICSSModel) {
- cssModel = (ICSSModel) model;
- }
- }
-
- if (cssModel == null)
- return new ICompletionProposal[0];
-
- keyIndexedNode = cssModel.getIndexedRegion(documentPosition - fDocumentOffset);
- if (keyIndexedNode == null) {
- keyIndexedNode = (IndexedRegion) ((ICSSModel) cssModel).getDocument();
- }
-
- if (!(keyIndexedNode instanceof ICSSNode)) {
- return new ICompletionProposal[0];
- }
-
- if (arranger == null) {
- // if it's null at this point, it must be inline style for a tag,
- // not embedded
- arranger = new CSSProposalArranger(documentPosition, (ICSSNode) keyIndexedNode, fDocumentOffset, fQuote);
- }
- fDocumentOffset = 0;
- ICompletionProposal[] temp = arranger.getProposals();
-
- // add end tag if parent is not closed
- ICompletionProposal endTag = XMLContentAssistUtilities.computeXMLEndTagProposal(viewer, documentPosition, indexedNode, HTML40Namespace.ElementName.STYLE, SharedXMLEditorPluginImageHelper.IMG_OBJ_TAG_GENERIC); //$NON-NLS-1$
- if (endTag == null)
- return temp;
- else {
- ICompletionProposal[] plusOne = new ICompletionProposal[temp.length + 1];
- System.arraycopy(temp, 0, plusOne, 1, temp.length);
- plusOne[0] = endTag;
- return plusOne;
- }
- }
-
- /**
- * 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;
- }
-
- /**
- * Get CSSModel for an indexed node
- *
- * @param indexedNode
- * @return IStructuredModel
- */
- // private IStructuredModel getCSSModel(IndexedRegion indexedNode) {
- // if (indexedNode == null) return null;
- // Node node = (Node)indexedNode;
- // INodeNotifier notifier = (INodeNotifier)node.getParentNode();
- // if (notifier == null) return null;
- // INodeAdapter adapter =
- // StyleAdapterFactory.getInstance().adapt(notifier);
- // if (adapter == null || !(adapter instanceof CSSModelAdapter)) return
- // null;
- // CSSModelAdapter modelAdapter = (CSSModelAdapter)adapter;
- // return modelAdapter.getModel();
- // }
- /**
- * Returns the CSSmodel for a given XML node.
- *
- * @param element
- * @return IStructuredModel
- */
- private IStructuredModel getCSSModel(XMLNode element) {
- if (element == null)
- return null;
- INodeAdapter adapter = StyleAdapterFactory.getInstance().adapt(element);
- if (adapter == null || !(adapter instanceof ICSSModelAdapter))
- return null;
- ICSSModelAdapter modelAdapter = (ICSSModelAdapter) adapter;
- return modelAdapter.getModel();
- }
-
- /**
- * Returns information about possible contexts based on the specified
- * location within the document that corresponds to the current cursor
- * position within the text viewer.
- *
- * @param viewer
- * the viewer whose document is used to compute the possible
- * contexts
- * @param documentPosition
- * an offset within the document for which context information
- * should be computed
- * @return an array of context information objects or <code>null</code>
- * if no context could be found
- */
- public org.eclipse.jface.text.contentassist.IContextInformation[] computeContextInformation(org.eclipse.jface.text.ITextViewer viewer, int documentOffset) {
- return null;
- }
-
- /**
- * Returns the characters which when entered by the user should
- * automatically trigger the presentation of possible completions.
- *
- * @return the auto activation characters for completion proposal or
- * <code>null</code> if no auto activation is desired
- */
- public char[] getCompletionProposalAutoActivationCharacters() {
- return null;
- }
-
- /**
- * Returns the characters which when entered by the user should
- * automatically trigger the presentation of context information.
- *
- * @return the auto activation characters for presenting context
- * information or <code>null</code> if no auto activation is
- * desired
- */
- public char[] getContextInformationAutoActivationCharacters() {
- return null;
- }
-
- /**
- * Returns a validator used to determine when displayed context
- * information should be dismissed. May only return <code>null</code> if
- * the processor is incapable of computing context information.
- *
- * @return a context information validator, or <code>null</code> if the
- * processor is incapable of computing context information
- */
- public org.eclipse.jface.text.contentassist.IContextInformationValidator getContextInformationValidator() {
- return null;
- }
-
- /**
- * Return the reason why computeProposals was not able to find any
- * completions.
- *
- * @return an error message or null if no error occurred
- */
- public String getErrorMessage() {
- return null;
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/05/22
- * 10:37:05)
- *
- * @param offset
- * int
- */
- public void setDocumentOffset(int offset) {
- fDocumentOffset = offset;
- }
-
- /**
- *
- * @param quote
- * char
- */
- public void setQuoteCharOfStyleAttribute(char quote) {
- fQuote = quote;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalArranger.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalArranger.java
deleted file mode 100644
index 854e87d1ca..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalArranger.java
+++ /dev/null
@@ -1,169 +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.css.ui.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.css.core.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPageRule;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.document.ICSSStyleSheet;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.w3c.dom.css.CSSFontFaceRule;
-
-class CSSProposalArranger {
-
- private List fProposals = new ArrayList();
- private CSSContentAssistContext fContext = null;
-
- /**
- * CSSProposalArranger constructor comment.
- */
- private CSSProposalArranger() {
- super();
- }
-
- /**
- * CSSProposalArranger constructor comment.
- */
- CSSProposalArranger(int documentPosition, ICSSNode node, int documentOffset, char quote) {
- super();
- fContext = new CSSContentAssistContext(documentPosition, node, documentOffset, quote);
- }
-
- /**
- *
- */
- void buildProposals() {
- fProposals.clear();
-
- /*
- * String text; ICompletionProposal item; text = "---- Test
- * Information ----"; item = new CompletionProposal("",
- * fContext.getReplaceBegin(), 0, 0, null, text, null, null);
- * fProposals.add(item);
- *
- * text = "Target: \"" + fContext.getRegionText() + "\"";
- *
- * item = new CompletionProposal("", fContext.getReplaceBegin(), 0, 0,
- * null, text, null, null); fProposals.add(item);
- *
- * text = fContext.getTargetNode().getClass().toString(); int
- * lastPeriodPos = text.lastIndexOf('.'); text = "Node: " +
- * text.substring(lastPeriodPos + 1); item = new
- * CompletionProposal("", fContext.getReplaceBegin(), 0, 0, null,
- * text, null, null); fProposals.add(item);
- */
-
- ICSSNode targetNode = fContext.getTargetNode();
- //int targetPos = fContext.getTargetPos();
- if (targetNode instanceof ICSSStyleSheet) {
- buildProposalsForAnyRule();
- } else if ((targetNode instanceof ICSSMediaRule && fContext.isTargetPosAfterOf(CSSRegionContexts.CSS_LBRACE)) || (targetNode instanceof ICSSStyleRule && fContext.isTargetPosBeforeOf(CSSRegionContexts.CSS_LBRACE))) {
- buildProposalsForAnyRule();
- // buildProposalsForStyleRule();
- } else if ((targetNode instanceof ICSSPageRule && fContext.isTargetPosBeforeOf(CSSRegionContexts.CSS_LBRACE))) {
- buildProposalsForPageRulePseudoClass();
- } else if ((targetNode instanceof ICSSStyleRule || targetNode instanceof CSSFontFaceRule || targetNode instanceof ICSSPageRule || targetNode instanceof ICSSStyleDeclaration) && (targetNode.getOwnerDocument() instanceof ICSSStyleDeclaration || fContext.targetFollows(CSSRegionContexts.CSS_DECLARATION_DELIMITER) || fContext.targetFollows(CSSRegionContexts.CSS_LBRACE))) {
- buildProposalsForDeclarationName();
- } else if (targetNode instanceof ICSSStyleDeclItem) {
- if (fContext.isTargetPosAfterOf(CSSRegionContexts.CSS_DECLARATION_SEPARATOR)) {
- buildProposalsForDeclarationValue();
- } else {
- buildProposalsForDeclarationName();
- }
- } else if (targetNode instanceof ICSSPrimitiveValue) {
- buildProposalsForDeclarationValue();
- }
- /*
- * else if (targetNode instanceof ICSSPrimitiveValue || ((targetNode
- * instanceof ICSSStyleRule || targetNode instanceof CSSFontFaceRule ||
- * targetNode instanceof ICSSStyleDeclaration || targetNode instanceof
- * ICSSStyleDeclItem) &&
- * fContext.isTargetPosAfterOf(CSSRegionContexts.COLON))) {
- * buildProposalsForDeclarationValue(); }
- */
-
- // for Test
- }
-
- /**
- *
- */
- void buildProposalsForAnyRule() {
- CSSProposalGenerator generator;
- generator = new CSSProposalGeneratorForAtmarkRule(fContext);
- fProposals.addAll(generator.getProposals());
- generator = new CSSProposalGeneratorForHTMLTag(fContext);
- fProposals.addAll(generator.getProposals());
- generator = new CSSProposalGeneratorForPseudoSelector(fContext);
- fProposals.addAll(generator.getProposals());
- }
-
- /**
- *
- */
- void buildProposalsForDeclarationName() {
- CSSProposalGenerator generator;
- generator = new CSSProposalGeneratorForDeclarationName(fContext);
- fProposals.addAll(generator.getProposals());
- }
-
- /**
- *
- */
- void buildProposalsForDeclarationValue() {
- CSSProposalGenerator generator;
- generator = new CSSProposalGeneratorForDeclarationValue(fContext);
- fProposals.addAll(generator.getProposals());
- }
-
- /**
- *
- */
- void buildProposalsForPageRulePseudoClass() {
- CSSProposalGenerator generator;
- generator = new CSSProposalGeneratorForPseudoSelector(fContext);
- fProposals.addAll(generator.getProposals());
- }
-
- /**
- *
- */
- void buildProposalsForStyleRule() {
- CSSProposalGenerator generator;
- generator = new CSSProposalGeneratorForHTMLTag(fContext);
- fProposals.addAll(generator.getProposals());
- generator = new CSSProposalGeneratorForPseudoSelector(fContext);
- fProposals.addAll(generator.getProposals());
- }
-
- /**
- *
- */
- ICompletionProposal[] getProposals() {
- buildProposals();
- ICompletionProposal[] proposalArray = new CompletionProposal[fProposals.size()];
- Iterator iItem = fProposals.iterator();
- for (int i = 0; iItem.hasNext(); i++) {
- proposalArray[i] = (ICompletionProposal) iItem.next();
- }
- return proposalArray;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGenerator.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGenerator.java
deleted file mode 100644
index 483645adfe..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGenerator.java
+++ /dev/null
@@ -1,209 +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.css.ui.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.css.ui.image.CSSImageHelper;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-abstract class CSSProposalGenerator {
-
-
- protected class StringAndOffset {
- StringAndOffset(String string, int offset) {
- this.fString = string;
- this.fOffset = offset;
- }
-
- String fString;
- int fOffset;
- }
-
- protected CSSContentAssistContext fContext = null;
-
- /**
- * CSSProposalGenerator constructor comment.
- */
- private CSSProposalGenerator() {
- super();
- }
-
- CSSProposalGenerator(CSSContentAssistContext context) {
- super();
- fContext = context;
- }
-
- /**
- *
- */
- protected boolean checkLeadingColon() {
- boolean hasLeadingColon = false;
- ITextRegion targetRegion = fContext.getTargetRegion();
- if (targetRegion == null && 0 < fContext.getCursorPos()) {
- targetRegion = fContext.getRegionByOffset(fContext.getCursorPos() - 1);
- if (targetRegion != null && targetRegion.getType() == CSSRegionContexts.CSS_SELECTOR_PSEUDO) {
- hasLeadingColon = true;
- }
- } else if (targetRegion != null) {
- RegionIterator iterator = fContext.getRegionIterator();
- if (iterator.hasPrev()) {
- iterator.prev();
- if (iterator.hasPrev() && iterator.prev().getType() == CSSRegionContexts.CSS_SELECTOR_PSEUDO) {
- hasLeadingColon = true;
- }
- }
- }
- return hasLeadingColon;
- }
-
- /**
- *
- */
- protected StringAndOffset generateBraces() {
- StringBuffer buf = new StringBuffer();
- String lineDelimiter = fContext.getStructuredDocument().getLineDelimiter();
- CSSPreferenceHelper prefs = CSSPreferenceHelper.getInstance();
- String indentStr = prefs.getIndentString();
- if (prefs.isNewLineOnOpenBrace()) {
- buf.append(lineDelimiter);
- }
- buf.append("{");//$NON-NLS-1$
- if (prefs.isOnePropertyPerLine()) {
- buf.append(lineDelimiter);
- buf.append(indentStr);
- } else {
- buf.append(" ");//$NON-NLS-1$
- }
- int offset = buf.length();
- if (prefs.isOnePropertyPerLine()) {
- buf.append(lineDelimiter);
- } else {
- buf.append(" ");//$NON-NLS-1$
- }
- buf.append("}");//$NON-NLS-1$
- return new StringAndOffset(buf.toString(), offset);
- }
-
- /**
- *
- */
- protected StringAndOffset generateParenthesis() {
- StringBuffer buf = new StringBuffer();
- int offset;
- buf.append("(");//$NON-NLS-1$
- offset = 1;
- buf.append(")");//$NON-NLS-1$
- return new StringAndOffset(buf.toString(), offset);
- }
-
- /**
- *
- */
- protected StringAndOffset generateQuotes() {
- StringBuffer buf = new StringBuffer();
- char quoteChar = getQuoteChar();
- buf.append(quoteChar);
- buf.append(quoteChar);
- return new StringAndOffset(buf.toString(), 1);
- }
-
- /**
- *
- */
- protected StringAndOffset generateSemicolon() {
- StringBuffer buf = new StringBuffer();
- int offset;
- buf.append(";");//$NON-NLS-1$
- offset = 0;
- return new StringAndOffset(buf.toString(), offset);
- }
-
- /**
- *
- */
- protected StringAndOffset generateURI() {
- StringBuffer buf = new StringBuffer();
- CSSPreferenceHelper prefs = CSSPreferenceHelper.getInstance();
- char quoteChar = getQuoteChar();
- buf.append("url(");//$NON-NLS-1$
- if (prefs.isQuoteInURI()) {
- buf.append(quoteChar);
- }
- int offset = buf.length();
- if (prefs.isQuoteInURI()) {
- buf.append(quoteChar);
- }
- buf.append(")");//$NON-NLS-1$
- return new StringAndOffset(buf.toString(), offset);
- }
-
- abstract protected Iterator getCandidates();
-
- List getProposals() {
- List proposals = new ArrayList();
-
- CSSImageHelper imageHelper = CSSImageHelper.getInstance();
- Iterator i = getCandidates();
- while (i.hasNext()) {
- CSSCACandidate candidate = (CSSCACandidate) i.next();
- Image image = imageHelper.getImage(candidate.getImageType());
- ICompletionProposal item = new CompletionProposal(candidate.getReplacementString(), fContext.getReplaceBegin() + fContext.getDocumentOffset(), fContext.getTextToReplace().length(), candidate.getCursorPosition(), image, candidate.getDisplayString(), null, null);
- proposals.add(item);
- }
-
- return proposals;
- }
-
- /**
- *
- * @return char
- */
- private char getQuoteChar() {
- CSSPreferenceHelper prefs = CSSPreferenceHelper.getInstance();
- String quoteStr = prefs.getQuoteString(fContext.getModel());
- char quoteChar = (quoteStr != null && 0 < quoteStr.length()) ? quoteStr.charAt(0) : '"';
- char attrQuote = fContext.getQuoteOfStyleAttribute();
- if (attrQuote != 0) {
- if (attrQuote == '"' && quoteChar == '"') {
- quoteChar = '\'';
- } else if (attrQuote == '\'' && quoteChar == '\'') {
- quoteChar = '"';
- }
- }
- return quoteChar;
- }
-
- /**
- *
- */
- protected boolean isMatch(String text) {
- String textToCompare = fContext.getTextToCompare();
- if (textToCompare.length() == 0) {
- return true;
- } else {
- return (text.toUpperCase().indexOf(textToCompare.toUpperCase()) == 0);
- }
- /*
- * String textToReplace = fContext.getTextToReplace(); if
- * (textToReplace.length() == 0) { return true; } else { return
- * (text.toUpperCase().indexOf(textToReplace.toUpperCase()) == 0); }
- */
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForAtmarkRule.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForAtmarkRule.java
deleted file mode 100644
index 1539037d77..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForAtmarkRule.java
+++ /dev/null
@@ -1,293 +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.css.ui.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSImportRule;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelUtil;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.SelectionCollector;
-import org.eclipse.wst.css.ui.image.CSSImageType;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-class CSSProposalGeneratorForAtmarkRule extends CSSProposalGenerator {
-
- private boolean fUseUpperCase = false;
- private static final String CHARSET = "@charset";//$NON-NLS-1$
- private static final String FONT_FACE = "@font-face";//$NON-NLS-1$
- private static final String IMPORT = "@import";//$NON-NLS-1$
- private static final String MEDIA = "@media";//$NON-NLS-1$
- private static final String PAGE = "@page";//$NON-NLS-1$
-
- /**
- * CSSAtmarkRuleProposalGenerator constructor comment.
- *
- * @param context
- * com.ibm.sed.contentassist.old.css.CSSContentAssistContext
- */
- CSSProposalGeneratorForAtmarkRule(CSSContentAssistContext context) {
- super(context);
- fUseUpperCase = CSSPreferenceHelper.getInstance().isIdentUpperCase();
- }
-
- /**
- *
- */
- private CSSCACandidate getCandidateCharsetRule() {
- // check content model
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- if (!util.collectNodesByType(CSSMMNode.TYPE_CHARSET_RULE).hasNext()) {
- return null;
- }
-
- // check if embedded or not
- if (fContext.getModel().getStyleSheetType() == ICSSModel.EMBEDDED) {
- return null;
- }
-
- // check if caret precede all other rules.
- int offset = fContext.getCursorPos();
- if (0 < offset) {
- SelectionCollector trav = new SelectionCollector();
- trav.setRegion(0, offset - 1);
- trav.apply(fContext.getModel().getDocument());
- Iterator i = trav.getSelectedNodes().iterator();
- while (i.hasNext()) {
- Object obj = i.next();
- if (obj instanceof ICSSNode && !(obj instanceof ICSSDocument)) {
- return null;
- }
- }
- }
-
- int cursorPos = 0;
- String ident = (fUseUpperCase) ? CHARSET.toUpperCase() : CHARSET.toLowerCase();
- StringBuffer buf = new StringBuffer();
- buf.append(ident);
- buf.append(" ");//$NON-NLS-1$
- cursorPos = buf.length();
- StringAndOffset sao;
- sao = generateQuotes();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
- sao = generateSemicolon();
- buf.append(sao.fString);
-
- String text = buf.toString();
-
- if (isMatch(text)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(text);
- item.setCursorPosition(cursorPos);
- item.setDisplayString(ident);
- item.setImageType(CSSImageType.RULE_CHARSET);
- return item;
- } else {
- return null;
- }
- }
-
- /**
- *
- */
- private CSSCACandidate getCandidateFontFaceRule() {
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- if (!util.collectNodesByType(CSSMMNode.TYPE_FONT_FACE_RULE).hasNext()) {
- return null;
- }
-
- int cursorPos = 0;
- String ident = (fUseUpperCase) ? FONT_FACE.toUpperCase() : FONT_FACE.toLowerCase();
- StringBuffer buf = new StringBuffer();
- buf.append(ident);
- buf.append(" ");//$NON-NLS-1$
- cursorPos = buf.length();
- StringAndOffset sao;
- sao = generateBraces();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
-
- String text = buf.toString();
-
- if (isMatch(text)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(ident);
- item.setImageType(CSSImageType.RULE_FONTFACE);
- return item;
- } else {
- return null;
- }
- }
-
- /**
- *
- */
- private CSSCACandidate getCandidateImportRule() {
- // check content model
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- if (!util.collectNodesByType(CSSMMNode.TYPE_IMPORT_RULE).hasNext()) {
- return null;
- }
-
- // charset and import can precede import rule.
- int offset = fContext.getCursorPos();
- if (0 < offset) {
- SelectionCollector trav = new SelectionCollector();
- trav.setRegion(0, offset - 1);
- trav.apply(fContext.getModel().getDocument());
- Iterator i = trav.getSelectedNodes().iterator();
- while (i.hasNext()) {
- Object obj = i.next();
- if (obj instanceof ICSSNode && !(obj instanceof ICSSDocument || obj instanceof ICSSCharsetRule || obj instanceof ICSSImportRule)) {
- return null;
- }
- }
- }
-
- int cursorPos = 0;
- String ident = (fUseUpperCase) ? IMPORT.toUpperCase() : IMPORT.toLowerCase();
- StringBuffer buf = new StringBuffer();
- buf.append(ident);
- buf.append(" ");//$NON-NLS-1$
- cursorPos = buf.length();
- StringAndOffset sao;
- sao = generateURI();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
- sao = generateSemicolon();
- buf.append(sao.fString);
-
- String text = buf.toString();
-
- if (isMatch(text)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(ident);
- item.setImageType(CSSImageType.RULE_IMPORT);
- return item;
- } else {
- return null;
- }
- }
-
- /**
- *
- */
- private CSSCACandidate getCandidateMediaRule() {
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- if (!util.collectNodesByType(CSSMMNode.TYPE_MEDIA_RULE).hasNext()) {
- return null;
- }
-
- int cursorPos = 0;
- String ident = (fUseUpperCase) ? MEDIA.toUpperCase() : MEDIA.toLowerCase();
- StringBuffer buf = new StringBuffer();
- buf.append(ident);
- buf.append(" ");//$NON-NLS-1$
- cursorPos = buf.length() - 1;
- StringAndOffset sao;
- sao = generateBraces();
- buf.append(sao.fString);
-
- String text = buf.toString();
-
- if (isMatch(text)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(ident);
- item.setImageType(CSSImageType.RULE_MEDIA);
- return item;
- } else {
- return null;
- }
- }
-
- /**
- *
- */
- private CSSCACandidate getCandidatePageRule() {
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- if (!util.collectNodesByType(CSSMMNode.TYPE_PAGE_RULE).hasNext()) {
- return null;
- }
-
- int cursorPos = 0;
- String ident = (fUseUpperCase) ? PAGE.toUpperCase() : PAGE.toLowerCase();
- StringBuffer buf = new StringBuffer();
- buf.append(ident);
- buf.append(" ");//$NON-NLS-1$
- cursorPos = buf.length();
- StringAndOffset sao;
- sao = generateBraces();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
-
- String text = buf.toString();
-
- if (isMatch(text)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(ident);
- item.setImageType(CSSImageType.RULE_PAGE);
- return item;
- } else {
- return null;
- }
- }
-
- /**
- * getCandidates method comment.
- */
- protected Iterator getCandidates() {
- List candidates = new ArrayList();
-
- ITextRegion region = fContext.getTargetRegionPrevious();
- // ITextRegion region = fContext.getSignificantTargetRegion();
- if (region != null) {
- String type = region.getType();
- if (type != CSSRegionContexts.CSS_RBRACE && type != CSSRegionContexts.CSS_DELIMITER) {
- return candidates.iterator();
- }
- }
-
- CSSCACandidate item;
- if ((item = getCandidateImportRule()) != null) {
- candidates.add(item);
- }
- if ((item = getCandidateCharsetRule()) != null) {
- candidates.add(item);
- }
- if ((item = getCandidateMediaRule()) != null) {
- candidates.add(item);
- }
- if ((item = getCandidatePageRule()) != null) {
- candidates.add(item);
- }
- if ((item = getCandidateFontFaceRule()) != null) {
- candidates.add(item);
- }
- return candidates.iterator();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForDeclarationName.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForDeclarationName.java
deleted file mode 100644
index 6bf20406c4..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForDeclarationName.java
+++ /dev/null
@@ -1,171 +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.css.ui.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelUtil;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.ui.image.CSSImageType;
-import org.eclipse.wst.css.ui.preferences.CSSPreferenceManager;
-
-class CSSProposalGeneratorForDeclarationName extends CSSProposalGenerator {
-
- /**
- * CSSProposalGeneratorForDeclaration constructor comment.
- *
- * @param context
- * com.ibm.sed.contentassist.old.css.CSSContentAssistContext
- */
- CSSProposalGeneratorForDeclarationName(CSSContentAssistContext context) {
- super(context);
- }
-
- /**
- * getCandidates method comment.
- */
- protected Iterator getCandidates() {
- List candidates = new ArrayList();
-
- CSSPreferenceHelper prefs = CSSPreferenceHelper.getInstance();
- String preDelim = "";//$NON-NLS-1$
- for (int i = 0; i < prefs.getSpacesPreDelimiter(); i++) {
- preDelim += ' ';//$NON-NLS-1$
- }
- String postDelim = "";//$NON-NLS-1$
- for (int i = 0; i < prefs.getSpacesPostDelimiter(); i++) {
- postDelim += ' ';//$NON-NLS-1$
- }
-
- ICSSNode targetNode = fContext.getTargetNode();
- boolean bFontRule = false;
- for (ICSSNode node = targetNode; node != null; node = node.getParentNode()) {
- if (node instanceof org.w3c.dom.css.CSSFontFaceRule) {
- bFontRule = true;
- break;
- }
- }
-
- List names = new ArrayList();
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- Iterator iNames = util.collectNodesByType((bFontRule) ? CSSMMNode.TYPE_DESCRIPTOR : CSSMMNode.TYPE_PROPERTY);
- while (iNames.hasNext()) {
- CSSMMNode node = (CSSMMNode) iNames.next();
- names.add(node);
- }
- sortNames(names);
- //Collections.sort(names);
-
- boolean bAddColon = true;
- if (targetNode instanceof ICSSStyleDeclItem && fContext.targetHas(CSSRegionContexts.CSS_DECLARATION_SEPARATOR)) {
- bAddColon = false;
- }
-
- Iterator i = names.iterator();
- while (i.hasNext()) {
- CSSMMNode node = (CSSMMNode) i.next();
- String text = node.getName();
- text = (prefs.isPropNameUpperCase()) ? text.toUpperCase() : text.toLowerCase();
- if (!isMatch(text)) {
- continue;
- }
-
- int cursorPos = 0;
- StringBuffer buf = new StringBuffer();
- buf.append(text);
- buf.append(preDelim);
- cursorPos = buf.length();
- if (bAddColon) {
- buf.append(':');//$NON-NLS-1$
- buf.append(postDelim);
- cursorPos += 1 + postDelim.length();
- }
- // if (! (targetNode instanceof ICSSStyleDeclItem)) {
- // buf.append(';');//$NON-NLS-1$
- // }
-
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(text);
- item.setImageType(getCategoryImageType(node));
- candidates.add(item);
- }
-
- return candidates.iterator();
- }
-
- void sortNames(List names) {
- CSSPreferenceManager prefMan = CSSPreferenceManager.getInstance();
- final boolean categorize = prefMan.getContentAssistCategorize();
-
- Collections.sort(names, new Comparator() {
- public int compare(Object o1, Object o2) {
- CSSMMNode node1 = (CSSMMNode) o1;
- CSSMMNode node2 = (CSSMMNode) o2;
- if (node1 == null) {
- return 1;
- } else if (node2 == null) {
- return -1;
- }
- int diff = 0;
- if (categorize) {
- String category1 = node1.getAttribute("category"); //$NON-NLS-1$
- String category2 = node2.getAttribute("category"); //$NON-NLS-1$
- if (category1 == null) {
- if (category2 == null) {
- diff = 0;
- } else {
- return 1;
- }
- } else if (category2 == null) {
- return -1;
- } else {
- diff = category1.compareTo(category2);
- }
- }
- if (diff == 0) {
- String name = node1.getName();
- if (name == null) {
- return 1;
- } else {
- return name.compareTo(node2.getName());
- }
- } else {
- return diff;
- }
- }
- });
- }
-
- /*
- * retrieve default category icon name TODO: if node has "icon"(?), use
- * it.
- */
- CSSImageType getCategoryImageType(CSSMMNode node) {
- CSSImageType imageType = null;
- if (node != null) {
- String category = node.getAttribute("category"); //$NON-NLS-1$
- if (category != null) {
- imageType = CSSImageType.getImageType(category);
- }
- }
- return (imageType == null) ? CSSImageType.CATEGORY_DEFAULT : imageType;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForDeclarationValue.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForDeclarationValue.java
deleted file mode 100644
index f80c0f9575..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForDeclarationValue.java
+++ /dev/null
@@ -1,370 +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.css.ui.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.metamodel.CSSMMDescriptor;
-import org.eclipse.wst.css.core.metamodel.CSSMMFunction;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMNumber;
-import org.eclipse.wst.css.core.metamodel.CSSMMProperty;
-import org.eclipse.wst.css.core.metamodel.CSSMMUnit;
-import org.eclipse.wst.css.core.metamodel.util.CSSFunctionID;
-import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelUtil;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.core.util.CSSUtil;
-import org.eclipse.wst.css.core.util.RegionIterator;
-import org.eclipse.wst.css.ui.image.CSSImageType;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.w3c.dom.css.CSSFontFaceRule;
-
-class CSSProposalGeneratorForDeclarationValue extends CSSProposalGenerator {
-
- private static final String IMPORTANT = "!important"; //$NON-NLS-1$
- private boolean fUseUpperCase;
- private boolean fAppendSemiColon;
-
- /**
- * CSSProposalGeneratorForDeclarationValue constructor comment.
- *
- * @param context
- * com.ibm.sed.contentassist.old.css.CSSContentAssistContext
- */
- CSSProposalGeneratorForDeclarationValue(CSSContentAssistContext context) {
- super(context);
- fUseUpperCase = CSSPreferenceHelper.getInstance().isPropValueUpperCase();
- }
-
- /**
- *
- */
- private void addFunction(List candidates, CSSMMFunction prop) {
- String text = prop.toString();
- if (!isMatch(text)) {
- return;
- }
-
- int cursorPos = 0;
- StringBuffer buf = new StringBuffer();
- if (prop.getName().equals(CSSFunctionID.F_URI)) {
- StringAndOffset sao = generateURI();
- buf.append(sao.fString);
- cursorPos = sao.fOffset;
- } else {
- buf.append(prop.toString());
- cursorPos = buf.length();
- StringAndOffset sao = generateParenthesis();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
- }
-
- text = buf.toString();
- text = (fUseUpperCase) ? text.toUpperCase() : text.toLowerCase();
-
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(text);
- item.setCursorPosition(cursorPos);
- item.setDisplayString(text);
- item.setImageType(CSSImageType.VALUE_FUNCTION);
- appendSemiColon(item);
- candidates.add(item);
- }
-
- /**
- *
- */
- private void addNumber(List candidates, CSSMMNumber prop) {
- String fullText = fContext.getTextToReplace();
- // skip number
- int unitIndex = -1;
- for (int i = 0; i < fullText.length(); i++) {
- if (Character.isDigit(fullText.charAt(i))) {
- unitIndex = i + 1;
- } else {
- break;
- }
- }
-
- String unitSubText = ""; //$NON-NLS-1$
- String numSubText = ""; //$NON-NLS-1$
- if (0 <= unitIndex) {
- numSubText = fullText.substring(0, unitIndex);
- if (unitIndex < fullText.length()) {
- unitSubText = fullText.substring(unitIndex);
- }
- } else {
- unitSubText = fullText;
- }
-
- Iterator i = prop.getDescendants();
- while (i.hasNext()) {
- CSSMMUnit unit = (CSSMMUnit) i.next();
- String unitString = unit.getUnitString();
- if ((0 < unitSubText.length() && unitString.indexOf(unitSubText) != 0) || (0 < numSubText.length() && unitString.equals("#"))) { //$NON-NLS-1$
- continue;
- }
-
- String text = numSubText + unitString;
- text = (fUseUpperCase) ? text.toUpperCase() : text.toLowerCase();
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(text);
- if (0 < numSubText.length() || text.equals("#")) { //$NON-NLS-1$
- item.setCursorPosition(text.length());
- } else {
- item.setCursorPosition(0);
- }
- item.setDisplayString(text);
- item.setImageType(CSSImageType.VALUE_NUMBER);
- appendSemiColon(item);
- candidates.add(item);
- }
- }
-
- /**
- *
- */
- private void checkSemiColon() {
- fAppendSemiColon = false;
-
- ITextRegion targetRegion = fContext.getTargetRegion();
- if (targetRegion != null && targetRegion.getType() != CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- // find trailing ":" or ";"
- // if ":" before ";" is found, add ";"
- RegionIterator iterator = fContext.getRegionIterator();
- IStructuredDocumentRegion container = iterator.getStructuredDocumentRegion();
- while (iterator.hasNext()) {
- ITextRegion region = iterator.next();
- if (iterator.getStructuredDocumentRegion() != container) {
- break;
- }
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- fAppendSemiColon = true;
- break;
- }
- }
- if (!fAppendSemiColon) {
- // second chance:
- // leading IStructuredDocumentRegion is not ";"
- IStructuredDocumentRegion nextStructuredDocumentRegion = CSSUtil.findNextSignificantNode(container);
- if (CSSUtil.getStructuredDocumentRegionType(nextStructuredDocumentRegion) != CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- fAppendSemiColon = true;
- }
- }
- }
- }
-
- /**
- *
- */
- private void appendSemiColon(CSSCACandidate item) {
- if (fAppendSemiColon) {
- String replacementString = item.getReplacementString();
- item.setReplacementString(replacementString + ";"); //$NON-NLS-1$
- int cursorPosition = item.getCursorPosition();
- if (replacementString.length() <= cursorPosition) {
- // cursorpos is tail of string
- cursorPosition++;
- item.setCursorPosition(cursorPosition);
- }
- }
- }
-
- /**
- *
- */
- private void addSemiColon(List candidates) {
- ICSSNode targetNode = fContext.getTargetNode();
- if (targetNode instanceof ICSSStyleDeclItem) {
- ICSSNode firstChild = targetNode.getFirstChild();
- if (firstChild == null) {
- return;
- }
- if (firstChild instanceof IndexedRegion) {
- int startOffset = ((IndexedRegion) firstChild).getStartOffset();
- if (fContext.getCursorPos() <= startOffset) {
- return;
- }
- }
- }
-
- boolean bAddCloser = false;
-
- ITextRegion targetRegion = fContext.getTargetRegion();
- if (targetRegion != null && targetRegion.getType() != CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- // find trailing ":" or ";"
- // if ":" before ";" is found, add ";"
- RegionIterator iterator = fContext.getRegionIterator();
- IStructuredDocumentRegion container = iterator.getStructuredDocumentRegion();
- while (iterator.hasNext()) {
- ITextRegion region = iterator.next();
- if (iterator.getStructuredDocumentRegion() != container) {
- break;
- }
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- bAddCloser = true;
- break;
- }
- }
- if (!bAddCloser) {
- // second chance:
- // leading IStructuredDocumentRegion is not ";"
- IStructuredDocumentRegion nextStructuredDocumentRegion = CSSUtil.findNextSignificantNode(container);
- if (CSSUtil.getStructuredDocumentRegionType(nextStructuredDocumentRegion) != CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- bAddCloser = true;
- }
- }
- }
-
- if (bAddCloser) {
- CSSCACandidate item = new CSSCACandidate();
- String text = fContext.getTextToReplace() + ";";//$NON-NLS-1$
- item.setReplacementString(text);
- item.setCursorPosition(text.length());
- item.setDisplayString(";");//$NON-NLS-1$
- item.setImageType(null);
- candidates.add(item);
- }
- }
-
- /**
- *
- */
- private void addString(List candidates, String text) {
- if (!isMatch(text)) {
- return;
- }
-
- text = (fUseUpperCase) ? text.toUpperCase() : text.toLowerCase();
-
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(text);
- item.setCursorPosition(text.length());
- item.setDisplayString(text);
- item.setImageType(CSSImageType.VALUE_STRING);
- appendSemiColon(item);
- candidates.add(item);
- }
-
- private void addImportant(List candidates) {
- ICSSNode targetNode = fContext.getTargetNode();
- while (targetNode instanceof ICSSPrimitiveValue) {
- targetNode = targetNode.getParentNode();
- }
- if (!(targetNode instanceof ICSSStyleDeclItem)) {
- return;
- }
- // 1. has no priority region
- // 2. cursor position is after of last child
- // 3. normal isMatch method
- String priority = ((ICSSStyleDeclItem) targetNode).getPriority();
- if (priority == null || priority.length() == 0) {
- ICSSNode lastChild = targetNode.getLastChild();
- if (lastChild instanceof IndexedRegion) {
- int startOffset = ((IndexedRegion) lastChild).getStartOffset();
- // int endOffset = ((IndexedRegion)lastChild).getEndOffset();
- if (startOffset < fContext.getCursorPos() && isMatch(IMPORTANT)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(IMPORTANT);
- item.setCursorPosition(IMPORTANT.length());
- item.setDisplayString(IMPORTANT);
- item.setImageType(CSSImageType.VALUE_STRING);
- appendSemiColon(item);
- candidates.add(item);
- }
- }
- }
- }
-
- /**
- * getCandidates method comment.
- */
- protected Iterator getCandidates() {
- List candidates = new ArrayList();
-
- checkSemiColon(); // check should add semi-colon or not
-
- String name = getPropertyName();
- if (name != null) {
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- Iterator i = Collections.EMPTY_LIST.iterator();
- if (isFontFaceRule()) {
- CSSMMDescriptor desc = util.getDescriptor(name);
- if (desc != null) {
- i = desc.getValues();
- }
- } else {
- CSSMMProperty prop = util.getProperty(name);
- if (prop != null) {
- i = prop.getValues();
- }
- }
- while (i.hasNext()) {
- CSSMMNode val = (CSSMMNode) i.next();
- String valueType = val.getType();
- if (valueType == CSSMMNode.TYPE_KEYWORD) {
- addString(candidates, val.toString());
- } else if (valueType == CSSMMNode.TYPE_NUMBER) {
- addNumber(candidates, (CSSMMNumber) val);
- } else if (valueType == CSSMMNode.TYPE_FUNCTION) {
- addFunction(candidates, (CSSMMFunction) val);
- }
- }
- }
-
- addImportant(candidates);
- addSemiColon(candidates);
-
- return candidates.iterator();
- }
-
- /**
- * @return java.lang.String
- */
- private String getPropertyName() {
- ICSSNode targetNode = fContext.getTargetNode();
- while (targetNode instanceof ICSSPrimitiveValue) {
- targetNode = targetNode.getParentNode();
- }
- if (targetNode instanceof ICSSStyleDeclItem) {
- return ((ICSSStyleDeclItem) targetNode).getPropertyName();
- } else {
- return null;
- }
- }
-
- /**
- *
- */
- private boolean isFontFaceRule() {
- ICSSNode targetNode = fContext.getTargetNode();
- while (targetNode instanceof ICSSPrimitiveValue) {
- targetNode = targetNode.getParentNode();
- }
- if (targetNode instanceof ICSSStyleDeclItem) {
- targetNode = targetNode.getParentNode(); // get Declaration
- if (targetNode != null) {
- // inline style has no rule node
- targetNode = targetNode.getParentNode(); // get rule
- }
- }
- return (targetNode instanceof CSSFontFaceRule);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForHTMLTag.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForHTMLTag.java
deleted file mode 100644
index 02f250123c..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForHTMLTag.java
+++ /dev/null
@@ -1,157 +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.css.ui.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.ui.image.CSSImageType;
-import org.eclipse.wst.html.core.contentmodel.HTMLCMDocumentFactory;
-import org.eclipse.wst.sse.core.contentmodel.CMDocType;
-import org.eclipse.wst.xml.core.document.DocumentTypeAdapter;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-class CSSProposalGeneratorForHTMLTag extends CSSProposalGenerator {
-
- /**
- * CSSStyleRuleProposalGenerator constructor comment.
- *
- * @param context
- * com.ibm.sed.contentassist.old.css.CSSContentAssistContext
- */
- CSSProposalGeneratorForHTMLTag(CSSContentAssistContext context) {
- super(context);
-
- if (fHTMLTags == null) {
- fHTMLTags = setupHTMLTags();
- }
- }
-
- /**
- * getCandidates method comment.
- */
- protected Iterator getCandidates() {
- List candidates = new ArrayList();
-
- if (checkLeadingColon()) {
- return candidates.iterator();
- }
-
- // XHTML requires lower case
- boolean bLowerCase = false;
- if (fContext.getModel().getStyleSheetType() == ICSSModel.EMBEDDED) {
- Node domNode = fContext.getModel().getOwnerDOMNode();
- if (domNode != null && !(domNode instanceof Document)) {
- domNode = domNode.getOwnerDocument();
- if (domNode instanceof XMLDocument) {
- DocumentTypeAdapter adapter = (DocumentTypeAdapter) ((XMLDocument) domNode).getAdapterFor(DocumentTypeAdapter.class);
- if (adapter != null)
- bLowerCase = (adapter.getTagNameCase() == DocumentTypeAdapter.LOWER_CASE);
- }
- }
- }
-
-
- int length = fHTMLTags.length;
- for (int i = 0; i < length; i++) {
- String tagText = fHTMLTags[i];
- if (bLowerCase) {
- tagText = tagText.toLowerCase();
- }
- if (!isMatch(tagText)) {
- continue;
- }
-
- int cursorPos = 0;
- StringBuffer buf = new StringBuffer();
- buf.append(tagText);
- cursorPos += tagText.length();
- boolean inRule = (fContext.getTargetNode() instanceof ICSSStyleRule);
- if (!inRule || fContext.getTextToReplace().length() == 0) {
- buf.append(" ");//$NON-NLS-1$
- cursorPos += 1;
- }
- if (!inRule) {
- StringAndOffset sao = generateBraces();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
- }
-
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(tagText);
- item.setImageType(CSSImageType.SELECTOR_TAG);
- candidates.add(item);
- }
-
- return candidates.iterator();
- }
-
- /**
- *
- */
- private static String[] setupHTMLTags() {
- CMDocument cmdoc = HTMLCMDocumentFactory.getCMDocument(CMDocType.HTML_DOC_TYPE);
- CMNamedNodeMap elements = cmdoc.getElements();
- Vector names = new Vector();
- int nElements = elements.getLength();
- for (int i = 0; i < nElements; i++) {
- CMElementDeclaration edec = (CMElementDeclaration) elements.item(i);
- if (isAttrDefined(edec, HTML40Namespace.ATTR_NAME_STYLE)) {
- names.add(edec.getElementName());
- }
- }
- Collections.sort(names);
- String[] tags = new String[names.size()];
- Iterator iNames = names.iterator();
- for (int i = 0; iNames.hasNext(); i++) {
- tags[i] = (String) iNames.next();
- }
- return tags;
- }
-
- /**
- *
- */
- private static boolean isAttrDefined(CMElementDeclaration edec, String attrName) {
- if (edec == null) {
- return false;
- }
- CMNamedNodeMap attrs = edec.getAttributes();
- if (attrs == null) {
- return false;
- }
- for (int i = 0; i < attrs.getLength(); i++) {
- CMAttributeDeclaration attr = (CMAttributeDeclaration) attrs.item(i);
- if (attr == null) {
- continue;
- }
- if (attr.getAttrName().equalsIgnoreCase(attrName)) {
- return true;
- }
- }
- return false;
- }
-
- private static String[] fHTMLTags = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForPseudoSelector.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForPseudoSelector.java
deleted file mode 100644
index a9c92a5851..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForPseudoSelector.java
+++ /dev/null
@@ -1,157 +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.css.ui.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPageRule;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMMSelector;
-import org.eclipse.wst.css.core.metamodel.util.CSSMMTypeCollector;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
-import org.eclipse.wst.css.ui.image.CSSImageType;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-/**
- *
- */
-class CSSProposalGeneratorForPseudoSelector extends CSSProposalGenerator {
-
- /**
- * CSSProposalGeneratorForPseudoSelector constructor comment.
- *
- * @param context
- * com.ibm.sed.contentassist.old.css.CSSContentAssistContext
- */
- CSSProposalGeneratorForPseudoSelector(CSSContentAssistContext context) {
- super(context);
- }
-
- /**
- * getCandidates method comment.
- */
- protected Iterator getCandidates() {
- List candidates = new ArrayList();
-
- boolean hasLeadingColon = checkLeadingColon();
- String textToReplace = fContext.getTextToReplace();
- if (!hasLeadingColon && 0 < textToReplace.length() && !textToReplace.equals(fContext.getTextToCompare())) {
- // cursor placed midpoint of the region
- return candidates.iterator();
- }
- ITextRegion region = fContext.getTargetRegion();
- if (region != null) {
- String type = region.getType();
- if (type != CSSRegionContexts.CSS_S && !CSSRegionUtil.isSelectorBegginingType(type)) {
- return candidates.iterator();
- }
- }
-
- boolean useUpperCase = CSSPreferenceHelper.getInstance().isIdentUpperCase();
-
- List tags = getSelectorTags();
- Collections.sort(tags);
- Iterator i = tags.iterator();
- while (i.hasNext()) {
- String text = (String) i.next();
- if (hasLeadingColon && !isMatch(text)) {
- continue;
- }
- text = (useUpperCase) ? text.toUpperCase() : text.toLowerCase();
-
- int cursorPos = 0;
- StringBuffer buf = new StringBuffer();
- if (hasLeadingColon) {
- buf.append(text.substring(1));
- } else {
- buf.append(textToReplace);
- buf.append(text);
- }
- cursorPos += buf.length();
-
- if (0 < buf.length()) {
- boolean inRule = (fContext.getTargetNode() instanceof ICSSStyleRule || fContext.getTargetNode() instanceof ICSSPageRule);
- if (!inRule || (textToReplace.length() == 0 && !hasLeadingColon)) {
- buf.append(" ");//$NON-NLS-1$
- cursorPos += 1;
- }
- if (!inRule) {
- StringAndOffset sao = generateBraces();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
- }
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(text);
- item.setImageType(CSSImageType.SELECTOR_PSEUDO);
- candidates.add(item);
- }
- }
-
- return candidates.iterator();
- }
-
- /**
- *
- */
- List getSelectorTags() {
- List tagList = new ArrayList();
- ICSSNode targetNode = fContext.getTargetNode();
- String rootType = (targetNode instanceof ICSSPageRule) ? CSSMMNode.TYPE_PAGE_RULE : CSSMMNode.TYPE_STYLE_RULE;
-
- CSSMMTypeCollector collector = new CSSMMTypeCollector();
- collector.collectNestedType(false);
- collector.apply(fContext.getMetaModel(), rootType);
- Iterator i;
- i = collector.getNodes();
- if (!i.hasNext()) {
- return tagList;
- }
- CSSMMNode node = (CSSMMNode) i.next();
- i = node.getChildNodes();
- while (i.hasNext()) {
- CSSMMNode child = (CSSMMNode) i.next();
- if (child.getType() == CSSMMNode.TYPE_SELECTOR) {
- String selType = ((CSSMMSelector) child).getSelectorType();
- if (selType == CSSMMSelector.TYPE_PSEUDO_CLASS || selType == CSSMMSelector.TYPE_PSEUDO_ELEMENT) {
- tagList.add(((CSSMMSelector) child).getSelectorString());
- }
- }
- }
- return tagList;
- }
-
- /**
- *
- */
- protected boolean isMatch(String text) {
- if (!super.isMatch(text)) {
- ITextRegion region = fContext.getTargetRegion();
- if (region != null && region.getType() == CSSRegionContexts.CSS_SELECTOR_PSEUDO) {
- return true;
- } else {
- return false;
- }
- } else {
- return true;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/HTML40Namespace.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/HTML40Namespace.java
deleted file mode 100644
index 2d4ce3253b..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/HTML40Namespace.java
+++ /dev/null
@@ -1,889 +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.css.ui.contentassist;
-
-
-
-/**
- * Provide all names defined in the HTML 4.0? specification.
- */
-public interface HTML40Namespace {
-
- // Element names
- public static interface ElementName {
- public static final String A = "A"; //$NON-NLS-1$
- public static final String ABBR = "ABBR"; //$NON-NLS-1$
- public static final String ACRONYM = "ACRONYM"; //$NON-NLS-1$
- public static final String ADDRESS = "ADDRESS"; //$NON-NLS-1$
- public static final String APPLET = "APPLET"; //$NON-NLS-1$
- public static final String AREA = "AREA"; //$NON-NLS-1$
- public static final String B = "B"; //$NON-NLS-1$
- public static final String BASE = "BASE"; //$NON-NLS-1$
- public static final String BASEFONT = "BASEFONT"; //$NON-NLS-1$
- public static final String BDO = "BDO"; //$NON-NLS-1$
- public static final String BGSOUND = "BGSOUND"; // D205513
- // //$NON-NLS-1$
- public static final String BIG = "BIG"; //$NON-NLS-1$
- public static final String BLINK = "BLINK"; //$NON-NLS-1$
- public static final String BLOCKQUOTE = "BLOCKQUOTE"; //$NON-NLS-1$
- public static final String BODY = "BODY"; //$NON-NLS-1$
- public static final String BR = "BR"; //$NON-NLS-1$
- public static final String BUTTON = "BUTTON"; //$NON-NLS-1$
- public static final String CAPTION = "CAPTION"; //$NON-NLS-1$
- public static final String CENTER = "CENTER"; //$NON-NLS-1$
- public static final String CITE = "CITE"; //$NON-NLS-1$
- public static final String CODE = "CODE"; //$NON-NLS-1$
- public static final String COL = "COL"; //$NON-NLS-1$
- public static final String COLGROUP = "COLGROUP"; //$NON-NLS-1$
- public static final String DD = "DD"; //$NON-NLS-1$
- public static final String DEL = "DEL"; //$NON-NLS-1$
- public static final String DFN = "DFN"; //$NON-NLS-1$
- public static final String DIR = "DIR"; //$NON-NLS-1$
- public static final String DIV = "DIV"; //$NON-NLS-1$
- public static final String DL = "DL"; //$NON-NLS-1$
- public static final String DT = "DT"; //$NON-NLS-1$
- public static final String EM = "EM"; //$NON-NLS-1$
- public static final String EMBED = "EMBED"; //$NON-NLS-1$
- public static final String FIELDSET = "FIELDSET"; //$NON-NLS-1$
- public static final String FONT = "FONT"; //$NON-NLS-1$
- public static final String FORM = "FORM"; //$NON-NLS-1$
- public static final String FRAME = "FRAME"; //$NON-NLS-1$
- public static final String FRAMESET = "FRAMESET"; //$NON-NLS-1$
- public static final String H1 = "H1"; //$NON-NLS-1$
- public static final String H2 = "H2"; //$NON-NLS-1$
- public static final String H3 = "H3"; //$NON-NLS-1$
- public static final String H4 = "H4"; //$NON-NLS-1$
- public static final String H5 = "H5"; //$NON-NLS-1$
- public static final String H6 = "H6"; //$NON-NLS-1$
- public static final String HEAD = "HEAD"; //$NON-NLS-1$
- public static final String HR = "HR"; //$NON-NLS-1$
- public static final String HTML = "HTML"; //$NON-NLS-1$
- public static final String I = "I"; //$NON-NLS-1$
- public static final String IFRAME = "IFRAME"; //$NON-NLS-1$
- public static final String IMG = "IMG"; //$NON-NLS-1$
- public static final String INPUT = "INPUT"; //$NON-NLS-1$
- public static final String INS = "INS"; //$NON-NLS-1$
- public static final String ISINDEX = "ISINDEX"; //$NON-NLS-1$
- public static final String KBD = "KBD"; //$NON-NLS-1$
- public static final String LABEL = "LABEL"; //$NON-NLS-1$
- public static final String LEGEND = "LEGEND"; //$NON-NLS-1$
- public static final String LI = "LI"; //$NON-NLS-1$
- public static final String LINK = "LINK"; //$NON-NLS-1$
- public static final String MAP = "MAP"; //$NON-NLS-1$
- public static final String MENU = "MENU"; //$NON-NLS-1$
- public static final String META = "META"; //$NON-NLS-1$
- public static final String NOBR = "NOBR"; // D205513 //$NON-NLS-1$
- public static final String NOEMBED = "NOEMBED"; //$NON-NLS-1$
- public static final String NOFRAMES = "NOFRAMES"; //$NON-NLS-1$
- public static final String NOSCRIPT = "NOSCRIPT"; //$NON-NLS-1$
- public static final String OBJECT = "OBJECT"; //$NON-NLS-1$
- public static final String OL = "OL"; //$NON-NLS-1$
- public static final String OPTGROUP = "OPTGROUP"; //$NON-NLS-1$
- public static final String OPTION = "OPTION"; //$NON-NLS-1$
- public static final String P = "P"; //$NON-NLS-1$
- public static final String PARAM = "PARAM"; //$NON-NLS-1$
- public static final String PRE = "PRE"; //$NON-NLS-1$
- public static final String Q = "Q"; //$NON-NLS-1$
- public static final String S = "S"; //$NON-NLS-1$
- public static final String SAMP = "SAMP"; //$NON-NLS-1$
- public static final String SCRIPT = "SCRIPT"; //$NON-NLS-1$
- public static final String SELECT = "SELECT"; //$NON-NLS-1$
- public static final String SMALL = "SMALL"; //$NON-NLS-1$
- public static final String SPAN = "SPAN"; //$NON-NLS-1$
- public static final String STRIKE = "STRIKE"; //$NON-NLS-1$
- public static final String STRONG = "STRONG"; //$NON-NLS-1$
- public static final String STYLE = "STYLE"; //$NON-NLS-1$
- public static final String SUB = "SUB"; //$NON-NLS-1$
- public static final String SUP = "SUP"; //$NON-NLS-1$
- public static final String TABLE = "TABLE"; //$NON-NLS-1$
- public static final String TBODY = "TBODY"; //$NON-NLS-1$
- public static final String TD = "TD"; //$NON-NLS-1$
- public static final String TEXTAREA = "TEXTAREA"; //$NON-NLS-1$
- public static final String TFOOT = "TFOOT"; //$NON-NLS-1$
- public static final String TH = "TH"; //$NON-NLS-1$
- public static final String THEAD = "THEAD"; //$NON-NLS-1$
- public static final String TITLE = "TITLE"; //$NON-NLS-1$
- public static final String TR = "TR"; //$NON-NLS-1$
- public static final String TT = "TT"; //$NON-NLS-1$
- public static final String U = "U"; //$NON-NLS-1$
- public static final String UL = "UL"; //$NON-NLS-1$
- public static final String VAR = "VAR"; //$NON-NLS-1$
- public static final String WBR = "WBR"; // D205513 //$NON-NLS-1$
- public static final String MARQUEE = "MARQUEE"; //$NON-NLS-1$
- public static final String SSI_CONFIG = "SSI:CONFIG"; // D210393
- // //$NON-NLS-1$
- public static final String SSI_ECHO = "SSI:ECHO"; //$NON-NLS-1$
- public static final String SSI_EXEC = "SSI:EXEC"; //$NON-NLS-1$
- public static final String SSI_FSIZE = "SSI:FSIZE"; //$NON-NLS-1$
- public static final String SSI_FLASTMOD = "SSI:FLASTMOD"; //$NON-NLS-1$
- public static final String SSI_INCLUDE = "SSI:INCLUDE"; //$NON-NLS-1$
- public static final String SSI_PRINTENV = "SSI:PRINTENV"; //$NON-NLS-1$
- public static final String SSI_SET = "SSI:SET"; //$NON-NLS-1$
- public static final String WML_WML = "wml"; //$NON-NLS-1$
- public static final String WML_CARD = "card"; //$NON-NLS-1$
- public static final String WML_TEMPLATE = "template"; //$NON-NLS-1$
- public static final String WML_ACCESS = "access"; //$NON-NLS-1$
- public static final String WML_DO = "do"; //$NON-NLS-1$
- public static final String WML_ONEVENT = "onevent"; //$NON-NLS-1$
- public static final String WML_TIMER = "timer"; //$NON-NLS-1$
- public static final String WML_ANCHOR = "anchor"; //$NON-NLS-1$
- public static final String WML_PREV = "prev"; //$NON-NLS-1$
- public static final String WML_REFRESH = "refresh"; //$NON-NLS-1$
- public static final String WML_GO = "go"; //$NON-NLS-1$
- public static final String WML_NOOP = "noop"; //$NON-NLS-1$
- public static final String WML_SETVAR = "setvar"; //$NON-NLS-1$
- public static final String WML_POSTFIELD = "postfield"; //$NON-NLS-1$
- }
-
- // Character Entities
- public static interface EntityName {
- public static final String AACUTE_U = "Aacute"; //$NON-NLS-1$
- public static final String AACUTE_L = "aacute"; //$NON-NLS-1$
- public static final String ACIRC_U = "Acirc"; //$NON-NLS-1$
- public static final String ACIRC_L = "acirc"; //$NON-NLS-1$
- public static final String ACUTE = "acute"; //$NON-NLS-1$
- public static final String AELIG_U = "AElig"; //$NON-NLS-1$
- public static final String AELIG_L = "aelig"; //$NON-NLS-1$
- public static final String AGRAVE_U = "Agrave"; //$NON-NLS-1$
- public static final String AGRAVE_L = "agrave"; //$NON-NLS-1$
- public static final String ALEFSYM = "alefsym"; //$NON-NLS-1$
- public static final String ALPHA_U = "Alpha"; //$NON-NLS-1$
- public static final String ALPHA_L = "alpha"; //$NON-NLS-1$
- public static final String AMP = "amp"; //$NON-NLS-1$
- public static final String AND = "and"; //$NON-NLS-1$
- public static final String ANG = "ang"; //$NON-NLS-1$
- public static final String ARING_U = "Aring"; //$NON-NLS-1$
- public static final String ARING_L = "aring"; //$NON-NLS-1$
- public static final String ASYMP = "asymp"; //$NON-NLS-1$
- public static final String ATILDE_U = "Atilde"; //$NON-NLS-1$
- public static final String ATILDE_L = "atilde"; //$NON-NLS-1$
- public static final String AUML_U = "Auml"; //$NON-NLS-1$
- public static final String AUML_L = "auml"; //$NON-NLS-1$
- public static final String BDQUO = "bdquo"; //$NON-NLS-1$
- public static final String BETA_U = "Beta"; //$NON-NLS-1$
- public static final String BETA_L = "beta"; //$NON-NLS-1$
- public static final String BRVBAR = "brvbar"; //$NON-NLS-1$
- public static final String BULL = "bull"; //$NON-NLS-1$
- public static final String CAP = "cap"; //$NON-NLS-1$
- public static final String CCEDIL_U = "Ccedil"; //$NON-NLS-1$
- public static final String CCEDIL_L = "ccedil"; //$NON-NLS-1$
- public static final String CEDIL = "cedil"; //$NON-NLS-1$
- public static final String CENT = "cent"; //$NON-NLS-1$
- public static final String CHI_U = "Chi"; //$NON-NLS-1$
- public static final String CHI_L = "chi"; //$NON-NLS-1$
- public static final String CIRC = "circ"; //$NON-NLS-1$
- public static final String CLUBS = "clubs"; //$NON-NLS-1$
- public static final String CONG = "cong"; //$NON-NLS-1$
- public static final String COPY = "copy"; //$NON-NLS-1$
- public static final String CRARR = "crarr"; //$NON-NLS-1$
- public static final String CUP = "cup"; //$NON-NLS-1$
- public static final String CURREN = "curren"; //$NON-NLS-1$
- public static final String DAGGER_U = "Dagger"; //$NON-NLS-1$
- public static final String DAGGER_L = "dagger"; //$NON-NLS-1$
- public static final String DARR_U = "dArr"; //$NON-NLS-1$
- public static final String DARR_L = "darr"; //$NON-NLS-1$
- public static final String DEG = "deg"; //$NON-NLS-1$
- public static final String DELTA_U = "Delta"; //$NON-NLS-1$
- public static final String DELTA_L = "delta"; //$NON-NLS-1$
- public static final String DIAMS = "diams"; //$NON-NLS-1$
- public static final String DIVIDE = "divide"; //$NON-NLS-1$
- public static final String EACUTE_U = "Eacute"; //$NON-NLS-1$
- public static final String EACUTE_L = "eacute"; //$NON-NLS-1$
- public static final String ECIRC_U = "Ecirc"; //$NON-NLS-1$
- public static final String ECIRC_L = "ecirc"; //$NON-NLS-1$
- public static final String EGRAVE_U = "Egrave"; //$NON-NLS-1$
- public static final String EGRAVE_L = "egrave"; //$NON-NLS-1$
- public static final String EMPTY = "empty"; //$NON-NLS-1$
- public static final String EMSP = "emsp"; //$NON-NLS-1$
- public static final String ENSP = "ensp"; //$NON-NLS-1$
- public static final String EPSILON_U = "Epsilon"; //$NON-NLS-1$
- public static final String EPSILON_L = "epsilon"; //$NON-NLS-1$
- public static final String EQUIV = "equiv"; //$NON-NLS-1$
- public static final String ETA_U = "Eta"; //$NON-NLS-1$
- public static final String ETA_L = "eta"; //$NON-NLS-1$
- public static final String ETH_U = "ETH"; //$NON-NLS-1$
- public static final String ETH_L = "eth"; //$NON-NLS-1$
- public static final String EUML_U = "Euml"; //$NON-NLS-1$
- public static final String EUML_L = "euml"; //$NON-NLS-1$
- public static final String EURO = "euro"; //$NON-NLS-1$
- public static final String EXIST = "exist"; //$NON-NLS-1$
- public static final String FNOF = "fnof"; //$NON-NLS-1$
- public static final String FORALL = "forall"; //$NON-NLS-1$
- public static final String FRAC12 = "frac12"; //$NON-NLS-1$
- public static final String FRAC14 = "frac14"; //$NON-NLS-1$
- public static final String FRAC34 = "frac34"; //$NON-NLS-1$
- public static final String FRASL = "frasl"; //$NON-NLS-1$
- public static final String GAMMA_U = "Gamma"; //$NON-NLS-1$
- public static final String GAMMA_L = "gamma"; //$NON-NLS-1$
- public static final String GE = "ge"; //$NON-NLS-1$
- public static final String GT = "gt"; //$NON-NLS-1$
- public static final String HARR_U = "hArr"; //$NON-NLS-1$
- public static final String HARR_L = "harr"; //$NON-NLS-1$
- public static final String HEARTS = "hearts"; //$NON-NLS-1$
- public static final String HELLIP = "hellip"; //$NON-NLS-1$
- public static final String IACUTE_U = "Iacute"; //$NON-NLS-1$
- public static final String IACUTE_L = "iacute"; //$NON-NLS-1$
- public static final String ICIRC_U = "Icirc"; //$NON-NLS-1$
- public static final String ICIRC_L = "icirc"; //$NON-NLS-1$
- public static final String IEXCL = "iexcl"; //$NON-NLS-1$
- public static final String IGRAVE_U = "Igrave"; //$NON-NLS-1$
- public static final String IGRAVE_L = "igrave"; //$NON-NLS-1$
- public static final String IMAGE = "image"; //$NON-NLS-1$
- public static final String INFIN = "infin"; //$NON-NLS-1$
- public static final String INT = "int"; //$NON-NLS-1$
- public static final String IOTA_U = "Iota"; //$NON-NLS-1$
- public static final String IOTA_L = "iota"; //$NON-NLS-1$
- public static final String IQUEST = "iquest"; //$NON-NLS-1$
- public static final String ISIN = "isin"; //$NON-NLS-1$
- public static final String IUML_U = "Iuml"; //$NON-NLS-1$
- public static final String IUML_L = "iuml"; //$NON-NLS-1$
- public static final String KAPPA_U = "Kappa"; //$NON-NLS-1$
- public static final String KAPPA_L = "kappa"; //$NON-NLS-1$
- public static final String LAMBDA_U = "Lambda"; //$NON-NLS-1$
- public static final String LAMBDA_L = "lambda"; //$NON-NLS-1$
- public static final String LANG = "lang"; //$NON-NLS-1$
- public static final String LAQUO = "laquo"; //$NON-NLS-1$
- public static final String LARR_U = "lArr"; //$NON-NLS-1$
- public static final String LARR_L = "larr"; //$NON-NLS-1$
- public static final String LCEIL = "lceil"; //$NON-NLS-1$
- public static final String LDQUO = "ldquo"; //$NON-NLS-1$
- public static final String LE = "le"; //$NON-NLS-1$
- public static final String LFLOOR = "lfloor"; //$NON-NLS-1$
- public static final String LOWAST = "lowast"; //$NON-NLS-1$
- public static final String LOZ = "loz"; //$NON-NLS-1$
- public static final String LRM = "lrm"; //$NON-NLS-1$
- public static final String LSAQUO = "lsaquo"; //$NON-NLS-1$
- public static final String LSQUO = "lsquo"; //$NON-NLS-1$
- public static final String LT = "lt"; //$NON-NLS-1$
- public static final String MACR = "macr"; //$NON-NLS-1$
- public static final String MDASH = "mdash"; //$NON-NLS-1$
- public static final String MICRO = "micro"; //$NON-NLS-1$
- public static final String MIDDOT = "middot"; //$NON-NLS-1$
- public static final String MINUS = "minus"; //$NON-NLS-1$
- public static final String MU_U = "Mu"; //$NON-NLS-1$
- public static final String MU_L = "mu"; //$NON-NLS-1$
- public static final String NABLA = "nabla"; //$NON-NLS-1$
- public static final String NBSP = "nbsp"; //$NON-NLS-1$
- public static final String NDASH = "ndash"; //$NON-NLS-1$
- public static final String NE = "ne"; //$NON-NLS-1$
- public static final String NI = "ni"; //$NON-NLS-1$
- public static final String NOT = "not"; //$NON-NLS-1$
- public static final String NOTIN = "notin"; //$NON-NLS-1$
- public static final String NSUB = "nsub"; //$NON-NLS-1$
- public static final String NTILDE_U = "Ntilde"; //$NON-NLS-1$
- public static final String NTILDE_L = "ntilde"; //$NON-NLS-1$
- public static final String NU_U = "Nu"; //$NON-NLS-1$
- public static final String NU_L = "nu"; //$NON-NLS-1$
- public static final String OACUTE_U = "Oacute"; //$NON-NLS-1$
- public static final String OACUTE_L = "oacute"; //$NON-NLS-1$
- public static final String OCIRC_U = "Ocirc"; //$NON-NLS-1$
- public static final String OCIRC_L = "ocirc"; //$NON-NLS-1$
- public static final String OELIG_U = "OElig"; //$NON-NLS-1$
- public static final String OELIG_L = "oelig"; //$NON-NLS-1$
- public static final String OGRAVE_U = "Ograve"; //$NON-NLS-1$
- public static final String OGRAVE_L = "ograve"; //$NON-NLS-1$
- public static final String OLINE = "oline"; //$NON-NLS-1$
- public static final String OMEGA_U = "Omega"; //$NON-NLS-1$
- public static final String OMEGA_L = "omega"; //$NON-NLS-1$
- public static final String OMICRON_U = "Omicron"; //$NON-NLS-1$
- public static final String OMICRON_L = "omicron"; //$NON-NLS-1$
- public static final String OPLUS = "oplus"; //$NON-NLS-1$
- public static final String OR = "or"; //$NON-NLS-1$
- public static final String ORDF = "ordf"; //$NON-NLS-1$
- public static final String ORDM = "ordm"; //$NON-NLS-1$
- public static final String OSLASH_U = "Oslash"; //$NON-NLS-1$
- public static final String OSLASH_L = "oslash"; //$NON-NLS-1$
- public static final String OTILDE_U = "Otilde"; //$NON-NLS-1$
- public static final String OTILDE_L = "otilde"; //$NON-NLS-1$
- public static final String OTIMES = "otimes"; //$NON-NLS-1$
- public static final String OUML_U = "Ouml"; //$NON-NLS-1$
- public static final String OUML_L = "ouml"; //$NON-NLS-1$
- public static final String PARA = "para"; //$NON-NLS-1$
- public static final String PART = "part"; //$NON-NLS-1$
- public static final String PERMIL = "permil"; //$NON-NLS-1$
- public static final String PERP = "perp"; //$NON-NLS-1$
- public static final String PHI_U = "Phi"; //$NON-NLS-1$
- public static final String PHI_L = "phi"; //$NON-NLS-1$
- public static final String PI_U = "Pi"; //$NON-NLS-1$
- public static final String PI_L = "pi"; //$NON-NLS-1$
- public static final String PIV = "piv"; //$NON-NLS-1$
- public static final String PLUSMN = "plusmn"; //$NON-NLS-1$
- public static final String POUND = "pound"; //$NON-NLS-1$
- public static final String PRIME_U = "Prime"; //$NON-NLS-1$
- public static final String PRIME_L = "prime"; //$NON-NLS-1$
- public static final String PROD = "prod"; //$NON-NLS-1$
- public static final String PROP = "prop"; //$NON-NLS-1$
- public static final String PSI_U = "Psi"; //$NON-NLS-1$
- public static final String PSI_L = "psi"; //$NON-NLS-1$
- public static final String QUOT = "quot"; //$NON-NLS-1$
- public static final String RADIC = "radic"; //$NON-NLS-1$
- public static final String RANG = "rang"; //$NON-NLS-1$
- public static final String RAQUO = "raquo"; //$NON-NLS-1$
- public static final String RARR_U = "rArr"; //$NON-NLS-1$
- public static final String RARR_L = "rarr"; //$NON-NLS-1$
- public static final String RCEIL = "rceil"; //$NON-NLS-1$
- public static final String RDQUO = "rdquo"; //$NON-NLS-1$
- public static final String REAL = "real"; //$NON-NLS-1$
- public static final String REG = "reg"; //$NON-NLS-1$
- public static final String RFLOOR = "rfloor"; //$NON-NLS-1$
- public static final String RHO_U = "Rho"; //$NON-NLS-1$
- public static final String RHO_L = "rho"; //$NON-NLS-1$
- public static final String RLM = "rlm"; //$NON-NLS-1$
- public static final String RSAQUO = "rsaquo"; //$NON-NLS-1$
- public static final String RSQUO = "rsquo"; //$NON-NLS-1$
- public static final String SBQUO = "sbquo"; //$NON-NLS-1$
- public static final String SCARON_U = "Scaron"; //$NON-NLS-1$
- public static final String SCARON_L = "scaron"; //$NON-NLS-1$
- public static final String SDOT = "sdot"; //$NON-NLS-1$
- public static final String SECT = "sect"; //$NON-NLS-1$
- public static final String SHY = "shy"; //$NON-NLS-1$
- public static final String SIGMA_U = "Sigma"; //$NON-NLS-1$
- public static final String SIGMA_L = "sigma"; //$NON-NLS-1$
- public static final String SIGMAF = "sigmaf"; //$NON-NLS-1$
- public static final String SIM = "sim"; //$NON-NLS-1$
- public static final String SPADES = "spades"; //$NON-NLS-1$
- public static final String SUB = "sub"; //$NON-NLS-1$
- public static final String SUBE = "sube"; //$NON-NLS-1$
- public static final String SUM = "sum"; //$NON-NLS-1$
- public static final String SUP = "sup"; //$NON-NLS-1$
- public static final String SUP1 = "sup1"; //$NON-NLS-1$
- public static final String SUP2 = "sup2"; //$NON-NLS-1$
- public static final String SUP3 = "sup3"; //$NON-NLS-1$
- public static final String SUPE = "supe"; //$NON-NLS-1$
- public static final String SZLIG = "szlig"; //$NON-NLS-1$
- public static final String TAU_U = "Tau"; //$NON-NLS-1$
- public static final String TAU_L = "tau"; //$NON-NLS-1$
- public static final String THERE4 = "there4"; //$NON-NLS-1$
- public static final String THETA_U = "Theta"; //$NON-NLS-1$
- public static final String THETA_L = "theta"; //$NON-NLS-1$
- public static final String THETASYM = "thetasym"; //$NON-NLS-1$
- public static final String THINSP = "thinsp"; //$NON-NLS-1$
- public static final String THORN_U = "THORN"; //$NON-NLS-1$
- public static final String THORN_L = "thorn"; //$NON-NLS-1$
- public static final String TILDE = "tilde"; //$NON-NLS-1$
- public static final String TIMES = "times"; //$NON-NLS-1$
- public static final String TRADE = "trade"; //$NON-NLS-1$
- public static final String UACUTE_U = "Uacute"; //$NON-NLS-1$
- public static final String UACUTE_L = "uacute"; //$NON-NLS-1$
- public static final String UARR_U = "uArr"; //$NON-NLS-1$
- public static final String UARR_L = "uarr"; //$NON-NLS-1$
- public static final String UCIRC_U = "Ucirc"; //$NON-NLS-1$
- public static final String UCIRC_L = "ucirc"; //$NON-NLS-1$
- public static final String UGRAVE_U = "Ugrave"; //$NON-NLS-1$
- public static final String UGRAVE_L = "ugrave"; //$NON-NLS-1$
- public static final String UML = "uml"; //$NON-NLS-1$
- public static final String UPSIH = "upsih"; //$NON-NLS-1$
- public static final String UPSILON_U = "Upsilon"; //$NON-NLS-1$
- public static final String UPSILON_L = "upsilon"; //$NON-NLS-1$
- public static final String UUML_U = "Uuml"; //$NON-NLS-1$
- public static final String UUML_L = "uuml"; //$NON-NLS-1$
- public static final String WEIERP = "weierp"; //$NON-NLS-1$
- public static final String XI_U = "Xi"; //$NON-NLS-1$
- public static final String XI_L = "xi"; //$NON-NLS-1$
- public static final String YACUTE_U = "Yacute"; //$NON-NLS-1$
- public static final String YACUTE_L = "yacute"; //$NON-NLS-1$
- public static final String YEN = "yen"; //$NON-NLS-1$
- public static final String YUML_U = "Yuml"; //$NON-NLS-1$
- public static final String YUML_L = "yuml"; //$NON-NLS-1$
- public static final String ZETA_U = "Zeta"; //$NON-NLS-1$
- public static final String ZETA_L = "zeta"; //$NON-NLS-1$
- public static final String ZWJ = "zwj"; //$NON-NLS-1$
- public static final String ZWNJ = "zwnj"; //$NON-NLS-1$
- }
-
- public static final String HTML40_URI = "http://www.w3.org/TR/REC-html40/frameset.dtd"; //$NON-NLS-1$
- public static final String HTML40_TAG_PREFIX = ""; //$NON-NLS-1$
- // global attribute names
- public static final String ATTR_NAME_ID = "id"; // %coreattrs;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CLASS = "class"; // %coreattrs;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_STYLE = "style"; // %coreattrs;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TITLE = "title"; // %coreattrs;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LANG = "lang"; // %i18n;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DIR = "dir"; // %i18n; //$NON-NLS-1$
- public static final String ATTR_NAME_ONCLICK = "onclick"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONDBLCLICK = "ondblclick"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEDOWN = "onmousedown"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEUP = "onmouseup"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEOVER = "onmouseover"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEMOVE = "onmousemove"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEOUT = "onmouseout"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONKEYPRESS = "onkeypress"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONKEYDOWN = "onkeydown"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONKEYUP = "onkeyup"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONHELP = "onhelp"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BGCOLOR = "bgcolor"; // %bodycolor;,
- // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TEXT = "text"; // %bodycolor;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LINK = "link"; // %bodycolor;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VLINK = "vlink"; // %bodycolor;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ALINK = "alink"; // %bodycolor;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VERSION = "version"; // HTML
- // //$NON-NLS-1$
- public static final String ATTR_NAME_PROFILE = "profile"; // HEAD
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONLOAD = "onload"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONUNLOAD = "onunload"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BACKGROUND = "background"; // BODY,
- // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SRC = "src"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_ALT = "alt"; // IMG,AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LONGDESC = "longdesc"; // IMG
- // //$NON-NLS-1$
- public static final String ATTR_NAME_NAME = "name"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_HEIGHT = "height"; // IMG, TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_WIDTH = "width"; // IMG, TABLE,HR
- // //$NON-NLS-1$
- public static final String ATTR_NAME_USEMAP = "usemap"; // IMG
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ISMAP = "ismap"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_ALIGN = "align"; // IMG, TABLE,HR
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BORDER = "border"; // IMG, TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_HSPACE = "hspace"; // IMG
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VSPACE = "vspace"; // IMG
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MAPFILE = "mapfile"; // IMG
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SUMMARY = "summary"; // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_FRAME = "frame"; // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_RULES = "rules"; // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CELLSPACING = "cellspacing"; // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CELLPADDING = "cellpadding"; // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DATAPAGESIZE = "datapagesize"; // TABLE,HR
- // //$NON-NLS-1$
- public static final String ATTR_NAME_COLOR = "color"; // BASEFONT,FONT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_FACE = "face"; // BASEFONT,FONT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SIZE = "size"; // BASEFONT,FONT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CLEAR = "clear"; // BR //$NON-NLS-1$
- public static final String ATTR_NAME_SHAPE = "shape"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_COORDS = "coords"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_HREF = "href"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_TARGET = "target"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_NOHREF = "nohref"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TABINDEX = "tabindex"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ACCESSKEY = "accesskey"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONFOCUS = "onfocus"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONBLUR = "onblur"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CHARSET = "charset"; // LINK
- // //$NON-NLS-1$
- public static final String ATTR_NAME_HREFLANG = "hreflang"; // LINK
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TYPE = "type"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_REL = "rel"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_REV = "rev"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_MEDIA = "media"; // LINK
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VALUE = "value"; // PARAM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VALUETYPE = "valuetype"; // PARAM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_NOSHADE = "noshade"; // HR
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CHECKED = "checked"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DISABLED = "disabled"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_READONLY = "readonly"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MAXLENGTH = "maxlength"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONSELECT = "onselect"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONCHANGE = "onchange"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ACCEPT = "accept"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ISTYLE = "istyle"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CHAR = "char"; // COL //$NON-NLS-1$
- public static final String ATTR_NAME_CHAROFF = "charoff"; // COL
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VALIGN = "valign"; // COL
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SPAN = "span"; // COL //$NON-NLS-1$
- public static final String ATTR_NAME_FRAMEBORDER = "frameborder"; // FRAME
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MARGINWIDTH = "marginwidth"; // FRAME
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MARGINHEIGHT = "marginheight"; // FRAME
- // //$NON-NLS-1$
- public static final String ATTR_NAME_NORESIZE = "noresize"; // FRAME
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCROLLING = "scrolling"; // FRAME
- // //$NON-NLS-1$
- public static final String ATTR_NAME_PROMPT = "prompt"; // ISINDEX
- // //$NON-NLS-1$
- public static final String ATTR_NAME_HTTP_EQUIV = "http-equiv"; // META
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CONTENT = "content"; // META
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCHEME = "scheme"; // META
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ERRMSG = "errmsg"; // ssi:config
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SIZEFMT = "sizefmt"; // ssi:config
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TIMEFMT = "timefmt"; // ssi:config
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VAR = "var"; // ssi:echo
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CGI = "cgi"; // ssi:exec
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CMD = "cmd"; // ssi:exec
- // //$NON-NLS-1$
- public static final String ATTR_NAME_FILE = "file"; // ssi:fsize
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VIRTUAL = "virtual"; // ssi:fsize
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SELECTED = "selected"; // OPTION
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LABEL = "label"; // OPTION
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ROWS = "rows"; // TEXTAREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_COLS = "cols"; // TEXTAREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LANGUAGE = "language"; // SCRIPT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DEFER = "defer"; // SCRIPT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_EVENT = "event"; // SCRIPT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_FOR = "for"; // SCRIPT //$NON-NLS-1$
- public static final String ATTR_NAME_COMPACT = "compact"; // OL/UL
- // //$NON-NLS-1$
- public static final String ATTR_NAME_START = "start"; // OL/UL
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DIRECTKEY = "directkey"; // A
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CODEBASE = "codebase"; // APPLET
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ARCHIVE = "archive"; // APPLET
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CODE = "code"; // APPLET
- // //$NON-NLS-1$
- public static final String ATTR_NAME_OBJECT = "object"; // APPLET
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MAYSCRIPT = "mayscript"; // APPLET
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CITE = "cite"; // BLOCKQUOTE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MACRO = "macro"; // D2W //$NON-NLS-1$
- public static final String ATTR_NAME_DATETIME = "datetime"; // INS/DEL
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LOOP = "loop"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_HIDDEN = "hidden"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VOLUME = "volume"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_AUTOSTART = "autostart"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_AUTOPLAY = "autoplay"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_AUTOSIZE = "autosize"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CONTROLLER = "controller";// EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCALE = "scale"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SHOWCONTROLS = "showcontrols";// EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_PLAYCOUNT = "playcount"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_REPEAT = "repeat"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_PANEL = "panel"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_PALETTE = "palette"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TEXTFOCUS = "textfocus"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ACTION = "action"; // FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_METHOD = "method"; // FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ENCTYPE = "enctype"; // FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONSUBMIT = "onsubmit"; // FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONRESET = "onreset"; // FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ACCEPT_CHARSET = "accept-charset";// FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BEHAVIOR = "behavior"; // MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DIRECTION = "direction"; // MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCROLLAMOUNT = "scrollamount";// MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCROLLDELAY = "scrolldelay";// MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TRUESPEED = "truespeed"; // MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DECLARE = "declare"; // OBJECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CLASSID = "classid"; // OBJECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DATA = "data"; // OBJECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CODETYPE = "codetype"; // OBJECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_STANDBY = "standby"; // OBJECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MULTIPLE = "multiple"; // SELECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ABBR = "abbr"; // TH/TD //$NON-NLS-1$
- public static final String ATTR_NAME_AXIS = "axis"; // TH/TD //$NON-NLS-1$
- public static final String ATTR_NAME_HEADERS = "headers"; // TH/TD
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCOPE = "scope"; // TH/TD
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ROWSPAN = "rowspan"; // TH/TD
- // //$NON-NLS-1$
- public static final String ATTR_NAME_COLSPAN = "colspan"; // TH/TD
- // //$NON-NLS-1$
- public static final String ATTR_NAME_NOWRAP = "nowrap"; // TH/TD
- // //$NON-NLS-1$
- // <<D205514
- public static final String ATTR_NAME_TOPMARGIN = "topmargin"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BOTTOMMARGIN = "bottommargin"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LEFTMARGIN = "leftmargin"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_RIGHTMARGIN = "rightmargin"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BORDERCOLOR = "bordercolor"; // TABLE/TR/TH/TD/FRAMESET/FRAME
- // //$NON-NLS-1$
- // for WML
- public static final String WML_ATTR_NAME_TITLE = "title"; // card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_DOMAIN = "domain"; // access
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_PATH = "path"; // access
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONENTERFORWARD = "onenterforward"; // template,card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONENTERBACKWARD = "onenterbackward"; // template,card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONPICK = "onpick"; // option
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONTIMER = "ontimer"; // template,card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_NEWCONTEXT = "newcontext"; // card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ORDERED = "ordered"; // card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_OPTIONAL = "optional"; // do
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_CACHE_CONTROL = "cache-control"; // go
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_SENDREFERER = "sendreferer"; // go
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_METHOD = "method"; // go
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ENCTYPE = "enctype"; // go
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ACCEPT_CHARSET = "accept-charset"; // go
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_COLUMNS = "columns"; // table
- // //$NON-NLS-1$
- // D205514
- //<<D215684
- public static final String ATTR_NAME_FRAMESPACING = "framespacing"; // FRAMESET
- // //$NON-NLS-1$
- //D215684
- // global attribute values; mainly used in enumeration.
- public static final String ATTR_VALUE_VERSION_TRANSITIONAL = "-//W3C//DTD HTML 4.01 Transitional//EN"; //$NON-NLS-1$
- public static final String ATTR_VALUE_VERSION_FRAMESET = "-//W3C//DTD HTML 4.01 Frameset//EN"; //$NON-NLS-1$
- public static final String ATTR_VALUE_LTR = "ltr"; // dir //$NON-NLS-1$
- public static final String ATTR_VALUE_RTL = "rtl"; // dir //$NON-NLS-1$
- // for align (top|middle|bottom|left|right)
- public static final String ATTR_VALUE_TOP = "top"; // align //$NON-NLS-1$
- public static final String ATTR_VALUE_MIDDLE = "middle"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_BOTTOM = "bottom"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_LEFT = "left"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_CENTER = "center"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_RIGHT = "right"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_JUSTIFY = "justify"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_CHAR = "char"; // align
- // //$NON-NLS-1$
- // for valign (baseline)
- public static final String ATTR_VALUE_BASELINE = "baseline"; // valign
- // //$NON-NLS-1$
- // for clear (left|all|right|none): left and right are already defined
- // above.
- public static final String ATTR_VALUE_ALL = "all"; // clear //$NON-NLS-1$
- public static final String ATTR_VALUE_NONE = "none"; // clear
- // //$NON-NLS-1$
- // for shape (rect|circle|poly|default)
- public static final String ATTR_VALUE_RECT = "rect"; // shape
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_CIRCLE = "circle"; // shape
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_POLY = "poly"; // shape
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_DEFAULT = "default"; // shape
- // //$NON-NLS-1$
- // for valuetype (data|ref|object)
- public static final String ATTR_VALUE_DATA = "data"; // valuetype
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_REF = "ref"; // valuetype
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_OBJECT = "object"; // valuetype
- // //$NON-NLS-1$
- // for type of INPUT
- // (text | password | checkbox | radio | submit | reset |
- // file | hidden | image | button)
- public static final String ATTR_VALUE_TEXT = "text"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_PASSWORD = "password"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_CHECKBOX = "checkbox"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_RADIO = "radio"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_SUBMIT = "submit"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_RESET = "reset"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_FILE = "file"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_HIDDEN = "hidden"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_IMAGE = "image"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_BUTTON = "button"; // INPUT:type
- // //$NON-NLS-1$
- // for span, colspan, rowspan
- public static final String ATTR_VALUE_1 = "1"; // span //$NON-NLS-1$
- // for frameborder
- public static final String ATTR_VALUE_0 = "0"; // FRAME //$NON-NLS-1$
- // for scrolling
- public static final String ATTR_VALUE_YES = "yes"; // FRAME //$NON-NLS-1$
- public static final String ATTR_VALUE_NO = "no"; // FRAME //$NON-NLS-1$
- public static final String ATTR_VALUE_AUTO = "auto"; // FRAME
- // //$NON-NLS-1$
- // for UL
- public static final String ATTR_VALUE_DISC = "disc"; // UL:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_SQUARE = "square"; // UL:type
- // //$NON-NLS-1$
- // for frame of TABLE
- public static final String ATTR_VALUE_VOID = "void"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_ABOVE = "above"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_BELOW = "below"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_HSIDES = "hsides"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_LHS = "lhs"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_RHS = "rhs"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_VSIDES = "vsides"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_BOX = "box"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_BORDER = "border"; // TABLE:frame
- // //$NON-NLS-1$
- // for rules of TABLE
- public static final String ATTR_VALUE_GROUPS = "groups"; // TABLE:rules
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_ROWS = "rows"; // TEXTAREA
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_COLS = "cols"; // TEXTAREA
- // //$NON-NLS-1$
- // for method of FORM
- public static final String ATTR_VALUE_GET = "get"; // FORM //$NON-NLS-1$
- public static final String ATTR_VALUE_POST = "post"; // FORM //$NON-NLS-1$
- public static final String ATTR_VALUE_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded"; //$NON-NLS-1$
- // for scope of (TH | TD)
- public static final String ATTR_VALUE_ROW = "row"; // (TH|TD):scope
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_COL = "col"; // (TH|TD):scope
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_ROWGROUP = "rowgroup";// (TH|TD):scope
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_COLGROUP = "colgroup";// (TH|TD):scope
- // //$NON-NLS-1$
- // for auto?? of EMBED
- public static final String ATTR_VALUE_TRUE = "true"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_FALSE = "false"; // EMBED
- // //$NON-NLS-1$
- // for behaviro of MARQUEE
- public static final String ATTR_VALUE_SCROLL = "scroll"; // MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_SLIDE = "slide"; // MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_ALTERNATE = "alternate"; // MARQUEE
- // //$NON-NLS-1$
- // for direction of MARQUEE
- public static final String ATTR_VALUE_UP = "up"; // MARQUEE //$NON-NLS-1$
- public static final String ATTR_VALUE_DOWN = "down"; // MARQUEE
- // //$NON-NLS-1$
- // for type of LI (D19924)
- public static final String ATTR_VALUE_NUMBER = "1"; // LI //$NON-NLS-1$
- public static final String ATTR_VALUE_LOWER_ALPHA = "a"; // LI
- // //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ContentSettingsRegistry.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ContentSettingsRegistry.java
deleted file mode 100644
index 8862b955eb..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ContentSettingsRegistry.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.css.ui.contentproperties;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.metamodel.CSSProfile;
-import org.eclipse.wst.css.core.metamodel.CSSProfileRegistry;
-import org.eclipse.wst.sse.ui.contentproperties.ui.ComboList;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-
-public final class ContentSettingsRegistry {
- private static final String NONE = SSEUIPlugin.getResourceString("%UI_none"); //$NON-NLS-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);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ui/CSSContentSettingsPropertyPage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ui/CSSContentSettingsPropertyPage.java
deleted file mode 100644
index e2c70ca078..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ui/CSSContentSettingsPropertyPage.java
+++ /dev/null
@@ -1,101 +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.css.ui.contentproperties.ui;
-
-
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.css.ui.contentproperties.ContentSettingsRegistry;
-import org.eclipse.wst.css.ui.internal.Logger;
-import org.eclipse.wst.css.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 CSSContentSettingsPropertyPage extends ContentSettingsPropertyPage {
-
- private final int N_CSS_PROFILE = 0;
-
-
-
- public CSSContentSettingsPropertyPage() {
- super();
- numberOfCombo = 1;
- numCols = 2;
- numRows = 1;
- combo = new ComboListOnPropertyPage[super.numberOfCombo];
-
- }
-
- 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 createSettingsPageGUI() {
-
- int type = ((IResource) getElement()).getType();
- switch (type) {
- case IResource.FILE :
- //composite = createComposite(propertyPage,numCols,numRows);
- createCSSComboBox();
- WorkbenchHelp.setHelp(propertyPage, IHelpContextIds.CSS_CONTENT_SETTINGS_HELPID);
- break;
-
- default :
- Logger.log(Logger.WARNING, "CSSContentSettingsPropertyPage is instantiated by resource except FILE");//$NON-NLS-1$
- break;
- }
-
- }
-
-
- protected void putSelectedPropertyInto(Map properties, String valueInCombo, int index) {
-
- switch (index) {
- case N_CSS_PROFILE :
- // css
- properties.put(IContentSettings.CSS_PROFILE, valueInCombo);
- break;
- default :
- Logger.log(Logger.ERROR, "Index is out of range in putSelectedPropertyInto() in class CSSContentSettingsPropertyPage");//$NON-NLS-1$
- break;
- }
-
- }
-
- protected void deleteNoneProperty(int index) {
- switch (index) {
- case N_CSS_PROFILE :
- // css
- contentSettings.deleteProperty((IResource) super.getElement(), IContentSettings.CSS_PROFILE);
- break;
-
- default :
- Logger.log(Logger.ERROR, "Index is out of range in deleteNoneProperty() in class CSSContentSettingsPropertyPage");//$NON-NLS-1$
- break;
- }
- }
-
-}
-
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupActionCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupActionCSS.java
deleted file mode 100644
index 529da96642..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupActionCSS.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.css.ui.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.css.core.cleanup.CleanupProcessorCSS;
-import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupProcessor;
-import org.eclipse.wst.sse.ui.edit.util.CleanupAction;
-
-public class CleanupActionCSS extends CleanupAction {
- protected IStructuredCleanupProcessor fCleanupProcessor;
-
- public CleanupActionCSS(ResourceBundle bundle, String prefix, ITextEditor editor) {
- super(bundle, prefix, editor);
- }
-
- protected Dialog getCleanupDialog(Shell shell) {
- if (fCleanupDialog == null)
- fCleanupDialog = new CleanupDialogCSS(shell);
-
- return fCleanupDialog;
- }
-
- protected IStructuredCleanupProcessor getCleanupProcessor() {
- if (fCleanupProcessor == null)
- fCleanupProcessor = new CleanupProcessorCSS();
-
- return fCleanupProcessor;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupDialogCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupDialogCSS.java
deleted file mode 100644
index 6f2a6ae1df..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupDialogCSS.java
+++ /dev/null
@@ -1,290 +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.css.ui.edit.ui;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-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.css.core.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategyImpl;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-
-public class CleanupDialogCSS extends Dialog {
-
- private boolean embeddedCSS;
- protected Button fRadioButtonIdentCaseAsis;
- protected Button fRadioButtonIdentCaseLower;
- protected Button fRadioButtonIdentCaseUpper;
- protected Button fRadioButtonPropNameCaseAsis;
- protected Button fRadioButtonPropNameCaseLower;
- protected Button fRadioButtonPropNameCaseUpper;
- protected Button fRadioButtonPropValueCaseAsis;
- protected Button fRadioButtonPropValueCaseLower;
- protected Button fRadioButtonPropValueCaseUpper;
- protected Button fRadioButtonSelectorTagCaseAsis;
- protected Button fRadioButtonSelectorTagCaseLower;
- protected Button fRadioButtonSelectorTagCaseUpper;
- protected Button fCheckBoxQuoteValues;
- protected Button fCheckBoxFormatSource;
-
- /**
- * CSSCleanupDialog constructor comment.
- *
- * @param parentShell
- * org.eclipse.swt.widgets.Shell
- */
- public CleanupDialogCSS(Shell parentShell) {
- super(parentShell);
- }
-
- /**
- *
- * @return org.eclipse.swt.widgets.Control
- * @param parent
- * org.eclipse.swt.widgets.Composite
- */
- public Control createDialogArea(Composite parent) {
- if (isEmbeddedCSS())
- getShell().setText(SSEUIPlugin.getResourceString("%CSS_Cleanup_UI_")); //$NON-NLS-1$ = "CSS Cleanup"
- else
- getShell().setText(SSEUIPlugin.getResourceString("%Cleanup_UI_")); //$NON-NLS-1$ = "Cleanup"
-
- Composite panel = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.makeColumnsEqualWidth = true;
- panel.setLayout(layout);
-
- WorkbenchHelp.setHelp(panel, IHelpContextIds.CSS_CLEANUP_HELPID);
-
- // Convert ident case
- // ACC: Group radio buttons together so associated label is read
- // Label identCaseLabel = new Label(panel, SWT.NULL);
- // identCaseLabel.setText(ResourceHandler.getString("Identifier_case__UI_"));
- // //$NON-NLS-1$ = "Identifier case:"
- // Canvas identCase = new Canvas(panel, SWT.NULL);
- Group identCase = new Group(panel, SWT.NULL);
- identCase.setText(SSEUIPlugin.getResourceString("%Identifier_case__UI_")); //$NON-NLS-1$ = "Identifier case:"
- GridLayout hLayout = new GridLayout();
- hLayout.numColumns = 3;
- identCase.setLayout(hLayout);
- fRadioButtonIdentCaseAsis = new Button(identCase, SWT.RADIO);
- fRadioButtonIdentCaseAsis.setText(SSEUIPlugin.getResourceString("%As-is_UI_")); //$NON-NLS-1$ = "As-is"
- fRadioButtonIdentCaseLower = new Button(identCase, SWT.RADIO);
- fRadioButtonIdentCaseLower.setText(SSEUIPlugin.getResourceString("%Lower_UI_")); //$NON-NLS-1$ = "Lower"
- fRadioButtonIdentCaseUpper = new Button(identCase, SWT.RADIO);
- fRadioButtonIdentCaseUpper.setText(SSEUIPlugin.getResourceString("%Upper_UI_")); //$NON-NLS-1$ = "Upper"
-
- // Convert property name case
- // ACC: Group radio buttons together so associated label is read
- // Label propNameCaseLabel = new Label(panel, SWT.NULL);
- // propNameCaseLabel.setText(ResourceHandler.getString("Property_name_case__UI_"));
- // //$NON-NLS-1$ = "Property name case:"
- // Canvas propNameCase = new Canvas(panel, SWT.NULL);
- Group propNameCase = new Group(panel, SWT.NULL);
- propNameCase.setText(SSEUIPlugin.getResourceString("%Property_name_case__UI_")); //$NON-NLS-1$ = "Property name case:"
- hLayout = new GridLayout();
- hLayout.numColumns = 3;
- propNameCase.setLayout(hLayout);
- fRadioButtonPropNameCaseAsis = new Button(propNameCase, SWT.RADIO);
- fRadioButtonPropNameCaseAsis.setText(SSEUIPlugin.getResourceString("%As-is_UI_")); //$NON-NLS-1$ = "As-is"
- fRadioButtonPropNameCaseLower = new Button(propNameCase, SWT.RADIO);
- fRadioButtonPropNameCaseLower.setText(SSEUIPlugin.getResourceString("%Lower_UI_")); //$NON-NLS-1$ = "Lower"
- fRadioButtonPropNameCaseUpper = new Button(propNameCase, SWT.RADIO);
- fRadioButtonPropNameCaseUpper.setText(SSEUIPlugin.getResourceString("%Upper_UI_")); //$NON-NLS-1$ = "Upper"
-
- // Convert property Value case
- // ACC: Group radio buttons together so associated label is read
- // Label propValueCaseLabel = new Label(panel, SWT.NULL);
- // propValueCaseLabel.setText(ResourceHandler.getString("Property_value_case__UI_"));
- // //$NON-NLS-1$ = "Property value case:"
- // Canvas propValueCase = new Canvas(panel, SWT.NULL);
- Group propValueCase = new Group(panel, SWT.NULL);
- propValueCase.setText(SSEUIPlugin.getResourceString("%Property_value_case__UI_")); //$NON-NLS-1$ = "Property value case:"
- hLayout = new GridLayout();
- hLayout.numColumns = 3;
- propValueCase.setLayout(hLayout);
- fRadioButtonPropValueCaseAsis = new Button(propValueCase, SWT.RADIO);
- fRadioButtonPropValueCaseAsis.setText(SSEUIPlugin.getResourceString("%As-is_UI_")); //$NON-NLS-1$ = "As-is"
- fRadioButtonPropValueCaseLower = new Button(propValueCase, SWT.RADIO);
- fRadioButtonPropValueCaseLower.setText(SSEUIPlugin.getResourceString("%Lower_UI_")); //$NON-NLS-1$ = "Lower"
- fRadioButtonPropValueCaseUpper = new Button(propValueCase, SWT.RADIO);
- fRadioButtonPropValueCaseUpper.setText(SSEUIPlugin.getResourceString("%Upper_UI_")); //$NON-NLS-1$ = "Upper"
-
- if (!isEmbeddedCSS()) {
- // Convert selector tag case
- // ACC: Group radio buttons together so associated label is read
- // Label selectorTagCaseLabel = new Label(panel, SWT.NULL);
- // selectorTagCaseLabel.setText(ResourceHandler.getString("Selector_tag_name_case__UI_"));
- // //$NON-NLS-1$ = "Selector tag name case:"
- // Canvas selectorTagCase = new Canvas(panel, SWT.NULL);
- Group selectorTagCase = new Group(panel, SWT.NULL);
- selectorTagCase.setText(SSEUIPlugin.getResourceString("%Selector_tag_name_case__UI_")); //$NON-NLS-1$ = "Selector tag name case:"
- hLayout = new GridLayout();
- hLayout.numColumns = 3;
- selectorTagCase.setLayout(hLayout);
- fRadioButtonSelectorTagCaseAsis = new Button(selectorTagCase, SWT.RADIO);
- fRadioButtonSelectorTagCaseAsis.setText(SSEUIPlugin.getResourceString("%As-is_UI_")); //$NON-NLS-1$ = "As-is"
- fRadioButtonSelectorTagCaseLower = new Button(selectorTagCase, SWT.RADIO);
- fRadioButtonSelectorTagCaseLower.setText(SSEUIPlugin.getResourceString("%Lower_UI_")); //$NON-NLS-1$ = "Lower"
- fRadioButtonSelectorTagCaseUpper = new Button(selectorTagCase, SWT.RADIO);
- fRadioButtonSelectorTagCaseUpper.setText(SSEUIPlugin.getResourceString("%Upper_UI_")); //$NON-NLS-1$ = "Upper"
- }
-
- // Quote attribute values
- fCheckBoxQuoteValues = new Button(panel, SWT.CHECK);
- fCheckBoxQuoteValues.setText(SSEUIPlugin.getResourceString("%Quote_values_UI_")); //$NON-NLS-1$ = "Quote values"
-
- if (!isEmbeddedCSS()) {
- // Format source
- fCheckBoxFormatSource = new Button(panel, SWT.CHECK);
- fCheckBoxFormatSource.setText(SSEUIPlugin.getResourceString("%Format_source_UI_")); //$NON-NLS-1$ = "Format source"
- }
-
- setCleanupOptions();
-
- return panel;
- }
-
- /**
- * Insert the method's description here.
- *
- * @return boolean
- */
- public boolean isEmbeddedCSS() {
- return embeddedCSS;
- }
-
- /**
- *
- */
- protected void okPressed() {
- updateCleanupOptions();
- super.okPressed();
- }
-
- /**
- *
- */
- protected void setCleanupOptions() {
- CSSCleanupStrategy stgy = CSSCleanupStrategyImpl.getInstance();
-
- if (fRadioButtonIdentCaseAsis != null) {
- if (stgy.getIdentCase() == CSSCleanupStrategy.UPPER)
- fRadioButtonIdentCaseUpper.setSelection(true);
- else if (stgy.getIdentCase() == CSSCleanupStrategy.LOWER)
- fRadioButtonIdentCaseLower.setSelection(true);
- else
- fRadioButtonIdentCaseAsis.setSelection(true);
- }
-
- if (fRadioButtonPropNameCaseAsis != null) {
- if (stgy.getPropNameCase() == CSSCleanupStrategy.UPPER)
- fRadioButtonPropNameCaseUpper.setSelection(true);
- else if (stgy.getPropNameCase() == CSSCleanupStrategy.LOWER)
- fRadioButtonPropNameCaseLower.setSelection(true);
- else
- fRadioButtonPropNameCaseAsis.setSelection(true);
- }
-
- if (fRadioButtonPropValueCaseAsis != null) {
- if (stgy.getPropValueCase() == CSSCleanupStrategy.UPPER)
- fRadioButtonPropValueCaseUpper.setSelection(true);
- else if (stgy.getPropValueCase() == CSSCleanupStrategy.LOWER)
- fRadioButtonPropValueCaseLower.setSelection(true);
- else
- fRadioButtonPropValueCaseAsis.setSelection(true);
- }
-
- if (fRadioButtonSelectorTagCaseAsis != null) {
- if (stgy.getSelectorTagCase() == CSSCleanupStrategy.UPPER)
- fRadioButtonSelectorTagCaseUpper.setSelection(true);
- else if (stgy.getSelectorTagCase() == CSSCleanupStrategy.LOWER)
- fRadioButtonSelectorTagCaseLower.setSelection(true);
- else
- fRadioButtonSelectorTagCaseAsis.setSelection(true);
- }
-
- if (fCheckBoxQuoteValues != null)
- fCheckBoxQuoteValues.setSelection(stgy.isQuoteValues());
-
- if (fCheckBoxFormatSource != null)
- fCheckBoxFormatSource.setSelection(stgy.isFormatSource());
-
- }
-
- /**
- * Insert the method's description here.
- *
- * @param newEmbeddedCSS
- * boolean
- */
- public void setEmbeddedCSS(boolean newEmbeddedCSS) {
- embeddedCSS = newEmbeddedCSS;
- }
-
- /**
- *
- */
- protected void updateCleanupOptions() {
- CSSCleanupStrategy stgy = CSSCleanupStrategyImpl.getInstance();
-
- if (fRadioButtonIdentCaseAsis != null) {
- if (fRadioButtonIdentCaseUpper.getSelection())
- stgy.setIdentCase(CSSCleanupStrategy.UPPER);
- else if (fRadioButtonIdentCaseLower.getSelection())
- stgy.setIdentCase(CSSCleanupStrategy.LOWER);
- else
- stgy.setIdentCase(CSSCleanupStrategy.ASIS);
- }
-
- if (fRadioButtonPropNameCaseAsis != null) {
- if (fRadioButtonPropNameCaseUpper.getSelection())
- stgy.setPropNameCase(CSSCleanupStrategy.UPPER);
- else if (fRadioButtonPropNameCaseLower.getSelection())
- stgy.setPropNameCase(CSSCleanupStrategy.LOWER);
- else
- stgy.setPropNameCase(CSSCleanupStrategy.ASIS);
- }
-
- if (fRadioButtonPropValueCaseAsis != null) {
- if (fRadioButtonPropValueCaseUpper.getSelection())
- stgy.setPropValueCase(CSSCleanupStrategy.UPPER);
- else if (fRadioButtonPropValueCaseLower.getSelection())
- stgy.setPropValueCase(CSSCleanupStrategy.LOWER);
- else
- stgy.setPropValueCase(CSSCleanupStrategy.ASIS);
- }
-
- if (fRadioButtonSelectorTagCaseAsis != null) {
- if (fRadioButtonSelectorTagCaseUpper.getSelection())
- stgy.setSelectorTagCase(CSSCleanupStrategy.UPPER);
- else if (fRadioButtonSelectorTagCaseLower.getSelection())
- stgy.setSelectorTagCase(CSSCleanupStrategy.LOWER);
- else
- stgy.setSelectorTagCase(CSSCleanupStrategy.ASIS);
- }
-
- if (fCheckBoxQuoteValues != null)
- stgy.setQuoteValues(fCheckBoxQuoteValues.getSelection());
-
- if (fCheckBoxFormatSource != null)
- stgy.setFormatSource(fCheckBoxFormatSource.getSelection());
-
- // save these values to preferences
- ((CSSCleanupStrategyImpl) stgy).saveOptions();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/image/CSSImageHelper.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/image/CSSImageHelper.java
deleted file mode 100644
index 6706f8d9f6..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/image/CSSImageHelper.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.css.ui.image;
-
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-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.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.CSSEditorPluginImages;
-
-
-public class CSSImageHelper {
- /**
- * singleton
- */
- public synchronized static CSSImageHelper getInstance() {
- if (fInstance == null) {
- fInstance = new CSSImageHelper();
- }
- return fInstance;
- }
-
- /**
- * by relative path(from here)
- */
- public Image getImage(String resource) {
- if (resource == null) {
- return null;
- }
- Image image = getImageRegistry().get(resource);
- if (image == null) {
- image = createImage(resource);
- }
- return image;
- }
-
- /**
- * by type
- */
- public Image getImage(CSSImageType type) {
- if (fTypeMap == null) {
- fTypeMap = new HashMap();
- fTypeMap.put(CSSImageType.STYLESHEET, CSSEditorPluginImages.IMG_OBJ_STYLESHEET);
-
- fTypeMap.put(CSSImageType.RULE_CHARSET, CSSEditorPluginImages.IMG_OBJ_RULE_CHARSET);
- fTypeMap.put(CSSImageType.RULE_FONTFACE, CSSEditorPluginImages.IMG_OBJ_RULE_FONTFACE);
- fTypeMap.put(CSSImageType.RULE_IMPORT, CSSEditorPluginImages.IMG_OBJ_RULE_IMPORT);
- fTypeMap.put(CSSImageType.RULE_MEDIA, CSSEditorPluginImages.IMG_OBJ_RULE_MEDIA);
- fTypeMap.put(CSSImageType.RULE_PAGE, CSSEditorPluginImages.IMG_OBJ_RULE_PAGE);
- fTypeMap.put(CSSImageType.RULE_STYLE, CSSEditorPluginImages.IMG_OBJ_RULE_STYLE);
- fTypeMap.put(CSSImageType.RULE_UNKNOWN, CSSEditorPluginImages.IMG_OBJ_RULE_UNKNOWN);
-
- fTypeMap.put(CSSImageType.SELECTOR_CLASS, CSSEditorPluginImages.IMG_OBJ_SELECTOR_CLASS);
- fTypeMap.put(CSSImageType.SELECTOR_ID, CSSEditorPluginImages.IMG_OBJ_SELECTOR_ID);
- fTypeMap.put(CSSImageType.SELECTOR_PSEUDO, CSSEditorPluginImages.IMG_OBJ_SELECTOR_PSEUDO);
- fTypeMap.put(CSSImageType.SELECTOR_TAG, CSSEditorPluginImages.IMG_OBJ_SELECTOR_TAG);
- fTypeMap.put(CSSImageType.SELECTOR_LINK, CSSEditorPluginImages.IMG_OBJ_SELECTOR_LINK);
- fTypeMap.put(CSSImageType.SELECTOR_DEFAULT, CSSEditorPluginImages.IMG_OBJ_SELECTOR_DEFAULT);
-
- fTypeMap.put(CSSImageType.VALUE_FUNCTION, CSSEditorPluginImages.IMG_OBJ_VALUE_FUNCTION);
- fTypeMap.put(CSSImageType.VALUE_NUMBER, CSSEditorPluginImages.IMG_OBJ_VALUE_NUMBER);
- fTypeMap.put(CSSImageType.VALUE_STRING, CSSEditorPluginImages.IMG_OBJ_VALUE_STRING);
-
- fTypeMap.put(CSSImageType.CATEGORY_AURAL, CSSEditorPluginImages.IMG_OBJ_CATEGORY_AURAL);
- fTypeMap.put(CSSImageType.CATEGORY_BOX, CSSEditorPluginImages.IMG_OBJ_CATEGORY_BOX);
- fTypeMap.put(CSSImageType.CATEGORY_COLORANDBACKGROUND, CSSEditorPluginImages.IMG_OBJ_CATEGORY_COLORANDBACKGROUND);
- fTypeMap.put(CSSImageType.CATEGORY_CONTENT, CSSEditorPluginImages.IMG_OBJ_CATEGORY_CONTENT);
- fTypeMap.put(CSSImageType.CATEGORY_FONT, CSSEditorPluginImages.IMG_OBJ_CATEGORY_FONT);
- fTypeMap.put(CSSImageType.CATEGORY_PAGE, CSSEditorPluginImages.IMG_OBJ_CATEGORY_PAGE);
- fTypeMap.put(CSSImageType.CATEGORY_TABLES, CSSEditorPluginImages.IMG_OBJ_CATEGORY_TABLES);
- fTypeMap.put(CSSImageType.CATEGORY_TEXT, CSSEditorPluginImages.IMG_OBJ_CATEGORY_TEXT);
- fTypeMap.put(CSSImageType.CATEGORY_UI, CSSEditorPluginImages.IMG_OBJ_CATEGORY_UI);
- fTypeMap.put(CSSImageType.CATEGORY_VISUAL, CSSEditorPluginImages.IMG_OBJ_CATEGORY_VISUAL);
- fTypeMap.put(CSSImageType.CATEGORY_DEFAULT, CSSEditorPluginImages.IMG_OBJ_CATEGORY_DEFAULT);
- }
- return getImage((String) fTypeMap.get(type));
- }
-
- /**
- *
- */
- private CSSImageHelper() {
- super();
- }
-
- /**
- *
- */
- private Image createImage(String resource) {
- ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(CSSUIPlugin.ID, resource);
- Image image = null;
-
- if (desc == null) {
- desc = ImageDescriptor.getMissingImageDescriptor();
- image = desc.createImage();
- } else {
- image = desc.createImage();
- getImageRegistry().put(resource, image);
- }
-
- return image;
- }
-
- private ImageRegistry getImageRegistry() {
- return JFaceResources.getImageRegistry();
- }
-
- private Map fTypeMap = null;
- private static CSSImageHelper fInstance = null;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/image/CSSImageType.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/image/CSSImageType.java
deleted file mode 100644
index 9efa575dcf..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/image/CSSImageType.java
+++ /dev/null
@@ -1,235 +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.css.ui.image;
-
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSSelector;
-import org.eclipse.wst.css.core.document.ICSSSelectorItem;
-import org.eclipse.wst.css.core.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.document.ICSSSimpleSelector;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.metamodel.CSSMMProperty;
-import org.eclipse.wst.css.core.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelFinder;
-import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelUtil;
-import org.w3c.dom.css.CSSCharsetRule;
-import org.w3c.dom.css.CSSFontFaceRule;
-import org.w3c.dom.css.CSSImportRule;
-import org.w3c.dom.css.CSSMediaRule;
-import org.w3c.dom.css.CSSPageRule;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSStyleDeclaration;
-import org.w3c.dom.css.CSSStyleRule;
-import org.w3c.dom.css.CSSValue;
-
-/**
- */
-public class CSSImageType {
-
- private final String fName;
-
- private CSSImageType(String name) {
- this.fName = name;
- }
-
- public String toString() {
- return fName;
- }
-
- public static final CSSImageType STYLESHEET = new CSSImageType("STYLESHEET"); //$NON-NLS-1$
-
- public static final CSSImageType RULE_CHARSET = new CSSImageType("RULE_CHARSET"); //$NON-NLS-1$
- public static final CSSImageType RULE_FONTFACE = new CSSImageType("RULE_FONTFACE"); //$NON-NLS-1$
- public static final CSSImageType RULE_IMPORT = new CSSImageType("RULE_IMPORT"); //$NON-NLS-1$
- public static final CSSImageType RULE_MEDIA = new CSSImageType("RULE_MEDIA"); //$NON-NLS-1$
- public static final CSSImageType RULE_PAGE = new CSSImageType("RULE_PAGE"); //$NON-NLS-1$
- public static final CSSImageType RULE_STYLE = new CSSImageType("RULE_STYLE"); //$NON-NLS-1$
- public static final CSSImageType RULE_UNKNOWN = new CSSImageType("RULE_UNKNOWN"); //$NON-NLS-1$
-
- public static final CSSImageType SELECTOR_CLASS = new CSSImageType("SELECTOR_CLASS"); //$NON-NLS-1$
- public static final CSSImageType SELECTOR_ID = new CSSImageType("SELECTOR_ID"); //$NON-NLS-1$
- public static final CSSImageType SELECTOR_DEFAULT = new CSSImageType("SELECTOR_DEFAULT"); //$NON-NLS-1$
- public static final CSSImageType SELECTOR_PSEUDO = new CSSImageType("SELECTOR_PSEUDO"); //$NON-NLS-1$
- public static final CSSImageType SELECTOR_TAG = new CSSImageType("SELECTOR_TAG"); //$NON-NLS-1$
- public static final CSSImageType SELECTOR_LINK = new CSSImageType("SELECTOR_LINK"); //$NON-NLS-1$
-
- public static final CSSImageType VALUE_FUNCTION = new CSSImageType("VALUE_FUNCTION"); //$NON-NLS-1$
- public static final CSSImageType VALUE_NUMBER = new CSSImageType("VALUE_NUMBER"); //$NON-NLS-1$
- public static final CSSImageType VALUE_STRING = new CSSImageType("VALUE_STRING"); //$NON-NLS-1$
-
- public static final CSSImageType CATEGORY_AURAL = new CSSImageType("CATEGORY_AURAL"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_BOX = new CSSImageType("CATEGORY_BOX"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_COLORANDBACKGROUND = new CSSImageType("CATEGORY_COLORANDBACKGROUND"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_CONTENT = new CSSImageType("CATEGORY_CONTENT"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_FONT = new CSSImageType("CATEGORY_FONT"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_PAGE = new CSSImageType("CATEGORY_PAGE"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_TABLES = new CSSImageType("CATEGORY_TABLES"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_TEXT = new CSSImageType("CATEGORY_TEXT"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_UI = new CSSImageType("CATEGORY_UI"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_VISUAL = new CSSImageType("CATEGORY_VISUAL"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_DEFAULT = new CSSImageType("CATEGORY_DEFAULT"); //$NON-NLS-1$
-
- /**
- * by node
- */
- public static CSSImageType getImageType(ICSSNode node) {
- CSSImageType imageType = null;
- if (node instanceof CSSCharsetRule) {
- imageType = RULE_CHARSET;
- } else if (node instanceof CSSFontFaceRule) {
- imageType = RULE_FONTFACE;
- } else if (node instanceof CSSImportRule) {
- imageType = RULE_IMPORT;
- } else if (node instanceof CSSMediaRule) {
- imageType = RULE_MEDIA;
- } else if (node instanceof CSSPageRule) {
- imageType = RULE_PAGE;
- } else if (node instanceof CSSStyleRule) {
- imageType = getImageType(((ICSSStyleRule) node).getSelectors());
- } else if (node instanceof CSSStyleDeclaration) {
- ICSSNode parent = node.getParentNode();
- if (parent != null) {
- return getImageType(parent);
- }
- } else if (node instanceof ICSSStyleDeclItem) {
- String name = ((ICSSStyleDeclItem) node).getPropertyName();
- ICSSDocument doc = node.getOwnerDocument();
- ICSSModel model = (doc != null) ? doc.getModel() : null;
- CSSMetaModelFinder finder = CSSMetaModelFinder.getInstance();
- CSSMetaModel metaModel = finder.findMetaModelFor(model);
- // is font-face rule ?
- ICSSNode parent = node.getParentNode();
- if (parent != null) {
- parent = parent.getParentNode();
- if (parent instanceof CSSFontFaceRule) {
- imageType = CSSImageType.CATEGORY_FONT;
- }
- }
- if (imageType == null) {
- CSSMMProperty prop = new CSSMetaModelUtil(metaModel).getProperty(name);
- if (prop != null) {
- String category = prop.getAttribute("category"); //$NON-NLS-1$
- imageType = getImageType(category);
- }
- if (imageType == null) {
- imageType = CSSImageType.CATEGORY_DEFAULT;
- }
- }
- } else if (node instanceof CSSValue) {
- switch (((CSSValue) node).getCssValueType()) {
- case CSSPrimitiveValue.CSS_NUMBER :
- case CSSPrimitiveValue.CSS_PERCENTAGE :
- case CSSPrimitiveValue.CSS_EMS :
- case CSSPrimitiveValue.CSS_EXS :
- case CSSPrimitiveValue.CSS_PX :
- case CSSPrimitiveValue.CSS_CM :
- case CSSPrimitiveValue.CSS_MM :
- case CSSPrimitiveValue.CSS_IN :
- case CSSPrimitiveValue.CSS_PT :
- case CSSPrimitiveValue.CSS_PC :
- case CSSPrimitiveValue.CSS_DEG :
- case CSSPrimitiveValue.CSS_RAD :
- case CSSPrimitiveValue.CSS_GRAD :
- case CSSPrimitiveValue.CSS_MS :
- case CSSPrimitiveValue.CSS_S :
- case CSSPrimitiveValue.CSS_HZ :
- case CSSPrimitiveValue.CSS_KHZ :
- case CSSPrimitiveValue.CSS_DIMENSION :
- case ICSSPrimitiveValue.CSS_INTEGER :
- case ICSSPrimitiveValue.CSS_HASH :
- imageType = VALUE_NUMBER;
- break;
- case CSSPrimitiveValue.CSS_ATTR :
- case CSSPrimitiveValue.CSS_COUNTER :
- case CSSPrimitiveValue.CSS_RECT :
- case CSSPrimitiveValue.CSS_RGBCOLOR :
- case CSSPrimitiveValue.CSS_URI :
- case ICSSPrimitiveValue.CSS_FORMAT :
- case ICSSPrimitiveValue.CSS_LOCAL :
- imageType = VALUE_FUNCTION;
- break;
- default :
- imageType = VALUE_STRING;
- break;
- }
- }
- return imageType;
- }
-
- public static CSSImageType getImageType(ICSSSelectorList selectorList) {
- if (selectorList == null || selectorList.getLength() == 0) {
- return SELECTOR_DEFAULT;
- }
- CSSImageType imageType = null;
- int nSelectors = selectorList.getLength();
- for (int i = 0; i < nSelectors; i++) {
- CSSImageType candidate = getImageType(selectorList.getSelector(i));
- if (imageType == null) {
- imageType = candidate;
- } else if (imageType != candidate) {
- imageType = null;
- break;
- }
- }
-
- return (imageType == null) ? SELECTOR_DEFAULT : imageType;
- }
-
- public static CSSImageType getImageType(ICSSSelector selector) {
- CSSImageType imageType = SELECTOR_DEFAULT;
- if (selector == null || selector.getLength() == 0) {
- return imageType;
- }
- ICSSSelectorItem item = selector.getItem(selector.getLength() - 1);
- if (item.getItemType() == ICSSSelectorItem.SIMPLE) {
- ICSSSimpleSelector ss = (ICSSSimpleSelector) item;
- if (0 < ss.getNumOfIDs()) {
- imageType = SELECTOR_ID;
- } else if (0 < ss.getNumOfClasses()) {
- imageType = SELECTOR_CLASS;
- } else if (0 < ss.getNumOfPseudoNames()) {
- imageType = SELECTOR_PSEUDO;
- } else {
- imageType = SELECTOR_TAG;
- }
- }
- return imageType;
- }
-
- public static CSSImageType getImageType(String category) {
- if (fCategoryMap == null) {
- fCategoryMap = new HashMap();
- fCategoryMap.put("aural", CATEGORY_AURAL); //$NON-NLS-1$
- fCategoryMap.put("box", CATEGORY_BOX); //$NON-NLS-1$
- fCategoryMap.put("colorandbackground", CATEGORY_COLORANDBACKGROUND); //$NON-NLS-1$
- fCategoryMap.put("content", CATEGORY_CONTENT); //$NON-NLS-1$
- fCategoryMap.put("font", CATEGORY_FONT); //$NON-NLS-1$
- fCategoryMap.put("page", CATEGORY_PAGE); //$NON-NLS-1$
- fCategoryMap.put("tables", CATEGORY_TABLES); //$NON-NLS-1$
- fCategoryMap.put("text", CATEGORY_TEXT); //$NON-NLS-1$
- fCategoryMap.put("ui", CATEGORY_UI); //$NON-NLS-1$
- fCategoryMap.put("visual", CATEGORY_VISUAL); //$NON-NLS-1$
- }
- CSSImageType imageType = (CSSImageType) fCategoryMap.get(category);
- return (imageType == null) ? CATEGORY_DEFAULT : imageType;
- }
-
- private static Map fCategoryMap = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java
deleted file mode 100644
index ee42ad7154..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java
+++ /dev/null
@@ -1,153 +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.css.ui.internal;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.css.ui.style.IStyleConstantsCSS;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-import org.eclipse.wst.sse.ui.preferences.ui.ColorHelper;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class CSSUIPlugin extends AbstractUIPlugin {
- public final static String ID = "org.eclipse.wst.css.ui"; //$NON-NLS-1$
- //The shared instance.
- private static CSSUIPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
- private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
- private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public CSSUIPlugin() {
- super();
- plugin = this;
-
- // Force a call to initialize default preferences since
- // initializeDefaultPreferences is only called if *this* plugin's
- // preference store is accessed
- initializeDefaultCSSPreferences(SSEUIPlugin.getDefault().getPreferenceStore());
- }
-
- /**
- * Returns the shared instance.
- */
- public static CSSUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- protected void initializeDefaultPreferences(IPreferenceStore store) {
-
- // ignore this preference store
- // use EditorPlugin preference store
- IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore();
- initializeDefaultCSSPreferences(editorStore);
- }
-
- private void initializeDefaultCSSPreferences(IPreferenceStore store) {
- String ctId = IContentTypeIdentifier.ContentTypeID_CSS;
-
- // CSS Style Preferences
- String NOBACKGROUNDBOLD = " | null | false"; //$NON-NLS-1$
- String styleValue = "null" + NOBACKGROUNDBOLD; //$NON-NLS-1$
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.NORMAL, ctId), styleValue);
-
- styleValue = ColorHelper.getColorString(63, 127, 127) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.ATMARK_RULE, ctId), styleValue);
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.SELECTOR, ctId), styleValue);
-
- styleValue = ColorHelper.getColorString(42, 0, 225) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.MEDIA, ctId), styleValue);
-
- styleValue = ColorHelper.getColorString(63, 95, 191) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.COMMENT, ctId), styleValue);
-
- styleValue = ColorHelper.getColorString(127, 0, 127) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.PROPERTY_NAME, ctId), styleValue);
-
- styleValue = ColorHelper.getColorString(42, 0, 225) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.PROPERTY_VALUE, ctId), styleValue);
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.URI, ctId), styleValue);
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.STRING, ctId), styleValue);
-
- styleValue = "null" + NOBACKGROUNDBOLD; //$NON-NLS-1$
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.COLON, ctId), styleValue);
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.SEMI_COLON, ctId), styleValue);
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.CURLY_BRACE, ctId), styleValue);
-
- styleValue = ColorHelper.getColorString(191, 63, 63) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.ERROR, ctId), styleValue);
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String value) {
- String s = value.trim();
- if (!s.startsWith(KEY_PREFIX, 0))
- return s;
- if (s.startsWith(KEY_DOUBLE_PREFIX, 0))
- return s.substring(1);
-
- int ix = s.indexOf(' ');
- String key = ix == -1 ? s : s.substring(0, ix);
-
- ResourceBundle bundle = getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key.substring(1)) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- public static String getResourceString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (IllegalArgumentException e) {
- return getResourceString(key);
- }
-
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.css.ui.internal.CSSUIPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties
deleted file mode 100644
index 2fa1626e12..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties
+++ /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
-###############################################################################
-
-INFO_Not_Categorized_1=Not Categorized
-
-## CSS Preferences -- source ##
-PrefsLabel.WrappingWithoutAttr=Disable wrapping in style &attribute of HTML
-PrefsLabel.WrappingInsertLineBreak=Insert &line break between properties
-
-PrefsLabel.CaseGroup=Capitalization style
-PrefsLabel.CaseIdent=Identifier:
-PrefsLabel.CasePropName=Property name:
-PrefsLabel.CasePropValue=Property value:
-
-PrefsLabel.CaseIdentUpper=&Uppercase
-PrefsLabel.CaseIdentLower=L&owercase
-PrefsLabel.CasePropNameUpper=U&ppercase
-PrefsLabel.CasePropNameLower=Lo&wercase
-PrefsLabel.CasePropValueUpper=Upp&ercase
-PrefsLabel.CasePropValueLower=Lowe&rcase
-
-## CSS Preferences -- color ##
-
-## The following line is a sample CSS document. Please translate only the following parts:
-## Sample Styles
-PrefsLabel.ColorSample=@import url("../sample2.css");\n\n/* Sample Styles */\n\nBODY {\n\tcolor : black;\n\tbackground-color : rgb(181, 253, 211);\n\ttext-align : center;\n\tfont-family : "Heisei Mincho W3", serif\n}\n\n@page :left { margin-left : 4cm }\n\n@media aural {\n\tP.heidi {\n\t\tazimuth : center-left;\n\t\televation : 12.3deg;\n\t\tpause : 30ms 1.6s\n\t}\n}\n
-
-PrefsLabel.ColorNormal=Default
-PrefsLabel.ColorAtmarkRule=At-Rule
-PrefsLabel.ColorSelector=Selector
-PrefsLabel.ColorMedia=Media Name
-PrefsLabel.ColorComment=Comment
-PrefsLabel.ColorPropertyName=Property Name
-PrefsLabel.ColorPropertyValue=Property Value
-PrefsLabel.ColorUri=URI
-PrefsLabel.ColorString=Quoted String
-PrefsLabel.ColorColon=Property Delimiter
-PrefsLabel.ColorSemiColon=SemiColon
-PrefsLabel.ColorCurlyBrace=Curly Brace
-PrefsLabel.ColorError=Error
-#
-SortAction.0=Sort
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/Logger.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/Logger.java
deleted file mode 100644
index 5f3336b077..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/Logger.java
+++ /dev/null
@@ -1,156 +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.css.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.css.ui"; //$NON-NLS-1$
-
- private static final String TRACEFILTER_LOCATION = "/debug/tracefilter"; //$NON-NLS-1$
-
- public static final int OK = IStatus.OK; // 0
- public static final int INFO = IStatus.INFO; // 1
- public static final int WARNING = IStatus.WARNING; // 2
- public static final int ERROR = IStatus.ERROR; // 4
-
- public static final int OK_DEBUG = 200 + OK;
- public static final int INFO_DEBUG = 200 + INFO;
- public static final int WARNING_DEBUG = 200 + WARNING;
- public static final int ERROR_DEBUG = 200 + ERROR;
-
- /**
- * 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 traceException(String category, String message, Throwable exception) {
- _trace(category, message, exception);
- }
-
- public static void traceException(String category, Throwable exception) {
- _trace(category, exception.getMessage(), exception);
- }
-
- public static void trace(String category, String message) {
- _trace(category, message, null);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/CSSEditorPluginImages.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/CSSEditorPluginImages.java
deleted file mode 100644
index c7d179fb39..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/CSSEditorPluginImages.java
+++ /dev/null
@@ -1,51 +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.css.ui.internal.editor;
-
-
-/**
- * Bundle of most images used by the CSS Source Editor plug-in.
- */
-public class CSSEditorPluginImages {
- public static final String IMG_OBJ_SORT = "icons/full/obj16/sort.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_STYLESHEET = "icons/full/obj16/stylesheet.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_CHARSET = "icons/full/obj16/charset_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_FONTFACE = "icons/full/obj16/fontface_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_IMPORT = "icons/full/obj16/link_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_MEDIA = "icons/full/obj16/media_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_PAGE = "icons/full/obj16/page_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_STYLE = "icons/full/obj16/style_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_UNKNOWN = "icons/full/obj16/unknown_rule.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_SELECTOR_CLASS = "icons/full/obj16/class_selector.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SELECTOR_ID = "icons/full/obj16/id_selector.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SELECTOR_PSEUDO = "icons/full/obj16/pseudo.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SELECTOR_TAG = "icons/full/obj16/tag_selector.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SELECTOR_LINK = "icons/full/obj16/link_selector.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SELECTOR_DEFAULT = "icons/full/obj16/tag_selector.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_VALUE_FUNCTION = "icons/full/obj16/css_propertyvalue_function.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_VALUE_NUMBER = "icons/full/obj16/css_propertyvalue_unit.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_VALUE_STRING = "icons/full/obj16/css_propertyvalue_identifier.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_CATEGORY_AURAL = "icons/full/obj16/aural_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_BOX = "icons/full/obj16/boxmodel_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_COLORANDBACKGROUND = "icons/full/obj16/colback_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_CONTENT = "icons/full/obj16/content_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_FONT = "icons/full/obj16/font_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_PAGE = "icons/full/obj16/pagedmedia_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_TABLES = "icons/full/obj16/table_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_TEXT = "icons/full/obj16/text_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_UI = "icons/full/obj16/ui_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_VISUAL = "icons/full/obj16/visual_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_DEFAULT = "icons/full/obj16/other_props.gif"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/IHelpContextIds.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/IHelpContextIds.java
deleted file mode 100644
index d6a82a1154..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/IHelpContextIds.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.css.ui.internal.editor;
-
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-
-/**
- * Help context ids for the CSS Source Editor.
- * <p>
- * This interface contains constants only; it is not intended to be
- * implemented.
- * </p>
- *
- */
-public interface IHelpContextIds {
- // org.eclipse.wst.css.ui.
- public static final String PREFIX = CSSUIPlugin.ID + "."; //$NON-NLS-1$
-
- // CSS Source page editor
- public static final String CSS_SOURCEVIEW_HELPID = PREFIX + "ecss0000"; //$NON-NLS-1$
-
- // CSS Files Preference page
- public static final String CSS_PREFWEBX_FILES_HELPID = PREFIX + "webx0010"; //$NON-NLS-1$
- // CSS Source Preference page
- public static final String CSS_PREFWEBX_SOURCE_HELPID = PREFIX + "webx0011"; //$NON-NLS-1$
- // CSS Styles Preference page
- public static final String CSS_PREFWEBX_STYLES_HELPID = PREFIX + "webx0012"; //$NON-NLS-1$
-
- // CSS Cleanup dialog
- public static final String CSS_CLEANUP_HELPID = PREFIX + "xmlm1300"; //$NON-NLS-1$
-
- // CSS Content Settings
- public static final String CSS_CONTENT_SETTINGS_HELPID = PREFIX + "misc0180"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectCSSAction.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectCSSAction.java
deleted file mode 100644
index cf318d6c58..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectCSSAction.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.css.ui.internal.selection;
-
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory;
-import org.eclipse.wst.sse.ui.internal.selection.StructureSelectAction;
-
-public abstract class StructureSelectCSSAction extends StructureSelectAction {
- public StructureSelectCSSAction(StructuredTextEditor editor, SelectionHistory history) {
- super(editor, history);
- }
-
- public void run() {
- Region currentRegion = new Region(fViewer.getSelectedRange().x, fViewer.getSelectedRange().y);
- if (currentRegion.getLength() == fViewer.getDocument().getLength())
- return;
-
- IndexedRegion cursorIndexedRegion = getCursorIndexedRegion();
- if (cursorIndexedRegion instanceof ICSSNode) {
- ICSSNode cursorNode = (ICSSNode) cursorIndexedRegion;
-
- Region cursorNodeRegion = new Region(cursorIndexedRegion.getStartOffset(), cursorIndexedRegion.getEndOffset() - cursorIndexedRegion.getStartOffset());
-
- Region newRegion = null;
- if (cursorNodeRegion.getOffset() >= currentRegion.getOffset() && cursorNodeRegion.getOffset() <= currentRegion.getOffset() + currentRegion.getLength() && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= currentRegion.getOffset() && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= currentRegion.getOffset() + currentRegion.getLength())
- newRegion = getNewSelectionRegion(cursorNode, currentRegion);
- else
- newRegion = cursorNodeRegion;
-
- if (newRegion != null) {
- fHistory.remember(currentRegion);
- try {
- fHistory.ignoreSelectionChanges();
- fEditor.selectAndReveal(newRegion.getOffset(), newRegion.getLength());
- } finally {
- fHistory.listenToSelectionChanges();
- }
- }
- }
- }
-
- abstract protected Region getNewSelectionRegion(ICSSNode node, Region region);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectEnclosingCSSAction.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectEnclosingCSSAction.java
deleted file mode 100644
index e6b2dde1f5..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectEnclosingCSSAction.java
+++ /dev/null
@@ -1,47 +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.css.ui.internal.selection;
-
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory;
-import org.w3c.dom.Node;
-
-public class StructureSelectEnclosingCSSAction extends StructureSelectCSSAction {
- public StructureSelectEnclosingCSSAction(StructuredTextEditor editor, SelectionHistory history) {
- super(editor, history);
- setText(SSEUIPlugin.getResourceString("%StructureSelectEnclosing.label")); //$NON-NLS-1$
- setToolTipText(SSEUIPlugin.getResourceString("%StructureSelectEnclosing.tooltip")); //$NON-NLS-1$
- setDescription(SSEUIPlugin.getResourceString("%StructureSelectEnclosing.description")); //$NON-NLS-1$
- }
-
- protected IndexedRegion getCursorIndexedRegion() {
- return getIndexedRegion(fViewer.getSelectedRange().x);
- }
-
- protected Region getNewSelectionRegion(Node node, Region region) {
- return null;
- }
-
- protected Region getNewSelectionRegion(ICSSNode node, Region region) {
- Region newRegion = null;
-
- ICSSNode newNode = node.getParentNode();
-
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
- }
-
- return newRegion;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectNextCSSAction.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectNextCSSAction.java
deleted file mode 100644
index acd37156c5..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectNextCSSAction.java
+++ /dev/null
@@ -1,60 +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.css.ui.internal.selection;
-
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory;
-import org.w3c.dom.Node;
-
-public class StructureSelectNextCSSAction extends StructureSelectCSSAction {
- public StructureSelectNextCSSAction(StructuredTextEditor editor, SelectionHistory history) {
- super(editor, history);
- setText(SSEUIPlugin.getResourceString("%StructureSelectNext.label")); //$NON-NLS-1$
- setToolTipText(SSEUIPlugin.getResourceString("%StructureSelectNext.tooltip")); //$NON-NLS-1$
- setDescription(SSEUIPlugin.getResourceString("%StructureSelectNext.description")); //$NON-NLS-1$
- }
-
- protected IndexedRegion getCursorIndexedRegion() {
- int offset = fViewer.getSelectedRange().x + fViewer.getSelectedRange().y - 1;
-
- if (offset < 0)
- offset = 0;
-
- return getIndexedRegion(offset);
- }
-
- protected Region getNewSelectionRegion(Node node, Region region) {
- return null;
- }
-
- protected Region getNewSelectionRegion(ICSSNode node, Region region) {
- Region newRegion = null;
-
- ICSSNode newNode = node.getNextSibling();
- if (newNode == null) {
- newNode = node.getParentNode();
-
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
- }
- } else {
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(region.getOffset(), newIndexedRegion.getEndOffset() - region.getOffset());
- }
- }
-
- return newRegion;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectPreviousCSSAction.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectPreviousCSSAction.java
deleted file mode 100644
index 91b001dd8a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectPreviousCSSAction.java
+++ /dev/null
@@ -1,55 +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.css.ui.internal.selection;
-
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory;
-import org.w3c.dom.Node;
-
-public class StructureSelectPreviousCSSAction extends StructureSelectCSSAction {
- public StructureSelectPreviousCSSAction(StructuredTextEditor editor, SelectionHistory history) {
- super(editor, history);
- setText(SSEUIPlugin.getResourceString("%StructureSelectPrevious.label")); //$NON-NLS-1$
- setToolTipText(SSEUIPlugin.getResourceString("%StructureSelectPrevious.tooltip")); //$NON-NLS-1$
- setDescription(SSEUIPlugin.getResourceString("%StructureSelectPrevious.description")); //$NON-NLS-1$
- }
-
- protected IndexedRegion getCursorIndexedRegion() {
- return getIndexedRegion(fViewer.getSelectedRange().x);
- }
-
- protected Region getNewSelectionRegion(Node node, Region region) {
- return null;
- }
-
- protected Region getNewSelectionRegion(ICSSNode node, Region region) {
- Region newRegion = null;
-
- ICSSNode newNode = node.getPreviousSibling();
- if (newNode == null) {
- newNode = node.getParentNode();
-
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
- }
- } else {
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), region.getOffset() + region.getLength() - newIndexedRegion.getStartOffset());
- }
- }
-
- return newRegion;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/CSSPreferenceManager.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/CSSPreferenceManager.java
deleted file mode 100644
index cb462279b9..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/CSSPreferenceManager.java
+++ /dev/null
@@ -1,184 +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.css.ui.preferences;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.sse.ui.preferences.PreferenceManager;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * @deprecated preference management has moved to base preferences
- */
-public class CSSPreferenceManager extends PreferenceManager {
-
- private static CSSPreferenceManager fInstance = null;
- //
- private final static String GROUP_COLOR = "color";//$NON-NLS-1$
- private final static String COLOR_ENABLED = "useColor";//$NON-NLS-1$
- //
- private final static String GROUP_ASSIST = "contentAssist"; //$NON-NLS-1$
- private final static String ASSIST_CATEGORIZE = "categorize"; //$NON-NLS-1$
-
- protected Document fallbackDocument = null;
-
- /**
- *
- */
- protected CSSPreferenceManager() {
- super();
- }
-
- /**
- *
- */
- public Document createDefaultPreferences() {
- Document doc = super.createDefaultPreferences();
- if (doc == null) {
- return doc;
- }
-
- Node preference = doc.getFirstChild();
-
- Element color = doc.createElement(GROUP_COLOR);
- setBooleanAttribute(color, COLOR_ENABLED, true);
- preference.appendChild(color);
-
- Element contentAssist = doc.createElement(GROUP_ASSIST);
- setBooleanAttribute(contentAssist, ASSIST_CATEGORIZE, true);
- preference.appendChild(contentAssist);
-
- return doc;
- }
-
- public boolean getContentAssistCategorize() {
- return getBooleanAttribute(getGroupElement(GROUP_ASSIST), ASSIST_CATEGORIZE);
- }
-
- public void setContentAssistCategorize(boolean categorize) {
- setBooleanAttribute(getGroupElement(GROUP_ASSIST), ASSIST_CATEGORIZE, categorize);
- }
-
- /**
- *
- */
- protected boolean getBooleanAttribute(Element element, String name) {
- String str = element.getAttribute(name);
- if (str == null || str.length() <= 0) {
- element = getDefaultGroupElement(element.getTagName());
- if (element != null)
- str = element.getAttribute(name);
- }
- return (str == null) ? false : str.equals(Boolean.TRUE.toString());
- }
-
- /**
- *
- */
- public boolean getColorEnabled() {
- return getBooleanAttribute(getGroupElement(GROUP_COLOR), COLOR_ENABLED);
- }
-
- /**
- *
- */
- protected String getFilename() {
- if (fileName == null) {
- fileName = Platform.getStateLocation(Platform.getBundle("org.eclipse.wst.sse.core")).toString() + "/cssprefs.xml";//$NON-NLS-1$ //$NON-NLS-2$
- }
- return fileName;
- }
-
- /**
- *
- */
- protected Element getGroupElement(String name) {
- Node node = getNamedChild(getRootElement(), name);
- return (node instanceof Element) ? (Element) node : getDefaultGroupElement(name);
- }
-
- /**
- *
- */
- protected Element getDefaultGroupElement(String name) {
- Node node = getNamedChild(getDefaultRootElement(), name);
- return (node instanceof Element) ? (Element) node : null;
- }
-
- /**
- *
- */
- protected Node getDefaultRootElement() {
- if (fallbackDocument == null)
- fallbackDocument = createDefaultPreferences();
- return getRootElement(fallbackDocument);
- }
-
- /**
- *
- */
- public synchronized static CSSPreferenceManager getInstance() {
- if (fInstance == null) {
- fInstance = new CSSPreferenceManager();
- }
- return fInstance;
- }
-
- /**
- *
- */
- protected int getIntAttribute(Element element, String name) {
- int value = 0;
- try {
- value = Integer.parseInt(element.getAttribute(name));
- } catch (NumberFormatException e) {
- element = getDefaultGroupElement(element.getTagName());
- try {
- value = Integer.parseInt(element.getAttribute(name));
- } catch (NumberFormatException ee) {
- }
- }
- return value;
- }
-
- /**
- *
- */
- protected String getStringAttribute(Element element, String name) {
- if (element.getAttributeNode(name) == null) {
- element = getDefaultGroupElement(element.getTagName());
- }
- return element.getAttribute(name);
- }
-
- /**
- *
- */
- protected void setBooleanAttribute(Element element, String name, boolean value) {
- element.setAttribute(name, new Boolean(value).toString());
- }
-
- /**
- *
- */
- public void setColorEnabled(boolean enabled) {
- setBooleanAttribute(getGroupElement(GROUP_COLOR), COLOR_ENABLED, enabled);
- }
-
- /**
- *
- */
- protected void setStringAttribute(Element element, String name, String value) {
- element.setAttribute(name, value);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorManager.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorManager.java
deleted file mode 100644
index 2b68638d96..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorManager.java
+++ /dev/null
@@ -1,227 +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.css.ui.preferences.ui;
-
-
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.wst.css.ui.internal.Logger;
-import org.eclipse.wst.css.ui.style.IStyleConstantsCSS;
-import org.eclipse.wst.sse.ui.preferences.PreferenceManager;
-import org.eclipse.wst.sse.ui.preferences.ui.ColorNames;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * @deprecated color preference management has moved to base preferences
- */
-public class CSSColorManager extends PreferenceManager {
-
- private static CSSColorManager fInstance = null;
- // highlighting types
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String NORMAL = "NORMAL";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String ATMARK_RULE = "ATMARK_RULE";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String SELECTOR = "SELECTOR";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String MEDIA = "MEDIA"; //$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String COMMENT = "COMMENT";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String PROPERTY_NAME = "PROPERTY_NAME";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String PROPERTY_VALUE = "PROPERTY_VALUE";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String URI = "URI";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String STRING = "STRING";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String COLON = "COLON";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String SEMI_COLON = "SEMI_COLON";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String CURLY_BRACE = "CURLY_BRACE";//$NON-NLS-1$
- /** @deprecated use IStyleConstantsCSS instead TODO remove in C5 or earlier */
- public static final String ERROR = "ERROR";//$NON-NLS-1$
- // names for preference elements ... non-NLS
- public static final String FOREGROUND = "foreground";//$NON-NLS-1$
- public static final String BACKGROUND = "background";//$NON-NLS-1$
- public static final String BOLD = "bold";//$NON-NLS-1$
- public static final String ITALIC = "italic";//$NON-NLS-1$
- public static final String NAME = "name";//$NON-NLS-1$
- public static final String COLOR = "color";//$NON-NLS-1$
-
- private CSSColorManager() {
- super();
- }
-
- protected Element addColor(Node colors, String name, String foreground, String background) {
- Element newColor = newColor(colors.getOwnerDocument(), name, foreground, background);
- colors.appendChild(newColor);
- return newColor;
- }
-
- /**
- * <!ELEMENT colors (color) > <!ELEMENT color EMPTY > <!ATTLIST color name
- * CDATA #REQUIRED foreground CDATA #IMPLIED background CDATA #IMPLIED
- * bold CDATA #REQUIRED >
- *
- */
- public Document createDefaultPreferences() {
- Document prefDocument = super.createDefaultPreferences();
- if (prefDocument == null)
- return prefDocument;
-
- while (prefDocument.getChildNodes().getLength() > 0)
- prefDocument.removeChild(prefDocument.getLastChild());
- Element colors = prefDocument.createElement(getRootElementName());
- prefDocument.appendChild(colors);
-
- // current as of 2001-8-13
- addColor(colors, IStyleConstantsCSS.NORMAL, null, null);
- addColor(colors, IStyleConstantsCSS.ATMARK_RULE, getColorString(63, 127, 127), null);
- addColor(colors, IStyleConstantsCSS.SELECTOR, getColorString(63, 127, 127), null);
- addColor(colors, IStyleConstantsCSS.MEDIA, getColorString(42, 0, 225), null);
- addColor(colors, IStyleConstantsCSS.COMMENT, getColorString(63, 95, 191), null);
- addColor(colors, IStyleConstantsCSS.PROPERTY_NAME, getColorString(127, 0, 127), null);
- addColor(colors, IStyleConstantsCSS.PROPERTY_VALUE, getColorString(42, 0, 225), null);
- addColor(colors, IStyleConstantsCSS.URI, getColorString(42, 0, 225), null);
- addColor(colors, IStyleConstantsCSS.STRING, getColorString(42, 0, 225), null);
- addColor(colors, IStyleConstantsCSS.COLON, null, null);
- addColor(colors, IStyleConstantsCSS.SEMI_COLON, null, null);
- addColor(colors, IStyleConstantsCSS.CURLY_BRACE, null, null);
- addColor(colors, IStyleConstantsCSS.ERROR, getColorString(191, 63, 63), null);
-
- return prefDocument;
- }
-
- public RGB getBackgroundRGB(String name) {
- Element element = getColorElement(name);
- if (element != null) {
- return getRGB(element.getAttribute(BACKGROUND));
- } else {
- return new RGB(255, 255, 255);
- }
- }
-
- private Element getColorElement(String name) {
- Node colorsElement = getRootElement();
- NodeList colors = colorsElement.getChildNodes();
- for (int i = 0; i < colors.getLength(); i++) {
- Node node = colors.item(i);
- if (node.getNodeType() == Node.ELEMENT_NODE && ((Element) node).getAttribute(NAME).equals(name)) {
- return (Element) node;
- }
- }
- return null;
- }
-
- public static String getColorString(int r, int g, int b) {
- return "#" + getHexString(r, 2) + getHexString(g, 2) + getHexString(b, 2);//$NON-NLS-1$
- }
-
- public String getFilename() {
- if (fileName == null) {
- fileName = Platform.getStateLocation(Platform.getBundle("org.eclipse.sse.core")).toString() + "/csssourcecolors.xml";//$NON-NLS-1$ //$NON-NLS-2$
- }
- return fileName;
- }
-
- public RGB getForegroundRGB(String name) {
- Element element = getColorElement(name);
- if (element != null) {
- return getRGB(element.getAttribute(FOREGROUND));
- } else {
- return new RGB(0, 0, 0);
- }
- }
-
- public static String getHexString(int value, int minWidth) {
- String hexString = Integer.toHexString(value);
- for (int i = hexString.length(); i < minWidth; i++) {
- hexString = "0" + hexString;//$NON-NLS-1$
- }
- return hexString;
- }
-
- public synchronized static CSSColorManager getInstance() {
- if (fInstance == null) {
- fInstance = new CSSColorManager();
- }
- return fInstance;
- }
-
- private RGB getRGB(String rgbStr) {
- RGB result = null;
- if (6 < rgbStr.length() && rgbStr.charAt(0) == '#') {
- try {
- int r = Integer.valueOf(rgbStr.substring(1, 3), 16).intValue();
- int g = Integer.valueOf(rgbStr.substring(3, 5), 16).intValue();
- int b = Integer.valueOf(rgbStr.substring(5, 7), 16).intValue();
- result = new RGB(r, g, b);
- } catch (NumberFormatException e) {
- Logger.logException("Invalid color string " + rgbStr, e); //$NON-NLS-1$
- }
- }
- return result;
- }
-
- /**
- * The intended name for the root Element of the Document; what is also
- * listed within the DOCTYPE declaration.
- *
- * @return String
- */
- public String getRootElementName() {
- return ColorNames.COLORS;
- }
-
- public int getStyle(String name) {
- int style = SWT.NORMAL;
- Element element = getColorElement(name);
- if (element != null) {
- if (Boolean.valueOf(element.getAttribute(BOLD)).booleanValue()) {
- style |= SWT.BOLD;
- }
- if (Boolean.valueOf(element.getAttribute(ITALIC)).booleanValue()) {
- style |= SWT.ITALIC;
- }
- }
- return style;
- }
-
- protected Element newColor(Document doc, String name, String foreground, String background) {
- if (doc == null || name == null || name.length() < 1)
- return null;
- Element newColor = doc.createElement(ColorNames.COLOR);
- newColor.setAttribute(ColorNames.NAME, name);
- if (foreground != null)
- newColor.setAttribute(ColorNames.FOREGROUND, foreground);
- if (background != null)
- newColor.setAttribute(ColorNames.BACKGROUND, background);
- return newColor;
- }
-
- protected Element newColor(Document doc, String name, String foreground, String background, boolean bold, boolean italic) {
- Element newColor = newColor(doc, name, foreground, background);
- if (newColor == null)
- return null;
- newColor.setAttribute(ColorNames.BOLD, String.valueOf(bold));
- newColor.setAttribute(ColorNames.ITALIC, String.valueOf(italic));
- return newColor;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorPage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorPage.java
deleted file mode 100644
index f196fff97a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorPage.java
+++ /dev/null
@@ -1,227 +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.css.ui.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.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.css.ui.style.IStyleConstantsCSS;
-import org.eclipse.wst.sse.core.IModelManager;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore.OverlayKey;
-import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-import org.eclipse.wst.sse.ui.preferences.ui.AbstractColorPage;
-import org.eclipse.wst.sse.ui.preferences.ui.StyledTextColorPicker;
-
-public class CSSColorPage extends AbstractColorPage {
-
- /**
- * 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, PreferenceKeyGenerator.generateKey((String) i.next(), IContentTypeIdentifier.ContentTypeID_CSS)));
- }
-
- OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
- overlayKeys.toArray(keys);
- return keys;
- }
-
- protected Control createContents(Composite parent) {
- Composite pageComponent = createComposite(parent, 1);
- ((GridData) pageComponent.getLayoutData()).horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
-
- super.createContents(pageComponent);
-
- // assigning one help for whole group
- // WorkbenchHelp.setHelp(pageComponent,
- // "com.ibm.etools.webedit.core.cssp2000"); //$NON-NLS-1$
- WorkbenchHelp.setHelp(pageComponent, IHelpContextIds.CSS_PREFWEBX_STYLES_HELPID);
-
- return pageComponent;
- }
-
- protected Composite createColoringComposite(Composite parent) {
- Composite coloringComposite = super.createColoringComposite(parent);
-
- // assigning one help for whole group
- // WorkbenchHelp.setHelp(coloringComposite,
- // "com.ibm.etools.webedit.core.cssp2100"); //$NON-NLS-1$
-
- return coloringComposite;
- }
-
- /**
- * getSampleText method comment.
- */
- public String getSampleText() {
- return CSSUIPlugin.getResourceString("%PrefsLabel.ColorSample"); //$NON-NLS-1$
- }
-
- /**
- *
- * @param contextStyleMap
- * java.util.Dictionary
- */
- protected void initContextStyleMap(Dictionary contextStyleMap) {
- contextStyleMap.put(CSSRegionContexts.CSS_COMMENT, IStyleConstantsCSS.COMMENT);
- contextStyleMap.put(CSSRegionContexts.CSS_CDO, IStyleConstantsCSS.COMMENT);
- contextStyleMap.put(CSSRegionContexts.CSS_CDC, IStyleConstantsCSS.COMMENT);
- contextStyleMap.put(CSSRegionContexts.CSS_S, IStyleConstantsCSS.NORMAL);
-
- contextStyleMap.put(CSSRegionContexts.CSS_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
- contextStyleMap.put(CSSRegionContexts.CSS_LBRACE, IStyleConstantsCSS.CURLY_BRACE);
- contextStyleMap.put(CSSRegionContexts.CSS_RBRACE, IStyleConstantsCSS.CURLY_BRACE);
-
- contextStyleMap.put(CSSRegionContexts.CSS_IMPORT, IStyleConstantsCSS.ATMARK_RULE);
- contextStyleMap.put(CSSRegionContexts.CSS_PAGE, IStyleConstantsCSS.ATMARK_RULE);
- contextStyleMap.put(CSSRegionContexts.CSS_MEDIA, IStyleConstantsCSS.ATMARK_RULE);
- contextStyleMap.put(CSSRegionContexts.CSS_FONT_FACE, IStyleConstantsCSS.ATMARK_RULE);
- contextStyleMap.put(CSSRegionContexts.CSS_CHARSET, IStyleConstantsCSS.ATMARK_RULE);
- contextStyleMap.put(CSSRegionContexts.CSS_ATKEYWORD, IStyleConstantsCSS.ATMARK_RULE);
-
- contextStyleMap.put(CSSRegionContexts.CSS_STRING, IStyleConstantsCSS.STRING);
- contextStyleMap.put(CSSRegionContexts.CSS_URI, IStyleConstantsCSS.URI);
- contextStyleMap.put(CSSRegionContexts.CSS_MEDIUM, IStyleConstantsCSS.MEDIA);
- contextStyleMap.put(CSSRegionContexts.CSS_MEDIA_SEPARATOR, IStyleConstantsCSS.MEDIA);
-
- contextStyleMap.put(CSSRegionContexts.CSS_CHARSET_NAME, IStyleConstantsCSS.STRING);
-
- contextStyleMap.put(CSSRegionContexts.CSS_PAGE_SELECTOR, IStyleConstantsCSS.MEDIA);
-
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_UNIVERSAL, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_PSEUDO, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_CLASS, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ID, IStyleConstantsCSS.SELECTOR);
-
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_COMBINATOR, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_SEPARATOR, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_OPERATOR, IStyleConstantsCSS.SELECTOR);
-
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_PROPERTY, IStyleConstantsCSS.PROPERTY_NAME);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_STRING, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_URI, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_HASH, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_UNICODE_RANGE, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_S, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_SEPARATOR, IStyleConstantsCSS.COLON);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
-
- contextStyleMap.put(CSSRegionContexts.CSS_UNKNOWN, IStyleConstantsCSS.ERROR);
- }
-
- /**
- *
- * @param descriptions
- * java.util.Dictionary
- */
- protected void initDescriptions(Dictionary descriptions) {
- // create descriptions for hilighting types
- descriptions.put(IStyleConstantsCSS.NORMAL, CSSUIPlugin.getResourceString("%PrefsLabel.ColorNormal"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.ATMARK_RULE, CSSUIPlugin.getResourceString("%PrefsLabel.ColorAtmarkRule"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.SELECTOR, CSSUIPlugin.getResourceString("%PrefsLabel.ColorSelector"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.MEDIA, CSSUIPlugin.getResourceString("%PrefsLabel.ColorMedia"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.COMMENT, CSSUIPlugin.getResourceString("%PrefsLabel.ColorComment"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.PROPERTY_NAME, CSSUIPlugin.getResourceString("%PrefsLabel.ColorPropertyName"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.PROPERTY_VALUE, CSSUIPlugin.getResourceString("%PrefsLabel.ColorPropertyValue"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.URI, CSSUIPlugin.getResourceString("%PrefsLabel.ColorUri"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.STRING, CSSUIPlugin.getResourceString("%PrefsLabel.ColorString"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.COLON, CSSUIPlugin.getResourceString("%PrefsLabel.ColorColon"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.SEMI_COLON, CSSUIPlugin.getResourceString("%PrefsLabel.ColorSemiColon"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.CURLY_BRACE, CSSUIPlugin.getResourceString("%PrefsLabel.ColorCurlyBrace"));//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.ERROR, CSSUIPlugin.getResourceString("%PrefsLabel.ColorError"));//$NON-NLS-1$
- }
-
- /**
- *
- * @param list
- * java.util.ArrayList
- */
- protected void initStyleList(ArrayList list) {
- list.add(IStyleConstantsCSS.NORMAL);
- list.add(IStyleConstantsCSS.ATMARK_RULE);
- list.add(IStyleConstantsCSS.SELECTOR);
- list.add(IStyleConstantsCSS.MEDIA);
- list.add(IStyleConstantsCSS.COMMENT);
- list.add(IStyleConstantsCSS.PROPERTY_NAME);
- list.add(IStyleConstantsCSS.PROPERTY_VALUE);
- list.add(IStyleConstantsCSS.URI);
- list.add(IStyleConstantsCSS.STRING);
- list.add(IStyleConstantsCSS.COLON);
- list.add(IStyleConstantsCSS.SEMI_COLON);
- list.add(IStyleConstantsCSS.CURLY_BRACE);
- list.add(IStyleConstantsCSS.ERROR);
- }
-
- /**
- * setupPicker method comment.
- */
- protected void setupPicker(StyledTextColorPicker picker) {
- IModelManager mmanager = StructuredModelManager.getModelManager();
- picker.setParser(mmanager.createStructuredDocumentFor(IContentTypeIdentifier.ContentTypeID_CSS).getParser());
-
- Dictionary descriptions = new Hashtable();
- initDescriptions(descriptions);
-
- Dictionary contextStyleMap = new Hashtable();
- initContextStyleMap(contextStyleMap);
-
- ArrayList styleList = new ArrayList();
- initStyleList(styleList);
-
- picker.setContextStyleMap(contextStyleMap);
- picker.setDescriptions(descriptions);
- picker.setStyleList(styleList);
-
- picker.setGeneratorKey(IContentTypeIdentifier.ContentTypeID_CSS);
- }
-
- protected IPreferenceStore doGetPreferenceStore() {
- return SSEUIPlugin.getDefault().getPreferenceStore();
- }
-
- public boolean performOk() {
- super.performOk();
-
- SSEUIPlugin.getDefault().savePluginPreferences();
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSFilesPreferencePage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSFilesPreferencePage.java
deleted file mode 100644
index dc603827e6..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSFilesPreferencePage.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2004 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and
- * is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ****************************************************************************/
-package org.eclipse.wst.css.ui.preferences.ui;
-
-import org.eclipse.core.runtime.Preferences;
-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.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.xml.ui.preferences.XMLFilesPreferencePage;
-
-public class CSSFilesPreferencePage extends XMLFilesPreferencePage {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return CSSUIPlugin.getDefault().getPreferenceStore();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.editor.xml.preferences.ui.XMLFilesPreferencePage#doSavePreferenceStore()
- */
- protected void doSavePreferenceStore() {
- CSSCorePlugin.getDefault().savePluginPreferences(); // model
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.editor.preferences.ui.AbstractPreferencePage#getModelPreferences()
- */
- protected Preferences getModelPreferences() {
- return CSSCorePlugin.getDefault().getPluginPreferences();
- }
-
- /*
- * (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.CSS_PREFWEBX_FILES_HELPID);
- return c;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSSourcePreferencePage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSSourcePreferencePage.java
deleted file mode 100644
index ca756c3437..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSSourcePreferencePage.java
+++ /dev/null
@@ -1,246 +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.css.ui.preferences.ui;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.swt.SWT;
-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.Text;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.preferences.CSSModelPreferenceNames;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-import org.eclipse.wst.xml.ui.preferences.XMLSourcePreferencePage;
-
-/**
- */
-public class CSSSourcePreferencePage extends XMLSourcePreferencePage {
- // Formatting
- private final static String FORMATTING_GROUP = SSEUIPlugin.getResourceString("%Formatting_UI_"); //$NON-NLS-1$
- private final static String FORMATTING_LINE_WIDTH = SSEUIPlugin.getResourceString("%Line_width__UI_"); //$NON-NLS-1$;
- private final static String FORMATTING_INDENT_USING_TABS = SSEUIPlugin.getResourceString("%&Indent_using_tabs_3"); //$NON-NLS-1$
- // CSS Formatting
- private final static String FORMATTING_INSERT_LINE_BREAK = CSSUIPlugin.getResourceString("%PrefsLabel.WrappingInsertLineBreak"); //$NON-NLS-1$
- private final static String FORMATTING_WRAPPING_WITHOUT_ATTR = CSSUIPlugin.getResourceString("%PrefsLabel.WrappingWithoutAttr");//$NON-NLS-1$
-
- // Case
- private final static String CASE_GROUP = CSSUIPlugin.getResourceString("%PrefsLabel.CaseGroup"); //$NON-NLS-1$
- private final static String CASE_IDENT = CSSUIPlugin.getResourceString("%PrefsLabel.CaseIdent"); //$NON-NLS-1$
- private final static String CASE_PROP_NAME = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropName"); //$NON-NLS-1$
- private final static String CASE_PROP_VALUE = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropValue"); //$NON-NLS-1$
- private final static String CASE_IDENT_UPPER = CSSUIPlugin.getResourceString("%PrefsLabel.CaseIdentUpper"); //$NON-NLS-1$
- private final static String CASE_IDENT_LOWER = CSSUIPlugin.getResourceString("%PrefsLabel.CaseIdentLower"); //$NON-NLS-1$
- private final static String CASE_PROP_NAME_UPPER = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropNameUpper"); //$NON-NLS-1$
- private final static String CASE_PROP_NAME_LOWER = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropNameLower"); //$NON-NLS-1$
- private final static String CASE_PROP_VALUE_UPPER = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropValueUpper"); //$NON-NLS-1$
- private final static String CASE_PROP_VALUE_LOWER = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropValueLower"); //$NON-NLS-1$
-
- // one property per one line
- protected Button fPropertyPerLine;
- // prohibit wrapping if style attribute
- protected Button fNowrapAttr;
-
- // case of output character
- // case of identifier
- protected Button fIdentUpper;
- protected Button fIdentLower;
- // case of property name
- protected Button fPropNameUpper;
- protected Button fPropNameLower;
- // case of property value
- protected Button fPropValueUpper;
- protected Button fPropValueLower;
-
- protected void createContentsForFormattingGroup(Composite parent) {
- Group formattingGroup = createGroup(parent, 2);
- formattingGroup.setText(FORMATTING_GROUP);
- // // assigning one help for whole group
- // WorkbenchHelp.setHelp(formattingGroup,
- // "com.ibm.etools.webedit.core.cssp1200"); //$NON-NLS-1$
-
- fLineWidthLabel = createLabel(formattingGroup, FORMATTING_LINE_WIDTH);
- fLineWidthText = new Text(formattingGroup, SWT.SINGLE | SWT.BORDER);
- GridData gData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.BEGINNING);
- gData.widthHint = 25;
- fLineWidthText.setLayoutData(gData);
- fLineWidthText.addModifyListener(this);
-
- fPropertyPerLine = createCheckBox(formattingGroup, FORMATTING_INSERT_LINE_BREAK);
- ((GridData) fPropertyPerLine.getLayoutData()).horizontalSpan = 2;
-
- fIndentUsingTabs = createCheckBox(formattingGroup, FORMATTING_INDENT_USING_TABS);
- ((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 2;
-
- fNowrapAttr = createCheckBox(formattingGroup, FORMATTING_WRAPPING_WITHOUT_ATTR);
- ((GridData) fNowrapAttr.getLayoutData()).horizontalSpan = 2;
- }
-
- protected void performDefaultsForFormattingGroup() {
- // Formatting
- Preferences prefs = getModelPreferences();
- fLineWidthText.setText(prefs.getDefaultString(CommonModelPreferenceNames.LINE_WIDTH));
- fPropertyPerLine.setSelection(prefs.getDefaultBoolean(CSSModelPreferenceNames.WRAPPING_ONE_PER_LINE));
- fIndentUsingTabs.setSelection(prefs.getDefaultBoolean(CommonModelPreferenceNames.INDENT_USING_TABS));
- fNowrapAttr.setSelection(prefs.getDefaultBoolean(CSSModelPreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR));
- }
-
- protected void initializeValuesForFormattingGroup() {
- // Formatting
- Preferences prefs = getModelPreferences();
- fLineWidthText.setText(prefs.getString(CommonModelPreferenceNames.LINE_WIDTH));
- fPropertyPerLine.setSelection(prefs.getBoolean(CSSModelPreferenceNames.WRAPPING_ONE_PER_LINE));
- fIndentUsingTabs.setSelection(prefs.getBoolean(CommonModelPreferenceNames.INDENT_USING_TABS));
- fNowrapAttr.setSelection(prefs.getBoolean(CSSModelPreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR));
- }
-
- protected void storeValuesForFormattingGroup() {
- // Formatting
- Preferences prefs = getModelPreferences();
- prefs.setValue(CommonModelPreferenceNames.LINE_WIDTH, fLineWidthText.getText());
- prefs.setValue(CSSModelPreferenceNames.WRAPPING_ONE_PER_LINE, fPropertyPerLine.getSelection());
- prefs.setValue(CommonModelPreferenceNames.INDENT_USING_TABS, fIndentUsingTabs.getSelection());
- prefs.setValue(CSSModelPreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR, fNowrapAttr.getSelection());
- }
-
- protected void createContentsForContentAssistGroup(Composite parent) {
- // not content assist, but preferred case
- Group caseGroup = createGroup(parent, 3);
- caseGroup.setText(CASE_GROUP);
- // WorkbenchHelp.setHelp(caseGroup,
- // "com.ibm.etools.webedit.core.cssp1400"); //$NON-NLS-1$
-
- // createLabel(caseGroup, CASE_IDENT);
- // createLabel(caseGroup, CASE_PROP_NAME);
- // createLabel(caseGroup, CASE_PROP_VALUE);
-
- // use group for radio buttons so that associated label is read
- // Composite identGroup = createComposite(caseGroup, 1);
- Group identGroup = createGroup(caseGroup, 1);
- identGroup.setText(CASE_IDENT);
- fIdentUpper = createRadioButton(identGroup, CASE_IDENT_UPPER);
- fIdentLower = createRadioButton(identGroup, CASE_IDENT_LOWER);
-
- // use group for radio buttons so that associated label is read
- // Composite propNameGroup = createComposite(caseGroup, 1);
- Group propNameGroup = createGroup(caseGroup, 1);
- propNameGroup.setText(CASE_PROP_NAME);
- fPropNameUpper = createRadioButton(propNameGroup, CASE_PROP_NAME_UPPER);
- fPropNameLower = createRadioButton(propNameGroup, CASE_PROP_NAME_LOWER);
-
- // use group for radio buttons so that associated label is read
- // Composite propValueGroup = createComposite(caseGroup, 1);
- Group propValueGroup = createGroup(caseGroup, 1);
- propValueGroup.setText(CASE_PROP_VALUE);
- fPropValueUpper = createRadioButton(propValueGroup, CASE_PROP_VALUE_UPPER);
- fPropValueLower = createRadioButton(propValueGroup, CASE_PROP_VALUE_LOWER);
- }
-
- protected void performDefaultsForContentAssistGroup() {
- // not content assist, but preferred case
- Preferences prefs = getModelPreferences();
- fIdentUpper.setSelection(prefs.getDefaultInt(CSSModelPreferenceNames.CASE_IDENTIFIER) == CommonModelPreferenceNames.UPPER);
- fIdentLower.setSelection(prefs.getDefaultInt(CSSModelPreferenceNames.CASE_IDENTIFIER) == CommonModelPreferenceNames.LOWER);
- fPropNameUpper.setSelection(prefs.getDefaultInt(CSSModelPreferenceNames.CASE_PROPERTY_NAME) == CommonModelPreferenceNames.UPPER);
- fPropNameLower.setSelection(prefs.getDefaultInt(CSSModelPreferenceNames.CASE_PROPERTY_NAME) == CommonModelPreferenceNames.LOWER);
- fPropValueUpper.setSelection(prefs.getDefaultInt(CSSModelPreferenceNames.CASE_PROPERTY_VALUE) == CommonModelPreferenceNames.UPPER);
- fPropValueLower.setSelection(prefs.getDefaultInt(CSSModelPreferenceNames.CASE_PROPERTY_VALUE) == CommonModelPreferenceNames.LOWER);
- }
-
- protected void initializeValuesForContentAssistGroup() {
- // not content assist, but preferred case
- Preferences prefs = getModelPreferences();
- fIdentUpper.setSelection(prefs.getInt(CSSModelPreferenceNames.CASE_IDENTIFIER) == CommonModelPreferenceNames.UPPER);
- fIdentLower.setSelection(prefs.getInt(CSSModelPreferenceNames.CASE_IDENTIFIER) == CommonModelPreferenceNames.LOWER);
- fPropNameUpper.setSelection(prefs.getInt(CSSModelPreferenceNames.CASE_PROPERTY_NAME) == CommonModelPreferenceNames.UPPER);
- fPropNameLower.setSelection(prefs.getInt(CSSModelPreferenceNames.CASE_PROPERTY_NAME) == CommonModelPreferenceNames.LOWER);
- fPropValueUpper.setSelection(prefs.getInt(CSSModelPreferenceNames.CASE_PROPERTY_VALUE) == CommonModelPreferenceNames.UPPER);
- fPropValueLower.setSelection(prefs.getInt(CSSModelPreferenceNames.CASE_PROPERTY_VALUE) == CommonModelPreferenceNames.LOWER);
- }
-
- protected void storeValuesForContentAssistGroup() {
- // not content assist, but preferred case
- Preferences prefs = getModelPreferences();
- prefs.setValue(CSSModelPreferenceNames.CASE_IDENTIFIER, (fIdentUpper.getSelection()) ? CommonModelPreferenceNames.UPPER : CommonModelPreferenceNames.LOWER);
- prefs.setValue(CSSModelPreferenceNames.CASE_PROPERTY_NAME, (fPropNameUpper.getSelection()) ? CommonModelPreferenceNames.UPPER : CommonModelPreferenceNames.LOWER);
- prefs.setValue(CSSModelPreferenceNames.CASE_PROPERTY_VALUE, (fPropValueUpper.getSelection()) ? CommonModelPreferenceNames.UPPER : CommonModelPreferenceNames.LOWER);
- }
-
- protected void createContentsForGrammarConstraintsGroup(Composite parent) {
- // do nothing
- }
-
- protected void performDefaultsForGrammarConstraintsGroup() {
- // do nothing
- }
-
- protected void initializeValuesForGrammarConstraintsGroup() {
- // do nothing
- }
-
- protected void storeValuesForGrammarConstraintsGroup() {
- // do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
- */
- // protected IPreferenceStore doGetPreferenceStore() {
- // return CSSUIPlugin.getDefault().getPreferenceStore();
- // }
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.editor.xml.preferences.ui.XMLFilesPreferencePage#doSavePreferenceStore()
- */
- protected void doSavePreferenceStore() {
- SSEUIPlugin.getDefault().savePluginPreferences();
- CSSCorePlugin.getDefault().savePluginPreferences(); // model
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.editor.preferences.ui.AbstractPreferencePage#getModelPreferences()
- */
- protected Preferences getModelPreferences() {
- return CSSCorePlugin.getDefault().getPluginPreferences();
- }
-
- /*
- * helper method to generate content type id specific preference keys
- */
- protected String getKey(String key) {
- String contentTypeId = IContentTypeIdentifier.ContentTypeID_CSS;
- return PreferenceKeyGenerator.generateKey(key, contentTypeId);
- }
-
- /*
- * (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.CSS_PREFWEBX_SOURCE_HELPID);
- return c;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/registry/AdapterFactoryProviderCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/registry/AdapterFactoryProviderCSS.java
deleted file mode 100644
index f5f854f233..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/registry/AdapterFactoryProviderCSS.java
+++ /dev/null
@@ -1,55 +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.css.ui.registry;
-
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.wst.css.core.modelhandler.ModelHandlerForCSS;
-import org.eclipse.wst.css.ui.views.contentoutline.JFaceNodeAdapterFactoryCSS;
-import org.eclipse.wst.css.ui.views.properties.CSSPropertySourceAdapterFactory;
-import org.eclipse.wst.sse.core.AdapterFactory;
-import org.eclipse.wst.sse.core.IFactoryRegistry;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.modelhandler.IDocumentTypeHandler;
-import org.eclipse.wst.sse.ui.registry.AdapterFactoryProvider;
-import org.eclipse.wst.sse.ui.util.Assert;
-import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapter;
-
-public class AdapterFactoryProviderCSS implements AdapterFactoryProvider {
- public boolean isFor(IDocumentTypeHandler contentTypeDescription) {
- return (contentTypeDescription instanceof ModelHandlerForCSS);
- }
-
- public void addAdapterFactories(IStructuredModel structuredModel) {
- // add the normal content based factories to model's registry
- addContentBasedFactories(structuredModel);
- }
-
- protected void addContentBasedFactories(IStructuredModel structuredModel) {
- IFactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
- Assert.isNotNull(factoryRegistry, "Program Error: client caller must ensure model has factory registry"); //$NON-NLS-1$
- AdapterFactory factory = null;
-
- factory = factoryRegistry.getFactoryFor(IPropertySource.class);
- if (factory == null) {
- factory = new CSSPropertySourceAdapterFactory(IPropertySource.class, true);
- factoryRegistry.addFactory(factory);
- }
-
- factory = factoryRegistry.getFactoryFor(IJFaceNodeAdapter.class);
- if (factory == null) {
- factory = new JFaceNodeAdapterFactoryCSS(IJFaceNodeAdapter.class, true);
- factoryRegistry.addFactory(factory);
- }
- }
-
- public void reinitializeFactories(IStructuredModel structuredModel) {
-
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/CSSTextColors.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/CSSTextColors.java
deleted file mode 100644
index 8bf4594aab..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/CSSTextColors.java
+++ /dev/null
@@ -1,143 +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.css.ui.style;
-
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.wst.css.ui.preferences.CSSPreferenceManager;
-import org.eclipse.wst.css.ui.preferences.ui.CSSColorManager;
-import org.eclipse.wst.sse.ui.util.EditorUtility;
-
-/**
- * @deprecated Most methods and constants moved to LineStyleProviderForCSS or
- * IStyleConstantsCSS. TODO remove in C5 or earlier
- */
-public class CSSTextColors {
- class TextColors {
-
- TextColors() {
- super();
- }
-
- void setTextAttribute(Object key, RGB foreground, RGB background, int style) {
- TextAttribute attribute = new TextAttribute(EditorUtility.getColor(foreground), EditorUtility.getColor(background), style);
- setTextAttribute(key, attribute);
- }
-
- void setTextAttribute(Object key, TextAttribute attribute) {
- TextAttribute oldAttribute = (TextAttribute) fAttributeTable.get(key);
- if (oldAttribute != null) {
- fAttributeTable.remove(key);
- }
- fAttributeTable.put(key, attribute);
- }
-
- TextAttribute getTextAttribute(Object key) {
- return (TextAttribute) fAttributeTable.get(key);
- }
-
- private Map fAttributeTable = new HashMap();
- }
-
- // color types
- public static final String NORMAL = "NORMAL"; //$NON-NLS-1$
- public static final String ATMARK_RULE = "ATMARK_RULE"; //$NON-NLS-1$
- public static final String SELECTOR = "SELECTOR"; //$NON-NLS-1$
- public static final String MEDIA = "MEDIA"; //$NON-NLS-1$
- public static final String COMMENT = "COMMENT"; //$NON-NLS-1$
- public static final String PROPERTY_NAME = "PROPERTY_NAME"; //$NON-NLS-1$
- public static final String PROPERTY_VALUE = "PROPERTY_VALUE"; //$NON-NLS-1$
- public static final String URI = "URI"; //$NON-NLS-1$
- public static final String STRING = "STRING"; //$NON-NLS-1$
- public static final String COLON = "COLON"; //$NON-NLS-1$
- public static final String SEMI_COLON = "SEMI_COLON"; //$NON-NLS-1$
- public static final String CURLY_BRACE = "CURLY_BRACE"; //$NON-NLS-1$
- public static final String ERROR = "ERROR"; //$NON-NLS-1$
- private static CSSTextColors fInstance = null;
- private TextColors fTextColors = null;
- private Map fPrefToType = null;
-
- protected CSSTextColors() {
- super();
- applyPreference();
- }
-
- public synchronized static CSSTextColors getInstance() {
- if (fInstance == null) {
- fInstance = new CSSTextColors();
- }
- return fInstance;
- }
-
- public void applyPreference() {
- if (fTextColors == null) {
- fTextColors = new TextColors();
- }
-
- if (fPrefToType == null) {
- fPrefToType = new HashMap();
- fPrefToType.put(NORMAL, CSSColorManager.NORMAL);
- fPrefToType.put(ATMARK_RULE, CSSColorManager.ATMARK_RULE);
- fPrefToType.put(SELECTOR, CSSColorManager.SELECTOR);
- fPrefToType.put(MEDIA, CSSColorManager.MEDIA);
- fPrefToType.put(COMMENT, CSSColorManager.COMMENT);
- fPrefToType.put(PROPERTY_NAME, CSSColorManager.PROPERTY_NAME);
- fPrefToType.put(PROPERTY_VALUE, CSSColorManager.PROPERTY_VALUE);
- fPrefToType.put(URI, CSSColorManager.URI);
- fPrefToType.put(STRING, CSSColorManager.STRING);
- fPrefToType.put(COLON, CSSColorManager.COLON);
- fPrefToType.put(SEMI_COLON, CSSColorManager.SEMI_COLON);
- fPrefToType.put(CURLY_BRACE, CSSColorManager.CURLY_BRACE);
- fPrefToType.put(ERROR, CSSColorManager.ERROR);
- }
- boolean bEnabled = CSSPreferenceManager.getInstance().getColorEnabled();
- CSSColorManager pref = CSSColorManager.getInstance();
-
- Iterator i = fPrefToType.keySet().iterator();
- while (i.hasNext()) {
- String key = (String) i.next();
- if (bEnabled) {
- String type = (String) fPrefToType.get(key);
- setTextAttribute(key, pref.getForegroundRGB(type), pref.getBackgroundRGB(type), pref.getStyle(type));
- } else {
- setTextAttribute(key, null);
- }
- }
- }
-
- public void dispose() {
- }
-
- public TextAttribute getTextAttribute(String type) {
- if (fTextColors == null) {
- applyPreference();
- }
- return fTextColors.getTextAttribute(type);
- }
-
- private void setTextAttribute(String type, RGB foreground) {
- setTextAttribute(type, foreground, null, SWT.NORMAL);
- }
-
- private void setTextAttribute(String type, RGB foreground, RGB background, int style) {
- if (fTextColors == null) {
- return;
- }
- fTextColors.setTextAttribute(type, foreground, background, style);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/IStyleConstantsCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/IStyleConstantsCSS.java
deleted file mode 100644
index 31eb84e7ed..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/IStyleConstantsCSS.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.css.ui.style;
-
-/**
- * Contains the symbolic name of styles used by LineStyleProvider,
- * ColorManager, and any others who may be interested
- */
-public interface IStyleConstantsCSS {
- public static final String NORMAL = "NORMAL"; //$NON-NLS-1$
- public static final String ATMARK_RULE = "ATMARK_RULE"; //$NON-NLS-1$
- public static final String SELECTOR = "SELECTOR"; //$NON-NLS-1$
- public static final String MEDIA = "MEDIA"; //$NON-NLS-1$
- public static final String COMMENT = "COMMENT"; //$NON-NLS-1$
- public static final String PROPERTY_NAME = "PROPERTY_NAME"; //$NON-NLS-1$
- public static final String PROPERTY_VALUE = "PROPERTY_VALUE"; //$NON-NLS-1$
- public static final String URI = "URI"; //$NON-NLS-1$
- public static final String STRING = "STRING"; //$NON-NLS-1$
- public static final String COLON = "COLON"; //$NON-NLS-1$
- public static final String SEMI_COLON = "SEMI_COLON"; //$NON-NLS-1$
- public static final String CURLY_BRACE = "CURLY_BRACE"; //$NON-NLS-1$
- public static final String ERROR = "ERROR"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForCSS.java
deleted file mode 100644
index 4932a90ef1..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForCSS.java
+++ /dev/null
@@ -1,209 +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.css.ui.style;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-import org.eclipse.wst.sse.ui.style.AbstractLineStyleProvider;
-import org.eclipse.wst.sse.ui.style.LineStyleProvider;
-
-/**
- */
-public class LineStyleProviderForCSS extends AbstractLineStyleProvider implements LineStyleProvider {
- /** Contains region to style mapping */
- private Map fColorTypes;
-
- /**
- * LineStyleProviderForEmbeddedCSS constructor comment.
- */
- public LineStyleProviderForCSS() {
- super();
- initAttributes();
- loadColors();
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- if (region != null) {
- String type = region.getType();
- if (type != null) {
- return getAttributeFor(type);
- }
- }
- return (TextAttribute) getTextAttributes().get(IStyleConstantsCSS.NORMAL);
- }
-
- /**
- * Look up the TextAttribute for the given region context. Might return
- * null for unusual text.
- *
- * @param type
- * @return
- */
- protected TextAttribute getAttributeFor(String type) {
- return (TextAttribute) getTextAttributes().get(fColorTypes.get(type));
- }
-
- private void initAttributes() {
- if (fColorTypes == null) {
- fColorTypes = new HashMap();
- }
- fColorTypes.put(CSSRegionContexts.CSS_COMMENT, IStyleConstantsCSS.COMMENT);
- fColorTypes.put(CSSRegionContexts.CSS_CDO, IStyleConstantsCSS.COMMENT);
- fColorTypes.put(CSSRegionContexts.CSS_CDC, IStyleConstantsCSS.COMMENT);
- fColorTypes.put(CSSRegionContexts.CSS_S, IStyleConstantsCSS.NORMAL);
-
- fColorTypes.put(CSSRegionContexts.CSS_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
- fColorTypes.put(CSSRegionContexts.CSS_LBRACE, IStyleConstantsCSS.CURLY_BRACE);
- fColorTypes.put(CSSRegionContexts.CSS_RBRACE, IStyleConstantsCSS.CURLY_BRACE);
-
- fColorTypes.put(CSSRegionContexts.CSS_IMPORT, IStyleConstantsCSS.ATMARK_RULE);
- fColorTypes.put(CSSRegionContexts.CSS_PAGE, IStyleConstantsCSS.ATMARK_RULE);
- fColorTypes.put(CSSRegionContexts.CSS_MEDIA, IStyleConstantsCSS.ATMARK_RULE);
- fColorTypes.put(CSSRegionContexts.CSS_FONT_FACE, IStyleConstantsCSS.ATMARK_RULE);
- fColorTypes.put(CSSRegionContexts.CSS_CHARSET, IStyleConstantsCSS.ATMARK_RULE);
- fColorTypes.put(CSSRegionContexts.CSS_ATKEYWORD, IStyleConstantsCSS.ATMARK_RULE);
-
- fColorTypes.put(CSSRegionContexts.CSS_STRING, IStyleConstantsCSS.STRING);
- fColorTypes.put(CSSRegionContexts.CSS_URI, IStyleConstantsCSS.URI);
- fColorTypes.put(CSSRegionContexts.CSS_MEDIUM, IStyleConstantsCSS.MEDIA);
- fColorTypes.put(CSSRegionContexts.CSS_MEDIA_SEPARATOR, IStyleConstantsCSS.MEDIA);
-
- fColorTypes.put(CSSRegionContexts.CSS_CHARSET_NAME, IStyleConstantsCSS.STRING);
-
- fColorTypes.put(CSSRegionContexts.CSS_PAGE_SELECTOR, IStyleConstantsCSS.MEDIA);
-
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_UNIVERSAL, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_PSEUDO, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_CLASS, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ID, IStyleConstantsCSS.SELECTOR);
-
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_COMBINATOR, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_SEPARATOR, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_OPERATOR, IStyleConstantsCSS.SELECTOR);
-
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_PROPERTY, IStyleConstantsCSS.PROPERTY_NAME);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_STRING, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_URI, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_HASH, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_UNICODE_RANGE, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_S, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_SEPARATOR, IStyleConstantsCSS.COLON);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
-
- fColorTypes.put(CSSRegionContexts.CSS_UNKNOWN, IStyleConstantsCSS.NORMAL);
- }
-
- protected void handlePropertyChange(PropertyChangeEvent event) {
- String styleKey = null;
-
- if (event != null) {
- String prefKey = event.getProperty();
- // check if preference changed is a style preference
- if (getPreferenceKey(IStyleConstantsCSS.ATMARK_RULE).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.ATMARK_RULE;
- } else if (getPreferenceKey(IStyleConstantsCSS.COLON).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.COLON;
- } else if (getPreferenceKey(IStyleConstantsCSS.COMMENT).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.COMMENT;
- } else if (getPreferenceKey(IStyleConstantsCSS.CURLY_BRACE).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.CURLY_BRACE;
- } else if (getPreferenceKey(IStyleConstantsCSS.ERROR).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.ERROR;
- } else if (getPreferenceKey(IStyleConstantsCSS.MEDIA).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.MEDIA;
- } else if (getPreferenceKey(IStyleConstantsCSS.NORMAL).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.NORMAL;
- } else if (getPreferenceKey(IStyleConstantsCSS.PROPERTY_NAME).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.PROPERTY_NAME;
- } else if (getPreferenceKey(IStyleConstantsCSS.PROPERTY_VALUE).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.PROPERTY_VALUE;
- } else if (getPreferenceKey(IStyleConstantsCSS.SELECTOR).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.SELECTOR;
- } else if (getPreferenceKey(IStyleConstantsCSS.SEMI_COLON).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.SEMI_COLON;
- } else if (getPreferenceKey(IStyleConstantsCSS.STRING).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.STRING;
- } else if (getPreferenceKey(IStyleConstantsCSS.URI).equals(prefKey)) {
- styleKey = IStyleConstantsCSS.URI;
- }
- } else {
- // this is around for old deprecated preferencesChanged() method
- // TODO remove when preferencesChanged() is removed
- loadColors();
- super.handlePropertyChange(event);
- }
-
- if (styleKey != null) {
- // overwrite style preference with new value
- addTextAttribute(styleKey);
- super.handlePropertyChange(event);
- }
- }
-
- public void release() {
- if (fColorTypes != null) {
- fColorTypes.clear();
- }
- super.release();
- }
-
- public void loadColors() {
- clearColors();
- addTextAttribute(IStyleConstantsCSS.ATMARK_RULE);
- addTextAttribute(IStyleConstantsCSS.COLON);
- addTextAttribute(IStyleConstantsCSS.COMMENT);
- addTextAttribute(IStyleConstantsCSS.CURLY_BRACE);
- addTextAttribute(IStyleConstantsCSS.ERROR);
- addTextAttribute(IStyleConstantsCSS.MEDIA);
- addTextAttribute(IStyleConstantsCSS.NORMAL);
- addTextAttribute(IStyleConstantsCSS.PROPERTY_NAME);
- addTextAttribute(IStyleConstantsCSS.PROPERTY_VALUE);
- addTextAttribute(IStyleConstantsCSS.SELECTOR);
- addTextAttribute(IStyleConstantsCSS.SEMI_COLON);
- addTextAttribute(IStyleConstantsCSS.STRING);
- addTextAttribute(IStyleConstantsCSS.URI);
- }
-
- protected void clearColors() {
- getTextAttributes().clear();
- }
-
- protected String getPreferenceKey(String key) {
- String contentTypeId = IContentTypeIdentifier.ContentTypeID_CSS;
- return PreferenceKeyGenerator.generateKey(key, contentTypeId);
- }
-
- protected IPreferenceStore getColorPreferences() {
- return SSEUIPlugin.getDefault().getPreferenceStore();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForEmbeddedCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForEmbeddedCSS.java
deleted file mode 100644
index e1620e1b15..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForEmbeddedCSS.java
+++ /dev/null
@@ -1,109 +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.css.ui.style;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.wst.css.core.parser.CSSTextParser;
-import org.eclipse.wst.css.core.parser.CSSTextToken;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-public class LineStyleProviderForEmbeddedCSS extends LineStyleProviderForCSS {
-
- public boolean prepareRegions(ITypedRegion typedRegion, int lineRequestStart, int lineRequestLength, Collection holdResults) {
- int regionStart = typedRegion.getOffset();
- int regionEnd = regionStart + typedRegion.getLength();
- IStructuredDocumentRegion wholeRegion = getDocument().getRegionAtCharacterOffset(regionStart);
-
- List tokens;
- int offset;
-
- ParserCache cache = getCachedParsingResult(wholeRegion);
- if (cache == null) {
- offset = wholeRegion.getStartOffset();
- String content;
- content = wholeRegion.getText();
-
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_STYLESHEET, content);
- tokens = parser.getTokenList();
- cacheParsingResult(wholeRegion, new ParserCache(offset, tokens));
- } else {
- tokens = cache.tokens;
- offset = cache.offset;
- }
-
- boolean result = false;
-
- if (0 < tokens.size()) {
- int start = offset;
- Iterator i = tokens.iterator();
- while (i.hasNext()) {
- CSSTextToken token = (CSSTextToken) i.next();
- if (regionStart <= start && start < regionEnd) {
- TextAttribute attribute = getAttributeFor(token.kind);
- if (attribute != null) {
- holdResults.add(new StyleRange(start, token.length, attribute.getForeground(), attribute.getBackground()));
- }
- else {
- holdResults.add(new StyleRange(start, token.length, null, null));
- }
- }
- start += token.length;
- }
- result = true;
- }
-
- return result;
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- return null;
- }
-
- private void cleanupCache() {
- fCacheKey = -1;
- fCacheResult = null;
- }
-
- private ParserCache getCachedParsingResult(IStructuredDocumentRegion region) {
- if (fCacheKey == region.getText().hashCode()) {
- return fCacheResult;
- }
- return null;
- }
-
- private void cacheParsingResult(IStructuredDocumentRegion region, ParserCache result) {
- fCacheKey = region.getText().hashCode();
- fCacheResult = result;
- }
-
- public void release() {
- super.release();
- cleanupCache();
- }
-
- private class ParserCache {
- ParserCache(int newOffset, List newTokens) {
- offset = newOffset;
- tokens = newTokens;
- }
-
- int offset;
- List tokens;
- }
-
- int fCacheKey = -1;
- ParserCache fCacheResult = null;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/taginfo/CSSBestMatchHoverProcessor.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/taginfo/CSSBestMatchHoverProcessor.java
deleted file mode 100644
index 2c4a0feb23..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/taginfo/CSSBestMatchHoverProcessor.java
+++ /dev/null
@@ -1,33 +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.css.ui.taginfo;
-
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.wst.sse.ui.taginfo.AbstractBestMatchHoverProcessor;
-
-/**
- * Provides the best css hover help documentation (by using other hover help
- * processors) Priority of hover help processors is: ProblemHoverProcessor,
- * AnnotationHoverProcessor
- */
-public class CSSBestMatchHoverProcessor extends AbstractBestMatchHoverProcessor {
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.editor.taginfo.AbstractBestMatchHoverProcessor#getTagInfoHover()
- */
- protected ITextHover getTagInfoHover() {
- // CSS has no taginfo hover
- return null;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/text/CSSDocumentRegionEdgeMatcher.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/text/CSSDocumentRegionEdgeMatcher.java
deleted file mode 100644
index ce975a9b81..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/text/CSSDocumentRegionEdgeMatcher.java
+++ /dev/null
@@ -1,89 +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.css.ui.text;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.source.ICharacterPairMatcher;
-import org.eclipse.wst.css.core.parser.CSSRegionContexts;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-public class CSSDocumentRegionEdgeMatcher implements ICharacterPairMatcher {
-
- private int fAnchor = ICharacterPairMatcher.LEFT;
-
- /**
- * @param validContexts
- * @param nextMatcher
- */
- public CSSDocumentRegionEdgeMatcher() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.ICharacterPairMatcher#clear()
- */
- public void clear() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.ICharacterPairMatcher#dispose()
- */
- public void dispose() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.ICharacterPairMatcher#getAnchor()
- */
- public int getAnchor() {
- return fAnchor;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.editor.ui.text.DocumentRegionEdgeMatcher#match(org.eclipse.jface.text.IDocument,
- * int)
- */
-
-
- public IRegion match(IDocument document, int offset) {
- if (document instanceof IStructuredDocument) {
- IStructuredDocumentRegion r = ((IStructuredDocument) document).getRegionAtCharacterOffset(offset);
- if (r != null) {
- if (r.getPrevious() != null && r.getStartOffset() == offset && r.getPrevious().getType().equals(CSSRegionContexts.CSS_RBRACE)) {
- r = r.getPrevious();
- }
- if (r.getType().equals(CSSRegionContexts.CSS_RBRACE)) {
- while (r != null && !r.getType().equals(CSSRegionContexts.CSS_LBRACE)) {
- r = r.getPrevious();
- }
- if (r != null) {
- return new Region(r.getStartOffset(), 1);
- }
- } else if (r.getType().equals(CSSRegionContexts.CSS_LBRACE)) {
- while (r != null && !r.getType().equals(CSSRegionContexts.CSS_RBRACE)) {
- r = r.getNext();
- }
- if (r != null) {
- return new Region(r.getEndOffset() - 1, 1);
- }
- }
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSContentOutlineConfiguration.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSContentOutlineConfiguration.java
deleted file mode 100644
index f95973e116..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSContentOutlineConfiguration.java
+++ /dev/null
@@ -1,118 +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.css.ui.views.contentoutline;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSValue;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.sse.core.AdapterFactory;
-import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-import org.eclipse.wst.sse.ui.view.events.NodeSelectionChangedEvent;
-import org.eclipse.wst.sse.ui.views.contentoutline.PropertyChangeUpdateActionContributionItem;
-import org.eclipse.wst.sse.ui.views.contentoutline.StructuredContentOutlineConfiguration;
-
-public class CSSContentOutlineConfiguration extends StructuredContentOutlineConfiguration {
- private final String OUTLINE_SORT_PREF = "outline-sort"; //$NON-NLS-1$
-
- public CSSContentOutlineConfiguration() {
- super();
- }
-
- public IContributionItem[] createToolbarContributions(TreeViewer viewer) {
- IContributionItem[] items = super.createToolbarContributions(viewer);
-
- SortAction sortAction = new SortAction(viewer, CSSUIPlugin.getDefault().getPreferenceStore(), getSortPreferenceKey());
- IContributionItem sortItem = new PropertyChangeUpdateActionContributionItem(sortAction);
-
- if (items == null) {
- items = new IContributionItem[1];
- items[0] = sortItem;
- } else {
- IContributionItem[] combinedItems = new IContributionItem[items.length + 1];
- combinedItems[0] = sortItem;
- System.arraycopy(items, 0, combinedItems, 1, items.length);
- items = combinedItems;
- }
- return items;
- }
-
- /**
- * @see com.ibm.sse.editor.views.contentoutline.ContentOutlineConfiguration#getContentProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- public IContentProvider getContentProvider(TreeViewer viewer) {
- if (fContentProvider == null && getFactory() != null)
- fContentProvider = new JFaceNodeContentProviderCSS((AdapterFactory) getFactory());
- return fContentProvider;
- }
-
- /**
- * @see com.ibm.sse.editor.views.contentoutline.ContentOutlineConfiguration#getLabelProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- public ILabelProvider getLabelProvider(TreeViewer viewer) {
- if (fLabelProvider == null && getFactory() != null)
- fLabelProvider = new JFaceNodeLabelProviderCSS((AdapterFactory) getFactory());
- return fLabelProvider;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.editor.views.contentoutline.ContentOutlineConfiguration#getNodes(java.util.List)
- */
- public List getNodes(List nodes) {
- List filteredNodes = new ArrayList(nodes);
-
- List targetNodes = new ArrayList();
- Iterator i = filteredNodes.iterator();
- while (i.hasNext()) {
- Object obj = i.next();
- if (obj instanceof ICSSNode) {
- ICSSNode node = (ICSSNode) obj;
- short nodeType = node.getNodeType();
- if (node instanceof ICSSValue) {
- while (node != null && !(node instanceof ICSSStyleDeclItem)) {
- node = node.getParentNode();
- }
- } else if (nodeType == ICSSNode.STYLEDECLARATION_NODE) {
- node = node.getParentNode();
- } else if (nodeType == ICSSNode.MEDIALIST_NODE) {
- node = node.getParentNode();
- }
- if (node != null) {
- obj = node;
- }
- }
- targetNodes.add(obj);
- }
-
- return targetNodes;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.editor.views.contentoutline.ContentOutlineConfiguration#getSelectedNodes(com.ibm.sse.editor.view.events.NodeSelectionChangedEvent)
- */
- public List getSelectedNodes(NodeSelectionChangedEvent event) {
- return getNodes(event.getSelectedNodes());
- }
-
- public String getSortPreferenceKey() {
- return PreferenceKeyGenerator.generateKey(OUTLINE_SORT_PREF, getDeclaringID());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSNodeAdapter.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSNodeAdapter.java
deleted file mode 100644
index d012df085d..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSNodeAdapter.java
+++ /dev/null
@@ -1,319 +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.css.ui.views.contentoutline;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.document.ICSSStyleSheet;
-import org.eclipse.wst.sse.core.AdapterFactory;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapterFactory;
-
-/**
- * Adapts a DOM node to a JFace viewer.
- */
-//public class CSSNodeAdapter extends JFaceNodeAdapter {
-public class CSSNodeAdapter implements INodeAdapter, Runnable {
- class NotifyContext {
- NotifyContext(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- this.notifier = notifier;
- this.eventType = eventType;
- this.changedFeature = changedFeature;
- this.oldValue = oldValue;
- this.newValue = newValue;
- this.pos = pos;
- }
-
- void fire() {
- internalNotifyChanged(notifier, eventType, changedFeature, oldValue, newValue, pos);
- }
-
- INodeNotifier notifier;
- int eventType;
- Object changedFeature;
- Object oldValue;
- Object newValue;
- int pos;
- }
-
- class StyleViewUpdater implements Runnable {
- public void run() {
- if (lastUpdater == this) {
- internalActionPerformed();
- lastUpdater = null;
- }
- }
- }
-
- protected AdapterFactory adapterFactory;
- private Vector notifyQueue;
- StyleViewUpdater lastUpdater;
- protected int delayMSecs = 500;
- final static Class ADAPTER_KEY = IJFaceNodeAdapter.class;
-
- public CSSNodeAdapter(AdapterFactory adapterFactory) {
- super();
- this.adapterFactory = adapterFactory;
- }
-
- /**
- * Insert the method's description here.
- */
- protected void internalActionPerformed() {
- if (notifyQueue == null) {
- return;
- }
- boolean refresh_all = false;
- boolean refresh_rule = false;
- int pos_all = 0;
- List targets = new ArrayList();
- for (int i = 0; i < notifyQueue.size(); i++) {
- NotifyContext context = (NotifyContext) notifyQueue.get(i);
- if (context.notifier instanceof ICSSStyleSheet) {
- refresh_all = true;
- pos_all = i;
- }
- if (context.notifier instanceof ICSSStyleDeclaration) {
- refresh_rule = true;
- targets.add(context);
- // pos_rule = i;
- }
- // ((NotifyContext) notifyQueue.get(i)).fire();
- }
- if (refresh_all) {
- ((NotifyContext) notifyQueue.get(pos_all)).fire();
- } else if (refresh_rule) {
- Iterator i = targets.iterator();
- while (i.hasNext()) {
- ((NotifyContext) i.next()).fire();
- }
- // else if (refresh_rule) internalRefreshAll();
- } else {
- for (int i = 0; i < notifyQueue.size(); i++) {
- ((NotifyContext) notifyQueue.get(i)).fire();
- }
- }
- notifyQueue.clear();
- }
-
- /**
- * Called by the object being adapter (the notifier) when something has
- * changed.
- */
- public void internalNotifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- Iterator iterator = ((IJFaceNodeAdapterFactory) adapterFactory).getListeners().iterator();
- while (iterator.hasNext()) {
- Object listener = iterator.next();
- if (listener instanceof StructuredViewer) {
- notifyChangedForStructuredViewer((StructuredViewer) listener, notifier, eventType, changedFeature, oldValue, newValue, pos);
- } else if (listener instanceof PropertySheetPage) {
- notifyChangedForPropertySheetPage((PropertySheetPage) listener, notifier, eventType, changedFeature, oldValue, newValue, pos);
- }
- }
- }
-
- private void notifyChangedForPropertySheetPage(PropertySheetPage page, INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- if (page.getControl() == null || page.getControl().isDisposed()) {
- return;
- }
- if (eventType == INodeNotifier.CHANGE || eventType == INodeNotifier.ADD || eventType == INodeNotifier.REMOVE) {
- page.refresh();
- }
- }
-
- private void notifyChangedForStructuredViewer(StructuredViewer viewer, INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- if (viewer.getControl() == null || viewer.getControl().isDisposed()) {
- return;
- }
- if (eventType == INodeNotifier.CHANGE) {
- if (notifier instanceof ICSSStyleSheet) {
- ICSSNode temp = (changedFeature != null) ? (ICSSNode) changedFeature : (ICSSNode) newValue;
- if (temp instanceof ICSSStyleRule) {
- viewer.refresh();
- } else {
- for (;;) {
- if (temp instanceof ICSSStyleRule) {
- break;
- }
- temp = temp.getParentNode();
- if (temp == null) {
- break;
- }
- }
- if (temp == null || temp instanceof ICSSStyleSheet) {
- viewer.refresh();
- } else {
- viewer.refresh(temp);
- }
- }
- } else {
- ICSSNode temp = (ICSSNode) notifier;
- if (temp != null) {
- temp = temp.getParentNode();
- }
- if (temp == null || temp instanceof ICSSStyleSheet) {
- viewer.refresh();
- } else {
- viewer.refresh(temp);
- }
- }
- }
- if (eventType == INodeNotifier.ADD) {
- if (notifier instanceof ICSSStyleSheet) {
- ICSSNode temp = (changedFeature != null) ? (ICSSNode) changedFeature : (ICSSNode) newValue;
- if (temp instanceof ICSSStyleRule) {
- viewer.refresh();
- } else {
- for (;;) {
- if (temp instanceof ICSSStyleRule) {
- break;
- }
- temp = temp.getParentNode();
- if (temp == null) {
- break;
- }
- }
- }
- if (temp == null || (temp instanceof ICSSStyleSheet)) {
- viewer.refresh();
- } else {
- viewer.refresh(temp);
- }
- } else {
- if (newValue != null && (newValue instanceof ICSSStyleDeclItem)) {
- viewer.refresh(((ICSSNode) newValue).getParentNode());
- } else {
- ICSSNode temp = (ICSSNode) notifier;
- if (temp != null) {
- temp = temp.getParentNode();
- }
- if (temp == null || (temp instanceof ICSSStyleSheet)) {
- viewer.refresh();
- } else {
- viewer.refresh(temp);
- }
- }
- }
- } else if (eventType == INodeNotifier.REMOVE) {
- if (notifier instanceof ICSSStyleSheet) {
- ICSSNode temp = (changedFeature != null) ? (ICSSNode) changedFeature : (ICSSNode) newValue;
- if (temp instanceof ICSSStyleRule) {
- viewer.refresh();
- } else {
- for (;;) {
- if (temp instanceof ICSSStyleRule) {
- break;
- }
- temp = temp.getParentNode();
- if (temp == null) {
- break;
- }
- }
- if (temp == null || (temp instanceof ICSSStyleSheet)) {
- viewer.refresh();
- } else {
- viewer.refresh(temp);
- }
- }
- } else {
- // viewer.refresh(notifier);
- ICSSNode temp = (ICSSNode) notifier;
- if (temp != null) {
- temp = temp.getParentNode();
- }
- if (temp == null || (temp instanceof ICSSStyleSheet)) {
- viewer.refresh();
- } else {
- viewer.refresh(temp);
- }
- }
- }
- // }
- }
-
- /**
- *
- */
- public void internalRefreshAll() {
- Collection listeners = ((JFaceNodeAdapterFactoryCSS) adapterFactory).getListeners();
- Iterator iterator = listeners.iterator();
- while (iterator.hasNext()) {
- Object listener = iterator.next();
- if (listener instanceof StructuredViewer) {
- StructuredViewer viewer = (StructuredViewer) listener;
- if (viewer.getControl() != null && !viewer.getControl().isDisposed()) {
- viewer.refresh();
- }
- } else if (listener instanceof PropertySheetPage) {
- PropertySheetPage page = (PropertySheetPage) listener;
- if (page.getControl() != null && !page.getControl().isDisposed()) {
- page.refresh();
- }
- }
- }
- }
-
- /**
- * Allowing the INodeAdapter to compare itself against the type allows it
- * to return true in more than one case.
- */
- public boolean isAdapterForType(Object type) {
- return type.equals(ADAPTER_KEY);
- }
-
- /**
- * Called by the object being adapter (the notifier) when something has
- * changed.
- */
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- if (notifyQueue == null)
- notifyQueue = new Vector();
- notifyQueue.add(new NotifyContext(notifier, eventType, changedFeature, oldValue, newValue, pos));
- // TODO-future: there's probably a better way than relying on async
- // exec
- if (Thread.currentThread() == getDisplay().getThread())
- getDisplay().timerExec(delayMSecs, this);
- else
- getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (getDisplay() != null) {
- getDisplay().timerExec(delayMSecs, this);
- }
- }
- });
- }
-
- Display getDisplay() {
- return PlatformUI.getWorkbench().getDisplay();
- }
-
- /**
- * this method is intended only for timerExec()
- */
- public void run() {
- lastUpdater = new StyleViewUpdater();
- getDisplay().asyncExec(lastUpdater);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeAdapterFactoryCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeAdapterFactoryCSS.java
deleted file mode 100644
index df96b82b76..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeAdapterFactoryCSS.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.css.ui.views.contentoutline;
-
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.xml.ui.views.contentoutline.JFaceNodeAdapterFactory;
-
-public class JFaceNodeAdapterFactoryCSS extends JFaceNodeAdapterFactory {
- public JFaceNodeAdapterFactoryCSS() {
- this(IJFaceNodeAdapter.class, true);
- }
-
- public JFaceNodeAdapterFactoryCSS(Object adapterKey, boolean registerAdapters) {
- super(adapterKey, registerAdapters);
- }
-
-
- protected void initAdapter(INodeAdapter adapter, INodeNotifier node) {
- }
-
- protected INodeAdapter createAdapter(INodeNotifier node) {
- if (singletonAdapter == null) {
- // create the JFaceNodeAdapter
- singletonAdapter = new CSSNodeAdapter(this);
- initAdapter(singletonAdapter, node);
- }
- return singletonAdapter;
- }
-
- public void release() {
- }
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeContentProviderCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeContentProviderCSS.java
deleted file mode 100644
index 3235b9cae1..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeContentProviderCSS.java
+++ /dev/null
@@ -1,263 +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.css.ui.views.contentoutline;
-
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.css.core.document.ICSSDocument;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
-import org.eclipse.wst.sse.core.AdapterFactory;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.xml.ui.views.contentoutline.JFaceNodeContentProvider;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.stylesheets.MediaList;
-
-
-/**
- * A Content provider for a JFace viewer used to display DOM nodes. This
- * content provider takes an adapter factory to create JFace adapters for the
- * nodes in the tree.
- */
-public class JFaceNodeContentProviderCSS extends JFaceNodeContentProvider {
- protected AdapterFactory adapterFactory;
-
- //protected DomainNotifier domainNotifier;
- /**
- */
- public JFaceNodeContentProviderCSS(AdapterFactory adapterFactory) {
- super(adapterFactory);
- this.adapterFactory = adapterFactory;
- }
-
- /**
- */
- protected void adaptElements(Object element) {
-
- ICSSNode node;
-
- if (element instanceof ICSSModel) {
- ICSSDocument doc = ((ICSSModel) element).getDocument();
- adapterFactory.adapt((INodeNotifier) doc);
- node = doc.getFirstChild();
- } else if (element instanceof ICSSNode) {
- node = ((ICSSNode) element).getFirstChild();
- } else {
- return;
- }
-
- while (node != null) {
- // if (node instanceof CSSRule) {
- adapterFactory.adapt((INodeNotifier) node);
- adaptElements(node);
- // }
- // else{
- // adapterFactory.adapt((INodeNotifier) node);
- // }
-
- node = node.getNextSibling();
- }
- }
-
- /**
- */
- protected void addElements(Object element, ArrayList v) {
-
- ICSSNode node;
-
- if (element instanceof ICSSModel) {
- ICSSModel model = (ICSSModel) element;
- ICSSDocument doc = model.getDocument();
- // addAdapter((INodeNotifier) doc);
- adapterFactory.adapt((INodeNotifier) doc);
- node = doc.getFirstChild();
- } else if (element instanceof ICSSNode) {
- node = ((ICSSNode) element).getFirstChild();
- } else
- return;
-
- while (node != null) {
- if (node instanceof CSSRule) {
- v.add(node);
- }
-
- node = node.getNextSibling();
- }
-
- }
-
- /**
- * The visual part that is using this content provider is about to be
- * disposed. Deallocate all allocated SWT resources.
- */
- public void dispose() {
- }
-
- /**
- * Returns an enumeration containing all child nodes of the given element,
- * which represents a node in a tree. The difference to
- * <code>IStructuredContentProvider.getElements(Object)</code> is as
- * follows: <code>getElements</code> is called to obtain the tree
- * viewer's root elements. Method <code>getChildren</code> is used to
- * obtain the children of a given node in the tree, which can can be a
- * root node, too.
- */
- public Object[] getChildren(Object object) {
- if (object instanceof ICSSNode) {
- ICSSNode node = (ICSSNode) object;
- short nodeType = node.getNodeType();
- if (nodeType == ICSSNode.STYLERULE_NODE || nodeType == ICSSNode.PAGERULE_NODE || nodeType == ICSSNode.FONTFACERULE_NODE) {
- for (node = node.getFirstChild(); node != null && !(node instanceof ICSSStyleDeclaration); node.getNextSibling()) {
- // nop
- }
- }
- List children = new ArrayList();
- ICSSNode child = (node != null) ? node.getFirstChild() : null;
- while (child != null) {
- if (!(child instanceof ICSSPrimitiveValue) && !(child instanceof MediaList)) {
- children.add(child);
- }
- child = child.getNextSibling();
- }
- return children.toArray();
- }
- return new Object[0];
- }
-
- /**
- * Returns an enumeration with the elements belonging to the passed
- * element. These elements can be presented as rows in a table, items in a
- * list etc.
- */
- public Object[] getElements(Object object) {
- // The root is usually an instance of an XMLStructuredModel in
- // which case we want to extract the document.
-
- if (object instanceof ICSSModel) {
- ArrayList v = new ArrayList();
- // internalGetElements(object, v);
- addElements(object, v);
- adaptElements(object);
- return v.toArray();
- }
- return new Object[0];
-
- }
-
- /**
- * Returns the parent for the given element. This method can return
- * <code>null</code> indicating that the parent can't be computed. In
- * this case the tree viewer can't expand a given node correctly if
- * requested.
- */
- public Object getParent(Object object) {
- // IJFaceNodeAdapter adapter = getAdapter(object);
- /*
- * ICSSNodeAdapter adapter = (ICSSNodeAdapter)getAdapter(object); if
- * (adapter != null) return adapter.getParent((ICSSNode) object); else
- * return null;
- */
- if (object instanceof ICSSNode) {
- ICSSNode node = ((ICSSNode) object).getParentNode();
- if (node != null && node.getNodeType() == ICSSNode.STYLEDECLARATION_NODE) {
- node = node.getParentNode();
- }
- return node;
- }
- return null;
- }
-
- /**
- * Returns <code>true</code> if the given element has children.
- * Otherwise <code>false</code> is returned.
- */
- public boolean hasChildren(Object object) {
- // return getAdapter(object).hasChildren((ICSSNode) object);
- if (object instanceof ICSSNode) {
- if (object instanceof ICSSStyleDeclItem)
- return false;
- else
- return ((ICSSNode) object).hasChildNodes();
- }
- return false;
- }
-
- /**
- * Called when the viewer's input is changing from <code>oldInput</code>
- * to <code>newInput</code>. Both <code>newInput</code> and
- * <code>oldInput</code> can be <code>null</code>. If
- * <code>oldInput</code> is <code>null</code> it is the viewer's first
- * connection to the content provider. If <code>newInput</code> is
- * <code>null</code> the visual part is disconnected from any input. A
- * typical implementation of this methods registers the content provider
- * as a listener to changes on the new input, and deregisters the viewer
- * from the old input. The content provider then updates the viewer in
- * response to change notifications from the input.
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- //// If there was no old input, then we must be providing content for
- // this part for the first time...
- //if (oldInput == null) {
- //// If the part is an IDomainListener then make the part start
- // listening to us.
- //if (viewer instanceof IDomainListener)
- //domainNotifier.addDomainListener((IDomainListener) viewer);
- //}
- //// If there is no new input, we must clean ourselves up as if we'd
- // never seen the viewer.
- //else
- //if (newInput == null) {
- //// If the part is an IDomainListener, then we make it stop
- // listening to us.
- //if (viewer instanceof IDomainListener)
- //domainNotifier.removeDomainListener((IDomainListener) viewer);
-
- //}
- }
-
- /**
- */
- /*
- * protected void internalGetElements(Object element, ArrayList v) {
- *
- * ICSSNode node;
- *
- * if (element instanceof ICSSModel) { ICSSModel model =
- * (ICSSModel)element; ICSSDocument doc = model.getDocument();
- * adapterFactory.adapt((INodeNotifier)doc); node = doc.getFirstChild(); }
- * else if (element instanceof ICSSNode) { node =
- * ((ICSSNode)element).getFirstChild(); } else { return; }
- *
- * while (node != null) { switch (node.getNodeType()) { case
- * ICSSNode.STYLEDECLARATION_NODE: adapterFactory.adapt((INodeNotifier)
- * node); break; case ICSSNode.STYLERULE_NODE: case
- * ICSSNode.FONTFACERULE_NODE: case ICSSNode.PAGERULE_NODE: case
- * ICSSNode.IMPORTRULE_NODE: case ICSSNode.MEDIARULE_NODE: v.add(node);
- * adapterFactory.adapt((INodeNotifier) node); break; default:
- * adapterFactory.adapt((INodeNotifier) node); break; }
- *
- * node = node.getNextSibling(); }
- * }
- */
- /**
- * Checks whether the given element is deleted or not.
- */
- public boolean isDeleted(Object element) {
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeLabelProviderCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeLabelProviderCSS.java
deleted file mode 100644
index 5df26448d5..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeLabelProviderCSS.java
+++ /dev/null
@@ -1,231 +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.css.ui.views.contentoutline;
-
-
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.css.core.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSPageRule;
-import org.eclipse.wst.css.core.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.document.ICSSStyleRule;
-import org.eclipse.wst.css.ui.image.CSSImageHelper;
-import org.eclipse.wst.css.ui.image.CSSImageType;
-import org.eclipse.wst.sse.core.AdapterFactory;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapter;
-import org.w3c.dom.css.CSSImportRule;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.stylesheets.MediaList;
-
-
-/**
- * A class that uses a JFaceNodeAdapterFactory to provide adapters to provide
- * the labels and images for DOM nodes.
- */
-public class JFaceNodeLabelProviderCSS implements ILabelProvider {
- protected AdapterFactory fAdapterFactory;
-
- /**
- * JFaceNodeLabelProvider constructor comment.
- */
- public JFaceNodeLabelProviderCSS(AdapterFactory adapterFactory) {
- super();
- this.fAdapterFactory = adapterFactory;
- }
-
- /**
- * Adds a listener to the label provider. A label provider should inform
- * its listener about state changes that enforces rendering of the visual
- * part that uses this label provider.
- */
- public void addListener(ILabelProviderListener listener) {
- // The label provider state never changes so we do not have
- // to implement this method.
- }
-
- /**
- * The visual part that is using this label provider is about to be
- * disposed. Deallocate all allocated SWT resources.
- */
- public void dispose() {
- // Nothing to dispose
- }
-
- /**
- * Returns the JFace adapter for the specified object.
- *
- * @return com.ibm.sed.view.tree.DOMJFaceAdapter The JFace adapter
- * @param adaptable
- * java.lang.Object The object to get the adapter for
- */
- //protected IJFaceNodeAdapter getAdapter(Object adaptable) {
- // return (IJFaceNodeAdapter) adapterFactory.adapt((INodeNotifier)
- // adaptable);
- protected IJFaceNodeAdapter getAdapter(Object adaptable) {
- return (IJFaceNodeAdapter) fAdapterFactory.adapt((INodeNotifier) adaptable);
- }
-
- /**
- * Returns the image for the label of the given element, for use in the
- * given viewer.
- *
- * @param viewer
- * The viewer that displays the element.
- * @param element
- * The element for which to provide the label image. Element
- * can be <code>null</code> indicating no input object is set
- * to the viewer.
- */
- public Image getImage(Object element) {
- // return getAdapter(element).getLabelImage((Node) element);
-
-
- if (element instanceof ICSSNode) {
- CSSImageHelper helper = CSSImageHelper.getInstance();
- return helper.getImage(CSSImageType.getImageType((ICSSNode) element));
- // Image image = getCSSNodeImage(element);
- // return image;
- // return getAdapter(element).getLabelImage((ICSSNode) element);
- }
- return null;
- }
-
- /**
- * Insert the method's description here.
- */
- public String getLabelText(Viewer viewer, Object element) {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Returns the text for the label of the given element, for use in the
- * given viewer.
- *
- * @param viewer
- * The viewer that displays the element.
- * @param element
- * The element for which to provide the label text. Element can
- * be <code>null</code> indicating no input object is set to
- * the viewer.
- */
- public String getText(Object element) {
- // This was returning null, on occasion ... probably should not be,
- // but
- // took the quick and easy way out for now. (dmw 3/8/01)
-
- String result = "";//$NON-NLS-1$
- String mediaText;
- if (element instanceof ICSSNode) {
- switch (((ICSSNode) element).getNodeType()) {
- case ICSSNode.STYLERULE_NODE :
- result = ((ICSSStyleRule) element).getSelectors().getString();
- break;
- case ICSSNode.FONTFACERULE_NODE :
- result = "@font-face";//$NON-NLS-1$
- break;
- case ICSSNode.IMPORTRULE_NODE :
- result = ((CSSImportRule) element).getHref();
- mediaText = getMediaText((CSSImportRule) element);
- if (mediaText != null && 0 < mediaText.length()) {
- result += " (" + mediaText + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- break;
- case ICSSNode.PAGERULE_NODE :
- result = ((ICSSPageRule) element).getSelectors().getString();
- break;
- case ICSSNode.STYLEDECLARATION_NODE :
- result = "properties";//$NON-NLS-1$
- break;
- case ICSSNode.STYLEDECLITEM_NODE :
- result = ((ICSSStyleDeclItem) element).getPropertyName();
- break;
- case ICSSNode.PRIMITIVEVALUE_NODE :
- result = ((ICSSPrimitiveValue) element).getStringValue();
- break;
- case ICSSNode.MEDIARULE_NODE :
- result = "@media";//$NON-NLS-1$
- mediaText = getMediaText((ICSSMediaRule) element);
- if (mediaText != null && 0 < mediaText.length()) {
- result += " (" + mediaText + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- break;
- case ICSSNode.CHARSETRULE_NODE :
- result = "@charset";//$NON-NLS-1$
- break;
- case ICSSNode.MEDIALIST_NODE :
- result = ((MediaList) element).getMediaText();
- break;
- default :
- break;
- }
- }
-
- // if (element instanceof ICSSNode) {
- // ICSSNode node = ((ICSSNode)element);
- // result = getAdapter(element).getLabelText((ICSSNode) element);
- // }
- return result;
- }
-
- private String getMediaText(CSSRule rule) {
- String result = ""; //$NON-NLS-1$
- ICSSNode child = (rule != null) ? ((ICSSNode) rule).getFirstChild() : null;
- while (child != null) {
- if (child.getNodeType() == ICSSNode.MEDIALIST_NODE) {
- result = ((MediaList) child).getMediaText();
- break;
- }
- child = child.getNextSibling();
- }
- return result;
- }
-
- /**
- * Checks whether this label provider is affected by the given domain
- * event.
- */
- public boolean isAffected(Object dummy) {//DomainEvent event) {
- //return event.isModifier(DomainEvent.NON_STRUCTURE_CHANGE);
- return true;
-
- }
-
- /**
- * Returns whether the label would be affected by a change to the given
- * property of the given element. This can be used to optimize a
- * non-structural viewer update. If the property mentioned in the update
- * does not affect the label, then the viewer need not update the label.
- *
- * @param element
- * the element
- * @param property
- * the property
- * @return <code>true</code> if the label would be affected, and
- * <code>false</code> if it would be unaffected
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /**
- * Removes a listener from the label provider.
- */
- public void removeListener(ILabelProviderListener listener) {
- // The label provider state never changes so we do not have
- // to implement this method.
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java
deleted file mode 100644
index ea59ec43a5..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Jan 22, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.css.ui.views.contentoutline;
-
-import java.text.Collator;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.CSSEditorPluginImages;
-import org.eclipse.wst.sse.ui.views.contentoutline.PropertyChangeUpdateAction;
-
-/**
- * Based on com.ibm.etools.dtd.editor.DTDContentOutlinePage#SortAction
- */
-class SortAction extends PropertyChangeUpdateAction {
- private TreeViewer treeViewer;
-
- public SortAction(TreeViewer viewer, IPreferenceStore store, String preferenceKey) {
- super(CSSUIPlugin.getResourceString("%SortAction.0"), store, preferenceKey, false); //$NON-NLS-1$
- ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(CSSUIPlugin.ID, CSSEditorPluginImages.IMG_OBJ_SORT);
- setImageDescriptor(desc);
- setToolTipText(getText());
- treeViewer = viewer;
- if (isChecked()) {
- treeViewer.setSorter(new ViewerSorter(Collator.getInstance()));
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.texteditor.IUpdate#update()
- */
- public void update() {
- super.update();
- treeViewer.getControl().setVisible(false);
- Object[] expandedElements = treeViewer.getExpandedElements();
- if (isChecked()) {
- treeViewer.setSorter(new ViewerSorter(Collator.getInstance()));
- } else {
- treeViewer.setSorter(null);
- }
- treeViewer.setInput(treeViewer.getInput());
- treeViewer.setExpandedElements(expandedElements);
- treeViewer.getControl().setVisible(true);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySheetConfiguration.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySheetConfiguration.java
deleted file mode 100644
index 5972406b2b..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySheetConfiguration.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
- ****************************************************************************/
-/*
- * Created on Jan 23, 2004
- *
- * To change the template for this generated file go to Window - Preferences -
- * Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.css.ui.views.properties;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.sse.ui.views.properties.StructuredPropertySheetConfiguration;
-
-public class CSSPropertySheetConfiguration extends StructuredPropertySheetConfiguration {
- public CSSPropertySheetConfiguration() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.sse.editor.views.properties.StructuredPropertySheetConfiguration#getSelection(org.eclipse.jface.viewers.ISelection,
- * org.eclipse.ui.IWorkbenchPart)
- */
- public ISelection getSelection(IWorkbenchPart selectingPart, ISelection selection) {
- ISelection preferredSelection = super.getSelection(selectingPart, selection);
- if (preferredSelection instanceof IStructuredSelection) {
- Object[] objects = ((IStructuredSelection) preferredSelection).toArray();
- for (int i = 0; i < objects.length; i++) {
- if (objects[i] instanceof ICSSNode) {
- ICSSNode node = (ICSSNode) objects[i];
- while (node.getNodeType() == ICSSNode.PRIMITIVEVALUE_NODE || node.getNodeType() == ICSSNode.STYLEDECLITEM_NODE) {
- node = node.getParentNode();
- objects[i] = node;
-
- }
- }
- }
- preferredSelection = new StructuredSelection(objects);
- }
- return preferredSelection;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySource.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySource.java
deleted file mode 100644
index 2249ea55a5..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySource.java
+++ /dev/null
@@ -1,348 +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.css.ui.views.properties;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.document.ICSSNodeList;
-import org.eclipse.wst.css.core.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.metamodel.CSSMMCategory;
-import org.eclipse.wst.css.core.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelFinder;
-import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelUtil;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-/**
- * A IPropertySource implementation for a JFace viewer used to display
- * propreties of DOM nodes. This takes an adapter factory to create JFace
- * adapters for the nodes in the tree.
- */
-public class CSSPropertySource implements INodeAdapter, IPropertySource {
- protected ICSSNode fNode = null;
- // for performance...
- final static Class ADAPTER_KEY = IPropertySource.class;
-
- /**
- * DOMPropertySource constructor comment.
- */
- public CSSPropertySource(INodeNotifier target) {
- super();
- fNode = (ICSSNode) target;
- }
-
- protected IPropertyDescriptor createDefaultPropertyDescriptor(String attributeName) {
- // the displayName MUST be set
- IPropertyDescriptor descriptor = new CSSTextPropertyDescriptor(attributeName, attributeName, fNode);
- // IPropertyDescriptor descriptor = new
- // TextPropertyDescriptor(attributeName, attributeName);
- return descriptor;
- }
-
- protected IPropertyDescriptor createPropertyDescriptor(CSSMMNode node, String category) {
- return createPropertyDescriptor(node.getName(), category);
- }
-
- protected IPropertyDescriptor createPropertyDescriptor(String name, String category) {
- IPropertyDescriptor descriptor = null;
- if (name != null && 0 < name.length()) {
- name = name.toLowerCase();
- if (category == null) {
- category = CSSUIPlugin.getResourceString("%INFO_Not_Categorized_1"); //$NON-NLS-1$
- }
- descriptor = new CSSTextPropertyDescriptor(name, name, fNode, category);
- // if (category == null) {
- // descriptor = new CSSTextPropertyDescriptor(name, name, fNode);
- // } else {
- // descriptor = new CSSTextPropertyDescriptor(name, name, fNode,
- // category);
- // }
- }
- return descriptor;
- }
-
- /**
- * Returns a value for this object that can be editted in a property
- * sheet.
- *
- * @return a value that can be editted
- */
- public Object getEditableValue() {
- return null;
- }
-
- /**
- * Returns the current collection of property descriptors.
- *
- * @return a vector containing all descriptors.
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- CSSMetaModel metamodel = CSSMetaModelFinder.getInstance().findMetaModelFor(fNode);
- Iterator iProperties = Collections.EMPTY_LIST.iterator();
- switch (fNode.getNodeType()) {
- case ICSSNode.STYLERULE_NODE :
- case ICSSNode.FONTFACERULE_NODE :
- case ICSSNode.PAGERULE_NODE :
- case ICSSNode.STYLEDECLARATION_NODE :
- CSSMMNode mmParent = new CSSMetaModelUtil(metamodel).getMetaModelNodeFor(fNode);
- if (mmParent != null) {
- iProperties = mmParent.getChildNodes();
- }
- break;
- case ICSSNode.STYLEDECLITEM_NODE :
- CSSMMNode mmNode = new CSSMetaModelUtil(metamodel).getMetaModelNodeFor(fNode);
- if (mmNode != null) {
- iProperties = Collections.singletonList(mmNode).iterator();
- }
- break;
- default :
- break;
- }
-
- // setup categories
- Map categories = new HashMap();
- Iterator iCategories = metamodel.getCategories();
- while (iCategories.hasNext()) {
- CSSMMCategory category = (CSSMMCategory) iCategories.next();
- categories.put(category.getName(), category.getCaption());
- }
-
- // collect property names
- Set declaredProperties = new HashSet();
- if (iProperties.hasNext()) {
- CSSStyleDeclaration declaration = getDeclarationNode();
- if (declaration != null) {
- ICSSNodeList nodeList = ((ICSSNode) declaration).getChildNodes();
- int nProps = (nodeList != null) ? nodeList.getLength() : 0;
- for (int i = 0; i < nProps; i++) {
- ICSSNode node = nodeList.item(i);
- if (node instanceof ICSSStyleDeclItem) {
- String name = ((ICSSStyleDeclItem) node).getPropertyName();
- if (name != null && 0 < name.length()) {
- declaredProperties.add(name.toLowerCase());
- }
- }
- }
- }
- }
-
- List descriptors = new ArrayList();
-
- // first: properties from content model
- while (iProperties.hasNext()) {
- CSSMMNode node = (CSSMMNode) iProperties.next();
- if (node.getType() == CSSMMNode.TYPE_PROPERTY || node.getType() == CSSMMNode.TYPE_DESCRIPTOR) {
- String category = (String) categories.get(node.getAttribute("category")); //$NON-NLS-1$
- String name = node.getName().toLowerCase();
- if (declaredProperties.contains(name)) {
- declaredProperties.remove(name);
- }
- IPropertyDescriptor descriptor = createPropertyDescriptor(name, category);
- if (descriptor != null) {
- descriptors.add(descriptor);
- }
- }
- }
-
- // second: existing properties but not in content model
- Iterator iRemains = declaredProperties.iterator();
- while (iRemains.hasNext()) {
- IPropertyDescriptor descriptor = createPropertyDescriptor((String) iRemains.next(), null);
- if (descriptor != null) {
- descriptors.add(descriptor);
- }
- }
-
- IPropertyDescriptor[] resultArray = new IPropertyDescriptor[descriptors.size()];
- return (IPropertyDescriptor[]) descriptors.toArray(resultArray);
- }
-
- /**
- * Returns the current value for the named property.
- *
- * @param name
- * the name of the property as named by its property descriptor
- * @return the current value of the property
- */
- public Object getPropertyValue(Object name) {
- if (name == null) {
- return ""; //$NON-NLS-1$
- }
-
- String valueString = null;
- String nameString = name.toString();
-
- CSSStyleDeclaration declaration = null;
-
- switch (fNode.getNodeType()) {
- case ICSSNode.STYLEDECLITEM_NODE :
- valueString = ((ICSSStyleDeclItem) fNode).getCSSValueText();
- break;
- case ICSSNode.STYLERULE_NODE :
- case ICSSNode.FONTFACERULE_NODE :
- case ICSSNode.PAGERULE_NODE :
- declaration = (CSSStyleDeclaration) fNode.getFirstChild();
- if (declaration != null) {
- valueString = declaration.getPropertyValue(nameString);
- }
- break;
- case ICSSNode.STYLEDECLARATION_NODE :
- valueString = ((CSSStyleDeclaration) fNode).getPropertyValue(nameString);
- break;
- case ICSSNode.PRIMITIVEVALUE_NODE :
- ICSSNode parent = fNode;
- while (parent != null && !(parent instanceof ICSSStyleDeclItem)) {
- parent = parent.getParentNode();
- }
- if (parent != null) {
- valueString = ((ICSSStyleDeclItem) parent).getCSSValueText();
- }
- break;
- default :
- break;
- }
-
- if (valueString == null) {
- valueString = ""; //$NON-NLS-1$
- }
-
- return valueString;
- }
-
- /**
- * Allowing the INodeAdapter to compare itself against the type allows it
- * to return true in more than one case.
- */
- public boolean isAdapterForType(java.lang.Object type) {
- return type.equals(ADAPTER_KEY);
- }
-
- /**
- * Returns whether the property value has changed from the default.
- *
- * @return <code>true</code> if the value of the specified property has
- * changed from its original default value; <code>false</code>
- * otherwise.
- */
- public boolean isPropertySet(Object property) {
- if (property == null) {
- return false;
- }
- CSSStyleDeclaration declaration = getDeclarationNode();
- if (declaration != null) {
- String value = declaration.getPropertyValue(property.toString());
- if (value != null && 0 < value.length()) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- */
- public void notifyChanged(INodeNotifier notifier, int eventType, java.lang.Object changedFeature, java.lang.Object oldValue, java.lang.Object newValue, int pos) {
- }
-
- /**
- * Resets the specified property's value to its default value.
- *
- * @param property
- * the property to reset
- */
- public void resetPropertyValue(Object str) {
- if (str == null) {
- return;
- }
- CSSStyleDeclaration declaration = getDeclarationNode();
- if (declaration != null) {
- declaration.removeProperty(str.toString());
- }
- }
-
- /**
- * Sets the named property to the given value.
- *
- * @param name
- * the name of the property being set
- * @param value
- * the new value for the property
- */
- public void setPropertyValue(Object name, Object value) {
- if (name == null) {
- return;
- }
- String valueString = (value != null) ? value.toString() : null;
- String nameString = name.toString();
- CSSStyleDeclaration declaration = getDeclarationNode();
- if (declaration != null) {
- try {
- if (valueString == null || valueString.length() <= 0) {
- declaration.removeProperty(nameString);
- } else {
- declaration.setProperty(nameString, valueString, ""); //$NON-NLS-1$
- }
- } catch (Exception e) {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- String title = CSSUIPlugin.getResourceString("%Title.InvalidValue"); //$NON-NLS-1$
- String message = CSSUIPlugin.getResourceString("%Message.InvalidValue"); //$NON-NLS-1$
- MessageDialog.openWarning(window.getShell(), title, message);
- }
- }
- }
-
- private CSSStyleDeclaration getDeclarationNode() {
- CSSStyleDeclaration declaration = null;
-
- switch (fNode.getNodeType()) {
- case ICSSNode.STYLEDECLITEM_NODE :
- declaration = (CSSStyleDeclaration) fNode.getParentNode();
- break;
- case ICSSNode.STYLERULE_NODE :
- case ICSSNode.FONTFACERULE_NODE :
- case ICSSNode.PAGERULE_NODE :
- declaration = (CSSStyleDeclaration) fNode.getFirstChild();
- break;
- case ICSSNode.STYLEDECLARATION_NODE :
- declaration = (CSSStyleDeclaration) fNode;
- break;
- case ICSSNode.PRIMITIVEVALUE_NODE :
- ICSSNode parent = fNode;
- while (parent != null && !(parent instanceof CSSStyleDeclaration)) {
- parent = parent.getParentNode();
- }
- if (parent != null) {
- declaration = (CSSStyleDeclaration) parent;
- }
- break;
- default :
- break;
- }
-
- return declaration;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySourceAdapterFactory.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySourceAdapterFactory.java
deleted file mode 100644
index feed515d31..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySourceAdapterFactory.java
+++ /dev/null
@@ -1,45 +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.css.ui.views.properties;
-
-import org.eclipse.wst.sse.core.AbstractAdapterFactory;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-
-
-
-//import com.ibm.sed.edit.xml.DOMPropertySource;
-public class CSSPropertySourceAdapterFactory extends AbstractAdapterFactory {
- /**
- * PropertySourceAdapterFactory constructor comment.
- */
- public CSSPropertySourceAdapterFactory() {
- super();
- }
-
- /**
- * PropertySourceAdapterFactory constructor comment.
- *
- * @param adapterKey
- * java.lang.Object
- * @param registerAdapters
- * boolean
- */
- public CSSPropertySourceAdapterFactory(Object newAdapterKey, boolean newRegisterAdapters) {
- super(newAdapterKey, newRegisterAdapters);
- }
-
- /**
- * createAdapter method comment.
- */
- protected INodeAdapter createAdapter(INodeNotifier target) {
- // at the moment, only one implementation exists
- return new CSSPropertySource(target);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSTextPropertyDescriptor.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSTextPropertyDescriptor.java
deleted file mode 100644
index 366a72e29c..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSTextPropertyDescriptor.java
+++ /dev/null
@@ -1,112 +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.css.ui.views.properties;
-
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.util.CSSPathService;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.xml.core.document.XMLNode;
-
-/**
- */
-public class CSSTextPropertyDescriptor extends TextPropertyDescriptor {
- private final ICSSNode fNode;
-
- /**
- * CSSTextPropertyDescriptor constructor comment.
- *
- * @param id
- * java.lang.String
- * @param displayName
- * java.lang.String
- */
- public CSSTextPropertyDescriptor(String id, String displayName, ICSSNode node) {
- super(id, displayName);
- this.fNode = node;
- }
-
- public CSSTextPropertyDescriptor(String id, String displayName, ICSSNode node, String category) {
- super(id, displayName);
- this.fNode = node;
- setCategory(category);
- }
-
- /**
- * @return org.eclipse.jface.viewers.CellEditor
- * @param parent
- * org.eclipse.swt.widgets.Composite
- */
- public CellEditor createPropertyEditor(Composite parent) {
- ICSSModel model = fNode.getOwnerDocument().getModel();
- if (model == null)
- return null;
- if (model.getStyleSheetType() == ICSSModel.EXTERNAL && findEditor(model) == null)
- return null;
- // check whether IFile is readonly to prohibit editing before
- // validateEdit()
- IStructuredModel structuredModel = model;
- if (model.getStyleSheetType() != ICSSModel.EXTERNAL) {
- structuredModel = ((XMLNode) model.getOwnerDOMNode()).getModel();
- if (structuredModel == null)
- return null;
- }
- IFile file = CSSPathService.location2File(structuredModel.getBaseLocation());
- if (file == null || file.isReadOnly())
- return null;
-
- return super.createPropertyEditor(parent);
- }
-
- private static IEditorPart findEditor(ICSSModel model) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
- for (int i = 0; i < windows.length; i++) {
- IWorkbenchPage[] pages = windows[i].getPages();
- for (int j = 0; j < pages.length; j++) {
- IEditorReference[] editors = pages[j].getEditorReferences();
- for (int k = 0; k < editors.length; k++) {
- IEditorPart editPart = editors[k].getEditor(false);
- if (editPart != null) {
- IEditorInput editorInput = editPart.getEditorInput();
- if (editorInput instanceof IFileEditorInput) {
- IFile file = ((IFileEditorInput) editorInput).getFile();
- if (file != null) {
- //TODO Urgent needs to be fixed
- // I think we need 'equals' (or 'equivalent'
- // on model) for cases like this
- if (StructuredModelManager.getModelManager().calculateId(file).equals(model.getId())) {
- return editPart;
- }
- }
- }
- }
- }
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.core/.classpath b/bundles/org.eclipse.wst.dtd.core/.classpath
deleted file mode 100644
index df094ee4a7..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <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.dtd.core/.compatibility b/bundles/org.eclipse.wst.dtd.core/.compatibility
deleted file mode 100644
index d77886bda2..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.compatibility
+++ /dev/null
@@ -1,2 +0,0 @@
-#Wed Mar 24 13:53:52 EST 2004
-.project=54098
diff --git a/bundles/org.eclipse.wst.dtd.core/.cvsignore b/bundles/org.eclipse.wst.dtd.core/.cvsignore
deleted file mode 100644
index db54fd1fa9..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-dtdmodel.jar
-build.xml
-temp.folder
-org.eclipse.wst.dtd.core_1.0.0.jar
diff --git a/bundles/org.eclipse.wst.dtd.core/.project b/bundles/org.eclipse.wst.dtd.core/.project
deleted file mode 100644
index 76249e5f71..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.project
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.dtd.core</name>
- <comment></comment>
- <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.dtd.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 69a289faec..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,69 +0,0 @@
-#Thu Dec 16 07:39:20 EST 2004
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-eclipse.preferences.version=1
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.incompleteClasspath=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
diff --git a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fe8b7cb25a..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Dec 16 07:40:58 EST 2004
-compilers.p.unused-element-or-attribute=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unknown-element=0
-compilers.p.unknown-resource=0
-compilers.p.unknown-class=0
-compilers.p.unknown-attribute=0
-compilers.p.no-required-att=0
-eclipse.preferences.version=1
-compilers.p.unresolved-import=0
-compilers.p.illegal-att-value=0
-compilers.use-project=true
diff --git a/bundles/org.eclipse.wst.dtd.core/README.txt b/bundles/org.eclipse.wst.dtd.core/README.txt
deleted file mode 100644
index 5b71e3e17d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-This plugin extends the core model to implement a dtd specific model. \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.core/build.properties b/bundles/org.eclipse.wst.dtd.core/build.properties
deleted file mode 100644
index 8267abc555..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/build.properties
+++ /dev/null
@@ -1,22 +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
-#
-###############################################################################
-bin.includes = plugin.xml,\
- *.jar,\
- dtd.jar,\
- plugin.properties,\
- icons/
-src.includes = plugin.xml,\
- plugin.properties,\
- build.xml,\
- icons/
-source.dtdmodel.jar = src/
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gif
deleted file mode 100644
index 64ee536107..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gif
deleted file mode 100644
index 7017d91b91..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gif
deleted file mode 100644
index 00bb7b475d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gif
deleted file mode 100644
index 795eb5e9f4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gif
deleted file mode 100644
index 28c2ccb1e7..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gif
deleted file mode 100644
index 01f4889869..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gif
deleted file mode 100644
index 749acfc9c9..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gif
deleted file mode 100644
index bc8e66c20f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gif
deleted file mode 100644
index 6a91888855..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gif
deleted file mode 100644
index d30b26b97a..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gif
deleted file mode 100644
index 801c13388d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gif
deleted file mode 100644
index 2fb2ca7a92..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gif
deleted file mode 100644
index 59096688cc..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gif
deleted file mode 100644
index 6fd82e60e1..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gif
deleted file mode 100644
index f849c75d58..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gif
deleted file mode 100644
index c9f09459e6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gif
deleted file mode 100644
index 5f54702ffc..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/newdtd_wiz.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/newdtd_wiz.gif
deleted file mode 100644
index 2c115ff961..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/newdtd_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gif
deleted file mode 100644
index ce9df985b8..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gif
deleted file mode 100644
index 694c26f273..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gif
deleted file mode 100644
index d13ba2e5b0..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gif
deleted file mode 100644
index 8b2b357f48..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gif
deleted file mode 100644
index 96398c0ce1..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gif
deleted file mode 100644
index 041db277d1..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gif
deleted file mode 100644
index 5f9658e5b3..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gif
deleted file mode 100644
index e7422d7738..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gif
deleted file mode 100644
index fb4f9bd29e..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gif
deleted file mode 100644
index f8d5289f11..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gif
deleted file mode 100644
index efa7a38014..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gif
deleted file mode 100644
index 358997d294..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gif
deleted file mode 100644
index daf514dccd..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gif
deleted file mode 100644
index a1ac131e67..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gif
deleted file mode 100644
index 8ed4cb7374..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/plugin.properties b/bundles/org.eclipse.wst.dtd.core/plugin.properties
deleted file mode 100644
index f1fa7374a4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/plugin.properties
+++ /dev/null
@@ -1,127 +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
-#
-###############################################################################
-! Properties file for component: XML tools SSE DTD Model
-! Packaged for translation in: xml.zip
-
-!plugin.xml
-providerName=Eclipse.org
-pluginName=Structured Source DTD Model
-nlFeatureName=Structured Source DTD Model NL Support
-
-! Strings for DTDBasicTypeImpl type descriptions
-_UI_NONE_DESC=None
-
-!! NOTE TO TRANSLATOR: Do not translate following text in parentheses on following 10 lines i.e.(CDATA)
-_UI_CHARACTER_DATA_DESC=Character Data (CDATA)
-_UI_IDENTIFIER_DESC=Identifier (ID)
-_UI_ID_REFERENCE_DESC=ID Reference (IDREF)
-_UI_ID_REFERENCES_DESC=ID References (IDREFS)
-_UI_ENTITY_NAME_DESC=Entity Name (ENTITY)
-_UI_ENTITY_NAMES_DESC=Entity Names (ENTITIES)
-_UI_NAME_TOKEN_DESC=Name Token (NMTOKEN)
-_UI_NAME_TOKENS_DESC=Name Tokens (NMTOKENS)
-_UI_ENUM_NAME_TOKENS_DESC=Enumerated Name Tokens
-_UI_ENUM_NOTATION_DESC=Enumerated NOTATION
-
-!dtd/util/CreateListItems.java
-_UI_LABEL_NONE=(none)
-
-! Strings from sed/model
-
-! Attribute.java
-_UI_LABEL_ATTR_DEFAULT_VAL=Attribute Default Change Value
-_UI_LABEL_ATTR_DEFAULT_KIND=Change Attribute Default Value
-_UI_LABEL_ATTR_TYPE=Change Attribute Type
-
-! AttributeEnumList
-_UI_LABEL_ATTR_ENUM_ITEMS=Change Attribute Enumeration Value
-
-! AttributeList
-_UI_LABEL_ATTR_LIST_ADD=Add Attribute
-
-! CMGroupNode
-_UI_LABEL_CM_GRP_NODE_CONNECTOR=Change Connector
-_UI_LABEL_CM_GRP_NODE_INSERT_ELEMENT=Insert Element
-_UI_LABEL_CM_GRP_NODE_ADD_GRP=Add Group
-_UI_LABEL_CM_GRP_NODE_ADD_CHILD=Add Child Element
-
-! CMNode
-_UI_LABEL_CM_NODE_MIX_CONTENT=Mixed Content
-_UI_LABEL_CM_NODE_CHILD_CONTENT=Children Content
-_UI_LABEL_CM_NODE_SET_MIX_CONTENT=Set Mixed Content
-_UI_LABEL_CM_NODE_SET_CHILD_CONTENT=Set Children Content
-
-!! NOTE TO TRANSLATOR - USAGE: "Set <variable content> Content"
-_UI_LABEL_CM_NODE_SET=Set
-_UI_LABEL_CM_NODE_CONTENT=Content
-
-!! NOTE TO TRANSLATOR - DO NOT TRANSLATE FOLLOWING 3 LINES
-_UI_LABEL_CM_NODE_PCDATA=(#PCDATA)
-_UI_LABEL_CM_NODE_ANY=ANY
-_UI_LABEL_CM_NODE_EMPTY=EMPTY
-
-! CMRepeatableNode
-_UI_LABEL_CM_REP_NODE_CHG_OCCUR=Change Occurrence
-
-! Comment
-_UI_LABEL_COMMENT_CHG=Comment Change
-
-! DTDFile
-_UI_LABEL_DTD_FILE_ADD_ELEMENT=Add Element
-_UI_LABEL_DTD_FILE_ADD_ENTITY=Add Entity
-_UI_LABEL_DTD_FILE_ADD_COMMENT=Add Comment
-_UI_LABEL_DTD_FILE_ADD_PARM_ENTITY_REF=Add Parameter Entity Reference
-_UI_LABEL_DTD_FILE_ADD_NOTATION=Add Notation
-_UI_LABEL_DTD_FILE_ADD_ATTR_LIST=Add Attribute List
-_UI_LABEL_DTD_FILE_DELETE=Delete
-
-! DTDNode
-_UI_LABEL_DTD_NODE_NAME_CHG=Name Change
-_UI_LABEL_DTD_NODE_DELETE=Delete
-
-! Element
-_UI_LABEL_ELEMENT_ADD_ATTR=Add Attribute
-_UI_LABEL_ELEMENT_ADD_GRP=Add Group
-_UI_LABEL_ELEMENT_ADD_CHILD=Add Child Element
-
-! Entity
-_UI_LABEL_ENTITY_SET_PARM_ENTITY=Set Parameter Entity
-_UI_LABEL_ENTITY_SET_GENERAL_ENTITY=Set General Entity
-_UI_LABEL_ENTITY_SET_EXT_ENTITY=Set External Entity
-_UI_LABEL_ENTITY_SET_INT_ENTITY=Set Internal Entity
-_UI_LABEL_ENTITY_VALUE_CHG=Entity Value Change
-
-!! NOTE TO TRANSLATOR - USAGE: "NDATA Change"
-_UI_LABEL_ENTITY_NDATA_CHANGE=Change
-
-! ExternalNode
-_UI_LABEL_EXT_NODE_PUBLIC_ID_CHG=Public ID Change
-_UI_LABEL_EXT_NODE_SYSTEM_ID_CHG=System ID Change
-
-! NodeList
-_UI_LABEL_NODE_LIST_ELEMENTS=Elements
-_UI_LABEL_NODE_LIST_ENTITIES=Entities
-_UI_LABEL_NODE_LIST_NOTATIONS=Notations
-_UI_LABEL_NODE_LIST_COMMENTS=Comments
-_UI_LABEL_NODE_LIST_OTHER=Other
-_UI_LABEL_NODE_LIST_ATTRIBUTES=Attributes
-
-! ParameterEntityReference
-_UI_LABEL_PARM_ENTITY_REF_CHG_ENTITY_REF=Change Entity Reference
-_UI_LABEL_PARM_ENTITY_REF_COMMENT_CHG=Comment Change
-
-! TopLevelNode
-_UI_LABEL_TOP_LEVEL_NODE_DELETE=Delete
-#
-Structured_DTD_Document_Factory_Extension.name=Structured DTD Document Factory Extension
-DTD_Content_Type_Extension_Element.name=DTD Content Type
diff --git a/bundles/org.eclipse.wst.dtd.core/plugin.xml b/bundles/org.eclipse.wst.dtd.core/plugin.xml
deleted file mode 100644
index 711b572d02..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/plugin.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.dtd.core"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.wst.dtd.core.internal.DTDCorePlugin">
-
- <runtime>
- <library name="dtdmodel.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.wst.common.encoding" />
- <import plugin="org.eclipse.wst.sse.core" />
- <import plugin="org.eclipse.wst.xml.core" />
- <import plugin="org.eclipse.core.resources" />
- <import plugin="org.eclipse.core.runtime" />
- <import plugin="org.eclipse.ui" />
- </requires>
-
-
- <extension point="org.eclipse.wst.sse.core.modelHandler">
- <modelHandler
- class="org.eclipse.wst.dtd.core.modelhandler.ModelHandlerForDTD"
- associatedContentTypeId="org.eclipse.wst.dtd.core.dtdsource"
- id="org.eclipse.wst.dtd.core.modelhandler">
- </modelHandler>
- </extension>
- <extension
- point="org.eclipse.wst.sse.core.builderdelegate"
- id="org.eclipse.wst.dtd.core.builderdelegate.todo">
- <participant
- class="org.eclipse.wst.dtd.core.builder.delegates.DTDTaskTagSeeker"
- contentType="org.eclipse.wst.dtd.core.dtdsource"
- />
- </extension>
-
- <extension point="org.eclipse.core.filebuffers.documentCreation"
- id="org.eclipse.wst.dtd.core.documentfactories"
- name="%Structured_DTD_Document_Factory_Extension.name">
- <factory
- contentTypeId="org.eclipse.wst.dtd.core.dtdsource"
- class="org.eclipse.wst.sse.core.filebuffers.BasicStructuredDocumentFactory"/>
- </extension>
-
- <extension point="org.eclipse.team.core.fileTypes">
- <fileTypes
- type="text"
- extension="dtd" />
- <fileTypes
- type="text"
- extension="mod" />
- <fileTypes
- type="text"
- extension="ent" />
- </extension>
-
- <extension
- point="org.eclipse.core.runtime.contentTypes">
- <content-type
- file-extensions="dtd,mod,ent"
- priority="normal"
- name="%DTD_Content_Type_Extension_Element.name"
- id="dtdsource"
- base-type="org.eclipse.core.runtime.text"
- default-charset="UTF-8">
- <describer class="org.eclipse.wst.dtd.core.content.ContentDescriberForDTD"/>
- </content-type>
- </extension>
-
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Attribute.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Attribute.java
deleted file mode 100644
index 30543370ac..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Attribute.java
+++ /dev/null
@@ -1,370 +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.dtd.core;
-
-import java.util.Hashtable;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-// base class for an Element's contentmodel
-public class Attribute extends DTDNode {
-
- public static final String CDATA = DTDCorePlugin.getDTDString("_UI_CHARACTER_DATA_DESC"); //$NON-NLS-1$
- public static final String ENTITIES = DTDCorePlugin.getDTDString("_UI_ENTITY_NAMES_DESC"); //$NON-NLS-1$
- public static final String ENTITY = DTDCorePlugin.getDTDString("_UI_ENTITY_NAME_DESC"); //$NON-NLS-1$
- public static final String ENUMERATED_NAME = DTDCorePlugin.getDTDString("_UI_ENUM_NAME_TOKENS_DESC"); //$NON-NLS-1$
- public static final String ENUMERATED_NOTATION = DTDCorePlugin.getDTDString("_UI_ENUM_NOTATION_DESC"); //$NON-NLS-1$
- public static final String FIXED = "#FIXED"; //$NON-NLS-1$
- public static final String ID = DTDCorePlugin.getDTDString("_UI_IDENTIFIER_DESC"); //$NON-NLS-1$
- public static final String IDREF = DTDCorePlugin.getDTDString("_UI_ID_REFERENCE_DESC"); //$NON-NLS-1$
- public static final String IDREFS = DTDCorePlugin.getDTDString("_UI_ID_REFERENCES_DESC"); //$NON-NLS-1$
-
- public static final String IMPLIED = "#IMPLIED"; //$NON-NLS-1$
- public static final String NMTOKEN = DTDCorePlugin.getDTDString("_UI_NAME_TOKEN_DESC"); //$NON-NLS-1$
- public static final String NMTOKENS = DTDCorePlugin.getDTDString("_UI_NAME_TOKENS_DESC"); //$NON-NLS-1$
- public static final String REQUIRED = "#REQUIRED"; //$NON-NLS-1$
-
- protected static Hashtable typeHash = new Hashtable();
-
- public static final String[] types = {CDATA, ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS, ENUMERATED_NAME, ENUMERATED_NOTATION};
-
- {
- typeHash.put(DTDRegionTypes.CDATA_KEYWORD, CDATA);
- typeHash.put(DTDRegionTypes.ID_KEYWORD, ID);
- typeHash.put(DTDRegionTypes.IDREF_KEYWORD, IDREF);
- typeHash.put(DTDRegionTypes.IDREFS_KEYWORD, IDREFS);
- typeHash.put(DTDRegionTypes.ENTITY_KEYWORD, ENTITY);
- typeHash.put(DTDRegionTypes.ENTITIES_KEYWORD, ENTITIES);
- typeHash.put(DTDRegionTypes.NMTOKEN_KEYWORD, NMTOKEN);
- typeHash.put(DTDRegionTypes.NMTOKENS_KEYWORD, NMTOKENS);
- typeHash.put(DTDRegionTypes.NOTATION_KEYWORD, ENUMERATED_NOTATION);
- // this one's a special case since there is no keyword for
- // enumerated name tokens
- typeHash.put("()", ENUMERATED_NAME); //$NON-NLS-1$
-
- // now put the reverse in place. This gives us a 2 way lookup
- // for when we want to retrieve the value and when we want to set it
- typeHash.put(CDATA, "CDATA"); //$NON-NLS-1$
- typeHash.put(ID, "ID"); //$NON-NLS-1$
- typeHash.put(IDREF, "IDREF"); //$NON-NLS-1$
- typeHash.put(IDREFS, "IDREFS"); //$NON-NLS-1$
- typeHash.put(ENTITY, "ENTITY"); //$NON-NLS-1$
- typeHash.put(ENTITIES, "ENTITIES"); //$NON-NLS-1$
- typeHash.put(NMTOKEN, "NMTOKEN"); //$NON-NLS-1$
- typeHash.put(NMTOKENS, "NMTOKENS"); //$NON-NLS-1$
- typeHash.put(ENUMERATED_NAME, ""); //$NON-NLS-1$
- typeHash.put(ENUMERATED_NOTATION, "NOTATION"); //$NON-NLS-1$
- }
-
- private AttributeEnumList enumList = null;
-
- // public static final String IMPLIED = "IMPLIED";
-
- public Attribute(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public String getDefaultKind() {
- ITextRegion defaultKindRegion = getDefaultKindRegion();
- if (defaultKindRegion != null) {
- return getStructuredDTDDocumentRegion().getText(defaultKindRegion);
- }
-
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getDefaultKindRegion() {
- RegionIterator iter = iterator();
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType() == DTDRegionTypes.IMPLIED_KEYWORD || region.getType() == DTDRegionTypes.REQUIRED_KEYWORD || region.getType() == DTDRegionTypes.FIXED_KEYWORD) {
- return region;
- }
- }
- return null;
- }
-
- public String getDefaultValue() {
- ITextRegion defaultValue = getNextQuotedLiteral(iterator());
- if (defaultValue != null) {
- return getValueFromQuotedRegion(defaultValue);
- }
- return ""; //$NON-NLS-1$
- }
-
- public AttributeEnumList getEnumList() {
- return enumList;
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ATTRIBUTEICON);
- }
-
- public ITextRegion getNameRegion() {
- return getNextRegion(iterator(), DTDRegionTypes.ATTRIBUTE_NAME);
- }
-
- public ITextRegion getNextQuotedLiteral(RegionIterator iter) {
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType().equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || region.getType().equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) {
- return region;
- }
- }
- return null;
- }
-
- protected int getOffsetAfterType() {
- ITextRegion typeRegion = getTypeRegion();
-
- String type = getType();
- boolean isEnumeration = type.equals(ENUMERATED_NAME) || type.equals(ENUMERATED_NOTATION);
- if (isEnumeration) {
- // now check if maybe this is an enumeration
- if (getEnumList() != null) {
- return getEnumList().getEndOffset();
- }
- }
- if (typeRegion != null) {
- return getStructuredDTDDocumentRegion().getEndOffset(typeRegion);
- } else {
- ITextRegion nameRegion = getNameRegion();
- return getStructuredDTDDocumentRegion().getEndOffset(nameRegion);
- // // create one
- // typeRegion =
- // findOrCreateTypeRegion((String)typeHash.get(CDATA));
- }
- }
-
- public String getType() {
- ITextRegion region = getTypeRegion();
- if (region != null) {
- String type = (String) typeHash.get(region.getType());
- if (type == null) {
- // just return the text of the type region since this may be
- // an entity representing the type;
- return getStructuredDTDDocumentRegion().getText(region);
- }
- return type;
- } else if (getEnumList() != null) {
- // enumerated name tokens don't have a type keyword. just
- // the existence of the left paren is enough
- return (String) typeHash.get("()"); //$NON-NLS-1$
- }
-
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getTypeRegion() {
- RegionIterator iter = iterator();
-
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType() == DTDRegionTypes.CDATA_KEYWORD || region.getType() == DTDRegionTypes.ID_KEYWORD || region.getType() == DTDRegionTypes.IDREF_KEYWORD || region.getType() == DTDRegionTypes.IDREFS_KEYWORD || region.getType() == DTDRegionTypes.ENTITY_KEYWORD || region.getType() == DTDRegionTypes.ENTITIES_KEYWORD || region.getType() == DTDRegionTypes.NMTOKEN_KEYWORD || region.getType() == DTDRegionTypes.NMTOKENS_KEYWORD || region.getType() == DTDRegionTypes.NOTATION_KEYWORD || region.getType() == DTDRegionTypes.PARM_ENTITY_TYPE) {
- return region;
- }
- }
- return null;
- }
-
- public String getValueFromQuotedRegion(ITextRegion region) {
- String type = region.getType();
- if (type.equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || type.equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) {
- String text = getStructuredDTDDocumentRegion().getText(region);
- return text.substring(1, text.length() - 1);
- }
- return ""; //$NON-NLS-1$
- }
-
- public void resolveRegions() {
- removeChildNodes();
- RegionIterator iter = iterator();
-
- while (iter.hasNext()) {
- ITextRegion currentRegion = iter.next();
- if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) {
- enumList = new AttributeEnumList(getDTDFile(), getStructuredDTDDocumentRegion());
- }
- if (enumList != null) {
- enumList.addRegion(currentRegion);
- if (currentRegion.getType() == DTDRegionTypes.RIGHT_PAREN) {
- return;
- }
- }
- }
-
- }
-
- public void setDefaultKind(Object requestor, String kind) {
-
- ITextRegion defaultKindRegion = getDefaultKindRegion();
- String oldDefaultKind = defaultKindRegion == null ? "" : getStructuredDTDDocumentRegion().getText(defaultKindRegion); //$NON-NLS-1$
- if (!kind.equals(oldDefaultKind)) {
- String newText = kind;
- int startOffset = 0;
- int length = 0;
- if (defaultKindRegion != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(defaultKindRegion);
- length = getStructuredDTDDocumentRegion().getEndOffset(defaultKindRegion) - startOffset;
- } else {
- startOffset = getOffsetAfterType();
- newText = " " + newText; //$NON-NLS-1$
- }
-
- ITextRegion defaultValue = getNextQuotedLiteral(iterator());
-
- if (kind.equals(Attribute.FIXED) || kind.equals("")) { //$NON-NLS-1$
- if (defaultValue == null) {
- // we are changing to fixed and wehave no quoted region.
- // put in an empty value
- newText += " \"\""; //$NON-NLS-1$
- }
- } else {
- if (defaultValue != null) {
- length = getStructuredDTDDocumentRegion().getEndOffset(defaultValue) - startOffset;
- }
- }
- replaceText(requestor, startOffset, length, newText);
- // do something if there is no "kind" region
- }
- }
-
- public void setDefaultKind(String kind) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_ATTR_DEFAULT_KIND")); //$NON-NLS-1$
- setDefaultKind(this, kind);
- endRecording(this);
- }
-
- public void setDefaultValue(Object requestor, String value, boolean fixed) {
- ITextRegion defaultValue = getNextQuotedLiteral(iterator());
- String quoteChar = value.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- int startOffset = 0;
- int endOffset = 0;
- String newText = ""; //$NON-NLS-1$
-
- String oldValue = getDefaultValue();
- boolean oldKindIsFixed = getDefaultKind().equals(Attribute.FIXED);
- if (oldValue.equals(value) && fixed == oldKindIsFixed) {
- // nothing to do
- return;
- }
-
- if (defaultValue != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(defaultValue);
- endOffset = getStructuredDTDDocumentRegion().getEndOffset(defaultValue);
- }
-
- ITextRegion defaultKindRegion = getDefaultKindRegion();
- if (defaultKindRegion != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(defaultKindRegion);
- endOffset = endOffset == 0 ? getStructuredDTDDocumentRegion().getEndOffset(defaultKindRegion) : endOffset;
- } else {
- if (startOffset == 0) {
- endOffset = startOffset = getOffsetAfterType();
- newText += " "; //$NON-NLS-1$
- }
- ITextRegion typeRegion = getTypeRegion();
- if (typeRegion == null && getEnumList() == null) {
- // tack on a default type
- // newText += "CDATA ";
- }
- }
- if (fixed) {
- newText += "#FIXED "; //$NON-NLS-1$
- } else {
- if (getDefaultKind().equals("") && value.equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
- // if not fixed and value is "" then reset the default kind to
- // implied
- newText += "#IMPLIED"; //$NON-NLS-1$
- }
- }
-
- if (!getType().equals("") && !value.equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
- newText += quoteChar + value + quoteChar;
- }
- replaceText(requestor, startOffset, endOffset - startOffset, newText);
- }
-
- public void setDefaultValue(String value, boolean fixed) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_ATTR_DEFAULT_VAL")); //$NON-NLS-1$
- setDefaultValue(this, value, fixed);
- endRecording(this);
- }
-
- public void setType(Object requestor, String type) {
- String oldType = getType();
- if (!type.equals(oldType)) {
- boolean wasEnumeration = oldType.equals(ENUMERATED_NAME) || oldType.equals(ENUMERATED_NOTATION);
- boolean isEnumeration = type.equals(ENUMERATED_NAME) || type.equals(ENUMERATED_NOTATION);
- String newText = ""; //$NON-NLS-1$
- int startOffset = 0;
- int endOffset = 0;
-
- if (wasEnumeration && !isEnumeration) {
- // get rid of the old enumlist
- AttributeEnumList enumList = getEnumList();
- if (enumList != null) {
- startOffset = enumList.getStartOffset();
- endOffset = enumList.getEndOffset();
- }
- }
-
- ITextRegion region = getTypeRegion();
- if (region != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(region);
- if (endOffset == 0) {
- endOffset = getStructuredDTDDocumentRegion().getEndOffset(region);
- }
- } else if (startOffset == 0) {
- ITextRegion nameRegion = getNameRegion();
- newText += " "; //$NON-NLS-1$
- endOffset = startOffset = getStructuredDTDDocumentRegion().getEndOffset(nameRegion);
- }
-
- String newTypeWord = (String) typeHash.get(type);
- if (newTypeWord == null) {
- // then this must be a parm entity being used in the type
- // use the type text directly
- newTypeWord = type;
- }
-
- newText += newTypeWord;
-
- if (isEnumeration && !wasEnumeration) {
- // put in a new numlist
- boolean isSpaceNeeded = !type.equals(ENUMERATED_NAME);
- newText += isSpaceNeeded ? " " : ""; //$NON-NLS-1$ //$NON-NLS-2$
- newText += "()"; //$NON-NLS-1$
- }
- replaceText(requestor, startOffset, endOffset - startOffset, newText);
- if (newTypeWord.equals("") && !type.equals(ENUMERATED_NAME)) { //$NON-NLS-1$
- // the set the defaultkind to ""
- // setDefaultKind(requestor, "");
- setDefaultValue(requestor, "", false); //$NON-NLS-1$
- }
-
- }
- }
-
- public void setType(String type) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_ATTR_TYPE")); //$NON-NLS-1$
- setType(this, type);
- endRecording(this);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/AttributeEnumList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/AttributeEnumList.java
deleted file mode 100644
index b021f7afe9..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/AttributeEnumList.java
+++ /dev/null
@@ -1,72 +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.dtd.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-public class AttributeEnumList extends DTDNode {
-
- private ArrayList list = new ArrayList();
-
- public AttributeEnumList(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public Image getImage() {
- // never exposed in tree
- return null;
- }
-
- // return the items that are in this enumerated list
- public List getItems() {
- list.clear();
- RegionIterator iter = iterator();
- while (iter.hasNext()) {
- ITextRegion name = getNextRegion(iter, DTDRegionTypes.NAME);
- if (name != null) {
- list.add(getStructuredDTDDocumentRegion().getText(name));
- }
- }
- return list;
- }
-
- public void setItems(Object requestor, String[] items) {
- if (items != null) {
- String text = "("; //$NON-NLS-1$
- for (int i = 0; i < items.length; i++) {
- if (i > 0) {
- text += " | " + items[i]; //$NON-NLS-1$
- } else {
- text += items[i];
- }
- }
- text += ")"; //$NON-NLS-1$
- replaceText(requestor, getStartOffset(), getNodeLength(), text);
- }
- }
-
- public void setItems(String[] items) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_ATTR_ENUM_ITEMS")); //$NON-NLS-1$
- setItems(this, items);
- endRecording(this);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/AttributeList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/AttributeList.java
deleted file mode 100644
index a9ede05d41..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/AttributeList.java
+++ /dev/null
@@ -1,116 +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.dtd.core;
-
-import java.util.ArrayList;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-public class AttributeList extends NamedTopLevelNode {
- public AttributeList(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode, DTDRegionTypes.ATTLIST_TAG);
- }
-
- public void addAttribute(String name) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_ATTR_LIST_ADD")); //$NON-NLS-1$
-
- DTDNode lastAttribute = (DTDNode) getLastChild();
- if (lastAttribute != null) {
- replaceText(this, lastAttribute.getEndOffset(), 0, "\n\t" + name + " CDATA #IMPLIED"); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- ITextRegion nameRegion = getNameRegion();
- if (nameRegion != null) {
- replaceText(this, getStructuredDTDDocumentRegion().getEndOffset(nameRegion), 0, "\n\t" + name + " CDATA #IMPLIED"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- }
-
- endRecording(this);
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ATTRIBUTELISTICON);
- }
-
- public void insertIntoModel(Object requestor, Attribute reference, Attribute node, boolean isAfter) {
- int offset = 0;
- String newText = ""; //$NON-NLS-1$
- String nodeText = node.getFullNodeText();
- boolean isLastChild = false;
- if (!isAfter) {
- offset = reference.getStartOffset();
- } else {
- // try and get next child
- Attribute attr = (Attribute) reference.getNextSibling();
- if (attr != null) {
- offset = attr.getStartOffset();
- } else {
- // just use the end offset
- offset = reference.getWhitespaceEndOffset();
- }
- }
- newText += nodeText;// + (isLastChild ? "\n" : "\n\t");
- if (!node.hasTrailingWhitespace()) {
- newText += "\n\t"; //$NON-NLS-1$
- }
- replaceText(requestor, offset, 0, newText);
- }
-
- public void resolveRegions() {
- removeChildNodes();
- RegionIterator iter = iterator();
-
- if (getNameRegion() != null) {
- // we skip past the name token is our name
- skipPastName(iter);
- }
-
- ArrayList children = new ArrayList();
- Attribute attribute = null;
- boolean trailingWhitespace = false;
- while (iter.hasNext()) {
- ITextRegion currentRegion = iter.next();
- if (currentRegion.getType().equals(DTDRegionTypes.ATTRIBUTE_NAME)) {
- attribute = new Attribute(getDTDFile(), getStructuredDTDDocumentRegion());
- children.add(attribute);
- appendChild(attribute);
- trailingWhitespace = false;
- }
- if (attribute != null && currentRegion.getType() != DTDRegionTypes.END_TAG) {
- if (!trailingWhitespace) {
- attribute.addRegion(currentRegion);
- } else {
- if (currentRegion.getType() == DTDRegionTypes.WHITESPACE) {
- attribute.addWhitespaceRegion(currentRegion);
- }
- }
-
- // the following prevents extra whitespace from being picked
- // up by the attribute
- if (currentRegion.getType() == DTDRegionTypes.REQUIRED_KEYWORD || currentRegion.getType() == DTDRegionTypes.IMPLIED_KEYWORD || currentRegion.getType() == DTDRegionTypes.SINGLEQUOTED_LITERAL || currentRegion.getType() == DTDRegionTypes.DOUBLEQUOTED_LITERAL) {
- trailingWhitespace = true;
- }
- }
- }
- int numKids = children.size();
- for (int i = 0; i < numKids; i++) {
- ((Attribute) children.get(i)).resolveRegions();
- } // end of for ()
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMBasicNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMBasicNode.java
deleted file mode 100644
index e5b70f89f2..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMBasicNode.java
+++ /dev/null
@@ -1,163 +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.dtd.core;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-/*
- * CMBasicNode combines all the different content types into one. The idea
- * behind this is to allow arbitrary name changes to not require a tree
- * update.
- */
-public class CMBasicNode extends CMRepeatableNode {
-
- // static final int EMPTY = 0;
- // static final int ANY = 1;
- // static final int PCDATA = 2;
-
- public CMBasicNode(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public Image getImage() {
- final String name = getName();
- ITextRegion pcdata = getNextRegion(iterator(), DTDRegionTypes.CONTENT_PCDATA);
- if (pcdata != null) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.PCDATAICON);
- }
-
- if (isRootElementContent()) {
- if (name.equals(EMPTY)) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.EMPTYICON);
- } else if (name.equals(ANY)) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ANYICON);
- }
- }
-
- // Otherwise this is just an element reference node. Just return
- // what CMRepeatableNode would give us
- return super.getImage();
- }
-
- public ITextRegion getNameRegion() {
- RegionIterator iter = iterator();
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType() == DTDRegionTypes.NAME || region.getType() == DTDRegionTypes.CONTENT_PCDATA) {
- return region;
- }
- }
- return null;
- }
-
- // returns the occurrencetoken, or the token where the occurrence token
- // should appear after
- public ITextRegion getOccurrenceRegion() {
- RegionIterator iter = iterator();
- skipPastName(iter);
- if (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType() == DTDRegionTypes.OCCUR_TYPE) {
- return region;
- }
- }
- return getNameRegion();
- }
-
- public String getType() {
- ITextRegion pcdata = getNextRegion(iterator(), DTDRegionTypes.CONTENT_PCDATA);
- if (pcdata != null) {
- return PCDATA;
- }
-
- if (isRootElementContent()) {
- final String name = getName();
- if (isRootElementContent()) {
- if (name.equals(EMPTY)) {
- return EMPTY;
- } else if (name.equals(ANY)) {
- return ANY;
- } else {
- // otherwise just return it's name as the type
- return name;
- }
-
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- public boolean isEmptyAnyOrPCData() {
- if (isPCData()) {
- return true;
- }
-
-
- final String name = getName();
- if (isRootElementContent()) {
- if (name.equals(EMPTY) || name.equals(ANY)) {
- return true;
- }
- }
- return false;
- }
-
- public boolean isPCData() {
- ITextRegion pcdata = getNextRegion(iterator(), DTDRegionTypes.CONTENT_PCDATA);
- if (pcdata != null) {
- return true;
- }
- return false;
- }
-
- // public Node insertRegion(Region token)
- // {
- // if (!tokenStream.containsToken(token) && token.getType() ==
- // Token.OCCUR_TYPE)
- // {
- // // then add it so that our range contains it
- // insertIntoTokenStream(token);
- // }
- // return this;
- // }
-
- public boolean isReference() {
- return !isEmptyAnyOrPCData();
- }
-
- public void setName(Object requestor, String name) {
- // beginRecording(requestor, "Name Change");
-
- super.setName(requestor, name);
- if (!isReference()) {
- // if it is no longer a reference node, remove the occurrence
- // token
- setOccurrence(requestor, CMRepeatableNode.ONCE);
- }
-
- // endRecording(requestor);
- }
-
- /*
- * public static String getName(int type) { switch (type) { case EMPTY:
- * return emptyString; case ANY: return anyString; case PCDATA: return
- * pcdataString; default: break; } // end of switch () return ""; }
- */
-
-}// CMBasicNode
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMGroupNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMGroupNode.java
deleted file mode 100644
index 5d90898f79..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMGroupNode.java
+++ /dev/null
@@ -1,425 +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.dtd.core;
-
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.util.DTDUniqueNameHelper;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-public class CMGroupNode extends CMRepeatableNode {
-
- public static final char CHOICE = '|';
- public static final char SEQUENCE = ',';
-
- protected char connector = SEQUENCE;
-
- // protected ArrayList children = new ArrayList();
-
- public CMGroupNode(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public void addChild() {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_CM_GRP_NODE_ADD_CHILD")); //$NON-NLS-1$
- DTDNode lastNode = (DTDNode) getLastChild();
- String elementName = DTDUniqueNameHelper.getUniqueName(getChildrenList(), "ChildNode"); //$NON-NLS-1$
- if (lastNode != null) {
- replaceText(this, lastNode.getEndOffset(), 0, String.valueOf(getConnector()) + elementName); //$NON-NLS-1$
- } else {
- replaceText(this, getStartOffset() + 1, 0, elementName); //$NON-NLS-1$
- }
-
- endRecording(this);
- }
-
- public void addGroup() {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_CM_GRP_NODE_ADD_GRP")); //$NON-NLS-1$
- DTDNode lastNode = (DTDNode) getLastChild();
- if (lastNode != null) {
- replaceText(this, lastNode.getEndOffset(), 0, String.valueOf(getConnector()) + " ()"); //$NON-NLS-1$
- } else {
- replaceText(this, getStartOffset() + 1, 0, "()"); //$NON-NLS-1$
- }
-
- endRecording(this);
- }
-
- public void delete(Object requestor, DTDNode child) {
- Object[] children = getChildren();
-
- if (children.length == 1 && getFirstChild() == child) {
- replaceText(requestor, child.getStartOffset(), child.getNodeLength(), null);
- return;
- }
-
- for (int i = 0; i < children.length - 1; i++) {
- DTDNode childA = (DTDNode) children[i];
- DTDNode childB = (DTDNode) children[i + 1];
-
- boolean childADeleted = childA == child;
- boolean childBDeleted = childB == child;
- if (childADeleted || childBDeleted) {
- // we found the child
- int startOffset = childADeleted ? childA.getStartOffset() : childA.getEndOffset();
- int endOffset = childADeleted ? childB.getStartOffset() : childB.getEndOffset();
- replaceText(requestor, startOffset, endOffset - startOffset, ""); //$NON-NLS-1$
- removeChild(child);
- break;
- }
- }
- }
-
- /**
- * Get the value of connector.
- *
- * @return value of connector.
- */
- public char getConnector() {
- Object[] children = getChildren();
- for (int i = 0; i < children.length - 1; i++) {
- DTDNode childA = (DTDNode) children[i];
- DTDNode childB = (DTDNode) children[i + 1];
-
- // create a stream between the two siblings and walk it
- // note that this stream includes the last region of the first
- // sibling and the first region of the next sibling.
- // both these should be ignored
- RegionIterator iter = new RegionIterator(getStructuredDTDDocumentRegion(), childA.getEndOffset(), childB.getStartOffset());
- // stream.setFirstRegion(childA.getLastRegion());
- // stream.setLastRegion(childB.getFirstRegion());
- // Iterator iter = stream.iterator();
- // skip the first region which is the last region of childA
- //do we need this now ?
- // iter.next();
- ITextRegion currentRegion = null;
- while (iter.hasNext() && currentRegion != childB.getStartRegion()) {
- currentRegion = iter.next();
- if (currentRegion.getType() == DTDRegionTypes.CONNECTOR) {
- connector = getStructuredDTDDocumentRegion().getText(currentRegion).charAt(0);
- return connector;
- }
- }
- }
- return connector;
- }
-
- public Image getImage() {
- DTDCorePlugin resourcePlugin = DTDCorePlugin.getInstance();
- switch (getConnector()) {
- case SEQUENCE :
- return resourcePlugin.getImage(DTDResource.ONESEQUENCEICON);
- /*
- * switch (getOccurrence()) { case ONCE : return
- * resourcePlugin.getImage(DTDResource.ONESEQUENCEICON); case
- * OPTIONAL : return
- * resourcePlugin.getImage(DTDResource.OPTIONALSEQUENCEICON); case
- * ONE_OR_MORE : return
- * resourcePlugin.getImage(DTDResource.ONEORMORESEQUENCEICON);
- * case ZERO_OR_MORE : return
- * resourcePlugin.getImage(DTDResource.ZEROORMORESEQUENCEICON); }
- */
- case CHOICE :
- return resourcePlugin.getImage(DTDResource.ONECHOICEICON);
- /*
- * switch (getOccurrence()) { case ONCE : return
- * resourcePlugin.getImage(DTDResource.ONECHOICEICON); case OPTIONAL :
- * return resourcePlugin.getImage(DTDResource.OPTIONALCHOICEICON);
- * case ONE_OR_MORE : return
- * resourcePlugin.getImage(DTDResource.ONEORMORECHOICEICON); case
- * ZERO_OR_MORE : return
- * resourcePlugin.getImage(DTDResource.ZEROORMORECHOICEICON); }
- */
- }
- return null;
- }
-
- public String getName() {
- return ""; //$NON-NLS-1$
- }
-
- // returns the occurrenceregion, or the last region where the occurrence
- // region should appear after
- public ITextRegion getOccurrenceRegion() {
- int nesting = 0;
-
- // we skip past the first left paren we see since that is the
- // beginning of our own node
- RegionIterator iter = iterator();
- // we assume the first region is the '('
- iter.next();
- ITextRegion currentRegion = null;
- while (iter.hasNext() && nesting >= 0) {
- currentRegion = iter.next();
- if (currentRegion.getType() == DTDRegionTypes.LEFT_PAREN) {
- nesting++;
- }
- if (currentRegion.getType() == DTDRegionTypes.RIGHT_PAREN) {
- nesting--;
- }
- }
- if (nesting < 0) {
- // This means we have passed over the right paren that marks the
- // end of our grouping.
- // Look for an occurrence region
- while (iter.hasNext()) {
- currentRegion = iter.next();
- if (currentRegion.getType() == DTDRegionTypes.OCCUR_TYPE) {
- return currentRegion;
- }
- }
- }
- // if we're here, this means that there is no occur region. return the
- // last region
- return iter.previous();
- }
-
- public String getType() {
- if (isRootElementContent()) {
- if (getFirstChild() != null) {
- CMNode node = (CMNode) getFirstChild();
- if (node.getType().equals(PCDATA)) {
- return MIXED;
- } else {
- return CHILDREN;
- }
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- public void insertChildNode(Object requestor, String nodeText, int position) {
- Object[] children = getChildren();
-
- int startOffset = 0;
- boolean isLastChild = position == children.length;
- String newText = ""; //$NON-NLS-1$
- if (position < children.length) {
- DTDNode reference = (DTDNode) children[position];
- startOffset = reference.getStartOffset();
- newText = nodeText + " " + String.valueOf(getConnector()) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- } else if (position == children.length) {
- // add to end
- DTDNode reference = (DTDNode) children[position - 1];
- startOffset = reference.getEndOffset();
- newText = " " + String.valueOf(getConnector()) + " " + nodeText; //$NON-NLS-1$ //$NON-NLS-2$
- }
- replaceText(requestor, startOffset, 0, newText);
- }
-
- public void insertChildNode(String nodeText, int position) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_CM_GRP_NODE_INSERT_ELEMENT")); //$NON-NLS-1$
- insertChildNode(this, nodeText, position);
- endRecording(this);
- }
-
- public void insertIntoModel(Object requestor, CMNode reference, CMNode node, boolean isAfter) {
- String nodeText = node.getNodeText();
- List children = getChildrenList();
-
- int index = children.indexOf(reference);
- if (index == -1) {
- // no reference node, add it to the end??
- index = children.size();
- } else {
- // got an index. if we want to add after, increase by 1
- index = isAfter ? index + 1 : index;
- }
- insertChildNode(requestor, nodeText, index);
- }
-
- public void resolveRegions() {
- int nesting = 0;
- // children.clear();
- removeChildNodes();
- // we skip past the first left paren we see since that is the
- // beginning of our own node
- boolean isConnectorSet = false;
- DTDNode currentGroupNode = null;
- CMBasicNode currentReferenceNode = null;
- RegionIterator iter = iterator();
- // we assume the first region is the '('
- iter.next();
- while (iter.hasNext() && nesting >= 0) {
- ITextRegion currentRegion = iter.next();
- if (nesting == 0) {
- if (currentRegion.getType().equals(DTDRegionTypes.CONTENT_PCDATA)) {
- currentGroupNode = currentReferenceNode = null;
- DTDNode pcData = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
- pcData.addRegion(currentRegion);
- appendChild(pcData);
- // children.add(pcData);
- } else if (currentRegion.getType().equals(DTDRegionTypes.NAME)) {
- // we have hit a new reference node. Make sure we reset
- // the groupnode var so it doesn't collect more regions
- currentGroupNode = null;
- currentReferenceNode = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
- currentReferenceNode.addRegion(currentRegion);
- appendChild(currentReferenceNode);
- // children.add(currentReferenceNode);
- } else if (currentRegion.getType().equals(DTDRegionTypes.OCCUR_TYPE)) {
- // we could potentially flag an error here if we hit an
- // occurrence type and currentRefNode and currentGroupNode
- // are null
- if (currentReferenceNode != null) {
- // currentReferenceNode.setOccurrence(currentRegion.getText().toCharArray()[0]);
- currentReferenceNode.addRegion(currentRegion);
- currentReferenceNode = null;
- }
- } else if (currentRegion.getType().equals(DTDRegionTypes.CONNECTOR)) {
- // note that if connector is already set and it is
- // different from the current connector region, then we
- // have an error!
- // setConnector(currentRegion.getText().toCharArray()[0]);
- } else if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) {
- if (currentGroupNode == null) {
- // we have hit a new group. Make sure we reset the
- // referencenode var so it doesn't collect any more
- // regions
- currentReferenceNode = null;
- currentGroupNode = new CMGroupNode(getDTDFile(), getStructuredDTDDocumentRegion());
- appendChild(currentGroupNode);
- // children.add(currentGroupNode);
- }
- }
- }
-
- if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) {
- nesting++;
- }
- if (currentRegion.getType().equals(DTDRegionTypes.RIGHT_PAREN)) {
- nesting--;
- if (nesting == 0 && currentGroupNode != null) {
- currentGroupNode.addRegion(currentRegion);
- // peek at next region to see if it is an occur region. if
- // so, add it to the groupnode
- if (iter.hasNext()) {
- ITextRegion nextRegion = iter.next();
- if (nextRegion.getType().equals(DTDRegionTypes.OCCUR_TYPE)) {
- currentGroupNode.addRegion(nextRegion);
- } else {
- // Otherwise, push it back as the next item to be
- // retrieved by a future next() call
- iter.previous();
- }
- }
- currentGroupNode = null;
- }
- }
- if (currentGroupNode != null) {
- currentGroupNode.addRegion(currentRegion);
- }
- }
-
- if (nesting < 0) {
- // This means we have passed over the right paren that marks the
- // end of our grouping.
- // Look for an occurrence region
- while (iter.hasNext()) {
- ITextRegion currentRegion = iter.next();
- if (currentRegion.getType().equals(DTDRegionTypes.OCCUR_TYPE)) {
- // setOccurrence(currentRegion.getText().toCharArray()[0]);
- }
- } // end of while ()
- }
-
- // for (org.w3c.dom.Node child = getFirstChild(); child != null; child
- // = child.getNextSibling())
- // {
- // System.out.println("child found = " + child);
- // }
-
- Object[] children = getChildren();
- // System.out.println("children legnth = " + children.length);
-
- for (int i = 0; i < children.length; i++) {
- DTDNode currentNode = (DTDNode) children[i];
- currentNode.resolveRegions();
- } // end of while ()
-
- }
-
- /**
- * Set the value of connector.
- *
- * @param v
- * Value to assign to connector.
- */
- public void setConnector(char v) {
- if (connector != v) {
- connector = v;
- // walk through our kids and see if there is a connector between
- // each sibling. if not, create one and set the connector. if
- // there is
- // then just change the text of the connector
- Object[] children = getChildren();
- if (children.length <= 1) {
- // there won't be any connector existing between the children
- // just notify a change in the node and return;
- getDTDFile().notifyNodeChanged(this);
- return;
- }
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_CM_GRP_NODE_CONNECTOR")); //$NON-NLS-1$
- for (int i = 0; i < children.length - 1; i++) {
- DTDNode childA = (DTDNode) children[i];
- DTDNode childB = (DTDNode) children[i + 1];
-
- // create a stream between the two siblings and walk it
- // note that this stream includes the last region of the first
- // sibling and the first region of the next sibling.
- // both these should be ignored
- RegionIterator iter = new RegionIterator(getStructuredDTDDocumentRegion(), childA.getEndOffset(), childB.getStartOffset());
- // skip the first region which is the last region of childA
-
- // do we still need this
- // iter.next();
- ITextRegion currentRegion = null;
- boolean foundConnector = false;
- while (iter.hasNext() && currentRegion != childB.getStartRegion()) {
- currentRegion = iter.next();
- if (currentRegion.getType() == DTDRegionTypes.CONNECTOR) {
- foundConnector = true;
- // Region oldRegion = currentRegion.createCopy();
- // found a connector! on to the next sibling pair
- // currentRegion.updateText(String.valueOf(v));
- replaceText(this, getStructuredDTDDocumentRegion().getStartOffset(currentRegion), 1, String.valueOf(connector));
- //changeStructuredDocument(oldRegion, currentRegion);
- break;
- }
- }
-
- if (!foundConnector) {
- //if we're here, that means we need to insert a new
- // connector region after childA
- replaceText(this, childA.getEndOffset(), 0, String.valueOf(connector));
- // DTDRegion connectorRegion = new
- // DTDRegion(DTDRegionTypes.CONNECTOR,
- // childA.getEndOffset(), 1);
- // insertIntoStructuredDocument(connectorRegion);
- }
- }
- endRecording(this);
- }
- }
-
- // public Object[] getChildren()
- // {
- // return children.toArray();
- // }
-}// CMGroupNode
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMNode.java
deleted file mode 100644
index 539dcdfe11..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMNode.java
+++ /dev/null
@@ -1,134 +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.dtd.core;
-
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-// base class for an Element's contentmodel
-public abstract class CMNode extends DTDNode {
- public static final String ANY = DTDCorePlugin.getDTDString("_UI_LABEL_CM_NODE_ANY"); //$NON-NLS-1$
- public static final String CHILDREN = DTDCorePlugin.getDTDString("_UI_LABEL_CM_NODE_CHILD_CONTENT"); //$NON-NLS-1$
-
- public static final String EMPTY = DTDCorePlugin.getDTDString("_UI_LABEL_CM_NODE_EMPTY"); //$NON-NLS-1$
- public static final String MIXED = DTDCorePlugin.getDTDString("_UI_LABEL_CM_NODE_MIX_CONTENT"); //$NON-NLS-1$
- public static final String PCDATA = DTDCorePlugin.getDTDString("_UI_LABEL_CM_NODE_PCDATA"); //$NON-NLS-1$
-
-
- boolean rootElementContent;
-
- public CMNode(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- // this is only valid to ask if the content is a root element content
- abstract public String getType();
-
- /**
- * Get the value of rootElementContent. This tells us whether this element
- * content's parent is a direct decendent of the containing element
- *
- * @return value of rootElementContent.
- */
- public boolean isRootElementContent() {
- return rootElementContent;
- }
-
- // if this is a root element, change the content to children
- // ie . (child1)
- public void setChildrenContent(String newChild) {
- if (isRootElementContent()) {
- if (!newChild.equals("")) { //$NON-NLS-1$
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_CM_NODE_SET_CHILD_CONTENT")); //$NON-NLS-1$
- replaceText(this, getStartOffset(), getNodeLength(), "(" + newChild + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- endRecording(this);
- return;
- }
-
- if (!getType().equals(CHILDREN)) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_CM_NODE_SET_CHILD_CONTENT")); //$NON-NLS-1$
- if (this instanceof CMBasicNode) {
- replaceText(this, getStartOffset(), getNodeLength(), "(newChild)"); //$NON-NLS-1$
- } else {
- // now must convert from mixed content to this one. must
- // preserve the remaining children
- CMGroupNode group = (CMGroupNode) this;
- CMNode firstChild = (CMNode) group.getFirstChild();
- if (firstChild.getType().equals(PCDATA)) {
- group.delete(firstChild);
- }
- }
-
- endRecording(this);
- }
- }
- }
-
- public void setContent(String content) {
- if (isRootElementContent()) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_CM_NODE_SET") + " " + content + " " + DTDCorePlugin.getDTDString("_UI_LABEL_CM_NODE_CONTENT")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- replaceText(this, getStartOffset(), getNodeLength(), content);
- endRecording(this);
- }
- }
-
- // if this is a root element, change the content to mixed
- // ie . (#PCDATA, child1)
- public void setMixedContent() {
- if (isRootElementContent()) {
- if (!getType().equals(MIXED)) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_CM_NODE_SET_MIX_CONTENT")); //$NON-NLS-1$
- if (this instanceof CMBasicNode) {
- replaceText(this, getStartOffset(), getNodeLength(), "(#PCDATA | newChild)*"); //$NON-NLS-1$
- } else {
- // now must convert from children content to this one.
- // must
- // preserve the children
- CMGroupNode group = (CMGroupNode) this;
- group.setConnector(CMGroupNode.CHOICE);
- group.setOccurrence(CMRepeatableNode.ZERO_OR_MORE);
- CMNode firstChild = (CMNode) group.getFirstChild();
- if (!firstChild.getType().equals(PCDATA)) {
- group.insertChildNode("#PCDATA", 0); //$NON-NLS-1$
- }
- }
- endRecording(this);
- }
- }
- }
-
- /**
- * Set the value of rootElementContent.
- *
- * @param v
- * Value to assign to rootElementContent.
- */
- public void setRootElementContent(boolean v) {
- this.rootElementContent = v;
- }
-
- // public void delete()
- // {
- // if (isRootElementContent())
- // {
- // // then the superclasses delete will be fine
- // super.delete();
- // return;
- // }
-
- // CMGroupNode parent = (CMGroupNode) getParentNode();
- // parent.removeChildNode(this);
- // }
-
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMRepeatableNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMRepeatableNode.java
deleted file mode 100644
index b9155f478a..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/CMRepeatableNode.java
+++ /dev/null
@@ -1,80 +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.dtd.core;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-public abstract class CMRepeatableNode extends CMNode {
-
- public static final char ONCE = '1';
- public static final char ONE_OR_MORE = '+';
- public static final char OPTIONAL = '?';
- public static final char ZERO_OR_MORE = '*';
-
-
- public CMRepeatableNode(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public Image getImage() {
- DTDCorePlugin resourcePlugin = DTDCorePlugin.getInstance();
- return resourcePlugin.getImage(DTDResource.ELEMENTREFICON);
- }
-
- public char getOccurrence() {
- ITextRegion occurRegion = getOccurrenceRegion();
- if (occurRegion != null && occurRegion.getType() == DTDRegionTypes.OCCUR_TYPE) {
- return getStructuredDTDDocumentRegion().getText(occurRegion).charAt(0);
- }
- return CMRepeatableNode.ONCE;
- }
-
- // returns the occurrenceregion, or the last region where the occurrence
- // region should appear after
- abstract public ITextRegion getOccurrenceRegion();
-
- public void setOccurrence(char occurrence) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_CM_REP_NODE_CHG_OCCUR")); //$NON-NLS-1$
- setOccurrence(this, occurrence);
- endRecording(this);
- }
-
- public void setOccurrence(Object requestor, char occurrence) {
- if (getOccurrence() != occurrence) {
- ITextRegion region = getOccurrenceRegion();
- if (region != null) {
- if (region.getType().equals(DTDRegionTypes.OCCUR_TYPE)) {
- if (occurrence == CMRepeatableNode.ONCE) {
- // we need to remove the occur region from the flat
- // model;
- getDTDFile().getStructuredDocument().replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(region), 1, ""); //$NON-NLS-1$
- } else {
- // Region oldOccur = region.createCopy();
- getDTDFile().getStructuredDocument().replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(region), 1, String.valueOf(occurrence));
- // changeStructuredDocument(oldOccur, region);
- }
- } else if (occurrence != CMRepeatableNode.ONCE) {
- // System.out.println(getString());
- // we need to create an occurrenceRegion
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(region), 0, String.valueOf(occurrence));
- }
- }
- }
- }
-
-}// CMRepeatableNode
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Comment.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Comment.java
deleted file mode 100644
index 54f234c8df..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Comment.java
+++ /dev/null
@@ -1,76 +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.dtd.core;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-public class Comment extends NamedTopLevelNode {
-
- public class StartEndPair {
- public int startOffset, endOffset;
- }
-
- public Comment(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode, DTDRegionTypes.COMMENT_START);
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.COMMENTICON);
- }
-
- public String getName() {
- String text = getText();
- if (text.length() <= 30) {
- return text;
- } else {
- return text.substring(0, 29) + "..."; //$NON-NLS-1$
- }
- }
-
- private void getStartAndEndOffsetForText(StartEndPair pair) {
- RegionIterator iter = iterator();
- ITextRegion commentStartTag = getStartTag(iter);
- ITextRegion endCommentTag = getNextRegion(iter, DTDRegionTypes.COMMENT_END);
- pair.endOffset = getStructuredDTDDocumentRegion().getEndOffset();
- if (commentStartTag != null) {
- pair.startOffset = getStructuredDTDDocumentRegion().getEndOffset(commentStartTag);
- }
- if (endCommentTag != null) {
- pair.endOffset = getStructuredDTDDocumentRegion().getStartOffset(endCommentTag);
- }
- }
-
- public String getText() {
- String text = getStructuredDTDDocumentRegion().getText();
- int flatNodeStart = getStructuredDTDDocumentRegion().getStartOffset();
- StartEndPair pair = new StartEndPair();
- getStartAndEndOffsetForText(pair);
- return text.substring(pair.startOffset - flatNodeStart, pair.endOffset - flatNodeStart);
- }
-
- public void setText(String newText) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_COMMENT_CHG")); //$NON-NLS-1$
- int flatNodeStart = getStructuredDTDDocumentRegion().getStartOffset();
- StartEndPair pair = new StartEndPair();
- getStartAndEndOffsetForText(pair);
- replaceText(this, pair.startOffset, pair.endOffset - pair.startOffset, newText);
- endRecording(this);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDFile.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDFile.java
deleted file mode 100644
index 5985ed9122..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDFile.java
+++ /dev/null
@@ -1,655 +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.dtd.core;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.event.IDTDFileListener;
-import org.eclipse.wst.dtd.core.event.NodesEvent;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.util.DTDExternalReferenceRemover;
-import org.eclipse.wst.dtd.core.util.DTDModelUpdater;
-import org.eclipse.wst.dtd.core.util.DTDNotationReferenceRemover;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.events.NewDocumentEvent;
-import org.eclipse.wst.sse.core.events.RegionChangedEvent;
-import org.eclipse.wst.sse.core.events.RegionsReplacedEvent;
-import org.eclipse.wst.sse.core.events.StructuredDocumentRegionsReplacedEvent;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-
-
-public class DTDFile implements IndexedRegion {
- protected NodeList attlistList = new NodeList(this, DTDRegionTypes.ATTLIST_TAG);
- protected NodeList commentList = new NodeList(this, DTDRegionTypes.COMMENT_START);
-
- boolean creatingNewModel = false;
- protected DTDModelImpl dtdModel;
-
- protected NodeList elementList = new NodeList(this, DTDRegionTypes.ELEMENT_TAG);
- protected NodeList entityList = new NodeList(this, DTDRegionTypes.ENTITY_TAG);
-
- protected List folderList = null;
-
- private boolean isMovingNode = false;
-
- protected List lists = new ArrayList();
-
- protected List modelListeners = new ArrayList();
-
- protected List nodeList = new ArrayList();
- protected NodeList notationList = new NodeList(this, DTDRegionTypes.NOTATION_TAG);
- protected NodeList unrecognizedList = new NodeList(this, DTDRegionTypes.UNKNOWN_CONTENT);
-
- public DTDFile(DTDModelImpl dtdModel) {
- this.dtdModel = dtdModel;
- }
-
- public void addDTDFileListener(IDTDFileListener listener) {
- modelListeners.add(listener);
- }
-
- protected void addNode(DTDNode node) {
- addNode(nodeList.size(), node);
- }
-
- protected void addNode(int index, DTDNode node) {
- nodeList.add(index, node);
- /*
- * if (index < nodeList.size()) { insertBefore(node, (DTDNode)
- * nodeList.get(index)); } else { appendChild(node); }
- */
- }
-
- public DTDNode buildNode(IStructuredDocumentRegion flatNode) {
- // ITextRegionList regions = flatNode.getRegions();
- DTDNode node = null;
- if (isElement(flatNode)) {
- // then this is an element
- node = new Element(this, flatNode);
- } else if (isEntity(flatNode)) {
- node = new Entity(this, flatNode);
- } else if (isNotation(flatNode)) {
- node = new Notation(this, flatNode);
- } else if (isAttributeList(flatNode)) {
- node = new AttributeList(this, flatNode);
- } else if (isComment(flatNode)) {
- node = new Comment(this, flatNode);
- } else if (isParameterEntityReference(flatNode)) {
- node = new ParameterEntityReference(this, flatNode);
- } else if (!flatNode.getText().trim().equals("")) { //$NON-NLS-1$
- node = new Unrecognized(this, flatNode);
- }
- if (node != null) {
- insertNode(node);
- node.resolveRegions();
- }
- return node;
- }
-
- public void buildNodes(IStructuredDocumentRegionList list) {
- NodesEvent addedDTDNodes = new NodesEvent();
-
- TopLevelNode previousNode = null;
- for (int i = 0; i < list.getLength(); i++) {
- IStructuredDocumentRegion flatNode = list.item(i);
- TopLevelNode node = (TopLevelNode) buildNode(flatNode);
- // if we don't create a node, then we assume that the flat
- // node was whitespace. Tack it on to a previous toplevel
- // node
- if (node != null) {
- previousNode = node;
- addedDTDNodes.add(node);
- }
- else {
- if (previousNode != null) {
- previousNode.addWhitespaceStructuredDocumentRegion(flatNode);
- }
- }
- }
-
- if (addedDTDNodes.getNodes().size() > 0)// &&
- // creatingNewModel == false)
- {
- // now tell people about the additions
- notifyNodesAdded(addedDTDNodes);
- }
- }
-
- // Implements IndexedRegion
-
- public boolean contains(int testPosition) {
- return getStartOffset() <= testPosition && testPosition <= getEndOffset();
- }
-
- public void createAttributeList(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_DTD_FILE_ADD_ATTR_LIST")); //$NON-NLS-1$
- DTDNode topLevelNode = null;
- String newStream = "<!ATTLIST " + name + ">\n"; //$NON-NLS-1$ //$NON-NLS-2$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void createComment(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_DTD_FILE_ADD_COMMENT")); //$NON-NLS-1$
- DTDNode topLevelNode = null;
- String newStream = "<!-- " + name + " -->\n"; //$NON-NLS-1$ //$NON-NLS-2$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void createElement(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_DTD_FILE_ADD_ELEMENT")); //$NON-NLS-1$
- DTDNode topLevelNode = null;
- String newStream = "<!ELEMENT " + name + " EMPTY>\n"; //$NON-NLS-1$ //$NON-NLS-2$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void createEntity(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_DTD_FILE_ADD_ENTITY")); //$NON-NLS-1$
- DTDNode topLevelNode = null;
- String newStream = "<!ENTITY " + name + " \"\">\n"; //$NON-NLS-1$//$NON-NLS-2$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void createNotation(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_DTD_FILE_ADD_NOTATION")); //$NON-NLS-1$
- DTDNode topLevelNode = null;
- String newStream = "<!NOTATION " + name + " SYSTEM \"\">\n"; //$NON-NLS-1$ //$NON-NLS-2$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void createParameterEntityReference(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_DTD_FILE_ADD_PARM_ENTITY_REF")); //$NON-NLS-1$
- DTDNode topLevelNode = null;
- String newStream = name + "\n"; //$NON-NLS-1$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void deleteNode(DTDNode node) {
- getDTDModel().beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_DTD_FILE_DELETE")); //$NON-NLS-1$
- deleteNode(this, node);
- getDTDModel().endRecording(this);
- }
-
- public void deleteNode(Object requestor, DTDNode node) {
- DTDNode parent = (DTDNode) node.getParentNode();
- if (parent != null) {
- parent.delete(requestor, node);
- } else {
- if (!isMovingNode) {
- DTDModelUpdater updater = new DTDModelUpdater();
- updater.objectAboutToBeDeleted(requestor, node);
- if (node instanceof ParameterEntityReference) {
- Entity referencedEntity = ((ParameterEntityReference) node).getEntityObject();
- if (referencedEntity != null) {
- // remove references to all elements and parm entities
- // contained in our current model
- DTDExternalReferenceRemover remover = new DTDExternalReferenceRemover();
- remover.externalReferenceAboutToChange(requestor, referencedEntity);
- }
- } else if (node instanceof Notation) {
- Notation notation = ((Notation) node);
- DTDNotationReferenceRemover remover = new DTDNotationReferenceRemover();
- remover.notationAboutToBeDeleted(requestor, notation);
- }
- }
-
- // no parent? then delete up until the start of the next node
- // if it is a top level node
- int startOffset = node.getStartOffset();
- int endOffset = node.getWhitespaceEndOffset();
- if (node instanceof TopLevelNode) {
- endOffset = getInsertOffset(node, true);
- }
- getStructuredDocument().replaceText(requestor, startOffset, endOffset - startOffset, ""); //$NON-NLS-1$
- }
- }
-
- public NodeList getComments() {
- return commentList;
- }
-
- public DTDModelImpl getDTDModel() {
- return dtdModel;
- }
-
- public NodeList getElementsAndParameterEntityReferences() {
- return elementList;
- }
-
- public int getEndOffset() {
- IStructuredDocumentRegion region = getStructuredDocument().getFirstStructuredDocumentRegion();
- if (region != null)
- return region.getEndOffset();
- else
- return 1;
- }
-
- public NodeList getEntities() {
- return entityList;
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.DTDFILEICON);
- }
-
-
-
- public int getInsertOffset(DTDNode node, boolean isAfter) {
- int offset = 0;
- if (node != null) {
- if (isAfter) {
- // then get the next node and use it's start offset
- int index = getNodes().indexOf(getNode(node.getStructuredDTDDocumentRegion()));
-
- DTDNode afterNode = null;
- if (index + 1 < getNodes().size()) {
- afterNode = (DTDNode) getNodes().get(index + 1);
- }
- if (afterNode != null) {
- offset = afterNode.getStructuredDTDDocumentRegion().getStartOffset();
- } else {
- // add to end
- if (getStructuredDocument().getLastStructuredDocumentRegion() != null) {
- offset = getStructuredDocument().getLastStructuredDocumentRegion().getEndOffset();
- }
- }
- } else {
- offset = node.getStructuredDTDDocumentRegion().getStartOffset();
- }
- } else {
- // add to end
- if (getStructuredDocument().getLastStructuredDocumentRegion() != null) {
- offset = getStructuredDocument().getLastStructuredDocumentRegion().getEndOffset();
- }
- }
- return offset;
- }
-
- public String getName() {
- org.eclipse.core.runtime.Path path = new org.eclipse.core.runtime.Path(getDTDModel().getId().toString());
- return path.lastSegment();
- }
-
- public DTDNode getNode(IStructuredDocumentRegion flatNode) {
- for (int i = 0; i < nodeList.size(); i++) {
- DTDNode node = (DTDNode) nodeList.get(i);
- if (node.getStructuredDTDDocumentRegion() == flatNode) {
- return node;
- }
- }
- return null;
- }
-
- public IndexedRegion getNodeAt(int offset) {
- DTDNode node = getTopLevelNodeAt(offset);
- if (node != null) {
- return node.getDeepestNode(offset);
- }
- return null;
- }
-
- public IndexedRegion getNodeAt(int startOffset, int endOffset) {
- DTDNode node = getTopLevelNodeAt(startOffset);
- if (node != null) {
- return node.getDeepestNode(startOffset, endOffset);
- }
- return null;
- }
-
- public List getNodeLists() {
- if (folderList == null) {
- folderList = new ArrayList();
- folderList.add(notationList);
- folderList.add(entityList);
- folderList.add(elementList);
- // http://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4200
- //folderList.add(attlistList);
- //folderList.add(commentList);
- folderList.add(unrecognizedList);
- }
- return folderList;
- }
-
- public List getNodes() {
- return nodeList;
- }
-
- public NodeList getNotations() {
- return notationList;
- }
-
- public int getStartOffset() {
- IStructuredDocumentRegion region = getStructuredDocument().getFirstStructuredDocumentRegion();
- if (region != null)
- return region.getStartOffset();
- else
- return 1;
- }
-
- public IStructuredDocument getStructuredDocument() {
- return dtdModel.getStructuredDocument();
- }
-
- public DTDNode getTopLevelNodeAt(int offset) {
- for (int i = 0; i < nodeList.size(); i++) {
- DTDNode node = (DTDNode) nodeList.get(i);
- if (node.contains(offset)) {
- return node;
- }
- }
- return null;
- }
-
- public NodeList getUnrecognized() {
- return unrecognizedList;
- }
-
- public void insertIntoModel(Object requestor, DTDNode reference, DTDNode node, boolean isAfter) {
- String nodeText = ""; //$NON-NLS-1$
- if (node instanceof TopLevelNode) {
- nodeText = ((TopLevelNode) node).getFullText();
- } else {
- nodeText = node.getNodeText();
- }
- int offset = getInsertOffset(reference, isAfter);
- getStructuredDocument().replaceText(requestor, offset, 0, nodeText);
- }
-
-
- public void insertNode(DTDNode node) {
- int startOffset = node.getStartOffset();
- int insertIndex = -1;
- // System.out.println("startoffset = " + startOffset);
- for (int i = 0; i < getNodes().size(); i++) {
- DTDNode currentNode = (DTDNode) getNodes().get(i);
- // System.out.println("currentNode endOffset = "
- // +currentNode.getEndOffset());
-
- if (currentNode.getEndOffset() > startOffset) {
- // System.out.println("endoffset " +
- // currentNode.getEndOffset() + " > " + startOffset);
- insertIndex = i;
- break;
- }
- }
- if (insertIndex == -1) {
- insertIndex = getNodes().size();
- }
-
-
- // System.out.println("insert index = " + insertIndex);
-
- addNode(insertIndex, node);
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isAttributeList(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() >= 3) {
- ITextRegion second = flatNode.getRegions().get(1);
- ITextRegion third = flatNode.getRegions().get(2);
- if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.ATTLIST_TAG)) {
- return true;
- }
- }
- return false;
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isComment(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() >= 2) {
- ITextRegion region = flatNode.getRegions().get(1);
- if (region.getType().equals(DTDRegionTypes.COMMENT_START)) {
- return true;
- }
- }
- return false;
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isElement(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() >= 3) {
- ITextRegion second = flatNode.getRegions().get(1);
- ITextRegion third = flatNode.getRegions().get(2);
- if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.ELEMENT_TAG)) {
- return true;
- }
- }
- return false;
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isEntity(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() >= 3) {
- ITextRegion second = flatNode.getRegions().get(1);
- ITextRegion third = flatNode.getRegions().get(2);
- if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.ENTITY_TAG)) {
- return true;
- }
- }
- return false;
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isNotation(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() >= 3) {
- ITextRegion second = flatNode.getRegions().get(1);
- ITextRegion third = flatNode.getRegions().get(2);
- if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.NOTATION_TAG)) {
- return true;
- }
- }
- return false;
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isParameterEntityReference(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() == 1) {
- ITextRegion region = flatNode.getRegions().get(0);
- if (region.getType().equals(DTDRegionTypes.ENTITY_PARM)) {
- return true;
- }
- }
- return false;
- }
-
- boolean isSameTopLevelType(DTDNode affectedNode) {
- IStructuredDocumentRegion flatNode = affectedNode.getStructuredDTDDocumentRegion();
- // return true if the flatnode still matches what the affectedNode
- // is representing
- if (affectedNode instanceof Element && isElement(flatNode)) {
- return true;
- }
- if (affectedNode instanceof Entity && isEntity(flatNode)) {
- return true;
- }
- if (affectedNode instanceof Comment && isComment(flatNode)) {
- return true;
- }
- if (affectedNode instanceof AttributeList && isAttributeList(flatNode)) {
- return true;
- }
- if (affectedNode instanceof Notation && isNotation(flatNode)) {
- return true;
- }
- if (affectedNode instanceof Unrecognized && isUnrecognized(flatNode)) {
- return true;
- }
- return false;
- }
-
- public boolean isUnrecognized(IStructuredDocumentRegion flatNode) {
- return !isElement(flatNode) && !isEntity(flatNode) && !isNotation(flatNode) && !isParameterEntityReference(flatNode) && !isAttributeList(flatNode) && !isComment(flatNode);
- }
-
- public void moveNode(Object requestor, DTDNode referenceNode, DTDNode nodeToMove, boolean isAfter) {
- isMovingNode = true;
-
- deleteNode(requestor, nodeToMove);
- insertIntoModel(requestor, referenceNode, nodeToMove, isAfter);
- isMovingNode = false;
- }
-
- public void newModel(NewDocumentEvent event) {
- creatingNewModel = true;
- nodeList.clear();
- NodesEvent removeEvent = new NodesEvent();
- removeEvent.getNodes().addAll(nodeList);
- notifyNodesRemoved(removeEvent);
- /* removeChildNodes(); */
-
- if (event.getStructuredDocument() != null && event.getStructuredDocument().getRegionList() != null) {
- buildNodes(event.getStructuredDocument().getRegionList());
- }
- creatingNewModel = false;
- }
-
- public void nodesReplaced(StructuredDocumentRegionsReplacedEvent event) {
- IStructuredDocumentRegionList oldNodes = event.getOldStructuredDocumentRegions();
- NodesEvent removedDTDNodes = new NodesEvent();
- for (int i = 0; i < oldNodes.getLength(); i++) {
- IStructuredDocumentRegion flatNode = oldNodes.item(i);
-
- for (Iterator iter = getNodes().iterator(); iter.hasNext();) {
- DTDNode node = (DTDNode) iter.next();
- if (node.getStructuredDTDDocumentRegion() == flatNode) {
- removedDTDNodes.add(node);
- }
- }
- }
-
- buildNodes(event.getNewStructuredDocumentRegions());
-
- if (removedDTDNodes.getNodes().size() > 0) {
- notifyNodesRemoved(removedDTDNodes);
- removeNodes(removedDTDNodes.getNodes());
- }
- }
-
- public void notifyNodeChanged(DTDNode node) {
- Iterator iter = modelListeners.iterator();
- while (iter.hasNext()) {
- IDTDFileListener listener = (IDTDFileListener) iter.next();
- listener.nodeChanged(node);
- }
- }
-
- public void notifyNodesAdded(NodesEvent addedNodes) {
- Iterator iter = modelListeners.iterator();
- while (iter.hasNext()) {
- IDTDFileListener listener = (IDTDFileListener) iter.next();
- listener.nodesAdded(addedNodes);
- }
- }
-
- protected void notifyNodesRemoved(NodesEvent event) {
- Iterator iter = modelListeners.iterator();
- while (iter.hasNext()) {
- IDTDFileListener listener = (IDTDFileListener) iter.next();
- listener.nodesRemoved(event);
- }
- }
-
- public void rebuildNodes(List nodes) {
- // remove the old nodes
- removeNodes(nodes);
-
- // now rebuild them
- NodesEvent addedDTDNodes = new NodesEvent();
- Iterator dtdNodes = nodes.iterator();
- while (dtdNodes.hasNext()) {
- DTDNode dtdNode = (DTDNode) dtdNodes.next();
- // System.out.println("rebuilding " +
- // dtdNode.getStructuredDocumentRegion().getText());
-
- DTDNode node = buildNode(dtdNode.getStructuredDTDDocumentRegion());
- if (node != null) {
- addedDTDNodes.add(node);
- }
- }
- if (addedDTDNodes.getNodes().size() > 0) {
- // now tell people about the additions
- notifyNodesAdded(addedDTDNodes);
- }
- }
-
- public void regionChanged(RegionChangedEvent event) {
- ITextRegion changedRegion = event.getRegion();
- IStructuredDocumentRegion flatNode = event.getStructuredDocumentRegion();
- DTDNode affectedNode = (DTDNode) getNodeAt(flatNode.getStartOffset(changedRegion), flatNode.getEndOffset(changedRegion));
- if (affectedNode != null) {
- // no need to resolve regions as it is just a change
- // affectedNode.resolveRegions();
- notifyNodeChanged(affectedNode);
- }
- }
-
- public void regionsReplaced(RegionsReplacedEvent event) {
- List nodesToRebuild = new ArrayList();
- IStructuredDocumentRegion flatNode = event.getStructuredDocumentRegion();
- DTDNode affectedNode = getNode(flatNode);
-
- if (!isSameTopLevelType(affectedNode)) {
- nodesToRebuild.add(affectedNode);
- rebuildNodes(nodesToRebuild);
- } else {
- affectedNode.resolveRegions();
- notifyNodeChanged(affectedNode);
- // now try and determine which ones were added
- NodesEvent addedDTDNodes = new NodesEvent();
- ITextRegionList newRegions = event.getNewRegions();
- int size = newRegions.size();
- for (int i = 0; i < size; i++) {
- ITextRegion region = newRegions.get(i);
- DTDNode deepestNode = affectedNode.getDeepestNode(flatNode.getStartOffset(region), flatNode.getEndOffset(region));
- if (!addedDTDNodes.getNodes().contains(deepestNode)) {
- addedDTDNodes.add(deepestNode);
- }
- }
- if (addedDTDNodes.getNodes().size() > 0) {
- notifyNodesAdded(addedDTDNodes);
- }
- }
- }
-
- public void removeDTDFileListener(IDTDFileListener listener) {
- modelListeners.remove(listener);
- }
-
- protected void removeNodes(List nodes) {
- getNodes().removeAll(nodes);
- /*
- * for (int i = 0; i < nodes.size(); i++) {
- * removeChild((DTDNode)nodes.get(i)); } // end of for ()
- */
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDNode.java
deleted file mode 100644
index 134bda75d6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDNode.java
+++ /dev/null
@@ -1,334 +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.dtd.core;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.IFactoryRegistry;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.text.TextRegionListImpl;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.document.NodeContainer;
-
-
-public abstract class DTDNode extends NodeContainer implements IndexedRegion {
-
- // these are characteroffsets
- protected DTDFile dtdFile;
-
- // flat node that contains this node
- protected IStructuredDocumentRegion flatNode;
-
- protected TextRegionListImpl regions = new TextRegionListImpl();
-
- protected TextRegionListImpl whitespace = new TextRegionListImpl();
-
- public DTDNode(DTDFile dtdFile, IStructuredDocumentRegion flatNode) {
- this.dtdFile = dtdFile;
- this.flatNode = flatNode;
- }
-
- public void addRegion(ITextRegion region) {
- /*
- * if (startRegion == null) { startRegion = region; } endRegion =
- * region;
- */
- regions.add(region);
- }
-
- public void addWhitespaceRegion(ITextRegion region) {
- whitespace.add(region);
- }
-
- public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws org.w3c.dom.DOMException {
- // System.out.println("appendchild called with " + newChild);
- return super.appendChild(newChild);
- }
-
- public void beginRecording(Object requestor, String label) {
- getDTDFile().getDTDModel().beginRecording(requestor, label);
- }
-
- public org.w3c.dom.Node cloneNode(boolean deepest) {
- return null;
- }
-
- public boolean contains(int testPosition) {
- return containsRange(testPosition, testPosition);
- }
-
- public boolean containsRange(int start, int end) {
- return getStartOffset() <= start && end <= getEndOffset();
- }
-
- public void delete(DTDNode child) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_DTD_NODE_DELETE")); //$NON-NLS-1$
- delete(this, child);
- endRecording(this);
- }
-
- public void delete(Object requestor, DTDNode child) {
- replaceText(requestor, child.getStartOffset(), child.getFullNodeLength(), ""); //$NON-NLS-1$
- }
-
- public void endRecording(Object requestor) {
- getDTDFile().getDTDModel().endRecording(requestor);
- }
-
- public Object[] getChildren() {
- return getChildrenList().toArray();
- }
-
- public List getChildrenList() {
- org.w3c.dom.Node child = getFirstChild();
- if (child != null) {
- List children = new ArrayList();
- for (; child != null; child = child.getNextSibling()) {
- children.add(child);
- }
- return children;
- } else {
- return Collections.EMPTY_LIST;
- }
- }
-
- public DTDNode getDeepestNode(int offset) {
- if (contains(offset)) {
- // now see if a child contains this offset
- Object[] children = getChildren();
- for (int i = 0; i < children.length; i++) {
- DTDNode child = (DTDNode) children[i];
- DTDNode deepest = child.getDeepestNode(offset);
- if (deepest != null) {
- return deepest;
- }
- } // end of for ()
- return this;
- }
- return null;
- }
-
- public DTDNode getDeepestNode(int start, int end) {
- if (containsRange(start, end)) {
- // now see if a child contains this offset
- Object[] children = getChildren();
- for (int i = 0; i < children.length; i++) {
- DTDNode child = (DTDNode) children[i];
- DTDNode deepest = child.getDeepestNode(start, end);
- if (deepest != null) {
- return deepest;
- }
- } // end of for ()
- return this;
- }
- return null;
- }
-
- public DTDFile getDTDFile() {
- return dtdFile;
- }
-
- public int getEndOffset() {
- return getStructuredDTDDocumentRegion().getEndOffset(getEndRegion());
- }
-
- public ITextRegion getEndRegion() {
- return regions.get(regions.size() - 1);// endRegion;
- }
-
- /**
- */
- public IFactoryRegistry getFactoryRegistry() {
- DTDModelImpl model = dtdFile.getDTDModel();
- if (model != null) {
- IFactoryRegistry reg = model.getFactoryRegistry();
- if (reg != null)
- return reg;
- }
- return null;
- }
-
- public int getFullNodeLength() {
- return getWhitespaceEndOffset() - getStartOffset();
- }
-
- public String getFullNodeText() {
- String text = getNodeText();
- if (whitespace.size() > 0) {
- RegionIterator iter = new RegionIterator(whitespace);
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- text += getStructuredDTDDocumentRegion().getText(region);
- }
- }
- return text;
- }
-
- abstract public Image getImage();
-
- public String getName() {
- ITextRegion region = getNameRegion();
- if (region != null) {
- return getStructuredDTDDocumentRegion().getText(region);
- }
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getNameRegion() {
- RegionIterator iter = iterator();
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType() == DTDRegionTypes.NAME) {
- return region;
- }
- }
- return null;
- }
-
- // return the first token containing the specified token type
- public ITextRegion getNextRegion(RegionIterator iter, String type) {
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType().equals(type)) {
- return region;
- }
- }
- return null;
- }
-
- public int getNodeLength() {
- return getEndOffset() - getStartOffset();
- }
-
- public String getNodeName() {
- return getName();
- }
-
- public String getNodeText() {
- StringBuffer sb = new StringBuffer();
-
- RegionIterator iter = iterator();
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- sb.append(getStructuredDTDDocumentRegion().getText(region));
- }
- return sb.toString();
- }
-
- public short getNodeType() {
- return -1;
- }
-
- public int getStartOffset() {
- return getStructuredDTDDocumentRegion().getStartOffset(getStartRegion());
- }
-
- // private Region startRegion,endRegion;
- public ITextRegion getStartRegion() {
- return regions.get(0);
- // return startRegion;
- }
-
- /**
- * Get the value of flatNode.
- *
- * @return value of flatNode.
- *
- * ISSUE:named changed not to be confused with default access protected
- * super class method, but should re-think if this is correct technique.
- * Perhaps getFirstRegion?
- */
- public IStructuredDocumentRegion getStructuredDTDDocumentRegion() {
- return flatNode;
- }
-
- // return end offset including whitespace
- // or just the end offset if there is no whitespace
- public int getWhitespaceEndOffset() {
- if (whitespace.size() > 0) {
- ITextRegion region = whitespace.get(whitespace.size() - 1);
- return getStructuredDTDDocumentRegion().getEndOffset(region);
- }
-
- return getEndOffset();
- }
-
- public boolean hasTrailingWhitespace() {
- return whitespace.size() > 0;
- }
-
- public RegionIterator iterator() {
- // System.out.println("create region iter " + this.getClass() + " with
- // start , end = " + getStartOffset() + ", " +getEndOffset());
- return new RegionIterator(regions);
- }
-
- public void replaceText(Object requestor, int start, int length, String newText) {
- getDTDFile().getStructuredDocument().replaceText(requestor, start, length, newText);
- }
-
- public void resolveRegions() {
- }
-
- public void setName(Object requestor, String name) {
- if (!getName().equals(name)) {
- ITextRegion nameRegion = getNameRegion();
- if (nameRegion != null) {
- // nameToken.updateText(name);
- getDTDFile().getDTDModel().getReferenceUpdater().nameAboutToChange(requestor, this, name);
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(nameRegion), nameRegion.getLength(), name);
- }
- }
- }
-
- public void setName(String name) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_DTD_NODE_NAME_CHG")); //$NON-NLS-1$
- setName(this, name);
- endRecording(this);
- }
-
- /**
- * Set the value of flatNode.
- *
- * @param v
- * Value to assign to flatNode. ISSUE:named changed not to be
- * confused with default access protected super class method,
- * but should re-think if this is correct technique
- */
- void setStructuredDTDDocumentRegion(IStructuredDocumentRegion v) {
- this.flatNode = v;
- }
-
- // skips past next name token in the iterator
- protected void skipPastName(RegionIterator iter) {
- while (iter.hasNext()) {
- ITextRegion currentRegion = iter.next();
- if (currentRegion.getType() == DTDRegionTypes.NAME) {
- break;
- }
- }
- }
-
- public boolean supports(java.lang.String feature, java.lang.String version) {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDPlugin.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDPlugin.java
deleted file mode 100644
index ae9deed995..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDPlugin.java
+++ /dev/null
@@ -1,22 +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.dtd.core;
-
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-
-/**
- * @deprecated use internal DTDCorePlugin class instead if possible
- */
-public class DTDPlugin extends DTDCorePlugin {
- // see org.eclipse.wst.dtd.core.internal.DTDCorePlugin
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDResource.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDResource.java
deleted file mode 100644
index 0f1d053020..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDResource.java
+++ /dev/null
@@ -1,57 +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.dtd.core;
-
-
-public interface DTDResource {
- //Enumeration Constants
- public static final String ANYICON = "icons/full/obj16/any.gif"; //$NON-NLS-1$
- public static final String ATTRIBUTEICON = "icons/full/obj16/attribute.gif"; //$NON-NLS-1$
- public static final String ATTRIBUTELISTICON = "icons/full/obj16/attribute_list.gif"; //$NON-NLS-1$
- public static final String COMMENTICON = "icons/full/obj16/comment.gif"; //$NON-NLS-1$
-
- public static final String DTDFILEICON = "icons/full/obj16/DTDFile.gif"; //$NON-NLS-1$
- public static final String ELEMENTICON = "icons/full/obj16/element.gif"; //$NON-NLS-1$
- public static final String ELEMENTREFICON = "icons/full/obj16/element_ref.gif"; //$NON-NLS-1$
- public static final String EMPTYICON = "icons/full/obj16/emptycontent.gif"; //$NON-NLS-1$
- public static final String ENTITYICON = "icons/full/obj16/entity.gif"; //$NON-NLS-1$
- public static final String ENTITYREFERENCEICON = "icons/full/obj16/entity_reference.gif"; //$NON-NLS-1$
- public static final String FLDR_ATTLIST = "icons/full/obj16/folder_attlist_obj.gif"; //$NON-NLS-1$
- public static final String FLDR_COMM = "icons/full/obj16/folder_comments_obj.gif"; //$NON-NLS-1$
-
- public static final String FLDR_EL = "icons/full/obj16/fldr_el.gif"; //$NON-NLS-1$
- public static final String FLDR_ENT = "icons/full/obj16/fldr_ent.gif"; //$NON-NLS-1$
- public static final String FLDR_NOT = "icons/full/obj16/fldr_not.gif"; //$NON-NLS-1$
- public static final String FLDR_UNREC = "icons/full/obj16/fldr_unrec.gif"; //$NON-NLS-1$
-
- public static final String NEWDTD = "icons/full/obj16/newdtd_wiz.gif"; //$NON-NLS-1$
- public static final String NEWHTMLFORM = "icons/full/obj16/genhtmform_wiz.gif"; //$NON-NLS-1$
- public static final String NOTATIONICON = "icons/full/obj16/notation.gif"; //$NON-NLS-1$
-
- public static final String ONECHOICEICON = "icons/full/obj16/onechoice.gif"; //$NON-NLS-1$
-
- public static final String ONEICON = "icons/full/obj16/one.gif"; //$NON-NLS-1$
- public static final String ONEORMORECHOICEICON = "icons/full/obj16/oneormorechoice.gif"; //$NON-NLS-1$
- public static final String ONEORMOREICON = "icons/full/obj16/oneormore.gif"; //$NON-NLS-1$
- public static final String ONEORMORESEQUENCEICON = "icons/full/obj16/oneormoresequence.gif"; //$NON-NLS-1$
-
- public static final String ONESEQUENCEICON = "icons/full/obj16/onesequence.gif"; //$NON-NLS-1$
- public static final String OPTIONALCHOICEICON = "icons/full/obj16/optionalchoice.gif"; //$NON-NLS-1$
- public static final String OPTIONALICON = "icons/full/obj16/optional.gif"; //$NON-NLS-1$
- public static final String OPTIONALSEQUENCEICON = "icons/full/obj16/optionalsequence.gif"; //$NON-NLS-1$
- public static final String PCDATAICON = "icons/full/obj16/txtext.gif"; //$NON-NLS-1$
- public static final String UNRECOGNIZEDICON = "icons/full/obj16/unrecognized_content.gif"; //$NON-NLS-1$
- public static final String ZEROORMORECHOICEICON = "icons/full/obj16/zeroormorechoice.gif"; //$NON-NLS-1$
- public static final String ZEROORMOREICON = "icons/full/obj16/zeroormore.gif"; //$NON-NLS-1$
- public static final String ZEROORMORESEQUENCEICON = "icons/full/obj16/zeroormoresequence.gif"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Element.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Element.java
deleted file mode 100644
index bc784e692c..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Element.java
+++ /dev/null
@@ -1,198 +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.dtd.core;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.w3c.dom.Node;
-
-
-public class Element extends NamedTopLevelNode {
-
- List attListList = new ArrayList();
-
- List attributes = new ArrayList();
-
- protected CMNode contentModel;
-
- public Element(DTDFile dtdFile, IStructuredDocumentRegion flatNode) {
- super(dtdFile, flatNode, DTDRegionTypes.ELEMENT_TAG);
- }
-
- public void addAttribute(String name) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_ELEMENT_ADD_ATTR")); //$NON-NLS-1$
- List attLists = getAttributeLists();
- if (attLists.size() == 0) {
- getDTDFile().createAttributeList(this, getName(), true);
- attLists = getAttributeLists();
- }
- if (attLists.size() > 0) {
- AttributeList attList = (AttributeList) attLists.get(attLists.size() - 1);
- attList.addAttribute(name);
- }
- endRecording(this);
- }
-
- public void addChild() {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_ELEMENT_ADD_CHILD")); //$NON-NLS-1$
- addContent(this, " EMPTY"); //$NON-NLS-1$
- endRecording(this);
- }
-
- protected void addContent(Object requestor, String content) {
- ITextRegion whitespace = getWhitespaceAfterName();
- int startOffset = 0;
- int length = 0;
- if (whitespace != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(whitespace);
- length = whitespace.getLength() >= 2 ? 1 : 0;
- } else {
- ITextRegion nameRegion = getNameRegion();
- if (nameRegion != null) {
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(nameRegion);
- } else {
- ITextRegion elementTag = getNextRegion(iterator(), DTDRegionTypes.ELEMENT_TAG);
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(elementTag);
- }
- }
- replaceText(requestor, startOffset, length, content);
- }
-
- public void addGroup() {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_ELEMENT_ADD_GRP")); //$NON-NLS-1$
- addContent(this, " ()"); //$NON-NLS-1$
- endRecording(this);
- }
-
- public Node cloneNode(boolean deep) {
- return new Element(dtdFile, flatNode);
- }
-
- public List getAttributeLists() {
- attListList.clear();
- String elementName = getName();
- Iterator iter = dtdFile.getNodes().iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (node instanceof AttributeList && node.getName().equals(elementName)) {
- attListList.add(node);
- }
- }
- return attListList;
- }
-
-
-
- public CMNode getContentModel() {
- // Object[] children = getChildren()
- return (CMNode) getFirstChild();//contentModel;
- }
-
- public List getElementAttributes() {
- attributes.clear();
- Iterator attLists = getAttributeLists().iterator();
- while (attLists.hasNext()) {
- AttributeList attList = (AttributeList) attLists.next();
-
- Object[] children = attList.getChildren();
- for (int i = 0; i < children.length; i++) {
- attributes.add(children[i]);
- }
- }
- return attributes;
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ELEMENTICON);
- }
-
- public short getNodeType() {
- return Node.ELEMENT_NODE;
- }
-
- public void replaceContentModel(Object requestor, CMNode node) {
- int offset = 0;
- int length = 0;
- String nodeText = node.getNodeText();
- CMNode contentModel = getContentModel();
- if (contentModel != null) {
- offset = contentModel.getStartOffset();
- length = contentModel.getWhitespaceEndOffset() - offset;
- replaceText(requestor, offset, length, nodeText);
- } else {
- addContent(requestor, nodeText);
- }
- }
-
- public void resolveRegions() {
- // System.out.println("element node stream = " +
- // tokenStream.getString());
- contentModel = null;
- removeChildNodes();
- RegionIterator iter = iterator();
-
- if (getNameRegion() != null) {
- // we skip past the name token is our name
- skipPastName(iter);
- }
-
- CMBasicNode basicNode = null;
- while (iter.hasNext()) {
- ITextRegion currentRegion = iter.next();
-
- if (contentModel == null) {
- if (currentRegion.getType().equals(DTDRegionTypes.NAME)) {
- contentModel = basicNode = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
- } else if (currentRegion.getType().equals(DTDRegionTypes.CONTENT_PCDATA)) {
- contentModel = basicNode = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
- } else if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) {
- contentModel = new CMGroupNode(getDTDFile(), getStructuredDTDDocumentRegion());
- }
- }
-
- if (contentModel != null) {
- if (!currentRegion.getType().equals(DTDRegionTypes.END_TAG)) {
- // content model gets all regions except for the '>'
- contentModel.addRegion(currentRegion);
- } else {
- // if it is equal to the end tag, then don't add anymore
- // regions
- // for the content model
- break;
- }
-
- }
-
- }
- if (contentModel != null) {
- appendChild(contentModel);
- // this is the root element content so set it true
- contentModel.setRootElementContent(true);
- // now tell the content model to resolve it's regions
- contentModel.resolveRegions();
-
- }
- }
-
- public void setContentModel(CMNode contentModel) {
- this.contentModel = contentModel;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Entity.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Entity.java
deleted file mode 100644
index 9eade1210d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Entity.java
+++ /dev/null
@@ -1,325 +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.dtd.core;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-// external node contains code to help set and get public ids
-public class Entity extends ExternalNode {
-
- private static String setExternalEntity = DTDCorePlugin.getDTDString("_UI_LABEL_ENTITY_SET_EXT_ENTITY"); //$NON-NLS-1$
- private static String setGeneralEntity = DTDCorePlugin.getDTDString("_UI_LABEL_ENTITY_SET_GENERAL_ENTITY"); //$NON-NLS-1$
- private static String setInternalEntity = DTDCorePlugin.getDTDString("_UI_LABEL_ENTITY_SET_INT_ENTITY"); //$NON-NLS-1$
-
- private static String setParameterEntity = DTDCorePlugin.getDTDString("_UI_LABEL_ENTITY_SET_PARM_ENTITY"); //$NON-NLS-1$
-
- public Entity(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode, DTDRegionTypes.ENTITY_TAG);
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ENTITYICON);
- }
-
-
- /**
- * Get the value of notationName.
- *
- * @return value of notationName.
- */
- public String getNotationName() {
- ITextRegion ndataRegion = getNextRegion(iterator(), DTDRegionTypes.NDATA_VALUE);
- if (ndataRegion != null) {
- return getStructuredDTDDocumentRegion().getText(ndataRegion);
- }
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getPercentRegion() {
- return getNextRegion(iterator(), DTDRegionTypes.PERCENT);
- }
-
- /**
- * Get the value of value.
- *
- * @return value of value.
- */
- public String getValue() {
- if (!isExternalEntity()) {
- ITextRegion valueRegion = getNextQuotedLiteral(iterator());
- if (valueRegion != null) {
- return getValueFromQuotedRegion(valueRegion);
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Get the value of externalEntity.
- *
- * @return value of externalEntity.
- */
- public boolean isExternalEntity() {
- return getPublicKeywordRegion(iterator()) != null || getSystemKeywordRegion(iterator()) != null;
- }
-
- /**
- * Get the value of isParameterEntity.
- *
- * @return value of isParameterEntity.
- */
- public boolean isParameterEntity() {
- return getPercentRegion() != null;
- }
-
- private void removeNData(Object requestor) {
- ITextRegion ndataRegion = null;
-
- // see if we have an NDATA keyword
- ndataRegion = getNextRegion(iterator(), DTDRegionTypes.NDATA_KEYWORD);
- int startOffset = 0, endOffset = 0;
- if (ndataRegion != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(ndataRegion);
- endOffset = getStructuredDTDDocumentRegion().getEndOffset(ndataRegion);
- }
- ITextRegion value = getNextRegion(iterator(), DTDRegionTypes.NDATA_VALUE);
- if (value != null) {
- if (startOffset == 0) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(value);
- }
- endOffset = getStructuredDTDDocumentRegion().getEndOffset(value);
- }
- replaceText(requestor, startOffset, endOffset - startOffset, ""); //$NON-NLS-1$
- }
-
- /**
- * Set the value of externalEntity.
- *
- * @param v
- * Value to assign to externalEntity.
- */
- public void setExternalEntity(boolean isExternalEntity) {
- if (isExternalEntity() != isExternalEntity) {
- // externalEntity = v;
- beginRecording(this, isExternalEntity ? setExternalEntity : setInternalEntity);
- if (isExternalEntity) {
- // we need to get rid of the value literal
- ITextRegion quote = getNextRegion(iterator(), DTDRegionTypes.SINGLEQUOTED_LITERAL);
- if (quote == null) {
- quote = getNextRegion(iterator(), DTDRegionTypes.DOUBLEQUOTED_LITERAL);
- }
- if (quote != null) {
- replaceText(this, getStructuredDTDDocumentRegion().getStartOffset(quote), quote.getLength(), ""); //$NON-NLS-1$
- }
- setSystemID(""); //$NON-NLS-1$
- } else {
- // we need to get rid of text between end of name region and
- // the last double quoted literal
- RegionIterator iter = iterator();
- ITextRegion keyword = getSystemKeywordRegion(iter);
- int startOffset = 0;
- int length = 0;
- if (keyword == null) {
- // reset the iterator
- iter = iterator();
- keyword = getPublicKeywordRegion(iter);
- }
- if (keyword != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(keyword);
- // start with a length just equal to the keyword for now
- length = keyword.getLength();
- } else {
- // reset the iterator since we didn't find the keyword
- iter = iterator();
- // just go from after the name
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(getNameRegion());
- }
-
- // now that we have the start, look for the end
- ITextRegion lastRegion = null;
-
- if (lastRegion == null) {
- // then look for last quoted literal
- while (iter.hasNext()) {
- ITextRegion literal = getNextQuotedLiteral(iter);
- if (literal != null) {
- lastRegion = literal;
- }
- }
- }
-
- if (lastRegion != null) {
- length = getStructuredDTDDocumentRegion().getEndOffset(lastRegion) - startOffset;
- }
- replaceText(this, startOffset, length, "\"\""); //$NON-NLS-1$
- removeNData(this);
- }
- endRecording(this);
- }
- }
-
- public void setNotationName(Object requestor, String newNotation) {
- if (!getNotationName().equals(newNotation)) {
- if (!newNotation.equals("")) { //$NON-NLS-1$
- //
- ITextRegion ndataRegion = getNextRegion(iterator(), DTDRegionTypes.NDATA_VALUE);
- if (ndataRegion != null) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(ndataRegion), ndataRegion.getLength(), newNotation);
- } else {
- // time to create one
- int startOffset = 0;
- String string = ""; //$NON-NLS-1$
- RegionIterator iter = iterator();
- ITextRegion ndataKeyword = getNextRegion(iter, DTDRegionTypes.NDATA_KEYWORD);
- if (ndataKeyword == null) {
- // we'll need to create one after the last quoted
- // literal
- // Reset iterator
- string += " NDATA "; //$NON-NLS-1$
- iter = iterator();
- ITextRegion lastQuotedLiteral = null;
- while (iter.hasNext()) {
- ITextRegion literal = getNextQuotedLiteral(iter);
- if (literal != null) {
- lastQuotedLiteral = literal;
- }
- }
- if (lastQuotedLiteral != null) {
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(lastQuotedLiteral);
- } else {
- // created after the system or public keyword
- ITextRegion keyword = getPublicKeywordRegion(iterator());
- if (keyword == null) {
- keyword = getSystemKeywordRegion(iterator());
- }
- // we shouldn't be null here since we check if we
- // were external already
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(keyword);
- }
-
- } else {
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(ndataKeyword);
- }
- replaceText(requestor, startOffset, 0, string + newNotation);
- }
- } else {
- // need to remove the ndata stuff
- removeNData(requestor);
- }
- }
- }
-
- /**
- * Set the value of notationName.
- *
- * @param newNotation
- * Value to assign to notationName.
- */
- public void setNotationName(String newNotation) {
- beginRecording(this, "NDATA " + DTDCorePlugin.getDTDString("_UI_LABEL_ENTITY_NDATA_CHANGE")); //$NON-NLS-1$ //$NON-NLS-2$
- setNotationName(this, newNotation);
- endRecording(this);
- }
-
- /**
- * Set the value of isParameterEntity.
- *
- * @param v
- * Value to assign to isParameterEntity.
- */
- public void setParameterEntity(boolean v) {
- if (isParameterEntity() != v) {
- beginRecording(this, v ? setParameterEntity : setGeneralEntity);
- if (v) {
- RegionIterator iter = iterator();
- ITextRegion startTag = getNextRegion(iter, DTDRegionTypes.ENTITY_TAG);
- int startOffset = 0, length = 0;
-
- if (iter.hasNext()) {
- ITextRegion region = iter.next();
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(region);
- if (region.getType() == DTDRegionTypes.WHITESPACE && region.getLength() > 1) {
- length = 1;
- }
- } else {
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(startTag);
- }
- replaceText(this, startOffset, length, " %"); //$NON-NLS-1$
- // now get rid of any NData since it is only allowed if the
- // entity is a general entity and not a parameter entity
- removeNData(this);
- } else {
- // get rid of percent region
- ITextRegion percentRegion = getPercentRegion();
- replaceText(this, getStructuredDTDDocumentRegion().getStartOffset(percentRegion), percentRegion.getLength(), ""); //$NON-NLS-1$
- }
-
- endRecording(this);
- }
- }
-
- /**
- * Set the value of value.
- *
- * @param v
- * Value to assign to value.
- */
- public void setValue(Object requestor, String v) {
- if (!isExternalEntity()) {
- if (!getValue().equals(v)) {
- // then it makes sense to change the value
- ITextRegion valueRegion = getNextQuotedLiteral(iterator());
- String quoteChar = v.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (valueRegion != null) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(valueRegion), valueRegion.getLength(), quoteChar + v + quoteChar);
- } else {
- int startOffset = 0, length = 0;
- RegionIterator iter = iterator();
- ITextRegion region = getNextRegion(iter, DTDRegionTypes.NAME);
- if (region == null) {
- // create it after the percent if there is one
- region = getPercentRegion();
- }
- if (region == null) {
- // if still null, then create it after the element tag
- region = getStartTag(iterator());
- }
-
- if (region != null) {
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(region);
- replaceText(requestor, startOffset, 0, quoteChar + v + quoteChar);
- }
- }
- }
- }
- }
-
- /**
- * Set the value of value.
- *
- * @param v
- * Value to assign to value.
- */
- public void setValue(String v) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_ENTITY_VALUE_CHG")); //$NON-NLS-1$
- setValue(this, v);
- endRecording(this);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/ExternalNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/ExternalNode.java
deleted file mode 100644
index 1a068c0211..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/ExternalNode.java
+++ /dev/null
@@ -1,243 +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.dtd.core;
-
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-// base class for nodes that can contain external content
-public abstract class ExternalNode extends NamedTopLevelNode {
-
- String publicID;
-
- String systemID;
-
- public ExternalNode(DTDFile file, IStructuredDocumentRegion flatNode, String tagType) {
- super(file, flatNode, tagType);
- }
-
- public ITextRegion getNextQuotedLiteral(RegionIterator iter) {
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType().equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || region.getType().equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) {
- return region;
- }
- }
- return null;
- }
-
- /**
- * Get the value of publicID.
- *
- * @return value of publicID.
- */
- public String getPublicID() {
- ITextRegion publicValue = getPublicValueRegion();
- if (publicValue != null) {
- return getValueFromQuotedRegion(publicValue);
- }
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getPublicKeywordRegion(RegionIterator iter) {
- return getNextRegion(iter, DTDRegionTypes.PUBLIC_KEYWORD);
- }
-
- public ITextRegion getPublicValueRegion() {
- RegionIterator iter = iterator();
-
- ITextRegion publicKeyword = getPublicKeywordRegion(iter);
-
- if (publicKeyword != null && iter.hasNext()) {
- ITextRegion quotedLiteral = getNextQuotedLiteral(iter);
- if (quotedLiteral != null) {
- return quotedLiteral;
- }
- }
- return null;
- }
-
- /**
- * Get the value of systemID.
- *
- * @return value of systemID.
- */
- public String getSystemID() {
- ITextRegion systemValue = getSystemValueRegion();
- if (systemValue != null) {
- return getValueFromQuotedRegion(systemValue);
- }
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getSystemKeywordRegion(RegionIterator iter) {
- return getNextRegion(iter, DTDRegionTypes.SYSTEM_KEYWORD);
- }
-
- public ITextRegion getSystemValueRegion() {
- RegionIterator iter = iterator();
-
- ITextRegion systemKeyword = getSystemKeywordRegion(iter);
- if (systemKeyword != null && iter.hasNext()) {
- ITextRegion quotedLiteral = getNextQuotedLiteral(iter);
- if (quotedLiteral != null) {
- return quotedLiteral;
- }
- } else {
- // try and see if there is a second quoted literal after a public
- // keyword
- iter = iterator();
- ITextRegion publicKeyword = getPublicKeywordRegion(iter);
-
- if (publicKeyword != null && iter.hasNext()) {
- ITextRegion quotedLiteral = getNextQuotedLiteral(iter);
- if (quotedLiteral != null && iter.hasNext()) {
- // now get the second quoted literal
- quotedLiteral = getNextQuotedLiteral(iter);
- if (quotedLiteral != null) {
- // got it!
- return quotedLiteral;
- }
- }
- }
- }
- return null;
- }
-
- public String getValueFromQuotedRegion(ITextRegion region) {
- String type = region.getType();
- if (type.equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || type.equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) {
- String text = getStructuredDTDDocumentRegion().getText(region);
- return text.substring(1, text.length() - 1);
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Set the value of publicID.
- *
- * @param v
- * Value to assign to publicID.
- */
- public void setPublicID(Object requestor, String v) {
- if (!v.equals(publicID)) {
- publicID = v;
- ITextRegion publicValue = getPublicValueRegion();
- ITextRegion publicKeyword = getPublicKeywordRegion(iterator());
- ITextRegion systemKeyword = getSystemKeywordRegion(iterator());
- ITextRegion systemValue = getSystemValueRegion();
-
- if (v.equals("")) { //$NON-NLS-1$
- if (publicKeyword != null) {
- // time to get rid of the public keyword and value
- // and replace it with the system one
- int startOffset = getStructuredDTDDocumentRegion().getStartOffset(publicKeyword);
- String newString = "SYSTEM"; //$NON-NLS-1$
- if (systemValue == null) {
- newString += " \"\""; //$NON-NLS-1$
- }
- replaceText(requestor, startOffset, getStructuredDTDDocumentRegion().getEndOffset(publicValue) - startOffset, newString);
- }
- } else {
- // here were setting a non empty value
- String quoteChar = v.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (publicValue != null) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(publicValue), publicValue.getLength(), quoteChar + publicID + quoteChar);
- } else {
- // time to create stuff
- if (publicKeyword != null) {
- // then just put our new value after the keyword
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(publicKeyword), 0, " " + quoteChar + v + quoteChar); //$NON-NLS-1$
- } else {
- // we need the public keyword as well
- if (systemKeyword != null) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(systemKeyword), systemKeyword.getLength(), "PUBLIC " + quoteChar + v + quoteChar); //$NON-NLS-1$
- } else {
- ITextRegion nameRegion = getNameRegion();
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(nameRegion), 0, " PUBLIC " + quoteChar + v + quoteChar); //$NON-NLS-1$
- }
- }
- }
- }
- }
- }
-
-
- /**
- * Set the value of publicID.
- *
- * @param v
- * Value to assign to publicID.
- */
- public void setPublicID(String v) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_EXT_NODE_PUBLIC_ID_CHG")); //$NON-NLS-1$
- setPublicID(this, v);
- endRecording(this);
- }
-
- /**
- * Set the value of systemID.
- *
- * @param v
- * Value to assign to systemID.
- */
- public void setSystemID(Object requestor, String v) {
- if (!v.equals(systemID) || (getPublicKeywordRegion(iterator()) == null && getSystemKeywordRegion(iterator()) == null)) {
- systemID = v;
- String quoteChar = v.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ITextRegion systemValue = getSystemValueRegion();
- if (systemValue != null) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(systemValue), systemValue.getLength(), quoteChar + systemID + quoteChar);
- } else {
- ITextRegion systemKeyword = getSystemKeywordRegion(iterator());
-
- // time to create stuff
- if (systemKeyword != null) {
- // then just put our new value after the keyword
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(systemKeyword), 0, " " + quoteChar + v + quoteChar); //$NON-NLS-1$
- } else {
- // see if we have a public keyword
- ITextRegion publicKeyword = getPublicKeywordRegion(iterator());
- if (publicKeyword == null) {
- ITextRegion nameRegion = getNameRegion();
-
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(nameRegion), 0, " SYSTEM " + quoteChar + v + quoteChar); //$NON-NLS-1$
- } else {
- // put it after the public value region
- ITextRegion publicValueRegion = getPublicValueRegion();
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(publicValueRegion), 0, " " + quoteChar + v + quoteChar); //$NON-NLS-1$
- }
-
- }
- }
-
- }
- }
-
-
- /**
- * Set the value of systemID.
- *
- * @param v
- * Value to assign to systemID.
- */
- public void setSystemID(String v) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_EXT_NODE_SYSTEM_ID_CHG")); //$NON-NLS-1$
- setSystemID(this, v);
- endRecording(this);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Logger.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Logger.java
deleted file mode 100644
index 9bc12a1dcc..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Logger.java
+++ /dev/null
@@ -1,20 +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.dtd.core;
-
-/**
- * @deprecated moved to internal package because only this plugin should be
- * using this Logger class.
- */
-public class Logger extends org.eclipse.wst.dtd.core.internal.Logger {
- // see org.eclipse.wst.dtd.core.internal.Logger
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/NamedTopLevelNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/NamedTopLevelNode.java
deleted file mode 100644
index 5967273597..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/NamedTopLevelNode.java
+++ /dev/null
@@ -1,134 +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.dtd.core;
-
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-// interface for nodes that can exist at the top level in a dtdfile
-// eg. entity, notation, element, comment, attlist, or unrecognized stuff (ie
-// <junk dkfjdl>
-public abstract class NamedTopLevelNode extends TopLevelNode {
-
- private String tagStartType;
-
- public NamedTopLevelNode(DTDFile dtdFile, IStructuredDocumentRegion flatNode, String type) {
- super(dtdFile, flatNode);
- tagStartType = type;
- }
-
- public ITextRegion getNameRegion() {
- // name region is located after the whitespace (which is after
- // the elementtag
- RegionIterator iter = iterator();
- ITextRegion startTag = getNextRegion(iter, tagStartType);
-
- if (!iter.hasNext()) {
- return null;
- }
-
- ITextRegion region = iter.next();
- if (!region.getType().equals(DTDRegionTypes.WHITESPACE)) {
- return null;
- }
-
- if (!iter.hasNext()) {
- return null;
- }
-
- region = iter.next();
- if (region.getType().equals(DTDRegionTypes.NAME)) {
- return region;
- }
-
- // we normally stop here, but for entities, we have to see if we are
- // at a '%'. if so, we skip that and find the name after the
- // whitespace again
- if (tagStartType == DTDRegionTypes.ENTITY_TAG && region.getType().equals(DTDRegionTypes.PERCENT) && iter.hasNext()) {
- region = iter.next();
-
- if (!region.getType().equals(DTDRegionTypes.WHITESPACE)) {
- return null;
- }
-
- if (!iter.hasNext()) {
- return null;
- }
-
- region = iter.next();
- if (region.getType().equals(DTDRegionTypes.NAME)) {
- return region;
- }
- }
-
- return null;
- }
-
- public ITextRegion getStartTag(RegionIterator iter) {
- return getNextRegion(iter, tagStartType);
- }
-
- public ITextRegion getWhitespaceAfterName() {
- ITextRegion nameRegion = getNameRegion();
- RegionIterator iter = iterator();
- // skip past the element tag region
- ITextRegion elementTagRegion = getNextRegion(iter, tagStartType);
- boolean foundName = false;
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (!foundName && nameRegion != null && region == nameRegion) {
- foundName = true;
- }
-
- if (region.getType().equals(DTDRegionTypes.WHITESPACE)) {
- // there is no name region or we have already passed it
- if (nameRegion == null || foundName) {
- return region;
- }
- }
- }
- return null;
- }
-
- public void setName(Object requestor, String name) {
- ITextRegion nameRegion = getNameRegion();
- if (nameRegion != null) {
- super.setName(requestor, name);
- } else {
- RegionIterator iter = iterator();
- ITextRegion elementTagRegion = getNextRegion(iter, tagStartType);
- int replaceLength = 0;
- if (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType().equals(DTDRegionTypes.WHITESPACE)) {
- if (region.getLength() >= 2) {
- // there are 2 spaces between 'ELEMENT' and the
- // content
- // Change replace length to 1 so that the new name and
- // the content are separated by a single space
- replaceLength = 1;
- }
- }
- }
-
- // beginRecording(requestor, "Name Change");
- String newText = " " + name; //$NON-NLS-1$
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(elementTagRegion), replaceLength, newText);
- // endRecording(requestor);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/NodeList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/NodeList.java
deleted file mode 100644
index 4b4c71f015..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/NodeList.java
+++ /dev/null
@@ -1,94 +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.dtd.core;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-
-
-public class NodeList {
- protected DTDFile dtdFile;
-
- ArrayList listNodes = new ArrayList();
-
- protected String listType;
-
- public NodeList(DTDFile dtdFile, String tokenType) {
- listType = tokenType;
- this.dtdFile = dtdFile;
- }
-
- public Image getImage() {
- if (listType == DTDRegionTypes.ELEMENT_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_EL);
- } else if (listType == DTDRegionTypes.ENTITY_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_ENT);
- } else if (listType == DTDRegionTypes.NOTATION_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_NOT);
- } else if (listType == DTDRegionTypes.COMMENT_START) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_COMM);
- } else if (listType == DTDRegionTypes.ATTLIST_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_ATTLIST);
- } else if (listType == DTDRegionTypes.UNKNOWN_CONTENT) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_UNREC);
- } else
- return null;
- }
-
- public String getListType() {
- return listType;
- }
-
- public String getName() {
- if (listType == DTDRegionTypes.ELEMENT_TAG) {
- return DTDCorePlugin.getDTDString("_UI_LABEL_NODE_LIST_ELEMENTS"); //$NON-NLS-1$
- } else if (listType == DTDRegionTypes.ENTITY_TAG) {
- return DTDCorePlugin.getDTDString("_UI_LABEL_NODE_LIST_ENTITIES"); //$NON-NLS-1$
- } else if (listType == DTDRegionTypes.NOTATION_TAG) {
- return DTDCorePlugin.getDTDString("_UI_LABEL_NODE_LIST_NOTATIONS"); //$NON-NLS-1$
- } else if (listType == DTDRegionTypes.COMMENT_START) {
- return DTDCorePlugin.getDTDString("_UI_LABEL_NODE_LIST_COMMENTS"); //$NON-NLS-1$
- } else if (listType == DTDRegionTypes.ATTLIST_TAG) {
- return DTDCorePlugin.getDTDString("_UI_LABEL_NODE_LIST_ATTRIBUTES"); //$NON-NLS-1$
- } else if (listType == DTDRegionTypes.UNKNOWN_CONTENT) {
- return DTDCorePlugin.getDTDString("_UI_LABEL_NODE_LIST_OTHER"); //$NON-NLS-1$
- }
- return ""; //$NON-NLS-1$
- }
-
- public ArrayList getNodes() {
- listNodes.clear();
- Iterator iter = dtdFile.getNodes().iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (listType == DTDRegionTypes.ELEMENT_TAG && (node instanceof Element || node instanceof ParameterEntityReference)) {
- listNodes.add(node);
- } else if (listType == DTDRegionTypes.ATTLIST_TAG && node instanceof AttributeList) {
- listNodes.add(node);
- } else if (listType == DTDRegionTypes.ENTITY_TAG && node instanceof Entity) {
- listNodes.add(node);
- } else if (listType == DTDRegionTypes.NOTATION_TAG && node instanceof Notation) {
- listNodes.add(node);
- } else if (listType == DTDRegionTypes.COMMENT_START && node instanceof Comment) {
- listNodes.add(node);
- } else if (listType == DTDRegionTypes.UNKNOWN_CONTENT && node instanceof Unrecognized) {
- listNodes.add(node);
- }
- }
- return listNodes;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Notation.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Notation.java
deleted file mode 100644
index 050b5f5d37..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Notation.java
+++ /dev/null
@@ -1,30 +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.dtd.core;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-
-public class Notation extends ExternalNode {
-
- public Notation(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode, DTDRegionTypes.NOTATION_TAG);
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.NOTATIONICON);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/ParameterEntityReference.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/ParameterEntityReference.java
deleted file mode 100644
index 6a82e97efc..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/ParameterEntityReference.java
+++ /dev/null
@@ -1,114 +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.dtd.core;
-
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-public class ParameterEntityReference extends NamedTopLevelNode {
-
-
-
- public class StartEndPair {
- public int startOffset, endOffset;
- }
-
- private Entity cachedEntity = null;
-
- public ParameterEntityReference(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode, DTDRegionTypes.COMMENT_START);
- }
-
- public Entity getEntityObject() {
- if (cachedEntity != null && !cachedEntity.getName().equals(getReferencedEntity())) {
- // if we have a cached entity, but the name doesnt match,
- // null it now, so we perform a lookup
- cachedEntity = null;
- }
-
- if (cachedEntity == null) {
- List nodes = getDTDFile().getNodes();
- for (int i = 0; i < nodes.size(); i++) {
- DTDNode node = (DTDNode) nodes.get(i);
- if (node instanceof Entity) {
- Entity entity = (Entity) node;
- if (entity.isParameterEntity() && entity.getName().equals(getReferencedEntity())) {
- cachedEntity = entity;
- }
- }
- }
- }
- return cachedEntity;
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ENTITYREFERENCEICON);
- }
-
- public String getName() {
- return getStructuredDTDDocumentRegion().getText();
- }
-
- public String getReferencedEntity() {
- String text = getName();
- return getName().substring(1, text.length() - 1);
- }
-
- private void getStartAndEndOffsetForText(StartEndPair pair) {
- RegionIterator iter = iterator();
- ITextRegion commentStartTag = getStartTag(iter);
- ITextRegion endCommentTag = getNextRegion(iter, DTDRegionTypes.COMMENT_END);
- pair.endOffset = getStructuredDTDDocumentRegion().getEndOffset();
- if (commentStartTag != null) {
- pair.startOffset = getStructuredDTDDocumentRegion().getEndOffset(commentStartTag);
- }
- if (endCommentTag != null) {
- pair.endOffset = getStructuredDTDDocumentRegion().getEndOffset(endCommentTag);
- }
- }
-
- public String getText() {
- String text = getStructuredDTDDocumentRegion().getText();
- int flatNodeStart = getStructuredDTDDocumentRegion().getStartOffset();
- StartEndPair pair = new StartEndPair();
- getStartAndEndOffsetForText(pair);
- return text.substring(pair.startOffset - flatNodeStart, pair.endOffset - flatNodeStart);
- }
-
- public void setReferencedEntity(Object requestor, String name) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(), getStructuredDTDDocumentRegion().getLength(), "%" + name + ";"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void setReferencedEntity(String name) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_PARM_ENTITY_REF_CHG_ENTITY_REF")); //$NON-NLS-1$
- setReferencedEntity(this, name);
- endRecording(this);
- }
-
- public void setText(String newText) {
- beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_PARM_ENTITY_REF_COMMENT_CHG")); //$NON-NLS-1$
- int flatNodeStart = getStructuredDTDDocumentRegion().getStartOffset();
- StartEndPair pair = new StartEndPair();
- getStartAndEndOffsetForText(pair);
- replaceText(this, pair.startOffset, pair.endOffset - pair.startOffset, newText);
- endRecording(this);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/TopLevelNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/TopLevelNode.java
deleted file mode 100644
index 4d92e0b445..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/TopLevelNode.java
+++ /dev/null
@@ -1,85 +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.dtd.core;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-// interface for nodes that can exist at the top level in a dtdfile
-// eg. entity, notation, element, comment, attlist, or unrecognized stuff (ie
-// <junk dkfjdl>
-public abstract class TopLevelNode extends DTDNode {
-
- private ArrayList flatNodes = new ArrayList();
-
- public TopLevelNode(DTDFile dtdFile, IStructuredDocumentRegion flatNode) {
- super(dtdFile, flatNode);
- flatNodes.add(flatNode);
- }
-
- public void addWhitespaceStructuredDocumentRegion(IStructuredDocumentRegion node) {
- flatNodes.add(node);
- }
-
- // specialize this so we delete the objects flat node range
- // AND any whitespace
- public void delete() {
- beginRecording(getDTDFile(), DTDCorePlugin.getDTDString("_UI_LABEL_TOP_LEVEL_NODE_DELETE")); //$NON-NLS-1$
- IStructuredDocumentRegion first = (IStructuredDocumentRegion) flatNodes.get(0);
- IStructuredDocumentRegion last = (IStructuredDocumentRegion) flatNodes.get(flatNodes.size() - 1);
- int startOffset = first.getStartOffset();
- int endOffset = last.getEndOffset();
-
- replaceText(getDTDFile(), startOffset, endOffset - startOffset, ""); //$NON-NLS-1$
- endRecording(getDTDFile());
- }
-
- public ITextRegion getEndRegion() {
- int size = flatNode.getRegions().size();
- if (size > 0) {
- return flatNode.getRegions().get(size - 1);
- }
- return null;
- }
-
- // includes what gettext gives us plus any whitespace
- // trailing it
- public String getFullText() {
- StringBuffer sb = new StringBuffer();
- Iterator iter = flatNodes.iterator();
- while (iter.hasNext()) {
- IStructuredDocumentRegion fNode = (IStructuredDocumentRegion) iter.next();
- sb.append(fNode.getText());
- }
- return sb.toString();
- }
-
- public ITextRegion getStartRegion() {
- if (flatNode.getRegions().size() > 0) {
- return flatNode.getRegions().get(0);
- }
- return null;
- }
-
- public RegionIterator iterator() {
- // System.out.println("create region iter " + this.getClass() + " with
- // start , end = " + getStartOffset() + ", " +getEndOffset());
- return new RegionIterator(flatNode, getStartOffset(), getEndOffset());
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Unrecognized.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Unrecognized.java
deleted file mode 100644
index 8036eff1b0..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/Unrecognized.java
+++ /dev/null
@@ -1,39 +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.dtd.core;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-
-public class Unrecognized extends TopLevelNode {
-
- public Unrecognized(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.UNRECOGNIZEDICON);
- }
-
- public String getName() {
- String text = getStructuredDTDDocumentRegion().getText();
- if (text.length() <= 30) {
- return text;
- } else {
- return text.substring(0, 29) + "..."; //$NON-NLS-1$
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/builder/delegates/DTDTaskTagSeeker.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/builder/delegates/DTDTaskTagSeeker.java
deleted file mode 100644
index 558534cb9e..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/builder/delegates/DTDTaskTagSeeker.java
+++ /dev/null
@@ -1,25 +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.dtd.core.builder.delegates;
-
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.participants.TaskTagSeeker;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-public class DTDTaskTagSeeker extends TaskTagSeeker {
- protected boolean isCommentRegion(IStructuredDocumentRegion region, ITextRegion textRegion) {
- return textRegion.getType().equals(DTDRegionTypes.COMMENT_CONTENT);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/content/ContentDescriberForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/content/ContentDescriberForDTD.java
deleted file mode 100644
index fa4c73197f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/content/ContentDescriberForDTD.java
+++ /dev/null
@@ -1,30 +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.dtd.core.content;
-
-import org.eclipse.core.runtime.content.ITextContentDescriber;
-import org.eclipse.wst.common.encoding.AbstractContentDescriber;
-import org.eclipse.wst.common.encoding.IResourceCharsetDetector;
-import org.eclipse.wst.xml.core.contenttype.XMLResourceEncodingDetector;
-
-
-
-
-public class ContentDescriberForDTD extends AbstractContentDescriber implements ITextContentDescriber {
-
- // same rules as for XML
- protected IResourceCharsetDetector getDetector() {
- return new XMLResourceEncodingDetector();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/document/DTDModel.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/document/DTDModel.java
deleted file mode 100644
index b04cf2ca70..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/document/DTDModel.java
+++ /dev/null
@@ -1,29 +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
- *
- *******************************************************************************/
-/*
- * Created on 28-Aug-03
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.dtd.core.document;
-
-/**
- * @author kboo
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public interface DTDModel {
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/document/DTDModelImpl.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/document/DTDModelImpl.java
deleted file mode 100644
index 37ec8b7705..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/document/DTDModelImpl.java
+++ /dev/null
@@ -1,271 +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.dtd.core.document;
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Entity;
-import org.eclipse.wst.dtd.core.NodeList;
-import org.eclipse.wst.dtd.core.event.IDTDFileListener;
-import org.eclipse.wst.dtd.core.event.NodesEvent;
-import org.eclipse.wst.dtd.core.util.DTDReferenceUpdater;
-import org.eclipse.wst.dtd.core.util.LabelValuePair;
-import org.eclipse.wst.sse.core.AbstractStructuredModel;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.events.IStructuredDocumentListener;
-import org.eclipse.wst.sse.core.events.NewDocumentEvent;
-import org.eclipse.wst.sse.core.events.NoChangeEvent;
-import org.eclipse.wst.sse.core.events.RegionChangedEvent;
-import org.eclipse.wst.sse.core.events.RegionsReplacedEvent;
-import org.eclipse.wst.sse.core.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.events.StructuredDocumentRegionsReplacedEvent;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-
-public final class DTDModelImpl extends AbstractStructuredModel implements IStructuredDocumentListener, DTDModel {
-
- public static boolean deleteFile(String fileName) {
- boolean result = false;
-
- // create the temp File object
- File file = new File(fileName);
- if (file.exists())
- result = file.delete();
- return result;
- }
-
- private DTDFile document;
-
- //private List errorMessages = new ArrayList();
-
- // entity reference names found in the conditional IGNORE sections
- private Vector ignoredEntityRefs;
-
- private boolean refreshRequired = false;
-
- protected DTDReferenceUpdater refUpdater = new DTDReferenceUpdater();
-
- public DTDModelImpl() {
- super();
- document = new DTDFile(this);
- document.addDTDFileListener(new IDTDFileListener() {
-
- public void nodeChanged(DTDNode node) {
- if (node instanceof Entity) {
- Entity entity = (Entity) node;
- if (entity.isParameterEntity() && entity.isExternalEntity()) {
- // just say they have changed for now
- setReferencedModelsChanged();
- }
- }
- }
-
- public void nodesAdded(NodesEvent event) {
- checkIfExternalReferencesChanged(event);
- }
-
- public void nodesRemoved(NodesEvent event) {
- checkIfExternalReferencesChanged(event);
- }
- });
- }
-
- public void beginRecording(Object requester, String label) {
- super.beginRecording(requester, label);
- // clear reference updater cache
- getReferenceUpdater().clearCache();
- }
-
- private void checkIfExternalReferencesChanged(NodesEvent event) {
- Iterator iter = event.getNodes().iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (node instanceof Entity) {
- Entity entity = (Entity) node;
- if (entity.isParameterEntity() && entity.isExternalEntity()) {
- // just say they have changed for now
- setReferencedModelsChanged();
- }
- }
- }
- }
-
- //
- // The following function helps determine the list of things that
- // can be used in a parameter entity reference content
- // Optional parameter is to allow the currently used DTDEntity to
- // be included in the combobox.
- //
- public LabelValuePair[] createParmEntityContentItems(Entity entity) {
- NodeList entities = getDTDFile().getEntities();
-
- Vector items = new Vector();
-
- if (entity != null) {
- String name = "%" + entity.getName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- items.addElement(new LabelValuePair(name, name));
- }
-
- for (Iterator i = entities.getNodes().iterator(); i.hasNext();) {
- Entity entityAt = (Entity) i.next();
- if (entityAt.isParameterEntity() && entityAt.isExternalEntity()) {
- String name = "%" + entityAt.getName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- items.addElement(new LabelValuePair(name, name));
- }
- }
- LabelValuePair[] comboArray = new LabelValuePair[items.size()];
- items.copyInto(comboArray);
- return comboArray;
- }
-
- public void endRecording(Object requester) {
- super.endRecording(requester);
- // clear reference updater cache
- getReferenceUpdater().clearCache();
- }
-
-
- public DTDFile getDTDFile() {
- return document;
- }
-
- // Returns entity reference names that are in
- // the conditional IGNORE sections.
- public Vector getIgnoredEntityRefs() {
- if (ignoredEntityRefs == null)
- ignoredEntityRefs = new Vector();
- return ignoredEntityRefs;
- }
-
- public IndexedRegion getIndexedRegion(int offset) {
- if (this.document == null)
- return null;
- // System.out.println("getNode at " + offset + " returning = " +
- // this.document.getNodeAt(offset));
-
- return this.document.getNodeAt(offset);
- }
-
- public DTDReferenceUpdater getReferenceUpdater() {
- return refUpdater;
- }
-
- public boolean isReferencedModelsChanged() {
- return refreshRequired;
- }
-
- public boolean isRefreshRequired() {
- return refreshRequired;
- }
-
- public void newModel(NewDocumentEvent flatModelEvent) {
- document.newModel(flatModelEvent);
- // System.out.println("\nnewmodel");
- outputStructuredDocument(flatModelEvent);
- }
-
- public void noChange(NoChangeEvent flatModelEvent) {
- // System.out.println("\nnochange");
- outputStructuredDocument(flatModelEvent);
-
- }
-
- public void nodesReplaced(StructuredDocumentRegionsReplacedEvent flatModelEvent) {
- // System.out.println("\nnodesreplaced");
- document.nodesReplaced(flatModelEvent);
- outputStructuredDocument(flatModelEvent);
-
- }
-
- public void outputStructuredDocument(StructuredDocumentEvent flatModelEvent) {
- // System.out.println("structuredDocument source = '" +
- // flatModelEvent.getStructuredDocument().getText() + "'");
- // System.out.println("new String = '" +
- // flatModelEvent.getOriginalChanges() +"'");
- // System.out.println("deleted String = '" +
- // flatModelEvent.getDeletedText() +"'");
- // Enumeration e =
- // flatModelEvent.getStructuredDocument().getNodes().elements();
- // int i = 0;
- // for (; e.hasMoreElements(); i++)
- // {
- // BasicStructuredDocumentRegion node =
- // (BasicStructuredDocumentRegion) e.nextElement();
- // outputStructuredDocumentRegion(node);
- // System.out.println(" " + i +". " + node.hashCode() + " '"
- // +node.getText() + "'");
- // }
- }
-
- public void outputStructuredDocumentRegion(IStructuredDocumentRegion flatNode) {
- // int size = flatNode.getNumberOfRegions();
- // for (int i = 0; i < size; i++)
- // {
- // Region region = (Region) flatNode.getRegions().get(i);
- // System.out.println(i + ". " + region.getType());
-
- // } // end of for ()
-
- }
-
- public void regionChanged(RegionChangedEvent flatModelEvent) {
- // System.out.println("\nregion changed");
- document.regionChanged(flatModelEvent);
- // System.out.println("= " +
- // flatModelEvent.getStructuredDocumentRegion().getText());
- // System.out.println("region changed " +
- // flatModelEvent.getRegion().hashCode() + " = " +
- // flatModelEvent.getRegion());
-
- outputStructuredDocument(flatModelEvent);
- }
-
- public void regionsReplaced(RegionsReplacedEvent flatModelEvent) {
- // System.out.println("\nregion replaced");
- document.regionsReplaced(flatModelEvent);
- outputStructuredDocument(flatModelEvent);
- }
-
- public void setReferencedModelsChanged() {
- refreshRequired = true;
- }
-
- public void setRefreshRequired(boolean value) {
- refreshRequired = value;
- }
-
-
- /**
- * @param newStructuredDocument
- * org.eclipse.wst.sse.core.text.IStructuredDocument
- */
- public void setStructuredDocument(IStructuredDocument newStructuredDocument) {
- IStructuredDocument oldStructuredDocument = super.getStructuredDocument();
- if (newStructuredDocument == oldStructuredDocument)
- return; // noting to do
-
- if (oldStructuredDocument != null)
- oldStructuredDocument.removeDocumentChangingListener(this);
- super.setStructuredDocument(newStructuredDocument);
- if (newStructuredDocument.getLength() > 0) {
- newModel(new NewDocumentEvent(newStructuredDocument, this));
- }
- if (newStructuredDocument != null)
- newStructuredDocument.addDocumentChangingListener(this);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/encoding/DTDDocumentCharsetDetector.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/encoding/DTDDocumentCharsetDetector.java
deleted file mode 100644
index 9cd2207f75..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/encoding/DTDDocumentCharsetDetector.java
+++ /dev/null
@@ -1,61 +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
- *
- *******************************************************************************/
-/*
- * Created on 28-Aug-03
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.dtd.core.encoding;
-
-import java.io.IOException;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.common.encoding.AbstractResourceEncodingDetector;
-import org.eclipse.wst.sse.core.document.DocumentReader;
-import org.eclipse.wst.sse.core.document.IDocumentCharsetDetector;
-import org.eclipse.wst.xml.core.encoding.XMLDocumentCharsetDetector;
-
-
-/**
- * @author kboo
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public final class DTDDocumentCharsetDetector extends AbstractResourceEncodingDetector implements IDocumentCharsetDetector {
-
- public String getSpecDefaultEncoding() {
- // by default, UTF-8 as per XML spec
- final String enc = "UTF-8"; //$NON-NLS-1$
- return enc;
- }
-
- /**
- *
- */
-
- protected void parseInput() throws IOException {
- IDocumentCharsetDetector documentEncodingDetector = new XMLDocumentCharsetDetector();
- documentEncodingDetector.set(fReader);
- fEncodingMemento = documentEncodingDetector.getEncodingMemento();
-
- }
-
- public void set(IDocument document) {
- set(new DocumentReader(document, 0));
-
-
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/encoding/DTDDocumentLoader.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/encoding/DTDDocumentLoader.java
deleted file mode 100644
index 6767d396f6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/encoding/DTDDocumentLoader.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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.encoding;
-
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.wst.dtd.core.internal.text.DTDStructuredDocumentReParser;
-import org.eclipse.wst.dtd.core.parser.DTDRegionParser;
-import org.eclipse.wst.dtd.core.rules.StructuredTextPartitionerForDTD;
-import org.eclipse.wst.sse.core.document.AbstractDocumentLoader;
-import org.eclipse.wst.sse.core.document.IDocumentCharsetDetector;
-import org.eclipse.wst.sse.core.document.IEncodedDocument;
-import org.eclipse.wst.sse.core.document.StructuredDocumentFactory;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
-import org.eclipse.wst.sse.core.parser.RegionParser;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-
-
-public final class DTDDocumentLoader extends AbstractDocumentLoader {
-
- public DTDDocumentLoader() {
- super();
- }
-
- public IDocumentPartitioner getDefaultDocumentPartitioner() {
- return new StructuredTextPartitionerForDTD();
- }
-
- public IDocumentCharsetDetector getDocumentEncodingDetector() {
- if (fDocumentEncodingDetector == null) {
- fDocumentEncodingDetector = new DTDDocumentCharsetDetector();
- }
- return fDocumentEncodingDetector;
- }
-
- public RegionParser getParser() {
- return new DTDRegionParser();
- }
-
- protected String getSpecDefaultEncoding() {
- String enc = "UTF-8"; //$NON-NLS-1$
- return enc;
- }
-
- protected IEncodedDocument newEncodedDocument() {
- IStructuredDocument document = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
- DTDStructuredDocumentReParser reParser = new DTDStructuredDocumentReParser();
- reParser.setStructuredDocument(document);
- if (document instanceof BasicStructuredDocument) {
- ((BasicStructuredDocument) document).setReParser(reParser);
- }
- return document;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/event/IDTDFileListener.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/event/IDTDFileListener.java
deleted file mode 100644
index 235b60af6f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/event/IDTDFileListener.java
+++ /dev/null
@@ -1,24 +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.dtd.core.event;
-
-import org.eclipse.wst.dtd.core.DTDNode;
-
-public interface IDTDFileListener {
-
- public void nodeChanged(DTDNode node);
-
- public void nodesAdded(NodesEvent event);
-
- public void nodesRemoved(NodesEvent event);
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/event/NodesEvent.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/event/NodesEvent.java
deleted file mode 100644
index ceaca1fce8..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/event/NodesEvent.java
+++ /dev/null
@@ -1,32 +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.dtd.core.event;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.DTDNode;
-
-
-public final class NodesEvent {
- private ArrayList changedNodes = new ArrayList();
-
- public void add(DTDNode changedNode) {
- changedNodes.add(changedNode);
- }
-
- public List getNodes() {
- return changedNodes;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java
deleted file mode 100644
index 8a2903beff..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java
+++ /dev/null
@@ -1,110 +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.dtd.core.internal;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public class DTDCorePlugin extends AbstractUIPlugin {
- private static DTDCorePlugin instance;
-
- public static Image getDTDImage(String iconName) {
- return getInstance().getImage(iconName);
- }
-
- public static ImageDescriptor getDTDImageDescriptor(String iconName) {
- String thisID = getInstance().getBundle().getSymbolicName();
- return AbstractUIPlugin.imageDescriptorFromPlugin(thisID, iconName);
- }
-
- public static String getDTDString(String key) {
- // In case it is invoked from a command line
- if (getInstance() == null) {
- return ""; //$NON-NLS-1$
- }
-
- return getInstance().getString(key);
- }
-
- public synchronized static DTDCorePlugin getInstance() {
- return instance;
- }
-
- public static DTDCorePlugin getPlugin() {
- return instance;
- }
-
- private ResourceBundle resourceBundle;
-
- public DTDCorePlugin() {
- super();
- instance = this;
- try {
- resourceBundle = Platform.getResourceBundle(Platform
- .getBundle("org.eclipse.wst.dtd.core")); //$NON-NLS-1$
- } catch (java.util.MissingResourceException exception) {
- //B2BUtilPlugin.getPlugin().getMsgLogger().write(B2BUtilPlugin.getGUIString("_WARN_PLUGIN_PROPERTIES_MISSING")
- // + descriptor.getLabel());
- resourceBundle = null;
- }
- }
-
- public Image getImage(String iconName) {
- ImageRegistry imageRegistry = getImageRegistry();
- Image image = imageRegistry.get(iconName);
-
- if (image == null) {
- String thisID = getInstance().getBundle().getSymbolicName();
- imageRegistry.put(iconName, imageDescriptorFromPlugin(thisID,
- iconName));
- image = imageRegistry.get(iconName);
- }
-
- return image;
- }
-
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
- /**
- * This gets the string resource.
- */
- public String getString(String key) {
- return getResourceBundle().getString(key);
- }
-
- /**
- * This gets the string resource and does one substitution.
- */
- public String getString(String key, Object s1) {
- return MessageFormat.format(getString(key), new Object[] { s1 });
- }
-
- /**
- * This gets the string resource and does two substitutions.
- */
- public String getString(String key, Object s1, Object s2) {
- return MessageFormat.format(getString(key), new Object[] { s1, s2 });
- }
-
- public void startup() {
- instance = this;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java
deleted file mode 100644
index a0ba793c30..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java
+++ /dev/null
@@ -1,143 +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.dtd.core.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.dtd.core"; //$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;
- }
- 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 (!isDebugging())
- return;
-
- 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)) {
- 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;
- }
- }
- }
- }
-
- /**
- * @return true if the platform is debugging
- */
- public static boolean isDebugging() {
- return Platform.inDebugMode();
- }
-
- 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.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java
deleted file mode 100644
index b4d24ea328..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java
+++ /dev/null
@@ -1,41 +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.dtd.core.internal.text;
-
-import org.eclipse.wst.sse.core.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredTextReParser;
-
-
-public class DTDStructuredDocumentReParser extends StructuredDocumentReParser {
-
- public StructuredDocumentEvent checkForCrossStructuredDocumentRegionBoundryCases() {
- IStructuredDocumentRegion startNode = fStructuredDocument.getRegionAtCharacterOffset(fStart);
- IStructuredDocumentRegion endNode = fStructuredDocument.getRegionAtCharacterOffset(fStart + fLengthToReplace - 1);
- return reparse(startNode.getStart(), endNode.getEnd());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser#newInstance()
- */
- public IStructuredTextReParser newInstance() {
- return new DTDStructuredDocumentReParser();
- }
-
- protected StructuredDocumentEvent reparse(IStructuredDocumentRegion dirtyStart, IStructuredDocumentRegion dirtyEnd) {
- return super.reparse(dirtyStart, dirtyEnd);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java
deleted file mode 100644
index 816ffac5ea..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java
+++ /dev/null
@@ -1,33 +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.dtd.core.internal.text;
-
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-
-public class DTDStructuredDocumentRegionFactory {
- public static final int DTD_GENERIC = 5;
-
- public static IStructuredDocumentRegion createStructuredDocumentRegion(int type) {
- IStructuredDocumentRegion instance = null;
- switch (type) {
- case DTD_GENERIC :
- instance = new BasicStructuredDocumentRegion();
- break;
- default :
- break;
- }
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java
deleted file mode 100644
index c363a21589..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java
+++ /dev/null
@@ -1,84 +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.dtd.core.internal.text;
-
-import java.util.NoSuchElementException;
-
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-
-
-public class RegionIterator {
-
- private int currentIndex;
-
- //private IStructuredDocumentRegion flatNode;
- private ITextRegionList regions;
- //private int startOffset, endOffset;
- private ITextRegion startRegion, endRegion;
-
- public RegionIterator(IStructuredDocumentRegion node) {
- this(node, node.getStart(), node.getEnd());
- }
-
- public RegionIterator(IStructuredDocumentRegion node, int startOffset, int endOffset) {
- regions = node.getRegions();
- startRegion = node.getRegionAtCharacterOffset(startOffset);
- endRegion = node.getRegionAtCharacterOffset(endOffset - 1);
-
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (startRegion == region) {
- currentIndex = i;
- break;
- }
- }
- }
-
- public RegionIterator(ITextRegionList regions) {
- this.regions = regions;
- startRegion = regions.get(0);
- endRegion = regions.get(regions.size() - 1);
- currentIndex = 0;
- // this(node, node.getStart(), node.getEnd());
- }
-
- public boolean hasNext() {
- if (currentIndex < regions.size()) {
- return currentIndex <= regions.indexOf(endRegion);
- }
- return false;
- }
-
- public boolean hasPrevious() {
- if (currentIndex >= 0) {
- return currentIndex >= regions.indexOf(startRegion);
- }
- return false;
- }
-
- public ITextRegion next() {
- if (hasNext()) {
- return regions.get(currentIndex++);
- }
- throw new NoSuchElementException();
- }
-
- public ITextRegion previous() {
- if (hasPrevious()) {
- return regions.get(--currentIndex);
- }
- throw new NoSuchElementException();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/DTDModelDumper.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/DTDModelDumper.java
deleted file mode 100644
index abdf741b05..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/DTDModelDumper.java
+++ /dev/null
@@ -1,40 +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.dtd.core.modelhandler;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.common.encoding.EncodingRule;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.ModelDumper;
-
-
-public final class DTDModelDumper implements ModelDumper {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.core.ModelDumper#dump(org.eclipse.wst.sse.core.IStructuredModel,
- * java.io.OutputStream, org.eclipse.wst.common.encoding.EncodingRule,
- * org.eclipse.core.resources.IFile)
- */
- public void dump(IStructuredModel model, OutputStream outputStream, EncodingRule encodingRule, IFile iFile) throws UnsupportedEncodingException, IOException, CoreException {
- // TODO Auto-generated method stub
- System.out.println("Implement DTDModelDumper.dump()"); //$NON-NLS-1$
-
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/DTDModelLoader.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/DTDModelLoader.java
deleted file mode 100644
index 896c24de43..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/DTDModelLoader.java
+++ /dev/null
@@ -1,47 +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.dtd.core.modelhandler;
-
-import org.eclipse.wst.dtd.core.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.encoding.DTDDocumentLoader;
-import org.eclipse.wst.sse.core.AbstractModelLoader;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.ModelLoader;
-import org.eclipse.wst.sse.core.document.IDocumentLoader;
-
-
-
-public final class DTDModelLoader extends AbstractModelLoader {
- public DTDModelLoader() {
- super();
- }
-
- public IDocumentLoader getDocumentLoader() {
- if (documentLoaderInstance == null) {
- documentLoaderInstance = new DTDDocumentLoader();
- }
- return documentLoaderInstance;
- }
-
- public ModelLoader newInstance() {
- return new DTDModelLoader();
- }
-
- public IStructuredModel newModel() {
- IStructuredModel model = new DTDModelImpl();
- // now done in create
- //model.setStructuredDocument(createNewStructuredDocument());
- //model.setFactoryRegistry(defaultFactoryRegistry());
- return model;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/ModelHandlerForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/ModelHandlerForDTD.java
deleted file mode 100644
index b1f4dc1ac0..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/modelhandler/ModelHandlerForDTD.java
+++ /dev/null
@@ -1,46 +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.dtd.core.modelhandler;
-
-import org.eclipse.wst.dtd.core.encoding.DTDDocumentCharsetDetector;
-import org.eclipse.wst.dtd.core.encoding.DTDDocumentLoader;
-import org.eclipse.wst.sse.core.ModelLoader;
-import org.eclipse.wst.sse.core.document.IDocumentCharsetDetector;
-import org.eclipse.wst.sse.core.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.modelhandler.AbstractModelHandler;
-import org.eclipse.wst.sse.core.modelhandler.IModelHandler;
-
-
-public final class ModelHandlerForDTD extends AbstractModelHandler implements IModelHandler {
- private static String AssociatedContentTypeId = "org.eclipse.wst.dtd.core.dtdsource"; //$NON-NLS-1$
- private static String ModelHandlerID = "org.eclipse.wst.dtd.core.modelhandler"; //$NON-NLS-1$
-
- public ModelHandlerForDTD() {
- super();
- setId(ModelHandlerID);
- setAssociatedContentTypeId(AssociatedContentTypeId);
- }
-
- public IDocumentLoader getDocumentLoader() {
- return new DTDDocumentLoader();
- }
-
- public IDocumentCharsetDetector getEncodingDetector() {
- return new DTDDocumentCharsetDetector();
- }
-
- public ModelLoader getModelLoader() {
- return new DTDModelLoader();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegion.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegion.java
deleted file mode 100644
index 69efada651..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegion.java
+++ /dev/null
@@ -1,32 +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.dtd.core.parser;
-
-import org.eclipse.wst.sse.core.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.parser.ContextRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-
-
-
-public class DTDRegion extends ContextRegion {
-
-
- public DTDRegion(String newContext, int newStart, int newLength) {
- super(newContext, newStart, newLength, newLength);
- }
-
-
- public StructuredDocumentEvent updateModel(Object requester, IStructuredDocumentRegion flatnode, String changes, int requestStart, int requestLength) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionFactory.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionFactory.java
deleted file mode 100644
index fbcdef4de5..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionFactory.java
+++ /dev/null
@@ -1,26 +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.dtd.core.parser;
-
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-public class DTDRegionFactory implements DTDRegionTypes {
- public static ITextRegion createRegion(String tokenKind, int start, int length) {
- ITextRegion region = null;
- if (tokenKind != null) {
- region = new DTDRegion(tokenKind, start, length);
- }
- return region;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionParser.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionParser.java
deleted file mode 100644
index c6a2b993b5..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionParser.java
+++ /dev/null
@@ -1,262 +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.dtd.core.parser;
-
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Vector;
-
-import org.eclipse.wst.dtd.core.internal.text.DTDStructuredDocumentRegionFactory;
-import org.eclipse.wst.dtd.core.tokenizer.DTDTokenizer;
-import org.eclipse.wst.dtd.core.tokenizer.Token;
-import org.eclipse.wst.sse.core.parser.RegionParser;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-
-
-public class DTDRegionParser implements RegionParser {
- private Vector cachedRegions = null;
- private DTDTokenizer tokenizer = null;
- private IStructuredDocumentRegion cachedNode = null; // top of node chain
-
- public RegionParser newInstance() {
- return new DTDRegionParser();
- }
-
- private IStructuredDocumentRegion addNewNodes(IStructuredDocumentRegion lastNode, Vector regions) {
- IStructuredDocumentRegion leadingSpaceNode = null;
- IStructuredDocumentRegion contentNode = null;
- IStructuredDocumentRegion trailingSpaceNode = null;
- LinkedList nodeSeeds = new LinkedList();
- int nRegions = regions.size();
- int leadingSpaceEnd = -1;
- int trailingSpaceBegin = nRegions;
-
- // find leading space
- nodeSeeds.clear();
- for (int i = 0; i < nRegions; i++) {
- ITextRegion region = (ITextRegion) regions.get(i);
- String type = region.getType();
- if (isBlankRegion(type)) {
- leadingSpaceEnd = i;
- nodeSeeds.addLast(region);
- } else {
- break;
- }
- }
- if (!nodeSeeds.isEmpty()) {
- leadingSpaceNode = createNode(nodeSeeds);
- if (lastNode != null) {
- lastNode.setNext(leadingSpaceNode);
- leadingSpaceNode.setPrevious(lastNode);
- }
- lastNode = leadingSpaceNode;
- }
-
- // find trailing space
- if (leadingSpaceEnd < nRegions - 1) {
- nodeSeeds.clear();
- for (int i = nRegions - 1; 0 <= i; i--) {
- ITextRegion region = (ITextRegion) regions.get(i);
- String type = ((ITextRegion) regions.get(i)).getType();
- if (isBlankRegion(type)) {
- trailingSpaceBegin = i;
- nodeSeeds.addFirst(region);
- } else {
- break;
- }
- }
- if (!nodeSeeds.isEmpty()) {
- trailingSpaceNode = createNode(nodeSeeds);
- }
-
- nodeSeeds.clear();
- for (int i = leadingSpaceEnd + 1; i < trailingSpaceBegin; i++) {
- nodeSeeds.addLast(regions.get(i));
- }
- if (!nodeSeeds.isEmpty()) {
- contentNode = createNode(nodeSeeds);
- if (lastNode != null) {
- lastNode.setNext(contentNode);
- contentNode.setPrevious(lastNode);
- }
- lastNode = contentNode;
- }
- if (trailingSpaceNode != null) {
- lastNode.setNext(trailingSpaceNode);
- trailingSpaceNode.setPrevious(lastNode);
- lastNode = trailingSpaceNode;
- }
- }
-
- return lastNode;
- }
-
- private IStructuredDocumentRegion createNode(LinkedList regions) {
- if (regions.size() == 0) {
- return null;
- }
-
- IStructuredDocumentRegion node = DTDStructuredDocumentRegionFactory.createStructuredDocumentRegion(DTDStructuredDocumentRegionFactory.DTD_GENERIC);
- int start = ((ITextRegion) regions.getFirst()).getStart();
- int length = ((ITextRegion) regions.getLast()).getEnd() - start;
- node.setStart(start);
- node.setLength(length);
- for (ListIterator i = regions.listIterator(0); i.hasNext();) {
- ITextRegion region = (ITextRegion) i.next();
- node.addRegion(region);
- region.adjustStart(-start);
- }
- node.setEnded(true);
-
- return node;
- }
-
- private IStructuredDocumentRegion createNodeChain(List regions) {
- IStructuredDocumentRegion headNode = null;
- IStructuredDocumentRegion lastNode = null;
- Vector nodeSeeds = new Vector();
-
- for (Iterator e = regions.iterator(); e.hasNext();) {
- ITextRegion region = (ITextRegion) e.next();
- String type = region.getType();
- // If the following regions appear,
- // a previous node is closed in front of it.
- if (!nodeSeeds.isEmpty() && isBeginningRegion(type)) {
- lastNode = addNewNodes(lastNode, nodeSeeds);
- nodeSeeds.clear();
- }
- nodeSeeds.addElement(region);
-
- // The following regions close the current node.
- if (!nodeSeeds.isEmpty() && isEndingRegion(type)) {
- lastNode = addNewNodes(lastNode, nodeSeeds);
- nodeSeeds.clear();
- }
-
- if (headNode == null && lastNode != null) {
- headNode = findFirstNode(lastNode);
- }
- }
-
- // close current node forcibly.
- if (!nodeSeeds.isEmpty()) {
- lastNode = addNewNodes(lastNode, nodeSeeds);
- if (headNode == null && lastNode != null) {
- headNode = findFirstNode(lastNode);
- }
- }
- return headNode;
- }
-
- private IStructuredDocumentRegion findFirstNode(IStructuredDocumentRegion node) {
- IStructuredDocumentRegion firstNode = node;
- IStructuredDocumentRegion prevNode = null;
- while ((prevNode = firstNode.getPrevious()) != null) {
- firstNode = prevNode;
- }
- return firstNode;
- }
-
- public IStructuredDocumentRegion getDocumentRegions() {
- if (cachedNode != null) {
- return cachedNode;
- }
-
- List regions = getRegions();
- IStructuredDocumentRegion headNode = createNodeChain(regions);
- cachedNode = headNode;
-
- return headNode;
- }
-
- public List getRegions() {
- if (cachedRegions != null) {
- return cachedRegions;
- }
-
- Vector regions = new Vector();
- Token currentToken = null;
- do {
- try {
- currentToken = (Token) tokenizer.yylex();
- if (currentToken != null) {
- ITextRegion region = DTDRegionFactory.createRegion(currentToken.getType(), currentToken.getStartOffset(), currentToken.getLength());
- regions.add(region);
- }
- } catch (java.io.FileNotFoundException e) {
- System.out.println("File not found"); //$NON-NLS-1$
- } catch (java.io.IOException e) {
- System.out.println("Error opening file"); //$NON-NLS-1$
- }
- } while (currentToken != null);
-
- cachedRegions = regions;
- return regions;
- }
-
- public void reset(Reader reader) {
- if (tokenizer == null) {
- try {
- tokenizer = new DTDTokenizer(reader);
- } catch (ArrayIndexOutOfBoundsException e) {
- System.out.println("Usage : java DTDTokenizer <inputfile>"); //$NON-NLS-1$
- }
- } else {
- try {
- tokenizer.yyreset(reader);
- } catch (java.io.IOException e) {
- System.out.println("Error opening file"); //$NON-NLS-1$
- }
- }
-
- cachedNode = null;
- cachedRegions = null;
- }
-
- /**
- * An additional offset for use with any position-dependant parsing rules
- */
- public void reset(Reader reader, int offset) {
- reset(reader);
- }
-
- public void reset(String input) {
- reset(new StringReader(input));
- }
-
- public void reset(String input, int offset) {
- reset(input);
- }
-
- // never used
- DTDTokenizer getTokenizer() {
- return tokenizer;
- }
-
- private boolean isBeginningRegion(String type) {
- return (type == DTDRegionTypes.START_TAG) || (type == DTDRegionTypes.ENTITY_PARM);
- }
-
- private boolean isBlankRegion(String type) {
- return (type == DTDRegionTypes.WHITESPACE);
- }
-
- private boolean isEndingRegion(String type) {
- return (type == DTDRegionTypes.END_TAG) || (type == DTDRegionTypes.ENTITY_PARM) || (type == DTDRegionTypes.COMMENT_END);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionTypes.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionTypes.java
deleted file mode 100644
index f65e56b97d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/parser/DTDRegionTypes.java
+++ /dev/null
@@ -1,76 +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.dtd.core.parser;
-
-public interface DTDRegionTypes {
- public static final String regionPrefix = "org.eclipse.wst.dtd.core.util.parser.DTDRegionTypes."; //$NON-NLS-1$
-
- public static final String NAME = regionPrefix + "NAME"; //$NON-NLS-1$
- public static final String START_TAG = regionPrefix + "START_TAG"; //$NON-NLS-1$
- public static final String END_TAG = regionPrefix + "END_TAG"; //$NON-NLS-1$
- public static final String LEFT_PAREN = regionPrefix + "LEFT_PAREN"; //$NON-NLS-1$
- public static final String RIGHT_PAREN = regionPrefix + "RIGHT_PAREN"; //$NON-NLS-1$
- public static final String WHITESPACE = regionPrefix + "WHITESPACE"; //$NON-NLS-1$
- public static final String CONNECTOR = regionPrefix + "CONNECTOR"; //$NON-NLS-1$
-
- public static final String OCCUR_TYPE = regionPrefix + "OCCUR_TYPE"; //$NON-NLS-1$
- public static final String EXCLAMATION = regionPrefix + "EXCLAMATION"; //$NON-NLS-1$
- public static final String PERCENT = regionPrefix + "PERCENT"; //$NON-NLS-1$
- public static final String SEMICOLON = regionPrefix + "SEMICOLON"; //$NON-NLS-1$
- public static final String COMMENT_START = regionPrefix + "COMMENT"; //$NON-NLS-1$
- public static final String COMMENT_CONTENT = regionPrefix + "COMMENT_CONTENT"; //$NON-NLS-1$
- public static final String COMMENT_END = regionPrefix + "COMMENT_END"; //$NON-NLS-1$
-
- public static final String NOTATION_TAG = regionPrefix + "NOTATION_TAG"; //$NON-NLS-1$
- public static final String NOTATION_CONTENT = regionPrefix + "NOTATION_CONTENT"; //$NON-NLS-1$
-
- public static final String ENTITY_TAG = regionPrefix + "ENTITY_TAG"; //$NON-NLS-1$
- public static final String ENTITY_PARM = regionPrefix + "ENTITY_PARM"; //$NON-NLS-1$
- public static final String ENTITY_CONTENT = regionPrefix + "ENTITY_CONTENT"; //$NON-NLS-1$
- public static final String NDATA_VALUE = regionPrefix + "NDATA_VALUE"; //$NON-NLS-1$
-
- public static final String ELEMENT_TAG = regionPrefix + "ELEMENT_TAG"; //$NON-NLS-1$
- public static final String ELEMENT_CONTENT = regionPrefix + "ELEMENT_CONTENT"; //$NON-NLS-1$
- public static final String CONTENT_EMPTY = regionPrefix + "CONTENT_EMPTY"; //$NON-NLS-1$
- public static final String CONTENT_ANY = regionPrefix + "CONTENT_ANY"; //$NON-NLS-1$
- public static final String CONTENT_PCDATA = regionPrefix + "CONTENT_PCDATA"; //$NON-NLS-1$
-
- public static final String ATTLIST_TAG = regionPrefix + "ATTLIST_TAG"; //$NON-NLS-1$
-
- public static final String SYSTEM_KEYWORD = regionPrefix + "SYSTEM_KEYWORD"; //$NON-NLS-1$
- public static final String PUBLIC_KEYWORD = regionPrefix + "PUBLIC_KEYWORD"; //$NON-NLS-1$
- public static final String NDATA_KEYWORD = regionPrefix + "NDATA_KEYWORD"; //$NON-NLS-1$
- public static final String SINGLEQUOTED_LITERAL = regionPrefix + "SINGLEQUOTED_LITERAL"; //$NON-NLS-1$
- public static final String DOUBLEQUOTED_LITERAL = regionPrefix + "DOUBLEQUOTED_LITERAL"; //$NON-NLS-1$
- public static final String UNKNOWN_CONTENT = regionPrefix + "UNKNOWN_CONTENT"; //$NON-NLS-1$
-
- public static final String ATTRIBUTE_NAME = regionPrefix + "ATTRIBUTE_NAME"; //$NON-NLS-1$
-
- // attribute type keywords
- public static final String CDATA_KEYWORD = regionPrefix + "CDATA_KEYWORD"; //$NON-NLS-1$
- public static final String ID_KEYWORD = regionPrefix + "ID_KEYWORD"; //$NON-NLS-1$
- public static final String IDREF_KEYWORD = regionPrefix + "IDREF_KEYWORD"; //$NON-NLS-1$
- public static final String IDREFS_KEYWORD = regionPrefix + "IDREFS_KEYWORD"; //$NON-NLS-1$
- public static final String ENTITY_KEYWORD = regionPrefix + "ENTITY_KEYWORD"; //$NON-NLS-1$
- public static final String ENTITIES_KEYWORD = regionPrefix + "ENTITIES_KEYWORD"; //$NON-NLS-1$
- public static final String NMTOKEN_KEYWORD = regionPrefix + "NMTOKEN_KEYWORD"; //$NON-NLS-1$
- public static final String NMTOKENS_KEYWORD = regionPrefix + "NMTOKENS_KEYWORD"; //$NON-NLS-1$
- public static final String NOTATION_KEYWORD = regionPrefix + "NOTATION_KEYWORD"; //$NON-NLS-1$
- public static final String ENUM_CHOICE = regionPrefix + "ENUM_CHOICE"; //$NON-NLS-1$
- public static final String PARM_ENTITY_TYPE = regionPrefix + "PARM_ENTITY_TYPE"; //$NON-NLS-1$
-
- // attribute defaults keywords
- public static final String REQUIRED_KEYWORD = regionPrefix + "REQUIRED_KEYWORD"; //$NON-NLS-1$
- public static final String IMPLIED_KEYWORD = regionPrefix + "IMPLIED_KEYWORD"; //$NON-NLS-1$
- public static final String FIXED_KEYWORD = regionPrefix + "FIXED_KEYWORD"; //$NON-NLS-1$
-}// DTDRegionTypes
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/rules/StructuredTextPartitionerForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/rules/StructuredTextPartitionerForDTD.java
deleted file mode 100644
index 725b371d78..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/rules/StructuredTextPartitionerForDTD.java
+++ /dev/null
@@ -1,42 +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.dtd.core.rules;
-
-import org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner;
-
-public class StructuredTextPartitionerForDTD extends StructuredTextPartitioner {
-
- public static final String ST_DTD_DEFAULT = "org.eclipse.wst.dtd.DEFAULT"; //$NON-NLS-1$
-
- public StructuredTextPartitionerForDTD() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#getDefault()
- */
- public String getDefault() {
- return ST_DTD_DEFAULT;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#initLegalContentTypes()
- */
- protected void initLegalContentTypes() {
- fSupportedTypes = new String[]{ST_DTD_DEFAULT, ST_UNKNOWN_PARTITION};
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/DTDTokenizer.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/DTDTokenizer.java
deleted file mode 100644
index ad01b20412..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/DTDTokenizer.java
+++ /dev/null
@@ -1,1428 +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.dtd.core.tokenizer;
-
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-
-
-
-/**
- * This class is a scanner generated by <a href="http://www.jflex.de/">JFlex
- * </a> 1.3.5 on 05/04/02 11:38 AM from the specification file
- * <tt>dtd.flex</tt>
- */
-public class DTDTokenizer {
-
- /** This character denotes the end of file */
- final public static int YYEOF = -1;
-
- /** initial size of the lookahead buffer */
- final private static int YY_BUFFERSIZE = 16384;
- final static String yy_NL = System.getProperty("line.separator");
-
- /** lexical states */
- final public static int ATTRIBUTE_ENUMERATION = 13;
- final public static int NOTATION_NAME = 6;
- final public static int ELEMENT_CHILD = 1;
- final public static int ENTITY_CONTENT = 4;
- final public static int COMMENT_CONTENT = 8;
- final public static int ATTLIST_NAME = 9;
- final public static int EXTERNALID_CONTENT = 7;
- final public static int ELEMENT_CONTENT = 1;
- final public static int ELEMENT_MIXED = 1;
- final public static int ELEMENT_MIXED_OR_CHILD = 1;
- final public static int ATTRIBUTE_CONTENT = 11;
- final public static int ENTITY_NAME = 3;
- final public static int ATTRIBUTE_DEFAULT = 12;
- final public static int ELEMENT_NAME = 2;
- final public static int YYINITIAL = 0;
- final public static int NDATA_CONTENT = 5;
- final public static int ATTLIST_CONTENT = 10;
- final public static int NODE = 1;
-
- /**
- * Translates characters to character classes
- */
- final private static String yycmap_packed = "\10\0\1\0\1\5\1\3\1\0\1\0\1\2\22\0\1\5\1\6" + "\1\1\1\37\1\0\1\23\1\0\1\46\1\42\1\43\1\4\1\7" + "\1\45\1\12\1\0\1\0\12\0\1\0\1\10\1\11\1\0\1\13" + "\1\4\1\0\1\25\1\31\1\32\1\33\1\14\1\35\2\0\1\21" + "\1\0\1\36\1\15\1\16\1\17\1\24\1\27\1\40\1\34\1\26" + "\1\20\1\30\2\0\1\41\1\22\1\0\1\0\1\0\2\0\1\0" + "\1\0\32\0\1\0\1\44\uff83\0";
-
- /**
- * Translates characters to character classes
- */
- final private static char[] yycmap = yy_unpack_cmap(yycmap_packed);
-
- /**
- * Translates a state to a row index in the transition table
- */
- final private static int yy_rowMap[] = {0, 39, 78, 117, 156, 195, 234, 273, 312, 351, 390, 429, 468, 507, 546, 585, 624, 39, 39, 39, 663, 702, 741, 780, 819, 39, 39, 858, 897, 39, 39, 936, 936, 975, 1014, 1053, 1092, 1131, 1170, 1209, 1248, 1287, 1326, 1365, 1404, 1443, 39, 1482, 1521, 1560, 1599, 1638, 39, 1677, 1716, 1755, 1794, 1833, 1872, 39, 39, 1911, 1950, 1989, 2028, 2067, 2106, 39, 39, 39, 2145, 2184, 2223, 2262, 2301, 2340, 2379, 897, 2418, 975, 2457, 2496, 2535, 2574, 975, 2613, 2652, 2691, 2730, 1560, 2769, 2808, 2847, 2886, 2925, 2964, 3003, 3042, 3081, 3120, 1950, 3159, 3198, 3237, 3276, 3315, 1950, 39, 3354, 3393, 3432, 39, 3471, 3510, 3549, 39, 3588, 3627, 39, 3666, 3705, 3744, 39, 39, 3783, 3822, 3861, 3900, 3939, 3978, 4017, 4056, 39, 4095, 4134, 4173, 39, 4212, 4251, 4290, 4329, 4368, 4407, 4446, 4485, 4524, 4563, 4602, 4641, 4680, 4719, 4758, 4797, 4836, 4875, 4914, 4953, 4992, 5031, 5070, 5109, 5148, 5187, 5226, 5265, 5304, 5343, 975, 5382, 5421, 5460, 5499,
- 5538, 5577, 1560, 5616, 5655, 5694, 5733, 5772, 5811, 5850, 546, 5889, 5928, 5967, 6006, 975, 975, 975, 6045, 1560, 6084, 6123, 1560, 6162, 6201, 6240, 1950, 546, 6279, 546, 819, 6318, 6357, 6396, 6435, 6474, 6513, 546, 6552, 1560, 1560, 1560, 1950, 6591, 39, 1950};
-
- /**
- * The packed transition table of the DFA (part 0)
- */
- final private static String yy_packed0 = "\2\17\2\20\1\17\1\20\1\21\1\17\1\22\1\23" + "\1\17\1\24\1\25\2\17\1\26\3\17\1\27\1\17" + "\1\30\21\17\47\0\2\31\2\20\1\32\1\20\1\0" + "\1\32\1\31\1\33\1\31\1\33\23\31\1\34\2\31" + "\1\35\1\36\2\37\1\31\2\40\2\20\1\0\1\20" + "\3\40\1\33\1\40\1\33\7\40\1\41\16\40\4\0" + "\1\40\1\42\1\43\2\20\1\42\1\20\3\42\1\33" + "\1\42\1\33\12\42\1\44\1\45\16\42\1\46\2\47" + "\2\20\1\47\1\20\3\47\1\33\1\47\1\33\33\47" + "\2\50\2\20\1\0\1\20\2\0\1\50\1\33\1\50" + "\1\33\26\50\4\0\1\50\1\42\1\43\2\20\1\42" + "\1\20\3\42\1\33\1\42\1\33\3\42\1\51\6\42" + "\1\52\1\53\16\42\1\46\2\54\2\55\1\54\1\55" + "\4\54\1\56\1\57\33\54\2\60\2\20\1\42\1\20" + "\2\42\1\60\1\33\1\60\1\33\26\60\4\42\1\60" + "\2\61\2\20\1\42\1\20\2\42\1\61\1\33\1\61" + "\1\33\26\61\4\42\1\61\1\62\1\63\1\64\1\65" + "\1\62\1\66\3\62\1\33\1\62\1\33\1\67\2\62" + "\1\70\1\62\1\71\10\62\1\72\4\62\1\73\2\62" + "\1\74\2\75\1\62\1\76\1\77\1\100\2\20\1\77" + "\1\20\3\77\1\33\1\77\1\33\23\77\1\101\6\77"
- + "\1\102\2\103\2\20\1\103\1\20\3\103\1\33\1\103" + "\1\33\26\103\1\104\1\105\1\106\2\103\2\17\2\0" + "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0" + "\23\17\2\0\2\20\1\0\1\20\53\0\1\107\34\0" + "\2\17\2\0\1\17\2\0\1\17\2\0\1\17\1\0" + "\1\17\1\110\1\17\1\111\3\17\1\0\25\17\2\0" + "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0" + "\1\112\22\17\2\113\2\0\1\113\2\0\1\113\2\0" + "\1\113\1\0\7\113\1\0\23\113\2\17\2\0\1\17" + "\2\0\1\17\2\0\1\17\1\0\4\17\1\114\2\17" + "\1\0\23\17\2\31\6\0\1\31\1\0\1\31\1\0" + "\26\31\4\0\3\31\6\0\1\31\1\0\1\31\1\0" + "\13\31\1\115\12\31\4\0\1\31\2\0\2\116\1\0" + "\1\116\31\0\1\117\7\0\2\40\4\0\3\40\1\0" + "\1\40\1\0\26\40\4\0\1\40\2\42\2\0\1\42" + "\1\0\3\42\1\0\1\42\1\0\33\42\1\43\1\120" + "\2\121\1\43\1\121\3\43\1\121\1\43\1\121\33\43" + "\2\42\2\0\1\42\1\0\3\42\1\0\1\42\1\0" + "\6\42\1\122\26\42\2\0\1\42\1\0\3\42\1\0" + "\1\42\1\0\14\42\1\123\16\42\2\46\2\124\1\46" + "\1\124\3\46\1\124\1\46\1\124\32\46\1\125\2\47"
- + "\2\0\1\47\1\0\3\47\1\0\1\47\1\0\33\47" + "\2\50\6\0\1\50\1\0\1\50\1\0\26\50\4\0" + "\1\50\2\42\2\0\1\42\1\0\3\42\1\0\1\42" + "\1\0\17\42\1\126\15\42\2\0\1\42\1\0\3\42" + "\1\0\1\42\1\0\6\42\1\127\26\42\2\0\1\42" + "\1\0\3\42\1\0\1\42\1\0\14\42\1\130\16\42" + "\12\54\2\0\35\54\2\55\1\54\1\55\4\54\2\0" + "\33\54\12\0\1\131\34\0\2\60\2\0\1\42\1\0" + "\2\42\1\60\1\0\1\60\1\0\26\60\4\42\1\60" + "\2\61\2\0\1\42\1\0\2\42\1\61\1\0\1\61" + "\1\0\26\61\4\42\1\61\2\62\2\0\1\62\1\0" + "\3\62\1\0\1\62\1\0\26\62\3\0\2\62\1\63" + "\1\132\2\133\1\63\1\133\3\63\1\133\1\63\1\133" + "\26\63\3\133\2\63\3\0\1\65\50\0\1\66\41\0" + "\2\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0" + "\3\62\1\134\22\62\3\0\4\62\2\0\1\62\1\0" + "\3\62\1\0\1\62\1\0\2\62\1\135\5\62\1\136" + "\15\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0" + "\1\62\1\0\17\62\1\137\6\62\3\0\4\62\2\0" + "\1\62\1\0\3\62\1\0\1\62\1\0\17\62\1\140" + "\6\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0" + "\1\62\1\0\5\62\1\141\12\62\1\142\1\143\4\62"
- + "\3\0\2\62\2\76\2\144\1\76\1\144\3\76\1\144" + "\1\76\1\144\26\76\3\144\1\76\1\132\2\77\2\0" + "\1\77\1\0\3\77\1\0\1\77\1\0\33\77\1\100" + "\1\145\2\146\1\100\1\146\3\100\1\146\1\100\1\146" + "\33\100\2\77\2\0\1\77\1\0\3\77\1\0\1\77" + "\1\0\5\77\1\147\12\77\1\150\1\151\11\77\2\102" + "\2\152\1\102\1\152\3\102\1\152\1\102\1\152\32\102" + "\1\153\2\103\2\0\1\103\1\0\3\103\1\0\1\103" + "\1\0\26\103\3\0\2\103\12\0\1\154\34\0\2\17" + "\2\0\1\17\2\0\1\17\2\0\1\17\1\0\1\155" + "\6\17\1\0\25\17\2\0\1\17\2\0\1\17\2\0" + "\1\17\1\0\4\17\1\156\2\17\1\0\25\17\2\0" + "\1\17\2\0\1\17\2\0\1\17\1\0\4\17\1\157" + "\2\17\1\0\23\17\2\113\2\0\1\113\2\0\1\113" + "\1\160\1\0\1\113\1\0\7\113\1\0\23\113\2\17" + "\2\0\1\17\2\0\1\17\2\0\1\17\1\0\4\17" + "\1\161\2\17\1\0\23\17\2\31\6\0\1\31\1\0" + "\1\31\1\0\16\31\1\162\7\31\4\0\1\31\27\0" + "\1\163\17\0\1\121\1\164\45\121\2\42\2\0\1\42" + "\1\0\3\42\1\0\1\42\1\0\12\42\1\165\22\42" + "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\15\42"
- + "\1\166\15\42\46\124\1\167\2\42\2\0\1\42\1\0" + "\3\42\1\0\1\42\1\0\11\42\1\170\23\42\2\0" + "\1\42\1\0\3\42\1\0\1\42\1\0\12\42\1\171" + "\22\42\2\0\1\42\1\0\3\42\1\0\1\42\1\0" + "\15\42\1\172\15\42\13\0\1\173\33\0\1\133\1\174" + "\45\133\2\62\2\0\1\62\1\0\3\62\1\0\1\62" + "\1\0\4\62\1\175\21\62\3\0\4\62\2\0\1\62" + "\1\0\3\62\1\0\1\62\1\0\4\62\1\176\21\62" + "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62" + "\1\0\4\62\1\177\21\62\3\0\4\62\2\0\1\62" + "\1\0\3\62\1\0\1\62\1\0\20\62\1\200\5\62" + "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62" + "\1\0\11\62\1\201\14\62\3\0\4\62\2\0\1\62" + "\1\0\3\62\1\0\1\62\1\0\2\62\1\202\23\62" + "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62" + "\1\0\1\203\25\62\3\0\4\62\2\0\1\62\1\0" + "\3\62\1\0\1\62\1\0\5\62\1\204\20\62\3\0" + "\2\62\46\144\1\174\1\146\1\205\45\146\2\77\2\0" + "\1\77\1\0\3\77\1\0\1\77\1\0\2\77\1\206" + "\32\77\2\0\1\77\1\0\3\77\1\0\1\77\1\0" + "\1\207\34\77\2\0\1\77\1\0\3\77\1\0\1\77" + "\1\0\5\77\1\210\25\77\46\152\1\211\2\17\2\0"
- + "\1\17\2\0\1\17\2\0\1\17\1\0\2\17\1\212" + "\4\17\1\0\25\17\2\0\1\17\2\0\1\17\2\0" + "\1\17\1\0\5\17\1\213\1\17\1\0\25\17\2\0" + "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0" + "\1\17\1\214\23\17\2\0\1\17\2\0\1\17\2\0" + "\1\17\1\0\1\17\1\215\5\17\1\0\23\17\2\31" + "\6\0\1\31\1\0\1\31\1\0\17\31\1\216\6\31" + "\4\0\1\31\32\0\1\217\14\0\2\42\2\0\1\42" + "\1\0\3\42\1\0\1\42\1\0\4\42\1\220\30\42" + "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\1\42" + "\1\221\33\42\2\0\1\42\1\0\3\42\1\0\1\42" + "\1\0\4\42\1\222\30\42\2\0\1\42\1\0\3\42" + "\1\0\1\42\1\0\4\42\1\223\30\42\2\0\1\42" + "\1\0\3\42\1\0\1\42\1\0\1\42\1\224\31\42" + "\2\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0" + "\5\62\1\225\20\62\3\0\4\62\2\0\1\62\1\0" + "\3\62\1\0\1\62\1\0\10\62\1\226\15\62\3\0" + "\4\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0" + "\11\62\1\227\14\62\3\0\4\62\2\0\1\62\1\0" + "\3\62\1\0\1\62\1\0\1\230\25\62\3\0\4\62" + "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\4\62" + "\1\231\21\62\3\0\4\62\2\0\1\62\1\0\3\62"
- + "\1\0\1\62\1\0\13\62\1\232\12\62\3\0\4\62" + "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\24\62" + "\1\233\1\62\3\0\4\62\2\0\1\62\1\0\3\62" + "\1\0\1\62\1\0\25\62\1\234\3\0\2\62\2\77" + "\2\0\1\77\1\0\3\77\1\0\1\77\1\0\13\77" + "\1\235\21\77\2\0\1\77\1\0\3\77\1\0\1\77" + "\1\0\24\77\1\236\10\77\2\0\1\77\1\0\3\77" + "\1\0\1\77\1\0\25\77\1\237\5\77\2\17\2\0" + "\1\17\2\0\1\17\2\0\1\17\1\0\1\240\6\17" + "\1\0\25\17\2\0\1\17\2\0\1\17\2\0\1\17" + "\1\0\4\17\1\241\2\17\1\0\25\17\2\0\1\17" + "\2\0\1\17\2\0\1\17\1\0\4\17\1\242\2\17" + "\1\0\25\17\2\0\1\17\2\0\1\17\2\0\1\17" + "\1\0\5\17\1\243\1\17\1\0\23\17\2\31\6\0" + "\1\31\1\0\1\31\1\0\11\31\1\244\14\31\4\0" + "\1\31\33\0\1\245\13\0\2\42\2\0\1\42\1\0" + "\3\42\1\0\1\42\1\0\1\246\34\42\2\0\1\42" + "\1\0\3\42\1\0\1\42\1\0\5\42\1\247\27\42" + "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\11\42" + "\1\250\23\42\2\0\1\42\1\0\3\42\1\0\1\42" + "\1\0\1\251\34\42\2\0\1\42\1\0\3\42\1\0" + "\1\42\1\0\5\42\1\252\25\42\2\62\2\0\1\62"
- + "\1\0\3\62\1\0\1\62\1\0\4\62\1\253\21\62" + "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62" + "\1\0\22\62\1\254\3\62\3\0\4\62\2\0\1\62" + "\1\0\3\62\1\0\1\62\1\0\4\62\1\255\21\62" + "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62" + "\1\0\21\62\1\256\4\62\3\0\4\62\2\0\1\62" + "\1\0\3\62\1\0\1\62\1\0\11\62\1\257\14\62" + "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62" + "\1\0\1\62\1\260\24\62\3\0\4\62\2\0\1\62" + "\1\0\3\62\1\0\1\62\1\0\14\62\1\261\11\62" + "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62" + "\1\0\1\262\25\62\3\0\2\62\2\77\2\0\1\77" + "\1\0\3\77\1\0\1\77\1\0\1\77\1\263\33\77" + "\2\0\1\77\1\0\3\77\1\0\1\77\1\0\14\77" + "\1\264\20\77\2\0\1\77\1\0\3\77\1\0\1\77" + "\1\0\1\265\32\77\2\17\2\0\1\17\2\0\1\17" + "\2\0\1\17\1\0\3\17\1\266\3\17\1\0\25\17" + "\2\0\1\17\2\0\1\17\2\0\1\17\1\0\6\17" + "\1\267\1\0\25\17\2\0\1\17\2\0\1\17\2\0" + "\1\17\1\0\5\17\1\270\1\17\1\0\25\17\2\0" + "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0" + "\2\17\1\271\20\17\2\31\6\0\1\31\1\0\1\31"
- + "\1\0\4\31\1\272\21\31\4\0\1\31\25\0\1\273" + "\21\0\2\42\2\0\1\42\1\0\3\42\1\0\1\42" + "\1\0\2\42\1\274\32\42\2\0\1\42\1\0\3\42" + "\1\0\1\42\1\0\16\42\1\274\16\42\2\0\1\42" + "\1\0\3\42\1\0\1\42\1\0\2\42\1\275\32\42" + "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\16\42" + "\1\276\14\42\2\62\2\0\1\62\1\0\3\62\1\0" + "\1\62\1\0\5\62\1\277\1\300\17\62\3\0\4\62" + "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\1\301" + "\25\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0" + "\1\62\1\0\5\62\1\302\20\62\3\0\4\62\2\0" + "\1\62\1\0\3\62\1\0\1\62\1\0\12\62\1\303" + "\13\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0" + "\1\62\1\0\5\62\1\234\20\62\3\0\4\62\2\0" + "\1\62\1\0\3\62\1\0\1\62\1\0\5\62\1\304" + "\20\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0" + "\1\62\1\0\17\62\1\132\6\62\3\0\2\62\2\77" + "\2\0\1\77\1\0\3\77\1\0\1\77\1\0\5\77" + "\1\305\27\77\2\0\1\77\1\0\3\77\1\0\1\77" + "\1\0\5\77\1\306\27\77\2\0\1\77\1\0\3\77" + "\1\0\1\77\1\0\17\77\1\307\13\77\2\17\2\0" + "\1\17\2\0\1\17\2\0\1\17\1\0\4\17\1\310"
- + "\2\17\1\0\25\17\2\0\1\17\2\0\1\17\2\0" + "\1\17\1\0\7\17\1\0\1\311\24\17\2\0\1\17" + "\2\0\1\17\2\0\1\17\1\0\4\17\1\312\2\17" + "\1\0\23\17\2\31\6\0\1\31\1\0\1\31\1\0" + "\11\31\1\313\14\31\4\0\1\31\20\0\1\314\26\0" + "\2\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0" + "\1\315\25\62\3\0\4\62\2\0\1\62\1\0\3\62" + "\1\0\1\62\1\0\3\62\1\316\22\62\3\0\4\62" + "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\10\62" + "\1\317\15\62\3\0\4\62\2\0\1\62\1\0\3\62" + "\1\0\1\62\1\0\20\62\1\234\5\62\3\0\2\62" + "\2\77\2\0\1\77\1\0\3\77\1\0\1\77\1\0" + "\1\320\34\77\2\0\1\77\1\0\3\77\1\0\1\77" + "\1\0\20\77\1\321\12\77\2\17\2\0\1\17\2\0" + "\1\17\2\0\1\17\1\0\3\17\1\322\3\17\1\0" + "\23\17\25\0\1\323\21\0\2\62\2\0\1\62\1\0" + "\3\62\1\0\1\62\1\0\12\62\1\324\13\62\3\0" + "\4\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0" + "\12\62\1\325\13\62\3\0\4\62\2\0\1\62\1\0" + "\3\62\1\0\1\62\1\0\3\62\1\326\22\62\3\0" + "\2\62\2\77\2\0\1\77\1\0\3\77\1\0\1\77" + "\1\0\17\77\1\327\15\77\2\0\1\77\1\0\3\77"
- + "\1\0\1\77\1\0\1\330\32\77\2\0\2\323\1\0" + "\1\323\35\0\1\331\3\0\2\77\2\0\1\77\1\0" + "\3\77\1\0\1\77\1\0\17\77\1\332\13\77";
-
- /**
- * The transition table of the DFA
- */
- final private static int yytrans[] = yy_unpack();
-
-
- /* error codes */
- final private static int YY_UNKNOWN_ERROR = 0;
- final static int YY_ILLEGAL_STATE = 1;
- final private static int YY_NO_MATCH = 2;
- final private static int YY_PUSHBACK_2BIG = 3;
-
- /* error messages for the codes above */
- final private static String YY_ERROR_MSG[] = {"Unkown internal scanner error", "Internal error: unknown state", "Error: could not match input", "Error: pushback value was too large"};
-
- /**
- * YY_ATTRIBUTE[aState] contains the attributes of state
- * <code>aState</code>
- */
- private final static byte YY_ATTRIBUTE[] = {0, 8, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 1, 1, 1, 1, 1, 9, 9, 1, 1, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 9, 1, 1, 1, 1, 1, 1, 9, 9, 9, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 9, 1, 1, 1, 9, 1, 1, 0, 9, 1, 1, 9, 1, 1, 1, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 9, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 9, 1};
-
- /** the input device */
- private java.io.Reader yy_reader;
-
- /** the current state of the DFA */
- private int yy_state;
-
- /** the current lexical state */
- private int yy_lexical_state = YYINITIAL;
-
- /**
- * this buffer contains the current text to be matched and is the source
- * of the yytext() string
- */
- private char yy_buffer[] = new char[YY_BUFFERSIZE];
-
- /** the textposition at the last accepting state */
- private int yy_markedPos;
-
- /** the textposition at the last state to be included in yytext */
- private int yy_pushbackPos;
-
- /** the current text position in the buffer */
- private int yy_currentPos;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int yy_startRead;
-
- /**
- * endRead marks the last character in the buffer, that has been read from
- * input
- */
- private int yy_endRead;
-
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
-
- /** the number of characters up to the start of the matched text */
- private int yychar;
-
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- int yycolumn;
-
- /**
- * yy_atBOL == true <=>the scanner is currently at the beginning of a
- * line
- */
- boolean yy_atBOL = true;
-
- /** yy_atEOF == true <=>the scanner is at the EOF */
- private boolean yy_atEOF;
-
- /* user code: */
- int node_count = 0;
- String currentString;
-
- private Token createToken(String type) {
- return new Token(type, yytext(), yyline, yychar + startOffset, yylength());
- }
-
- private int startOffset = 0;
-
- public void setStartOffset(int startOffset) {
- this.startOffset = startOffset;
- }
-
- public void setLine(int line) {
- this.yyline = line;
- }
-
-
- /**
- * Creates a new scanner There is also a java.io.InputStream version of
- * this constructor.
- *
- * @param in
- * the java.io.Reader to read input from.
- */
- public DTDTokenizer(java.io.Reader in) {
- this.yy_reader = in;
- }
-
- /**
- * Creates a new scanner. There is also java.io.Reader version of this
- * constructor.
- *
- * @param in
- * the java.io.Inputstream to read input from.
- */
- public DTDTokenizer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the split, compressed DFA transition table.
- *
- * @return the unpacked transition table
- */
- private static int[] yy_unpack() {
- int[] trans = new int[6630];
- int offset = 0;
- offset = yy_unpack(yy_packed0, offset, trans);
- return trans;
- }
-
- /**
- * Unpacks the compressed DFA transition table.
- *
- * @param packed
- * the packed transition table
- * @return the index of the last entry
- */
- private static int yy_unpack(String packed, int offset, int[] trans) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- value--;
- do
- trans[j++] = value;
- while (--count > 0);
- }
- return j;
- }
-
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed
- * the packed character translation table
- * @return the unpacked character translation table
- */
- private static char[] yy_unpack_cmap(String packed) {
- char[] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 130) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do
- map[j++] = value;
- while (--count > 0);
- }
- return map;
- }
-
-
- /**
- * Refills the input buffer.
- *
- * @return <code>false</code>, iff there was new input.
- *
- * @exception java.io.IOException
- * if any I/O-Error occurs
- */
- private boolean yy_refill() throws java.io.IOException {
-
- /* first: make room (if you can) */
- if (yy_startRead > 0) {
- System.arraycopy(yy_buffer, yy_startRead, yy_buffer, 0, yy_endRead - yy_startRead);
-
- /* translate stored positions */
- yy_endRead -= yy_startRead;
- yy_currentPos -= yy_startRead;
- yy_markedPos -= yy_startRead;
- yy_pushbackPos -= yy_startRead;
- yy_startRead = 0;
- }
-
- /* is the buffer big enough? */
- if (yy_currentPos >= yy_buffer.length) {
- /* if not: blow it up */
- char newBuffer[] = new char[yy_currentPos * 2];
- System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length);
- yy_buffer = newBuffer;
- }
-
- /* finally: fill the buffer with new input */
- int numRead = yy_reader.read(yy_buffer, yy_endRead, yy_buffer.length - yy_endRead);
-
- if (numRead < 0) {
- return true;
- } else {
- yy_endRead += numRead;
- return false;
- }
- }
-
-
- /**
- * Closes the input stream.
- */
- final public void yyclose() throws java.io.IOException {
- yy_atEOF = true; /* indicate end of file */
- yy_endRead = yy_startRead; /* invalidate buffer */
-
- if (yy_reader != null)
- yy_reader.close();
- }
-
-
- /**
- * Closes the current stream, and resets the scanner to read from a new
- * input stream.
- *
- * All internal variables are reset, the old input stream <b>cannot </b>
- * be reused (internal buffer is discarded and lost). Lexical state is set
- * to <tt>YY_INITIAL</tt>.
- *
- * @param reader
- * the new input stream
- */
- final public void yyreset(java.io.Reader reader) throws java.io.IOException {
- yyclose();
- yy_reader = reader;
- yy_atBOL = true;
- yy_atEOF = false;
- yy_endRead = yy_startRead = 0;
- yy_currentPos = yy_markedPos = yy_pushbackPos = 0;
- yyline = yychar = yycolumn = 0;
- yy_lexical_state = YYINITIAL;
- }
-
-
- /**
- * Returns the current lexical state.
- */
- final public int yystate() {
- return yy_lexical_state;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState
- * the new lexical state
- */
- final public void yybegin(int newState) {
- yy_lexical_state = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- final public String yytext() {
- return new String(yy_buffer, yy_startRead, yy_markedPos - yy_startRead);
- }
-
-
- /**
- * Returns the character at position <tt>pos</tt> from the matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos
- * the position of the character to fetch. A value from 0 to
- * yylength()-1.
- *
- * @return the character at position pos
- */
- final public char yycharat(int pos) {
- return yy_buffer[yy_startRead + pos];
- }
-
-
- /**
- * Returns the length of the matched text region.
- */
- final public int yylength() {
- return yy_markedPos - yy_startRead;
- }
-
-
- /**
- * Reports an error that occured while scanning.
- *
- * In a wellformed scanner (no or only correct usage of yypushback(int)
- * and a match-all fallback rule) this method will only be called with
- * things that "Can't Possibly Happen". If this method is called,
- * something is seriously wrong (e.g. a JFlex bug producing a faulty
- * scanner etc.).
- *
- * Usual syntax/scanner level error handling should be done in error
- * fallback rules.
- *
- * @param errorCode
- * the code of the errormessage to display
- */
- private void yy_ScanError(int errorCode) {
- String message;
- try {
- message = YY_ERROR_MSG[errorCode];
- } catch (ArrayIndexOutOfBoundsException e) {
- message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];
- }
-
- throw new Error(message);
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number
- * the number of characters to be read again. This number must
- * not be greater than yylength()!
- */
- private void yypushback(int number) {
- if (number > yylength())
- yy_ScanError(YY_PUSHBACK_2BIG);
-
- yy_markedPos -= number;
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched, the end
- * of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception IOException
- * if any I/O-Error occurs
- */
- public Yytoken yylex() throws java.io.IOException {
- int yy_input;
- int yy_action;
-
- // cached fields:
- int yy_currentPos_l;
- int yy_startRead_l;
- int yy_markedPos_l;
- int yy_endRead_l = yy_endRead;
- char[] yy_buffer_l = yy_buffer;
- char[] yycmap_l = yycmap;
-
- int[] yytrans_l = yytrans;
- int[] yy_rowMap_l = yy_rowMap;
- byte[] yy_attr_l = YY_ATTRIBUTE;
-
- while (true) {
- yy_markedPos_l = yy_markedPos;
-
- yychar += yy_markedPos_l - yy_startRead;
-
- boolean yy_r = false;
- for (yy_currentPos_l = yy_startRead; yy_currentPos_l < yy_markedPos_l; yy_currentPos_l++) {
- switch (yy_buffer_l[yy_currentPos_l]) {
- case '\u000B' :
- case '\u000C' :
- case '\u0085' :
- case '\u2028' :
- case '\u2029' :
- yyline++;
- yy_r = false;
- break;
- case '\r' :
- yyline++;
- yy_r = true;
- break;
- case '\n' :
- if (yy_r)
- yy_r = false;
- else {
- yyline++;
- }
- break;
- default :
- yy_r = false;
- }
- }
-
- if (yy_r) {
- // peek one character ahead if it is \n (if we have counted
- // one line too much)
- boolean yy_peek;
- if (yy_markedPos_l < yy_endRead_l)
- yy_peek = yy_buffer_l[yy_markedPos_l] == '\n';
- else if (yy_atEOF)
- yy_peek = false;
- else {
- boolean eof = yy_refill();
- yy_markedPos_l = yy_markedPos;
- yy_buffer_l = yy_buffer;
- if (eof)
- yy_peek = false;
- else
- yy_peek = yy_buffer_l[yy_markedPos_l] == '\n';
- }
- if (yy_peek)
- yyline--;
- }
- yy_action = -1;
-
- yy_startRead_l = yy_currentPos_l = yy_currentPos = yy_startRead = yy_markedPos_l;
-
- yy_state = yy_lexical_state;
-
-
- yy_forAction : {
- while (true) {
-
- if (yy_currentPos_l < yy_endRead_l)
- yy_input = yy_buffer_l[yy_currentPos_l++];
- else if (yy_atEOF) {
- yy_input = YYEOF;
- break yy_forAction;
- } else {
- // store back cached positions
- yy_currentPos = yy_currentPos_l;
- yy_markedPos = yy_markedPos_l;
- boolean eof = yy_refill();
- // get translated positions and possibly new buffer
- yy_currentPos_l = yy_currentPos;
- yy_markedPos_l = yy_markedPos;
- yy_buffer_l = yy_buffer;
- yy_endRead_l = yy_endRead;
- if (eof) {
- yy_input = YYEOF;
- break yy_forAction;
- } else {
- yy_input = yy_buffer_l[yy_currentPos_l++];
- }
- }
- int yy_next = yytrans_l[yy_rowMap_l[yy_state] + yycmap_l[yy_input]];
- if (yy_next == -1)
- break yy_forAction;
- yy_state = yy_next;
-
- int yy_attributes = yy_attr_l[yy_state];
- if ((yy_attributes & 1) == 1) {
- yy_action = yy_state;
- yy_markedPos_l = yy_currentPos_l;
- if ((yy_attributes & 8) == 8)
- break yy_forAction;
- }
-
- }
- }
-
- // store back cached position
- yy_markedPos = yy_markedPos_l;
-
- switch (yy_action) {
-
- case 26 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [197] { yypushback(yylength());
- // yybegin(YYINITIAL); }");
- {
- yypushback(yylength());
- yybegin(YYINITIAL);
- }
- case 219 :
- break;
- case 89 :
- case 123 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [231] { yypushback(yylength());
- // yybegin(ATTRIBUTE_DEFAULT); }");
- {
- yypushback(yylength());
- yybegin(ATTRIBUTE_DEFAULT);
- }
- case 220 :
- break;
- case 12 :
- case 62 :
- case 63 :
- case 64 :
- case 65 :
- case 102 :
- case 103 :
- case 104 :
- case 133 :
- case 134 :
- case 135 :
- case 156 :
- case 157 :
- case 158 :
- case 178 :
- case 179 :
- case 180 :
- case 196 :
- case 197 :
- case 207 :
- case 208 :
- case 215 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [247] { yypushback(yylength());
- // yybegin(ATTLIST_CONTENT); }");
- {
- yypushback(yylength());
- yybegin(ATTLIST_CONTENT);
- }
- case 221 :
- break;
- case 51 :
- case 52 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [217] { yypushback(yylength());
- // yybegin(ATTLIST_CONTENT); }");
- {
- yypushback(yylength());
- yybegin(ATTLIST_CONTENT);
- }
- case 222 :
- break;
- case 205 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [227] {
- // yybegin(ATTRIBUTE_DEFAULT); return
- // createToken(DTDRegionTypes.NMTOKEN_KEYWORD); }");
- {
- yybegin(ATTRIBUTE_DEFAULT);
- return createToken(DTDRegionTypes.NMTOKEN_KEYWORD);
- }
- case 223 :
- break;
- case 194 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [224] {
- // yybegin(ATTRIBUTE_DEFAULT); return
- // createToken(DTDRegionTypes.IDREFS_KEYWORD); }");
- {
- yybegin(ATTRIBUTE_DEFAULT);
- return createToken(DTDRegionTypes.IDREFS_KEYWORD);
- }
- case 224 :
- break;
- case 191 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [225] {
- // yybegin(ATTRIBUTE_DEFAULT); return
- // createToken(DTDRegionTypes.ENTITY_KEYWORD); }");
- {
- yybegin(ATTRIBUTE_DEFAULT);
- return createToken(DTDRegionTypes.ENTITY_KEYWORD);
- }
- case 225 :
- break;
- case 107 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [174] {
- // yybegin(COMMENT_CONTENT); return
- // createToken(DTDRegionTypes.COMMENT_START); }");
- {
- yybegin(COMMENT_CONTENT);
- return createToken(DTDRegionTypes.COMMENT_START);
- }
- case 226 :
- break;
- case 48 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [211] {
- // yybegin(ATTRIBUTE_CONTENT); return
- // createToken(DTDRegionTypes.ATTRIBUTE_NAME); }");
- {
- yybegin(ATTRIBUTE_CONTENT);
- return createToken(DTDRegionTypes.ATTRIBUTE_NAME);
- }
- case 227 :
- break;
- case 39 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [283] {
- // yybegin(EXTERNALID_CONTENT); return
- // createToken(DTDRegionTypes.NAME); }");
- {
- yybegin(EXTERNALID_CONTENT);
- return createToken(DTDRegionTypes.NAME);
- }
- case 228 :
- break;
- case 106 :
- case 136 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [245] {
- // yybegin(ATTLIST_CONTENT); return
- // createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); }");
- {
- yybegin(ATTLIST_CONTENT);
- return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL);
- }
- case 229 :
- break;
- case 100 :
- case 132 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [246] {
- // yybegin(ATTLIST_CONTENT); return
- // createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); }");
- {
- yybegin(ATTLIST_CONTENT);
- return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL);
- }
- case 230 :
- break;
- case 202 :
- case 216 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [189] { return
- // createToken(DTDRegionTypes.CONTENT_PCDATA); }");
- {
- return createToken(DTDRegionTypes.CONTENT_PCDATA);
- }
- case 231 :
- break;
- case 189 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [290] { return
- // createToken(DTDRegionTypes.PUBLIC_KEYWORD); }");
- {
- return createToken(DTDRegionTypes.PUBLIC_KEYWORD);
- }
- case 232 :
- break;
- case 188 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [289] { return
- // createToken(DTDRegionTypes.SYSTEM_KEYWORD); }");
- {
- return createToken(DTDRegionTypes.SYSTEM_KEYWORD);
- }
- case 233 :
- break;
- case 14 :
- case 20 :
- case 21 :
- case 23 :
- case 71 :
- case 72 :
- case 73 :
- case 75 :
- case 108 :
- case 109 :
- case 110 :
- case 112 :
- case 137 :
- case 138 :
- case 139 :
- case 140 :
- case 159 :
- case 160 :
- case 161 :
- case 162 :
- case 181 :
- case 183 :
- case 184 :
- case 200 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [182] { return
- // createToken(DTDRegionTypes.UNKNOWN_CONTENT); }");
- {
- return createToken(DTDRegionTypes.UNKNOWN_CONTENT);
- }
- case 234 :
- break;
- case 4 :
- case 33 :
- case 34 :
- case 35 :
- case 36 :
- case 37 :
- case 81 :
- case 82 :
- case 116 :
- case 117 :
- case 143 :
- case 144 :
- case 165 :
- case 166 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [275] { return
- // createToken(DTDRegionTypes.UNKNOWN_CONTENT); }");
- {
- return createToken(DTDRegionTypes.UNKNOWN_CONTENT);
- }
- case 235 :
- break;
- case 7 :
- case 40 :
- case 41 :
- case 42 :
- case 85 :
- case 86 :
- case 87 :
- case 119 :
- case 120 :
- case 121 :
- case 145 :
- case 146 :
- case 147 :
- case 168 :
- case 169 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [294] { return
- // createToken(DTDRegionTypes.UNKNOWN_CONTENT); }");
- {
- return createToken(DTDRegionTypes.UNKNOWN_CONTENT);
- }
- case 236 :
- break;
- case 9 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [205] { return
- // createToken(DTDRegionTypes.UNKNOWN_CONTENT); }");
- {
- return createToken(DTDRegionTypes.UNKNOWN_CONTENT);
- }
- case 237 :
- break;
- case 10 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [212] { return
- // createToken(DTDRegionTypes.UNKNOWN_CONTENT); }");
- {
- return createToken(DTDRegionTypes.UNKNOWN_CONTENT);
- }
- case 238 :
- break;
- case 43 :
- case 45 :
- case 46 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [309] { return
- // createToken(DTDRegionTypes.COMMENT_CONTENT); }");
- {
- return createToken(DTDRegionTypes.COMMENT_CONTENT);
- }
- case 239 :
- break;
- case 60 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [236] { return
- // createToken(DTDRegionTypes.UNKNOWN_CONTENT); }");
- {
- return createToken(DTDRegionTypes.UNKNOWN_CONTENT);
- }
- case 240 :
- break;
- case 198 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [244] { return
- // createToken(DTDRegionTypes.FIXED_KEYWORD); }");
- {
- return createToken(DTDRegionTypes.FIXED_KEYWORD);
- }
- case 241 :
- break;
- case 214 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [243] {
- // yybegin(ATTLIST_CONTENT); return
- // createToken(DTDRegionTypes.IMPLIED_KEYWORD); }");
- {
- yybegin(ATTLIST_CONTENT);
- return createToken(DTDRegionTypes.IMPLIED_KEYWORD);
- }
- case 242 :
- break;
- case 212 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [228] {
- // yybegin(ATTRIBUTE_DEFAULT); return
- // createToken(DTDRegionTypes.NMTOKENS_KEYWORD); }");
- {
- yybegin(ATTRIBUTE_DEFAULT);
- return createToken(DTDRegionTypes.NMTOKENS_KEYWORD);
- }
- case 243 :
- break;
- case 211 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [226] {
- // yybegin(ATTRIBUTE_DEFAULT); return
- // createToken(DTDRegionTypes.ENTITIES_KEYWORD); }");
- {
- yybegin(ATTRIBUTE_DEFAULT);
- return createToken(DTDRegionTypes.ENTITIES_KEYWORD);
- }
- case 244 :
- break;
- case 209 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [176] { yybegin(NOTATION_NAME);
- // return createToken(DTDRegionTypes.NOTATION_TAG); }");
- {
- yybegin(NOTATION_NAME);
- return createToken(DTDRegionTypes.NOTATION_TAG);
- }
- case 245 :
- break;
- case 201 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [177] { yybegin(ATTLIST_NAME);
- // return createToken(DTDRegionTypes.ATTLIST_TAG); }");
- {
- yybegin(ATTLIST_NAME);
- return createToken(DTDRegionTypes.ATTLIST_TAG);
- }
- case 246 :
- break;
- case 199 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [173] { yybegin(ELEMENT_NAME);
- // return createToken(DTDRegionTypes.ELEMENT_TAG); }");
- {
- yybegin(ELEMENT_NAME);
- return createToken(DTDRegionTypes.ELEMENT_TAG);
- }
- case 247 :
- break;
- case 182 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [175] { yybegin(ENTITY_NAME);
- // return createToken(DTDRegionTypes.ENTITY_TAG); }");
- {
- yybegin(ENTITY_NAME);
- return createToken(DTDRegionTypes.ENTITY_TAG);
- }
- case 248 :
- break;
- case 167 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [293] { yybegin(NDATA_CONTENT);
- // return createToken(DTDRegionTypes.NDATA_KEYWORD); }");
- {
- yybegin(NDATA_CONTENT);
- return createToken(DTDRegionTypes.NDATA_KEYWORD);
- }
- case 249 :
- break;
- case 111 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [179] { return
- // createToken(DTDRegionTypes.ENTITY_PARM); }");
- {
- return createToken(DTDRegionTypes.ENTITY_PARM);
- }
- case 250 :
- break;
- case 94 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [222] {
- // yybegin(ATTRIBUTE_DEFAULT); return
- // createToken(DTDRegionTypes.ID_KEYWORD); }");
- {
- yybegin(ATTRIBUTE_DEFAULT);
- return createToken(DTDRegionTypes.ID_KEYWORD);
- }
- case 251 :
- break;
- case 25 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [194] { return
- // createToken(DTDRegionTypes.OCCUR_TYPE); }");
- {
- return createToken(DTDRegionTypes.OCCUR_TYPE);
- }
- case 252 :
- break;
- case 16 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [169] { return
- // createToken(DTDRegionTypes.EXCLAMATION); }");
- {
- return createToken(DTDRegionTypes.EXCLAMATION);
- }
- case 253 :
- break;
- case 15 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [184] { return
- // createToken(DTDRegionTypes.WHITESPACE); }");
- {
- return createToken(DTDRegionTypes.WHITESPACE);
- }
- case 254 :
- break;
- case 11 :
- case 49 :
- case 50 :
- case 54 :
- case 55 :
- case 56 :
- case 57 :
- case 58 :
- case 61 :
- case 91 :
- case 92 :
- case 93 :
- case 95 :
- case 96 :
- case 97 :
- case 98 :
- case 124 :
- case 125 :
- case 126 :
- case 127 :
- case 128 :
- case 129 :
- case 130 :
- case 131 :
- case 148 :
- case 149 :
- case 150 :
- case 151 :
- case 152 :
- case 153 :
- case 154 :
- case 155 :
- case 170 :
- case 171 :
- case 172 :
- case 175 :
- case 176 :
- case 177 :
- case 190 :
- case 192 :
- case 193 :
- case 195 :
- case 204 :
- case 206 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [235] {
- // yybegin(ATTRIBUTE_DEFAULT); return
- // createToken(DTDRegionTypes.PARM_ENTITY_TYPE); }");
- {
- yybegin(ATTRIBUTE_DEFAULT);
- return createToken(DTDRegionTypes.PARM_ENTITY_TYPE);
- }
- case 255 :
- break;
- case 28 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [192] { return
- // createToken(DTDRegionTypes.LEFT_PAREN); }");
- {
- return createToken(DTDRegionTypes.LEFT_PAREN);
- }
- case 256 :
- break;
- case 29 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [195] { return
- // createToken(DTDRegionTypes.RIGHT_PAREN); }");
- {
- return createToken(DTDRegionTypes.RIGHT_PAREN);
- }
- case 257 :
- break;
- case 44 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [308] { return
- // createToken(DTDRegionTypes.WHITESPACE); }");
- {
- return createToken(DTDRegionTypes.WHITESPACE);
- }
- case 258 :
- break;
- case 53 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [218] { return
- // createToken(DTDRegionTypes.WHITESPACE); }");
- {
- return createToken(DTDRegionTypes.WHITESPACE);
- }
- case 259 :
- break;
- case 59 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [234] { yypushback(yylength());
- // yybegin(ATTRIBUTE_ENUMERATION); }");
- {
- yypushback(yylength());
- yybegin(ATTRIBUTE_ENUMERATION);
- }
- case 260 :
- break;
- case 67 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [253] { return
- // createToken(DTDRegionTypes.LEFT_PAREN); }");
- {
- return createToken(DTDRegionTypes.LEFT_PAREN);
- }
- case 261 :
- break;
- case 68 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [255] {
- // yybegin(ATTRIBUTE_DEFAULT); return
- // createToken(DTDRegionTypes.RIGHT_PAREN); }");
- {
- yybegin(ATTRIBUTE_DEFAULT);
- return createToken(DTDRegionTypes.RIGHT_PAREN);
- }
- case 262 :
- break;
- case 69 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [254] { return
- // createToken(DTDRegionTypes.ENUM_CHOICE); }");
- {
- return createToken(DTDRegionTypes.ENUM_CHOICE);
- }
- case 263 :
- break;
- case 31 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [265] { yybegin(ENTITY_CONTENT);
- // return createToken(DTDRegionTypes.NAME); }");
- {
- yybegin(ENTITY_CONTENT);
- return createToken(DTDRegionTypes.NAME);
- }
- case 264 :
- break;
- case 47 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [204] {
- // yybegin(ATTLIST_CONTENT); return
- // createToken(DTDRegionTypes.NAME); }");
- {
- yybegin(ATTLIST_CONTENT);
- return createToken(DTDRegionTypes.NAME);
- }
- case 265 :
- break;
- case 187 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [272] { yypushback(yylength());
- // yybegin(EXTERNALID_CONTENT); }");
- {
- yypushback(yylength());
- yybegin(EXTERNALID_CONTENT);
- }
- case 266 :
- break;
- case 213 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [229] {
- // yybegin(ATTRIBUTE_ENUMERATION); return
- // createToken(DTDRegionTypes.NOTATION_KEYWORD); }");
- {
- yybegin(ATTRIBUTE_ENUMERATION);
- return createToken(DTDRegionTypes.NOTATION_KEYWORD);
- }
- case 267 :
- break;
- case 174 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [220] {
- // yybegin(ATTRIBUTE_DEFAULT); return
- // createToken(DTDRegionTypes.CDATA_KEYWORD); }");
- {
- yybegin(ATTRIBUTE_DEFAULT);
- return createToken(DTDRegionTypes.CDATA_KEYWORD);
- }
- case 268 :
- break;
- case 173 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [223] {
- // yybegin(ATTRIBUTE_DEFAULT); return
- // createToken(DTDRegionTypes.IDREF_KEYWORD); }");
- {
- yybegin(ATTRIBUTE_DEFAULT);
- return createToken(DTDRegionTypes.IDREF_KEYWORD);
- }
- case 269 :
- break;
- case 217 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [242] {
- // yybegin(ATTLIST_CONTENT); return
- // createToken(DTDRegionTypes.REQUIRED_KEYWORD); }");
- {
- yybegin(ATTLIST_CONTENT);
- return createToken(DTDRegionTypes.REQUIRED_KEYWORD);
- }
- case 270 :
- break;
- case 122 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [307] { yybegin(YYINITIAL);
- // return createToken(DTDRegionTypes.COMMENT_END); }");
- {
- yybegin(YYINITIAL);
- return createToken(DTDRegionTypes.COMMENT_END);
- }
- case 271 :
- break;
- case 84 :
- case 118 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [273] { return
- // createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); }");
- {
- return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL);
- }
- case 272 :
- break;
- case 79 :
- case 115 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [274] { return
- // createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); }");
- {
- return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL);
- }
- case 273 :
- break;
- case 24 :
- case 27 :
- case 76 :
- case 113 :
- case 141 :
- case 163 :
- case 185 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [190] { return
- // createToken(DTDRegionTypes.NAME); }");
- {
- return createToken(DTDRegionTypes.NAME);
- }
- case 274 :
- break;
- case 5 :
- case 38 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [300] { yybegin(YYINITIAL);
- // return createToken(DTDRegionTypes.NDATA_VALUE); }");
- {
- yybegin(YYINITIAL);
- return createToken(DTDRegionTypes.NDATA_VALUE);
- }
- case 275 :
- break;
- case 13 :
- case 66 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [256] { return
- // createToken(DTDRegionTypes.NAME); }");
- {
- return createToken(DTDRegionTypes.NAME);
- }
- case 276 :
- break;
- case 18 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [167] { return
- // createToken(DTDRegionTypes.START_TAG); }");
- {
- return createToken(DTDRegionTypes.START_TAG);
- }
- case 277 :
- break;
- case 17 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [171] { return
- // createToken(DTDRegionTypes.SEMICOLON); }");
- {
- return createToken(DTDRegionTypes.SEMICOLON);
- }
- case 278 :
- break;
- case 30 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [193] { return
- // createToken(DTDRegionTypes.CONNECTOR); }");
- {
- return createToken(DTDRegionTypes.CONNECTOR);
- }
- case 279 :
- break;
- case 22 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [170] { return
- // createToken(DTDRegionTypes.PERCENT); }");
- {
- return createToken(DTDRegionTypes.PERCENT);
- }
- case 280 :
- break;
- case 19 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [168] { return
- // createToken(DTDRegionTypes.END_TAG); }");
- {
- return createToken(DTDRegionTypes.END_TAG);
- }
- case 281 :
- break;
- case 32 :
- //System.out.println("line: "+(yyline+1)+" "+"match:
- // --"+yytext()+"--");
- //System.out.println("action [264] { return
- // createToken(DTDRegionTypes.PERCENT); }");
- {
- return createToken(DTDRegionTypes.PERCENT);
- }
- case 282 :
- break;
- default :
- if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
- yy_atEOF = true;
- return null;
- } else {
- yy_ScanError(YY_NO_MATCH);
- }
- }
- }
- }
-
- /**
- * Runs the scanner on input files.
- *
- * This main method is the debugging routine for the scanner. It prints
- * debugging information about each returned token to System.out until the
- * end of file is reached, or an error occured.
- *
- * @param argv
- * the command line, contains the filenames to run the scanner
- * on.
- */
- public static void main(String argv[]) {
- if (argv.length == 0) {
- System.out.println("Usage : java DTDTokenizer <inputfile>");
- } else {
- for (int i = 0; i < argv.length; i++) {
- DTDTokenizer scanner = null;
- try {
- scanner = new DTDTokenizer(new java.io.FileReader(argv[i]));
- do {
- System.out.println(scanner.yylex());
- } while (!scanner.yy_atEOF);
-
- } catch (java.io.FileNotFoundException e) {
- System.out.println("File not found : \"" + argv[i] + "\"");
- } catch (java.io.IOException e) {
- System.out.println("IO error scanning file \"" + argv[i] + "\"");
- System.out.println(e);
- } catch (Exception e) {
- System.out.println("Unexpected exception:");
- e.printStackTrace();
- }
- }
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/Token.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/Token.java
deleted file mode 100644
index 4c8072d15e..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/Token.java
+++ /dev/null
@@ -1,61 +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.dtd.core.tokenizer;
-
-public class Token extends Yytoken {
- public static final int COMMENT_START = 9;
- public static final int CONNECTOR = 6;
- public static final int CONTENT_ANY = 43;
- public static final int CONTENT_EMPTY = 42;
- public static final int CONTENT_PCDATA = 44;
- public static final int ELEMENT_CONTENT = 41;
-
- public static final int ELEMENT_TAG = 40;
- public static final int END_TAG = 2;
- public static final int ENTITY_CONTENT = 32;
- public static final int ENTITY_PARM = 31;
-
- public static final int ENTITY_TAG = 30;
- public static final int EXCLAMATION = 8;
- public static final int LEFT_PAREN = 3;
- public static final int NAME = 0;
- public static final int NOTATION_CONTENT = 21;
-
-
- public static final int NOTATION_TAG = 20;
-
- // public static final int CONNECT_CHOICE = 5;
- // public static final int CONNECT_SEQUENCE = 6;
- // public static final int OCCUR_OPTIONAL = 7;
- // public static final int OCCUR_ONE_OR_MORE = 8;
- // public static final int OCCUR_ZERO_OR_MORE = 9;
- public static final int OCCUR_TYPE = 7;
- public static final int RIGHT_PAREN = 4;
- public static final int START_TAG = 1;
- public static final int WHITESPACE = 5;
-
-
- public Token(String type) {
- super(type);
- }
-
- public Token(String type, String text, int line, int charBegin, int length) {
- super(type, text, line, charBegin, length);
- }
-
- public Token createCopy() {
- Token copy = new Token(getType(), getText(), getStartLine(), getStartOffset(), getLength());
- return copy;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/Yytoken.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/Yytoken.java
deleted file mode 100644
index ceead5f2ec..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/Yytoken.java
+++ /dev/null
@@ -1,90 +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.dtd.core.tokenizer;
-
-class Yytoken {
- public int m_charBegin;
- public int m_length;
- public int m_line;
- public String m_text;
- public String m_type;
-
- Yytoken(String type) {
- m_type = type;
- }
-
- Yytoken(String type, String text, int line, int charBegin, int length) {
- m_type = type;
- m_text = new String(text);
- m_line = line;
- m_charBegin = charBegin;
- m_length = length;
- }
-
- public void delete(int start, int length) {
- int stringStart = start - m_charBegin;
- String oldString = m_text;
- m_text = oldString.substring(0, stringStart);
- m_text += oldString.substring(stringStart + length);
-
- m_length = m_text.length();
- System.out.println("new string = " + m_text); //$NON-NLS-1$
-
- }
-
- public boolean equals(Yytoken other) {
- return m_type == other.getType() && m_text.equals(other.getText()) && m_line == other.getStartLine() && m_charBegin == other.getStartOffset() && m_length == other.getLength();
- }
-
- public int getEndOffset() {
- return m_charBegin + m_length;
- }
-
- public int getLength() {
- return m_length;
- }
-
- public int getStartLine() {
- return m_line;
- }
-
- public int getStartOffset() {
- return m_charBegin;
- }
-
- public String getText() {
- return m_text;
- }
-
- public String getType() {
- return m_type;
- }
-
- public void setStartOffset(int startOffset) {
- m_charBegin = startOffset;
- }
-
- public String toString() {
- return "Text : " + m_text + "\ntype : " + m_type + "\nline : " + m_line + "\ncBeg. : " + m_charBegin + "\ncEnd. : " + getEndOffset() + "\ncLength. : " + m_length; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- }
-
- public void updateOffset(int delta) {
- m_charBegin += delta;
- }
-
- public void updateText(String newText) {
- m_text = newText;
- m_length = newText.length();
- }
-}
-
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/dtd.flex b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/dtd.flex
deleted file mode 100644
index b29b7f8e04..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/tokenizer/dtd.flex
+++ /dev/null
@@ -1,312 +0,0 @@
-/* this is a scanner for DTD files */
-package org.eclipse.wst.dtd.core.tokenizer;
-
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-
-%%
-
-%{
- private int node_count = 0;
- private String currentString;
-
- private Token createToken(String type)
- {
- return new Token(type, yytext(), yyline, yychar + startOffset, yylength());
- }
-
- private int startOffset = 0;
- public void setStartOffset(int startOffset)
- {
- this.startOffset = startOffset;
- }
-
- public void setLine(int line)
- {
- this.yyline = line;
- }
-%}
-
-%class DTDTokenizer
-%public
-%unicode
-%debug
-%line
-%char
-%state NODE
-%state ELEMENT_NAME
-%state ELEMENT_CONTENT
-%state ELEMENT_MIXED_OR_CHILD
-%state ELEMENT_MIXED
-%state ELEMENT_CHILD
-%state ENTITY_NAME
-%state ENTITY_CONTENT
-%state NDATA_CONTENT
-
-%state NOTATION_NAME
-%state EXTERNALID_CONTENT
-
-%state COMMENT_CONTENT
-%state ATTLIST_NAME
-%state ATTLIST_CONTENT
-%state ATTRIBUTE_CONTENT
-%state ATTRIBUTE_DEFAULT
-%state ATTRIBUTE_ENUMERATION
-
-
-ALPHA=[A-Za-z]
-DIGIT=[0-9]
-NONNEWLINE_WHITE_SPACE_CHAR=[\ \t\b\012]
-STRING_TEXT=(\\\"|[^\n\r\"]|\\{WHITE_SPACE_CHAR}+\\)*
-COMMENT_TEXT=([^*/\n]|[^*\n]"/"[^*\n]|[^/\n]"*"[^/\n]|"*"[^/\n]|"/"[^*\n])*
-Ident = {ALPHA}({ALPHA}|{DIGIT}|_)*
-InputCharacter = [^\r\n]
-
-LineTerminator = \r|\n|\r\n
-
-/* 3 - White Space */
-S = (\x20 | \x09 | \x0D | \x0A)+
-NonLineTerminatorWhitespace = (\x20 | \x09)+
-
-WhiteSpace = {LineTerminator} | [ \t\f]
-
-/* 84 */
-/*Letter = {BaseChar} | {Ideographic}
-
-/* 85 */
-BaseChar = [\u0041-\u005A] | [\u0061-\u007A] | [\u00C0-\u00D6] | [\u00D8-\u00F6] | [\u00F8-\u00FF] | [\u0100-\u0131] | [\u0134-\u013E] | [\u0141-\u0148] | [\u014A-\u017E] | [\u0180-\u01C3] | [\u01CD-\u01F0] | [\u01F4-\u01F5] | [\u01FA-\u0217] | [\u0250-\u02A8] | [\u02BB-\u02C1] | \u0386 | [\u0388-\u038A] | \u038C | [\u038E-\u03A1] | [\u03A3-\u03CE] | [\u03D0-\u03D6] | \u03DA | \u03DC | \u03DE | \u03E0 | [\u03E2-\u03F3] | [\u0401-\u040C] | [\u040E-\u044F] | [\u0451-\u045C] | [\u045E-\u0481] | [\u0490-\u04C4] | [\u04C7-\u04C8] | [\u04CB-\u04CC] | [\u04D0-\u04EB] | [\u04EE-\u04F5] | [\u04F8-\u04F9] | [\u0531-\u0556] | \u0559 | [\u0561-\u0586] | [\u05D0-\u05EA] | [\u05F0-\u05F2] | [\u0621-\u063A] | [\u0641-\u064A] | [\u0671-\u06B7] | [\u06BA-\u06BE] | [\u06C0-\u06CE] | [\u06D0-\u06D3] | \u06D5 | [\u06E5-\u06E6] | [\u0905-\u0939] | \u093D | [\u0958-\u0961] | [\u0985-\u098C] | [\u098F-\u0990] | [\u0993-\u09A8] | [\u09AA-\u09B0] | \u09B2 | [\u09B6-\u09B9] | [\u09DC-\u09DD] | [\u09DF-\u09E1] | [\u09F0-\u09F1] | [\u0A05-\u0A0A] | [\u0A0F-\u0A10] | [\u0A13-\u0A28] | [\u0A2A-\u0A30] | [\u0A32-\u0A33] | [\u0A35-\u0A36] | [\u0A38-\u0A39] | [\u0A59-\u0A5C] | \u0A5E | [\u0A72-\u0A74] | [\u0A85-\u0A8B] | \u0A8D | [\u0A8F-\u0A91] | [\u0A93-\u0AA8] | [\u0AAA-\u0AB0] | [\u0AB2-\u0AB3] | [\u0AB5-\u0AB9] | \u0ABD | \u0AE0 | [\u0B05-\u0B0C] | [\u0B0F-\u0B10] | [\u0B13-\u0B28] | [\u0B2A-\u0B30] | [\u0B32-\u0B33] | [\u0B36-\u0B39] | \u0B3D | [\u0B5C-\u0B5D] | [\u0B5F-\u0B61] | [\u0B85-\u0B8A] | [\u0B8E-\u0B90] | [\u0B92-\u0B95] | [\u0B99-\u0B9A] | \u0B9C | [\u0B9E-\u0B9F] | [\u0BA3-\u0BA4] | [\u0BA8-\u0BAA] | [\u0BAE-\u0BB5] | [\u0BB7-\u0BB9] | [\u0C05-\u0C0C] | [\u0C0E-\u0C10] | [\u0C12-\u0C28] | [\u0C2A-\u0C33] | [\u0C35-\u0C39] | [\u0C60-\u0C61] | [\u0C85-\u0C8C] | [\u0C8E-\u0C90] | [\u0C92-\u0CA8] | [\u0CAA-\u0CB3] | [\u0CB5-\u0CB9] | \u0CDE | [\u0CE0-\u0CE1] | [\u0D05-\u0D0C] | [\u0D0E-\u0D10] | [\u0D12-\u0D28] | [\u0D2A-\u0D39] | [\u0D60-\u0D61] | [\u0E01-\u0E2E] | \u0E30 | [\u0E32-\u0E33] | [\u0E40-\u0E45] | [\u0E81-\u0E82] | \u0E84 | [\u0E87-\u0E88] | \u0E8A | \u0E8D | [\u0E94-\u0E97] | [\u0E99-\u0E9F] | [\u0EA1-\u0EA3] | \u0EA5 | \u0EA7 | [\u0EAA-\u0EAB] | [\u0EAD-\u0EAE] | \u0EB0 | [\u0EB2-\u0EB3] | \u0EBD | [\u0EC0-\u0EC4] | [\u0F40-\u0F47] | [\u0F49-\u0F69] | [\u10A0-\u10C5] | [\u10D0-\u10F6] | \u1100 | [\u1102-\u1103] | [\u1105-\u1107] | \u1109 | [\u110B-\u110C] | [\u110E-\u1112] | \u113C | \u113E | \u1140 | \u114C | \u114E | \u1150 | [\u1154-\u1155] | \u1159 | [\u115F-\u1161] | \u1163 | \u1165 | \u1167 | \u1169 | [\u116D-\u116E] | [\u1172-\u1173] | \u1175 | \u119E | \u11A8 | \u11AB | [\u11AE-\u11AF] | [\u11B7-\u11B8] | \u11BA | [\u11BC-\u11C2] | \u11EB | \u11F0 | \u11F9 | [\u1E00-\u1E9B] | [\u1EA0-\u1EF9] | [\u1F00-\u1F15] | [\u1F18-\u1F1D] | [\u1F20-\u1F45] | [\u1F48-\u1F4D] | [\u1F50-\u1F57] | \u1F59 | \u1F5B | \u1F5D | [\u1F5F-\u1F7D] | [\u1F80-\u1FB4] | [\u1FB6-\u1FBC] | \u1FBE | [\u1FC2-\u1FC4] | [\u1FC6-\u1FCC] | [\u1FD0-\u1FD3] | [\u1FD6-\u1FDB] | [\u1FE0-\u1FEC] | [\u1FF2-\u1FF4] | [\u1FF6-\u1FFC] | \u2126 | [\u212A-\u212B] | \u212E | [\u2180-\u2182] | [\u3041-\u3094] | [\u30A1-\u30FA] | [\u3105-\u312C] | [\uAC00-\uD7A3]
-
-/* 86 */
-Ideographic = [\u4E00-\u9FA5] | \u3007 | [\u3021-\u3029]
-
-/* 4 */ /* is '.' to be escaped?? */
-NameChar = {Letter} | {Digit} | . | - | _ | : | {CombiningChar} | {Extender}
-
-/* 5 */
-Name = ({Letter} | _ | :) {NameChar}*
-
-/* 87 */
-CombiningChar = [\u0300-\u0345] | [\u0360-\u0361] | [\u0483-\u0486] | [\u0591-\u05A1] | [\u05A3-\u05B9] | [\u05BB-\u05BD] | \u05BF | [\u05C1-\u05C2] | \u05C4 | [\u064B-\u0652] | \u0670 | [\u06D6-\u06DC] | [\u06DD-\u06DF] | [\u06E0-\u06E4] | [\u06E7-\u06E8] | [\u06EA-\u06ED] | [\u0901-\u0903] | \u093C | [\u093E-\u094C] | \u094D | [\u0951-\u0954] | [\u0962-\u0963] | [\u0981-\u0983] | \u09BC | \u09BE | \u09BF | [\u09C0-\u09C4] | [\u09C7-\u09C8] | [\u09CB-\u09CD] | \u09D7 | [\u09E2-\u09E3] | \u0A02 | \u0A3C | \u0A3E | \u0A3F | [\u0A40-\u0A42] | [\u0A47-\u0A48] | [\u0A4B-\u0A4D] | [\u0A70-\u0A71] | [\u0A81-\u0A83] | \u0ABC | [\u0ABE-\u0AC5] | [\u0AC7-\u0AC9] | [\u0ACB-\u0ACD] | [\u0B01-\u0B03] | \u0B3C | [\u0B3E-\u0B43] | [\u0B47-\u0B48] | [\u0B4B-\u0B4D] | [\u0B56-\u0B57] | [\u0B82-\u0B83] | [\u0BBE-\u0BC2] | [\u0BC6-\u0BC8] | [\u0BCA-\u0BCD] | \u0BD7 | [\u0C01-\u0C03] | [\u0C3E-\u0C44] | [\u0C46-\u0C48] | [\u0C4A-\u0C4D] | [\u0C55-\u0C56] | [\u0C82-\u0C83] | [\u0CBE-\u0CC4] | [\u0CC6-\u0CC8] | [\u0CCA-\u0CCD] | [\u0CD5-\u0CD6] | [\u0D02-\u0D03] | [\u0D3E-\u0D43] | [\u0D46-\u0D48] | [\u0D4A-\u0D4D] | \u0D57 | \u0E31 | [\u0E34-\u0E3A] | [\u0E47-\u0E4E] | \u0EB1 | [\u0EB4-\u0EB9] | [\u0EBB-\u0EBC] | [\u0EC8-\u0ECD] | [\u0F18-\u0F19] | \u0F35 | \u0F37 | \u0F39 | \u0F3E | \u0F3F | [\u0F71-\u0F84] | [\u0F86-\u0F8B] | [\u0F90-\u0F95] | \u0F97 | [\u0F99-\u0FAD] | [\u0FB1-\u0FB7] | \u0FB9 | [\u20D0-\u20DC] | \u20E1 | [\u302A-\u302F] | \u3099 | \u309A
-
-/* 88 */
-Digit = [\u0030-\u0039] | [\u0660-\u0669] | [\u06F0-\u06F9] | [\u0966-\u096F] | [\u09E6-\u09EF] | [\u0A66-\u0A6F] | [\u0AE6-\u0AEF] | [\u0B66-\u0B6F] | [\u0BE7-\u0BEF] | [\u0C66-\u0C6F] | [\u0CE6-\u0CEF] | [\u0D66-\u0D6F] | [\u0E50-\u0E59] | [\u0ED0-\u0ED9] | [\u0F20-\u0F29]
-
-/* 89 */
-Extender = \u00B7 | \u02D0 | \u02D1 | \u0387 | \u0640 | \u0E46 | \u0EC6 | \u3005 | [\u3031-\u3035] | [\u309D-\u309E] | [\u30FC-\u30FE]
-*/
-
-Letter = [a-zA-Z]
-NameChar = {Letter} | [0-9]
-//Name = ({Letter} | _ | :) {NameChar}*
-//Name = [^\x20\x09\x0D\x0A]+
-Name = [^\x20\x09\x0D\x0A\|,\!\?\+\*\(\)<>]+
-ElementRefName = [^\x20\x09\x0D\x0A\|,\?\+\*\(\)<>]+
-EntityName = [^\x20\x09\x0D\x0A\|,\?\*\(\)<>]+
-ParmEntityName = [^\x20\x09\x0D\x0A\!%;<>]+
-
-CommentStart = \!--
-CommentContent = [^->]+
-CommentEnd = -->
-ElementStart = ELEMENT
-ElementContent = [^<>]*
-
-EntityStart = ENTITY
-Entity_Parm = %{S}
-EntityContent = {S}[^<>]*
-
-NotationStart = NOTATION
-NotationContent = {S}[^<>]*
-AttList = ATTLIST
-ExternalParmEntityRef = %{ParmEntityName};
-EndTag = >
-StartTag = <
-System = SYSTEM
-Public = PUBLIC
-NData = NDATA
-
-// these are attribute type keywords
-// we reuse NOTATION from NotationStart
-// we reuse ENTITY from EntityStart
-CData = CDATA
-ID = ID
-IDRef = IDREF
-IDRefs = IDREFS
-Entities = ENTITIES
-NMToken = NMTOKEN
-NMTokens = NMTOKENS
-
-// these are attribute defaults keywords
-Required = #REQUIRED
-Implied = #IMPLIED
-Fixed = #FIXED
-
-
-Empty = EMPTY
-Any = ANY
-PcData = #PCDATA
-LeftParen = \(
-RightParen = \)
-
-Percent = %
-Semicolon = ;
-Plus = \+
-Choice = \|
-Sequence = ,
-Connector = {Choice}|{Sequence}
-OccurOptional = \?
-OccurOneOrMore = \+
-OccurZeroOrMore = \*
-OccurType = {OccurOptional}|{OccurOneOrMore}|{OccurZeroOrMore}
-Exclamation = \!
-SingleQuotedLiteral = '[^']*'
-DoubleQuotedLiteral = \"[^\"]*\"
-NonTagContent = [^\x20\x09\x0D\x0A<>]*
-NonEnumContent = [^\x20\x09\x0D\x0A<>\(\)\|]*
-%%
-
-<YYINITIAL> {
- {StartTag} { return createToken(DTDRegionTypes.START_TAG); }
- {EndTag} { return createToken(DTDRegionTypes.END_TAG); }
- {Exclamation} { return createToken(DTDRegionTypes.EXCLAMATION); }
- {Percent} { return createToken(DTDRegionTypes.PERCENT); }
- {Semicolon} { return createToken(DTDRegionTypes.SEMICOLON); }
-
- {ElementStart} { yybegin(ELEMENT_NAME); return createToken(DTDRegionTypes.ELEMENT_TAG); }
- {CommentStart} { yybegin(COMMENT_CONTENT); return createToken(DTDRegionTypes.COMMENT_START); }
- {EntityStart} { yybegin(ENTITY_NAME); return createToken(DTDRegionTypes.ENTITY_TAG); }
- {NotationStart} { yybegin(NOTATION_NAME); return createToken(DTDRegionTypes.NOTATION_TAG); }
- {AttList} { yybegin(ATTLIST_NAME); return createToken(DTDRegionTypes.ATTLIST_TAG); }
-
- {ExternalParmEntityRef} { return createToken(DTDRegionTypes.ENTITY_PARM); }
-// just a parmentityname by itself is no good. we use this
-// to capture garbage content at the top level
- {ParmEntityName} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
-
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
-}
-
-<ELEMENT_NAME> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {PcData}|\({S}*{PcData}{S}*\) { return createToken(DTDRegionTypes.CONTENT_PCDATA); }
- {Name} { return createToken(DTDRegionTypes.NAME); }
-
- {LeftParen} { return createToken(DTDRegionTypes.LEFT_PAREN); }
- {Connector} { return createToken(DTDRegionTypes.CONNECTOR); }
- {OccurType} { return createToken(DTDRegionTypes.OCCUR_TYPE); }
- {RightParen} { return createToken(DTDRegionTypes.RIGHT_PAREN); }
-
- {StartTag} { yypushback(yylength()); yybegin(YYINITIAL); }
- {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-// ******** <!ATTLIST...>
-<ATTLIST_NAME> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {Name} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.NAME); }
- {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<ATTLIST_CONTENT> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {Name} { yybegin(ATTRIBUTE_CONTENT); return createToken(DTDRegionTypes.ATTRIBUTE_NAME); }
- {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<ATTRIBUTE_CONTENT> {
- {LineTerminator} { yypushback(yylength()); yybegin(ATTLIST_CONTENT); }
- {NonLineTerminatorWhitespace}
- { return createToken(DTDRegionTypes.WHITESPACE); }
- {CData} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.CDATA_KEYWORD); }
-
- {ID} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ID_KEYWORD); }
- {IDRef} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.IDREF_KEYWORD); }
- {IDRefs} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.IDREFS_KEYWORD); }
- {EntityStart} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ENTITY_KEYWORD); }
- {Entities} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ENTITIES_KEYWORD); }
- {NMToken} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.NMTOKEN_KEYWORD); }
- {NMTokens} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.NMTOKENS_KEYWORD); }
- {NotationStart} { yybegin(ATTRIBUTE_ENUMERATION); return createToken(DTDRegionTypes.NOTATION_KEYWORD); }
-
- {Required} | {Implied} | {Fixed} | {SingleQuotedLiteral} | { DoubleQuotedLiteral}
- { yypushback(yylength()); yybegin(ATTRIBUTE_DEFAULT); }
-
- {LeftParen} { yypushback(yylength()); yybegin(ATTRIBUTE_ENUMERATION); }
- {NonEnumContent} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.PARM_ENTITY_TYPE); }
- {NonEnumContent}|{RightParen}|{Choice} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<ATTRIBUTE_DEFAULT> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {Required} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.REQUIRED_KEYWORD); }
- {Implied} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.IMPLIED_KEYWORD); }
- {Fixed} { return createToken(DTDRegionTypes.FIXED_KEYWORD); }
- {SingleQuotedLiteral} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); }
- {DoubleQuotedLiteral} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); }
- {NonTagContent} { yypushback(yylength()); yybegin(ATTLIST_CONTENT); } //return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<ATTRIBUTE_ENUMERATION> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {LeftParen} { return createToken(DTDRegionTypes.LEFT_PAREN); }
- {Choice} { return createToken(DTDRegionTypes.ENUM_CHOICE); }
- {RightParen} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.RIGHT_PAREN); }
- {NonEnumContent} { return createToken(DTDRegionTypes.NAME); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-
-// ******** <!ENTITY...>
-<ENTITY_NAME> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {Percent} { return createToken(DTDRegionTypes.PERCENT); }
- {EntityName} { yybegin(ENTITY_CONTENT); return createToken(DTDRegionTypes.NAME); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<ENTITY_CONTENT> {
-// {EntityContent} { yybegin(YYINITIAL); return createToken(DTDRegionTypes.ENTITY_CONTENT); }
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {System} | {Public} { yypushback(yylength()); yybegin(EXTERNALID_CONTENT); }
- {SingleQuotedLiteral} { return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); }
- {DoubleQuotedLiteral} { return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); }
- {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-
-// ******** <!NOTATION...>
-<NOTATION_NAME> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {Name} { yybegin(EXTERNALID_CONTENT); return createToken(DTDRegionTypes.NAME); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<EXTERNALID_CONTENT> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {System} { return createToken(DTDRegionTypes.SYSTEM_KEYWORD); }
- {Public} { return createToken(DTDRegionTypes.PUBLIC_KEYWORD); }
- {SingleQuotedLiteral} { return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); }
- {DoubleQuotedLiteral} { return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); }
- {NData} { yybegin(NDATA_CONTENT); return createToken(DTDRegionTypes.NDATA_KEYWORD); }
- {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<NDATA_CONTENT> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {NonTagContent} { yybegin(YYINITIAL); return createToken(DTDRegionTypes.NDATA_VALUE); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-
-// ******** <!-- ...>
-<COMMENT_CONTENT> {
- {CommentEnd} { yybegin(YYINITIAL); return createToken(DTDRegionTypes.COMMENT_END); }
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {CommentContent} | "-" | ">" { return createToken(DTDRegionTypes.COMMENT_CONTENT); }
-}
-
-
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDBatchNodeDelete.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDBatchNodeDelete.java
deleted file mode 100644
index 9f7109d09b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDBatchNodeDelete.java
+++ /dev/null
@@ -1,57 +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.dtd.core.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-
-
-public class DTDBatchNodeDelete {
- protected DTDFile dtdFile;
-
- protected List nodes = new ArrayList();
-
- public DTDBatchNodeDelete(DTDFile dtdFile) {
- this.dtdFile = dtdFile;
- }
-
- public void addNode(DTDNode node) {
- // first check if the node is contained by anyone
- for (int i = 0; i < nodes.size(); i++) {
- DTDNode currentNode = (DTDNode) nodes.get(i);
-
- if (currentNode.containsRange(node.getStartOffset(), node.getEndOffset())) {
- // then no need to add the node to the list to be deleted
- return;
- }
-
- if (node.getStartOffset() < currentNode.getStartOffset() && node.getEndOffset() <= currentNode.getStartOffset()) {
- nodes.add(i, node);
- return;
- }
- }
- // if we get here, then add it to the end
- nodes.add(node);
- }
-
- public void deleteNodes(Object requestor) {
- for (int i = nodes.size() - 1; i >= 0; i--) {
- DTDNode node = (DTDNode) nodes.get(i);
- dtdFile.deleteNode(requestor, (DTDNode) nodes.get(i));
- }
- nodes.clear();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDExternalReferenceRemover.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDExternalReferenceRemover.java
deleted file mode 100644
index 168cc09b05..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDExternalReferenceRemover.java
+++ /dev/null
@@ -1,145 +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.dtd.core.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.Attribute;
-import org.eclipse.wst.dtd.core.AttributeList;
-import org.eclipse.wst.dtd.core.CMBasicNode;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.dtd.core.Entity;
-
-
-/*
- * This class is responsible for updating the model when items are deleted or
- * so that items referenced by it are cleaned up note that top level nodes are
- * queued up for deletion so that iteration over the list of nodes from the
- * dtdfile is not messed up. Note that when an external parmeter entity
- * changes, the client of the model (e.g. editor) must be a DTDFileListener
- * implementing the listener's interface to keep the model's referential
- * integrity (See DTDModelImpl for example).
- */
-
-public class DTDExternalReferenceRemover extends DTDVisitor {
-
- protected DTDBatchNodeDelete batchDelete;
- protected List externalElementsAndParmEntities = new ArrayList();
-
- protected boolean isParmEntity = false;
-
- protected boolean isUpdating = false;
- protected DTDNode nodeToDelete;
- protected String oldRefName = ""; //$NON-NLS-1$
- protected Object requestor;
-
- public DTDExternalReferenceRemover() {
-
- }
-
- public synchronized void externalReferenceAboutToChange(Object requestor, Entity entity) {
- if (isUpdating) {
- return;
- }
- if (!entity.isParameterEntity() || !entity.isExternalEntity()) {
- // if it is not an external parameter entity, ignore as well
- return;
- }
-
- isUpdating = true;
- this.requestor = requestor;
-
- DTDFile dtdFile = entity.getDTDFile();
- if (batchDelete == null) {
- batchDelete = new DTDBatchNodeDelete(dtdFile);
- }
-
- // See the comment at the head of this file regarding
- // external parameter entities.
- //externalElementsAndParmEntities =
- // dtdFile.getDTDModel().getExternalModels().getElementContentNames(entity.getPublicID(),
- // dtdFile.getDTDModel().resolveID(entity.getPublicID(),
- // entity.getSystemID()));
-
- visit(dtdFile);
-
- batchDelete.deleteNodes(requestor);
-
- isUpdating = false;
- }
-
- public boolean isMatchingName(String name) {
- return externalElementsAndParmEntities.contains(name);
- }
-
- public void visitAttribute(Attribute attr) {
- super.visitAttribute(attr);
- String attrName = attr.getName();
- String attrType = attr.getType();
-
- if (isParameterEntityRef(attrName)) {
- if (isMatchingName(attrName)) {
- attr.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- }
- if (isParameterEntityRef(attrType)) {
- if (isMatchingName(attrType)) {
- attr.setType(requestor, Attribute.CDATA);
- }
- }
- }
-
- public void visitAttributeList(AttributeList attList) {
- super.visitAttributeList(attList);
- String attListName = attList.getName();
- if (isParameterEntityRef(attListName)) {
- if (isMatchingName(attListName)) {
- attList.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- }
- }
-
- public void visitElement(Element element) {
- String elementName = element.getName();
- if (isParameterEntityRef(elementName)) {
- if (isMatchingName(elementName)) {
- element.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- }
- super.visitElement(element);
- }
-
- public void visitReference(CMBasicNode node) {
- super.visitReference(node);
- String refName = node.getName();
- if (isMatchingName(refName)) {
- DTDNode parent = (DTDNode) node.getParentNode();
- batchDelete.addNode(node);
- // parent.delete(requestor, node);
- }
- }
-
- // public void
- // visitExternalParameterEntityReference(ParameterEntityReference
- // parmEntityRef)
- // {
- // super.visitExternalParameterEntityReference(parmEntityRef);
- // if (isParmEntity && parmEntityRef.getName().equals(oldRefName))
- // {
- // nodesToDelete.add(parmEntityRef);
- // }
- // }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDModelUpdater.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDModelUpdater.java
deleted file mode 100644
index fa2d0f9c8d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDModelUpdater.java
+++ /dev/null
@@ -1,135 +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.dtd.core.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.Attribute;
-import org.eclipse.wst.dtd.core.AttributeList;
-import org.eclipse.wst.dtd.core.CMBasicNode;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.dtd.core.Entity;
-import org.eclipse.wst.dtd.core.ParameterEntityReference;
-
-
-// this class is responsible for updating the model when items
-// are deleted or a external parm entity changes so that
-// items referenced by it are cleaned up
-// note that top level nodes are queued up for deletion so that
-// iteration over the list of nodes from the dtdfile is not messed up
-public class DTDModelUpdater extends DTDVisitor {
-
- protected boolean isParmEntity = false;
-
- protected boolean isUpdating = false;
-
- protected List nodesToDelete = new ArrayList();
- protected DTDNode nodeToDelete;
- protected String oldRefName = ""; //$NON-NLS-1$
- protected Object requestor;
-
- public DTDModelUpdater() {
-
- }
-
- public synchronized void objectAboutToBeDeleted(Object requestor, DTDNode node) {
- if (isUpdating) {
- return;
- }
- if (!(node instanceof Entity || node instanceof Element)) {
- // just ignore if it is not one of these
- return;
- }
- if (node instanceof Entity && !((Entity) node).isParameterEntity()) {
- // if it is not a parameter entity, ignore as well
- return;
- }
-
-
- isUpdating = true;
- this.requestor = requestor;
- this.nodeToDelete = node;
- oldRefName = node.getName();
- isParmEntity = false;
- nodesToDelete.clear();
-
- if (node instanceof Entity) {
- Entity entity = (Entity) node;
- isParmEntity = true;
- oldRefName = "%" + oldRefName + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- DTDFile dtdFile = node.getDTDFile();
- visit(dtdFile);
-
- for (int i = 0; i < nodesToDelete.size(); i++) {
- dtdFile.deleteNode(requestor, (DTDNode) nodesToDelete.get(i));
- }
-
- isUpdating = false;
- }
-
- public void visitAttribute(Attribute attr) {
- super.visitAttribute(attr);
- if (isParmEntity) {
- if (attr.getName().equals(oldRefName)) {
- attr.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- if (attr.getType().equals(oldRefName)) {
- attr.setType(requestor, Attribute.CDATA);
- }
- }
- // check the attr name and the attr type to see if it
- // needs updating
- }
-
- public void visitAttributeList(AttributeList attList) {
- super.visitAttributeList(attList);
- if (attList.getName().equals(oldRefName)) {
- if (isParmEntity) {
- attList.setName(requestor, "TempName"); //$NON-NLS-1$
- } else {
- // save up for later deletion
- nodesToDelete.add(attList);
- }
- }
- }
-
- public void visitElement(Element element) {
- if (isParmEntity) {
- if (element.getName().equals(oldRefName)) {
- element.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- }
- super.visitElement(element);
- }
-
- public void visitExternalParameterEntityReference(ParameterEntityReference parmEntityRef) {
- super.visitExternalParameterEntityReference(parmEntityRef);
- if (isParmEntity && parmEntityRef.getName().equals(oldRefName)) {
- nodesToDelete.add(parmEntityRef);
- }
- }
-
- public void visitReference(CMBasicNode node) {
- super.visitReference(node);
-
- if (node.getName().equals(oldRefName)) {
- DTDNode parent = (DTDNode) node.getParentNode();
- parent.delete(requestor, node);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDNotationReferenceRemover.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDNotationReferenceRemover.java
deleted file mode 100644
index cbcb9edabb..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDNotationReferenceRemover.java
+++ /dev/null
@@ -1,92 +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.dtd.core.util;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.Attribute;
-import org.eclipse.wst.dtd.core.AttributeEnumList;
-import org.eclipse.wst.dtd.core.AttributeList;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Entity;
-import org.eclipse.wst.dtd.core.Notation;
-
-
-public class DTDNotationReferenceRemover {
- protected Notation notation;
- protected String notationName;
-
- protected Object requestor;
-
- public DTDNotationReferenceRemover() {
-
- }
-
- public void notationAboutToBeDeleted(Object requestor, Notation notation) {
- this.requestor = requestor;
- this.notation = notation;
- notationName = notation.getName();
-
- visit(notation.getDTDFile());
- }
-
- public void visit(DTDFile file) {
- List nodes = file.getNodes();
- for (int i = 0; i < nodes.size(); i++) {
- DTDNode currentNode = (DTDNode) nodes.get(i);
- if (currentNode instanceof Entity) {
- visitEntity((Entity) currentNode);
- } else if (currentNode instanceof AttributeList) {
- visitAttributeList((AttributeList) currentNode);
- }
- }
- }
-
- public void visitAttribute(Attribute attr) {
- if (attr.getType().equals(Attribute.ENUMERATED_NOTATION)) {
- AttributeEnumList enumList = attr.getEnumList();
- List notationNames = enumList.getItems();
- Iterator iter = notationNames.iterator();
- boolean updateRequired = false;
- while (iter.hasNext()) {
- String notation = (String) iter.next();
- if (notation.equals(notationName)) {
- updateRequired = true;
- iter.remove();
- }
- }
- if (updateRequired) {
- String[] newItems = new String[notationNames.size()];
- notationNames.toArray(newItems);
- enumList.setItems(requestor, newItems);
- }
- }
- }
-
- public void visitAttributeList(AttributeList attList) {
- Attribute attr = (Attribute) attList.getFirstChild();
- while (attr != null) {
- visitAttribute(attr);
- attr = (Attribute) attr.getNextSibling();
- }
- }
-
- public void visitEntity(Entity entity) {
- if (entity.getNotationName().equals(notationName)) {
- entity.setNotationName(requestor, ""); //$NON-NLS-1$
- }
- }
-
-}// DTDNotationRemover
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDReferenceUpdater.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDReferenceUpdater.java
deleted file mode 100644
index 79bfcf2d1d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDReferenceUpdater.java
+++ /dev/null
@@ -1,192 +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.dtd.core.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.Attribute;
-import org.eclipse.wst.dtd.core.AttributeEnumList;
-import org.eclipse.wst.dtd.core.AttributeList;
-import org.eclipse.wst.dtd.core.CMBasicNode;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.dtd.core.Entity;
-import org.eclipse.wst.dtd.core.Notation;
-import org.eclipse.wst.dtd.core.ParameterEntityReference;
-
-
-// this class is responsible for updating any dtd node in
-// response to a change in the node that they reference
-public class DTDReferenceUpdater extends DTDVisitor {
- protected boolean isNotation = false;
-
- protected boolean isParmEntity = false;
-
- protected boolean isUpdating = false;
- protected String newName = ""; //$NON-NLS-1$
- protected String oldRefName = "", newRefName = ""; //$NON-NLS-1$ //$NON-NLS-2$
- protected DTDNode referencedNode = null;
-
- // the references List is a cache of the DTDNodes that are changed
- // as a result of a call to nameAboutToChange(). The idea is that
- // if a subsequent call comes in that changes the name of the same
- // object for which this cache exists for, then we optimize the
- // path by just walking the cache
- private List references = new ArrayList();
- protected Object requestor;
-
- public DTDReferenceUpdater() {
-
- }
-
- public void clearCache() {
- referencedNode = null;
- references.clear();
- }
-
- public synchronized void nameAboutToChange(Object requestor, DTDNode referencedNode, String newName) {
- if (isUpdating) {
- return;
- }
- if (!(referencedNode instanceof Entity || referencedNode instanceof Element || referencedNode instanceof Notation)) {
- // just ignore if it is not one of these
- return;
- }
- if (referencedNode instanceof Entity && !((Entity) referencedNode).isParameterEntity()) {
- // if it is not a parameter entity, ignore as well
- return;
- }
-
- isUpdating = true;
- this.requestor = requestor;
- oldRefName = referencedNode.getName();
- this.newName = newRefName = newName;
- isParmEntity = false;
- isNotation = referencedNode instanceof Notation;
-
- if (referencedNode instanceof Entity) {
- Entity entity = (Entity) referencedNode;
- isParmEntity = true;
- oldRefName = "%" + oldRefName + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- newRefName = "%" + newRefName + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (this.referencedNode != null) {
- // check if the previous referenced node that was changed
- // is the same as the one that is coming in. if so, just
- // change the previous regions
- if (this.referencedNode == referencedNode) {
- quickUpdate();
- isUpdating = false;
- return;
- }
- }
-
- // clear the cache if we get here
- this.referencedNode = referencedNode;
- references.clear();
- DTDFile dtdFile = referencedNode.getDTDFile();
- visit(dtdFile);
- isUpdating = false;
- }
-
- protected void quickUpdate() {
- for (int i = 0; i < references.size(); i++) {
- DTDNode node = (DTDNode) references.get(i);
- if (node instanceof Element) {
- visitElement((Element) node);
- } else if (node instanceof AttributeList) {
- visitAttributeList((AttributeList) node);
- } else if (node instanceof Attribute) {
- visitAttribute((Attribute) node);
- } else if (node instanceof CMBasicNode) {
- visitReference((CMBasicNode) node);
- } else if (node instanceof ParameterEntityReference) {
- visitExternalParameterEntityReference((ParameterEntityReference) node);
- }
- }
- }
-
- public void visitAttribute(Attribute attr) {
- super.visitAttribute(attr);
- if (isParmEntity) {
- // check the attr name and the attr type to see if it
- // needs updating
- if (attr.getName().equals(oldRefName)) {
- attr.setName(requestor, newRefName);
- references.add(attr);
- }
- if (attr.getType().equals(oldRefName)) {
- attr.setType(requestor, newRefName);
- references.add(attr);
- }
- } else if (isNotation && attr.getType().equals(Attribute.ENUMERATED_NOTATION)) {
- AttributeEnumList enumList = attr.getEnumList();
- List items = enumList.getItems();
- boolean updateNeeded = false;
- for (int i = 0; i < items.size(); i++) {
- String notationName = (String) items.get(i);
- if (notationName.equals(oldRefName)) {
- updateNeeded = true;
- items.set(i, newName);
- }
- }
- if (updateNeeded) {
- String[] newItems = new String[items.size()];
-
- enumList.setItems((String[]) items.toArray(newItems));
- }
- }
-
- }
-
- public void visitAttributeList(AttributeList attList) {
- if (!isNotation && attList.getName().equals(oldRefName)) {
- attList.setName(requestor, newRefName);
- references.add(attList);
- }
- super.visitAttributeList(attList);
- }
-
- public void visitElement(Element element) {
- if (isParmEntity) {
- if (element.getName().equals(oldRefName)) {
- element.setName(requestor, newRefName);
- references.add(element);
- }
- }
- super.visitElement(element);
- }
-
- public void visitExternalParameterEntityReference(ParameterEntityReference parmEntityRef) {
- super.visitExternalParameterEntityReference(parmEntityRef);
- if (parmEntityRef.getName().equals(oldRefName)) {
- parmEntityRef.setReferencedEntity(requestor, newName);
- references.add(parmEntityRef);
- }
- }
-
- public void visitReference(CMBasicNode node) {
- super.visitReference(node);
- if (isParameterEntityRef(oldRefName) && !isParmEntity) {
- return;
- }
-
- if (node.getName().equals(oldRefName)) {
- node.setName(requestor, newRefName);
- references.add(node);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDSAXParser.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDSAXParser.java
deleted file mode 100644
index 04f0971a63..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDSAXParser.java
+++ /dev/null
@@ -1,170 +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.dtd.core.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.SAXParser;
-
-import org.xml.sax.Parser;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.XMLReader;
-
-/**
- * TODO: Kihup and Nitin, reevaluate the use and implementation of this class
- */
-
-//import org.apache.xerces.parsers.SAXParser;
-//import org.apache.xerces.xni.Augmentations;
-//import org.apache.xerces.xni.XMLLocator;
-//import org.apache.xerces.xni.XMLString;
-//import org.apache.xerces.xni.XNIException;
-public class DTDSAXParser extends SAXParser {
-
- private List ignoredEntityRefs = new ArrayList();
-
- // private XMLLocator locator;
- //
- public List getIgnoredEntityRefs() {
- return ignoredEntityRefs;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see javax.xml.parsers.SAXParser#getParser()
- */
- public Parser getParser() throws SAXException {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.xml.parsers.SAXParser#getProperty(java.lang.String)
- */
- public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.xml.parsers.SAXParser#getXMLReader()
- */
- public XMLReader getXMLReader() throws SAXException {
- // TODO Auto-generated method stub
- return null;
- }
-
- //
- // public XMLLocator getLocator()
- // {
- // return locator;
- // }
- //
- // public void startDocument
- // (XMLLocator locator,
- // String encoding,
- // Augmentations augs)
- // {
- // this.locator = locator;
- // super.startDocument(locator,encoding,augs);
- // }
- //
- // public void ignoredCharacters(XMLString text, Augmentations augs)
- // throws XNIException
- // {
- // String s =
- // text.length > 0 ? new String(text.ch,text.offset,text.length) : "";
- // //System.out.println("ignoredCharacters: " + s);
- //
- // StringTokenizer tokenizer = new StringTokenizer(s,";");
- // try
- // {
- // String token = null;
- // while (tokenizer.hasMoreTokens())
- // {
- // token = tokenizer.nextToken();
- // if (isEntityRef(token))
- // registerEntityRef(token);
- // }
- // }
- // catch (NoSuchElementException e)
- // {
- // e.printStackTrace();
- // }
- // }
- //
- // TODO: never used
- boolean isEntityRef(String token) {
- // Looking for the pattern "nnnn%nnnnn".
- if (token.indexOf('%') != -1)
- return true; // candidate for entity reference
- else
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.xml.parsers.SAXParser#isNamespaceAware()
- */
- public boolean isNamespaceAware() {
- // TODO Auto-generated method stub
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.xml.parsers.SAXParser#isValidating()
- */
- public boolean isValidating() {
- // TODO Auto-generated method stub
- return false;
- }
-
- // TODO: never used
- void registerEntityRef(String token) {
- int index = token.lastIndexOf('%');
- if (index == -1)
- return;
-
- String refName = token.substring(index, token.length());
- //System.out.println("entity ref name is: " + refName);
- if (refName.indexOf(' ') != -1 || refName.indexOf('\t') != -1 || refName.indexOf('\n') != -1)
- return;
- else
- // we found entity reference
- ignoredEntityRefs.add(refName + ";"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.xml.parsers.SAXParser#setProperty(java.lang.String,
- * java.lang.Object)
- */
- public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDUniqueNameHelper.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDUniqueNameHelper.java
deleted file mode 100644
index 1555c24238..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDUniqueNameHelper.java
+++ /dev/null
@@ -1,91 +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.dtd.core.util;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.Attribute;
-import org.eclipse.wst.dtd.core.CMBasicNode;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.dtd.core.Entity;
-import org.eclipse.wst.dtd.core.Notation;
-
-
-public class DTDUniqueNameHelper {
-
- static public String getName(Object obj) {
- if (obj instanceof Element) {
- return ((Element) obj).getName();
- } else if (obj instanceof Entity) {
- return ((Entity) obj).getName();
- } else if (obj instanceof Notation) {
- return ((Notation) obj).getName();
- } else if (obj instanceof Attribute) {
- return ((Attribute) obj).getName();
- } else if (obj instanceof CMBasicNode) // Model Group Content
- {
- return ((CMBasicNode) obj).getName();
- }
- return ""; //$NON-NLS-1$
- }
-
- static public String getUniqueAttributeName(Element element) {
- List attrs = element.getElementAttributes();
- return getUniqueName(attrs, "NewAttribute"); //$NON-NLS-1$
- }
-
- static public String getUniqueElementName(DTDFile dtdFile) {
- List elements = dtdFile.getElementsAndParameterEntityReferences().getNodes();
- return getUniqueName(elements, "NewElement"); //$NON-NLS-1$
- }
-
- static public String getUniqueEntityName(DTDFile dtdFile) {
- List entities = dtdFile.getEntities().getNodes();
- return getUniqueName(entities, "NewEntity"); //$NON-NLS-1$
- }
-
- static public String getUniqueName(List objs, String token) {
- int counter = 1;
-
- boolean uniqueName = false;
- while (!uniqueName) {
- String newName = token + new Integer(counter++);
- uniqueName = true;
- Iterator iter = objs.iterator();
- while (iter.hasNext()) {
- Object obj = iter.next();
- String objName = getName(obj);
- if (objName.equals(newName)) {
- uniqueName = false;
- break;
- }
- }
- if (uniqueName) {
- return newName;
- }
- }
- // we shouldn't get here
- return "No Name found"; //$NON-NLS-1$
- }
-
- static public String getUniqueNotationName(DTDFile dtdFile) {
- List notations = dtdFile.getNotations().getNodes();
- return getUniqueName(notations, "NewNotation"); //$NON-NLS-1$
- }
-
- public DTDUniqueNameHelper() {
- }
-
-} // DTDUniqueNameHelper
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDVisitor.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDVisitor.java
deleted file mode 100644
index 2544de7bd4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/DTDVisitor.java
+++ /dev/null
@@ -1,105 +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.dtd.core.util;
-
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.Attribute;
-import org.eclipse.wst.dtd.core.AttributeList;
-import org.eclipse.wst.dtd.core.CMBasicNode;
-import org.eclipse.wst.dtd.core.CMGroupNode;
-import org.eclipse.wst.dtd.core.CMNode;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.dtd.core.ParameterEntityReference;
-
-
-public class DTDVisitor {
-
- public DTDVisitor() {
-
- }
-
- // utility method
- public boolean isParameterEntityRef(String reference) {
- if (reference.length() > 0) {
- return reference.charAt(0) == '%' && reference.charAt(reference.length() - 1) == ';';
- }
- return false;
- }
-
- public void visit(DTDFile file) {
- List nodes = file.getNodes();
- for (int i = 0; i < nodes.size(); i++) {
- DTDNode currentNode = (DTDNode) nodes.get(i);
- if (currentNode instanceof Element) {
- visitElement((Element) currentNode);
- } else if (currentNode instanceof AttributeList) {
- visitAttributeList((AttributeList) currentNode);
- } else if (currentNode instanceof ParameterEntityReference) {
- visitExternalParameterEntityReference((ParameterEntityReference) currentNode);
- }
- }
- }
-
- public void visitAttribute(Attribute attr) {
- }
-
- public void visitAttributeList(AttributeList attList) {
- // note that we don't visit attributes here because we
- // want the element to visit them with it's consolidated list
- // that it creates by gathering all attribute lists together
- }
-
- public void visitAttributes(List attributes) {
- int size = attributes.size();
- for (int i = 0; i < size; i++) {
- Attribute attr = (Attribute) attributes.get(i);
- visitAttribute(attr);
- }
- }
-
- public void visitContentNode(CMNode content) {
- if (content instanceof CMBasicNode) {
- CMBasicNode basicNode = (CMBasicNode) content;
- if (basicNode.isReference()) {
- visitReference(basicNode);
- }
- } else if (content instanceof CMGroupNode) {
- visitGroupNode((CMGroupNode) content);
- }
- }
-
- public void visitElement(Element element) {
- CMNode content = element.getContentModel();
- visitContentNode(content);
- visitAttributes(element.getElementAttributes());
- }
-
- public void visitExternalParameterEntityReference(ParameterEntityReference parmEntityRef) {
- }
-
- public void visitGroupNode(CMGroupNode group) {
- List children = group.getChildrenList();
- int size = children.size();
- for (int i = 0; i < size; i++) {
- visitContentNode((CMNode) children.get(i));
- }
- }
-
- public void visitReference(CMBasicNode node) {
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/LabelValuePair.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/LabelValuePair.java
deleted file mode 100644
index 5f04ceb065..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/util/LabelValuePair.java
+++ /dev/null
@@ -1,30 +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.dtd.core.util;
-
-import org.eclipse.jface.util.Assert;
-
-public class LabelValuePair {
-
- public String fLabel;
- public Object fValue;
-
- /**
- * Creates a new name/value item
- */
- public LabelValuePair(String label, Object value) {
- Assert.isTrue(label != null);
- fLabel = label;
- fValue = value;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/.classpath b/bundles/org.eclipse.wst.dtd.ui/.classpath
deleted file mode 100644
index df094ee4a7..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <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.dtd.ui/.compatibility b/bundles/org.eclipse.wst.dtd.ui/.compatibility
deleted file mode 100644
index 3ea4f291b1..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.compatibility
+++ /dev/null
@@ -1,2 +0,0 @@
-#Wed Mar 24 13:53:52 EST 2004
-.project=4140
diff --git a/bundles/org.eclipse.wst.dtd.ui/.cvsignore b/bundles/org.eclipse.wst.dtd.ui/.cvsignore
deleted file mode 100644
index 4f388b8264..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-bin
-
-build.xml
-dtdeditor.jar
-temp.folder
-org.eclipse.wst.dtd.ui_1.0.0.jar
diff --git a/bundles/org.eclipse.wst.dtd.ui/.project b/bundles/org.eclipse.wst.dtd.ui/.project
deleted file mode 100644
index 16b209c4e8..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.project
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.dtd.ui</name>
- <comment></comment>
- <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.dtd.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 3039598dd1..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,69 +0,0 @@
-#Thu Dec 16 07:39:20 EST 2004
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-eclipse.preferences.version=1
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.incompleteClasspath=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
diff --git a/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 0e3f292317..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Dec 16 07:40:58 EST 2004
-compilers.p.unused-element-or-attribute=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unknown-element=0
-compilers.p.unknown-resource=0
-compilers.p.unknown-class=0
-compilers.p.unknown-attribute=0
-compilers.p.no-required-att=0
-eclipse.preferences.version=1
-compilers.p.unresolved-import=0
-compilers.p.illegal-att-value=0
-compilers.use-project=true
diff --git a/bundles/org.eclipse.wst.dtd.ui/README.txt b/bundles/org.eclipse.wst.dtd.ui/README.txt
deleted file mode 100644
index 5a653feed2..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-The dtd implementation of the sse editor. \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/build.properties b/bundles/org.eclipse.wst.dtd.ui/build.properties
deleted file mode 100644
index 88b9844830..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/build.properties
+++ /dev/null
@@ -1,22 +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
-#
-###############################################################################
-bin.includes = plugin.xml,\
- *.jar,\
- dtd.jar,\
- icons/,\
- plugin.properties
-source.dtdeditor.jar = src/
-src.includes = plugin.xml,\
- icons/,\
- build.xml,\
- plugin.properties
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/DTDFile.gif b/bundles/org.eclipse.wst.dtd.ui/icons/DTDFile.gif
deleted file mode 100644
index 211c437fa9..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/DTDFile.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Attribute.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Attribute.gif
deleted file mode 100644
index 00bb7b475d..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Attribute.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Element.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Element.gif
deleted file mode 100644
index 01f4889869..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_ElementToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_ElementToConModel.gif
deleted file mode 100644
index 1a8236b8d7..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_ElementToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_GroupToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_GroupToConModel.gif
deleted file mode 100644
index 8168fb34f6..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_GroupToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Attribute.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Attribute.gif
deleted file mode 100644
index a7fb780c77..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Attribute.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Element.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Element.gif
deleted file mode 100644
index 3755e5e42e..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_ElementToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_ElementToConModel.gif
deleted file mode 100644
index 1a58e11192..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_ElementToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_GroupToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_GroupToConModel.gif
deleted file mode 100644
index d525a21e73..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_GroupToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Attribute.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Attribute.gif
deleted file mode 100644
index 00bb7b475d..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Attribute.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Element.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Element.gif
deleted file mode 100644
index 01f4889869..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_ElementToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_ElementToConModel.gif
deleted file mode 100644
index 1a8236b8d7..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_ElementToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_GroupToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_GroupToConModel.gif
deleted file mode 100644
index 8168fb34f6..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_GroupToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Comment.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Comment.gif
deleted file mode 100644
index 39611d6c63..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Comment.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity.gif
deleted file mode 100644
index cb415064e0..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity_Reference.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity_Reference.gif
deleted file mode 100644
index 5efa9b905e..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity_Reference.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Notation.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Notation.gif
deleted file mode 100644
index 57ad089a69..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Notation.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/organize_dtd_logically.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/organize_dtd_logically.gif
deleted file mode 100644
index 093c6bad04..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/organize_dtd_logically.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sort.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sort.gif
deleted file mode 100644
index 23c5d0b11c..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sort.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/validate.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/validate.gif
deleted file mode 100644
index 86196e996f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/validate.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/sourceEditor.gif b/bundles/org.eclipse.wst.dtd.ui/icons/sourceEditor.gif
deleted file mode 100644
index 75ebdb8586..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/sourceEditor.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/plugin.properties b/bundles/org.eclipse.wst.dtd.ui/plugin.properties
deleted file mode 100644
index f40a7ff545..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/plugin.properties
+++ /dev/null
@@ -1,343 +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
-#
-###############################################################################
-! Properties file for component: XMDTD - XML Tools DTD Editor
-! Packaged for translation in: xml.zip
-
-!plugin.xml
-providerName=Eclipse.org
-pluginName=SSE DTD Source Editor
-nlFeatureName=SSE DTD Source Editor NL Support
-DTD_Source_Page_Editor.name=DTD Source Page Editor
-_UI_WIZARD_NEW_DTD=DTD File
-_UI_CREATE_NEW_DTD_FILE=Create a new DTD file
-_UI_XML_TOOLS_PREFERENCE_PAGE=XML
-_UI_DTD_EDITOR_PREFERENCE=DTD
-
-! GenerateDTDActionDelegate - XML validation check
-_UI_DIALOG_TITLE_XML_ERROR=Invalid XML
-_UI_DIALOG_INFO_XML_INVALID=The XML file contains errors. Open it in the XML editor and validate it for details.
-
-!
-! Preference Page
-!
-_UI_SEPARATE_DESIGN_AND_SOURCE_VIEW=Separate design and source view
-_UI_COMBINED_DESIGN_AND_SOURCE_VIEW=Combined design and source view
-_UI_LABEL_EDITOR_LAYOUT=Editor Layout
-_UI_LABEL_DTD_FILES=DTD Files
-_UI_LABEL_DTD_STYLES=DTD Styles
-
-!AddAttributeAction
-_UI_DEFAULT_NEW_ATTRIBUTE=Attribute
-_UI_ACTION_DTD_ADD_ATTRIBUTE=Add Attribute
-_UI_ACTION_DTD_ADD_ELEMENT=Add Element
-
-!actions/AddGroupToContentModelAction.java
-_UI_ACTION_ADD_GROUP=Add &Group
-
-!AddEntityAction
-_UI_ACTION_ADD_ENTITY=Add &Entity
-
-
-! Flat Page Header Text
-_UI_PAGE_HEADING_ELEMENT=Element
-_UI_PAGE_HEADING_ATTRIBUTE=Attribute
-_UI_PAGE_HEADING_NOTATION=Notation
-_UI_PAGE_HEADING_PARAM_ENTITY_REF=External Parameter Entity Reference
-_UI_PAGE_HEADING_ENTITY=Entity
-_UI_PAGE_HEADING_COMMENT=Comment
-_UI_PAGE_HEADING_ATTLIST=Attribute List
-_UI_PAGE_HEADING_CONTENT_MODEL=Content Model
-_UI_PAGE_HEADING_CONTENT_MODEL_GROUP=Content Model Group
-
-!BlankWindow
-_UI_LABEL_VIEW_NOT_AVAILABLE=View is not available for selected object.
-
-!AttributeWindow
-_UI_ACTION_NOTATION_INFO=Attribute Information
-_UI_LABEL_ATTRIBUTE_NAME=Name:
-_UI_LABEL_ATTRIBUTE_TYPE=Type:
-_UI_RADIO_DEFAULT=Default
-_UI_GROUP_ENUMERATED_DEFAULTS=Enumerated defaults
-_UI_BUTTON_ADD=Add >>
-_UI_BUTTON_REMOVE=<< Remove
-_UI_CHKBOX_DEFAULT=Default
-_UI_GROUP_ELEMENT_COMMENT=Comment
-_UI_CHKBOX_ENUMERATED_DEFAULT=Default
-_UI_CHKBOX_NOTATION_COMBO=Default
-_UI_GROUP_ATTRIBUTE=Attribute default value
-
-!ContentWindow & ElementWindow
-_UI_LABEL_DTD_NAME=Name
-_UI_GROUP_OCCURRENCE=Occurrence
-
-!the following four symbols are also used in dtdeditor/presentation/GroupContentWindow.java
-!! NOTE TO TRANSLATOR: Please keep the characters in parentheses in translated text i.e. (1)
-_UI_RADIO_JUST_ONCE=Just once (1)
-_UI_RADIO_ONE_OR_MORE=One or more (+)
-_UI_RADIO_OPTIONAL=Optional (?)
-_UI_RADIO_ZERO_OR_MORE=Zero or more (*)
-
-!context menu for .dtd files
-_UI_MENU_GENERATE=&Generate
-_UI_MENU_JAVA=&Java Beans...
-_UI_MENU_XML_SCHEMA=XML &Schema...
-_UI_MENU_HTML_FORM=&HTML Form...
-
-!presentation/DTDContextContributor.java
-_UI_MENU_GENERATE_JAVA=Generate &Java Beans...
-_UI_MENU_GENERATE_XML_SCHEMA=Generate &XML Schema...
-_UI_MENU_GENERATE_HTML_FORM=Generate &HTML Form...
-_UI_MENU_GENERATE_SAMPLE_XML=Generate XM&L...
-_UI_MENU_VALIDATE_DTD=&Validate DTD
-_UI_TOOLTIP_VALIDATE_DTD=Validate the current state of the DTD
-_UI_TOOLTIP_GENERATE_HTML=Generate an HTML form for the DTD
-_UI_TOOLTIP_GENERATE_SAMPLE_XML=Generate an XML from the DTD
-_UI_TOOLTIP_GENERATE_XML_SCHEMA=Generate an XML Schema from the DTD
-_UI_TOOLTIP_GENERATE_JAVA=Generate Java Beans for the DTD
-
-_UI_ACTION_DELETE=Delete
-_UI_ACTION_CONTEXT_ADD_NOTATION=Add &Notation
-_UI_TOOLTIP_ADD_NOTATION=Add a notation to the DTD.
-_UI_ACTION_CONTEXT_ADD_ENTITY=Add &Entity
-_UI_TOOLTIP_ADD_ENTITY=Add an entity to the DTD.
-_UI_ACTION_CONTEXT_ADD_ELEMENT=Add Ele&ment
-_UI_TOOLTIP_ADD_ELEMENT=Add an element to the DTD.
-_UI_ACTION_CONTEXT_ADD_ATTRIBUTE=Add Attribute
-_UI_TOOLTIP_ADD_ATTRIBUTE_SELECTED=Add an attribute to the selected element.
-_UI_ACTION_ADD_ATTRIBUTELIST=Add Attribute &List
-_UI_TOOLTIP_ADD_ATTRIBUTELIST_SELECTED=Add an attribute list to the selected element.
-_UI_ACTION_ADD_GROUP_CONTENT=Add Group To Con&tent Model
-_UI_TOOLTIP_ADD_GROUP=Add a group to the content model of the selected group or element.
-_UI_ACTION_ADD_ELEMENT_CONTENT=Add Element To C&ontent Model
-_UI_TOOLTIP_ADD_ELEMENT_CONTENT=Add an element to the content model.
-_UI_MENU_DTD_EDITOR=&DTD
-_UI_TOOLTIP_ADD_COMMENT=Add a comment to the DTD.
-
-!presentation/DTDEditor.java
-_UI_WORKBOOKPAGE_SOURCE=Source
-_UI_WORKBOOKPAGE_DESIGN=Design
-
-!the following is used: _UI_MENU_UNDO_1 + _UI_MENU_UNDO_2
-_UI_MENU_UNDO_1=&Undo
-!! NOTE TO TRANSLATOR: Do not translate following line - shortcut key
-_UI_MENU_UNDO_2=@Ctrl+Z
-
-!the following is used: _UI_MENU_UNDO_DESC + a description of the command to be undone
-_UI_MENU_UNDO_DESC=Undo:
-
-!the following is used: _UI_MENU_REDO_1 + _UI_MENU_REDO_2
-_UI_MENU_REDO_1=&Redo
-!! NOTE TO TRANSLATOR: Do not translate following line - shortcut key
-_UI_MENU_REDO_2=@Ctrl+Y
-
-!the following is used: _UI_MENU_REDO_DESC + a description of the command to be done again
-_UI_MENU_REDO_DESC=Redo:
-
-!presentation/ElementWindow
-_UI_ELEMENT_NAME=Name
-_UI_ELEMENT_COMMENT=Comment
-
-!DTDOutliner
-_UI_ACTION_ADD_DTD_NOTATION=Add &Notation
-_UI_ACTION_ADD_DTD_ENTITY=Add &Entity
-_UI_ACTION_ADD_DTD_ELEMENT=Add Ele&ment
-_UI_ACTION_ADD_DTD_COMMENT=Add &Comment
-_UI_ACTION_DTD_DELETE=&Delete
-_UI_ACTION_ADD_ATTRIBUTE=Add &Attribute
-_UI_ACTION_GROUP_ADD_GROUP=Add Group to Con&tent Model
-_UI_ACTION_ADD_ELEMENT=Add Element to C&ontent Model
-
-!DTDContentOutlinePage
-_UI_BUTTON_GROUP_ITEMS_LOGICALLY=Group items logically.
-_UI_BUTTON_UNGROUP_ITEMS_LOGICALLY=Do not group items logically.
-_UI_BUTTON_SORT_ITEMS=Sort items alphabetically.
-_UI_BUTTON_UNSORT_ITEMS=Do not sort items alphabetically.
-
-!provider/EntityItemProvider.java
-_UI_COLUMN_PARAMETER=Parameter
-_UI_COLUMN_GENERAL=General
-
-!provider/FolderItemProvider.java
-_UI_LABEL_ELEMENTS_FOLDER=Elements
-_UI_LABEL_NOTATIONS_FOLDER=Notations
-_UI_LABEL_ENITIES_FOLDER=Entities
-
-!Wizards/InputSelectionPage.java
-_UI_BUTTON_SELECT_ALL=&Select All
-_UI_BUTTON_UNSELECT_ALL=&Clear All
-
-!Wizards/HTMLFormWizard.java
-_UI_HTML_WIZARD_NEW_FILE_TITLE=Generate HTML Form
-_UI_HTML_WIZARD_NEW_FILE_DESC=Generate an HTML form from the selected DTD file.
-
-!Wizards/NewDTDWizard.java
-_UI_WIZARD_NEW_DTD_TITLE=Create DTD
-_UI_WIZARD_CREATE_DTD_HEADING=Create DTD File
-_UI_WIZARD_CREATE_DTD_EXPL=Select how you would like to create your DTD file.
-_UI_RADIO_CREATE_DTD=Create DTD file from scratch
-_UI_RADIO_CREATE_DTD_FROM_XML=Create DTD file from an XML file
-
-_UI_WIZARD_NEW_DTD_HEADING=New DTD
-_UI_WIZARD_NEW_DTD_EXPL=Create a new DTD file. Specify the folder and name for the file.
-
-_UI_WIZARD_NEW_XSD_HEADING=New XML Schema
-_UI_WIZARD_NEW_XSD_EXPL=Create a new XML Schema file from the XML file.
-
-_UI_WIZARD_XML_FILE_HEADING=XML Files
-_UI_WIZARD_XML_FILE_EXPL=Select the XML files to create the DTD file from.
-_UI_LABEL_XML_FILES=XML Files:
-
-_UI_STATUS_XML_CONTAINS_ERRORS=XML files specified contained errors.
-_UI_BUTTON_ADD_XML=Add...
-_UI_BUTTON_REMOVE_XML=Remove
-
-!wizards/ServletNamePage
-_UI_WIZARD_SERVLET_NAME_HEADING=Servlet Name
-_UI_LABEL_SERVLET_NAME=&Enter the servlet name:
-_UI_LABEL_MISSING_SERVLET_NAME=Provide a servlet name
-_UI_LABEL_DEFAULT_SERVLET_NAME=http://localhost/servlet/testServlet
-
-!wizards/GenerateXMLSchemaHelper.java & DTD2XSDWizard.java
-_UI_WIZARD_DTD2XSD_TITLE=Generate
-_UI_GENERATE_XSD_TITLE=Generate XML Schema
-_UI_GENERATE_XSD_DESCRIPTION=Generate an XML schema from the selected DTD file.
-_UI_PAGE_GEN_OPTIONS_TITLE=XML Schema Generation Options
-_UI_PAGE_GEN_OPTIONS_DESC=Select how you want your XML schema generated
-_UI_GENERATE_XSD_LONG_DESC=You can create one XML schema file that includes the selected DTD and any of the DTDs it references. Alternatively, you can create individual schema files that correspond to the selected DTD and any of the DTDs it references.
-
-
-_UI_GROUP_OPTIONS=Options
-_UI_BUTTON_GEN_ONE_SCHEMA=&Create one XML schema that includes all the DTD files
-_UI_BUTTON_GEN_MULTI_SCHEMAS=Create an &XML schema for each DTD file
-
-!EntityWindow
-_UI_GROUP_ENTITY_INFORMATION=Entity information
-_UI_LABEL_NAME=Name:
-_UI_LABLE_TYPE=Type:
-_UI_RADIO_GENERAL=General
-_UI_RADIO_PARAMETER=Parameter
-_UI_CHKBOX_EXTERNAL=External
-_UI_GROUP_INTERNAL=Internal Entity
-_UI_DIALOG_SELECT_DTD=Select System ID File
-_UI_DIALOG_SELECT_DTD_DESC=Please select a resource to be used for the System ID.
-_UI_GROUP_INTERNAL_ENTITY=Internal entity
-_UI_LABEL_VALUE_INTERNAL=Value:
-_UI_GROUP_EXTERNAL_ENTITY=External entity
-_UI_LABEL_VALUE=Value
-_UI_GROUP_COMMENT=Comment
-_UI_LABEL_SYSTEM_ID=System ID:
-_UI_BUTTON_SELECT=Select...
-_UI_LABEL_PUBLIC_ID=Public ID:
-_UI_LABEL_NOTATION_NAME=Notation name
-_UI_LABEL_UNPARSE_ENTITY=(Unparsed entity)
-_UI_TOOLTIP_GENERAL=Use entity in XML documents.
-_UI_TOOLTIP_PARAMETER=Use entity in a DTD.
-_UI_TOOLTIP_EXTERNAL=Refer to an external DTD.
-_UI_LABEL_BROWSE=Browse...
-
-!presentation/NotationsTable.java
-_UI_COLUMN_NOTATION_NAME=Notation Name
-_UI_COLUMN_DECLARATION=Declaration
-
-!GroupContentWindow
-_UI_GROUP_MODEL_GROUP=Model group
-_UI_GROUP_CONNECTOR=Connector
-_UI_GROUP_MODEL_GROUP_OCCURRENCE=Occurrence
-_UI_RADIO_SEQUENCE=Sequence (,)
-_UI_RADIO_CHOICE=Choice (|)
-_UI_LABEL_CONTENT_MODEL_TYPE=Content model type:
-
-!EntitiesTable
-_UI_COLUMN_ENTITY_NAME=Entity Name
-_UI_COLUMN_TYPE=Type
-_UI_COLUMN_DECLARATION=Declaration
-
-!AddNotationAction
-_UI_DEFAULT_NOTATION=Notation
-_UI_ACTION_ADD_NOTATION=Add &Notation
-
-!ElementsTable
-_UI_COLUMN_ELEMENT_NAME=Element Name
-_UI_COLUMN_CONTENT_MODEL=Content Model
-_UI_COLUMN_ATTRIBUTES=Attributes
-
-!ValidateDTDAction
-_UI_MSGBOX_DTD_VALID_TITLE=Validation Successful
-_UI_MSGBOX_DTD_VALID_TEXT=The DTD file is valid.
-
-!NotationWindow
-_UI_LABEL_NOTATION_INFORMATION=Notation information
-_UI_LABEL_NOTATION_NAME=Name:
-_UI_LABEL_NOTATION_SYSTEM_ID=System ID:
-_UI_LABEL_NOTATION_PUBLIC_ID=Public ID:
-_UI_LABEL_NOTATION_COMMENT=Comment
-
-!ParameterEntityReferenceWindow
-_UI_GROUP_EXTERNAL_PARM_ENTITY_REF=External parameter entity reference
-_UI_LABEL_ENTITY_NAME=Entity name:
-_UI_LABEL_REFERENCED_FILE=Referenced file:
-
-!InputSelectionPage (HTMLFormWizard)
-_UI_INPUT_SEL_PAGE_TITLE=Form Input Selection
-_UI_INPUT_SEL_PAGE_DESC=Select the form input fields to be generated
-
-!HTMLFormWizard (HTMLFormWizard)
-_UI_HTML_WIZARD_TITLE=HTML Form Creation Wizard
-
-! ParameterEntityReferenceWindow
-_UI_BUTTON_DETAILS=Details...
-
-!DTDContextContributer
-_UI_ACTION_ADD_PARAM_ENTITY_REF=Add &Parameter Entity Reference
-
-!DragAttributeCommand
-_UI_MOVE_ATTRIBUTE=Move Attribute
-
-!DragContentModelCommand
-_UI_MOVE_CONTENT=Move Content
-
-!DragTopLevelNodesCommand
-_UI_MOVE_NODE=Move Node
-_UI_MOVE_NODES=Move Nodes
-
-!DTDValidator
-_UI_DTD_VALIDATOR=DTD Validator
-
-_ERROR_MIN_ONE_XML_FILE=At least one XML File must be added
-_ERROR_MIN_ONE_XML_FILE_FOR_OP=At least one XML file is required to perform the operation.
-_ERROR_NO_FILENAME=Enter a file name
-_ERROR_FILE_DOES_NOT_EXIST=File does not exist
-_ERROR_FILENAME_INVALID=Invalid file name
-_ERROR_FILENAME_MUST_END_DTD=The file name must end in .dtd
-_ERROR_TITLE_GENERATE_DTD_FAILED=Generate DTD failed
-_ERROR_MSG_GENERATE_DTD_FAILED=Errors were encountered while generating the DTD.
-
-_ERROR_INVALID_NAME_SPACE=Name field cannot contain a space
-_ERROR_VALIDATE_FAILED=Validation failed
-_ERROR_DTD_INVALID=The DTD file is invalid. Please check the Tasks view for more details.
-_ERROR_LIMITE_EXCEEDED=The DTD file is not valid. The message limit for the Tasks view has been exceeded. Please increase the limit and try again.
-
-_ERROR_TITLE_GENERATE_JAVABEAN_FAILED=Generate Java Beans failed
-_ERROR_MSG_GENERATE_JAVABEAN_FAILED=Errors were encountered while generating the Java Beans.
-DTDColorPage.0=<\!ELEMENT Main (One,Two+)>\r\n<\!ELEMENT One (Three,Four)>\r\n<\!ATTLIST One\r\n oneone CDATA \#REQUIRED\r\n>\r\n<\!-- You need this -->\r\n<\!ELEMENT Two (moremore*)>\r\n<\!ATTLIST Two\r\n twotwo CDATA \#REQUIRED\r\n twothree (aaa | bbb) "aaa"\r\n>\r\n
-DTDColorPage.1=Comments
-DTDColorPage.2=Data
-DTDColorPage.3=Default
-DTDColorPage.4=Keywords
-DTDColorPage.5=Strings
-DTDColorPage.6=Symbols
-DTDColorPage.7=Tag Delimiters
-DTDColorPage.8=Tag Names
-DTDPropertySourceAdapter.0=Name
-DTDPropertySourceAdapter.1=Contents
-DTDPropertySourceAdapter.2=Attributes
diff --git a/bundles/org.eclipse.wst.dtd.ui/plugin.xml b/bundles/org.eclipse.wst.dtd.ui/plugin.xml
deleted file mode 100644
index d4573154a8..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/plugin.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.dtd.ui"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.wst.dtd.ui.internal.DTDUIPlugin">
-
- <runtime>
- <library name="dtdeditor.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.wst.sse.ui"/>
- <import plugin="org.eclipse.wst.xml.core"/>
- <import plugin="org.eclipse.wst.dtd.core"/>
- <import plugin="org.eclipse.wst.sse.core"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.workbench"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.wst.common.encoding"/>
- <import plugin="org.eclipse.wst.common.ui"/>
- </requires>
-
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- name="%DTD_Source_Page_Editor.name"
- icon="icons/DTDFile.gif"
- extensions="dtd,ent,mod"
- contributorClass="org.eclipse.wst.dtd.ui.ActionContributorDTD"
- class="org.eclipse.wst.dtd.ui.StructuredTextEditorDTD"
- symbolicFontName="org.eclipse.wst.sse.ui.textfont"
- id="org.eclipse.wst.dtd.ui.StructuredTextEditorDTD">
- </editor>
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.extendedconfiguration">
- <configuration
- type="contentoutlineconfiguration"
- class="org.eclipse.wst.dtd.ui.views.contentoutline.DTDContentOutlineConfiguration"
- target="org.eclipse.wst.dtd.core.dtdsource"/>
- <configuration
- type="textviewerconfiguration"
- class="org.eclipse.wst.dtd.ui.StructuredTextViewerConfigurationDTD"
- target="org.eclipse.wst.dtd.core.dtdsource"/>
- <configuration
- type="characterpairmatcher"
- class="org.eclipse.wst.dtd.ui.text.DTDDocumentRegionEdgeMatcher"
- target="org.eclipse.wst.dtd.core.dtdsource"/>
- <definition
- type="preferencepages"
- value="org.eclipse.wst.sse.ui.preferences/org.eclipse.wst.sse.ui.preferences.dtd"
- target="org.eclipse.wst.dtd.core.dtdsource"/>
- </extension>
- <extension
- point="org.eclipse.core.filebuffers.annotationModelCreation">
- <factory
- contentTypeId="org.eclipse.wst.dtd.core.dtdsource"
- class="org.eclipse.wst.sse.ui.StructuredResourceMarkerAnnotationModelFactory"/>
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.adapterFactoryDescription">
- <adapterFactoryDescription
- class="org.eclipse.wst.dtd.ui.registry.AdapterFactoryProviderForDTD">
- <contentType id="org.eclipse.wst.dtd.core.dtdsource"/>
- </adapterFactoryDescription>
- </extension>
-<!-- Editor actionsets -->
- <extension
- point="org.eclipse.ui.actionSetPartAssociations">
- <actionSetPartAssociation
- targetID="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
- <part
- id="org.eclipse.wst.dtd.ui.StructuredTextEditorDTD">
- </part>
- </actionSetPartAssociation>
- <actionSetPartAssociation
- targetID="org.eclipse.ui.NavigateActionSet">
- <part
- id="org.eclipse.wst.dtd.ui.StructuredTextEditorDTD">
- </part>
- </actionSetPartAssociation>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%_UI_LABEL_DTD_FILES"
- category="org.eclipse.wst.sse.ui.preferences"
- class="org.eclipse.wst.dtd.ui.preferences.DTDFilesPreferencePage"
- id="org.eclipse.wst.sse.ui.preferences.dtd">
- </page>
- <page
- name="%_UI_LABEL_DTD_STYLES"
- category="org.eclipse.wst.sse.ui.preferences.dtd"
- class="org.eclipse.wst.dtd.ui.preferences.DTDColorPage"
- id="org.eclipse.wst.sse.ui.preferences.dtd.styles">
- </page>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/ActionContributorDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/ActionContributorDTD.java
deleted file mode 100644
index b09a0822c0..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/ActionContributorDTD.java
+++ /dev/null
@@ -1,41 +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.dtd.ui;
-
-import org.eclipse.wst.sse.ui.edit.util.ActionContributor;
-
-/**
- * XMLEditorActionContributor
- *
- * This class should not be used inside multi page editor's
- * ActionBarContributor, since cascaded init() call from the
- * ActionBarContributor will causes exception and it leads to lose whole
- * toolbars.
- *
- * Instead, use SourcePageActionContributor for source page contributor of
- * multi page editor.
- *
- * Note that this class is still valid for single page editor.
- */
-public class ActionContributorDTD extends ActionContributor {
- protected static final String[] EDITOR_IDS = {"org.eclipse.wst.dtd.ui.StructuredTextEditorDTD", "org.eclipse.wst.sse.ui.StructuredTextEditor"}; //$NON-NLS-1$ //$NON-NLS-2$
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.edit.util.ActionContributor#getExtensionIDs()
- */
- protected String[] getExtensionIDs() {
- return EDITOR_IDS;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/DTDEditorPlugin.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/DTDEditorPlugin.java
deleted file mode 100644
index 1e2eb099ef..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/DTDEditorPlugin.java
+++ /dev/null
@@ -1,21 +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.dtd.ui;
-
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-
-/**
- * @deprecated use internal DTDUIPlugin class instead if possible
- */
-public class DTDEditorPlugin extends DTDUIPlugin {
- // see org.eclipse.wst.dtd.ui.internal.DTDUIPlugin
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextEditorDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextEditorDTD.java
deleted file mode 100644
index 59e8671b57..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextEditorDTD.java
+++ /dev/null
@@ -1,24 +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.dtd.ui;
-
-import org.eclipse.wst.dtd.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class StructuredTextEditorDTD extends StructuredTextEditor {
- protected void initializeEditor() {
- super.initializeEditor();
- setHelpContextId(IHelpContextIds.DTD_SOURCEVIEW_HELPID);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextViewerConfigurationDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextViewerConfigurationDTD.java
deleted file mode 100644
index 9ede889f91..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextViewerConfigurationDTD.java
+++ /dev/null
@@ -1,97 +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.dtd.ui;
-
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.wst.dtd.core.rules.StructuredTextPartitionerForDTD;
-import org.eclipse.wst.dtd.ui.style.LineStyleProviderForDTD;
-import org.eclipse.wst.dtd.ui.taginfo.DTDBestMatchHoverProcessor;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.style.Highlighter;
-import org.eclipse.wst.sse.ui.style.IHighlighter;
-import org.eclipse.wst.sse.ui.style.LineStyleProvider;
-import org.eclipse.wst.sse.ui.style.LineStyleProviderForNoOp;
-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;
-
-
-/**
- * Provides the best dtd hover help documentation (by using other hover help
- * processors) Priority of hover help processors is: ProblemHoverProcessor,
- * AnnotationHoverProcessor
- */
-public class StructuredTextViewerConfigurationDTD extends StructuredTextViewerConfiguration {
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- if (configuredContentTypes == null) {
- configuredContentTypes = new String[]{StructuredTextPartitionerForDTD.ST_DTD_DEFAULT, StructuredTextPartitioner.ST_DEFAULT_PARTITION, StructuredTextPartitioner.ST_UNKNOWN_PARTITION};
- }
- return configuredContentTypes;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration#getHighlighter(org.eclipse.jface.text.source.ISourceViewer)
- */
- public IHighlighter getHighlighter(ISourceViewer viewer) {
- if (fHighlighter == null) {
- fHighlighter = new Highlighter();
- }
-
- // We need to add the providers each time this method is called.
- // See StructuredTextViewer.configure() method (defect#246727)
- LineStyleProvider dtdProvider = new LineStyleProviderForDTD();
- LineStyleProvider noopProvider = new LineStyleProviderForNoOp();
-
- // com.ibm.sed.editor.ST_DEFAULT
- fHighlighter.addProvider(StructuredTextPartitionerForDTD.ST_DTD_DEFAULT, dtdProvider);
- fHighlighter.addProvider(StructuredTextPartitioner.ST_DEFAULT_PARTITION, dtdProvider);
- fHighlighter.addProvider(StructuredTextPartitioner.ST_UNKNOWN_PARTITION, noopProvider);
-
- //fHighlighter.setModel(((StructuredTextViewer) viewer).getModel());
- fHighlighter.setDocument((IStructuredDocument) viewer.getDocument());
-
- return fHighlighter;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getTextHover(org.eclipse.jface.text.source.ISourceViewer,
- * java.lang.String, int)
- */
- public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) {
- // content type does not really matter since only combo, problem,
- // annotation hover is available
- TextHoverManager.TextHoverDescriptor[] hoverDescs = getTextHovers();
- int i = 0;
- while (i < hoverDescs.length) {
- if (hoverDescs[i].isEnabled() && EditorUtility.computeStateMask(hoverDescs[i].getModifierString()) == stateMask) {
- String hoverType = hoverDescs[i].getId();
- if (TextHoverManager.COMBINATION_HOVER.equalsIgnoreCase(hoverType))
- return new DTDBestMatchHoverProcessor();
- else if (TextHoverManager.PROBLEM_HOVER.equalsIgnoreCase(hoverType))
- return new ProblemAnnotationHoverProcessor();
- else if (TextHoverManager.ANNOTATION_HOVER.equalsIgnoreCase(hoverType))
- return new AnnotationHoverProcessor();
- }
- i++;
- }
- return super.getTextHover(sourceViewer, contentType, stateMask);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DTDDragAndDropManager.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DTDDragAndDropManager.java
deleted file mode 100644
index 990d0128eb..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DTDDragAndDropManager.java
+++ /dev/null
@@ -1,46 +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.dtd.ui.dnd;
-
-import java.util.Collection;
-
-import org.eclipse.wst.common.ui.dnd.DragAndDropCommand;
-import org.eclipse.wst.common.ui.dnd.DragAndDropManager;
-import org.eclipse.wst.dtd.core.Attribute;
-import org.eclipse.wst.dtd.core.CMNode;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.TopLevelNode;
-
-public class DTDDragAndDropManager implements DragAndDropManager {
-
- public DragAndDropCommand createCommand(Object target, float location, int operations, int operation, Collection source) {
- if (target instanceof DTDNode) {
- DTDNode node = (DTDNode) target;
-
- if (node instanceof TopLevelNode) {
- return new DragTopLevelNodesCommand(target, location, operations, operation, source);
- }
- if (node instanceof Attribute) {
- return new DragAttributeCommand(target, location, operations, operation, source);
- }
- if (node instanceof CMNode) {
- return new DragContentModelCommand(target, location, operations, operation, source);
- }
-
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragAttributeCommand.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragAttributeCommand.java
deleted file mode 100644
index 997e20cabe..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragAttributeCommand.java
+++ /dev/null
@@ -1,61 +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.dtd.ui.dnd;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.wst.common.ui.dnd.DefaultDragAndDropCommand;
-import org.eclipse.wst.dtd.core.Attribute;
-import org.eclipse.wst.dtd.core.AttributeList;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-
-
-
-public class DragAttributeCommand extends DefaultDragAndDropCommand {
-
- public DragAttributeCommand(Object target, float location, int operations, int operation, Collection sources) {
- super(target, location, operations, operation, sources);
- }
-
- public boolean canExecute() {
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- Object source = iter.next();
- if (!(source instanceof Attribute)) {
- return false;
- }
- }
- return true;
- }
-
- public void execute() {
- DTDNode referenceNode = (DTDNode) target;
- DTDFile dtdFile = referenceNode.getDTDFile();
- if (referenceNode instanceof Attribute) {
- dtdFile.getDTDModel().beginRecording(this, DTDUIPlugin.getResourceString("_UI_MOVE_ATTRIBUTE")); //$NON-NLS-1$
- AttributeList attList = (AttributeList) referenceNode.getParentNode();
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (node instanceof Attribute) {
- attList.insertIntoModel(this, (Attribute) referenceNode, (Attribute) node, isAfter());
- dtdFile.deleteNode(this, node);
- }
- }
- dtdFile.getDTDModel().endRecording(this);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragContentModelCommand.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragContentModelCommand.java
deleted file mode 100644
index 79655f685c..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragContentModelCommand.java
+++ /dev/null
@@ -1,111 +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.dtd.ui.dnd;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.wst.common.ui.dnd.DefaultDragAndDropCommand;
-import org.eclipse.wst.dtd.core.CMBasicNode;
-import org.eclipse.wst.dtd.core.CMGroupNode;
-import org.eclipse.wst.dtd.core.CMNode;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-
-
-public class DragContentModelCommand extends DefaultDragAndDropCommand {
-
- public DragContentModelCommand(Object target, float location, int operations, int operation, Collection sources) {
- super(target, location, operations, operation, sources);
- }
-
- public boolean canExecute() {
- if (!(target instanceof CMNode)) {
- return false;
- }
-
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- Object source = iter.next();
- if (!(source instanceof CMNode)) {
- return false;
- }
- }
- return true;
- }
-
- public void execute() {
- DTDNode referenceNode = (DTDNode) target;
-
- if (referenceNode instanceof CMNode) {
- DTDFile dtdFile = referenceNode.getDTDFile();
-
- DTDNode parent = (DTDNode) referenceNode.getParentNode();
- dtdFile.getDTDModel().beginRecording(this, DTDUIPlugin.getResourceString("_UI_MOVE_CONTENT")); //$NON-NLS-1$
- boolean parentIsElement = false;
- Element element = null;
- CMGroupNode group = null;
- if (parent instanceof Element) {
- parentIsElement = true;
- element = (Element) parent;
- } else {
- group = (CMGroupNode) parent;
- }
-
- if (element == null && group == null) {
- // no parent to add to
- return;
- }
-
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (node instanceof CMNode) {
- if (parentIsElement) {
- if (element.getContentModel() == node) {
- continue;
- }
- element.replaceContentModel(this, (CMNode) node);
- } else {
- if (referenceNode == node || (isAfter() && referenceNode.getNextSibling() == node) || (!isAfter() && node.getNextSibling() == referenceNode)) {
- continue;
- }
-
- group.insertIntoModel(this, (CMNode) referenceNode, (CMNode) node, isAfter());
-
- }
- DTDNode nodeParent = (DTDNode) node.getParentNode();
- nodeParent.delete(this, node);
- }
- }
- dtdFile.getDTDModel().endRecording(this);
- }
- }
-
- public int getFeedback() {
- DTDNode referenceNode = (DTDNode) target;
- if (referenceNode instanceof CMNode) {
- CMNode cmNode = (CMNode) referenceNode;
- if (cmNode.isRootElementContent() && cmNode instanceof CMBasicNode) {
- return DND.FEEDBACK_SELECT;
- }
- }
-
- return super.getFeedback();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragTopLevelNodesCommand.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragTopLevelNodesCommand.java
deleted file mode 100644
index 7909c41336..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/dnd/DragTopLevelNodesCommand.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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-
-
-package org.eclipse.wst.dtd.ui.dnd;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.wst.common.ui.dnd.DefaultDragAndDropCommand;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.TopLevelNode;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-
-public class DragTopLevelNodesCommand extends DefaultDragAndDropCommand {
-
- static private final String moveNode = DTDUIPlugin.getResourceString("_UI_MOVE_NODE"); //$NON-NLS-1$
- static private final String moveNodes = DTDUIPlugin.getResourceString("_UI_MOVE_NODES"); //$NON-NLS-1$
-
- public DragTopLevelNodesCommand(Object target, float location, int operations, int operation, Collection sources) {
- super(target, location, operations, operation, sources);
- }
-
- public boolean canExecute() {
- if (!(target instanceof TopLevelNode)) {
- return false;
- }
-
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- Object source = iter.next();
- if (!(source instanceof TopLevelNode)) {
- return false;
- }
- }
- return true;
- }
-
- public void execute() {
- DTDNode referenceNode = (DTDNode) target;
-
- DTDFile dtdFile = referenceNode.getDTDFile();
- dtdFile.getDTDModel().beginRecording(this, sources.size() > 1 ? moveNodes : moveNode);
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (node instanceof TopLevelNode) {
- dtdFile.moveNode(this, referenceNode, node, isAfter());
- }
- }
- dtdFile.getDTDModel().endRecording(this);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java
deleted file mode 100644
index 5b2028ef36..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java
+++ /dev/null
@@ -1,152 +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.dtd.ui.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.dtd.ui.style.IStyleConstantsDTD;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-import org.eclipse.wst.sse.ui.preferences.ui.ColorHelper;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class DTDUIPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static DTDUIPlugin plugin;
-
- /**
- * Returns the shared instance.
- */
- public static DTDUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle, or 'key' if not
- * found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = DTDUIPlugin.getDefault()
- .getResourceBundle();
- try {
- if (bundle != null)
- return bundle.getString(key);
- else
- return key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public DTDUIPlugin() {
- super();
- plugin = this;
- try {
- //resourceBundle =
- // ResourceBundle.getBundle("org.eclipse.wst.dtd.ui.DTDPluginResources");
- resourceBundle = Platform.getResourceBundle(Platform
- .getBundle("org.eclipse.wst.dtd.ui"));
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
-
- // Force a call to initialize default preferences since
- // initializeDefaultPreferences is only called if *this* plugin's
- // preference store is accessed
- initializeDefaultDTDPreferences(SSEUIPlugin.getDefault()
- .getPreferenceStore());
-
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
- private void initializeDefaultDTDPreferences(IPreferenceStore store) {
- String ctId = IContentTypeIdentifier.ContentTypeID_DTD;
-
- // DTD Style Preferences
- String NOBACKGROUNDBOLD = " | null | false"; //$NON-NLS-1$
- String styleValue = ColorHelper.getColorString(0, 0, 0)
- + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(
- IStyleConstantsDTD.DTD_DEFAULT, ctId), styleValue); //black
-
- styleValue = ColorHelper.getColorString(63, 63, 191) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(
- IStyleConstantsDTD.DTD_TAG, ctId), styleValue); // blue
- store.setDefault(PreferenceKeyGenerator.generateKey(
- IStyleConstantsDTD.DTD_TAGNAME, ctId), styleValue); // blue
-
- styleValue = ColorHelper.getColorString(127, 127, 127)
- + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(
- IStyleConstantsDTD.DTD_COMMENT, ctId), styleValue); // grey
-
- styleValue = ColorHelper.getColorString(128, 0, 0) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(
- IStyleConstantsDTD.DTD_KEYWORD, ctId), styleValue); // dark
- // red
-
- styleValue = ColorHelper.getColorString(63, 159, 95) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(
- IStyleConstantsDTD.DTD_STRING, ctId), styleValue); //green
-
- styleValue = ColorHelper.getColorString(191, 95, 95) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(
- IStyleConstantsDTD.DTD_DATA, ctId), styleValue); // light
- // red
-
- styleValue = ColorHelper.getColorString(128, 0, 0) + NOBACKGROUNDBOLD;
- store.setDefault(PreferenceKeyGenerator.generateKey(
- IStyleConstantsDTD.DTD_SYMBOL, ctId), styleValue); // dark
- // red
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeDefaultPluginPreferences()
- */
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- // ignore this preference store
- // use EditorPlugin preference store
- IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore();
- initializeDefaultDTDPreferences(editorStore);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImageHelper.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImageHelper.java
deleted file mode 100644
index fac885cf70..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImageHelper.java
+++ /dev/null
@@ -1,155 +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.dtd.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.dtd.ui.internal.DTDUIPlugin;
-
-
-/**
- * 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 DTDEditorPluginImageHelper {
- private static DTDEditorPluginImageHelper instance = null;
-
- /**
- * Gets the instance.
- *
- * @return Returns a DTDEditorPluginImageHelper
- */
- public synchronized static DTDEditorPluginImageHelper getInstance() {
- if (instance == null)
- instance = new DTDEditorPluginImageHelper();
- return instance;
- }
-
- // save a descriptor for each image
- private HashMap fImageDescRegistry = null;
- private final String PLUGINID = DTDUIPlugin.getDefault().getBundle().getSymbolicName();
-
- /**
- * 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;
- }
-
- /**
- * 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();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImages.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImages.java
deleted file mode 100644
index 3f0a7807c3..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImages.java
+++ /dev/null
@@ -1,42 +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.dtd.ui.internal.editor;
-
-/**
- * Bundle of most images used by the DTD Source Editor plug-in.
- */
-public class DTDEditorPluginImages {
- public static final String IMG_CTOOL_ADD_ATTRIBUTE = "icons/full/ctool16/ADD_Attribute.gif"; //$NON-NLS-1$
-
- public static final String IMG_CTOOL_ADD_ELEMENT = "icons/full/ctool16/ADD_Element.gif"; //$NON-NLS-1$
-
- public static final String IMG_CTOOL_ADD_ELEMENTTOCONMODEL = "icons/full/ctool16/ADD_ElementToConModel.gif"; //$NON-NLS-1$
-
- public static final String IMG_CTOOL_ADD_GROUPTOCONMODEL = "icons/full/ctool16/ADD_GroupToConModel.gif"; //$NON-NLS-1$
- public static final String IMG_DTOOL_ADD_ATTRIBUTE = "icons/full/dtool16/ADD_Attribute.gif"; //$NON-NLS-1$
- public static final String IMG_DTOOL_ADD_ELEMENT = "icons/full/dtool16/ADD_Element.gif"; //$NON-NLS-1$
- public static final String IMG_DTOOL_ADD_ELEMENTTOCONMODEL = "icons/full/dtool16/ADD_ElementToConModel.gif"; //$NON-NLS-1$
- public static final String IMG_DTOOL_ADD_GROUPTOCONMODEL = "icons/full/dtool16/ADD_GroupToConModel.gif"; //$NON-NLS-1$
- public static final String IMG_ETOOL_ADD_ATTRIBUTE = "icons/full/etool16/ADD_Attribute.gif"; //$NON-NLS-1$
- public static final String IMG_ETOOL_ADD_ELEMENT = "icons/full/etool16/ADD_Element.gif"; //$NON-NLS-1$
- public static final String IMG_ETOOL_ADD_ELEMENTTOCONMODEL = "icons/full/etool16/ADD_ElementToConModel.gif"; //$NON-NLS-1$
- public static final String IMG_ETOOL_ADD_GROUPTOCONMODEL = "icons/full/etool16/ADD_GroupToConModel.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_ADD_COMMENT = "icons/full/obj16/ADD_Comment.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_ADD_ENTITY = "icons/full/obj16/ADD_Entity.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_ADD_ENTITY_REFERENCE = "icons/full/obj16/ADD_Entity_Reference.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_ADD_NOTATION = "icons/full/obj16/ADD_Notation.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_ORGANIZE_DTD_LOGICALLY = "icons/full/obj16/organize_dtd_logically.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SORT = "icons/full/obj16/sort.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_VALIDATE = "icons/full/obj16/validate.gif"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/IHelpContextIds.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/IHelpContextIds.java
deleted file mode 100644
index 4216315bd6..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/IHelpContextIds.java
+++ /dev/null
@@ -1,36 +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.dtd.ui.internal.editor;
-
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-
-/**
- * Help context ids for the DTD Source Editor.
- * <p>
- * This interface contains constants only; it is not intended to be
- * implemented.
- * </p>
- *
- */
-public interface IHelpContextIds {
-
- // org.eclipse.wst.dtd.ui.
- public static final String PREFIX = DTDUIPlugin.getDefault().getBundle().getSymbolicName() + "."; //$NON-NLS-1$
- // DTD Files Preference page
- public static final String DTD_PREFWEBX_FILES_HELPID = PREFIX + "webx0020"; //$NON-NLS-1$
- // DTD Styles Preference page
- public static final String DTD_PREFWEBX_STYLES_HELPID = PREFIX + "webx0021"; //$NON-NLS-1$
-
- // DTD Source page editor
- public static final String DTD_SOURCEVIEW_HELPID = PREFIX + "edtd0000"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDColorPage.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDColorPage.java
deleted file mode 100644
index e8dadcb150..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDColorPage.java
+++ /dev/null
@@ -1,171 +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.dtd.ui.preferences;
-
-import java.util.ArrayList;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.dtd.ui.style.IStyleConstantsDTD;
-import org.eclipse.wst.sse.core.IModelManager;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore.OverlayKey;
-import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-import org.eclipse.wst.sse.ui.preferences.ui.AbstractColorPage;
-import org.eclipse.wst.sse.ui.preferences.ui.StyledTextColorPicker;
-
-public class DTDColorPage extends AbstractColorPage {
-
- protected Control createContents(Composite parent) {
- Composite pageComponent = createComposite(parent, 1);
- ((GridData) pageComponent.getLayoutData()).horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
-
- super.createContents(pageComponent);
- WorkbenchHelp.setHelp(pageComponent, IHelpContextIds.DTD_PREFWEBX_STYLES_HELPID);
-
- return pageComponent;
- }
-
- /**
- * Set up all the style preference keys in the overlay store
- */
- protected OverlayKey[] createOverlayStoreKeys() {
- ArrayList overlayKeys = new ArrayList();
-
- ArrayList styleList = new ArrayList();
- initStyleList(styleList);
- Iterator i = styleList.iterator();
- while (i.hasNext()) {
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceKeyGenerator.generateKey((String) i.next(), IContentTypeIdentifier.ContentTypeID_DTD)));
- }
-
- OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
- overlayKeys.toArray(keys);
- return keys;
- }
-
- protected IPreferenceStore doGetPreferenceStore() {
- return SSEUIPlugin.getDefault().getPreferenceStore();
- }
-
- public String getSampleText() {
- return DTDUIPlugin.getResourceString("DTDColorPage.0"); //$NON-NLS-1$
- }
-
- protected void initContextStyleMap(Dictionary contextStyleMap) {
- contextStyleMap.put(DTDRegionTypes.CONTENT_EMPTY, IStyleConstantsDTD.DTD_DATA);
- contextStyleMap.put(DTDRegionTypes.CONTENT_ANY, IStyleConstantsDTD.DTD_DATA);
- contextStyleMap.put(DTDRegionTypes.CONTENT_PCDATA, IStyleConstantsDTD.DTD_DATA);
- contextStyleMap.put(DTDRegionTypes.NDATA_VALUE, IStyleConstantsDTD.DTD_DATA);
- contextStyleMap.put(DTDRegionTypes.NAME, IStyleConstantsDTD.DTD_DATA);
- contextStyleMap.put(DTDRegionTypes.ENTITY_PARM, IStyleConstantsDTD.DTD_DATA);
-
- contextStyleMap.put(DTDRegionTypes.ELEMENT_TAG, IStyleConstantsDTD.DTD_TAGNAME);
- contextStyleMap.put(DTDRegionTypes.ENTITY_TAG, IStyleConstantsDTD.DTD_TAGNAME);
- contextStyleMap.put(DTDRegionTypes.ATTLIST_TAG, IStyleConstantsDTD.DTD_TAGNAME);
- contextStyleMap.put(DTDRegionTypes.NOTATION_TAG, IStyleConstantsDTD.DTD_TAGNAME);
-
- contextStyleMap.put(DTDRegionTypes.CONNECTOR, IStyleConstantsDTD.DTD_SYMBOL);
- contextStyleMap.put(DTDRegionTypes.OCCUR_TYPE, IStyleConstantsDTD.DTD_SYMBOL);
-
- contextStyleMap.put(DTDRegionTypes.START_TAG, IStyleConstantsDTD.DTD_TAG);
- contextStyleMap.put(DTDRegionTypes.END_TAG, IStyleConstantsDTD.DTD_TAG);
- contextStyleMap.put(DTDRegionTypes.EXCLAMATION, IStyleConstantsDTD.DTD_TAG);
-
- contextStyleMap.put(DTDRegionTypes.COMMENT_START, IStyleConstantsDTD.DTD_COMMENT);
- contextStyleMap.put(DTDRegionTypes.COMMENT_CONTENT, IStyleConstantsDTD.DTD_COMMENT);
- contextStyleMap.put(DTDRegionTypes.COMMENT_END, IStyleConstantsDTD.DTD_COMMENT);
-
- contextStyleMap.put(DTDRegionTypes.SINGLEQUOTED_LITERAL, IStyleConstantsDTD.DTD_STRING);
- contextStyleMap.put(DTDRegionTypes.DOUBLEQUOTED_LITERAL, IStyleConstantsDTD.DTD_STRING);
-
- contextStyleMap.put(DTDRegionTypes.SYSTEM_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.PUBLIC_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.NDATA_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.CDATA_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.ID_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.IDREF_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.IDREFS_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.ENTITY_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.ENTITIES_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.NMTOKEN_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.NMTOKENS_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.NOTATION_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.REQUIRED_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.IMPLIED_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.FIXED_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- }
-
- protected void initDescriptions(Dictionary descriptions) {
- descriptions.put(IStyleConstantsDTD.DTD_COMMENT, DTDUIPlugin.getResourceString("DTDColorPage.1")); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_DATA, DTDUIPlugin.getResourceString("DTDColorPage.2")); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_DEFAULT, DTDUIPlugin.getResourceString("DTDColorPage.3")); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_KEYWORD, DTDUIPlugin.getResourceString("DTDColorPage.4")); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_STRING, DTDUIPlugin.getResourceString("DTDColorPage.5")); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_SYMBOL, DTDUIPlugin.getResourceString("DTDColorPage.6")); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_TAG, DTDUIPlugin.getResourceString("DTDColorPage.7")); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_TAGNAME, DTDUIPlugin.getResourceString("DTDColorPage.8")); //$NON-NLS-1$
- }
-
- protected void initStyleList(ArrayList list) {
- list.add(IStyleConstantsDTD.DTD_COMMENT);
- list.add(IStyleConstantsDTD.DTD_DATA);
- list.add(IStyleConstantsDTD.DTD_DEFAULT);
- list.add(IStyleConstantsDTD.DTD_KEYWORD);
- list.add(IStyleConstantsDTD.DTD_STRING);
- list.add(IStyleConstantsDTD.DTD_SYMBOL);
- list.add(IStyleConstantsDTD.DTD_TAG);
- list.add(IStyleConstantsDTD.DTD_TAGNAME);
- }
-
- public boolean performOk() {
- // required since the superclass *removes* existing preferences before
- // saving its own
- super.performOk();
-
- SSEUIPlugin.getDefault().savePluginPreferences();
- return true;
- }
-
- protected void setupPicker(StyledTextColorPicker picker) {
- IModelManager mmanager = StructuredModelManager.getModelManager();
- picker.setParser(mmanager.createStructuredDocumentFor(IContentTypeIdentifier.ContentTypeID_DTD).getParser());
-
- Dictionary descriptions = new Hashtable();
- initDescriptions(descriptions);
-
- Dictionary contextStyleMap = new Hashtable();
- initContextStyleMap(contextStyleMap);
-
- ArrayList styleList = new ArrayList();
- initStyleList(styleList);
-
- picker.setContextStyleMap(contextStyleMap);
- picker.setDescriptions(descriptions);
- picker.setStyleList(styleList);
-
- picker.setGeneratorKey(IContentTypeIdentifier.ContentTypeID_DTD);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDFilesPreferencePage.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDFilesPreferencePage.java
deleted file mode 100644
index 0db37fef01..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDFilesPreferencePage.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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.preferences;
-
-import org.eclipse.core.runtime.Preferences;
-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.dtd.core.DTDPlugin;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.preferences.ui.AbstractPreferencePage;
-
-
-public class DTDFilesPreferencePage extends AbstractPreferencePage {
-
- protected Control createContents(Composite parent) {
- Composite composite = (Composite) super.createContents(parent);
- WorkbenchHelp.setHelp(composite, IHelpContextIds.DTD_PREFWEBX_FILES_HELPID);
-
- setSize(composite);
- loadPreferences();
-
- return composite;
- }
-
- protected IPreferenceStore doGetPreferenceStore() {
- return DTDUIPlugin.getDefault().getPreferenceStore();
- }
-
- protected void doSavePreferenceStore() {
- DTDPlugin.getInstance().savePluginPreferences(); // model
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.preferences.ui.AbstractPreferencePage#getModelPreferences()
- */
- protected Preferences getModelPreferences() {
- return DTDPlugin.getInstance().getPluginPreferences();
- }
-
- public boolean performOk() {
- boolean result = super.performOk();
-
- doSavePreferenceStore();
-
- return result;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/registry/AdapterFactoryProviderForDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/registry/AdapterFactoryProviderForDTD.java
deleted file mode 100644
index 1af43409a4..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/registry/AdapterFactoryProviderForDTD.java
+++ /dev/null
@@ -1,74 +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.dtd.ui.registry;
-
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.wst.dtd.core.modelhandler.ModelHandlerForDTD;
-import org.eclipse.wst.dtd.ui.views.properties.DTDPropertySourceAdapterFactory;
-import org.eclipse.wst.sse.core.AdapterFactory;
-import org.eclipse.wst.sse.core.IFactoryRegistry;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.modelhandler.IDocumentTypeHandler;
-import org.eclipse.wst.sse.ui.registry.AdapterFactoryProvider;
-import org.eclipse.wst.sse.ui.util.Assert;
-
-
-/**
- * @author nitin
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class AdapterFactoryProviderForDTD implements AdapterFactoryProvider {
-
- /**
- *
- */
- public AdapterFactoryProviderForDTD() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- /*
- * @see AdapterFactoryProvider#addAdapterFactories(IStructuredModel)
- */
- public void addAdapterFactories(IStructuredModel structuredModel) {
- IFactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
- Assert.isNotNull(factoryRegistry, "Program Error: client caller must ensure model has factory registry"); //$NON-NLS-1$
- AdapterFactory factory = null;
-
- factory = factoryRegistry.getFactoryFor(IPropertySource.class);
- if (factory == null) {
- factory = new DTDPropertySourceAdapterFactory();
- factoryRegistry.addFactory(factory);
- }
-
- // factory = factoryRegistry.getFactoryFor(JFaceNodeAdapter.class);
- // if (factory == null) {
- // factory = new JFaceNodeAdapterFactory(JFaceNodeAdapter.class,
- // true);
- // factoryRegistry.addFactory(factory);
- // }
- }
-
- /*
- * @see AdapterFactoryProvider#isFor(ContentTypeDescription)
- */
- public boolean isFor(IDocumentTypeHandler contentTypeDescription) {
- return (contentTypeDescription instanceof ModelHandlerForDTD);
- }
-
- public void reinitializeFactories(IStructuredModel structuredModel) {
- // nothing to do, since no embedded type
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/IStyleConstantsDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/IStyleConstantsDTD.java
deleted file mode 100644
index 393cbf1242..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/IStyleConstantsDTD.java
+++ /dev/null
@@ -1,41 +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.dtd.ui.style;
-
-/**
- * Contains the symbolic name of styles used by LineStyleProvider,
- * ColorManager, and any others who may be interested
- */
-public interface IStyleConstantsDTD {
-
- public static final String DTD_COMMENT = "dtdComment"; //$NON-NLS-1$
-
- // Data are variables
- public static final String DTD_DATA = "dtdData"; //$NON-NLS-1$
- public static final String DTD_DEFAULT = "dtdDefault"; //$NON-NLS-1$
-
- // keywords are constants like IMPLIED or PCDATA
- public static final String DTD_KEYWORD = "dtdKeyword"; //$NON-NLS-1$
-
- // strings are anything in quotes
- public static final String DTD_STRING = "dtdString"; //$NON-NLS-1$
-
- // All the remaining symbols
- public static final String DTD_SYMBOL = "dtdSymbol"; //$NON-NLS-1$
-
- // tags are '<', '!', or '>'
- public static final String DTD_TAG = "dtdTag"; //$NON-NLS-1$
-
- // tagnames are like ELEMENT, ATTLIST, etc.
- public static final String DTD_TAGNAME = "dtdTagName"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTD.java
deleted file mode 100644
index 7f24c94bed..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTD.java
+++ /dev/null
@@ -1,132 +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.dtd.ui.style;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-import org.eclipse.wst.sse.ui.style.AbstractLineStyleProvider;
-import org.eclipse.wst.sse.ui.style.LineStyleProvider;
-
-public class LineStyleProviderForDTD extends AbstractLineStyleProvider implements LineStyleProvider {
- public LineStyleProviderForDTD() {
- super();
- loadColors();
- }
-
- protected void clearColors() {
- getTextAttributes().clear();
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- /**
- * a method to centralize all the "format rules" for regions
- * specifically associated for how to "open" the region.
- */
- // not sure why this is coming through null, but just to catch it
- if (region == null) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_DEFAULT);
- }
- String type = region.getType();
- if (type == DTDRegionTypes.CONTENT_EMPTY || type == DTDRegionTypes.CONTENT_ANY || type == DTDRegionTypes.CONTENT_PCDATA) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_DATA);
- } else if (type == DTDRegionTypes.ELEMENT_TAG || type == DTDRegionTypes.ENTITY_TAG || type == DTDRegionTypes.ATTLIST_TAG || type == DTDRegionTypes.NOTATION_TAG) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_TAGNAME);
- } else if (type == DTDRegionTypes.CONNECTOR || type == DTDRegionTypes.OCCUR_TYPE) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_SYMBOL);
- } else if (type == DTDRegionTypes.NDATA_VALUE) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_DATA);
- } else if (type == DTDRegionTypes.START_TAG || type == DTDRegionTypes.END_TAG || type == DTDRegionTypes.EXCLAMATION) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_TAG);
- } else if (type == DTDRegionTypes.COMMENT_START || type == DTDRegionTypes.COMMENT_CONTENT || type == DTDRegionTypes.COMMENT_END) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_COMMENT);
- } else if (type == DTDRegionTypes.SINGLEQUOTED_LITERAL || type == DTDRegionTypes.DOUBLEQUOTED_LITERAL) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_STRING);
- } else if (type == DTDRegionTypes.SYSTEM_KEYWORD || type == DTDRegionTypes.PUBLIC_KEYWORD || type == DTDRegionTypes.NDATA_KEYWORD || type == DTDRegionTypes.CDATA_KEYWORD || type == DTDRegionTypes.ID_KEYWORD || type == DTDRegionTypes.IDREF_KEYWORD || type == DTDRegionTypes.IDREFS_KEYWORD || type == DTDRegionTypes.ENTITY_KEYWORD || type == DTDRegionTypes.ENTITIES_KEYWORD || type == DTDRegionTypes.NMTOKEN_KEYWORD || type == DTDRegionTypes.NMTOKENS_KEYWORD || type == DTDRegionTypes.NOTATION_KEYWORD || type == DTDRegionTypes.REQUIRED_KEYWORD || type == DTDRegionTypes.IMPLIED_KEYWORD || type == DTDRegionTypes.FIXED_KEYWORD) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_KEYWORD);
- } else if (type == DTDRegionTypes.NAME || type == DTDRegionTypes.ENTITY_PARM) {
- // if (region instanceof DTDRegion) {
- // DTDRegion dtdRegion = (DTDRegion) region;
- // IStructuredDocumentRegion flatNode = dtdRegion.getParent();
- // String regionText = flatNode.getText(dtdRegion);
- // if (regionText.equals("ANY") || regionText.equals("EMPTY")) {
- // return new TextAttribute(DTDColors.DTD_KEYWORD);
- // }
- // }
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_DATA);
- }
-
- // default, return null to signal "not handled"
- // in which case, other factories should be tried
- return null;
- }
-
- protected IPreferenceStore getColorPreferences() {
- return SSEUIPlugin.getDefault().getPreferenceStore();
- }
-
- protected String getPreferenceKey(String key) {
- String contentTypeId = IContentTypeIdentifier.ContentTypeID_DTD;
- return PreferenceKeyGenerator.generateKey(key, contentTypeId);
- }
-
- protected void handlePropertyChange(PropertyChangeEvent event) {
- String styleKey = null;
-
- if (event != null) {
- String prefKey = event.getProperty();
- // check if preference changed is a style preference
- if (getPreferenceKey(IStyleConstantsDTD.DTD_DEFAULT).equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_DEFAULT;
- } else if (getPreferenceKey(IStyleConstantsDTD.DTD_TAG).equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_TAG;
- } else if (getPreferenceKey(IStyleConstantsDTD.DTD_TAGNAME).equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_TAGNAME;
- } else if (getPreferenceKey(IStyleConstantsDTD.DTD_COMMENT).equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_COMMENT;
- } else if (getPreferenceKey(IStyleConstantsDTD.DTD_KEYWORD).equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_KEYWORD;
- } else if (getPreferenceKey(IStyleConstantsDTD.DTD_STRING).equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_STRING;
- } else if (getPreferenceKey(IStyleConstantsDTD.DTD_DATA).equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_DATA;
- } else if (getPreferenceKey(IStyleConstantsDTD.DTD_SYMBOL).equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_SYMBOL;
- }
- }
-
- if (styleKey != null) {
- // overwrite style preference with new value
- addTextAttribute(styleKey);
- super.handlePropertyChange(event);
- }
- }
-
- protected void loadColors() {
- clearColors();
-
- addTextAttribute(IStyleConstantsDTD.DTD_DEFAULT);
- addTextAttribute(IStyleConstantsDTD.DTD_TAG);
- addTextAttribute(IStyleConstantsDTD.DTD_TAGNAME);
- addTextAttribute(IStyleConstantsDTD.DTD_COMMENT);
- addTextAttribute(IStyleConstantsDTD.DTD_KEYWORD);
- addTextAttribute(IStyleConstantsDTD.DTD_STRING);
- addTextAttribute(IStyleConstantsDTD.DTD_DATA);
- addTextAttribute(IStyleConstantsDTD.DTD_SYMBOL);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTDSubSet.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTDSubSet.java
deleted file mode 100644
index 459b307581..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTDSubSet.java
+++ /dev/null
@@ -1,161 +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.dtd.ui.style;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.dtd.core.rules.StructuredTextPartitionerForDTD;
-import org.eclipse.wst.sse.core.IStructuredModel;
-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.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-import org.eclipse.wst.sse.ui.preferences.ui.ColorHelper;
-import org.eclipse.wst.sse.ui.style.AbstractLineStyleProvider;
-import org.eclipse.wst.sse.ui.style.LineStyleProvider;
-
-public class LineStyleProviderForDTDSubSet extends AbstractLineStyleProvider implements LineStyleProvider {
- private IStructuredModel fInternalModel = null;
- private LineStyleProviderForDTD fInternalProvider = null;
- private StyleRange[] fInternalRanges;
- private String fPartitioning = null;
-
- public LineStyleProviderForDTDSubSet(String partitioning) {
- super();
- if (partitioning == null) {
- throw new IllegalArgumentException("a null partitioning can not be passed to LineStyleProviderForDTDSubSet");
- }
- fInternalProvider = new LineStyleProviderForDTD();
- fInternalRanges = new StyleRange[0];
- fPartitioning = partitioning;
-
- }
-
- /**
- * @param lineRequestStart
- * @param lineRequestLength
- * @param holdResults
- */
- private void addStyleRanges(int lineRequestStart, int lineRequestLength, Collection holdResults, int adjustment) {
- int lineRequestEnd = lineRequestStart + lineRequestLength;
- for (int i = 0; i < fInternalRanges.length; i++) {
- int adjustedStyleRangeStart = adjustment + fInternalRanges[i].start;
- int adjustedStyleRangeEnd = adjustedStyleRangeStart + fInternalRanges[i].length;
- if (adjustedStyleRangeEnd < lineRequestStart || lineRequestEnd < adjustedStyleRangeStart)
- continue;
- int end = Math.min(adjustedStyleRangeEnd, lineRequestEnd);
- StyleRange range = new StyleRange();
- range.start = Math.max(adjustedStyleRangeStart, lineRequestStart);
- range.length = end - range.start;
- range.fontStyle = fInternalRanges[i].fontStyle;
- range.foreground = fInternalRanges[i].foreground;
- range.background = fInternalRanges[i].background;
- holdResults.add(range);
- }
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- TextAttribute ta = null;
-
- String prefString = getColorPreferences().getString(getPreferenceKey(IStyleConstantsDTD.DTD_DEFAULT));
- String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
- if (stylePrefs != null) {
- RGB foreground = ColorHelper.toRGB(stylePrefs[0]);
- RGB background = ColorHelper.toRGB(stylePrefs[1]);
- boolean bold = Boolean.valueOf(stylePrefs[2]).booleanValue();
- ta = createTextAttribute(foreground, background, bold);
- }
- return ta;
- }
-
- protected IPreferenceStore getColorPreferences() {
- return SSEUIPlugin.getDefault().getPreferenceStore();
- }
-
- /**
- * @return
- */
- private IStructuredDocument getInternalDocument() {
- if (fInternalModel == null) {
- fInternalModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(IContentTypeIdentifier.ContentTypeID_DTD);
- }
- return fInternalModel.getStructuredDocument();
- }
-
- protected String getPreferenceKey(String key) {
- String contentTypeId = IContentTypeIdentifier.ContentTypeID_DTD;
- return PreferenceKeyGenerator.generateKey(key, contentTypeId);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.structured.style.AbstractLineStyleProvider#prepareRegions(org.eclipse.jface.text.ITypedRegion,
- * int, int, java.util.Collection)
- */
- public boolean prepareRegions(ITypedRegion typedRegion, int lineRequestStart, int lineRequestLength, Collection holdResults) {
- if (!StructuredTextPartitionerForDTD.ST_DTD_DEFAULT.equals(typedRegion.getType())) {
- // compute an internal DTD model and return linestyles for it
- ITextRegion dtdContentRegion = null;
- IStructuredDocumentRegion doctype = getDocument().getRegionAtCharacterOffset(typedRegion.getOffset());
- if (doctype != null)
- dtdContentRegion = doctype.getRegionAtCharacterOffset(typedRegion.getOffset());
- String contents = dtdContentRegion != null ? doctype.getFullText(dtdContentRegion) : null;
- IStructuredDocument document = getInternalDocument();
- if (document == null)
- return false;
-
- updateStyleRanges(document, contents);
-
- addStyleRanges(lineRequestStart, lineRequestLength, holdResults, doctype.getStartOffset(dtdContentRegion));
- return true;
- }
- return false;
- }
-
- public void release() {
- if (fInternalProvider != null) {
- fInternalProvider.release();
- }
- super.release();
- }
-
- private void updateStyleRanges(IStructuredDocument document, String contents) {
- if (!document.get().equals(contents)) {
- document.set(contents);
- try {
- ITypedRegion regions[] = TextUtilities.computePartitioning(getInternalDocument(), fPartitioning, 0, document.getLength(), false);
- List ranges = new ArrayList();
- fInternalProvider.init(getInternalDocument(), getHighlighter());
- for (int i = 0; i < regions.length; i++) {
- fInternalProvider.prepareRegions(regions[i], regions[i].getOffset(), regions[i].getLength(), ranges);
- }
- fInternalRanges = (StyleRange[]) ranges.toArray(new StyleRange[0]);
- } catch (BadLocationException e) {
- fInternalRanges = new StyleRange[0];
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/taginfo/DTDBestMatchHoverProcessor.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/taginfo/DTDBestMatchHoverProcessor.java
deleted file mode 100644
index 0ed9370e1d..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/taginfo/DTDBestMatchHoverProcessor.java
+++ /dev/null
@@ -1,34 +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.dtd.ui.taginfo;
-
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.wst.sse.ui.taginfo.AbstractBestMatchHoverProcessor;
-
-
-/**
- * @author amywu
- */
-public class DTDBestMatchHoverProcessor extends AbstractBestMatchHoverProcessor {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.dtd.ui.taginfo.AbstractBestMatchHoverProcessor#getTagInfoHover()
- */
- protected ITextHover getTagInfoHover() {
- // DTD has no taginfo hover
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/text/DTDDocumentRegionEdgeMatcher.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/text/DTDDocumentRegionEdgeMatcher.java
deleted file mode 100644
index 7b58e19435..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/text/DTDDocumentRegionEdgeMatcher.java
+++ /dev/null
@@ -1,28 +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.dtd.ui.text;
-
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.ui.text.DocumentRegionEdgeMatcher;
-
-
-public class DTDDocumentRegionEdgeMatcher extends DocumentRegionEdgeMatcher {
-
- /**
- * @param validContexts
- * @param nextMatcher
- */
- public DTDDocumentRegionEdgeMatcher() {
- super(new String[]{DTDRegionTypes.START_TAG, DTDRegionTypes.COMMENT_START}, null);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java
deleted file mode 100644
index 912ceb203d..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java
+++ /dev/null
@@ -1,210 +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.dtd.ui.views.contentoutline;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.util.TransferDragSourceListener;
-import org.eclipse.jface.util.TransferDropTargetListener;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.dnd.DragSourceEvent;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.wst.common.ui.dnd.ObjectTransfer;
-import org.eclipse.wst.common.ui.dnd.ViewerDragAdapter;
-import org.eclipse.wst.common.ui.dnd.ViewerDropAdapter;
-import org.eclipse.wst.dtd.ui.dnd.DTDDragAndDropManager;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-import org.eclipse.wst.sse.ui.util.Assert;
-import org.eclipse.wst.sse.ui.views.contentoutline.PropertyChangeUpdateActionContributionItem;
-import org.eclipse.wst.sse.ui.views.contentoutline.StructuredContentOutlineConfiguration;
-
-/**
- * @author nitin
- *
- */
-public class DTDContentOutlineConfiguration extends StructuredContentOutlineConfiguration {
-
- private DTDContextMenuHelper fMenuHelper;
- private TransferDragSourceListener[] fTransferDragSourceListeners;
- private TransferDropTargetListener[] fTransferDropTargetListeners;
- private Map fViewerContributions;
- private final String OUTLINE_ORDER_PREF = "outline-order"; //$NON-NLS-1$
- private final String OUTLINE_SORT_PREF = "outline-sort"; //$NON-NLS-1$
-
- /**
- * @param editor
- */
- public DTDContentOutlineConfiguration() {
- super();
- fViewerContributions = new HashMap(2);
- }
-
- public IContributionItem[] createToolbarContributions(TreeViewer viewer) {
- Assert.isTrue(getContentProvider(viewer) instanceof DTDTreeContentProvider, "invalid content provider on viewer"); //$NON-NLS-1$
- IContributionItem[] items = super.createToolbarContributions(viewer);
-
- SortAction sortAction = new SortAction(viewer, DTDUIPlugin.getDefault().getPreferenceStore(), getSortPreferenceKey());
- OrderAction orderAction = new OrderAction(viewer, (DTDTreeContentProvider) getContentProvider(viewer), DTDUIPlugin.getDefault().getPreferenceStore(), getOrderPreferenceKey());
- IContributionItem sortItem = new PropertyChangeUpdateActionContributionItem(sortAction);
- IContributionItem orderItem = new PropertyChangeUpdateActionContributionItem(orderAction);
-
- if (items == null) {
- items = new IContributionItem[2];
- items[0] = sortItem;
- items[1] = orderItem;
- } else {
- IContributionItem[] combinedItems = new IContributionItem[items.length + 2];
- combinedItems[0] = sortItem;
- combinedItems[1] = orderItem;
- System.arraycopy(items, 0, combinedItems, 2, items.length);
- items = combinedItems;
- }
- return items;
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getContentProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- public IContentProvider getContentProvider(TreeViewer viewer) {
- if (fContentProvider == null) {
- fContentProvider = new DTDTreeContentProvider();
- }
- return super.getContentProvider(viewer);
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getLabelProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- public ILabelProvider getLabelProvider(TreeViewer viewer) {
- if (fLabelProvider == null) {
- fLabelProvider = new DTDLabelProvider();
- }
- return super.getLabelProvider(viewer);
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getMenuListener(org.eclipse.jface.viewers.TreeViewer)
- */
- public IMenuListener getMenuListener(TreeViewer viewer) {
- fMenuHelper.createMenuListenersFor(viewer);
- return fMenuHelper.getMenuListener();
- }
-
- public String getOrderPreferenceKey() {
- return PreferenceKeyGenerator.generateKey(OUTLINE_ORDER_PREF, getDeclaringID());
- }
-
- public String getSortPreferenceKey() {
- return PreferenceKeyGenerator.generateKey(OUTLINE_SORT_PREF, getDeclaringID());
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getTransferDragSourceListeners(org.eclipse.jface.viewers.TreeViewer)
- */
- public TransferDragSourceListener[] getTransferDragSourceListeners(TreeViewer treeViewer) {
- if (fTransferDragSourceListeners == null) {
- // emulate the XMLDragAndDropManager
- final ViewerDragAdapter dragAdapter = new ViewerDragAdapter(treeViewer);
- fTransferDragSourceListeners = new TransferDragSourceListener[]{new TransferDragSourceListener() {
- public void dragFinished(DragSourceEvent event) {
- dragAdapter.dragFinished(event);
- }
-
- public void dragSetData(DragSourceEvent event) {
- dragAdapter.dragSetData(event);
- }
-
- public void dragStart(DragSourceEvent event) {
- dragAdapter.dragStart(event);
- }
-
- public Transfer getTransfer() {
- return ObjectTransfer.getInstance();
- }
- }};
- }
-
- return fTransferDragSourceListeners;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getTransferDropTargetListeners(org.eclipse.jface.viewers.TreeViewer)
- */
- public TransferDropTargetListener[] getTransferDropTargetListeners(TreeViewer treeViewer) {
- if (fTransferDropTargetListeners == null) {
- // emulate the XMLDragAnDropManager
- final ViewerDropAdapter dropAdapter = new ViewerDropAdapter(treeViewer, new DTDDragAndDropManager());
- fTransferDropTargetListeners = new TransferDropTargetListener[]{new TransferDropTargetListener() {
- public void dragEnter(DropTargetEvent event) {
- dropAdapter.dragEnter(event);
- }
-
- public void dragLeave(DropTargetEvent event) {
- dropAdapter.dragLeave(event);
- }
-
- public void dragOperationChanged(DropTargetEvent event) {
- dropAdapter.dragOperationChanged(event);
- }
-
- public void dragOver(DropTargetEvent event) {
- dropAdapter.dragOver(event);
- }
-
- public void drop(DropTargetEvent event) {
- dropAdapter.drop(event);
- }
-
- public void dropAccept(DropTargetEvent event) {
- dropAdapter.dropAccept(event);
- }
-
- public Transfer getTransfer() {
- return ObjectTransfer.getInstance();
- }
-
- public boolean isEnabled(DropTargetEvent event) {
- return getTransfer().isSupportedType(event.currentDataType);
- }
- }};
- }
- return fTransferDropTargetListeners;
- }
-
- public void setEditor(StructuredTextEditor editor) {
- super.setEditor(editor);
- fMenuHelper = new DTDContextMenuHelper(editor);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#unconfigure(org.eclipse.jface.viewers.TreeViewer)
- */
- public void unconfigure(TreeViewer viewer) {
- super.unconfigure(viewer);
- fViewerContributions.remove(viewer);
- fMenuHelper.removeMenuListenersFor(viewer);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java
deleted file mode 100644
index b3d88ec41b..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java
+++ /dev/null
@@ -1,307 +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.dtd.ui.views.contentoutline;
-
-import java.util.List;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.wst.dtd.core.AttributeList;
-import org.eclipse.wst.dtd.core.CMGroupNode;
-import org.eclipse.wst.dtd.core.CMNode;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.dtd.core.NodeList;
-import org.eclipse.wst.dtd.core.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.util.LabelValuePair;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImageHelper;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImages;
-import org.eclipse.wst.dtd.ui.views.contentoutline.actions.AddAttributeAction;
-import org.eclipse.wst.dtd.ui.views.contentoutline.actions.AddAttributeListAction;
-import org.eclipse.wst.dtd.ui.views.contentoutline.actions.AddCommentAction;
-import org.eclipse.wst.dtd.ui.views.contentoutline.actions.AddElementAction;
-import org.eclipse.wst.dtd.ui.views.contentoutline.actions.AddElementToContentModelAction;
-import org.eclipse.wst.dtd.ui.views.contentoutline.actions.AddEntityAction;
-import org.eclipse.wst.dtd.ui.views.contentoutline.actions.AddGroupToContentModelAction;
-import org.eclipse.wst.dtd.ui.views.contentoutline.actions.AddNotationAction;
-import org.eclipse.wst.dtd.ui.views.contentoutline.actions.AddParameterEntityReferenceAction;
-import org.eclipse.wst.dtd.ui.views.contentoutline.actions.DeleteAction;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class DTDContextMenuHelper //extends FocusAdapter
-{
-
- private class DTDMenuListener implements IMenuListener {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager)
- */
- public void menuAboutToShow(IMenuManager manager) {
- updateActions();
- List selection = DTDContextMenuHelper.this.editor.getSelectedNodes();
- if (selection != null && selection.size() == 1)
- addActionItemsForSelection(selection.get(0), manager);
- }
- }
-
- protected AddAttributeAction addAttributeAction;
- protected AddAttributeListAction addAttributeListAction;
- protected AddCommentAction addCommentAction;
- protected AddElementAction addElementAction;
- protected AddElementToContentModelAction addElementToContentModelAction;
- protected AddEntityAction addEntityAction;
- protected AddGroupToContentModelAction addGroupToContentModelAction;
- protected AddNotationAction addNotationAction;
- protected AddParameterEntityReferenceAction addParameterEntityReferenceAction;
- protected DeleteAction deleteAction;
-
- private StructuredTextEditor editor;
-
- private IMenuListener fMenuListener;
- protected IAction redoAction;
-
- // protected CutAction cutAction;
- // protected CopyAction copyAction;
- // protected PasteAction pasteAction;
- protected IAction undoAction;
-
- //private List viewerList = new Vector();
-
- public DTDContextMenuHelper(StructuredTextEditor editor) {
- this.editor = editor;
- fMenuListener = new DTDMenuListener();
- addNotationAction = new AddNotationAction(editor, DTDUIPlugin.getResourceString("_UI_ACTION_ADD_DTD_NOTATION")); //$NON-NLS-1$
- addEntityAction = new AddEntityAction(editor, DTDUIPlugin.getResourceString("_UI_ACTION_ADD_DTD_ENTITY")); //$NON-NLS-1$
- addElementAction = new AddElementAction(editor, DTDUIPlugin.getResourceString("_UI_ACTION_ADD_DTD_ELEMENT")); //$NON-NLS-1$
- addCommentAction = new AddCommentAction(editor, DTDUIPlugin.getResourceString("_UI_ACTION_ADD_DTD_COMMENT")); //$NON-NLS-1$
-
- addParameterEntityReferenceAction = new AddParameterEntityReferenceAction(editor, DTDUIPlugin.getResourceString("_UI_ACTION_ADD_PARAM_ENTITY_REF")); //$NON-NLS-1$
- deleteAction = new DeleteAction(DTDUIPlugin.getResourceString("_UI_ACTION_DTD_DELETE")); //$NON-NLS-1$
- addAttributeAction = new AddAttributeAction(editor, DTDUIPlugin.getResourceString("_UI_ACTION_ADD_ATTRIBUTE")); //$NON-NLS-1$
- addAttributeListAction = new AddAttributeListAction(editor, DTDUIPlugin.getResourceString("_UI_ACTION_ADD_ATTRIBUTELIST")); //$NON-NLS-1$
-
- addGroupToContentModelAction = new AddGroupToContentModelAction(editor, DTDUIPlugin.getResourceString("_UI_ACTION_GROUP_ADD_GROUP")); //$NON-NLS-1$
- addElementToContentModelAction = new AddElementToContentModelAction(editor, DTDUIPlugin.getResourceString("_UI_ACTION_ADD_ELEMENT")); //$NON-NLS-1$
-
- addNotationAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ADD_NOTATION));
- addEntityAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ADD_ENTITY));
- addCommentAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ADD_COMMENT));
- addParameterEntityReferenceAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ADD_ENTITY_REFERENCE));
-
- // Tri-state images
- addElementAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_ELEMENT));
- addElementAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_ELEMENT));
- addElementAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_ELEMENT));
-
- addAttributeAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_ATTRIBUTE));
- addAttributeAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_ATTRIBUTE));
- addAttributeAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_ATTRIBUTE));
-
- addAttributeListAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_ATTRIBUTE));
- addAttributeListAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_ATTRIBUTE));
- addAttributeListAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_ATTRIBUTE));
-
- addGroupToContentModelAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_GROUPTOCONMODEL));
- addGroupToContentModelAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_GROUPTOCONMODEL));
- addGroupToContentModelAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_GROUPTOCONMODEL));
-
- addElementToContentModelAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_ELEMENTTOCONMODEL));
- addElementToContentModelAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_ELEMENTTOCONMODEL));
- addElementToContentModelAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_ELEMENTTOCONMODEL));
- }
-
- public void addActionItemsForSelection(Object selectedObject, IMenuManager menu) {
- if (undoAction == null) {
- undoAction = editor.getAction(ActionFactory.UNDO.getId());
- redoAction = editor.getAction(ActionFactory.REDO.getId());
- }
-
- menu.add(undoAction);
- menu.add(redoAction);
- menu.add(new Separator());
-
- if (selectedObject instanceof IndexedNodeList) {
- // http://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4201
- // add appropriate menu to logical view
- NodeList folder = ((IndexedNodeList) selectedObject).getTarget();
- if (folder.getListType().equals(DTDRegionTypes.NOTATION_TAG)) {
- menu.add(addNotationAction);
- } else if (folder.getListType().equals(DTDRegionTypes.ENTITY_TAG)) {
- menu.add(addEntityAction);
- } else if (folder.getListType().equals(DTDRegionTypes.ELEMENT_TAG)) {
- LabelValuePair[] availableEntities = ((DTDModelImpl) editor.getModel()).createParmEntityContentItems(null);
- addParameterEntityReferenceAction.setEnabled(availableEntities.length > 0);
-
- menu.add(addElementAction);
- menu.add(addParameterEntityReferenceAction);
- }
- }
- if (selectedObject instanceof DTDFile || selectedObject == null) {
- LabelValuePair[] availableEntities = ((DTDModelImpl) editor.getModel()).createParmEntityContentItems(null);
- addParameterEntityReferenceAction.setEnabled(availableEntities.length > 0);
-
- menu.add(addElementAction);
- menu.add(addEntityAction);
- menu.add(addNotationAction);
- menu.add(addParameterEntityReferenceAction);
- menu.add(addCommentAction);
- menu.add(addAttributeListAction);
- menu.add(new Separator());
- }
-
- if (selectedObject instanceof Element) {
- Element dtdElement = (Element) selectedObject;
-
- if (dtdElement.getContentModel() == null) {
- menu.add(addGroupToContentModelAction);
- menu.add(addElementToContentModelAction);
- }
- // if (!(((Element)selectedObject).getContentModel() instanceof
- // CMGroupNode))
- // {
- // menu.add(addGroupToContentModelAction);
- // }
- // addAttributeAction.setElement(selectedObject);
- menu.add(addAttributeAction);
- } else if (selectedObject instanceof CMGroupNode) {
- // addElementToContentModelAction.setElement(selectedObject);
- // addGroupToContentModelAction.setElement(selectedObject);
- menu.add(addElementToContentModelAction);
- menu.add(addGroupToContentModelAction);
- } else if (selectedObject instanceof AttributeList) {
- menu.add(addAttributeAction);
- }
-
- menu.add(new Separator());
- addEditActions(menu);
- menu.add(new Separator());
-
- if (selectedObject instanceof DTDNode && !(selectedObject instanceof CMNode && ((CMNode) selectedObject).isRootElementContent())) {
- menu.add(deleteAction);
- deleteAction.setEnabled(true);
- // if (selectedObject instanceof DTDElementContent)
- // {
- // DTDElementContent content = (DTDElementContent) selectedObject;
- // if (content.getElement() != null && (content instanceof
- // DTDPCDataContent || content instanceof DTDEmptyContent))
- // {
- // deleteAction.setEnabled(false);
- // } // end of if ()
- // } // end of if ()
- }
- }
-
- public void addEditActions(IMenuManager menu) {
- // menu.add(undoAction);
- // menu.add(redoAction);
- // menu.add(new Separator());
- // menu.add(cutAction);
- // menu.add(copyAction);
- // menu.add(pasteAction);
- }
-
- public void createMenuListenersFor(Viewer viewer) {
- viewer.addSelectionChangedListener(addNotationAction);
- viewer.addSelectionChangedListener(addEntityAction);
- viewer.addSelectionChangedListener(addElementAction);
- viewer.addSelectionChangedListener(addCommentAction);
- viewer.addSelectionChangedListener(addParameterEntityReferenceAction);
- viewer.addSelectionChangedListener(deleteAction);
- viewer.addSelectionChangedListener(addAttributeAction);
- viewer.addSelectionChangedListener(addAttributeListAction);
- viewer.addSelectionChangedListener(addGroupToContentModelAction);
- viewer.addSelectionChangedListener(addElementToContentModelAction);
-
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- addNotationAction.selectionChanged(selection);
- addEntityAction.selectionChanged(selection);
- addElementAction.selectionChanged(selection);
- addParameterEntityReferenceAction.selectionChanged(selection);
- deleteAction.selectionChanged(selection);
- addAttributeAction.selectionChanged(selection);
- addAttributeListAction.selectionChanged(selection);
- addGroupToContentModelAction.selectionChanged(selection);
- addElementToContentModelAction.selectionChanged(selection);
-
- // viewer.addSelectionChangedListener(cutAction);
- // viewer.addSelectionChangedListener(copyAction);
- // viewer.addSelectionChangedListener(pasteAction);
-
- // viewerList.add(viewer);
- // viewer.getControl().addFocusListener(this);
- }
-
- public DeleteAction getDeleteAction() {
- return deleteAction;
- }
-
- /**
- * @return Returns the menuListener.
- */
- public IMenuListener getMenuListener() {
- return fMenuListener;
- }
-
- // public void focusGained(FocusEvent event)
- // {
- // updateSelection();
- // }
-
- public void removeMenuListenersFor(Viewer viewer) {
- viewer.removeSelectionChangedListener(addNotationAction);
- viewer.removeSelectionChangedListener(addEntityAction);
- viewer.removeSelectionChangedListener(addElementAction);
- viewer.removeSelectionChangedListener(addCommentAction);
- viewer.removeSelectionChangedListener(addParameterEntityReferenceAction);
- viewer.removeSelectionChangedListener(deleteAction);
- viewer.removeSelectionChangedListener(addAttributeAction);
- viewer.removeSelectionChangedListener(addAttributeListAction);
- viewer.removeSelectionChangedListener(addGroupToContentModelAction);
- viewer.removeSelectionChangedListener(addElementToContentModelAction);
- }
-
- // Update all the actions for the viewer in focus
- public void updateActions() {
- // undoAction.update();
- // redoAction.update();
- }
-
- public void updateEditActions(IActionBars actionBars) {
- // if (actionBars != null)
- // {
- // actionBars.setGlobalActionHandler(IWorkbenchActionConstants.CUT,
- // cutAction);
- // actionBars.setGlobalActionHandler(IWorkbenchActionConstants.COPY,
- // copyAction);
- // actionBars.setGlobalActionHandler(IWorkbenchActionConstants.PASTE,
- // pasteAction);
- // actionBars.setGlobalActionHandler(IWorkbenchActionConstants.UNDO,
- // undoAction);
- // actionBars.setGlobalActionHandler(IWorkbenchActionConstants.REDO,
- // redoAction);
- // }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java
deleted file mode 100644
index 6ef7e5276d..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java
+++ /dev/null
@@ -1,87 +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.dtd.ui.views.contentoutline;
-
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.NodeList;
-
-
-/**
- * Based on com.ibm.etools.dtd.editor.viewers.DTDLabelProvider
- */
-
-public class DTDLabelProvider extends LabelProvider {
-
- public DTDLabelProvider() {
- super();
- }
-
- /**
- * Returns the image for the label of the given element.
- *
- * @param element
- * the element for which to provide the label image
- * @return the image used to label the element, or <code>null</code> if
- * these is no image for the given object
- */
- public Image getImage(Object element) {
- Image image = null;
- if (element instanceof DTDNode) {
- image = ((DTDNode) element).getImage();
- } else if (element instanceof NodeList) {
- image = ((NodeList) element).getImage();
- } else if (element instanceof IndexedNodeList) {
- return ((IndexedNodeList) element).getTarget().getImage();
- } else if (element instanceof DTDFile) {
- image = ((DTDFile) element).getImage();
- } else {
- image = super.getImage(element);
- }
- return image;
- }
-
- /**
- * Returns the text for the label of the given element.
- *
- * @param element
- * the element for which to provide the label text
- * @return the text string used to label the element, or <code>null</code>
- * if these is no text label for the given object
- */
- public String getText(Object element) {
- if (element instanceof DTDNode) {
- String name = ((DTDNode) element).getName();
-
- // strip leading whitespace (useful for multi-line comments)
- int i = 0;
- for (i = 0; i < name.length(); i++) {
- if (!Character.isWhitespace(name.charAt(i)))
- break;
- }
- if (i > 0 && i < name.length() - 1)
- name = name.substring(i);
-
- return name;
- } else if (element instanceof NodeList) {
- return ((NodeList) element).getListType();
- } else if (element instanceof IndexedNodeList) {
- return ((IndexedNodeList) element).getTarget().getName();
- } else if (element instanceof DTDFile) {
- return ((DTDFile) element).getName();
- }
- return super.getText(element);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java
deleted file mode 100644
index dc7f1ceefa..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java
+++ /dev/null
@@ -1,288 +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.dtd.ui.views.contentoutline;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.dtd.core.Attribute;
-import org.eclipse.wst.dtd.core.AttributeList;
-import org.eclipse.wst.dtd.core.Comment;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.dtd.core.Entity;
-import org.eclipse.wst.dtd.core.NodeList;
-import org.eclipse.wst.dtd.core.Notation;
-import org.eclipse.wst.dtd.core.ParameterEntityReference;
-import org.eclipse.wst.dtd.core.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.event.IDTDFileListener;
-import org.eclipse.wst.dtd.core.event.NodesEvent;
-
-
-/**
- * Based on com.ibm.etools.dtd.editor.viewers.DTDTreeContentProvider
- */
-
-public class DTDTreeContentProvider implements ITreeContentProvider, IDTDFileListener {
-
- private Object fInputObject;
- protected Viewer fViewer;
-
- // A cached set of IndexedNodeLists, required for getParent to return the
- // correct instances mapping to TreeItems
- protected Object[] logicalNodeLists = null;
-
- private boolean showLogicalOrder = false;
-
- public DTDTreeContentProvider() {
- super();
- }
-
- public void dispose() {
- fViewer = null;
- }
-
- private void expandToNode(DTDNode node) {
- DTDFile dtdFile = node.getDTDFile();
- // first expand the root
- AbstractTreeViewer viewer = (AbstractTreeViewer) fViewer;
- viewer.expandToLevel(dtdFile, 1);
- NodeList listToExpand = null;
- if (node instanceof Element || node instanceof ParameterEntityReference) {
- listToExpand = dtdFile.getElementsAndParameterEntityReferences();
- } else if (node instanceof Notation) {
- listToExpand = dtdFile.getNotations();
- } else if (node instanceof Entity) {
- listToExpand = dtdFile.getEntities();
- } else if (node instanceof Comment) {
- listToExpand = dtdFile.getComments();
- }
- if (listToExpand != null) {
- viewer.expandToLevel(listToExpand, 1);
- }
- viewer.expandToLevel(node, 0);
- }
-
- public Object[] getChildren(Object parentElement) {
- // return the lists of nodes when in logical order mode, all the Nodes
- // otherwise
- if (parentElement instanceof DTDFile) {
- if (isShowLogicalOrder()) {
- if (logicalNodeLists == null) {
- DTDFile file = (DTDFile) parentElement;
- Object[] children = file.getNodeLists().toArray();
- for (int i = 0; i < children.length; i++) {
- children[i] = new IndexedNodeList((NodeList) children[i]);
- }
- logicalNodeLists = children;
- }
- return logicalNodeLists;
- } else {
- return ((DTDFile) parentElement).getNodes().toArray();
- }
- } else if (parentElement instanceof NodeList) {
- return ((NodeList) parentElement).getNodes().toArray();
- } else if (parentElement instanceof IndexedNodeList) {
- return ((IndexedNodeList) parentElement).getTarget().getNodes().toArray();
- } else if (parentElement instanceof Element && isShowLogicalOrder()) {
- // then group the attributes under the element
- Object[] children = ((DTDNode) parentElement).getChildren();
- List attributes = ((Element) parentElement).getElementAttributes();
- Object[] logicalChildren = new Object[children.length + attributes.size()];
- int index = 0;
- for (index = 0; index < children.length; index++) {
- logicalChildren[index] = children[index];
- }
- for (Iterator iter = attributes.iterator(); iter.hasNext();) {
- logicalChildren[index++] = iter.next();
- }
- return logicalChildren;
- } else if (parentElement instanceof DTDNode) {
- return ((DTDNode) parentElement).getChildren();
- }
- return Collections.EMPTY_LIST.toArray();
- }
-
- public Object[] getElements(java.lang.Object inputElement) {
- Object[] elements = null;
- // Always show the DTDFile "node"
- if (inputElement instanceof DTDModelImpl) {
- elements = new Object[]{((DTDModelImpl) inputElement).getDTDFile()};
- }
- if (elements == null) {
- elements = new Object[0];
- }
- return elements;
- }
-
- public Object getParent(Object element) {
- Object parent = null;
- if (element instanceof DTDNode) {
- DTDNode node = (DTDNode) element;
- if (element instanceof Attribute && isShowLogicalOrder()) {
- // then we must say that the element with the same name
- // as our attributelist is our parent
- parent = node.getParentNode();
- if (parent != null) {
- String attListName = ((DTDNode) parent).getName();
- Iterator iter = node.getDTDFile().getNodes().iterator();
- while (iter.hasNext()) {
- DTDNode currentNode = (DTDNode) iter.next();
- if (currentNode instanceof AttributeList && currentNode.getName().equals(attListName)) {
- parent = currentNode;
- }
- }
- }
- }
-
- if (parent == null) {
- parent = ((DTDNode) element).getParentNode();
- }
-
- // if showing in the logical order, return the IndexedNodeList
- // acting as the parent in the tree
- if (parent == null) {
- if (isShowLogicalOrder()) {
- Object[] indexedNodeLists = getChildren(((DTDModelImpl) fInputObject).getDTDFile());
- for (int i = 0; i < indexedNodeLists.length && parent == null; i++) {
- if (indexedNodeLists[i] instanceof IndexedNodeList) {
- if (((IndexedNodeList) indexedNodeLists[i]).contains(element))
- parent = indexedNodeLists[i];
- }
- }
- } else {
- parent = ((DTDModelImpl) fInputObject).getDTDFile();
- }
- }
- } else if (element instanceof IndexedNodeList && fInputObject instanceof DTDModelImpl) {
- parent = ((DTDModelImpl) fInputObject).getDTDFile();
- }
- return parent;
- }
-
- public boolean hasChildren(Object element) {
- Object[] children = getChildren(element);
- return children.length > 0;
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- fViewer = viewer;
-
- if (fInputObject instanceof DTDModelImpl) {
- ((DTDModelImpl) fInputObject).getDTDFile().removeDTDFileListener(this);
- }
- fInputObject = newInput;
- if (fInputObject instanceof DTDModelImpl) {
- ((DTDModelImpl) fInputObject).getDTDFile().addDTDFileListener(this);
- }
- }
-
- /**
- * Get the value of showLogicalOrder.
- *
- * @return value of showLogicalOrder.
- */
- public boolean isShowLogicalOrder() {
- return showLogicalOrder;
- }
-
- public void nodeChanged(DTDNode node) {
- if (fViewer instanceof StructuredViewer) {
- // System.out.println("node changed notified");
- // System.out.println("selection before = " +
- // ((StructuredViewer)view).getSelection());
- if (node instanceof AttributeList && isShowLogicalOrder()) {
- // in this case, we are showing attributes under the element.
- // refresh the element object instead
- Iterator iter = node.getDTDFile().getNodes().iterator();
- while (iter.hasNext()) {
- DTDNode currentNode = (DTDNode) iter.next();
- if (currentNode.getName().equals(node.getName()) && currentNode instanceof Element) {
- ((StructuredViewer) fViewer).refresh(currentNode);
- }
- } // end of while ()
- } else {
- // do standard stuff
- ((StructuredViewer) fViewer).refresh(node);
- }
- // System.out.println("selection after = " +
- // ((StructuredViewer)view).getSelection());
- }
- }
-
- public void nodesAdded(NodesEvent event) {
- if (fViewer instanceof AbstractTreeViewer) {
- StructuredViewer viewer = (StructuredViewer) fViewer;
- ISelection selection = viewer.getSelection();
-
- Object firstObj = (!selection.isEmpty() && selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;
- DTDNode oldSelectedNode = null;
- if (firstObj instanceof DTDNode) {
- oldSelectedNode = (DTDNode) firstObj;
- }
-
- // for now just refresh the whole view
- AbstractTreeViewer abstractTreeViewer = (AbstractTreeViewer) fViewer;
- abstractTreeViewer.refresh();
-
- Iterator iter = event.getNodes().iterator();
- List newSelection = new ArrayList();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (oldSelectedNode == null || node.getStructuredDTDDocumentRegion() != oldSelectedNode.getStructuredDTDDocumentRegion() || node.getStartOffset() != oldSelectedNode.getStartOffset() || node.getEndOffset() != oldSelectedNode.getEndOffset()) {
- // add to selection
- newSelection.add(node);
- expandToNode(node);
- }
- }
- if (newSelection.size() > 0) {
- viewer.setSelection(new StructuredSelection(newSelection));
- }
-
- }
- }
-
- public void nodesRemoved(NodesEvent event) {
- if (fViewer instanceof AbstractTreeViewer) {
- AbstractTreeViewer abstractTreeViewer = (AbstractTreeViewer) fViewer;
- for (Iterator iter = event.getNodes().iterator(); iter.hasNext();) {
- abstractTreeViewer.remove(iter.next());
- }
- }
-
- }
-
- /**
- * Set the value of showLogicalOrder.
- *
- * @param v
- * Value to assign to showLogicalOrder.
- */
- public void setShowLogicalOrder(boolean v) {
- this.showLogicalOrder = v;
- if (!v) {
- // if not using logical order, lose the cached lists
- logicalNodeLists = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/IndexedNodeList.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/IndexedNodeList.java
deleted file mode 100644
index 9225bacd72..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/IndexedNodeList.java
+++ /dev/null
@@ -1,86 +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.dtd.ui.views.contentoutline;
-
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.NodeList;
-import org.eclipse.wst.sse.core.IndexedRegion;
-
-
-/* package */
-class IndexedNodeList implements IndexedRegion {
- public NodeList fTarget;
-
- public IndexedNodeList(NodeList target) {
- fTarget = target;
- }
-
- /**
- * @see org.eclipse.wst.sse.core.IndexedRegion#contains(int)
- */
- public boolean contains(int testPosition) {
- return getStartOffset() <= testPosition && testPosition <= getEndOffset();
- }
-
- public boolean contains(Object child) {
- return fTarget.getNodes().contains(child);
- }
-
- /**
- * @see org.eclipse.wst.sse.core.IndexedRegion#getEndOffset()
- */
- public int getEndOffset() {
- int end = 0;
- List nodes = fTarget.getNodes();
- for (int i = 0; i < nodes.size(); i++) {
- int thisEnd = ((DTDNode) nodes.get(i)).getEndOffset();
- if (end < thisEnd)
- end = thisEnd;
- }
- return end;
- }
-
- /**
- * @see org.eclipse.wst.sse.core.IndexedRegion#getStartOffset()
- */
- public int getStartOffset() {
- int start = -1;
- List nodes = fTarget.getNodes();
- for (int i = 0; i < nodes.size(); i++) {
- int thisStart = ((DTDNode) nodes.get(i)).getStartOffset();
- if (start > thisStart || start < 0)
- start = thisStart;
- }
- if (start < 0)
- start = 0;
- return start;
- }
-
- /**
- * @return
- */
- public NodeList getTarget() {
- return fTarget;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return getClass().getName() + ":" + fTarget.toString(); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/OrderAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/OrderAction.java
deleted file mode 100644
index 851ba66ab7..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/OrderAction.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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-/*
- * Created on Jan 22, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.dtd.ui.views.contentoutline;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImageHelper;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImages;
-import org.eclipse.wst.sse.ui.views.contentoutline.PropertyChangeUpdateAction;
-
-
-/**
- * Based on com.ibm.etools.dtd.editor.DTDContentOutlinePage#OrderAction
- */
-class OrderAction extends PropertyChangeUpdateAction {
- private DTDTreeContentProvider contentProvider;
- private TreeViewer treeViewer;
-
- public OrderAction(TreeViewer viewer, DTDTreeContentProvider provider, IPreferenceStore store, String preferenceKey) {
- super(DTDUIPlugin.getResourceString("_UI_BUTTON_GROUP_ITEMS_LOGICALLY"), store, preferenceKey, false); //$NON-NLS-1$
- setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ORGANIZE_DTD_LOGICALLY));
- treeViewer = viewer;
- contentProvider = provider;
- setToolTipText(getText());
- contentProvider.setShowLogicalOrder(isChecked());
- }
-
- public void update() {
- super.update();
- setChecked(getPreferenceStore().getBoolean(getPreferenceKey()));
- // treeViewer.getControl().setVisible(false);
- // treeViewer.getControl().setRedraw(false);
- Object[] expandedElements = treeViewer.getExpandedElements();
- ISelection selection = treeViewer.getSelection();
- contentProvider.setShowLogicalOrder(isChecked());
-
- //treeViewer.setInput(treeViewer.getInput());
- treeViewer.refresh(treeViewer.getInput());
-
- treeViewer.setExpandedElements(expandedElements);
- treeViewer.setSelection(selection);
- // treeViewer.getControl().setVisible(true);
- // treeViewer.getControl().setRedraw(true);
-
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/SortAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/SortAction.java
deleted file mode 100644
index 9219e53f5a..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/SortAction.java
+++ /dev/null
@@ -1,63 +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.dtd.ui.views.contentoutline;
-
-import java.text.Collator;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImageHelper;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImages;
-import org.eclipse.wst.sse.ui.views.contentoutline.PropertyChangeUpdateAction;
-
-
-/**
- * Based on com.ibm.etools.dtd.editor.DTDContentOutlinePage#SortAction
- */
-class SortAction extends PropertyChangeUpdateAction {
- private TreeViewer treeViewer;
-
- public SortAction(TreeViewer viewer, IPreferenceStore store, String preferenceKey) {
- super(DTDUIPlugin.getResourceString("_UI_BUTTON_SORT_ITEMS"), store, preferenceKey, false); //$NON-NLS-1$
- setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_SORT));
- setToolTipText(getText());
- treeViewer = viewer;
- if (isChecked()) {
- treeViewer.setSorter(new ViewerSorter(Collator.getInstance()));
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.texteditor.IUpdate#update()
- */
- public void update() {
- super.update();
- //treeViewer.getControl().setVisible(false);
- treeViewer.getControl().setRedraw(false);
- Object[] expandedElements = treeViewer.getExpandedElements();
- if (isChecked()) {
- treeViewer.setSorter(new ViewerSorter(Collator.getInstance()));
- } else {
- treeViewer.setSorter(null);
- }
- treeViewer.setInput(treeViewer.getInput());
- treeViewer.setExpandedElements(expandedElements);
- // treeViewer.getControl().setVisible(true);
- treeViewer.getControl().setRedraw(true);
-
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddAttributeAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddAttributeAction.java
deleted file mode 100644
index d63991d871..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddAttributeAction.java
+++ /dev/null
@@ -1,54 +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.dtd.ui.views.contentoutline.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.wst.dtd.core.AttributeList;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class AddAttributeAction extends BaseAction {
-
- public AddAttributeAction(StructuredTextEditor editor, String label) {
- super(editor, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
- String newName = "NewAttribute"; //$NON-NLS-1$
- if (selectedNode instanceof AttributeList) {
- ((AttributeList) selectedNode).addAttribute(newName);
- } else if (selectedNode instanceof Element) {
- ((Element) selectedNode).addAttribute(newName);
- }
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- boolean rc = super.updateSelection(selection);
- DTDNode node = getFirstNodeSelected(selection);
- if (node instanceof Element) {
- // System.out.println("attribute set to true");
- setEnabled(true);
- } else {
- // System.out.println("attribute set to false");
- setEnabled(false);
- }
-
- return rc;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddAttributeListAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddAttributeListAction.java
deleted file mode 100644
index d5491d83f6..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddAttributeListAction.java
+++ /dev/null
@@ -1,44 +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.dtd.ui.views.contentoutline.actions;
-
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class AddAttributeListAction extends BaseAction {
-
- public AddAttributeListAction(StructuredTextEditor editor, String label) {
- super(editor, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
- DTDFile dtdFile = getModel().getDTDFile();
- String attListName = "NewAttList"; //$NON-NLS-1$
- if (selectedNode != null) {
- DTDNode topLevelNode = dtdFile.getTopLevelNodeAt(selectedNode.getStartOffset());
- if (topLevelNode instanceof Element) {
- attListName = ((Element) topLevelNode).getName();
- }
- }
-
- getModel().getDTDFile().createAttributeList(selectedNode, attListName, true);
- // newElement.setName(DTDUniqueNameHelper.getUniqueElementName(dtdFile));
-
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddCommentAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddCommentAction.java
deleted file mode 100644
index 62d1ebefa4..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddCommentAction.java
+++ /dev/null
@@ -1,32 +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.dtd.ui.views.contentoutline.actions;
-
-//import com.ibm.etools.dtd.util.DTDUniqueNameHelper;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class AddCommentAction extends BaseAction {
-
- public AddCommentAction(StructuredTextEditor editor, String label) {
- super(editor, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
- getModel().getDTDFile().createComment(selectedNode, "NewComment", true); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddElementAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddElementAction.java
deleted file mode 100644
index cb15e96b67..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddElementAction.java
+++ /dev/null
@@ -1,33 +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.dtd.ui.views.contentoutline.actions;
-
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.util.DTDUniqueNameHelper;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class AddElementAction extends BaseAction {
-
- public AddElementAction(StructuredTextEditor editor, String label) {
- super(editor, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
- DTDFile dtdFile = getModel().getDTDFile();
- String elementName = DTDUniqueNameHelper.getUniqueElementName(dtdFile);
- dtdFile.createElement(selectedNode, elementName, true); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddElementToContentModelAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddElementToContentModelAction.java
deleted file mode 100644
index 0e8bef34db..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddElementToContentModelAction.java
+++ /dev/null
@@ -1,50 +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.dtd.ui.views.contentoutline.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.wst.dtd.core.CMGroupNode;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class AddElementToContentModelAction extends BaseAction {
-
- public AddElementToContentModelAction(StructuredTextEditor editor, String label) {
- super(editor, label);
- }
-
- public void run() {
- DTDNode node = getFirstNodeSelected();
-
- if (node instanceof CMGroupNode) {
- ((CMGroupNode) node).addChild();
- } else if (node instanceof Element) {
- ((Element) node).addChild();
- }
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- boolean rc = super.updateSelection(selection);
- DTDNode node = getFirstNodeSelected(selection);
- if (node instanceof CMGroupNode) {
- setEnabled(true);
- } else {
- setEnabled(false);
- }
- return rc;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddEntityAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddEntityAction.java
deleted file mode 100644
index f8250b3c9a..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddEntityAction.java
+++ /dev/null
@@ -1,35 +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.dtd.ui.views.contentoutline.actions;
-
-
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class AddEntityAction extends BaseAction {
-
- public AddEntityAction(StructuredTextEditor editor, String label) {
- super(editor, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
-
- getModel().getDTDFile().createEntity(selectedNode, "NewEntity", true); //$NON-NLS-1$
- // newElement.setName(DTDUniqueNameHelper.getUniqueElementName(dtdFile));
-
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddGroupToContentModelAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddGroupToContentModelAction.java
deleted file mode 100644
index 303cd57e75..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddGroupToContentModelAction.java
+++ /dev/null
@@ -1,40 +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.dtd.ui.views.contentoutline.actions;
-
-import org.eclipse.wst.dtd.core.CMGroupNode;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.Element;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class AddGroupToContentModelAction extends BaseAction {
-
- // private Object element;
-
- public AddGroupToContentModelAction(StructuredTextEditor editor, String label) {
- super(editor, label);
- }
-
- public void run() {
- DTDNode node = getFirstNodeSelected();
-
- if (node instanceof CMGroupNode) {
- ((CMGroupNode) node).addGroup();
- } else if (node instanceof Element) {
- ((Element) node).addGroup();
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddNotationAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddNotationAction.java
deleted file mode 100644
index 12bcefaae8..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddNotationAction.java
+++ /dev/null
@@ -1,34 +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.dtd.ui.views.contentoutline.actions;
-
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class AddNotationAction extends BaseAction {
-
- public AddNotationAction(StructuredTextEditor editor, String label) {
- super(editor, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
-
- getModel().getDTDFile().createNotation(selectedNode, "NewNotation", true); //$NON-NLS-1$
-
- // newNotation.setName(DTDUniqueNameHelper.getUniqueNotationName(dtdFile));
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddParameterEntityReferenceAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddParameterEntityReferenceAction.java
deleted file mode 100644
index 7ee2c08be4..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/AddParameterEntityReferenceAction.java
+++ /dev/null
@@ -1,48 +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.dtd.ui.views.contentoutline.actions;
-
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.util.LabelValuePair;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-public class AddParameterEntityReferenceAction extends BaseAction {
- public AddParameterEntityReferenceAction(StructuredTextEditor editor, String label) {
- super(editor, label);
- }
-
- public String getFirstExternalParameterEntity(DTDFile dtdFile) {
- LabelValuePair[] freeExternalEntities = dtdFile.getDTDModel().createParmEntityContentItems(null);
-
- if (freeExternalEntities.length > 0) {
- return (String) freeExternalEntities[0].fValue;
- // return (Entity) freeExternalEntities[0].fValue;
- }
- return null;
- }
-
- public void run() {
- DTDFile dtdFile = getModel().getDTDFile();
- String extEntity = getFirstExternalParameterEntity(dtdFile);
- DTDNode selectedNode = getFirstNodeSelected();
- if (extEntity != null) {
- dtdFile.createParameterEntityReference(selectedNode, extEntity, true);
- } else {
- dtdFile.createParameterEntityReference(selectedNode, "%NewEntityReference;", true); //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/BaseAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/BaseAction.java
deleted file mode 100644
index 110bbeed48..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/BaseAction.java
+++ /dev/null
@@ -1,78 +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.dtd.ui.views.contentoutline.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorActionBarContributor;
-import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.document.DTDModelImpl;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-
-abstract public class BaseAction extends SelectionListenerAction {
-
- protected IEditorActionBarContributor contextContributor;
- private StructuredTextEditor fTextEditor;
-
- public BaseAction(StructuredTextEditor editor, String text) {
- this(editor, text, null);
- }
-
- public BaseAction(StructuredTextEditor editor, String text, ImageDescriptor imageDesc) {
- super(text);
- fTextEditor = editor;
- setImageDescriptor(imageDesc);
- }
-
- public IEditorActionBarContributor getContextContributor() {
- return contextContributor;
- }
-
- public DTDNode getFirstNodeSelected() {
- return getFirstNodeSelected(getStructuredSelection());
- }
-
- public DTDNode getFirstNodeSelected(IStructuredSelection selection) {
- Iterator iter = selection.iterator();
- //DTDNode referencePoint = null;
- while (iter.hasNext()) {
- Object element = iter.next();
- if (element instanceof DTDNode) {
- return (DTDNode) element;
- }
- }
- return null;
- }
-
- public DTDModelImpl getModel() {
- return (DTDModelImpl) getTextEditor().getModel();
- }
-
- /**
- * @return Returns the textEditor.
- */
- public StructuredTextEditor getTextEditor() {
- return fTextEditor;
- }
-
- public void setContextContributor(IEditorActionBarContributor contributor) {
- contextContributor = contributor;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/DeleteAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/DeleteAction.java
deleted file mode 100644
index 0642c37186..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/actions/DeleteAction.java
+++ /dev/null
@@ -1,69 +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.dtd.ui.views.contentoutline.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.wst.dtd.core.CMNode;
-import org.eclipse.wst.dtd.core.DTDFile;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.core.DTDPlugin;
-import org.eclipse.wst.dtd.core.util.DTDBatchNodeDelete;
-
-
-public class DeleteAction extends SelectionListenerAction {
-
- public DeleteAction(String label) {
- super(label);
- }
-
- public void run() {
- IStructuredSelection selection = getStructuredSelection();
-
- Iterator iter = selection.iterator();
- DTDBatchNodeDelete batchDelete = null;
- DTDFile dtdFile = null;
- while (iter.hasNext()) {
- Object element = iter.next();
- if (element instanceof DTDNode) {
- DTDNode node = (DTDNode) element;
- dtdFile = node.getDTDFile();
- if (batchDelete == null) {
- batchDelete = new DTDBatchNodeDelete(dtdFile);
- }
- batchDelete.addNode((DTDNode) element);
- }
- }
- dtdFile.getDTDModel().beginRecording(this, DTDPlugin.getDTDString("_UI_LABEL_DTD_FILE_DELETE")); //$NON-NLS-1$
- batchDelete.deleteNodes(this);
- dtdFile.getDTDModel().endRecording(this);
- }
-
- public boolean updateSelection(IStructuredSelection sel) {
- if (!super.updateSelection(sel))
- return false;
-
- Object selectedObject = sel.getFirstElement();
- if (selectedObject instanceof DTDNode && !(selectedObject instanceof CMNode && ((CMNode) selectedObject).isRootElementContent())) {
- setEnabled(true);
- return true; // enable delete menu item
- } else {
- setEnabled(false);
- return false; // disable it - grey out
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/properties/DTDPropertySourceAdapter.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/properties/DTDPropertySourceAdapter.java
deleted file mode 100644
index 6552c4538f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/properties/DTDPropertySourceAdapter.java
+++ /dev/null
@@ -1,131 +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.dtd.ui.views.properties;
-
-
-
-import java.util.Stack;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.wst.dtd.core.DTDNode;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.ui.views.properties.CustomPropertyDescriptor;
-
-
-/**
- * An IPropertySource implementation for a JFace viewer used to display
- * properties of DOM nodes. Requires an adapter factory to create JFace
- * adapters for the nodes in the tree.
- */
-public class DTDPropertySourceAdapter implements INodeAdapter, IPropertySource {
- protected final static String CATEGORY_ATTRIBUTES = "Attributes"; //$NON-NLS-1$
-
- private static final String ID_NAME = DTDUIPlugin.getResourceString("DTDPropertySourceAdapter.0"); //$NON-NLS-1$
- private static final String ID_TEXT = DTDUIPlugin.getResourceString("DTDPropertySourceAdapter.1"); //$NON-NLS-1$
-
- protected IPropertyDescriptor[] fDescriptors = null;
- protected INodeNotifier fNode = null;
-
- protected Stack fValuesBeingSet = new Stack();
-
- public DTDPropertySourceAdapter(INodeNotifier target) {
- super();
- fNode = target;
- }
-
- /**
- * @return
- */
- private IPropertyDescriptor[] createPropertyDescriptors() {
- CustomPropertyDescriptor nameDescriptor = new CustomPropertyDescriptor(ID_NAME, ID_NAME, null);
- nameDescriptor.setCategory(DTDUIPlugin.getResourceString("DTDPropertySourceAdapter.2")); //$NON-NLS-1$
- // CustomPropertyDescriptor contentDescriptor = new
- // CustomPropertyDescriptor(ID_TEXT, ID_TEXT, null);
- // contentDescriptor.setCategory("Attributes");
- return new IPropertyDescriptor[]{nameDescriptor};
- }
-
- /**
- * Returns a value for this Node that can be editted in a property sheet.
- *
- * @return a value that can be editted
- */
- public Object getEditableValue() {
- return null;
- }
-
- /**
- * Returns the current collection of property descriptors.
- *
- * @return all valid descriptors.
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- if (fDescriptors == null || fDescriptors.length == 0) {
- fDescriptors = createPropertyDescriptors();
- } else {
- updatePropertyDescriptors();
- }
- return fDescriptors;
- }
-
- /**
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
- public Object getPropertyValue(Object id) {
- Object value = null;
- if (id.equals(ID_NAME) && fNode instanceof DTDNode) {
- value = ((DTDNode) fNode).getName();
- }
- if (id.equals(ID_TEXT) && fNode instanceof DTDNode) {
- value = ((DTDNode) fNode).getFullNodeText();
- }
- return value;
- }
-
- /**
- * Allowing the INodeAdapter to compare itself against the type allows it
- * to return true in more than one case.
- */
- public boolean isAdapterForType(Object type) {
- return type == IPropertySource.class;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object)
- */
- public boolean isPropertySet(Object id) {
- return false;
- }
-
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
- */
- public void resetPropertyValue(Object id) {
- }
-
- public void setPropertyValue(Object nameObject, Object value) {
- }
-
- protected void updatePropertyDescriptors() {
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/properties/DTDPropertySourceAdapterFactory.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/properties/DTDPropertySourceAdapterFactory.java
deleted file mode 100644
index 900da6f691..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/properties/DTDPropertySourceAdapterFactory.java
+++ /dev/null
@@ -1,42 +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.dtd.ui.views.properties;
-
-
-
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.wst.sse.core.AbstractAdapterFactory;
-import org.eclipse.wst.sse.core.AdapterFactory;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-
-
-public class DTDPropertySourceAdapterFactory extends AbstractAdapterFactory {
-
- public DTDPropertySourceAdapterFactory() {
- super(IPropertySource.class, true);
- }
-
- public DTDPropertySourceAdapterFactory(Object adapterKey, boolean registerAdapters) {
- super(adapterKey, registerAdapters);
- }
-
- public AdapterFactory copy() {
- return new DTDPropertySourceAdapterFactory(this.adapterKey, this.shouldRegisterAdapter);
- }
-
- protected INodeAdapter createAdapter(INodeNotifier target) {
- // at the moment, only one implementation exists
- return new DTDPropertySourceAdapter(target);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/.classpath b/bundles/org.eclipse.wst.html.core/.classpath
deleted file mode 100644
index df094ee4a7..0000000000
--- a/bundles/org.eclipse.wst.html.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <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.core/.compatibility b/bundles/org.eclipse.wst.html.core/.compatibility
deleted file mode 100644
index 8c1b1d39b9..0000000000
--- a/bundles/org.eclipse.wst.html.core/.compatibility
+++ /dev/null
@@ -1,2 +0,0 @@
-#Wed Mar 24 13:53:52 EST 2004
-.project=9968
diff --git a/bundles/org.eclipse.wst.html.core/.cvsignore b/bundles/org.eclipse.wst.html.core/.cvsignore
deleted file mode 100644
index 383b61c8dd..0000000000
--- a/bundles/org.eclipse.wst.html.core/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-htmlmodel.jar
-temp.folder
-dev.properties
-build.xml
diff --git a/bundles/org.eclipse.wst.html.core/.options b/bundles/org.eclipse.wst.html.core/.options
deleted file mode 100644
index e66a59f041..0000000000
--- a/bundles/org.eclipse.wst.html.core/.options
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.wst.html.core/debug=true
-org.eclipse.wst.html.core/debug/tracefilter= \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/.project b/bundles/org.eclipse.wst.html.core/.project
deleted file mode 100644
index 13a9facdf9..0000000000
--- a/bundles/org.eclipse.wst.html.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.html.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index b100a16f75..0000000000
--- a/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Sat Dec 11 00:48:28 EST 2004
-compilers.p.unused-element-or-attribute=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unknown-element=0
-compilers.p.unknown-resource=0
-compilers.p.unknown-class=0
-compilers.p.unknown-attribute=0
-compilers.p.no-required-att=0
-eclipse.preferences.version=1
-compilers.p.unresolved-import=0
-compilers.p.illegal-att-value=0
-compilers.use-project=true
diff --git a/bundles/org.eclipse.wst.html.core/build.properties b/bundles/org.eclipse.wst.html.core/build.properties
deleted file mode 100644
index 6c9636674a..0000000000
--- a/bundles/org.eclipse.wst.html.core/build.properties
+++ /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
-###############################################################################
-bin.includes = plugin.xml,\
- *.jar,\
- html.jar,\
- .options,\
- data/,\
- plugin.properties
-src.includes = plugin.xml,\
- build.xml,\
- .options,\
- data/,\
- plugin.properties
-source.htmlmodel.jar = src/
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref.properties b/bundles/org.eclipse.wst.html.core/data/htmref.properties
deleted file mode 100644
index 9cd460d81e..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref.properties
+++ /dev/null
@@ -1,108 +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
-###############################################################################
-
-ATagInfo=A link if the href attribute is present, and the target for a link if the name attribute is present
-ABBRTagInfo=An abbreviation (for example, WWW, HTTP)
-ACRONYMTagInfo=An acronym (for example, SCUBA)
-ADDRESSTagInfo=Address information for the author of the page
-APPLETTagInfo=A Java applet
-AREATagInfo=Defines a client-side image map area
-BTagInfo=Displays contained text as bold
-BASETagInfo=The base URI for the page, to be used when calculating relative paths
-BASEFONTTagInfo=The base font size for the page
-BDOTagInfo=Overrides default bidirectional display. For use with bidirectional languages.
-BIGTagInfo=Displays contained text as large
-BGSOUNDTagInfo=Defines a sound file for the page. Not supported by W3C HTML 4.01.
-BLINKTagInfo=Displays text as blinking. Not supported by W3C HTML 4.01.
-BLOCKQUOTETagInfo=A long quotation
-BODYTagInfo=The document body. Contains all the content for the page.
-BRTagInfo=Forces a line break
-BUTTONTagInfo=Defines a push button
-CAPTIONTagInfo=Defines a table caption
-CENTERTagInfo=Displays contained text centered. Equivalent to DIV with align=center.
-CITETagInfo=A citation
-CODETagInfo=A computer code fragment
-COLTagInfo=A table column
-COLGROUPTagInfo=A group of table columns
-DDTagInfo=A definition or description in a definition or description list
-DELTagInfo=Displays text as deleted
-DFNTagInfo=A definition
-DIRTagInfo=A directory listing
-DIVTagInfo=A generic container, which can be used for defining language or style for the contents
-DLTagInfo=A definition or description list
-DTTagInfo=A term or subject in a definition or description list
-EMTagInfo=Displays text emphasized (generally italicized)
-EMBEDTagInfo=Defines an embedded plug-in. Not supported by W3C HTML 4.01.
-FIELDSETTagInfo=Defines a form control group
-FONTTagInfo=Displays text in the given font
-FORMTagInfo=Defines an interactive form
-FRAMETagInfo=Defines a frame within the current window
-FRAMESETTagInfo=Defines a frameset that divides the window into frames
-H1TagInfo=A top-level heading
-H2TagInfo=A second-level heading
-H3TagInfo=A third-level heading
-H4TagInfo=A fourth-level heading
-H5TagInfo=A fifth-level heading
-H6TagInfo=A sixth-level heading
-HEADTagInfo=Contains metadata and window title information for the document
-HRTagInfo=A horizontal rule
-HTMLTagInfo=The root element for the document.
-ITagInfo=Displays text as italic
-IFRAMETagInfo=Defines an inline subwindow
-IMGTagInfo=Displays the referenced image as embedded content
-INPUTTagInfo=Defines a form control for user input
-INSTagInfo=Defines inserted text
-ISINDEXTagInfo=Defines a single line prompt
-KBDTagInfo=Defines text to be entered by the user
-LABELTagInfo=Defines the label for a form field
-LEGENDTagInfo=Defines the label for a set of form fields
-LITagInfo=Defines a list item within a list
-LINKTagInfo=A media-independent link
-MAPTagInfo=Defines a client-side image map
-MARQUEETagInfo=Displays text as scrolling. Not supported by W3C HTML 4.01.
-MENUTagInfo=Defines a menu list
-METATagInfo=Defines metadata information for the document
-NOBRTagInfo=Overrides and prevents line breaks. Not supported by W3C HTML 4.01.
-NOFRAMESTagInfo=Provides information to display if the current browser does not support frames
-NOSCRIPTTagInfo=Provides information to display if the current browser does not support scripting
-OBJECTTagInfo=Defines a generic embedded object
-OLTagInfo=An ordered list
-OPTGROUPTagInfo=An option group
-OPTIONTagInfo=A selectable choice
-PTagInfo=A paragraph
-PARAMTagInfo=A named property value
-PRETagInfo=Preformatted text
-QTagInfo=A short inline quotation
-STagInfo=Display text in strike-through style
-SAMPTagInfo=Sample program output, scripts, etc. Displays in monospace font.
-SCRIPTTagInfo=Script statements
-SELECTTagInfo=An option selector
-SMALLTagInfo=Displays text as small
-SPANTagInfo=A generic container, which can be used for defining language or style for the contents
-STRIKETagInfo=Display text in strike-through style
-STRONGTagInfo=Displays text as strongly emphasized (generally bold)
-STYLETagInfo=Defines a style for the contained information
-SUBTagInfo=Display as subscript
-SUPTagInfo=Display as superscript
-TABLETagInfo=Defines a table
-TBODYTagInfo=The body of the table
-TDTagInfo=A cell within a table
-TEXTAREATagInfo=A multi-line text field
-TFOOTTagInfo=A table footer
-THTagInfo=A table header cell
-THEADTagInfo=A table header
-TITLETagInfo=The document title, displayed in the browser's title bar
-TRTagInfo=A table row
-TTTagInfo=Displays text in teletype or monospaced text style
-UTagInfo=Displays text as underlined
-ULTagInfo=An unordered list
-VARTagInfo=An instance of a variable or program argument
-WBRTagInfo=Allows a line break within <B>&lt;NOBR&gt;</B> tag. Not supported by W3C HTML 4.01.
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref.xml b/bundles/org.eclipse.wst.html.core/data/htmref.xml
deleted file mode 100644
index 9a5b74c5ab..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref.xml
+++ /dev/null
@@ -1,294 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<abstractGrammarAnnotations propertiesLocation="htmref" caseSensitive="false">
- <annotation spec="A">
- <property name="tagInfo">%ATagInfo</property>
- </annotation>
- <annotation spec="ABBR">
- <property name="tagInfo">%ABBRTagInfo</property>
- </annotation>
- <annotation spec="ACRONYM">
- <property name="tagInfo">%ACRONYMTagInfo</property>
- </annotation>
- <annotation spec="ADDRESS">
- <property name="tagInfo">%ADDRESSTagInfo</property>
- </annotation>
- <annotation spec="APPLET">
- <property name="tagInfo">%APPLETTagInfo</property>
- </annotation>
- <annotation spec="AREA">
- <property name="tagInfo">%AREATagInfo</property>
- </annotation>
- <annotation spec="B">
- <property name="tagInfo">%BTagInfo</property>
- </annotation>
- <annotation spec="BASE">
- <property name="tagInfo">%BASETagInfo</property>
- </annotation>
- <annotation spec="BASEFONT">
- <property name="tagInfo">%BASEFONTTagInfo</property>
- </annotation>
- <annotation spec="BDO">
- <property name="tagInfo">%BDOTagInfo</property>
- </annotation>
- <annotation spec="BGSOUND">
- <property name="tagInfo">%BGSOUNDTagInfo</property>
- </annotation>
- <annotation spec="BIG">
- <property name="tagInfo">%BIGTagInfo</property>
- </annotation>
- <annotation spec="BLINK">
- <property name="tagInfo">%BLINKTagInfo</property>
- </annotation>
- <annotation spec="BLOCKQUOTE">
- <property name="tagInfo">%BLOCKQUOTETagInfo</property>
- </annotation>
- <annotation spec="BODY">
- <property name="tagInfo">%BODYTagInfo</property>
- </annotation>
- <annotation spec="BR">
- <property name="tagInfo">%BRTagInfo</property>
- </annotation>
- <annotation spec="BUTTON">
- <property name="tagInfo">%BUTTONTagInfo</property>
- </annotation>
- <annotation spec="CAPTION">
- <property name="tagInfo">%CAPTIONTagInfo</property>
- </annotation>
- <annotation spec="CENTER">
- <property name="tagInfo">%CENTERTagInfo</property>
- </annotation>
- <annotation spec="CITE">
- <property name="tagInfo">%CITETagInfo</property>
- </annotation>
- <annotation spec="CODE">
- <property name="tagInfo">%CODETagInfo</property>
- </annotation>
- <annotation spec="COL">
- <property name="tagInfo">%COLTagInfo</property>
- </annotation>
- <annotation spec="COLGROUP">
- <property name="tagInfo">%COLGROUPTagInfo</property>
- </annotation>
- <annotation spec="DD">
- <property name="tagInfo">%DDTagInfo</property>
- </annotation>
- <annotation spec="DEL">
- <property name="tagInfo">%DELTagInfo</property>
- </annotation>
- <annotation spec="DFN">
- <property name="tagInfo">%DFNTagInfo</property>
- </annotation>
- <annotation spec="DIR">
- <property name="tagInfo">%DIRTagInfo</property>
- </annotation>
- <annotation spec="DIV">
- <property name="tagInfo">%DIVTagInfo</property>
- </annotation>
- <annotation spec="DL">
- <property name="tagInfo">%DLTagInfo</property>
- </annotation>
- <annotation spec="DT">
- <property name="tagInfo">%DTTagInfo</property>
- </annotation>
- <annotation spec="EM">
- <property name="tagInfo">%EMTagInfo</property>
- </annotation>
- <annotation spec="EMBED">
- <property name="tagInfo">%EMBEDTagInfo</property>
- </annotation>
- <annotation spec="FIELDSET">
- <property name="tagInfo">%FIELDSETTagInfo</property>
- </annotation>
- <annotation spec="FONT">
- <property name="tagInfo">%FONTTagInfo</property>
- </annotation>
- <annotation spec="FORM">
- <property name="tagInfo">%FORMTagInfo</property>
- </annotation>
- <annotation spec="FRAME">
- <property name="tagInfo">%FRAMETagInfo</property>
- </annotation>
- <annotation spec="FRAMESET">
- <property name="tagInfo">%FRAMESETTagInfo</property>
- </annotation>
- <annotation spec="H1">
- <property name="tagInfo">%H1TagInfo</property>
- </annotation>
- <annotation spec="H2">
- <property name="tagInfo">%H2TagInfo</property>
- </annotation>
- <annotation spec="H3">
- <property name="tagInfo">%H3TagInfo</property>
- </annotation>
- <annotation spec="H4">
- <property name="tagInfo">%H4TagInfo</property>
- </annotation>
- <annotation spec="H5">
- <property name="tagInfo">%H5TagInfo</property>
- </annotation>
- <annotation spec="H6">
- <property name="tagInfo">%H6TagInfo</property>
- </annotation>
- <annotation spec="HEAD">
- <property name="tagInfo">%HEADTagInfo</property>
- </annotation>
- <annotation spec="HR">
- <property name="tagInfo">%HRTagInfo</property>
- </annotation>
- <annotation spec="HTML">
- <property name="tagInfo">%HTMLTagInfo</property>
- </annotation>
- <annotation spec="I">
- <property name="tagInfo">%ITagInfo</property>
- </annotation>
- <annotation spec="IFRAME">
- <property name="tagInfo">%IFRAMETagInfo</property>
- </annotation>
- <annotation spec="IMG">
- <property name="tagInfo">%IMGTagInfo</property>
- </annotation>
- <annotation spec="INPUT">
- <property name="tagInfo">%INPUTTagInfo</property>
- </annotation>
- <annotation spec="INS">
- <property name="tagInfo">%INSTagInfo</property>
- </annotation>
- <annotation spec="ISINDEX">
- <property name="tagInfo">%ISINDEXTagInfo</property>
- </annotation>
- <annotation spec="KBD">
- <property name="tagInfo">%KBDTagInfo</property>
- </annotation>
- <annotation spec="LABEL">
- <property name="tagInfo">%LABELTagInfo</property>
- </annotation>
- <annotation spec="LEGEND">
- <property name="tagInfo">%LEGENDTagInfo</property>
- </annotation>
- <annotation spec="LI">
- <property name="tagInfo">%LITagInfo</property>
- </annotation>
- <annotation spec="LINK">
- <property name="tagInfo">%LINKTagInfo</property>
- </annotation>
- <annotation spec="MAP">
- <property name="tagInfo">%MAPTagInfo</property>
- </annotation>
- <annotation spec="MARQUEE">
- <property name="tagInfo">%MARQUEETagInfo</property>
- </annotation>
- <annotation spec="MENU">
- <property name="tagInfo">%MENUTagInfo</property>
- </annotation>
- <annotation spec="META">
- <property name="tagInfo">%METATagInfo</property>
- </annotation>
- <annotation spec="NOBR">
- <property name="tagInfo">%NOBRTagInfo</property>
- </annotation>
- <annotation spec="NOFRAMES">
- <property name="tagInfo">%NOFRAMESTagInfo</property>
- </annotation>
- <annotation spec="NOSCRIPT">
- <property name="tagInfo">%NOSCRIPTTagInfo</property>
- </annotation>
- <annotation spec="OBJECT">
- <property name="tagInfo">%OBJECTTagInfo</property>
- </annotation>
- <annotation spec="OL">
- <property name="tagInfo">%OLTagInfo</property>
- </annotation>
- <annotation spec="OPTGROUP">
- <property name="tagInfo">%OPTGROUPTagInfo</property>
- </annotation>
- <annotation spec="OPTION">
- <property name="tagInfo">%OPTIONTagInfo</property>
- </annotation>
- <annotation spec="P">
- <property name="tagInfo">%PTagInfo</property>
- </annotation>
- <annotation spec="PARAM">
- <property name="tagInfo">%PARAMTagInfo</property>
- </annotation>
- <annotation spec="PRE">
- <property name="tagInfo">%PRETagInfo</property>
- </annotation>
- <annotation spec="Q">
- <property name="tagInfo">%QTagInfo</property>
- </annotation>
- <annotation spec="S">
- <property name="tagInfo">%STagInfo</property>
- </annotation>
- <annotation spec="SAMP">
- <property name="tagInfo">%SAMPTagInfo</property>
- </annotation>
- <annotation spec="SCRIPT">
- <property name="tagInfo">%SCRIPTTagInfo</property>
- </annotation>
- <annotation spec="SELECT">
- <property name="tagInfo">%SELECTTagInfo</property>
- </annotation>
- <annotation spec="SMALL">
- <property name="tagInfo">%SMALLTagInfo</property>
- </annotation>
- <annotation spec="SPAN">
- <property name="tagInfo">%SPANTagInfo</property>
- </annotation>
- <annotation spec="STRIKE">
- <property name="tagInfo">%STRIKETagInfo</property>
- </annotation>
- <annotation spec="STRONG">
- <property name="tagInfo">%STRONGTagInfo</property>
- </annotation>
- <annotation spec="STYLE">
- <property name="tagInfo">%STYLETagInfo</property>
- </annotation>
- <annotation spec="SUB">
- <property name="tagInfo">%SUBTagInfo</property>
- </annotation>
- <annotation spec="SUP">
- <property name="tagInfo">%SUPTagInfo</property>
- </annotation>
- <annotation spec="TABLE">
- <property name="tagInfo">%TABLETagInfo</property>
- </annotation>
- <annotation spec="TBODY">
- <property name="tagInfo">%TBODYTagInfo</property>
- </annotation>
- <annotation spec="TD">
- <property name="tagInfo">%TDTagInfo</property>
- </annotation>
- <annotation spec="TEXTAREA">
- <property name="tagInfo">%TEXTAREATagInfo</property>
- </annotation>
- <annotation spec="TFOOT">
- <property name="tagInfo">%TFOOTTagInfo</property>
- </annotation>
- <annotation spec="TH">
- <property name="tagInfo">%THTagInfo</property>
- </annotation>
- <annotation spec="THEAD">
- <property name="tagInfo">%THEADTagInfo</property>
- </annotation>
- <annotation spec="TITLE">
- <property name="tagInfo">%TITLETagInfo</property>
- </annotation>
- <annotation spec="TR">
- <property name="tagInfo">%TRTagInfo</property>
- </annotation>
- <annotation spec="TT">
- <property name="tagInfo">%TTTagInfo</property>
- </annotation>
- <annotation spec="U">
- <property name="tagInfo">%UTagInfo</property>
- </annotation>
- <annotation spec="UL">
- <property name="tagInfo">%ULTagInfo</property>
- </annotation>
- <annotation spec="VAR">
- <property name="tagInfo">%VARTagInfo</property>
- </annotation>
- <annotation spec="WBR">
- <property name="tagInfo">%WBRTagInfo</property>
- </annotation>
-</abstractGrammarAnnotations> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref_de.properties b/bundles/org.eclipse.wst.html.core/data/htmref_de.properties
deleted file mode 100644
index 56cbd6a57e..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref_de.properties
+++ /dev/null
@@ -1,108 +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
-###############################################################################
-
-ATagInfo=Ein Link, falls das Attribut 'href' vorhanden ist, bzw. das Ziel f\u00fcr einen Link, wenn das Attribut 'name' vorhanden ist
-ABBRTagInfo=Abk\u00fcrzung (z. B. WWW, HTTP)
-ACRONYMTagInfo=Akronym (z. B. SCUBA)
-ADDRESSTagInfo=Adressinformationen f\u00fcr den Autor der Seite
-APPLETTagInfo=Java-Applet
-AREATagInfo=Definiert einen clientseitigen Imagezuordnungsbereich
-BTagInfo=Zeigt enthaltenen Text in Fettformatierung an
-BASETagInfo=Basis-URI f\u00fcr die Seite, wird bei der Berechnung relativer Pfade verwendet
-BASEFONTTagInfo=Basisschriftartgr\u00f6\u00dfe f\u00fcr die Seite
-BDOTagInfo=\u00dcberschreibt Standardanzeige im Bidirektionalformat, wird mit bidirektionalen Sprachen (BIDI-Sprachen) verwendet
-BIGTagInfo=Zeigt enthaltenen Text in gro\u00dfer Schrift an
-BGSOUNDTagInfo=Definiert eine Audiodatei f\u00fcr die Seite. Wird durch W3C HTML 4.01 nicht unterst\u00fctzt.
-BLINKTagInfo=Zeigt Text blinkend an. Wird durch W3C HTML 4.01 nicht unterst\u00fctzt.
-BLOCKQUOTETagInfo=Langes Zitat
-BODYTagInfo=Dokumenthauptteil, der den gesamten Inhalt f\u00fcr die Seite enth\u00e4lt
-BRTagInfo=Erzwingt einen Zeilenumbruch
-BUTTONTagInfo=Definiert eine Schaltfl\u00e4che
-CAPTIONTagInfo=Definiert eine Tabellen\u00fcberschrift
-CENTERTagInfo=Zeigt enthaltenen Text in zentriert an. Ist \u00e4quivalent zu DIV mit 'align=center'.
-CITETagInfo=Zitat
-CODETagInfo=Computer-Codefragment
-COLTagInfo=Tabellenspalte
-COLGROUPTagInfo=Gruppe von Tabellenspalten
-DDTagInfo=Definition oder Beschreibung in einer Definitions- oder Beschreibungsliste
-DELTagInfo=Zeigt Text als gel\u00f6scht an
-DFNTagInfo=Definition
-DIRTagInfo=Verzeichnisliste
-DIVTagInfo=Generischer Container, der zum Definieren von Sprache oder Darstellung f\u00fcr den Inhalt verwendet werden kann
-DLTagInfo=Definitions- oder Beschreibungsliste
-DTTagInfo=Begriff oder Thema in einer Definitions- oder Beschreibungsliste
-EMTagInfo=Zeigt Text hervorgehoben an (normalerweise kursiv)
-EMBEDTagInfo=Definiert ein eingebettetes Plug-in. Wird durch W3C HTML 4.01 nicht unterst\u00fctzt.
-FIELDSETTagInfo=Definiert eine Gruppe von Formularsteuerelementen
-FONTTagInfo=Zeigt Text in der angegebenen Schriftart an
-FORMTagInfo=Definiert ein interaktives Formular
-FRAMETagInfo=Definiert einen Frame im aktuellen Fenster
-FRAMESETTagInfo=Definiert ein Frameset, das das Fenster in zwei Frames unterteilt
-H1TagInfo=\u00dcberschrift der h\u00f6chsten Ebene
-H2TagInfo=\u00dcberschrift der zweiten Ebene
-H3TagInfo=\u00dcberschrift der dritten Ebene
-H4TagInfo=\u00dcberschrift der vierten Ebene
-H5TagInfo=\u00dcberschrift der f\u00fcnften Ebene
-H6TagInfo=\u00dcberschrift der sechsten Ebene
-HEADTagInfo=Enth\u00e4lt Metadaten und Fenstertitelinformationen f\u00fcr das Dokument
-HRTagInfo=Horizontale Skala (Lineal)
-HTMLTagInfo=Stammelement f\u00fcr das Dokument
-ITagInfo=Zeigt Text kursiv an.
-IFRAMETagInfo=Definiert ein Inline-Unterfenster
-IMGTagInfo=Zeigt das Image, auf das verwiesen wird, als eingebetteten Inhalt an
-INPUTTagInfo=Definiert ein Formularsteuerelement f\u00fcr die Benutzereingabe
-INSTagInfo=Definiert eingef\u00fcgten Text
-ISINDEXTagInfo=Definiert eine einzeilige Eingabeaufforderung
-KBDTagInfo=Definiert Text, der durch den Benutzer eingegeben werden muss
-LABELTagInfo=Definiert die Beschriftung f\u00fcr ein Formularfeld
-LEGENDTagInfo=Definiert die Beschriftung f\u00fcr eine Gruppe von Formularfeldern
-LITagInfo=Definiert einen Listeneintrag in einer Liste
-LINKTagInfo=Datentr\u00e4gerunabh\u00e4ngiger Link
-MAPTagInfo=Definiert eine clientseitige Imagezuordnung
-MARQUEETagInfo=Zeigt Text verschiebbar an. Wird durch W3C HTML 4.01 nicht unterst\u00fctzt.
-MENUTagInfo=Definiert eine Men\u00fcliste
-METATagInfo=Definiert Metadateninformationen f\u00fcr das Dokument
-NOBRTagInfo=\u00dcberschreibt und verhindert Zeilenumbr\u00fcche. Wird durch W3C HTML 4.01 nicht unterst\u00fctzt.
-NOFRAMESTagInfo=Stellt Informationen bereit, die angezeigt werden sollen, wenn der aktuelle Browser keine Frames unterst\u00fctzt
-NOSCRIPTTagInfo=Stellt Informationen bereit, die angezeigt werden sollen, wenn der aktuelle Browser keine Scripterstellung unterst\u00fctzt
-OBJECTTagInfo=Definiert ein generisches eingebettetes Objekt
-OLTagInfo=Sortierte Liste
-OPTGROUPTagInfo=Optionsgruppe
-OPTIONTagInfo=Ausw\u00e4hlbare Option
-PTagInfo=Absatz
-PARAMTagInfo=Benannter Eigenschaftswert
-PRETagInfo=Vorformatierter Text
-QTagInfo=Kurzes Inline-Zitat
-STagInfo=Zeigt Text in durchgestrichener Darstellung an
-SAMPTagInfo=Beispielprogrammausgabe, Skripts usw., wird in Monospaceschrift angezeigt
-SCRIPTTagInfo=Scriptanweisungen
-SELECTTagInfo=Optionsselektor
-SMALLTagInfo=Zeigt Text in kleiner Schrift an
-SPANTagInfo=Generischer Container, der zum Definieren von Sprache oder Darstellung f\u00fcr den Inhalt verwendet werden kann
-STRIKETagInfo=Zeigt Text in durchgestrichener Darstellung an
-STRONGTagInfo=Zeigt Text stark hervorgehoben an (normalerweise fett)
-STYLETagInfo=Definiert eine Darstellung f\u00fcr die enthaltenen Informationen
-SUBTagInfo=Zeigt Zeichen tiefgestellt an
-SUPTagInfo=Zeigt Zeichen hochgestellt an
-TABLETagInfo=Definiert eine Tabelle
-TBODYTagInfo=Hauptteil der Tabelle
-TDTagInfo=Zelle in einer Tabelle
-TEXTAREATagInfo=Mehrzeiliges Textfeld
-TFOOTTagInfo=Tabellenfu\u00dfzeile
-THTagInfo=Tabellen\u00fcberschriftszelle
-THEADTagInfo=Tabellen\u00fcberschrift
-TITLETagInfo=Dokumenttitel, der in der Titelleiste des Browsers angezeigt wird
-TRTagInfo=Tabellenzeile
-TTTagInfo=Zeigt Text in Teletype-Schriftart oder Monospaceschrift an
-UTagInfo=Zeigt Text unterstrichen an
-ULTagInfo=Ungeordnete Liste
-VARTagInfo=Exemplar einer Variablen oder eines Programmarguments
-WBRTagInfo=L\u00e4sst einen Zeilenumbruch in Tags <B>&lt;NOBR&gt;</B> zu. Wird durch W3C HTML 4.01 nicht unterst\u00fctzt.
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref_es.properties b/bundles/org.eclipse.wst.html.core/data/htmref_es.properties
deleted file mode 100644
index 2166de903b..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref_es.properties
+++ /dev/null
@@ -1,108 +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
-###############################################################################
-
-ATagInfo=Enlace si est\u00e1 presente el atributo href, y destino de un enlace si est\u00e1 presente el atributo name
-ABBRTagInfo=Abreviatura (por ejemplo, WWW, HTTP)
-ACRONYMTagInfo=Acr\u00f3nimo (por ejemplo, SCUBA)
-ADDRESSTagInfo=Informaci\u00f3n de direcci\u00f3n para el autor de la p\u00e1gina
-APPLETTagInfo=Applet Java
-AREATagInfo=Define un \u00e1rea de mapa de imagen del lado del cliente
-BTagInfo=Visualiza texto contenido en negrita
-BASETagInfo=URI base de la p\u00e1gina, que debe utilizarse al calcular v\u00edas de acceso relativas
-BASEFONTTagInfo=Tama\u00f1o de font base de la p\u00e1gina
-BDOTagInfo=Altera temporalmente la visualizaci\u00f3n bidireccional predeterminada. Para utilizarlo con lenguajes bidireccionales.
-BIGTagInfo=Visualiza texto contenido en forma extensa
-BGSOUNDTagInfo=Define un archivo de sonido para la p\u00e1gina. No soportado en W3C HTML 4.01.
-BLINKTagInfo=Visualiza texto parpadeante. No soportado en W3C HTML 4.01.
-BLOCKQUOTETagInfo=Cita larga
-BODYTagInfo=Cuerpo del documento. Contiene todos los elementos de la p\u00e1gina.
-BRTagInfo=Fuerza un salto de l\u00ednea
-BUTTONTagInfo=Define un pulsador
-CAPTIONTagInfo=Define un t\u00edtulo de tabla
-CENTERTagInfo=Visualiza texto centrado. Equivalente a DIV con align=center.
-CITETagInfo=Cita
-CODETagInfo=Fragmento de c\u00f3digo de sistema
-COLTagInfo=Columna de tabla
-COLGROUPTagInfo=Grupo de columnas de tabla
-DDTagInfo=Definici\u00f3n o descripci\u00f3n de una lista de definiciones o descripciones
-DELTagInfo=Visualiza texto suprimido
-DFNTagInfo=Definici\u00f3n
-DIRTagInfo=Lista de directorios
-DIVTagInfo=Contenedor gen\u00e9rico, que puede utilizarse para definir el idioma o el estilo del contenido
-DLTagInfo=Lista de definiciones o descripciones
-DTTagInfo=T\u00e9rmino o tema de una lista de definiciones o descripciones
-EMTagInfo=Visualiza texto enfatizado (generalmente en cursiva)
-EMBEDTagInfo=Define un conector incorporado. No soportado en W3C HTML 4.01.
-FIELDSETTagInfo=Define un grupo de control de formularios
-FONTTagInfo=Visualiza texto en el font dado
-FORMTagInfo=Define un formulario interactivo
-FRAMETagInfo=Define un marco dentro de la ventana actual
-FRAMESETTagInfo=Define un conjunto de marcos que divide la ventana en marcos
-H1TagInfo=Cabecera de alto nivel
-H2TagInfo=Cabecera de segundo nivel
-H3TagInfo=Cabecera de tercer nivel
-H4TagInfo=Cabecera de cuarto nivel
-H5TagInfo=Cabecera de quinto nivel
-H6TagInfo=Cabecera de sexto nivel
-HEADTagInfo=Contiene metadatos e informaci\u00f3n de t\u00edtulo de ventanas para el documento
-HRTagInfo=Regla horizontal
-HTMLTagInfo=Elemento ra\u00edz para el documento
-ITagInfo=Visualiza texto en cursiva
-IFRAMETagInfo=Define una subventana incorporada
-IMGTagInfo=Visualiza la imagen a la que se hace referencia en forma de contenido intercalado
-INPUTTagInfo=Define un control de formulario para la entrada del usuario
-INSTagInfo=Define texto insertado
-ISINDEXTagInfo=Define una solicitud de una sola l\u00ednea
-KBDTagInfo=Define texto que el usuario debe especificar
-LABELTagInfo=Define la etiqueta de un campo de formulario
-LEGENDTagInfo=Define la etiqueta de un conjunto de campos de formulario
-LITagInfo=Define un elemento de lista de una lista
-LINKTagInfo=Enlace independiente de medios
-MAPTagInfo=Define un mapa de imagen del lado del cliente
-MARQUEETagInfo=Visualiza texto en forma desplazable. No soportado en W3C HTML 4.01.
-MENUTagInfo=Define una lista de men\u00fas
-METATagInfo=Define informaci\u00f3n de metadatos para el documento
-NOBRTagInfo=Altera temporalmente e impide los saltos de l\u00ednea. No soportado en W3C HTML 4.01.
-NOFRAMESTagInfo=Proporciona informaci\u00f3n de visualizaci\u00f3n si el navegador actual no da soporte a marcos.
-NOSCRIPTTagInfo=Proporciona informaci\u00f3n de visualizaci\u00f3n si el navegador actual no da soporte a scripts.
-OBJECTTagInfo=Define un objeto gen\u00e9rico incorporado
-OLTagInfo=Lista ordenada
-OPTGROUPTagInfo=Grupo de opciones
-OPTIONTagInfo=Opci\u00f3n seleccionable
-PTagInfo=P\u00e1rrafo
-PARAMTagInfo=Valor de propiedad con nombre
-PRETagInfo=Texto preformateado
-QTagInfo=Cita corta incorporada
-STagInfo=Visualiza texto en estilo tachado
-SAMPTagInfo=Salida de programa de ejemplo, scripts, etc. Se visualiza en font monoespacio.
-SCRIPTTagInfo=Sentencias de script
-SELECTTagInfo=Selector de opciones
-SMALLTagInfo=Visualiza texto en forma reducida
-SPANTagInfo=Contenedor gen\u00e9rico, que puede utilizarse para definir el idioma o el estilo del contenido
-STRIKETagInfo=Visualiza texto en estilo tachado
-STRONGTagInfo=Visualiza texto muy enfatizado (generalmente en negrita)
-STYLETagInfo=Define un estilo para la informaci\u00f3n que contiene
-SUBTagInfo=Visualizar como subscript
-SUPTagInfo=Visualizar como superscript
-TABLETagInfo=Define una tabla
-TBODYTagInfo=Cuerpo de la tabla
-TDTagInfo=Casilla de la tabla
-TEXTAREATagInfo=Campo de texto multil\u00ednea
-TFOOTTagInfo=Pie de de p\u00e1gina de tabla
-THTagInfo=Casilla de cabecera de tabla
-THEADTagInfo=Cabecera de tabla
-TITLETagInfo=T\u00edtulo del documento, visualizado en la barra de t\u00edtulo del navegador
-TRTagInfo=Fila de tabla
-TTTagInfo=Visualiza texto en estilo de texto teletipo o monoespacio
-UTagInfo=Visualiza texto subrayado
-ULTagInfo=Lista desordenada
-VARTagInfo=Instancia de una variable o argumento de programa
-WBRTagInfo=Permite un salto de l\u00ednea dentro del c\u00f3digo <B>&lt;NOBR&gt;</B>. No soportado en W3C HTML 4.01.
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref_fr.properties b/bundles/org.eclipse.wst.html.core/data/htmref_fr.properties
deleted file mode 100644
index b8817bb94a..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref_fr.properties
+++ /dev/null
@@ -1,108 +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
-###############################################################################
-
-ATagInfo=Lien si l'attribut "href" est indiqu\u00e9. Cible d'un lien si l'attribut "name" est indiqu\u00e9
-ABBRTagInfo=Abr\u00e9viation (par exemple, WWW, HTTP)
-ACRONYMTagInfo=Acronyme (par exemple, SCUBA)
-ADDRESSTagInfo=Informations relatives aux adresses de l'auteur de la page
-APPLETTagInfo=Applet Java
-AREATagInfo=D\u00e9finit la zone d'une image hypertexte c\u00f4t\u00e9 client
-BTagInfo=Affiche en gras le texte indiqu\u00e9
-BASETagInfo=URI de base de la page \u00e0 utiliser lors du calcul des chemins relatifs
-BASEFONTTagInfo=Taille de base de la police dans la page
-BDOTagInfo=Remplace l'affichage bidirectionnel par d\u00e9faut. S'applique aux langues bidirectionnelles
-BIGTagInfo=Affiche le texte en gros caract\u00e8res
-BGSOUNDTagInfo=D\u00e9finit un fichier son pour la page. Pas pris en charge par W3C HTML 4.0.1
-BLINKTagInfo=Affiche un texte qui clignote. Pas pris en charge par W3C HTML 4.0.1
-BLOCKQUOTETagInfo=Longue citation
-BODYTagInfo=Corps du document. Inclut tout le contenu de la page
-BRTagInfo=Force un retour \u00e0 la ligne
-BUTTONTagInfo=D\u00e9finit un bouton de fonction
-CAPTIONTagInfo=D\u00e9finit la l\u00e9gende d'un tableau
-CENTERTagInfo=Centre le texte indiqu\u00e9. Correspond \u00e0 DIV avec align=center
-CITETagInfo=Citation
-CODETagInfo=Fragment de code de l'ordinateur
-COLTagInfo=Colonne d'un tableau
-COLGROUPTagInfo=Groupe de colonnes d'un tableau
-DDTagInfo=D\u00e9finition ou description dans une liste de d\u00e9finitions ou de descriptions
-DELTagInfo=Affiche le texte comme \u00e9tant supprim\u00e9
-DFNTagInfo=D\u00e9finition
-DIRTagInfo=Liste de r\u00e9pertoires
-DIVTagInfo=Conteneur g\u00e9n\u00e9rique permettant de d\u00e9finir la langue ou le style du contenu
-DLTagInfo=Liste de d\u00e9finitions ou de descriptions
-DTTagInfo=Terme ou sujet dans une liste de d\u00e9finitions ou de descriptions
-EMTagInfo=Met le texte en \u00e9vidence (en g\u00e9n\u00e9ral en italique)
-EMBEDTagInfo=D\u00e9finit un plug-in imbriqu\u00e9. Pas pris en charge par W3C HTML 4.0.1
-FIELDSETTagInfo=D\u00e9finit un groupe de contr\u00f4le du formulaire
-FONTTagInfo=Affiche le texte dans la police indiqu\u00e9e
-FORMTagInfo=D\u00e9finit un formulaire interactif
-FRAMETagInfo=D\u00e9finit un cadre dans la fen\u00eatre en cours
-FRAMESETTagInfo=D\u00e9finit un ensemble de cadres qui divisent la fen\u00eatre en plusieurs cadres
-H1TagInfo=Titre de niveau sup\u00e9rieur
-H2TagInfo=Titre de deuxi\u00e8me niveau
-H3TagInfo=Titre de troisi\u00e8me niveau
-H4TagInfo=Titre de quatri\u00e8me niveau
-H5TagInfo=Titre de cinqui\u00e8me niveau
-H6TagInfo=Titre de sixi\u00e8me niveau
-HEADTagInfo=Contient des informations sur les m\u00e9tadonn\u00e9es et le titre de la fen\u00eatre d'un document
-HRTagInfo=R\u00e8gle horizontale
-HTMLTagInfo=El\u00e9ment racine du document
-ITagInfo=Affiche le texte en italique
-IFRAMETagInfo=D\u00e9finit une sous-fen\u00eatre int\u00e9gr\u00e9e
-IMGTagInfo=Affiche l'image r\u00e9f\u00e9renc\u00e9e sous la forme d'un contenu imbriqu\u00e9
-INPUTTagInfo=D\u00e9finit un contr\u00f4le de formulaire pour les donn\u00e9es entr\u00e9es par l'utilisateur
-INSTagInfo=D\u00e9finit le texte ins\u00e9r\u00e9
-ISINDEXTagInfo=D\u00e9finit un message d'une seule ligne
-KBDTagInfo=D\u00e9finit le texte que l'utilisateur doit entrer
-LABELTagInfo=D\u00e9finit le libell\u00e9 d'une zone du formulaire
-LEGENDTagInfo=D\u00e9finit le libell\u00e9 d'un ensemble de zones du formulaire
-LITagInfo=D\u00e9finit un \u00e9l\u00e9ment dans une liste
-LINKTagInfo=Lien ind\u00e9pendant d'un support
-MAPTagInfo=D\u00e9finit une image hypertexte c\u00f4t\u00e9 client
-MARQUEETagInfo=Affiche un texte qui d\u00e9file. Pas pris en charge par W3C HTML 4.0.1
-MENUTagInfo=D\u00e9finit une liste de type menu
-METATagInfo=D\u00e9finit des informations sur les m\u00e9tadonn\u00e9es du document
-NOBRTagInfo=Remplace et emp\u00eache les retours \u00e0 la ligne. Pas pris en charge par W3C HTML 4.0.1
-NOFRAMESTagInfo=Fournit les informations \u00e0 afficher si le navigateur en cours ne prend pas en charge les cadres
-NOSCRIPTTagInfo=Fournit les informations \u00e0 afficher si le navigateur en cours ne prend pas en charge le scriptage
-OBJECTTagInfo=D\u00e9finit un objet imbriqu\u00e9 g\u00e9n\u00e9rique
-OLTagInfo=Liste num\u00e9rot\u00e9e
-OPTGROUPTagInfo=Groupe d'options
-OPTIONTagInfo=Option disponible pour effectuer une s\u00e9lection
-PTagInfo=Paragraphe
-PARAMTagInfo=Valeur de la propri\u00e9t\u00e9 indiqu\u00e9e
-PRETagInfo=Texte pr\u00e9format\u00e9
-QTagInfo=Citation courte et ins\u00e9r\u00e9e
-STagInfo=Affiche un texte barr\u00e9
-SAMPTagInfo=Exemple de donn\u00e9es g\u00e9n\u00e9r\u00e9es par un programme, scripts, etc. Affiche les donn\u00e9es dans une police \u00e0 ch\u00e2sse fixe
-SCRIPTTagInfo=Instructions du script
-SELECTTagInfo=Fonction de s\u00e9lection d'options
-SMALLTagInfo=Affiche le texte en petits caract\u00e8res
-SPANTagInfo=Conteneur g\u00e9n\u00e9rique permettant de d\u00e9finir la langue ou le style du contenu
-STRIKETagInfo=Affiche un texte barr\u00e9
-STRONGTagInfo=Met le texte en \u00e9vidence (en g\u00e9n\u00e9ral en gras)
-STYLETagInfo=D\u00e9finit un style pour les informations indiqu\u00e9es
-SUBTagInfo=Affiche les donn\u00e9es sous la forme d'un indice
-SUPTagInfo=Affiche les donn\u00e9es sous la forme d'un exposant
-TABLETagInfo=D\u00e9finit un tableau
-TBODYTagInfo=Corps d'un tableau
-TDTagInfo=Cellule d'un tableau
-TEXTAREATagInfo=Zone de texte comportant plusieurs lignes
-TFOOTTagInfo=Pied de page d'un tableau
-THTagInfo=Cellule d'en-t\u00eate d'un tableau
-THEADTagInfo=En-t\u00eate d'un tableau
-TITLETagInfo=Titre du document affich\u00e9 dans la barre de titre du navigateur
-TRTagInfo=Ligne d'un tableau
-TTTagInfo=Affiche le texte en mode t\u00e9l\u00e9type ou avec une police \u00e0 ch\u00e2sse fixe
-UTagInfo=Souligne le texte
-ULTagInfo=Liste non num\u00e9rot\u00e9e
-VARTagInfo=Instance d'une variable ou d'un argument de programme
-WBRTagInfo=Permet un retour \u00e0 la ligne \u00e0 l'int\u00e9rieur de la balise <B>&lt;NOBR&gt;</B>. Pas pris en charge par W3C HTML 4.0.1
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref_it.properties b/bundles/org.eclipse.wst.html.core/data/htmref_it.properties
deleted file mode 100644
index 6e6e0da763..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref_it.properties
+++ /dev/null
@@ -1,108 +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
-###############################################################################
-
-ATagInfo=Collegamento, se \u00e8 presente l'attributo href, e destinazione per il collegamento, se \u00e8 presente l'attributo nome
-ABBRTagInfo=Abbreviazione (ad esempio, WWW, HTTP)
-ACRONYMTagInfo=Acronimo (ad esempio, SCUBA)
-ADDRESSTagInfo=Informazioni relative all'indirizzo dell'autore della pagina
-APPLETTagInfo=Applet Java
-AREATagInfo=Definisce un'area di mappe immagini sul lato client
-BTagInfo=Visualizza il testo contenuto come grassetto
-BASETagInfo=URI di base della pagina, da utilizzare durante il calcolo dei percorsi relativi
-BASEFONTTagInfo=Dimensione di base del tipo di carattere della pagina
-BDOTagInfo=Sostituisce la visualizzazione bidirezionale predefinita. Per l'utilizzo con linguaggi bidirezionali.
-BIGTagInfo=Visualizza il testo contenuto come grande
-BGSOUNDTagInfo=Definisce un file audio della pagina. Non supportato da W3C HTML 4.01.
-BLINKTagInfo=Visualizza il testo come lampeggiante. Non supportato da W3C HTML 4.01.
-BLOCKQUOTETagInfo=Lunga citazione
-BODYTagInfo=Corpo del documento. Racchiude tutto il contenuto della pagina.
-BRTagInfo=Determina un'interruzione di riga
-BUTTONTagInfo=Definisce un pulsante di comando
-CAPTIONTagInfo=Definisce la didascalia di una tabella
-CENTERTagInfo=Visualizza il testo contenuto come centrato. Equivalente a DIV con align=center.
-CITETagInfo=Citazione
-CODETagInfo=Frammento di codice del computer
-COLTagInfo=Colonna di tabella
-COLGROUPTagInfo=Gruppo di colonne di tabella
-DDTagInfo=Definizione o descrizione in un'elenco di definizioni o descrizioni
-DELTagInfo=Visualizza il testo come eliminato
-DFNTagInfo=Definizione
-DIRTagInfo=Elenco di directory
-DIVTagInfo=Contenitore generico, che pu\u00f2 essere utilizzato per la definizione del linguaggio o dello stile del contenuto
-DLTagInfo=Elenco di definizioni o descrizioni
-DTTagInfo=Termine o argomento in un elenco di definizioni o descrizioni
-EMTagInfo=Visualizza il testo evidenziato (in genere in corsivo)
-EMBEDTagInfo=Definisce un plugin incorporato. Non supportato da W3C HTML 4.01.
-FIELDSETTagInfo=Definisce un gruppo di controllo modulo
-FONTTagInfo=Visualizza il testo nel tipo di carattere dato
-FORMTagInfo=Definisce un form interattivo
-FRAMETagInfo=Definisce un frame all'interni della finestra corrente
-FRAMESETTagInfo=Definisce un frameset che divide la finestra in frame
-H1TagInfo=Intestazione di primo livello
-H2TagInfo=Intestazione di secondo livello
-H3TagInfo=Intestazione di terzo livello
-H4TagInfo=Intestazione di quarto livello
-H5TagInfo=Intestazione di quinto livello
-H6TagInfo=Intestazione di sesto livello
-HEADTagInfo=Contiene metadati e informazioni sul titolo della finestra del documento
-HRTagInfo=Riga orizzontale
-HTMLTagInfo=Elemento principale del documento.
-ITagInfo=Visualizza il testo come corsivo
-IFRAMETagInfo=Definisce una finestra secondaria incorporata
-IMGTagInfo=Visualizza l'immagine di riferimento come contenuto incorporato
-INPUTTagInfo=Definisce un controllo modulo per l'input dell'utente
-INSTagInfo=Definisce un testo inserito
-ISINDEXTagInfo=Definisce un prompt a riga singola
-KBDTagInfo=Definisce il testo che deve essere immesso dall'utente
-LABELTagInfo=Definisce l'etichetta per un campo modulo
-LEGENDTagInfo=Definisce l'etichetta per un insieme di campi modulo
-LITagInfo=Definisce una voce di elenco all'interno di un elenco
-LINKTagInfo=Collegamento indipendente dal supporto
-MAPTagInfo=Definisce una mappa immagini sul lato client
-MARQUEETagInfo=Visualizza il testo in scorrimento. Non supportato da W3C HTML 4.01.
-MENUTagInfo=Definisce un elenco di menu
-METATagInfo=Definisce le informazioni sui metadati del documento
-NOBRTagInfo=Sostituisce ed evita le interruzioni di riga. Non supportato da W3C HTML 4.01.
-NOFRAMESTagInfo=Fornisce informazioni per visualizzare se il browser corrente non supporta frame
-NOSCRIPTTagInfo=Fornisce informazioni per visualizzare se il browser corrente non supporta script
-OBJECTTagInfo=Definisce un oggetto incorporato generico
-OLTagInfo=Elenco ordinato
-OPTGROUPTagInfo=Gruppo di opzioni
-OPTIONTagInfo=Opzione selezionabile
-PTagInfo=Paragrafo
-PARAMTagInfo=Valore propriet\u00e0 denominata
-PRETagInfo=Testo preformattato
-QTagInfo=Breve citazione incorporata
-STagInfo=Visualizza il testo in stile barrato
-SAMPTagInfo=Output di programmi di esempio, script e cos\u00ec via. Viene visualizzato in un tipo di carattere monospazio.
-SCRIPTTagInfo=Istruzioni di script
-SELECTTagInfo=Selettore di opzioni
-SMALLTagInfo=Visualizza il testo come piccolo
-SPANTagInfo=Contenitore generico, che pu\u00f2 essere utilizzato per la definizione del linguaggio o dello stile del contenuto
-STRIKETagInfo=Visualizza il testo in stile barrato
-STRONGTagInfo=Visualizza il testo evidenziato in maniera netta (in genere in grassetto)
-STYLETagInfo=Definisce uno stile per le informazioni contenute
-SUBTagInfo=Visualizza come pedice
-SUPTagInfo=Visualizza come apice
-TABLETagInfo=Definisce una tabella
-TBODYTagInfo=Corpo della tabella
-TDTagInfo=Cella all'interno di una tabella
-TEXTAREATagInfo=Campo di testo a pi\u00f9 righe
-TFOOTTagInfo=Pi\u00e8 di pagina tabella
-THTagInfo=Cella di intestazione di una tabella
-THEADTagInfo=Intestazione tabella
-TITLETagInfo=Titolo del documento, visualizzato nella barra del titolo del browser
-TRTagInfo=Riga di tabella
-TTTagInfo=Visualizza il testo in stile testo telescrivente o monospazio
-UTagInfo=Visualizza il testo come sottolineato
-ULTagInfo=Elenco non ordinato
-VARTagInfo=Istanza di una variabile o di un argomento del programma
-WBRTagInfo=Consente un'interruzione di riga all'interno del tag <B>&lt;NOBR&gt;</B>. Non supportato da W3C HTML 4.01.
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref_ja.properties b/bundles/org.eclipse.wst.html.core/data/htmref_ja.properties
deleted file mode 100644
index b997445907..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref_ja.properties
+++ /dev/null
@@ -1,108 +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
-###############################################################################
-
-ATagInfo=href \u5c5e\u6027\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306f\u30ea\u30f3\u30af\u3001\u304a\u3088\u3073 name \u5c5e\u6027\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306f\u30ea\u30f3\u30af\u306e\u30bf\u30fc\u30b2\u30c3\u30c8
-ABBRTagInfo=\u7701\u7565\u5f62 (\u305f\u3068\u3048\u3070 WWW\u3001HTTP \u306a\u3069)
-ACRONYMTagInfo=\u982d\u5b57\u8a9e (\u305f\u3068\u3048\u3070 SCUBA \u306a\u3069)
-ADDRESSTagInfo=\u30da\u30fc\u30b8\u4f5c\u6210\u8005\u306e\u30a2\u30c9\u30ec\u30b9\u60c5\u5831
-APPLETTagInfo=Java \u30a2\u30d7\u30ec\u30c3\u30c8
-AREATagInfo=\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30fb\u30b5\u30a4\u30c9\u30fb\u30a4\u30e1\u30fc\u30b8\u30fb\u30de\u30c3\u30d7\u30fb\u30a8\u30ea\u30a2\u3092\u5b9a\u7fa9
-BTagInfo=\u542b\u307e\u308c\u3066\u3044\u308b\u30c6\u30ad\u30b9\u30c8\u3092\u592a\u5b57\u3067\u8868\u793a
-BASETagInfo=\u30da\u30fc\u30b8\u306e\u57fa\u672c URI (\u76f8\u5bfe\u30d1\u30b9\u306e\u8a08\u7b97\u6642\u306b\u4f7f\u7528\u3055\u308c\u308b)
-BASEFONTTagInfo=\u30da\u30fc\u30b8\u306e\u57fa\u672c\u30d5\u30a9\u30f3\u30c8\u30fb\u30b5\u30a4\u30ba
-BDOTagInfo=\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u53cc\u65b9\u5411\u8868\u793a\u3092\u6307\u5b9a\u5909\u66f4\u3002 \u53cc\u65b9\u5411\u8a00\u8a9e\u3068\u5171\u306b\u4f7f\u7528\u3002
-BIGTagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u30e9\u30fc\u30b8\u30fb\u30d5\u30a9\u30f3\u30c8\u3067\u8868\u793a
-BGSOUNDTagInfo=\u30da\u30fc\u30b8\u306e\u30b5\u30a6\u30f3\u30c9\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u5b9a\u7fa9\u3002 W3C HTML 4.01 \u3067\u306f\u975e\u30b5\u30dd\u30fc\u30c8\u3002
-BLINKTagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u660e\u6ec5\u3067\u8868\u793a\u3002 W3C HTML 4.01 \u3067\u306f\u975e\u30b5\u30dd\u30fc\u30c8\u3002
-BLOCKQUOTETagInfo=\u9577\u3044\u5f15\u7528
-BODYTagInfo=\u6587\u66f8\u672c\u6587\u3002\u30da\u30fc\u30b8\u306e\u3059\u3079\u3066\u306e\u5185\u5bb9\u3092\u542b\u3080\u3002
-BRTagInfo=\u6539\u884c\u3092\u5f37\u5236
-BUTTONTagInfo=\u30d7\u30c3\u30b7\u30e5\u30dc\u30bf\u30f3\u3092\u5b9a\u7fa9
-CAPTIONTagInfo=\u30c6\u30fc\u30d6\u30eb\u8868\u984c\u3092\u5b9a\u7fa9
-CENTERTagInfo=\u542b\u307e\u308c\u3066\u3044\u308b\u30c6\u30ad\u30b9\u30c8\u3092\u4e2d\u592e\u305d\u308d\u3048\u3067\u8868\u793a\u3002 align=center \u3092\u6301\u3064 DIV \u306b\u76f8\u5f53\u3002
-CITETagInfo=\u5f15\u7528
-CODETagInfo=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u30fb\u30b3\u30fc\u30c9\u30fb\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8
-COLTagInfo=\u30c6\u30fc\u30d6\u30eb\u5217
-COLGROUPTagInfo=\u30c6\u30fc\u30d6\u30eb\u5217\u306e\u30b0\u30eb\u30fc\u30d7
-DDTagInfo=\u5b9a\u7fa9\u307e\u305f\u306f\u8a18\u8ff0\u30ea\u30b9\u30c8\u5185\u306e\u5b9a\u7fa9\u3042\u308b\u3044\u306f\u8a18\u8ff0
-DELTagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u524a\u9664\u6e08\u307f\u3068\u3057\u3066\u8868\u793a
-DFNTagInfo=\u5b9a\u7fa9
-DIRTagInfo=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u30fb\u30ea\u30b9\u30c8
-DIVTagInfo=\u6c4e\u7528\u30b3\u30f3\u30c6\u30ca\u30fc (\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u8a00\u8a9e\u307e\u305f\u306f\u30b9\u30bf\u30a4\u30eb\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3067\u304d\u308b)
-DLTagInfo=\u5b9a\u7fa9\u307e\u305f\u306f\u8a18\u8ff0\u30ea\u30b9\u30c8
-DTTagInfo=\u5b9a\u7fa9\u307e\u305f\u306f\u8a18\u8ff0\u30ea\u30b9\u30c8\u5185\u306e\u7528\u8a9e\u307e\u305f\u306f\u30b5\u30d6\u30b8\u30a7\u30af\u30c8
-EMTagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u5f37\u8abf\u8868\u793a (\u4e00\u822c\u7684\u306b\u306f\u30a4\u30bf\u30ea\u30c3\u30af\u8868\u793a)
-EMBEDTagInfo=\u7d44\u307f\u8fbc\u307f\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5b9a\u7fa9\u3002 W3C HTML 4.01 \u3067\u306f\u975e\u30b5\u30dd\u30fc\u30c8\u3002
-FIELDSETTagInfo=\u66f8\u5f0f\u5236\u5fa1\u30b0\u30eb\u30fc\u30d7\u3092\u5b9a\u7fa9
-FONTTagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u6307\u5b9a\u306e\u30d5\u30a9\u30f3\u30c8\u3067\u8868\u793a
-FORMTagInfo=\u5bfe\u8a71\u5f0f\u66f8\u5f0f\u3092\u5b9a\u7fa9
-FRAMETagInfo=\u73fe\u884c\u30a6\u30a3\u30f3\u30c9\u30a6\u5185\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u5b9a\u7fa9
-FRAMESETTagInfo=\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u5206\u5272\u3057\u3066\u30d5\u30ec\u30fc\u30e0\u306b\u3059\u308b\u30d5\u30ec\u30fc\u30e0\u30fb\u30bb\u30c3\u30c8\u3092\u5b9a\u7fa9
-H1TagInfo=\u30c8\u30c3\u30d7\u30ec\u30d9\u30eb\u898b\u51fa\u3057
-H2TagInfo=2 \u6b21\u30ec\u30d9\u30eb\u898b\u51fa\u3057
-H3TagInfo=3 \u6b21\u30ec\u30d9\u30eb\u898b\u51fa\u3057
-H4TagInfo=4 \u6b21\u30ec\u30d9\u30eb\u898b\u51fa\u3057
-H5TagInfo=5 \u6b21\u30ec\u30d9\u30eb\u898b\u51fa\u3057
-H6TagInfo=6 \u6b21\u30ec\u30d9\u30eb\u898b\u51fa\u3057
-HEADTagInfo=\u6587\u66f8\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3068\u30a6\u30a3\u30f3\u30c9\u30a6\u30fb\u30bf\u30a4\u30c8\u30eb\u306e\u60c5\u5831\u3092\u542b\u3080
-HRTagInfo=\u6c34\u5e73\u3051\u3044\u7dda
-HTMLTagInfo=\u6587\u66f8\u306e\u30eb\u30fc\u30c8\u30fb\u30a8\u30ec\u30e1\u30f3\u30c8
-ITagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u30a4\u30bf\u30ea\u30c3\u30af\u3067\u8868\u793a
-IFRAMETagInfo=\u30a4\u30f3\u30e9\u30a4\u30f3\u30fb\u30b5\u30d6\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u5b9a\u7fa9
-IMGTagInfo=\u7d44\u307f\u8fbc\u307f\u30b3\u30f3\u30c6\u30f3\u30c4\u3068\u3057\u3066\u53c2\u7167\u30a4\u30e1\u30fc\u30b8\u3092\u8868\u793a
-INPUTTagInfo=\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u7528\u306e\u66f8\u5f0f\u5236\u5fa1\u3092\u5b9a\u7fa9
-INSTagInfo=\u633f\u5165\u3055\u308c\u308b\u30c6\u30ad\u30b9\u30c8\u3092\u5b9a\u7fa9
-ISINDEXTagInfo=\u5358\u4e00\u884c\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u5b9a\u7fa9
-KBDTagInfo=\u30e6\u30fc\u30b6\u30fc\u304c\u5165\u529b\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u3092\u5b9a\u7fa9
-LABELTagInfo=\u66f8\u5f0f\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30e9\u30d9\u30eb\u3092\u5b9a\u7fa9
-LEGENDTagInfo=\u66f8\u5f0f\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30bb\u30c3\u30c8\u306e\u30e9\u30d9\u30eb\u3092\u5b9a\u7fa9
-LITagInfo=\u30ea\u30b9\u30c8\u5185\u306e\u30ea\u30b9\u30c8\u9805\u76ee\u3092\u5b9a\u7fa9
-LINKTagInfo=\u30e1\u30c7\u30a3\u30a2\u975e\u4f9d\u5b58\u306e\u30ea\u30f3\u30af
-MAPTagInfo=\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30fb\u30b5\u30a4\u30c9\u306e\u30a4\u30e1\u30fc\u30b8\u30fb\u30de\u30c3\u30d7\u3092\u5b9a\u7fa9
-MARQUEETagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u30b9\u30af\u30ed\u30fc\u30eb\u8868\u793a\u3002 W3C HTML 4.01 \u3067\u306f\u975e\u30b5\u30dd\u30fc\u30c8\u3002
-MENUTagInfo=\u30e1\u30cb\u30e5\u30fc\u30fb\u30ea\u30b9\u30c8\u3092\u5b9a\u7fa9
-METATagInfo=\u6587\u66f8\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u60c5\u5831\u3092\u5b9a\u7fa9
-NOBRTagInfo=\u6539\u884c\u3092\u6307\u5b9a\u5909\u66f4\u304a\u3088\u3073\u9632\u6b62\u3002 W3C HTML 4.01 \u3067\u306f\u975e\u30b5\u30dd\u30fc\u30c8\u3002
-NOFRAMESTagInfo=\u73fe\u5728\u306e\u30d6\u30e9\u30a6\u30b6\u30fc\u304c\u30d5\u30ec\u30fc\u30e0\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u306a\u3044\u5834\u5408\u306b\u8868\u793a\u3059\u308b\u60c5\u5831\u3092\u63d0\u4f9b
-NOSCRIPTTagInfo=\u73fe\u5728\u306e\u30d6\u30e9\u30a6\u30b6\u30fc\u304c\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u306a\u3044\u5834\u5408\u306b\u8868\u793a\u3059\u308b\u60c5\u5831\u3092\u63d0\u4f9b
-OBJECTTagInfo=\u6c4e\u7528\u7d44\u307f\u8fbc\u307f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5b9a\u7fa9
-OLTagInfo=\u9806\u5e8f\u4ed8\u304d\u30ea\u30b9\u30c8
-OPTGROUPTagInfo=\u30aa\u30d7\u30b7\u30e7\u30f3\u30fb\u30b0\u30eb\u30fc\u30d7
-OPTIONTagInfo=\u9078\u629e\u53ef\u80fd\u9805\u76ee
-PTagInfo=\u6bb5\u843d
-PARAMTagInfo=\u540d\u524d\u4ed8\u304d\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u5024
-PRETagInfo=\u30d9\u30bf\u66f8\u304d\u30c6\u30ad\u30b9\u30c8
-QTagInfo=\u77ed\u3044\u30a4\u30f3\u30e9\u30a4\u30f3\u5f15\u7528
-STagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u6253\u3061\u6d88\u3057\u7dda\u30b9\u30bf\u30a4\u30eb\u3067\u8868\u793a
-SAMPTagInfo=\u30b5\u30f3\u30d7\u30eb\u30fb\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u51fa\u529b\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u3001\u305d\u306e\u4ed6\u3002 \u30e2\u30ce\u30b9\u30da\u30fc\u30b9\u30fb\u30d5\u30a9\u30f3\u30c8\u3067\u8868\u793a\u3002
-SCRIPTTagInfo=\u30b9\u30af\u30ea\u30d7\u30c8\u30fb\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8
-SELECTTagInfo=\u30aa\u30d7\u30b7\u30e7\u30f3\u30fb\u30bb\u30ec\u30af\u30bf\u30fc
-SMALLTagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u30b9\u30e2\u30fc\u30eb\u30fb\u30d5\u30a9\u30f3\u30c8\u3067\u8868\u793a
-SPANTagInfo=\u6c4e\u7528\u30b3\u30f3\u30c6\u30ca\u30fc (\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u8a00\u8a9e\u307e\u305f\u306f\u30b9\u30bf\u30a4\u30eb\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3067\u304d\u308b)
-STRIKETagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u6253\u3061\u6d88\u3057\u7dda\u30b9\u30bf\u30a4\u30eb\u3067\u8868\u793a
-STRONGTagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u5f37\u8abf\u8868\u793a (\u4e00\u822c\u7684\u306b\u306f\u592a\u5b57\u8868\u793a)
-STYLETagInfo=\u542b\u307e\u308c\u3066\u3044\u308b\u60c5\u5831\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u5b9a\u7fa9
-SUBTagInfo=\u4e0b\u4ed8\u304d\u3068\u3057\u3066\u8868\u793a
-SUPTagInfo=\u4e0a\u4ed8\u304d\u3068\u3057\u3066\u8868\u793a
-TABLETagInfo=\u30c6\u30fc\u30d6\u30eb\u3092\u5b9a\u7fa9
-TBODYTagInfo=\u30c6\u30fc\u30d6\u30eb\u306e\u672c\u6587
-TDTagInfo=\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u30bb\u30eb
-TEXTAREATagInfo=\u8907\u6570\u884c\u30c6\u30ad\u30b9\u30c8\u30fb\u30d5\u30a3\u30fc\u30eb\u30c9
-TFOOTTagInfo=\u30c6\u30fc\u30d6\u30eb\u30fb\u30d5\u30c3\u30bf\u30fc
-THTagInfo=\u30c6\u30fc\u30d6\u30eb\u30fb\u30d8\u30c3\u30c0\u30fc\u30fb\u30bb\u30eb
-THEADTagInfo=\u30c6\u30fc\u30d6\u30eb\u30fb\u30d8\u30c3\u30c0\u30fc
-TITLETagInfo=\u6587\u66f8\u30bf\u30a4\u30c8\u30eb (\u30d6\u30e9\u30a6\u30b6\u30fc\u306e\u30bf\u30a4\u30c8\u30eb\u30fb\u30d0\u30fc\u306b\u8868\u793a\u3055\u308c\u308b)
-TRTagInfo=\u30c6\u30fc\u30d6\u30eb\u884c
-TTTagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u30c6\u30ec\u30bf\u30a4\u30d7\u307e\u305f\u306f\u30e2\u30ce\u30b9\u30da\u30fc\u30b9\u30fb\u30c6\u30ad\u30b9\u30c8\u30fb\u30b9\u30bf\u30a4\u30eb\u3067\u8868\u793a
-UTagInfo=\u30c6\u30ad\u30b9\u30c8\u3092\u4e0b\u7dda\u4ed8\u304d\u3067\u8868\u793a
-ULTagInfo=\u9806\u4e0d\u540c\u30ea\u30b9\u30c8
-VARTagInfo=\u5909\u6570\u307e\u305f\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u5f15\u304d\u6570\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9
-WBRTagInfo=<B>&lt;NOBR&gt;</B> \u30bf\u30b0\u5185\u306e\u6539\u884c\u3092\u8a8d\u3081\u308b\u3002 W3C HTML 4.01 \u3067\u306f\u975e\u30b5\u30dd\u30fc\u30c8\u3002
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref_ko.properties b/bundles/org.eclipse.wst.html.core/data/htmref_ko.properties
deleted file mode 100644
index a6336137bb..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref_ko.properties
+++ /dev/null
@@ -1,108 +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
-###############################################################################
-
-ATagInfo=href \uc18d\uc131\uc774 \uc788\ub294 \uacbd\uc6b0, \ub9c1\ud06c \uadf8\ub9ac\uace0 \uc774\ub984 \uc18d\uc131\uc774 \uc788\ub294 \uacbd\uc6b0, \ub9c1\ud06c\uc758 \ub300\uc0c1
-ABBRTagInfo=\uc57d\uc5b4(\uc608: WWW, HTTP)
-ACRONYMTagInfo=\uba38\ub9ac\uae00\uc790(\uc608: SCUBA)
-ADDRESSTagInfo=\ud398\uc774\uc9c0 \uc791\uc131\uc790\uc758 \uc8fc\uc18c \uc815\ubcf4
-APPLETTagInfo=Java \uc560\ud50c\ub9bf
-AREATagInfo=\ud074\ub77c\uc774\uc5b8\ud2b8\uce21 \uc774\ubbf8\uc9c0 \ub9f5 \uc601\uc5ed\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-BTagInfo=\ud3ec\ud568\ub41c \ud14d\uc2a4\ud2b8\ub97c \uad75\uc740\uccb4\ub85c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-BASETagInfo=\ud398\uc774\uc9c0\uc758 \uae30\uc900 URI(\uc0c1\ub300 \uacbd\ub85c \uacc4\uc0b0 \uc2dc \uc0ac\uc6a9\ub428)
-BASEFONTTagInfo=\ud398\uc774\uc9c0\uc758 \uae30\uc900 \uae00\uaf34 \ud06c\uae30
-BDOTagInfo=\uae30\ubcf8 \uc591\ubc29\ud5a5 \ud45c\uc2dc\ub97c \ub300\uccb4\ud569\ub2c8\ub2e4. \uc591\ubc29\ud5a5 \uc5b8\uc5b4\uc5d0 \uc0ac\uc6a9\ud569\ub2c8\ub2e4.
-BIGTagInfo=\ud3ec\ud568\ub41c \ud14d\uc2a4\ud2b8\ub97c \ud06c\uac8c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-BGSOUNDTagInfo=\ud398\uc774\uc9c0\uc758 \uc0ac\uc6b4\ub4dc \ud30c\uc77c\uc744 \uc815\uc758\ud569\ub2c8\ub2e4. W3C HTML 4.01\uc5d0\uc11c\ub294 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
-BLINKTagInfo=\ud14d\uc2a4\ud2b8\ub97c \uae5c\ubc15\uc784\uc73c\ub85c \ud45c\uc2dc\ud569\ub2c8\ub2e4. W3C HTML 4.01\uc5d0\uc11c\ub294 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
-BLOCKQUOTETagInfo=\uae34 \uc778\uc6a9\ubb38
-BODYTagInfo=\ubb38\uc11c \ubcf8\ubb38. \ud398\uc774\uc9c0\uc758 \ubaa8\ub4e0 \ucee8\ud150\uce20\ub97c \ud3ec\ud568\ud569\ub2c8\ub2e4.
-BRTagInfo=\ud589 \ubc14\uafb8\uae30\ub97c \uac15\uc81c \uc2e4\ud589\ud569\ub2c8\ub2e4.
-BUTTONTagInfo=\ub204\ub984 \ub2e8\ucd94\ub97c \uc815\uc758\ud569\ub2c8\ub2e4.
-CAPTIONTagInfo=\ud14c\uc774\ube14 \ucea1\uc158\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-CENTERTagInfo=\ud3ec\ud568\ub41c \ud14d\uc2a4\ud2b8\uac00 \uac00\uc6b4\ub370\ub85c \uc624\ub3c4\ub85d \ud45c\uc2dc\ud569\ub2c8\ub2e4. align=center\ub97c \uc124\uc815\ud55c DIV \ud0dc\uadf8\uc640 \ub3d9\uc77c\ud569\ub2c8\ub2e4.
-CITETagInfo=\uc778\uc6a9\ubb38
-CODETagInfo=\ucef4\ud4e8\ud130 \ucf54\ub4dc \ub2e8\ud3b8
-COLTagInfo=\ud14c\uc774\ube14 \uc5f4
-COLGROUPTagInfo=\ud14c\uc774\ube14 \uc5f4\uc758 \uadf8\ub8f9
-DDTagInfo=\uc815\uc758 \ub610\ub294 \uc124\uba85 \ubaa9\ub85d\uc758 \uc124\uba85 \ub610\ub294 \uc815\uc758
-DELTagInfo=\ud14d\uc2a4\ud2b8\ub97c \uc0ad\uc81c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-DFNTagInfo=\uc815\uc758
-DIRTagInfo=\ub514\ub809\ud1a0\ub9ac \ubaa9\ub85d
-DIVTagInfo=\ucee8\ud150\uce20\uc758 \uc2a4\ud0c0\uc77c \ub610\ub294 \uc5b8\uc5b4\ub97c \uc815\uc758\ud558\ub294 \ub370 \uc0ac\uc6a9 \uac00\ub2a5\ud55c \uc77c\ubc18 \ucee8\ud14c\uc774\ub108
-DLTagInfo=\uc815\uc758 \ub610\ub294 \uc124\uba85 \ubaa9\ub85d
-DTTagInfo=\uc815\uc758 \ub610\ub294 \uc124\uba85 \ubaa9\ub85d\uc758 \uc6a9\uc5b4 \ub610\ub294 \uc8fc\uc81c
-EMTagInfo=\ud14d\uc2a4\ud2b8\ub97c \uac15\uc870\ud45c\uc2dc\ud569\ub2c8\ub2e4(\uc77c\ubc18\uc801\uc73c\ub85c \uae30\uc6b8\uc784\uccb4).
-EMBEDTagInfo=\uc784\ubca0\ub514\ub4dc \ud50c\ub7ec\uadf8\uc778\uc744 \uc815\uc758\ud569\ub2c8\ub2e4. W3C HTML 4.01\uc5d0\uc11c\ub294 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
-FIELDSETTagInfo=\uc591\uc2dd \uc81c\uc5b4 \uadf8\ub8f9 \uc815\uc758
-FONTTagInfo=\ud14d\uc2a4\ud2b8\ub97c \uc9c0\uc815\ub41c \uae00\uaf34\ub85c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-FORMTagInfo=\ub300\ud654\uc2dd \uc591\uc2dd\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-FRAMETagInfo=\ud604\uc7ac \ucc3d \ub0b4\ubd80\uc758 \ud504\ub808\uc784\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-FRAMESETTagInfo=\ucc3d\uc744 \ud504\ub808\uc784\uc73c\ub85c \ub098\ub204\ub294 \ud504\ub808\uc784\uc138\ud2b8\ub97c \uc815\uc758\ud569\ub2c8\ub2e4.
-H1TagInfo=\ucd5c\uc0c1\uc704 \ub808\ubca8 \ud45c\uc81c
-H2TagInfo=\ub450 \ubc88\uc9f8 \ub808\ubca8 \ud45c\uc81c
-H3TagInfo=\uc138 \ubc88\uc9f8 \ub808\ubca8 \ud45c\uc81c
-H4TagInfo=\ub124 \ubc88\uc9f8 \ub808\ubca8 \ud45c\uc81c
-H5TagInfo=\ub2e4\uc12f \ubc88\uc9f8 \ub808\ubca8 \ud45c\uc81c
-H6TagInfo=\uc5ec\uc12f \ubc88\uc9f8 \ub808\ubca8 \ud45c\uc81c
-HEADTagInfo=\ubb38\uc11c\uc758 \uba54\ud0c0\ub370\uc774\ud130 \ubc0f \ucc3d \uc81c\ubaa9 \uc815\ubcf4\ub97c \ud3ec\ud568\ud569\ub2c8\ub2e4.
-HRTagInfo=\uc218\ud3c9 \uc790
-HTMLTagInfo=\ubb38\uc11c\uc758 \ub8e8\ud2b8 \uc694\uc18c
-ITagInfo=\ud14d\uc2a4\ud2b8\ub97c \uae30\uc6b8\uc784\uaf34\ub85c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-IFRAMETagInfo=\uc778\ub77c\uc778 \ud558\uc704 \ucc3d\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-IMGTagInfo=\ucc38\uc870\ub41c \uc774\ubbf8\uc9c0\ub97c \uc784\ubca0\ub514\ub4dc \ucee8\ud150\uce20\ub85c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-INPUTTagInfo=\uc0ac\uc6a9\uc790 \uc785\ub825\uc744 \uc704\ud55c \uc591\uc2dd \uc81c\uc5b4\ub97c \uc815\uc758\ud569\ub2c8\ub2e4.
-INSTagInfo=\uc0bd\uc785\ub41c \ud14d\uc2a4\ud2b8\ub97c \uc815\uc758\ud569\ub2c8\ub2e4.
-ISINDEXTagInfo=\ub2e8\uc77c \ud589 \ud504\ub86c\ud504\ud2b8\ub97c \uc815\uc758\ud569\ub2c8\ub2e4.
-KBDTagInfo=\uc0ac\uc6a9\uc790\uac00 \uc785\ub825\ud560 \ud14d\uc2a4\ud2b8\ub97c \uc815\uc758\ud569\ub2c8\ub2e4.
-LABELTagInfo=\uc591\uc2dd \ud544\ub4dc\uc758 \ub808\uc774\ube14\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-LEGENDTagInfo=\uc591\uc2dd \ud544\ub4dc \uc138\ud2b8\uc758 \ub808\uc774\ube14\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-LITagInfo=\ubaa9\ub85d \ub0b4\ubd80\uc758 \ubaa9\ub85d \ud56d\ubaa9\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-LINKTagInfo=\ub9e4\uccb4 \ub3c5\ub9bd\uc801 \ub9c1\ud06c
-MAPTagInfo=\ud074\ub77c\uc774\uc5b8\ud2b8\uce21 \uc774\ubbf8\uc9c0 \ub9f5\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-MARQUEETagInfo=\ud14d\uc2a4\ud2b8\uc5d0 \ud750\ub974\ub294 \ud6a8\uacfc\ub97c \uc90d\ub2c8\ub2e4. W3C HTML 4.01\uc5d0\uc11c\ub294 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
-MENUTagInfo=\uba54\ub274 \ubaa9\ub85d\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-METATagInfo=\ubb38\uc11c\uc758 \uba54\ud0c0\ub370\uc774\ud130 \uc815\ubcf4\ub97c \uc815\uc758\ud569\ub2c8\ub2e4.
-NOBRTagInfo=\ud589 \ubc14\uafb8\uae30\ub97c \ub300\uccb4\ud558\uac70\ub098 \ubc29\uc9c0\ud569\ub2c8\ub2e4. W3C HTML 4.01\uc5d0\uc11c\ub294 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
-NOFRAMESTagInfo=\ud604\uc7ac \ube0c\ub77c\uc6b0\uc800\uac00 \ud504\ub808\uc784\uc744 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uacbd\uc6b0 \ud45c\uc2dc\ud560 \uc815\ubcf4\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.
-NOSCRIPTTagInfo=\ud604\uc7ac \ube0c\ub77c\uc6b0\uc800\uac00 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uacbd\uc6b0 \ud45c\uc2dc\ud560 \uc815\ubcf4\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.
-OBJECTTagInfo=\uc784\ubca0\ub514\ub4dc \uc77c\ubc18 \uc624\ube0c\uc81d\ud2b8\ub97c \uc815\uc758\ud569\ub2c8\ub2e4.
-OLTagInfo=\uc21c\uc11c\ud654\ub41c \ubaa9\ub85d
-OPTGROUPTagInfo=\uc635\uc158 \uadf8\ub8f9
-OPTIONTagInfo=\uc120\ud0dd \uac00\ub2a5\ud55c \uc120\ud0dd\uc0ac\ud56d
-PTagInfo=\ub2e8\ub77d
-PARAMTagInfo=\uc774\ub984\uc774 \uc9c0\uc815\ub41c \ud2b9\uc131 \uac12
-PRETagInfo=\ubbf8\ub9ac \ud615\uc2dd\ud654\ub41c \ud14d\uc2a4\ud2b8
-QTagInfo=\ucd95\uc57d\ud615 \uc778\ub77c\uc778 \uc778\uc6a9\ubb38
-STagInfo=\ucde8\uc18c\uc120 \uc2a4\ud0c0\uc77c\ub85c \ud14d\uc2a4\ud2b8\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-SAMPTagInfo=\uc0d8\ud50c \ud504\ub85c\uadf8\ub7a8 \ucd9c\ub825, \uc2a4\ud06c\ub9bd\ud2b8 \ub4f1\uc5d0 \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \ubaa8\ub178\uc2a4\ud398\uc774\uc2a4 \uae00\uaf34\ub85c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-SCRIPTTagInfo=\uc2a4\ud06c\ub9bd\ud2b8 \ubb38
-SELECTTagInfo=\uc635\uc158 \uc120\ud0dd\uae30
-SMALLTagInfo=\ud14d\uc2a4\ud2b8\ub97c \uc791\uac8c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-SPANTagInfo=\ucee8\ud150\uce20\uc758 \uc2a4\ud0c0\uc77c \ub610\ub294 \uc5b8\uc5b4\ub97c \uc815\uc758\ud558\ub294 \ub370 \uc0ac\uc6a9 \uac00\ub2a5\ud55c \uc77c\ubc18 \ucee8\ud14c\uc774\ub108
-STRIKETagInfo=\ucde8\uc18c\uc120 \uc2a4\ud0c0\uc77c\ub85c \ud14d\uc2a4\ud2b8\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-STRONGTagInfo=\ud14d\uc2a4\ud2b8\ub97c \uac15\uc870\ud45c\uc2dc\ud569\ub2c8\ub2e4(\uc77c\ubc18\uc801\uc73c\ub85c \uad75\uc740\uccb4).
-STYLETagInfo=\ud3ec\ud568\ub41c \uc815\ubcf4\uc758 \uc2a4\ud0c0\uc77c\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-SUBTagInfo=\uc544\ub798 \ucca8\uc790\ub85c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-SUPTagInfo=\uc704 \ucca8\uc790\ub85c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-TABLETagInfo=\ud14c\uc774\ube14\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.
-TBODYTagInfo=\ud14c\uc774\ube14 \ubcf8\ubb38
-TDTagInfo=\ud14c\uc774\ube14 \ub0b4\uc758 \uc140
-TEXTAREATagInfo=\ub2e4\uc911 \ud589 \ud14d\uc2a4\ud2b8 \ud544\ub4dc
-TFOOTTagInfo=\ud14c\uc774\ube14 \ubc14\ub2e5\uae00
-THTagInfo=\ud14c\uc774\ube14 \ud5e4\ub354 \uc140
-THEADTagInfo=\ud14c\uc774\ube14 \ud5e4\ub354
-TITLETagInfo=\ube0c\ub77c\uc6b0\uc800 \uc81c\ubaa9 \ud45c\uc2dc\uc904\uc5d0 \ud45c\uc2dc\ub418\ub294 \ubb38\uc11c \uc81c\ubaa9
-TRTagInfo=\ud14c\uc774\ube14 \ud589
-TTTagInfo=\ud14d\uc2a4\ud2b8\ub97c \ud154\ub808\ud0c0\uc774\ud504 \ub610\ub294 \ubaa8\ub178\uc2a4\ud398\uc774\uc2a4 \ud14d\uc2a4\ud2b8 \uc2a4\ud0c0\uc77c\ub85c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-UTagInfo=\ud14d\uc2a4\ud2b8\uc5d0 \ubc11\uc904\uc744 \uadf8\uc5b4 \ud45c\uc2dc\ud569\ub2c8\ub2e4.
-ULTagInfo=\uc21c\uc11c \uc5c6\ub294 \ubaa9\ub85d
-VARTagInfo=\ubcc0\uc218 \ub610\ub294 \ud504\ub85c\uadf8\ub7a8 \uc778\uc218\uc758 \uc778\uc2a4\ud134\uc2a4
-WBRTagInfo=<B>&lt;NOBR&gt;</B> \ud0dc\uadf8 \ub0b4\uc5d0 \ud589 \ubc14\uafb8\uae30\ub97c \ud5c8\uc6a9\ud569\ub2c8\ub2e4. W3C HTML 4.01\uc5d0\uc11c\ub294 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref_pt_BR.properties b/bundles/org.eclipse.wst.html.core/data/htmref_pt_BR.properties
deleted file mode 100644
index b5e33068ac..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref_pt_BR.properties
+++ /dev/null
@@ -1,108 +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
-###############################################################################
-
-ATagInfo=Um link se o atributo href estiver presente e o destino de um link se o atributo name estiver presente.
-ABBRTagInfo=Uma abrevia\u00e7\u00e3o (por exemplo, WWW, HTTP)
-ACRONYMTagInfo=Um acr\u00f4nimo (por exemplo, SCUBA)
-ADDRESSTagInfo=Informa\u00e7\u00f5es sobre o endere\u00e7o do autor da p\u00e1gina
-APPLETTagInfo=Um applet Java
-AREATagInfo=Define uma \u00e1rea de mapa de imagem do lado do cliente
-BTagInfo=Exibe o texto contido como negrito
-BASETagInfo=O URI base para a p\u00e1gina a ser utilizado ao calcular caminhos relativos
-BASEFONTTagInfo=O tamanho da fonte base para a p\u00e1gina
-BDOTagInfo=Substitui a exibi\u00e7\u00e3o bidirecional padr\u00e3o. Para ser utilizado com idiomas bidirecionais.
-BIGTagInfo=Exibe o texto contido em tamanho grande
-BGSOUNDTagInfo=Define um arquivo de som para a p\u00e1gina. N\u00e3o suportado pelo W3C HTML 4.01.
-BLINKTagInfo=Exibe o texto piscando. N\u00e3o suportado pelo W3C HTML 4.01.
-BLOCKQUOTETagInfo=Uma cita\u00e7\u00e3o longa
-BODYTagInfo=O corpo do documento. Cont\u00e9m todo o conte\u00fado para a p\u00e1gina.
-BRTagInfo=For\u00e7a uma quebra de linha
-BUTTONTagInfo=Define um bot\u00e3o de comando
-CAPTIONTagInfo=Define uma legenda de tabela
-CENTERTagInfo=Exibe o texto contido centralizado. Equivalente a DIV com align=center.
-CITETagInfo=Uma cita\u00e7\u00e3o
-CODETagInfo=Um fragmento de c\u00f3digo de computador
-COLTagInfo=Uma coluna de tabela
-COLGROUPTagInfo=Um grupo de colunas da tabela
-DDTagInfo=Uma defini\u00e7\u00e3o ou descri\u00e7\u00e3o em uma lista de defini\u00e7\u00f5es ou descri\u00e7\u00f5es
-DELTagInfo=Exibe texto como exclu\u00eddo
-DFNTagInfo=Uma defini\u00e7\u00e3o
-DIRTagInfo=Uma listagem de diret\u00f3rios
-DIVTagInfo=Um cont\u00eainer gen\u00e9rico, que pode ser utilizado para definir idioma ou estilo do conte\u00fado
-DLTagInfo=Uma lista de defini\u00e7\u00f5es ou descri\u00e7\u00f5es
-DTTagInfo=Um termo ou assunto em uma lista de defini\u00e7\u00f5es ou descri\u00e7\u00f5es
-EMTagInfo=Exibe o texto enfatizado (geralmente em it\u00e1lico)
-EMBEDTagInfo=Define um plug-in incorporado. N\u00e3o suportado pelo W3C HTML 4.01.
-FIELDSETTagInfo=Define um grupo de controle de formul\u00e1rio
-FONTTagInfo=Exibe texto na fonte fornecida
-FORMTagInfo=Define um formul\u00e1rio interativo
-FRAMETagInfo=Define um quadro dentro da janela atual
-FRAMESETTagInfo=Define um conjunto de quadros que divide a janela em quadros
-H1TagInfo=Um t\u00edtulo de n\u00edvel superior
-H2TagInfo=Um t\u00edtulo de segundo n\u00edvel
-H3TagInfo=Um t\u00edtulo de terceiro n\u00edvel
-H4TagInfo=Um t\u00edtulo de quarto n\u00edvel
-H5TagInfo=Um t\u00edtulo de quinto n\u00edvel
-H6TagInfo=Um t\u00edtulo de sexto n\u00edvel
-HEADTagInfo=Cont\u00e9m metadados e informa\u00e7\u00f5es sobre o t\u00edtulo da janela para o documento
-HRTagInfo=Uma r\u00e9gua horizontal
-HTMLTagInfo=O elemento raiz do documento.
-ITagInfo=Exibe o texto em it\u00e1lico
-IFRAMETagInfo=Define uma subjanela em linha
-IMGTagInfo=Exibe a imagem referida como conte\u00fado incorporado
-INPUTTagInfo=Define um controle de formul\u00e1rio para entrada do usu\u00e1rio
-INSTagInfo=Define o texto inserido
-ISINDEXTagInfo=Define um prompt de linha \u00fanica
-KBDTagInfo=Define texto a ser inserido pelo usu\u00e1rio
-LABELTagInfo=Define o r\u00f3tulo para um campo de formul\u00e1rio
-LEGENDTagInfo=Define o r\u00f3tulo para um conjunto de campos de formul\u00e1rio
-LITagInfo=Define um item de lista dentro de uma lista
-LINKTagInfo=Um link independente de m\u00eddia
-MAPTagInfo=Define um mapa de imagem do lado do cliente
-MARQUEETagInfo=Exibe texto rolando. N\u00e3o suportado pelo W3C HTML 4.01.
-MENUTagInfo=Define uma lista de menus
-METATagInfo=Define informa\u00e7\u00f5es de metadados para o documento
-NOBRTagInfo=Substitui e impede quebras de linha. N\u00e3o suportado pelo W3C HTML 4.01.
-NOFRAMESTagInfo=Fornece informa\u00e7\u00f5es a serem exibidas se o navegador atual n\u00e3o suportar quadros
-NOSCRIPTTagInfo=Fornece informa\u00e7\u00f5es a serem exibidas se o navegador atual n\u00e3o suportar script
-OBJECTTagInfo=Define um objeto incorporado gen\u00e9rico
-OLTagInfo=Uma lista ordenada
-OPTGROUPTagInfo=Um grupo de op\u00e7\u00f5es
-OPTIONTagInfo=Uma op\u00e7\u00e3o selecion\u00e1vel
-PTagInfo=Um par\u00e1grafo
-PARAMTagInfo=O valor de uma propriedade denominada
-PRETagInfo=Texto pr\u00e9-formatado
-QTagInfo=Uma cita\u00e7\u00e3o curta em linha
-STagInfo=Exibir texto no estilo tachado
-SAMPTagInfo=Sa\u00edda, scripts, etc do programa de amostra. Exibe em fonte de espa\u00e7amento uniforme.
-SCRIPTTagInfo=Instru\u00e7\u00f5es de script
-SELECTTagInfo=Um seletor de op\u00e7\u00f5es
-SMALLTagInfo=Exibe texto em tamanho pequeno
-SPANTagInfo=Um cont\u00eainer gen\u00e9rico, que pode ser utilizado para definir idioma ou estilo do conte\u00fado
-STRIKETagInfo=Exibir texto no estilo tachado
-STRONGTagInfo=Exibe o texto muito enfatizado (geralmente em negrito)
-STYLETagInfo=Define um estilo para as informa\u00e7\u00f5es contidas
-SUBTagInfo=Exibe como subscrito
-SUPTagInfo=Exibe como sobrescrito
-TABLETagInfo=Define uma tabela
-TBODYTagInfo=O corpo da tabela
-TDTagInfo=Uma c\u00e9lula de uma tabela
-TEXTAREATagInfo=Um campo de texto de v\u00e1rias linhas
-TFOOTTagInfo=Um rodap\u00e9 de tabela
-THTagInfo=Uma c\u00e9lula de cabe\u00e7alho de tabela
-THEADTagInfo=Um cabe\u00e7alho de tabela
-TITLETagInfo=O t\u00edtulo do documento, exibido na barra de t\u00edtulo do navegador
-TRTagInfo=Uma linha da tabela
-TTTagInfo=Exibe o texto em teletipo ou em estilo de texto de espa\u00e7amento uniforme
-UTagInfo=Exibe texto como sublinhado
-ULTagInfo=Uma lista desordenada
-VARTagInfo=Uma inst\u00e2ncia de um argumento de vari\u00e1vel ou programa
-WBRTagInfo=Permite uma quebra de linha na marca\u00e7\u00e3o <B>&lt;NOBR&gt;</B>. N\u00e3o suportado pelo W3C HTML 4.01.
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref_zh_CN.properties b/bundles/org.eclipse.wst.html.core/data/htmref_zh_CN.properties
deleted file mode 100644
index 109f327160..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref_zh_CN.properties
+++ /dev/null
@@ -1,108 +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
-###############################################################################
-
-ATagInfo=\u5982\u679c href \u5c5e\u6027\u5b58\u5728\uff0c\u5219\u662f\u4e00\u4e2a\u94fe\u63a5\uff0c\u800c\u5982\u679c\u540d\u79f0\u5c5e\u6027\u5b58\u5728\uff0c\u5219\u662f\u94fe\u63a5\u7684\u76ee\u6807
-ABBRTagInfo=\u7f29\u5199\uff08\u4f8b\u5982\uff0cWWW \u548c HTTP\uff09
-ACRONYMTagInfo=\u9996\u5b57\u6bcd\u7f29\u5199\u8bcd\uff08\u4f8b\u5982\uff0cSCUBA\uff09
-ADDRESSTagInfo=\u9875\u9762\u7684\u4f5c\u8005\u7684\u5730\u5740\u4fe1\u606f
-APPLETTagInfo=Java applet
-AREATagInfo=\u5b9a\u4e49\u5ba2\u6237\u673a\u7aef\u56fe\u50cf\u6620\u5c04\u533a\u57df
-BTagInfo=\u7528\u7c97\u4f53\u5b57\u663e\u793a\u6240\u5305\u542b\u7684\u6587\u672c
-BASETagInfo=\u9875\u9762\u7684\u57fa\u51c6 URI\uff0c\u5728\u8ba1\u7b97\u76f8\u5bf9\u8def\u5f84\u65f6\u4f7f\u7528
-BASEFONTTagInfo=\u9875\u9762\u7684\u57fa\u672c\u5b57\u4f53\u5927\u5c0f
-BDOTagInfo=\u8986\u76d6\u7f3a\u7701\u53cc\u5411\u663e\u793a\u3002\u8981\u4e0e\u53cc\u5411\u8bed\u8a00\u914d\u5408\u4f7f\u7528\u3002
-BIGTagInfo=\u7528\u5927\u5b57\u4f53\u663e\u793a\u6240\u5305\u542b\u7684\u6587\u672c
-BGSOUNDTagInfo=\u4e3a\u9875\u9762\u5b9a\u4e49\u58f0\u97f3\u6587\u4ef6\u3002W3C HTML 4.01 \u4e0d\u652f\u6301\u5b83\u3002
-BLINKTagInfo=\u4ee5\u95ea\u70c1\u65b9\u5f0f\u663e\u793a\u6587\u672c\u3002W3C HTML 4.01 \u4e0d\u652f\u6301\u5b83\u3002
-BLOCKQUOTETagInfo=\u957f\u5f15\u7528
-BODYTagInfo=\u6587\u6863\u4e3b\u4f53\u3002\u5305\u542b\u9875\u9762\u7684\u6240\u6709\u5185\u5bb9\u3002
-BRTagInfo=\u5f3a\u5236\u6362\u884c
-BUTTONTagInfo=\u5b9a\u4e49\u6309\u94ae
-CAPTIONTagInfo=\u5b9a\u4e49\u8868\u6807\u9898
-CENTERTagInfo=\u5c45\u4e2d\u663e\u793a\u6240\u5305\u542b\u7684\u6587\u672c\u3002\u7b49\u4ef7\u4e8e\u8bbe\u7f6e\u4e86 align=center \u7684 DIV\u3002
-CITETagInfo=\u5f15\u7528
-CODETagInfo=\u8ba1\u7b97\u673a\u4ee3\u7801\u6bb5
-COLTagInfo=\u8868\u5217
-COLGROUPTagInfo=\u4e00\u7ec4\u8868\u5217
-DDTagInfo=\u5b9a\u4e49\u6216\u63cf\u8ff0\u5217\u8868\u4e2d\u7684\u5b9a\u4e49\u6216\u63cf\u8ff0
-DELTagInfo=\u5c06\u6587\u672c\u663e\u793a\u4e3a\u5df2\u5220\u9664
-DFNTagInfo=\u5b9a\u4e49
-DIRTagInfo=\u76ee\u5f55\u5217\u8868
-DIVTagInfo=\u4e00\u4e2a\u4e00\u822c\u5bb9\u5668\uff0c\u53ef\u7528\u4e8e\u4e3a\u5185\u5bb9\u5b9a\u4e49\u8bed\u8a00\u6216\u6837\u5f0f
-DLTagInfo=\u5b9a\u4e49\u6216\u63cf\u8ff0\u5217\u8868
-DTTagInfo=\u5b9a\u4e49\u6216\u63cf\u8ff0\u5217\u8868\u4e2d\u7684\u672f\u8bed\u6216\u4e3b\u9898
-EMTagInfo=\u4ee5\u5f3a\u8c03\u65b9\u5f0f\uff08\u901a\u5e38\u91c7\u7528\u659c\u4f53\uff09\u6765\u663e\u793a\u6587\u672c
-EMBEDTagInfo=\u5b9a\u4e49\u5d4c\u5165\u5f0f\u63d2\u4ef6\u3002W3C HTML 4.01 \u4e0d\u652f\u6301\u5b83\u3002
-FIELDSETTagInfo=\u5b9a\u4e49\u8868\u5355\u63a7\u4ef6\u7ec4
-FONTTagInfo=\u6309\u7ed9\u5b9a\u7684\u5b57\u4f53\u6765\u663e\u793a\u6587\u672c
-FORMTagInfo=\u5b9a\u4e49\u4ea4\u4e92\u5f0f\u8868\u5355
-FRAMETagInfo=\u5728\u5f53\u524d\u7a97\u53e3\u4e2d\u5b9a\u4e49\u6846\u67b6
-FRAMESETTagInfo=\u5b9a\u4e49\u5c06\u7a97\u53e3\u5206\u6210\u591a\u4e2a\u6846\u67b6\u7684\u6846\u67b6\u96c6
-H1TagInfo=\u9876\u7ea7\u6807\u9898
-H2TagInfo=\u7b2c\u4e8c\u7ea7\u6807\u9898
-H3TagInfo=\u7b2c\u4e09\u7ea7\u6807\u9898
-H4TagInfo=\u7b2c\u56db\u7ea7\u6807\u9898
-H5TagInfo=\u7b2c\u4e94\u7ea7\u6807\u9898
-H6TagInfo=\u7b2c\u516d\u7ea7\u6807\u9898
-HEADTagInfo=\u5305\u542b\u6587\u6863\u7684\u5143\u6570\u636e\u548c\u7a97\u53e3\u6807\u9898\u4fe1\u606f
-HRTagInfo=\u6c34\u5e73\u7ebf
-HTMLTagInfo=\u6587\u6863\u7684\u6839\u5143\u7d20\u3002
-ITagInfo=\u7528\u659c\u4f53\u663e\u793a\u6587\u672c
-IFRAMETagInfo=\u5b9a\u4e49\u76f4\u63a5\u63d2\u5165\u7684\u5b50\u7a97\u53e3
-IMGTagInfo=\u5c06\u5f15\u7528\u7684\u56fe\u50cf\u4f5c\u4e3a\u5d4c\u5165\u5185\u5bb9\u6765\u663e\u793a
-INPUTTagInfo=\u4e3a\u7528\u6237\u8f93\u5165\u5b9a\u4e49\u8868\u5355\u63a7\u4ef6
-INSTagInfo=\u5b9a\u4e49\u63d2\u5165\u7684\u6587\u672c
-ISINDEXTagInfo=\u5b9a\u4e49\u5355\u884c\u63d0\u793a\u7b26
-KBDTagInfo=\u5b9a\u4e49\u8981\u7531\u7528\u6237\u8f93\u5165\u7684\u6587\u672c
-LABELTagInfo=\u4e3a\u8868\u5355\u5b57\u6bb5\u5b9a\u4e49\u6807\u53f7
-LEGENDTagInfo=\u4e3a\u4e00\u7ec4\u8868\u5355\u5b57\u6bb5\u5b9a\u4e49\u6807\u53f7
-LITagInfo=\u5728\u5217\u8868\u4e2d\u5b9a\u4e49\u5217\u8868\u9879
-LINKTagInfo=\u4e0e\u4ecb\u8d28\u65e0\u5173\u7684\u94fe\u63a5
-MAPTagInfo=\u5b9a\u4e49\u5ba2\u6237\u673a\u7aef\u56fe\u50cf\u6620\u5c04
-MARQUEETagInfo=\u6eda\u52a8\u663e\u793a\u6587\u672c\u3002W3C HTML 4.01 \u4e0d\u652f\u6301\u5b83\u3002
-MENUTagInfo=\u5b9a\u4e49\u83dc\u5355\u5217\u8868
-METATagInfo=\u4e3a\u6587\u6863\u5b9a\u4e49\u5143\u6570\u636e\u4fe1\u606f
-NOBRTagInfo=\u8986\u76d6\u5e76\u9632\u6b62\u6362\u884c\u3002W3C HTML 4.01 \u4e0d\u652f\u6301\u5b83\u3002
-NOFRAMESTagInfo=\u82e5\u5f53\u524d\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u6846\u67b6\uff0c\u63d0\u4f9b\u663e\u793a\u7684\u4fe1\u606f
-NOSCRIPTTagInfo=\u82e5\u5f53\u524d\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u811a\u672c\u7f16\u5236\uff0c\u63d0\u4f9b\u663e\u793a\u7684\u4fe1\u606f
-OBJECTTagInfo=\u5b9a\u4e49\u4e00\u822c\u5d4c\u5165\u5f0f\u5bf9\u8c61
-OLTagInfo=\u6709\u5e8f\u5217\u8868
-OPTGROUPTagInfo=\u9009\u9879\u7ec4
-OPTIONTagInfo=\u53ef\u9009\u62e9\u7684\u9009\u9879
-PTagInfo=\u6bb5\u843d
-PARAMTagInfo=\u5df2\u547d\u540d\u7684\u5c5e\u6027\u503c
-PRETagInfo=\u9884\u5148\u683c\u5f0f\u5316\u7684\u6587\u672c
-QTagInfo=\u77ed\u7684\u76f4\u63a5\u63d2\u5165\u7684\u5f15\u7528
-STagInfo=\u7528\u5220\u9664\u7ebf\u6837\u5f0f\u663e\u793a\u6587\u672c
-SAMPTagInfo=\u6837\u672c\u7a0b\u5e8f\u8f93\u51fa\u548c\u811a\u672c\u7b49\u7b49\u3002\u7528\u7b49\u5bbd\u5b57\u4f53\u663e\u793a\u3002
-SCRIPTTagInfo=\u811a\u672c\u8bed\u53e5
-SELECTTagInfo=\u9009\u9879\u9009\u62e9\u5668
-SMALLTagInfo=\u7528\u5c0f\u5b57\u4f53\u663e\u793a\u6587\u672c
-SPANTagInfo=\u4e00\u4e2a\u4e00\u822c\u5bb9\u5668\uff0c\u53ef\u7528\u4e8e\u4e3a\u5185\u5bb9\u5b9a\u4e49\u8bed\u8a00\u6216\u6837\u5f0f
-STRIKETagInfo=\u7528\u5220\u9664\u7ebf\u6837\u5f0f\u663e\u793a\u6587\u672c
-STRONGTagInfo=\u4ee5\u7279\u522b\u5f3a\u8c03\u65b9\u5f0f\uff08\u901a\u5e38\u91c7\u7528\u7c97\u4f53\u5b57\uff09\u6765\u663e\u793a\u6587\u672c
-STYLETagInfo=\u4e3a\u5305\u542b\u7684\u4fe1\u606f\u5b9a\u4e49\u6837\u5f0f
-SUBTagInfo=\u663e\u793a\u4e3a\u4e0b\u6807
-SUPTagInfo=\u663e\u793a\u4e3a\u4e0a\u6807
-TABLETagInfo=\u5b9a\u4e49\u8868
-TBODYTagInfo=\u8868\u7684\u4e3b\u4f53
-TDTagInfo=\u8868\u4e2d\u7684\u5355\u5143
-TEXTAREATagInfo=\u591a\u884c\u6587\u672c\u5b57\u6bb5
-TFOOTTagInfo=\u8868\u9875\u811a
-THTagInfo=\u8868\u9875\u7709\u5355\u5143
-THEADTagInfo=\u8868\u9875\u7709
-TITLETagInfo=\u663e\u793a\u5728\u6d4f\u89c8\u5668\u7684\u6807\u9898\u680f\u4e2d\u7684\u6587\u6863\u6807\u9898
-TRTagInfo=\u8868\u884c
-TTTagInfo=\u4ee5\u7535\u4f20\u6253\u5b57\u673a\u6216\u7b49\u5bbd\u6587\u672c\u6837\u5f0f\u6765\u663e\u793a\u6587\u672c
-UTagInfo=\u4ee5\u52a0\u4e0b\u5212\u7ebf\u7684\u65b9\u5f0f\u6765\u663e\u793a\u6587\u672c
-ULTagInfo=\u65e0\u5e8f\u5217\u8868
-VARTagInfo=\u53d8\u91cf\u6216\u7a0b\u5e8f\u81ea\u53d8\u91cf\u7684\u5b9e\u4f8b
-WBRTagInfo=<B>&lt;NOBR&gt;</B> \u6807\u8bb0\u4e2d\u5141\u8bb8\u6362\u884c\u3002W3C HTML 4.01 \u4e0d\u652f\u6301\u5b83\u3002
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref_zh_TW.properties b/bundles/org.eclipse.wst.html.core/data/htmref_zh_TW.properties
deleted file mode 100644
index 2d445d9aab..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref_zh_TW.properties
+++ /dev/null
@@ -1,108 +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
-###############################################################################
-
-ATagInfo=\u5982\u679c\u51fa\u73fe href \u5c6c\u6027\u7684\u8a71\uff0c\u5247\u70ba\u4e00\u500b\u93c8\u7d50\uff1b\u5982\u679c\u51fa\u73fe name \u5c6c\u6027\u7684\u8a71\uff0c\u5247\u70ba\u4e00\u500b\u93c8\u7d50\u76ee\u6a19
-ABBRTagInfo=\u7e2e\u5beb\uff08\u5982 WWW\u3001HTTP\uff09
-ACRONYMTagInfo=\u5b57\u9996\u8a9e\uff08\u5982 SCUBA\uff09
-ADDRESSTagInfo=\u9801\u9762\u4f5c\u8005\u7684\u4f4d\u5740\u8cc7\u8a0a
-APPLETTagInfo=Java Applet
-AREATagInfo=\u5b9a\u7fa9\u7528\u6236\u7aef\u5f71\u50cf\u93c8\u7d50\u5716\u5340
-BTagInfo=\u7528\u7c97\u9ad4\u5b57\u986f\u793a\u5167\u542b\u7684\u6587\u5b57
-BASETagInfo=\u8a08\u7b97\u76f8\u5c0d\u8def\u5f91\u6642\u8981\u7528\u7684\u9801\u9762\u57fa\u790e URI
-BASEFONTTagInfo=\u9801\u9762\u57fa\u790e\u5b57\u578b\u5927\u5c0f
-BDOTagInfo=\u7f6e\u63db\u9810\u8a2d\u96d9\u5411\u986f\u793a\u3002\u4f9b\u96d9\u5411\u8a9e\u8a00\u4f7f\u7528\u3002
-BIGTagInfo=\u7528\u5927\u5b57\u578b\u986f\u793a\u5167\u542b\u7684\u6587\u5b57
-BGSOUNDTagInfo=\u5b9a\u7fa9\u9801\u9762\u7684\u97f3\u6548\u6a94\u3002\u4e0d\u53d7 W3C HTML 4.01 \u652f\u63f4\u3002
-BLINKTagInfo=\u7528\u9583\u720d\u65b9\u5f0f\u986f\u793a\u6587\u5b57\u3002\u4e0d\u53d7 W3C HTML 4.01 \u652f\u63f4\u3002
-BLOCKQUOTETagInfo=\u4e0d\u9577\u7684\u5f15\u6587
-BODYTagInfo=\u6587\u4ef6\u4e3b\u9ad4\u3002\u542b\u6709\u9801\u9762\u7684\u6240\u6709\u5167\u5bb9\u3002
-BRTagInfo=\u5f37\u5236\u63db\u884c
-BUTTONTagInfo=\u5b9a\u7fa9\u6309\u9215
-CAPTIONTagInfo=\u5b9a\u7fa9\u8868\u683c\u6a19\u984c
-CENTERTagInfo=\u7f6e\u4e2d\u5c0d\u9f4a\u986f\u793a\u5167\u542b\u7684\u6587\u5b57\u3002\u76f8\u7576\u65bc align=center \u7684 DIV\u3002
-CITETagInfo=\u5f15\u7528
-CODETagInfo=\u8a08\u7b97\u6a5f\u78bc\u7247\u6bb5
-COLTagInfo=\u8868\u683c\u76f4\u6b04
-COLGROUPTagInfo=\u8868\u683c\u76f4\u6b04\u7fa4\u7d44
-DDTagInfo=\u5b9a\u7fa9\u6216\u8aaa\u660e\u6e05\u55ae\u4e2d\u7684\u5b9a\u7fa9\u6216\u8aaa\u660e
-DELTagInfo=\u5c07\u6587\u5b57\u986f\u793a\u70ba\u5df2\u522a\u9664
-DFNTagInfo=\u5b9a\u7fa9
-DIRTagInfo=\u76ee\u9304\u6e05\u55ae
-DIVTagInfo=\u53ef\u7528\u4f86\u5b9a\u7fa9\u5167\u5bb9\u8a9e\u8a00\u6216\u6a23\u5f0f\u7684\u901a\u7528\u5132\u5b58\u5668\u3002
-DLTagInfo=\u5b9a\u7fa9\u6216\u8aaa\u660e\u6e05\u55ae
-DTTagInfo=\u5b9a\u7fa9\u6216\u8aaa\u660e\u6e05\u55ae\u4e2d\u7684\u8a5e\u5f59\u6216\u4e3b\u984c
-EMTagInfo=\u5f37\u8abf\u986f\u793a\u6587\u5b57\uff08\u901a\u5e38\u662f\u659c\u9ad4\uff09
-EMBEDTagInfo=\u5b9a\u7fa9\u5167\u5d4c\u5916\u639b\u7a0b\u5f0f\u3002\u4e0d\u53d7 W3C HTML 4.01 \u652f\u63f4\u3002
-FIELDSETTagInfo=\u5b9a\u7fa9\u8868\u55ae\u63a7\u5236\u9805\u7fa4\u7d44
-FONTTagInfo=\u4ee5\u7d66\u5b9a\u7684\u5b57\u578b\u4f86\u986f\u793a\u6587\u5b57
-FORMTagInfo=\u5b9a\u7fa9\u4e92\u52d5\u5f0f\u8868\u55ae
-FRAMETagInfo=\u5b9a\u7fa9\u73fe\u884c\u8996\u7a97\u5167\u7684\u9801\u6846
-FRAMESETTagInfo=\u5b9a\u7fa9\u5206\u5272\u8996\u7a97\u7684\u9801\u6846\u7d44
-H1TagInfo=\u6700\u4e0a\u5c64\u6a19\u984c
-H2TagInfo=\u7b2c\u4e8c\u5c64\u6a19\u984c
-H3TagInfo=\u7b2c\u4e09\u5c64\u6a19\u984c
-H4TagInfo=\u7b2c\u56db\u5c64\u6a19\u984c
-H5TagInfo=\u7b2c\u4e94\u5c64\u6a19\u984c
-H6TagInfo=\u7b2c\u516d\u5c64\u6a19\u984c
-HEADTagInfo=\u542b\u6709\u6587\u4ef6\u7684 Meta \u8cc7\u6599\u548c\u8996\u7a97\u6a19\u984c\u8cc7\u8a0a
-HRTagInfo=\u6c34\u5e73\u5c3a\u898f
-HTMLTagInfo=\u6587\u4ef6\u7684\u6839\u5143\u7d20\u3002
-ITagInfo=\u7528\u659c\u9ad4\u986f\u793a\u6587\u5b57
-IFRAMETagInfo=\u5b9a\u7fa9\u5217\u5165\u5b50\u8996\u7a97
-IMGTagInfo=\u5c07\u53c3\u7167\u7684\u5f71\u50cf\u986f\u793a\u6210\u5167\u5d4c\u5167\u5bb9
-INPUTTagInfo=\u5b9a\u7fa9\u4f7f\u7528\u8005\u8f38\u5165\u7684\u8868\u55ae\u63a7\u5236
-INSTagInfo=\u5b9a\u7fa9\u63d2\u5165\u7684\u6587\u5b57
-ISINDEXTagInfo=\u5b9a\u7fa9\u55ae\u884c\u63d0\u793a
-KBDTagInfo=\u5b9a\u7fa9\u4f7f\u7528\u8005\u8981\u8f38\u5165\u7684\u6587\u5b57
-LABELTagInfo=\u5b9a\u7fa9\u8868\u55ae\u6b04\u4f4d\u7684\u6a19\u7c64
-LEGENDTagInfo=\u5b9a\u7fa9\u4e00\u7d44\u8868\u55ae\u6b04\u4f4d\u7684\u6a19\u7c64
-LITagInfo=\u5b9a\u7fa9\u6e05\u55ae\u5167\u7684\u6e05\u55ae\u9805\u76ee
-LINKTagInfo=\u5a92\u9ad4\u7368\u7acb\u93c8\u7d50
-MAPTagInfo=\u5b9a\u7fa9\u7528\u6236\u7aef\u5f71\u50cf\u93c8\u7d50\u5716
-MARQUEETagInfo=\u7528\u6372\u52d5\u65b9\u5f0f\u986f\u793a\u6587\u5b57\u3002\u4e0d\u53d7 W3C HTML 4.01 \u652f\u63f4\u3002
-MENUTagInfo=\u5b9a\u7fa9\u529f\u80fd\u8868\u6e05\u55ae
-METATagInfo=\u5b9a\u7fa9\u6587\u4ef6\u7684 Meta \u8cc7\u6599\u8cc7\u8a0a
-NOBRTagInfo=\u7f6e\u63db\u548c\u9632\u6b62\u63db\u884c\u3002\u4e0d\u53d7 W3C HTML 4.01 \u652f\u63f4\u3002
-NOFRAMESTagInfo=\u63d0\u4f9b\u73fe\u884c\u700f\u89bd\u5668\u4e0d\u652f\u63f4\u9801\u6846\u6642\uff0c\u6240\u986f\u793a\u7684\u8cc7\u8a0a
-NOSCRIPTTagInfo=\u63d0\u4f9b\u73fe\u884c\u700f\u89bd\u5668\u4e0d\u652f\u63f4 Scripting \u6642\uff0c\u6240\u986f\u793a\u7684\u8cc7\u8a0a
-OBJECTTagInfo=\u5b9a\u7fa9\u901a\u7528\u5167\u5d4c\u7269\u4ef6
-OLTagInfo=\u6392\u5e8f\u6e05\u55ae
-OPTGROUPTagInfo=\u9078\u9805\u7fa4\u7d44
-OPTIONTagInfo=\u53ef\u9078\u53d6\u7684\u9078\u9805
-PTagInfo=\u6bb5\u843d
-PARAMTagInfo=\u5177\u540d\u5167\u5bb9\u503c
-PRETagInfo=\u9810\u5148\u683c\u5f0f\u5316\u7684\u6587\u5b57
-QTagInfo=\u77ed\u7684\u5217\u5165\u5f15\u6587
-STagInfo=\u7528 strike-through \u6a23\u5f0f\u986f\u793a\u6587\u5b57
-SAMPTagInfo=\u7bc4\u4f8b\u7a0b\u5f0f\u8f38\u51fa\u3001Script \u7b49\u3002\u7528\u55ae\u8ddd\u5b57\u578b\u986f\u793a\u3002
-SCRIPTTagInfo=Script \u9673\u8ff0\u5f0f
-SELECTTagInfo=\u9078\u9805\u9078\u53d6\u5143
-SMALLTagInfo=\u7528\u5c0f\u5b57\u578b\u986f\u793a\u6587\u5b57
-SPANTagInfo=\u53ef\u7528\u4f86\u5b9a\u7fa9\u5167\u5bb9\u8a9e\u8a00\u6216\u6a23\u5f0f\u7684\u901a\u7528\u5132\u5b58\u5668\u3002
-STRIKETagInfo=\u7528 strike-through \u6a23\u5f0f\u986f\u793a\u6587\u5b57
-STRONGTagInfo=\u7279\u5225\u5f37\u8abf\u986f\u793a\u6587\u5b57\uff08\u901a\u5e38\u662f\u7c97\u9ad4\uff09
-STYLETagInfo=\u5b9a\u7fa9\u5167\u542b\u8cc7\u8a0a\u7684\u6a23\u5f0f
-SUBTagInfo=\u986f\u793a\u6210\u4e0b\u6a19
-SUPTagInfo=\u986f\u793a\u6210\u4e0a\u6a19
-TABLETagInfo=\u5b9a\u7fa9\u8868\u683c
-TBODYTagInfo=\u8868\u683c\u4e3b\u9ad4
-TDTagInfo=\u8868\u683c\u5167\u7684\u8cc7\u6599\u683c
-TEXTAREATagInfo=\u591a\u884c\u6587\u5b57\u6b04\u4f4d
-TFOOTTagInfo=\u8868\u683c\u6a19\u5e95
-THTagInfo=\u8868\u683c\u6a19\u982d\u8cc7\u6599\u683c
-THEADTagInfo=\u8868\u683c\u6a19\u982d
-TITLETagInfo=\u986f\u793a\u5728\u700f\u89bd\u5668\u6a19\u984c\u5217\u7684\u6587\u4ef6\u6a19\u984c
-TRTagInfo=\u8868\u683c\u5217
-TTTagInfo=\u7528\u6253\u5b57\u6a5f\u5b57\u9ad4\u6216\u55ae\u8ddd\u6587\u5b57\u6a23\u5f0f\u4f86\u986f\u793a\u6587\u5b57
-UTagInfo=\u7528\u9644\u52a0\u5e95\u7dda\u4f86\u986f\u793a\u6587\u5b57
-ULTagInfo=\u975e\u6392\u5e8f\u6e05\u55ae
-VARTagInfo=\u8b8a\u6578\u6216\u7a0b\u5f0f\u5f15\u6578\u7684\u5be6\u4f8b
-WBRTagInfo=\u5141\u8a31\u5728 <B>&lt;NOBR&gt;</B> \u6a19\u793a\u5167\u63db\u884c\u3002\u4e0d\u53d7 W3C HTML 4.01 \u652f\u63f4\u3002
diff --git a/bundles/org.eclipse.wst.html.core/plugin.properties b/bundles/org.eclipse.wst.html.core/plugin.properties
deleted file mode 100644
index 1d175e12c0..0000000000
--- a/bundles/org.eclipse.wst.html.core/plugin.properties
+++ /dev/null
@@ -1,15 +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=Structured Source HTML Model
-nlFeatureName=Structured Source HTML Model NL Support
-Structured_HTML_Document_Factory_Extension.name=Structured HTML Document Factory Extension
-HTML_Content_Type_Extension_Element.name=HTML Content Type
diff --git a/bundles/org.eclipse.wst.html.core/plugin.xml b/bundles/org.eclipse.wst.html.core/plugin.xml
deleted file mode 100644
index 28e811ca00..0000000000
--- a/bundles/org.eclipse.wst.html.core/plugin.xml
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.html.core"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.wst.html.core.internal.HTMLCorePlugin">
-
- <runtime>
- <library name="htmlmodel.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.wst.css.core"/>
- <import plugin="org.eclipse.wst.sse.ui"/>
- <import plugin="org.eclipse.wst.sse.core"/>
- <import plugin="org.eclipse.wst.common.contentmodel"/>
- <import plugin="org.eclipse.wst.xml.core"/>
- <import plugin="org.eclipse.wst.xml.uriresolver"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.wst.common.encoding"/>
- </requires>
-
-
- <extension
- point="org.eclipse.wst.sse.core.modelHandler">
- <modelHandler
- default="no"
- class="org.eclipse.wst.html.core.modelhandler.ModelHandlerForHTML"
- associatedContentTypeId="org.eclipse.wst.html.core.htmlsource"
- id="org.eclipse.wst.html.core.modelhandler">
- </modelHandler>
- </extension>
- <extension
- point="org.eclipse.wst.sse.core.embeddedTypeHandler">
- <embeddedTypeHandler
- class="org.eclipse.wst.html.core.modelhandler.EmbeddedHTML">
- </embeddedTypeHandler>
- </extension>
- <extension
- id="org.eclipse.wst.sse.html.core.builderdelegate.todo"
- point="org.eclipse.wst.sse.core.builderdelegate">
- <participant
- class="org.eclipse.wst.xml.core.builder.delegates.XMLTaskTagSeeker"
- contentType="org.eclipse.wst.html.core.htmlsource">
- </participant>
- </extension>
- <extension point="org.eclipse.core.filebuffers.documentCreation"
- id="org.eclipse.wst.html.core.documentfactories"
- name="%Structured_HTML_Document_Factory_Extension.name">
- <factory
- contentTypeId="org.eclipse.wst.html.core.htmlsource"
- class="org.eclipse.wst.sse.core.filebuffers.BasicStructuredDocumentFactory"/>
- </extension>
- <extension
- point="org.eclipse.wst.sse.core.commentElementHandler">
- <handler-custom
- commenttype="xml"
- class="org.eclipse.wst.html.core.commentelement.handlers.CommentElementHandlerForSSI">
- <startwith
- prefix="#">
- </startwith>
- </handler-custom>
- </extension>
- <extension
- point="org.eclipse.team.core.fileTypes">
- <fileTypes
- type="text"
- extension="html">
- </fileTypes>
- <fileTypes
- type="text"
- extension="htm">
- </fileTypes>
- <fileTypes
- type="text"
- extension="xhtml">
- </fileTypes>
- <fileTypes
- type="text"
- extension="htpl">
- </fileTypes>
- <fileTypes
- type="text"
- extension="wml">
- </fileTypes>
- <fileTypes
- type="text"
- extension="shtml">
- </fileTypes>
- <fileTypes
- type="text"
- extension="shtm">
- </fileTypes>
- </extension>
- <extension
- point="org.eclipse.wst.sse.core.formatProcessors">
- <processor
- class="org.eclipse.wst.html.core.format.HTMLFormatProcessorImpl"
- contentTypeId="org.eclipse.wst.html.core.htmlsource">
- </processor>
- </extension>
-<!-- Extension point for taghelp documentation -->
- <extension
- point="org.eclipse.wst.common.contentmodel.annotationFiles">
- <annotationFile
- location="data/htmref.xml"
- publicId="-//W3C//DTD XHTML 1.0 Strict//EN">
- </annotationFile>
- <annotationFile
- location="data/htmref.xml"
- publicId="-//W3C//DTD XHTML 1.0 Transitional//EN">
- </annotationFile>
- <annotationFile
- location="data/htmref.xml"
- publicId="-//W3C//DTD XHTML 1.0 Frameset//EN">
- </annotationFile>
- <annotationFile
- location="data/htmref.xml"
- publicId="-//W3C//DTD XHTML Basic 1.0//EN">
- </annotationFile>
- <annotationFile
- location="data/htmref.xml"
- publicId="-//W3C//DTD XHTML 1.1//EN">
- </annotationFile>
- <annotationFile
- location="data/htmref.xml"
- publicId="-//WAPFORUM//DTD XHTML Mobile 1.0//EN">
- </annotationFile>
- </extension>
- <extension
- point="org.eclipse.core.runtime.contentTypes">
- <content-type
- file-extensions="html,htm,xhtml,htpl,wml,shtml,shtm"
- priority="high"
- name="%HTML_Content_Type_Extension_Element.name"
- id="htmlsource"
- base-type="org.eclipse.core.runtime.text">
- <!-- note: no default-charset for HTML, should use 'platform' -->
- <describer class="org.eclipse.wst.html.core.internal.contenttype.ContentDescriberForHTML"/>
- </content-type>
- </extension>
-
-
- <extension
- point="org.eclipse.wst.sse.core.documentTypes">
- <documentType
- elementName="html"
- displayName="XHTML 1.0 Strict"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="false"
- publicID="-//W3C//DTD XHTML 1.0 Strict//EN"
- systemID="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- </documentType>
- <documentType
- elementName="html"
- displayName="XHTML 1.0 Transitional"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="false"
- publicID="-//W3C//DTD XHTML 1.0 Transitional//EN"
- defaultXHTML="true"
- systemID="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- </documentType>
- <documentType
- elementName="html"
- displayName="XHTML 1.0 Frameset"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="true"
- publicID="-//W3C//DTD XHTML 1.0 Frameset//EN"
- systemID="http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
- </documentType>
- <documentType
- elementName="html"
- displayName="XHTML Basic 1.0"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="false"
- publicID="-//W3C//DTD XHTML Basic 1.0//EN"
- systemID="http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
- </documentType>
- <documentType
- elementName="html"
- displayName="XHTML 1.1"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="false"
- publicID="-//W3C//DTD XHTML 1.1//EN"
- systemID="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- </documentType>
- <documentType
- elementName="html"
- displayName="XHTML MP 1.0"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="false"
- publicID="-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
- systemID="http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
- </documentType>
- <documentType
- elementName="wml"
- displayName="WML 1.3"
- namespaceURI=""
- isWML="true"
- hasFrameset="false"
- publicID="-//WAPFORUM//DTD WML 1.3//EN"
- defaultWML="true"
- systemID="http://www.wapforum.org/DTD/wml13.dtd">
- </documentType>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTML40Namespace.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTML40Namespace.java
deleted file mode 100644
index 9f5485be22..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTML40Namespace.java
+++ /dev/null
@@ -1,675 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core;
-
-/**
- * Provide all names defined in the HTML 4.0? specification.
- */
-public interface HTML40Namespace {
-
- // Element names
- public static interface ElementName {
- public static final String A = "A"; //$NON-NLS-1$
- public static final String ABBR = "ABBR"; //$NON-NLS-1$
- public static final String ACRONYM = "ACRONYM"; //$NON-NLS-1$
- public static final String ADDRESS = "ADDRESS"; //$NON-NLS-1$
- public static final String APPLET = "APPLET"; //$NON-NLS-1$
- public static final String AREA = "AREA"; //$NON-NLS-1$
- public static final String B = "B"; //$NON-NLS-1$
- public static final String BASE = "BASE"; //$NON-NLS-1$
- public static final String BASEFONT = "BASEFONT"; //$NON-NLS-1$
- public static final String BDO = "BDO"; //$NON-NLS-1$
- public static final String BGSOUND = "BGSOUND"; // D205513 //$NON-NLS-1$
- public static final String BIG = "BIG"; //$NON-NLS-1$
- public static final String BLINK = "BLINK"; //$NON-NLS-1$
- public static final String BLOCKQUOTE = "BLOCKQUOTE"; //$NON-NLS-1$
- public static final String BODY = "BODY"; //$NON-NLS-1$
- public static final String BR = "BR"; //$NON-NLS-1$
- public static final String BUTTON = "BUTTON"; //$NON-NLS-1$
- public static final String CAPTION = "CAPTION"; //$NON-NLS-1$
- public static final String CENTER = "CENTER"; //$NON-NLS-1$
- public static final String CITE = "CITE"; //$NON-NLS-1$
- public static final String CODE = "CODE"; //$NON-NLS-1$
- public static final String COL = "COL"; //$NON-NLS-1$
- public static final String COLGROUP = "COLGROUP"; //$NON-NLS-1$
- public static final String DD = "DD"; //$NON-NLS-1$
- public static final String DEL = "DEL"; //$NON-NLS-1$
- public static final String DFN = "DFN"; //$NON-NLS-1$
- public static final String DIR = "DIR"; //$NON-NLS-1$
- public static final String DIV = "DIV"; //$NON-NLS-1$
- public static final String DL = "DL"; //$NON-NLS-1$
- public static final String DT = "DT"; //$NON-NLS-1$
- public static final String EM = "EM"; //$NON-NLS-1$
- public static final String EMBED = "EMBED"; //$NON-NLS-1$
- public static final String FIELDSET = "FIELDSET"; //$NON-NLS-1$
- public static final String FONT = "FONT"; //$NON-NLS-1$
- public static final String FORM = "FORM"; //$NON-NLS-1$
- public static final String FRAME = "FRAME"; //$NON-NLS-1$
- public static final String FRAMESET = "FRAMESET"; //$NON-NLS-1$
- public static final String H1 = "H1"; //$NON-NLS-1$
- public static final String H2 = "H2"; //$NON-NLS-1$
- public static final String H3 = "H3"; //$NON-NLS-1$
- public static final String H4 = "H4"; //$NON-NLS-1$
- public static final String H5 = "H5"; //$NON-NLS-1$
- public static final String H6 = "H6"; //$NON-NLS-1$
- public static final String HEAD = "HEAD"; //$NON-NLS-1$
- public static final String HR = "HR"; //$NON-NLS-1$
- public static final String HTML = "HTML"; //$NON-NLS-1$
- public static final String I = "I"; //$NON-NLS-1$
- public static final String IFRAME = "IFRAME"; //$NON-NLS-1$
- public static final String IMG = "IMG"; //$NON-NLS-1$
- public static final String INPUT = "INPUT"; //$NON-NLS-1$
- public static final String INS = "INS"; //$NON-NLS-1$
- public static final String ISINDEX = "ISINDEX"; //$NON-NLS-1$
- public static final String KBD = "KBD"; //$NON-NLS-1$
- public static final String LABEL = "LABEL"; //$NON-NLS-1$
- public static final String LEGEND = "LEGEND"; //$NON-NLS-1$
- public static final String LI = "LI"; //$NON-NLS-1$
- public static final String LINK = "LINK"; //$NON-NLS-1$
- public static final String MAP = "MAP"; //$NON-NLS-1$
- public static final String MENU = "MENU"; //$NON-NLS-1$
- public static final String META = "META"; //$NON-NLS-1$
- public static final String NOBR = "NOBR"; // D205513 //$NON-NLS-1$
- public static final String NOEMBED = "NOEMBED"; //$NON-NLS-1$
- public static final String NOFRAMES = "NOFRAMES"; //$NON-NLS-1$
- public static final String NOSCRIPT = "NOSCRIPT"; //$NON-NLS-1$
- public static final String OBJECT = "OBJECT"; //$NON-NLS-1$
- public static final String OL = "OL"; //$NON-NLS-1$
- public static final String OPTGROUP = "OPTGROUP"; //$NON-NLS-1$
- public static final String OPTION = "OPTION"; //$NON-NLS-1$
- public static final String P = "P"; //$NON-NLS-1$
- public static final String PARAM = "PARAM"; //$NON-NLS-1$
- public static final String PRE = "PRE"; //$NON-NLS-1$
- public static final String Q = "Q"; //$NON-NLS-1$
- public static final String S = "S"; //$NON-NLS-1$
- public static final String SAMP = "SAMP"; //$NON-NLS-1$
- public static final String SCRIPT = "SCRIPT"; //$NON-NLS-1$
- public static final String SELECT = "SELECT"; //$NON-NLS-1$
- public static final String SMALL = "SMALL"; //$NON-NLS-1$
- public static final String SPAN = "SPAN"; //$NON-NLS-1$
- public static final String STRIKE = "STRIKE"; //$NON-NLS-1$
- public static final String STRONG = "STRONG"; //$NON-NLS-1$
- public static final String STYLE = "STYLE"; //$NON-NLS-1$
- public static final String SUB = "SUB"; //$NON-NLS-1$
- public static final String SUP = "SUP"; //$NON-NLS-1$
- public static final String TABLE = "TABLE"; //$NON-NLS-1$
- public static final String TBODY = "TBODY"; //$NON-NLS-1$
- public static final String TD = "TD"; //$NON-NLS-1$
- public static final String TEXTAREA = "TEXTAREA"; //$NON-NLS-1$
- public static final String TFOOT = "TFOOT"; //$NON-NLS-1$
- public static final String TH = "TH"; //$NON-NLS-1$
- public static final String THEAD = "THEAD"; //$NON-NLS-1$
- public static final String TITLE = "TITLE"; //$NON-NLS-1$
- public static final String TR = "TR"; //$NON-NLS-1$
- public static final String TT = "TT"; //$NON-NLS-1$
- public static final String U = "U"; //$NON-NLS-1$
- public static final String UL = "UL"; //$NON-NLS-1$
- public static final String VAR = "VAR"; //$NON-NLS-1$
- public static final String WBR = "WBR"; // D205513 //$NON-NLS-1$
- public static final String MARQUEE = "MARQUEE"; //$NON-NLS-1$
- public static final String SSI_CONFIG = "SSI:CONFIG"; // D210393 //$NON-NLS-1$
- public static final String SSI_ECHO = "SSI:ECHO"; //$NON-NLS-1$
- public static final String SSI_EXEC = "SSI:EXEC"; //$NON-NLS-1$
- public static final String SSI_FSIZE = "SSI:FSIZE"; //$NON-NLS-1$
- public static final String SSI_FLASTMOD = "SSI:FLASTMOD"; //$NON-NLS-1$
- public static final String SSI_INCLUDE = "SSI:INCLUDE"; //$NON-NLS-1$
- public static final String SSI_PRINTENV = "SSI:PRINTENV"; //$NON-NLS-1$
- public static final String SSI_SET = "SSI:SET"; //$NON-NLS-1$
- public static final String WML_WML = "wml"; //$NON-NLS-1$
- public static final String WML_CARD = "card"; //$NON-NLS-1$
- public static final String WML_TEMPLATE = "template"; //$NON-NLS-1$
- public static final String WML_ACCESS = "access"; //$NON-NLS-1$
- public static final String WML_DO = "do"; //$NON-NLS-1$
- public static final String WML_ONEVENT = "onevent"; //$NON-NLS-1$
- public static final String WML_TIMER = "timer"; //$NON-NLS-1$
- public static final String WML_ANCHOR = "anchor"; //$NON-NLS-1$
- public static final String WML_PREV = "prev"; //$NON-NLS-1$
- public static final String WML_REFRESH = "refresh"; //$NON-NLS-1$
- public static final String WML_GO = "go"; //$NON-NLS-1$
- public static final String WML_NOOP = "noop"; //$NON-NLS-1$
- public static final String WML_SETVAR = "setvar"; //$NON-NLS-1$
- public static final String WML_POSTFIELD = "postfield"; //$NON-NLS-1$
- }
-
- // Character Entities
- public static interface EntityName {
- public static final String AACUTE_U = "Aacute"; //$NON-NLS-1$
- public static final String AACUTE_L = "aacute"; //$NON-NLS-1$
- public static final String ACIRC_U = "Acirc"; //$NON-NLS-1$
- public static final String ACIRC_L = "acirc"; //$NON-NLS-1$
- public static final String ACUTE = "acute"; //$NON-NLS-1$
- public static final String AELIG_U = "AElig"; //$NON-NLS-1$
- public static final String AELIG_L = "aelig"; //$NON-NLS-1$
- public static final String AGRAVE_U = "Agrave"; //$NON-NLS-1$
- public static final String AGRAVE_L = "agrave"; //$NON-NLS-1$
- public static final String ALEFSYM = "alefsym"; //$NON-NLS-1$
- public static final String ALPHA_U = "Alpha"; //$NON-NLS-1$
- public static final String ALPHA_L = "alpha"; //$NON-NLS-1$
- public static final String AMP = "amp"; //$NON-NLS-1$
- public static final String AND = "and"; //$NON-NLS-1$
- public static final String ANG = "ang"; //$NON-NLS-1$
- public static final String ARING_U = "Aring"; //$NON-NLS-1$
- public static final String ARING_L = "aring"; //$NON-NLS-1$
- public static final String ASYMP = "asymp"; //$NON-NLS-1$
- public static final String ATILDE_U = "Atilde"; //$NON-NLS-1$
- public static final String ATILDE_L = "atilde"; //$NON-NLS-1$
- public static final String AUML_U = "Auml"; //$NON-NLS-1$
- public static final String AUML_L = "auml"; //$NON-NLS-1$
- public static final String BDQUO = "bdquo"; //$NON-NLS-1$
- public static final String BETA_U = "Beta"; //$NON-NLS-1$
- public static final String BETA_L = "beta"; //$NON-NLS-1$
- public static final String BRVBAR = "brvbar"; //$NON-NLS-1$
- public static final String BULL = "bull"; //$NON-NLS-1$
- public static final String CAP = "cap"; //$NON-NLS-1$
- public static final String CCEDIL_U = "Ccedil"; //$NON-NLS-1$
- public static final String CCEDIL_L = "ccedil"; //$NON-NLS-1$
- public static final String CEDIL = "cedil"; //$NON-NLS-1$
- public static final String CENT = "cent"; //$NON-NLS-1$
- public static final String CHI_U = "Chi"; //$NON-NLS-1$
- public static final String CHI_L = "chi"; //$NON-NLS-1$
- public static final String CIRC = "circ"; //$NON-NLS-1$
- public static final String CLUBS = "clubs"; //$NON-NLS-1$
- public static final String CONG = "cong"; //$NON-NLS-1$
- public static final String COPY = "copy"; //$NON-NLS-1$
- public static final String CRARR = "crarr"; //$NON-NLS-1$
- public static final String CUP = "cup"; //$NON-NLS-1$
- public static final String CURREN = "curren"; //$NON-NLS-1$
- public static final String DAGGER_U = "Dagger"; //$NON-NLS-1$
- public static final String DAGGER_L = "dagger"; //$NON-NLS-1$
- public static final String DARR_U = "dArr"; //$NON-NLS-1$
- public static final String DARR_L = "darr"; //$NON-NLS-1$
- public static final String DEG = "deg"; //$NON-NLS-1$
- public static final String DELTA_U = "Delta"; //$NON-NLS-1$
- public static final String DELTA_L = "delta"; //$NON-NLS-1$
- public static final String DIAMS = "diams"; //$NON-NLS-1$
- public static final String DIVIDE = "divide"; //$NON-NLS-1$
- public static final String EACUTE_U = "Eacute"; //$NON-NLS-1$
- public static final String EACUTE_L = "eacute"; //$NON-NLS-1$
- public static final String ECIRC_U = "Ecirc"; //$NON-NLS-1$
- public static final String ECIRC_L = "ecirc"; //$NON-NLS-1$
- public static final String EGRAVE_U = "Egrave"; //$NON-NLS-1$
- public static final String EGRAVE_L = "egrave"; //$NON-NLS-1$
- public static final String EMPTY = "empty"; //$NON-NLS-1$
- public static final String EMSP = "emsp"; //$NON-NLS-1$
- public static final String ENSP = "ensp"; //$NON-NLS-1$
- public static final String EPSILON_U = "Epsilon"; //$NON-NLS-1$
- public static final String EPSILON_L = "epsilon"; //$NON-NLS-1$
- public static final String EQUIV = "equiv"; //$NON-NLS-1$
- public static final String ETA_U = "Eta"; //$NON-NLS-1$
- public static final String ETA_L = "eta"; //$NON-NLS-1$
- public static final String ETH_U = "ETH"; //$NON-NLS-1$
- public static final String ETH_L = "eth"; //$NON-NLS-1$
- public static final String EUML_U = "Euml"; //$NON-NLS-1$
- public static final String EUML_L = "euml"; //$NON-NLS-1$
- public static final String EURO = "euro"; //$NON-NLS-1$
- public static final String EXIST = "exist"; //$NON-NLS-1$
- public static final String FNOF = "fnof"; //$NON-NLS-1$
- public static final String FORALL = "forall"; //$NON-NLS-1$
- public static final String FRAC12 = "frac12"; //$NON-NLS-1$
- public static final String FRAC14 = "frac14"; //$NON-NLS-1$
- public static final String FRAC34 = "frac34"; //$NON-NLS-1$
- public static final String FRASL = "frasl"; //$NON-NLS-1$
- public static final String GAMMA_U = "Gamma"; //$NON-NLS-1$
- public static final String GAMMA_L = "gamma"; //$NON-NLS-1$
- public static final String GE = "ge"; //$NON-NLS-1$
- public static final String GT = "gt"; //$NON-NLS-1$
- public static final String HARR_U = "hArr"; //$NON-NLS-1$
- public static final String HARR_L = "harr"; //$NON-NLS-1$
- public static final String HEARTS = "hearts"; //$NON-NLS-1$
- public static final String HELLIP = "hellip"; //$NON-NLS-1$
- public static final String IACUTE_U = "Iacute"; //$NON-NLS-1$
- public static final String IACUTE_L = "iacute"; //$NON-NLS-1$
- public static final String ICIRC_U = "Icirc"; //$NON-NLS-1$
- public static final String ICIRC_L = "icirc"; //$NON-NLS-1$
- public static final String IEXCL = "iexcl"; //$NON-NLS-1$
- public static final String IGRAVE_U = "Igrave"; //$NON-NLS-1$
- public static final String IGRAVE_L = "igrave"; //$NON-NLS-1$
- public static final String IMAGE = "image"; //$NON-NLS-1$
- public static final String INFIN = "infin"; //$NON-NLS-1$
- public static final String INT = "int"; //$NON-NLS-1$
- public static final String IOTA_U = "Iota"; //$NON-NLS-1$
- public static final String IOTA_L = "iota"; //$NON-NLS-1$
- public static final String IQUEST = "iquest"; //$NON-NLS-1$
- public static final String ISIN = "isin"; //$NON-NLS-1$
- public static final String IUML_U = "Iuml"; //$NON-NLS-1$
- public static final String IUML_L = "iuml"; //$NON-NLS-1$
- public static final String KAPPA_U = "Kappa"; //$NON-NLS-1$
- public static final String KAPPA_L = "kappa"; //$NON-NLS-1$
- public static final String LAMBDA_U = "Lambda"; //$NON-NLS-1$
- public static final String LAMBDA_L = "lambda"; //$NON-NLS-1$
- public static final String LANG = "lang"; //$NON-NLS-1$
- public static final String LAQUO = "laquo"; //$NON-NLS-1$
- public static final String LARR_U = "lArr"; //$NON-NLS-1$
- public static final String LARR_L = "larr"; //$NON-NLS-1$
- public static final String LCEIL = "lceil"; //$NON-NLS-1$
- public static final String LDQUO = "ldquo"; //$NON-NLS-1$
- public static final String LE = "le"; //$NON-NLS-1$
- public static final String LFLOOR = "lfloor"; //$NON-NLS-1$
- public static final String LOWAST = "lowast"; //$NON-NLS-1$
- public static final String LOZ = "loz"; //$NON-NLS-1$
- public static final String LRM = "lrm"; //$NON-NLS-1$
- public static final String LSAQUO = "lsaquo"; //$NON-NLS-1$
- public static final String LSQUO = "lsquo"; //$NON-NLS-1$
- public static final String LT = "lt"; //$NON-NLS-1$
- public static final String MACR = "macr"; //$NON-NLS-1$
- public static final String MDASH = "mdash"; //$NON-NLS-1$
- public static final String MICRO = "micro"; //$NON-NLS-1$
- public static final String MIDDOT = "middot"; //$NON-NLS-1$
- public static final String MINUS = "minus"; //$NON-NLS-1$
- public static final String MU_U = "Mu"; //$NON-NLS-1$
- public static final String MU_L = "mu"; //$NON-NLS-1$
- public static final String NABLA = "nabla"; //$NON-NLS-1$
- public static final String NBSP = "nbsp"; //$NON-NLS-1$
- public static final String NDASH = "ndash"; //$NON-NLS-1$
- public static final String NE = "ne"; //$NON-NLS-1$
- public static final String NI = "ni"; //$NON-NLS-1$
- public static final String NOT = "not"; //$NON-NLS-1$
- public static final String NOTIN = "notin"; //$NON-NLS-1$
- public static final String NSUB = "nsub"; //$NON-NLS-1$
- public static final String NTILDE_U = "Ntilde"; //$NON-NLS-1$
- public static final String NTILDE_L = "ntilde"; //$NON-NLS-1$
- public static final String NU_U = "Nu"; //$NON-NLS-1$
- public static final String NU_L = "nu"; //$NON-NLS-1$
- public static final String OACUTE_U = "Oacute"; //$NON-NLS-1$
- public static final String OACUTE_L = "oacute"; //$NON-NLS-1$
- public static final String OCIRC_U = "Ocirc"; //$NON-NLS-1$
- public static final String OCIRC_L = "ocirc"; //$NON-NLS-1$
- public static final String OELIG_U = "OElig"; //$NON-NLS-1$
- public static final String OELIG_L = "oelig"; //$NON-NLS-1$
- public static final String OGRAVE_U = "Ograve"; //$NON-NLS-1$
- public static final String OGRAVE_L = "ograve"; //$NON-NLS-1$
- public static final String OLINE = "oline"; //$NON-NLS-1$
- public static final String OMEGA_U = "Omega"; //$NON-NLS-1$
- public static final String OMEGA_L = "omega"; //$NON-NLS-1$
- public static final String OMICRON_U = "Omicron"; //$NON-NLS-1$
- public static final String OMICRON_L = "omicron"; //$NON-NLS-1$
- public static final String OPLUS = "oplus"; //$NON-NLS-1$
- public static final String OR = "or"; //$NON-NLS-1$
- public static final String ORDF = "ordf"; //$NON-NLS-1$
- public static final String ORDM = "ordm"; //$NON-NLS-1$
- public static final String OSLASH_U = "Oslash"; //$NON-NLS-1$
- public static final String OSLASH_L = "oslash"; //$NON-NLS-1$
- public static final String OTILDE_U = "Otilde"; //$NON-NLS-1$
- public static final String OTILDE_L = "otilde"; //$NON-NLS-1$
- public static final String OTIMES = "otimes"; //$NON-NLS-1$
- public static final String OUML_U = "Ouml"; //$NON-NLS-1$
- public static final String OUML_L = "ouml"; //$NON-NLS-1$
- public static final String PARA = "para"; //$NON-NLS-1$
- public static final String PART = "part"; //$NON-NLS-1$
- public static final String PERMIL = "permil"; //$NON-NLS-1$
- public static final String PERP = "perp"; //$NON-NLS-1$
- public static final String PHI_U = "Phi"; //$NON-NLS-1$
- public static final String PHI_L = "phi"; //$NON-NLS-1$
- public static final String PI_U = "Pi"; //$NON-NLS-1$
- public static final String PI_L = "pi"; //$NON-NLS-1$
- public static final String PIV = "piv"; //$NON-NLS-1$
- public static final String PLUSMN = "plusmn"; //$NON-NLS-1$
- public static final String POUND = "pound"; //$NON-NLS-1$
- public static final String PRIME_U = "Prime"; //$NON-NLS-1$
- public static final String PRIME_L = "prime"; //$NON-NLS-1$
- public static final String PROD = "prod"; //$NON-NLS-1$
- public static final String PROP = "prop"; //$NON-NLS-1$
- public static final String PSI_U = "Psi"; //$NON-NLS-1$
- public static final String PSI_L = "psi"; //$NON-NLS-1$
- public static final String QUOT = "quot"; //$NON-NLS-1$
- public static final String RADIC = "radic"; //$NON-NLS-1$
- public static final String RANG = "rang"; //$NON-NLS-1$
- public static final String RAQUO = "raquo"; //$NON-NLS-1$
- public static final String RARR_U = "rArr"; //$NON-NLS-1$
- public static final String RARR_L = "rarr"; //$NON-NLS-1$
- public static final String RCEIL = "rceil"; //$NON-NLS-1$
- public static final String RDQUO = "rdquo"; //$NON-NLS-1$
- public static final String REAL = "real"; //$NON-NLS-1$
- public static final String REG = "reg"; //$NON-NLS-1$
- public static final String RFLOOR = "rfloor"; //$NON-NLS-1$
- public static final String RHO_U = "Rho"; //$NON-NLS-1$
- public static final String RHO_L = "rho"; //$NON-NLS-1$
- public static final String RLM = "rlm"; //$NON-NLS-1$
- public static final String RSAQUO = "rsaquo"; //$NON-NLS-1$
- public static final String RSQUO = "rsquo"; //$NON-NLS-1$
- public static final String SBQUO = "sbquo"; //$NON-NLS-1$
- public static final String SCARON_U = "Scaron"; //$NON-NLS-1$
- public static final String SCARON_L = "scaron"; //$NON-NLS-1$
- public static final String SDOT = "sdot"; //$NON-NLS-1$
- public static final String SECT = "sect"; //$NON-NLS-1$
- public static final String SHY = "shy"; //$NON-NLS-1$
- public static final String SIGMA_U = "Sigma"; //$NON-NLS-1$
- public static final String SIGMA_L = "sigma"; //$NON-NLS-1$
- public static final String SIGMAF = "sigmaf"; //$NON-NLS-1$
- public static final String SIM = "sim"; //$NON-NLS-1$
- public static final String SPADES = "spades"; //$NON-NLS-1$
- public static final String SUB = "sub"; //$NON-NLS-1$
- public static final String SUBE = "sube"; //$NON-NLS-1$
- public static final String SUM = "sum"; //$NON-NLS-1$
- public static final String SUP = "sup"; //$NON-NLS-1$
- public static final String SUP1 = "sup1"; //$NON-NLS-1$
- public static final String SUP2 = "sup2"; //$NON-NLS-1$
- public static final String SUP3 = "sup3"; //$NON-NLS-1$
- public static final String SUPE = "supe"; //$NON-NLS-1$
- public static final String SZLIG = "szlig"; //$NON-NLS-1$
- public static final String TAU_U = "Tau"; //$NON-NLS-1$
- public static final String TAU_L = "tau"; //$NON-NLS-1$
- public static final String THERE4 = "there4"; //$NON-NLS-1$
- public static final String THETA_U = "Theta"; //$NON-NLS-1$
- public static final String THETA_L = "theta"; //$NON-NLS-1$
- public static final String THETASYM = "thetasym"; //$NON-NLS-1$
- public static final String THINSP = "thinsp"; //$NON-NLS-1$
- public static final String THORN_U = "THORN"; //$NON-NLS-1$
- public static final String THORN_L = "thorn"; //$NON-NLS-1$
- public static final String TILDE = "tilde"; //$NON-NLS-1$
- public static final String TIMES = "times"; //$NON-NLS-1$
- public static final String TRADE = "trade"; //$NON-NLS-1$
- public static final String UACUTE_U = "Uacute"; //$NON-NLS-1$
- public static final String UACUTE_L = "uacute"; //$NON-NLS-1$
- public static final String UARR_U = "uArr"; //$NON-NLS-1$
- public static final String UARR_L = "uarr"; //$NON-NLS-1$
- public static final String UCIRC_U = "Ucirc"; //$NON-NLS-1$
- public static final String UCIRC_L = "ucirc"; //$NON-NLS-1$
- public static final String UGRAVE_U = "Ugrave"; //$NON-NLS-1$
- public static final String UGRAVE_L = "ugrave"; //$NON-NLS-1$
- public static final String UML = "uml"; //$NON-NLS-1$
- public static final String UPSIH = "upsih"; //$NON-NLS-1$
- public static final String UPSILON_U = "Upsilon"; //$NON-NLS-1$
- public static final String UPSILON_L = "upsilon"; //$NON-NLS-1$
- public static final String UUML_U = "Uuml"; //$NON-NLS-1$
- public static final String UUML_L = "uuml"; //$NON-NLS-1$
- public static final String WEIERP = "weierp"; //$NON-NLS-1$
- public static final String XI_U = "Xi"; //$NON-NLS-1$
- public static final String XI_L = "xi"; //$NON-NLS-1$
- public static final String YACUTE_U = "Yacute"; //$NON-NLS-1$
- public static final String YACUTE_L = "yacute"; //$NON-NLS-1$
- public static final String YEN = "yen"; //$NON-NLS-1$
- public static final String YUML_U = "Yuml"; //$NON-NLS-1$
- public static final String YUML_L = "yuml"; //$NON-NLS-1$
- public static final String ZETA_U = "Zeta"; //$NON-NLS-1$
- public static final String ZETA_L = "zeta"; //$NON-NLS-1$
- public static final String ZWJ = "zwj"; //$NON-NLS-1$
- public static final String ZWNJ = "zwnj"; //$NON-NLS-1$
- }
-
- public static final String HTML40_URI = "http://www.w3.org/TR/REC-html40/frameset.dtd"; //$NON-NLS-1$
- public static final String HTML40_TAG_PREFIX = ""; //$NON-NLS-1$
- // global attribute names
- public static final String ATTR_NAME_ID = "id"; // %coreattrs; //$NON-NLS-1$
- public static final String ATTR_NAME_CLASS = "class"; // %coreattrs; //$NON-NLS-1$
- public static final String ATTR_NAME_STYLE = "style"; // %coreattrs; //$NON-NLS-1$
- public static final String ATTR_NAME_TITLE = "title"; // %coreattrs; //$NON-NLS-1$
- public static final String ATTR_NAME_LANG = "lang"; // %i18n; //$NON-NLS-1$
- public static final String ATTR_NAME_DIR = "dir"; // %i18n; //$NON-NLS-1$
- public static final String ATTR_NAME_ONCLICK = "onclick"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_ONDBLCLICK = "ondblclick"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEDOWN = "onmousedown"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEUP = "onmouseup"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEOVER = "onmouseover"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEMOVE = "onmousemove"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEOUT = "onmouseout"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_ONKEYPRESS = "onkeypress"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_ONKEYDOWN = "onkeydown"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_ONKEYUP = "onkeyup"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_ONHELP = "onhelp"; // %events; //$NON-NLS-1$
- public static final String ATTR_NAME_BGCOLOR = "bgcolor"; // %bodycolor;, TABLE //$NON-NLS-1$
- public static final String ATTR_NAME_TEXT = "text"; // %bodycolor; //$NON-NLS-1$
- public static final String ATTR_NAME_LINK = "link"; // %bodycolor; //$NON-NLS-1$
- public static final String ATTR_NAME_VLINK = "vlink"; // %bodycolor; //$NON-NLS-1$
- public static final String ATTR_NAME_ALINK = "alink"; // %bodycolor; //$NON-NLS-1$
- public static final String ATTR_NAME_VERSION = "version"; // HTML //$NON-NLS-1$
- public static final String ATTR_NAME_PROFILE = "profile"; // HEAD //$NON-NLS-1$
- public static final String ATTR_NAME_ONLOAD = "onload"; // BODY //$NON-NLS-1$
- public static final String ATTR_NAME_ONUNLOAD = "onunload"; // BODY //$NON-NLS-1$
- public static final String ATTR_NAME_BACKGROUND = "background"; // BODY, TABLE //$NON-NLS-1$
- public static final String ATTR_NAME_SRC = "src"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_ALT = "alt"; // IMG,AREA //$NON-NLS-1$
- public static final String ATTR_NAME_LONGDESC = "longdesc"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_NAME = "name"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_HEIGHT = "height"; // IMG, TABLE //$NON-NLS-1$
- public static final String ATTR_NAME_WIDTH = "width"; // IMG, TABLE,HR //$NON-NLS-1$
- public static final String ATTR_NAME_USEMAP = "usemap"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_ISMAP = "ismap"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_ALIGN = "align"; // IMG, TABLE,HR //$NON-NLS-1$
- public static final String ATTR_NAME_BORDER = "border"; // IMG, TABLE //$NON-NLS-1$
- public static final String ATTR_NAME_HSPACE = "hspace"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_VSPACE = "vspace"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_MAPFILE = "mapfile"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_SUMMARY = "summary"; // TABLE //$NON-NLS-1$
- public static final String ATTR_NAME_FRAME = "frame"; // TABLE //$NON-NLS-1$
- public static final String ATTR_NAME_RULES = "rules"; // TABLE //$NON-NLS-1$
- public static final String ATTR_NAME_CELLSPACING = "cellspacing"; // TABLE //$NON-NLS-1$
- public static final String ATTR_NAME_CELLPADDING = "cellpadding"; // TABLE //$NON-NLS-1$
- public static final String ATTR_NAME_DATAPAGESIZE = "datapagesize"; // TABLE,HR //$NON-NLS-1$
- public static final String ATTR_NAME_COLOR = "color"; // BASEFONT,FONT //$NON-NLS-1$
- public static final String ATTR_NAME_FACE = "face"; // BASEFONT,FONT //$NON-NLS-1$
- public static final String ATTR_NAME_SIZE = "size"; // BASEFONT,FONT //$NON-NLS-1$
- public static final String ATTR_NAME_CLEAR = "clear"; // BR //$NON-NLS-1$
- public static final String ATTR_NAME_SHAPE = "shape"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_COORDS = "coords"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_HREF = "href"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_TARGET = "target"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_NOHREF = "nohref"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_TABINDEX = "tabindex"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_ACCESSKEY = "accesskey"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_ONFOCUS = "onfocus"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_ONBLUR = "onblur"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_CHARSET = "charset"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_HREFLANG = "hreflang"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_TYPE = "type"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_REL = "rel"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_REV = "rev"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_MEDIA = "media"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_VALUE = "value"; // PARAM //$NON-NLS-1$
- public static final String ATTR_NAME_VALUETYPE = "valuetype"; // PARAM //$NON-NLS-1$
- public static final String ATTR_NAME_NOSHADE = "noshade"; // HR //$NON-NLS-1$
- public static final String ATTR_NAME_CHECKED = "checked"; // INPUT //$NON-NLS-1$
- public static final String ATTR_NAME_DISABLED = "disabled"; // INPUT //$NON-NLS-1$
- public static final String ATTR_NAME_READONLY = "readonly"; // INPUT //$NON-NLS-1$
- public static final String ATTR_NAME_MAXLENGTH = "maxlength"; // INPUT //$NON-NLS-1$
- public static final String ATTR_NAME_ONSELECT = "onselect"; // INPUT //$NON-NLS-1$
- public static final String ATTR_NAME_ONCHANGE = "onchange"; // INPUT //$NON-NLS-1$
- public static final String ATTR_NAME_ACCEPT = "accept"; // INPUT //$NON-NLS-1$
- public static final String ATTR_NAME_ISTYLE = "istyle"; // INPUT //$NON-NLS-1$
- public static final String ATTR_NAME_CHAR = "char"; // COL //$NON-NLS-1$
- public static final String ATTR_NAME_CHAROFF = "charoff"; // COL //$NON-NLS-1$
- public static final String ATTR_NAME_VALIGN = "valign"; // COL //$NON-NLS-1$
- public static final String ATTR_NAME_SPAN = "span"; // COL //$NON-NLS-1$
- public static final String ATTR_NAME_FRAMEBORDER = "frameborder"; // FRAME //$NON-NLS-1$
- public static final String ATTR_NAME_MARGINWIDTH = "marginwidth"; // FRAME //$NON-NLS-1$
- public static final String ATTR_NAME_MARGINHEIGHT = "marginheight"; // FRAME //$NON-NLS-1$
- public static final String ATTR_NAME_NORESIZE = "noresize"; // FRAME //$NON-NLS-1$
- public static final String ATTR_NAME_SCROLLING = "scrolling"; // FRAME //$NON-NLS-1$
- public static final String ATTR_NAME_PROMPT = "prompt"; // ISINDEX //$NON-NLS-1$
- public static final String ATTR_NAME_HTTP_EQUIV = "http-equiv"; // META //$NON-NLS-1$
- public static final String ATTR_NAME_CONTENT = "content"; // META //$NON-NLS-1$
- public static final String ATTR_NAME_SCHEME = "scheme"; // META //$NON-NLS-1$
- public static final String ATTR_NAME_ERRMSG = "errmsg"; // ssi:config //$NON-NLS-1$
- public static final String ATTR_NAME_SIZEFMT = "sizefmt"; // ssi:config //$NON-NLS-1$
- public static final String ATTR_NAME_TIMEFMT = "timefmt"; // ssi:config //$NON-NLS-1$
- public static final String ATTR_NAME_VAR = "var"; // ssi:echo //$NON-NLS-1$
- public static final String ATTR_NAME_CGI = "cgi"; // ssi:exec //$NON-NLS-1$
- public static final String ATTR_NAME_CMD = "cmd"; // ssi:exec //$NON-NLS-1$
- public static final String ATTR_NAME_FILE = "file"; // ssi:fsize //$NON-NLS-1$
- public static final String ATTR_NAME_VIRTUAL = "virtual"; // ssi:fsize //$NON-NLS-1$
- public static final String ATTR_NAME_SELECTED = "selected"; // OPTION //$NON-NLS-1$
- public static final String ATTR_NAME_LABEL = "label"; // OPTION //$NON-NLS-1$
- public static final String ATTR_NAME_ROWS = "rows"; // TEXTAREA //$NON-NLS-1$
- public static final String ATTR_NAME_COLS = "cols"; // TEXTAREA //$NON-NLS-1$
- public static final String ATTR_NAME_LANGUAGE = "language"; // SCRIPT //$NON-NLS-1$
- public static final String ATTR_NAME_DEFER = "defer"; // SCRIPT //$NON-NLS-1$
- public static final String ATTR_NAME_EVENT = "event"; // SCRIPT //$NON-NLS-1$
- public static final String ATTR_NAME_FOR = "for"; // SCRIPT //$NON-NLS-1$
- public static final String ATTR_NAME_COMPACT = "compact"; // OL/UL //$NON-NLS-1$
- public static final String ATTR_NAME_START = "start"; // OL/UL //$NON-NLS-1$
- public static final String ATTR_NAME_DIRECTKEY = "directkey"; // A //$NON-NLS-1$
- public static final String ATTR_NAME_CODEBASE = "codebase"; // APPLET //$NON-NLS-1$
- public static final String ATTR_NAME_ARCHIVE = "archive"; // APPLET //$NON-NLS-1$
- public static final String ATTR_NAME_CODE = "code"; // APPLET //$NON-NLS-1$
- public static final String ATTR_NAME_OBJECT = "object"; // APPLET //$NON-NLS-1$
- public static final String ATTR_NAME_MAYSCRIPT = "mayscript"; // APPLET //$NON-NLS-1$
- public static final String ATTR_NAME_CITE = "cite"; // BLOCKQUOTE //$NON-NLS-1$
- public static final String ATTR_NAME_MACRO = "macro"; // D2W //$NON-NLS-1$
- public static final String ATTR_NAME_DATETIME = "datetime"; // INS/DEL //$NON-NLS-1$
- public static final String ATTR_NAME_LOOP = "loop"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_HIDDEN = "hidden"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_VOLUME = "volume"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_AUTOSTART = "autostart"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_AUTOPLAY = "autoplay"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_AUTOSIZE = "autosize"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_CONTROLLER = "controller";// EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_SCALE = "scale"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_SHOWCONTROLS = "showcontrols";// EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_PLAYCOUNT = "playcount"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_REPEAT = "repeat"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_PANEL = "panel"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_PALETTE = "palette"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_TEXTFOCUS = "textfocus"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_ACTION = "action"; // FORM //$NON-NLS-1$
- public static final String ATTR_NAME_METHOD = "method"; // FORM //$NON-NLS-1$
- public static final String ATTR_NAME_ENCTYPE = "enctype"; // FORM //$NON-NLS-1$
- public static final String ATTR_NAME_ONSUBMIT = "onsubmit"; // FORM //$NON-NLS-1$
- public static final String ATTR_NAME_ONRESET = "onreset"; // FORM //$NON-NLS-1$
- public static final String ATTR_NAME_ACCEPT_CHARSET = "accept-charset";// FORM //$NON-NLS-1$
- public static final String ATTR_NAME_BEHAVIOR = "behavior"; // MARQUEE //$NON-NLS-1$
- public static final String ATTR_NAME_DIRECTION = "direction"; // MARQUEE //$NON-NLS-1$
- public static final String ATTR_NAME_SCROLLAMOUNT = "scrollamount";// MARQUEE //$NON-NLS-1$
- public static final String ATTR_NAME_SCROLLDELAY = "scrolldelay";// MARQUEE //$NON-NLS-1$
- public static final String ATTR_NAME_TRUESPEED = "truespeed"; // MARQUEE //$NON-NLS-1$
- public static final String ATTR_NAME_DECLARE = "declare"; // OBJECT //$NON-NLS-1$
- public static final String ATTR_NAME_CLASSID = "classid"; // OBJECT //$NON-NLS-1$
- public static final String ATTR_NAME_DATA = "data"; // OBJECT //$NON-NLS-1$
- public static final String ATTR_NAME_CODETYPE = "codetype"; // OBJECT //$NON-NLS-1$
- public static final String ATTR_NAME_STANDBY = "standby"; // OBJECT //$NON-NLS-1$
- public static final String ATTR_NAME_MULTIPLE = "multiple"; // SELECT //$NON-NLS-1$
- public static final String ATTR_NAME_ABBR = "abbr"; // TH/TD //$NON-NLS-1$
- public static final String ATTR_NAME_AXIS = "axis"; // TH/TD //$NON-NLS-1$
- public static final String ATTR_NAME_HEADERS = "headers"; // TH/TD //$NON-NLS-1$
- public static final String ATTR_NAME_SCOPE = "scope"; // TH/TD //$NON-NLS-1$
- public static final String ATTR_NAME_ROWSPAN = "rowspan"; // TH/TD //$NON-NLS-1$
- public static final String ATTR_NAME_COLSPAN = "colspan"; // TH/TD //$NON-NLS-1$
- public static final String ATTR_NAME_NOWRAP = "nowrap"; // TH/TD //$NON-NLS-1$
- // <<D205514
- public static final String ATTR_NAME_TOPMARGIN = "topmargin"; // BODY //$NON-NLS-1$
- public static final String ATTR_NAME_BOTTOMMARGIN = "bottommargin"; // BODY //$NON-NLS-1$
- public static final String ATTR_NAME_LEFTMARGIN = "leftmargin"; // BODY //$NON-NLS-1$
- public static final String ATTR_NAME_RIGHTMARGIN = "rightmargin"; // BODY //$NON-NLS-1$
- public static final String ATTR_NAME_BORDERCOLOR = "bordercolor"; // TABLE/TR/TH/TD/FRAMESET/FRAME //$NON-NLS-1$
- // for WML
- public static final String WML_ATTR_NAME_TITLE = "title"; // card //$NON-NLS-1$
- public static final String WML_ATTR_NAME_DOMAIN = "domain"; // access //$NON-NLS-1$
- public static final String WML_ATTR_NAME_PATH = "path"; // access //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONENTERFORWARD = "onenterforward"; // template,card //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONENTERBACKWARD = "onenterbackward"; // template,card //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONPICK = "onpick"; // option //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONTIMER = "ontimer"; // template,card //$NON-NLS-1$
- public static final String WML_ATTR_NAME_NEWCONTEXT = "newcontext"; // card //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ORDERED = "ordered"; // card //$NON-NLS-1$
- public static final String WML_ATTR_NAME_OPTIONAL = "optional"; // do //$NON-NLS-1$
- public static final String WML_ATTR_NAME_CACHE_CONTROL = "cache-control"; // go //$NON-NLS-1$
- public static final String WML_ATTR_NAME_SENDREFERER = "sendreferer"; // go //$NON-NLS-1$
- public static final String WML_ATTR_NAME_METHOD = "method"; // go //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ENCTYPE = "enctype"; // go //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ACCEPT_CHARSET = "accept-charset"; // go //$NON-NLS-1$
- public static final String WML_ATTR_NAME_COLUMNS = "columns"; // table //$NON-NLS-1$
- // D205514
- //<<D215684
- public static final String ATTR_NAME_FRAMESPACING = "framespacing"; // FRAMESET //$NON-NLS-1$
- //D215684
- // global attribute values; mainly used in enumeration.
- public static final String ATTR_VALUE_VERSION_TRANSITIONAL = "-//W3C//DTD HTML 4.01 Transitional//EN"; //$NON-NLS-1$
- public static final String ATTR_VALUE_VERSION_FRAMESET = "-//W3C//DTD HTML 4.01 Frameset//EN"; //$NON-NLS-1$
- public static final String ATTR_VALUE_LTR = "ltr"; // dir //$NON-NLS-1$
- public static final String ATTR_VALUE_RTL = "rtl"; // dir //$NON-NLS-1$
- // for align (top|middle|bottom|left|right)
- public static final String ATTR_VALUE_TOP = "top"; // align //$NON-NLS-1$
- public static final String ATTR_VALUE_MIDDLE = "middle"; // align //$NON-NLS-1$
- public static final String ATTR_VALUE_BOTTOM = "bottom"; // align //$NON-NLS-1$
- public static final String ATTR_VALUE_LEFT = "left"; // align //$NON-NLS-1$
- public static final String ATTR_VALUE_CENTER = "center"; // align //$NON-NLS-1$
- public static final String ATTR_VALUE_RIGHT = "right"; // align //$NON-NLS-1$
- public static final String ATTR_VALUE_JUSTIFY = "justify"; // align //$NON-NLS-1$
- public static final String ATTR_VALUE_CHAR = "char"; // align //$NON-NLS-1$
- // for valign (baseline)
- public static final String ATTR_VALUE_BASELINE = "baseline"; // valign //$NON-NLS-1$
- // for clear (left|all|right|none): left and right are already defined above.
- public static final String ATTR_VALUE_ALL = "all"; // clear //$NON-NLS-1$
- public static final String ATTR_VALUE_NONE = "none"; // clear //$NON-NLS-1$
- // for shape (rect|circle|poly|default)
- public static final String ATTR_VALUE_RECT = "rect"; // shape //$NON-NLS-1$
- public static final String ATTR_VALUE_CIRCLE = "circle"; // shape //$NON-NLS-1$
- public static final String ATTR_VALUE_POLY = "poly"; // shape //$NON-NLS-1$
- public static final String ATTR_VALUE_DEFAULT = "default"; // shape //$NON-NLS-1$
- // for valuetype (data|ref|object)
- public static final String ATTR_VALUE_DATA = "data"; // valuetype //$NON-NLS-1$
- public static final String ATTR_VALUE_REF = "ref"; // valuetype //$NON-NLS-1$
- public static final String ATTR_VALUE_OBJECT = "object"; // valuetype //$NON-NLS-1$
- // for type of INPUT
- // (text | password | checkbox | radio | submit | reset |
- // file | hidden | image | button)
- public static final String ATTR_VALUE_TEXT = "text"; // INPUT:type //$NON-NLS-1$
- public static final String ATTR_VALUE_PASSWORD = "password"; // INPUT:type //$NON-NLS-1$
- public static final String ATTR_VALUE_CHECKBOX = "checkbox"; // INPUT:type //$NON-NLS-1$
- public static final String ATTR_VALUE_RADIO = "radio"; // INPUT:type //$NON-NLS-1$
- public static final String ATTR_VALUE_SUBMIT = "submit"; // INPUT:type //$NON-NLS-1$
- public static final String ATTR_VALUE_RESET = "reset"; // INPUT:type //$NON-NLS-1$
- public static final String ATTR_VALUE_FILE = "file"; // INPUT:type //$NON-NLS-1$
- public static final String ATTR_VALUE_HIDDEN = "hidden"; // INPUT:type //$NON-NLS-1$
- public static final String ATTR_VALUE_IMAGE = "image"; // INPUT:type //$NON-NLS-1$
- public static final String ATTR_VALUE_BUTTON = "button"; // INPUT:type //$NON-NLS-1$
- // for span, colspan, rowspan
- public static final String ATTR_VALUE_1 = "1"; // span //$NON-NLS-1$
- // for frameborder
- public static final String ATTR_VALUE_0 = "0"; // FRAME //$NON-NLS-1$
- // for scrolling
- public static final String ATTR_VALUE_YES = "yes"; // FRAME //$NON-NLS-1$
- public static final String ATTR_VALUE_NO = "no"; // FRAME //$NON-NLS-1$
- public static final String ATTR_VALUE_AUTO = "auto"; // FRAME //$NON-NLS-1$
- // for UL
- public static final String ATTR_VALUE_DISC = "disc"; // UL:type //$NON-NLS-1$
- public static final String ATTR_VALUE_SQUARE = "square"; // UL:type //$NON-NLS-1$
- // for frame of TABLE
- public static final String ATTR_VALUE_VOID = "void"; // TABLE:frame //$NON-NLS-1$
- public static final String ATTR_VALUE_ABOVE = "above"; // TABLE:frame //$NON-NLS-1$
- public static final String ATTR_VALUE_BELOW = "below"; // TABLE:frame //$NON-NLS-1$
- public static final String ATTR_VALUE_HSIDES = "hsides"; // TABLE:frame //$NON-NLS-1$
- public static final String ATTR_VALUE_LHS = "lhs"; // TABLE:frame //$NON-NLS-1$
- public static final String ATTR_VALUE_RHS = "rhs"; // TABLE:frame //$NON-NLS-1$
- public static final String ATTR_VALUE_VSIDES = "vsides"; // TABLE:frame //$NON-NLS-1$
- public static final String ATTR_VALUE_BOX = "box"; // TABLE:frame //$NON-NLS-1$
- public static final String ATTR_VALUE_BORDER = "border"; // TABLE:frame //$NON-NLS-1$
- // for rules of TABLE
- public static final String ATTR_VALUE_GROUPS = "groups"; // TABLE:rules //$NON-NLS-1$
- public static final String ATTR_VALUE_ROWS = "rows"; // TEXTAREA //$NON-NLS-1$
- public static final String ATTR_VALUE_COLS = "cols"; // TEXTAREA //$NON-NLS-1$
- // for method of FORM
- public static final String ATTR_VALUE_GET = "get"; // FORM //$NON-NLS-1$
- public static final String ATTR_VALUE_POST = "post"; // FORM //$NON-NLS-1$
- public static final String ATTR_VALUE_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded"; //$NON-NLS-1$
- // for scope of (TH | TD)
- public static final String ATTR_VALUE_ROW = "row"; // (TH|TD):scope //$NON-NLS-1$
- public static final String ATTR_VALUE_COL = "col"; // (TH|TD):scope //$NON-NLS-1$
- public static final String ATTR_VALUE_ROWGROUP = "rowgroup";// (TH|TD):scope //$NON-NLS-1$
- public static final String ATTR_VALUE_COLGROUP = "colgroup";// (TH|TD):scope //$NON-NLS-1$
- // for auto?? of EMBED
- public static final String ATTR_VALUE_TRUE = "true"; // EMBED //$NON-NLS-1$
- public static final String ATTR_VALUE_FALSE = "false"; // EMBED //$NON-NLS-1$
- // for behaviro of MARQUEE
- public static final String ATTR_VALUE_SCROLL = "scroll"; // MARQUEE //$NON-NLS-1$
- public static final String ATTR_VALUE_SLIDE = "slide"; // MARQUEE //$NON-NLS-1$
- public static final String ATTR_VALUE_ALTERNATE = "alternate"; // MARQUEE //$NON-NLS-1$
- // for direction of MARQUEE
- public static final String ATTR_VALUE_UP = "up"; // MARQUEE //$NON-NLS-1$
- public static final String ATTR_VALUE_DOWN = "down"; // MARQUEE //$NON-NLS-1$
- // for type of LI (D19924)
- public static final String ATTR_VALUE_NUMBER = "1"; // LI //$NON-NLS-1$
- public static final String ATTR_VALUE_LOWER_ALPHA = "a"; // LI //$NON-NLS-1$
- public static final String ATTR_VALUE_UPPER_ALPHA = "A"; // LI //$NON-NLS-1$
- public static final String ATTR_VALUE_LOWER_ROMAN = "i"; // LI //$NON-NLS-1$
- public static final String ATTR_VALUE_UPPER_ROMAN = "I"; // LI //$NON-NLS-1$
- // for loop of BGSOUND (D205513)
- public static final String ATTR_VALUE_INFINITE = "infinite"; // BGSOUND //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCMProperties.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCMProperties.java
deleted file mode 100644
index 16d4719cce..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCMProperties.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core;
-
-
-/**
- * HTMLCMProperties defines all property names and pre-defined values in HTML CM.
- * All of those properties can be retreived from element declarations of HTML CM
- * via CMNode#getProperty(String propName).
- */
-public interface HTMLCMProperties {
-
- /**
- * "shouldIgnoreCase" returns java.lang.Boolean object.
- */
- public static final String SHOULD_IGNORE_CASE = "shouldIgnoreCase";//$NON-NLS-1$
- /**
- * "shouldKeepSpace" returns java.lang.Boolean object.
- */
- public static final String SHOULD_KEEP_SPACE = "shouldKeepSpace";//$NON-NLS-1$
- /**
- * "indentChildSource" returns java.lang.Boolean object.
- */
- public static final String SHOULD_INDENT_CHILD_SOURCE = "shouldIndentChildSource";//$NON-NLS-1$
- /**
- * "terminators" returns java.util.Iterator (an array of String objects).
- */
- public static final String TERMINATORS = "terminators";//$NON-NLS-1$
- /**
- * "contentHint" returns CMElementDeclaration instnace.
- */
- public static final String CONTENT_HINT = "contentHint";//$NON-NLS-1$
- /**
- * "prohibitedAncestors" returns org.eclipse.wst.common.contentmodel.CMNamedNodeMap.
- */
- public static final String PROHIBITED_ANCESTORS = "prohibitedAncestors";//$NON-NLS-1$
- /**
- * "isJSP" returns java.lang.Boolean object.
- */
- public static final String IS_JSP = "isJSP";//$NON-NLS-1$
- /**
- * "isXHTML" returns java.lang.Boolean object.
- */
- public static final String IS_XHTML = "isXHTML";//$NON-NLS-1$
- /**
- * "isSSI" returns java.lang.Boolean object.
- */
- public static final String IS_SSI = "isSSI";//$NON-NLS-1$
- /**
- * "lineBreakHint" returns String (one of pre-defined values in Values).
- */
- public static final String LINE_BREAK_HINT = "lineBreakHint";//$NON-NLS-1$
- /**
- * "layoutType" returns String (one of pre-defined values in Values).
- */
- public static final String LAYOUT_TYPE = "layoutType";//$NON-NLS-1$
- /**
- * "tagInfo" returns String (documentation for this element).
- */
- public static final String TAGINFO = "tagInfo";//$NON-NLS-1$
- /**
- * "omitType" returns String (one of pre-defined values in Values).
- */
- public static final String OMIT_TYPE = "omitType";//$NON-NLS-1$
- /**
- * "inclusion" returns org.eclipse.wst.common.contentmodel.CMContent.
- */
- public static final String INCLUSION = "inclusion";//$NON-NLS-1$
- /**
- * "isScriptable" returns java.lang.Boolean object.
- */
- public static final String IS_SCRIPTABLE = "isScriptable"; //$NON-NLS-1$
-
- public static interface Values {
- /*
- * for LINE_BREAK_HINT = "lineBreakHint".
- */
- public static final String BREAK_NONE = "breakNone";//$NON-NLS-1$
- public static final String BREAK_AFTER_START = "breakAfterStart";//$NON-NLS-1$
- public static final String BREAK_BEFORE_START_AND_AFTER_END = "breakBeforeStartAndAfterEnd";//$NON-NLS-1$
- /*
- * for LAYOUT_TYPE = "layoutType"
- */
- public static final String LAYOUT_BLOCK = "layoutBlock";//$NON-NLS-1$
- /** BR */
- public static final String LAYOUT_BREAK = "layoutBreak";//$NON-NLS-1$
- /** Hidden object; like HTML or HEAD */
- public static final String LAYOUT_HIDDEN = "layoutHidden";//$NON-NLS-1$
- public static final String LAYOUT_NONE = "layoutNone";//$NON-NLS-1$
- /** No wrap object; like IMG, APPLET,... */
- public static final String LAYOUT_OBJECT = "layoutObject";//$NON-NLS-1$
- public static final String LAYOUT_WRAP = "layoutWrap";//$NON-NLS-1$
- /*
- * for OMIT_TYPE = "omitType"
- */
- /** Not ommisible. */
- public static final String OMIT_NONE = "omitNone";//$NON-NLS-1$
- /** Both tags are ommisible. */
- public static final String OMIT_BOTH = "omitBoth";//$NON-NLS-1$
- /** The end tag is ommisible. */
- public static final String OMIT_END = "omitEnd";//$NON-NLS-1$
- /** The end tag is ommitted when created. */
- public static final String OMIT_END_DEFAULT = "omitEndDefault";//$NON-NLS-1$
- /** The end tag must be omitted. */
- public static final String OMIT_END_MUST = "omitEndMust";//$NON-NLS-1$
-
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCorePlugin.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCorePlugin.java
deleted file mode 100644
index f8b263f6c6..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCorePlugin.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core;
-
-
-/**
- * @deprecated use internal HTMLCorePlugin class instead if possible
- */
-public class HTMLCorePlugin extends org.eclipse.wst.html.core.internal.HTMLCorePlugin {
- // see org.eclipse.wst.html.core.internal.HTMLCorePlugin
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLFilesPreferenceNames.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLFilesPreferenceNames.java
deleted file mode 100644
index 6072e0f8f7..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLFilesPreferenceNames.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.core;
-
-import org.eclipse.core.runtime.IProduct;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-
-/**
- * Additional preferences for new HTML Files generation
- */
-public interface HTMLFilesPreferenceNames extends CommonModelPreferenceNames {
-
- static final String DEFAULT_SUFFIX = "defaultSuffix";//$NON-NLS-1$
- static final String HTML_SUFFIX = "html";//$NON-NLS-1$
- static final String GENERATE_DOCUMENT_TYPE = "generateDocumentType";//$NON-NLS-1$
- static final String GENERATE_GENERATOR = "generateGenerator";//$NON-NLS-1$
- // added this as a potential why to handle changing
- // product names "up" the stack. Note, not declared final
- // to avoid getting 'inlined' by compiler.
- static IProduct product = Platform.getProduct();
- static String GENERATOR = product.getName();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLFormatContraints.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLFormatContraints.java
deleted file mode 100644
index 5346737757..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLFormatContraints.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.core;
-
-import org.eclipse.wst.sse.core.format.IStructuredFormatContraints;
-
-/**
- * @deprecated
- * Please un-deprecate this if Page Designer thinks they are needed.
- */
-public interface HTMLFormatContraints extends IStructuredFormatContraints {
- /**
- * @deprecated
- * It's very hard to keep the available line width accurate.
- * Sometimes a node wants to start on a new line, sometimes it doesn't.
- * It's best for the node to figure out the available line width on the fly.
- */
- int getAvailableLineWidth();
-
- /**
- * @deprecated
- * It's very hard to keep the available line width accurate.
- * Sometimes a node wants to start on a new line, sometimes it doesn't.
- * It's best for the node to figure out the available line width on the fly.
- */
- void setAvailableLineWidth(int availableLineWidth);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/PreferenceNames.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/PreferenceNames.java
deleted file mode 100644
index 66466e4b24..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/PreferenceNames.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.core;
-
-
-public interface PreferenceNames {
-
- String TRUE = "true"; //$NON-NLS-1$
- String FALSE = "false"; //$NON-NLS-1$
- String YES = "yes"; //$NON-NLS-1$
- String NO = "no"; //$NON-NLS-1$
-
-
- String SETTINGS = "settings"; //$NON-NLS-1$
-
- String TREEVIEW = "treeview"; //$NON-NLS-1$
- String DEFAULT_DEPTH = "defaultdepth"; //$NON-NLS-1$
-
- String ASIS = "as-is"; //$NON-NLS-1$
- String LOWER = "lower"; //$NON-NLS-1$
- String UPPER = "upper"; //$NON-NLS-1$
-
- String PREFERRED_CASE = "preferred-case"; //$NON-NLS-1$
- String TAGNAME = "tagname"; //$NON-NLS-1$
- String ATTRIBUTENAME = "attributename"; //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/AbstractNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/AbstractNodeCleanupHandler.java
deleted file mode 100644
index 4a55ff6920..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/AbstractNodeCleanupHandler.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.cleanup;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupPreferences;
-import org.eclipse.wst.sse.core.cleanup.StructuredCleanupPreferences;
-import org.eclipse.wst.sse.core.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
-
-abstract class AbstractNodeCleanupHandler implements IStructuredCleanupHandler {
-
- protected IStructuredCleanupPreferences fCleanupPreferences = null;
- protected IProgressMonitor fProgressMonitor = null;
-
- public void setCleanupPreferences(IStructuredCleanupPreferences cleanupPreferences) {
-
- fCleanupPreferences = cleanupPreferences;
- }
-
- /**
- * @see com.ibm.sed.partitionCleanup.CleanupHandler#getCleanupPreferences()
- */
- public IStructuredCleanupPreferences getCleanupPreferences() {
- if (fCleanupPreferences == null) {
- fCleanupPreferences = new StructuredCleanupPreferences();
-
- Preferences preferences = getModelPreferences();
- if (preferences != null) {
- fCleanupPreferences.setTagNameCase(preferences.getInt(CommonModelPreferenceNames.CLEANUP_TAG_NAME_CASE));
- fCleanupPreferences.setAttrNameCase(preferences.getInt(CommonModelPreferenceNames.CLEANUP_ATTR_NAME_CASE));
- fCleanupPreferences.setCompressEmptyElementTags(preferences.getBoolean(CommonModelPreferenceNames.COMPRESS_EMPTY_ELEMENT_TAGS));
- fCleanupPreferences.setInsertRequiredAttrs(preferences.getBoolean(CommonModelPreferenceNames.INSERT_REQUIRED_ATTRS));
- fCleanupPreferences.setInsertMissingTags(preferences.getBoolean(CommonModelPreferenceNames.INSERT_MISSING_TAGS));
- fCleanupPreferences.setQuoteAttrValues(preferences.getBoolean(CommonModelPreferenceNames.QUOTE_ATTR_VALUES));
- fCleanupPreferences.setFormatSource(preferences.getBoolean(CommonModelPreferenceNames.FORMAT_SOURCE));
- fCleanupPreferences.setConvertEOLCodes(preferences.getBoolean(CommonModelPreferenceNames.CONVERT_EOL_CODES));
- fCleanupPreferences.setEOLCode(preferences.getString(CommonModelPreferenceNames.CLEANUP_EOL_CODE));
- }
- }
-
- return fCleanupPreferences;
- }
-
- /**
- * @see com.ibm.sed.partitionCleanup.CleanupHandler#setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void setProgressMonitor(IProgressMonitor progressMonitor) {
-
- fProgressMonitor = progressMonitor;
- }
-
- static protected StructuredDocumentEvent replaceSource(XMLModel model, Object requester, int offset, int length, String source) {
-
- StructuredDocumentEvent result = null;
- if (model == null)
- return result;
- IStructuredDocument structuredDocument = model.getStructuredDocument();
- if (structuredDocument == null)
- return result;
- if (source == null)
- source = new String();
- if (structuredDocument.containsReadOnly(offset, length))
- return result;
- if (requester == null) {
- requester = structuredDocument;
- }
- return structuredDocument.replaceText(requester, offset, length, source);
- }
-
- protected Preferences getModelPreferences() {
- return HTMLCorePlugin.getDefault().getPluginPreferences();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/CSSTextNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/CSSTextNodeCleanupHandler.java
deleted file mode 100644
index 491a8bd262..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/CSSTextNodeCleanupHandler.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.cleanup;
-
-
-
-import org.eclipse.wst.css.core.adapters.IStyleSheetAdapter;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.format.CSSSourceFormatter;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.w3c.dom.Node;
-
-// nakamori_TODO: check and remove
-
-public class CSSTextNodeCleanupHandler extends AbstractNodeCleanupHandler {
-
- public Node cleanup(Node node) {
- if (node == null)
- return node;
- XMLModel model = ((XMLNode) node).getModel();
- if (model == null)
- return node;
- IStructuredDocument structuredDocument = model.getStructuredDocument();
- if (structuredDocument == null)
- return node;
-
- String content = getCSSContent(node);
- if (content == null)
- return node;
-
- int offset = ((XMLNode) node).getStartOffset();
- int length = ((XMLNode) node).getEndOffset() - offset;
- replaceSource(model, this, offset, length, content);
- return (XMLNode) model.getIndexedRegion(offset);
- }
-
- /**
- */
- private String getCSSContent(Node text) {
- ICSSModel model = getCSSModel(text);
- if (model == null)
- return null;
- ICSSNode document = model.getDocument();
- if (document == null)
- return null;
- INodeNotifier notifier = (INodeNotifier) document;
- INodeAdapter adapter = notifier.getAdapterFor(CSSSourceFormatter.class);
- if (adapter == null)
- return null;
- CSSSourceFormatter formatter = (CSSSourceFormatter) adapter;
- StringBuffer buffer = formatter.cleanup(document);
- if (buffer == null)
- return null;
- return buffer.toString();
- }
-
- /**
- */
- private ICSSModel getCSSModel(Node text) {
- if (text == null)
- return null;
- INodeNotifier notifier = (INodeNotifier) text.getParentNode();
- if (notifier == null)
- return null;
- INodeAdapter adapter = notifier.getAdapterFor(IStyleSheetAdapter.class);
- if (adapter == null)
- return null;
- if (!(adapter instanceof IStyleSheetAdapter))
- return null;
- IStyleSheetAdapter styleAdapter = (IStyleSheetAdapter) adapter;
- return styleAdapter.getModel();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/ElementNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/ElementNodeCleanupHandler.java
deleted file mode 100644
index f006784b63..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/ElementNodeCleanupHandler.java
+++ /dev/null
@@ -1,635 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.cleanup;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.text.edits.InsertEdit;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.css.core.adapters.IStyleDeclarationAdapter;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.format.CSSSourceFormatter;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLGenerator;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-// nakamori_TODO: check and remove CSS formatting
-
-public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
-
- /** Non-NLS strings */
- protected static final String START_TAG_OPEN = "<"; //$NON-NLS-1$
- protected static final String END_TAG_OPEN = "</"; //$NON-NLS-1$
- protected static final String TAG_CLOSE = ">"; //$NON-NLS-1$
- protected static final String EMPTY_TAG_CLOSE = "/>"; //$NON-NLS-1$
- protected static final String SINGLE_QUOTES = "''"; //$NON-NLS-1$
- protected static final String DOUBLE_QUOTES = "\"\""; //$NON-NLS-1$
- protected static final char SINGLE_QUOTE = '\''; //$NON-NLS-1$
- protected static final char DOUBLE_QUOTE = '\"'; //$NON-NLS-1$
-
- public Node cleanup(Node node) {
- XMLNode renamedNode = (XMLNode) cleanupChildren(node);
-
- // call quoteAttrValue() first so it will close any unclosed attr
- // quoteAttrValue() will return the new start tag if there is a structure change
- renamedNode = quoteAttrValue(renamedNode);
-
- // insert tag close if missing
- // if node is not comment tag
- // and not implicit tag
- if (!((XMLElement) renamedNode).isCommentTag() && (renamedNode.getStartStructuredDocumentRegion() != null)) {
- XMLModel structuredModel = renamedNode.getModel();
-
- // save start offset before insertTagClose()
- // or else renamedNode.getStartOffset() will be zero if renamedNode replaced by insertTagClose()
- int startTagStartOffset = renamedNode.getStartOffset();
-
- // for start tag
- IStructuredDocumentRegion startTagStructuredDocumentRegion = renamedNode.getStartStructuredDocumentRegion();
- insertTagClose(structuredModel, startTagStructuredDocumentRegion);
-
- // update renamedNode and startTagStructuredDocumentRegion after insertTagClose()
- renamedNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset);
- startTagStructuredDocumentRegion = renamedNode.getStartStructuredDocumentRegion();
-
- // for end tag
- IStructuredDocumentRegion endTagStructuredDocumentRegion = renamedNode.getEndStructuredDocumentRegion();
- if (endTagStructuredDocumentRegion != startTagStructuredDocumentRegion)
- insertTagClose(structuredModel, endTagStructuredDocumentRegion);
- }
-
- // call insertMissingTags() next, it will generate implicit tags if there are any
- // insertMissingTags() will return the new missing start tag if one is missing
- // applyTagNameCase() will return the renamed node.
- // The renamed/new node will be saved and returned to caller when all cleanup is done.
- renamedNode = insertMissingTags(renamedNode);
- renamedNode = insertRequiredAttrs(renamedNode);
- renamedNode = applyTagNameCase(renamedNode);
- applyAttrNameCase(renamedNode);
- cleanupCSSAttrValue(renamedNode);
-
- return renamedNode;
- }
-
- private boolean shouldIgnoreCase(XMLElement element) {
- // case option can be applied to no namespace tags
- return element.isGlobalTag();
- /*
- ModelQueryAdapter mqadapter = (ModelQueryAdapter) element.getAdapterFor(ModelQueryAdapter.class);
- ModelQuery mq = null;
- CMNode nodedecl = null;
- if (mqadapter != null)
- mq = mqadapter.getModelQuery();
- if (mq != null)
- nodedecl = mq.getCMNode(node);
- // if a Node isn't recognized as HTML or is and cares about case, do not alter it
- // if (nodedecl == null || (nodedecl instanceof HTMLCMNode && ((HTMLCMNode) nodedecl).shouldIgnoreCase()))
- if (! nodedecl.supports(HTMLCMProperties.SHOULD_IGNORE_CASE)) return false;
- return ((Boolean)cmnode.getProperty(HTMLCMProperties.SHOULD_IGNORE_CASE)).booleanValue();
- */
- }
-
- protected void applyAttrNameCase(XMLNode node) {
- XMLElement element = (XMLElement) node;
- if (element.isCommentTag())
- return; // do nothing
-
- int attrNameCase = CommonModelPreferenceNames.ASIS;
-
- if (shouldIgnoreCase(element))
- attrNameCase = getCleanupPreferences().getAttrNameCase();
-
- NamedNodeMap attributes = node.getAttributes();
- int attributesLength = attributes.getLength();
-
- for (int i = 0; i < attributesLength; i++) {
- XMLNode eachAttr = (XMLNode) attributes.item(i);
- String oldAttrName = eachAttr.getNodeName();
- String newAttrName = oldAttrName;
- // 254961 - all HTML tag names and attribute names should be in English
- // even for HTML files in other languages like Japanese or Turkish.
- // English locale should be used to convert between uppercase and lowercase
- // (otherwise "link" would be converted to "LÝNK" in Turkish, where '?' in "LÝNK"
- // is the "I Overdot Capital" in Turkish).
- if (attrNameCase == CommonModelPreferenceNames.LOWER)
- newAttrName = oldAttrName.toLowerCase(Locale.US);
- else if (attrNameCase == CommonModelPreferenceNames.UPPER)
- newAttrName = oldAttrName.toUpperCase(Locale.US);
-
- if (newAttrName.compareTo(oldAttrName) != 0) {
- int attrNameStartOffset = eachAttr.getStartOffset();
- int attrNameLength = oldAttrName.length();
-
- XMLModel structuredModel = node.getModel();
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- replaceSource(structuredModel, structuredDocument, attrNameStartOffset, attrNameLength, newAttrName);
- }
- }
- }
-
- protected XMLNode applyTagNameCase(XMLNode node) {
- XMLElement element = (XMLElement) node;
- if (element.isCommentTag())
- return node; // do nothing
-
- int tagNameCase = CommonModelPreferenceNames.ASIS;
-
- if (shouldIgnoreCase(element))
- tagNameCase = getCleanupPreferences().getTagNameCase();
-
- String oldTagName = node.getNodeName();
- String newTagName = oldTagName;
- XMLNode newNode = node;
-
- // 254961 - all HTML tag names and attribute names should be in English
- // even for HTML files in other languages like Japanese or Turkish.
- // English locale should be used to convert between uppercase and lowercase
- // (otherwise "link" would be converted to "LÝNK" in Turkish, where '?' in "LÝNK"
- // is the "I Overdot Capital" in Turkish).
- if (tagNameCase == CommonModelPreferenceNames.LOWER)
- newTagName = oldTagName.toLowerCase(Locale.US);
- else if (tagNameCase == CommonModelPreferenceNames.UPPER)
- newTagName = oldTagName.toUpperCase(Locale.US);
-
- XMLModel structuredModel = node.getModel();
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
-
- IStructuredDocumentRegion startTagStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
- if (startTagStructuredDocumentRegion != null) {
- ITextRegionList regions = startTagStructuredDocumentRegion.getRegions();
- if (regions != null && regions.size() > 0) {
- ITextRegion startTagNameRegion = regions.get(1);
- int startTagNameStartOffset = startTagStructuredDocumentRegion.getStartOffset(startTagNameRegion);
- int startTagNameLength = startTagStructuredDocumentRegion.getTextEndOffset(startTagNameRegion) - startTagNameStartOffset;
-
- replaceSource(structuredModel, structuredDocument, startTagNameStartOffset, startTagNameLength, newTagName);
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagNameStartOffset); // save new node
- }
- }
-
- IStructuredDocumentRegion endTagStructuredDocumentRegion = node.getEndStructuredDocumentRegion();
- if (endTagStructuredDocumentRegion != null) {
- ITextRegionList regions = endTagStructuredDocumentRegion.getRegions();
- if (regions != null && regions.size() > 0) {
- ITextRegion endTagNameRegion = regions.get(1);
- int endTagNameStartOffset = endTagStructuredDocumentRegion.getStartOffset(endTagNameRegion);
- int endTagNameLength = endTagStructuredDocumentRegion.getTextEndOffset(endTagNameRegion) - endTagNameStartOffset;
-
- if (startTagStructuredDocumentRegion != endTagStructuredDocumentRegion)
- replaceSource(structuredModel, structuredDocument, endTagNameStartOffset, endTagNameLength, newTagName);
- }
- }
-
- return newNode;
- }
-
- protected Node cleanupChildren(Node node) {
- Node parentNode = node;
-
- if (node != null) {
- Node childNode = node.getFirstChild();
- HTMLCleanupHandlerFactory factory = HTMLCleanupHandlerFactory.getInstance();
- while (childNode != null) {
- // cleanup this child node
- IStructuredCleanupHandler cleanupHandler = factory.createHandler(childNode, getCleanupPreferences());
- childNode = cleanupHandler.cleanup(childNode);
-
- // get new parent node
- parentNode = (XMLNode) childNode.getParentNode();
-
- // get next child node
- childNode = (XMLNode) childNode.getNextSibling();
- }
- }
-
- return parentNode;
- }
-
- /**
- */
- protected void cleanupCSSAttrValue(XMLNode node) {
- if (node == null || node.getNodeType() != Node.ELEMENT_NODE)
- return;
- XMLElement element = (XMLElement) node;
- if (!element.isGlobalTag())
- return;
-
- Attr attr = element.getAttributeNode("style"); //$NON-NLS-1$
- if (attr == null)
- return;
- String value = getCSSValue(attr);
- if (value == null)
- return;
- String oldValue = ((XMLNode) attr).getValueSource();
- if (oldValue != null && value.equals(oldValue))
- return;
- attr.setValue(value);
- }
-
- /**
- */
- private ICSSModel getCSSModel(Attr attr) {
- if (attr == null)
- return null;
- INodeNotifier notifier = (INodeNotifier) attr.getOwnerElement();
- if (notifier == null)
- return null;
- INodeAdapter adapter = notifier.getAdapterFor(IStyleDeclarationAdapter.class);
- if (adapter == null)
- return null;
- if (!(adapter instanceof IStyleDeclarationAdapter))
- return null;
- IStyleDeclarationAdapter styleAdapter = (IStyleDeclarationAdapter) adapter;
- return styleAdapter.getModel();
- }
-
- /**
- */
- private String getCSSValue(Attr attr) {
- ICSSModel model = getCSSModel(attr);
- if (model == null)
- return null;
- ICSSNode document = model.getDocument();
- if (document == null)
- return null;
- INodeNotifier notifier = (INodeNotifier) document;
- INodeAdapter adapter = notifier.getAdapterFor(CSSSourceFormatter.class);
- if (adapter == null)
- return null;
- CSSSourceFormatter formatter = (CSSSourceFormatter) adapter;
- StringBuffer buffer = formatter.cleanup(document);
- if (buffer == null)
- return null;
- return buffer.toString();
- }
-
- private boolean isEmptyElement(XMLElement element) {
- Document document = element.getOwnerDocument();
- if (document == null)
- // undefined tag, return default
- return false;
-
- ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
- if (modelQuery == null)
- // undefined tag, return default
- return false;
-
- CMElementDeclaration decl = modelQuery.getCMElementDeclaration(element);
- if (decl == null)
- // undefined tag, return default
- return false;
-
- return (decl.getContentType() == CMElementDeclaration.EMPTY);
- }
-
- protected XMLNode insertEndTag(XMLNode node) {
- XMLElement element = (XMLElement) node;
-
- int startTagStartOffset = node.getStartOffset();
- XMLModel structuredModel = node.getModel();
- XMLNode newNode = null;
-
- if (element.isCommentTag()) {
- // do nothing
- }
- else if (isEmptyElement(element)) {
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
- ITextRegionList regions = startStructuredDocumentRegion.getRegions();
- ITextRegion lastRegion = regions.get(regions.size() - 1);
- replaceSource(structuredModel, structuredDocument, startStructuredDocumentRegion.getStartOffset(lastRegion), lastRegion.getLength(), EMPTY_TAG_CLOSE);
-
- if (regions.size() > 1) {
- ITextRegion regionBeforeTagClose = regions.get(regions.size() - 1 - 1);
-
- // insert a space separator before tag close if the previous region does not have extra spaces
- if (regionBeforeTagClose.getTextLength() == regionBeforeTagClose.getLength())
- replaceSource(structuredModel, structuredDocument, startStructuredDocumentRegion.getStartOffset(lastRegion), 0, " "); //$NON-NLS-1$
- }
- }
- else {
- String tagName = node.getNodeName();
- String endTag = END_TAG_OPEN.concat(tagName).concat(TAG_CLOSE);
-
- XMLNode lastChild = (XMLNode) node.getLastChild();
- int endTagStartOffset = 0;
- if (lastChild != null)
- // if this node has children, insert the end tag after the last child
- endTagStartOffset = lastChild.getEndOffset();
- else
- // if this node does not has children, insert the end tag after the start tag
- endTagStartOffset = node.getEndOffset();
-
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- replaceSource(structuredModel, structuredDocument, endTagStartOffset, 0, endTag);
- }
-
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save new node
-
- return newNode;
- }
-
- protected XMLNode insertMissingTags(XMLNode node) {
- boolean insertMissingTags = getCleanupPreferences().getInsertMissingTags();
- XMLNode newNode = node;
-
- if (insertMissingTags) {
- IStructuredDocumentRegion startTagStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
- if (startTagStructuredDocumentRegion == null) {
- // implicit start tag; generate tag for it
- newNode = insertStartTag(node);
- startTagStructuredDocumentRegion = newNode.getStartStructuredDocumentRegion();
- }
-
- IStructuredDocumentRegion endTagStructuredDocumentRegion = newNode.getEndStructuredDocumentRegion();
-
- ITextRegionList regionList = startTagStructuredDocumentRegion.getRegions();
- if (startTagStructuredDocumentRegion != null && regionList != null && regionList.get(regionList.size() - 1).getType() == XMLRegionContext.XML_EMPTY_TAG_CLOSE) {
-
- }
- else {
- if (startTagStructuredDocumentRegion == null) {
- // start tag missing
- if (isStartTagRequired(newNode))
- newNode = insertStartTag(newNode);
- }
- else if (endTagStructuredDocumentRegion == null) {
- // end tag missing
- if (isEndTagRequired(newNode))
- newNode = insertEndTag(newNode);
- }
- }
- }
-
- return newNode;
- }
-
- protected XMLNode insertStartTag(XMLNode node) {
- XMLElement element = (XMLElement) node;
- if (element.isCommentTag())
- return node; // do nothing
-
- XMLNode newNode = null;
-
- String tagName = node.getNodeName();
- String startTag = START_TAG_OPEN.concat(tagName).concat(TAG_CLOSE);
- int startTagStartOffset = node.getStartOffset();
-
- XMLModel structuredModel = node.getModel();
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- replaceSource(structuredModel, structuredDocument, startTagStartOffset, 0, startTag);
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save new node
-
- return newNode;
- }
-
- protected void insertTagClose(XMLModel structuredModel, IStructuredDocumentRegion flatNode) {
- if ((flatNode != null) && (flatNode.getRegions() != null)) {
- ITextRegionList regionList = flatNode.getRegions();
- ITextRegion lastRegion = regionList.get(regionList.size() - 1);
- if (lastRegion != null) {
- String regionType = lastRegion.getType();
- if ((regionType != XMLRegionContext.XML_EMPTY_TAG_CLOSE) && (regionType != XMLRegionContext.XML_TAG_CLOSE)) {
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
-
- // insert ">" after lastRegion of flatNode
- // as in "<a</a>" if flatNode is for start tag, or in "<a></a" if flatNode is for end tag
- replaceSource(structuredModel, structuredDocument, flatNode.getTextEndOffset(lastRegion), 0, ">"); //$NON-NLS-1$
- }
- }
- }
- }
-
- protected boolean isEndTagRequired(XMLNode node) {
- if (node == null)
- return false;
- return node.isContainer();
- }
-
- /**
- * The end tags of HTML EMPTY content type, such as IMG,
- * and HTML undefined tags are parsed separately from the start tags.
- * So inserting the missing start tag is useless and even harmful.
- */
- protected boolean isStartTagRequired(XMLNode node) {
- if (node == null)
- return false;
- return node.isContainer();
- }
-
- protected boolean isXMLType(XMLModel structuredModel) {
- boolean result = false;
-
- if (structuredModel != null && structuredModel != null) {
- XMLDocument document = structuredModel.getDocument();
-
- if (document != null)
- result = document.isXMLType();
- }
-
- return result;
- }
-
- protected XMLNode quoteAttrValue(XMLNode node) {
- XMLElement element = (XMLElement) node;
- if (element.isCommentTag())
- return node; // do nothing
-
- boolean quoteAttrValues = getCleanupPreferences().getQuoteAttrValues();
- XMLNode newNode = node;
-
- if (quoteAttrValues) {
- NamedNodeMap attributes = newNode.getAttributes();
- int attributesLength = attributes.getLength();
- XMLGenerator generator = node.getModel().getGenerator();
-
- for (int i = 0; i < attributesLength; i++) {
- attributes = newNode.getAttributes();
- attributesLength = attributes.getLength();
- XMLAttr eachAttr = (XMLAttr) attributes.item(i);
- //ITextRegion oldAttrValueRegion = eachAttr.getValueRegion();
- String oldAttrValue = eachAttr.getValueRegionText();
- if (oldAttrValue == null) {
- XMLModel structuredModel = node.getModel();
- if (isXMLType(structuredModel)) {
- // TODO: Kit, please check. Is there any way to not rely on getting regions from attributes?
- String newAttrValue = "=\"" + eachAttr.getNameRegionText() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
-
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- replaceSource(structuredModel, structuredDocument, eachAttr.getNameRegionEndOffset(), 0, newAttrValue);
- newNode = (XMLNode) structuredModel.getIndexedRegion(node.getStartOffset()); // save new node
- }
- }
- else {
-
- char quote = StringUtils.isQuoted(oldAttrValue) ? oldAttrValue.charAt(0) : DOUBLE_QUOTE;
- String newAttrValue = generator.generateAttrValue(eachAttr, quote);
-
- // There is a problem in StructuredDocumentRegionUtil.getAttrValue(ITextRegion) when the region is instanceof ContextRegion.
- // Workaround for now...
- if (oldAttrValue.length() == 1) {
- char firstChar = oldAttrValue.charAt(0);
- if (firstChar == SINGLE_QUOTE)
- newAttrValue = SINGLE_QUOTES;
- else if (firstChar == DOUBLE_QUOTE)
- newAttrValue = DOUBLE_QUOTES;
- }
-
- if (newAttrValue != null) {
- if (newAttrValue.compareTo(oldAttrValue) != 0) {
- int attrValueStartOffset = eachAttr.getValueRegionStartOffset();
- int attrValueLength = oldAttrValue.length();
- int startTagStartOffset = node.getStartOffset();
-
- XMLModel structuredModel = node.getModel();
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- replaceSource(structuredModel, structuredDocument, attrValueStartOffset, attrValueLength, newAttrValue);
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save new node
- }
- }
- }
- }
- }
-
- return newNode;
- }
-
- private XMLNode insertRequiredAttrs(XMLNode node) {
- boolean insertRequiredAttrs = getCleanupPreferences().getInsertRequiredAttrs();
- XMLNode newNode = node;
-
- if (insertRequiredAttrs) {
- List requiredAttrs = getRequiredAttrs(newNode);
- if (requiredAttrs.size() > 0) {
- NamedNodeMap currentAttrs = node.getAttributes();
- List insertAttrs = new ArrayList();
- if (currentAttrs.getLength() == 0)
- insertAttrs.addAll(requiredAttrs);
- else {
- for (int i = 0; i < requiredAttrs.size(); i++) {
- String requiredAttrName = ((CMAttributeDeclaration) requiredAttrs.get(i)).getAttrName();
- boolean found = false;
- for (int j = 0; j < currentAttrs.getLength(); j++) {
- String currentAttrName = currentAttrs.item(j).getNodeName();
- if (requiredAttrName.compareToIgnoreCase(currentAttrName) == 0) {
- found = true;
- break;
- }
- }
- if (!found)
- insertAttrs.add(requiredAttrs.get(i));
- }
- }
- if (insertAttrs.size() > 0) {
- IStructuredDocumentRegion startStructuredDocumentRegion = newNode.getStartStructuredDocumentRegion();
- int index = startStructuredDocumentRegion.getEndOffset();
- ITextRegion lastRegion = startStructuredDocumentRegion.getLastRegion();
- if (lastRegion.getType() == XMLRegionContext.XML_TAG_CLOSE) {
- index--;
- lastRegion = startStructuredDocumentRegion.getRegionAtCharacterOffset(index - 1);
- }
- else if (lastRegion.getType() == XMLRegionContext.XML_EMPTY_TAG_CLOSE) {
- index = index - 2;
- lastRegion = startStructuredDocumentRegion.getRegionAtCharacterOffset(index - 1);
- }
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- try {
- for (int i = insertAttrs.size() - 1; i >= 0; i--) {
- CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) insertAttrs.get(i);
- String requiredAttributeName = attrDecl.getAttrName();
- String defaultValue = attrDecl.getDefaultValue();
- if (defaultValue == null)
- defaultValue = ""; //$NON-NLS-1$
- String nameAndDefaultValue = " "; //$NON-NLS-1$
- if (i == 0 && lastRegion.getLength() > lastRegion.getTextLength())
- nameAndDefaultValue = ""; //$NON-NLS-1$
- nameAndDefaultValue += requiredAttributeName + "=\"" + defaultValue + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- multiTextEdit.addChild(new InsertEdit(index, nameAndDefaultValue));
- // BUG3381: MultiTextEdit applies all child TextEdit's basing on offsets
- // in the document before the first TextEdit, not after each
- // child TextEdit. Therefore, do not need to advance the index.
- //index += nameAndDefaultValue.length();
- }
- multiTextEdit.apply(newNode.getStructuredDocument());
- }
- catch (BadLocationException e) {
- throw new SourceEditingRuntimeException(e);
- }
- }
- }
- }
-
- return newNode;
- }
-
-
- protected ModelQuery getModelQuery(Node node) {
- if (node.getNodeType() == Node.DOCUMENT_NODE) {
- return ModelQueryUtil.getModelQuery((Document) node);
- }
- else {
- return ModelQueryUtil.getModelQuery(node.getOwnerDocument());
- }
- }
-
- protected List getRequiredAttrs(Node node) {
- List result = new ArrayList();
-
- ModelQuery modelQuery = getModelQuery(node);
- if (modelQuery != null) {
- CMElementDeclaration elementDecl = modelQuery.getCMElementDeclaration((Element) node);
- if (elementDecl != null) {
- CMNamedNodeMap attrMap = elementDecl.getAttributes();
- Iterator it = attrMap.iterator();
- CMAttributeDeclaration attr = null;
- while (it.hasNext()) {
- attr = (CMAttributeDeclaration) it.next();
- if (attr.getUsage() == CMAttributeDeclaration.REQUIRED) {
- result.add(attr);
- }
- }
- }
- }
-
- return result;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupHandlerFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupHandlerFactory.java
deleted file mode 100644
index 0935e7dd96..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupHandlerFactory.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.cleanup;
-
-
-
-import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupPreferences;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.jsp.model.parser.temp.XMLJSPRegionContexts;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-import org.w3c.dom.Node;
-
-// nakamori_TODO: check and remove CSS formatting
-
-class HTMLCleanupHandlerFactory {
-
- private static HTMLCleanupHandlerFactory fInstance = null;
-
- static synchronized HTMLCleanupHandlerFactory getInstance() {
- if (fInstance == null) {
- fInstance = new HTMLCleanupHandlerFactory();
- }
- return fInstance;
- }
-
- private HTMLCleanupHandlerFactory() {
- super();
- }
-
- IStructuredCleanupHandler createHandler(Node node, IStructuredCleanupPreferences cleanupPreferences) {
- short nodeType = node.getNodeType();
- IStructuredCleanupHandler handler = null;
- switch (nodeType) {
- case Node.ELEMENT_NODE :
- {
- if (isJSPTag(node))
- handler = new JSPElementNodeCleanupHandler();
- else
- handler = new ElementNodeCleanupHandler();
- break;
- }
- case Node.TEXT_NODE :
- {
- if (isParentStyleTag(node))
- handler = new CSSTextNodeCleanupHandler();
- else
- handler = new NodeCleanupHandler();
- break;
- }
- default :
- {
- handler = new NodeCleanupHandler();
- }
- }
-
- handler.setCleanupPreferences(cleanupPreferences);
-
- return handler;
- }
-
- private boolean isJSPTag(Node node) {
- boolean result = false;
-
- if (node instanceof XMLNode) {
- IStructuredDocumentRegion flatNode = ((XMLNode) node).getFirstStructuredDocumentRegion();
- // in some cases, the nodes exists, but hasn't been associated with
- // a flatnode yet (the screen updates can be initiated on a different thread,
- // so the request for a flatnode can come in before the node is fully formed.
- // if the flatnode is null, we'll just allow the defaults to apply.
- // (html adapter in this case).
- if (flatNode != null) {
- String flatNodeType = flatNode.getType();
- if ((flatNodeType == XMLJSPRegionContexts.JSP_CONTENT) || (flatNodeType == XMLJSPRegionContexts.JSP_EXPRESSION_OPEN) || (flatNodeType == XMLJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (flatNodeType == XMLJSPRegionContexts.JSP_DECLARATION_OPEN) || (flatNodeType == XMLJSPRegionContexts.JSP_DIRECTIVE_CLOSE) || (flatNodeType == XMLJSPRegionContexts.JSP_DIRECTIVE_NAME) || (flatNodeType == XMLJSPRegionContexts.JSP_DIRECTIVE_OPEN) || (flatNodeType == XMLJSPRegionContexts.JSP_CLOSE)) {
- result = true;
- }
- }
- }
-
- return result;
- }
-
- private boolean isParentStyleTag(Node node) {
- if (node == null)
- return false;
- if (node.getNodeType() != Node.TEXT_NODE)
- return false;
- if (!(node instanceof XMLNode))
- return false;
- IStructuredDocumentRegion flatNode = ((XMLNode) node).getFirstStructuredDocumentRegion();
- if (flatNode == null)
- return false;
- if (flatNode.getType() != XMLRegionContext.BLOCK_TEXT)
- return false;
-
- // check if the parent is STYLE element
- Node parent = node.getParentNode();
- if (parent == null)
- return false;
- if (parent.getNodeType() != Node.ELEMENT_NODE)
- return false;
- String name = parent.getNodeName();
- if (name == null)
- return false;
- if (!name.equalsIgnoreCase("STYLE"))//$NON-NLS-1$
- return false;
- return true;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupProcessorImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupProcessorImpl.java
deleted file mode 100644
index a6c4132697..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupProcessorImpl.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.cleanup;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.html.core.format.HTMLFormatProcessorImpl;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.format.IStructuredFormatProcessor;
-import org.eclipse.wst.xml.core.cleanup.CleanupProcessorXML;
-import org.w3c.dom.Node;
-
-public class HTMLCleanupProcessorImpl extends CleanupProcessorXML {
-
- /**
- * @see com.ibm.sed.partitionCleanup.AbstractCleanupProcessorImpl#getContentType()
- */
- protected String getContentType() {
- return IContentTypeIdentifier.ContentTypeID_HTML;
- }
-
- /**
- * @see com.ibm.sed.partitionCleanup.AbstractCleanupProcessorImpl#getCleanupHandler(com.ibm.sed.model.xml.XMLNode)
- */
- protected IStructuredCleanupHandler getCleanupHandler(Node node) {
- return HTMLCleanupHandlerFactory.getInstance().createHandler(node, getCleanupPreferences());
- }
-
- protected IStructuredFormatProcessor getFormatProcessor() {
- return new HTMLFormatProcessorImpl();
- }
-
- protected Preferences getModelPreferences() {
- return HTMLCorePlugin.getDefault().getPluginPreferences();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/JSPElementNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/JSPElementNodeCleanupHandler.java
deleted file mode 100644
index c4143ad35f..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/JSPElementNodeCleanupHandler.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.core.cleanup;
-
-
-
-import org.w3c.dom.Node;
-
-public class JSPElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
-
- public Node cleanup(Node node) {
- return node;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/NodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/NodeCleanupHandler.java
deleted file mode 100644
index 1e9c7d265e..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/NodeCleanupHandler.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.core.cleanup;
-
-
-
-import org.w3c.dom.Node;
-
-public class NodeCleanupHandler extends AbstractNodeCleanupHandler {
-
- public Node cleanup(Node node) {
- return node;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/commentelement/handlers/CommentElementHandlerForSSI.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/commentelement/handlers/CommentElementHandlerForSSI.java
deleted file mode 100644
index f24b10800f..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/commentelement/handlers/CommentElementHandlerForSSI.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.commentelement.handlers;
-
-
-
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.commentelement.CommentElementHandler;
-import org.eclipse.wst.xml.core.commentelement.util.CommentElementFactory;
-import org.eclipse.wst.xml.core.commentelement.util.TagScanner;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLGenerator;
-import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- */
-public class CommentElementHandlerForSSI implements CommentElementHandler {
-
- /**
- * @see com.ibm.sed.model.commentelement.CommentElementHandler#createElement(Document, String, boolean)
- */
- public Element createElement(Document document, String data, boolean isJSPTag) {
- ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
- if (modelQuery == null) {
- return null;
- }
- CMDocument cm = modelQuery.getCorrespondingCMDocument(document);
- if (cm == null) {
- return null;
- }
- CMNamedNodeMap map = cm.getElements();
- if (map == null) {
- return null;
- }
-
- TagScanner scanner = new TagScanner(data, 1);
- String name = scanner.nextName();
- if (name == null) {
- return null;
- }
- StringBuffer buffer = new StringBuffer(name.length() + 4);
- buffer.append(SSI_PREFIX);
- buffer.append(':');
- buffer.append(name);
- String tagName = buffer.toString();
- // check if valid (defined) SSI tag or not
- if (map.getNamedItem(tagName) == null) {
- return null;
- }
-
- CommentElementFactory factory = new CommentElementFactory(document, isJSPTag, this);
- Element element = factory.create(tagName, CommentElementFactory.IS_START);
-
- // set attributes
- String attrName = scanner.nextName();
- while (attrName != null) {
- String attrValue = scanner.nextValue();
- Attr attr = document.createAttribute(attrName);
- if (attr != null) {
- if (attrValue != null)
- attr.setValue(attrValue);
- element.setAttributeNode(attr);
- }
- attrName = scanner.nextName();
- }
- return element;
- }
-
- /**
- * @see com.ibm.sed.model.commentelement.CommentElementHandler#generateStartTagContent(XMLElement)
- */
- public String generateStartTagContent(XMLElement element) {
- XMLGenerator generator = element.getModel().getGenerator();
- StringBuffer buffer = new StringBuffer();
-
- buffer.append('#');
- buffer.append(element.getLocalName());
-
- NamedNodeMap attributes = element.getAttributes();
- int length = attributes.getLength();
- for (int i = 0; i < length; i++) {
- Attr attr = (Attr) attributes.item(i);
- if (attr == null) {
- continue;
- }
- buffer.append(' ');
- String attrName = generator.generateAttrName(attr);
- if (attrName != null) {
- buffer.append(attrName);
- }
- String attrValue = generator.generateAttrValue(attr);
- if (attrValue != null) {
- // attr name only for HTML boolean and JSP
- buffer.append('=');
- buffer.append(attrValue);
- }
- }
-
- return buffer.toString();
- }
-
- /**
- * @see com.ibm.sed.model.commentelement.CommentElementHandler#generateEndTagContent(XMLElement)
- */
- public String generateEndTagContent(XMLElement element) {
- return null; // always empty
- }
-
- public boolean isEmpty() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.sed.model.commentelement.CommentElementHandler#isCommentElement(com.ibm.sed.model.xml.XMLElement)
- */
- public boolean isCommentElement(XMLElement element) {
- if (element == null) {
- return false;
- }
- Document document = element.getOwnerDocument();
- ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
- if (modelQuery == null) {
- return false;
- }
- CMDocument cm = modelQuery.getCorrespondingCMDocument(document);
- if (cm == null) {
- return false;
- }
- CMNamedNodeMap map = cm.getElements();
- if (map == null) {
- return false;
- }
- String prefix = element.getPrefix();
- if (prefix == null || !prefix.equals(SSI_PREFIX)) {
- return false;
- }
- String tagName = element.getTagName();
- if (tagName.length() <= 4) {
- return false;
- }
- if (map.getNamedItem(tagName) == null) {
- return false;
- }
- else {
- return true;
- }
- }
-
- private static final String SSI_PREFIX = "ssi";//$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/AttributeCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/AttributeCollection.java
deleted file mode 100644
index 435e8ccc82..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/AttributeCollection.java
+++ /dev/null
@@ -1,1295 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.html.core.HTML40Namespace;
-
-/**
- * Factory for attribute declarations.
- */
-final class AttributeCollection extends CMNamedNodeMapImpl implements HTML40Namespace {
-
- /** bodycolors. */
- private static final String[] BODYCOLORS = {ATTR_NAME_BGCOLOR, ATTR_NAME_TEXT, ATTR_NAME_LINK, ATTR_NAME_VLINK, HTML40Namespace.ATTR_NAME_ALINK};
- /** coreattrs. */
- private static final String[] CORE = {ATTR_NAME_ID, ATTR_NAME_CLASS, ATTR_NAME_STYLE, ATTR_NAME_TITLE};
- /** events. */
- private static final String[] EVENTS = {ATTR_NAME_ONCLICK, ATTR_NAME_ONDBLCLICK, ATTR_NAME_ONMOUSEDOWN, ATTR_NAME_ONMOUSEUP, ATTR_NAME_ONMOUSEOVER, ATTR_NAME_ONMOUSEMOVE, ATTR_NAME_ONMOUSEOUT, ATTR_NAME_ONKEYPRESS, ATTR_NAME_ONKEYDOWN, ATTR_NAME_ONKEYUP, ATTR_NAME_ONHELP};
- /** i18n. lang, dir */
- private static final String[] I18N = {ATTR_NAME_LANG, ATTR_NAME_DIR};
- /** cellhaligh. */
- private static final String[] CELLHALIGN = {ATTR_NAME_CHAR, ATTR_NAME_CHAROFF};
-
- /**
- * constructor.
- */
- public AttributeCollection() {
- super();
- }
-
- /**
- * Create an attribute declaration.
- * @return com.ibm.sed.contentmodel.html.HTMLAttrDeclImpl
- * @param attrName java.lang.String
- */
- private HTMLAttrDeclImpl create(String attrName) {
- HTMLAttrDeclImpl attr = null;
- HTMLCMDataTypeImpl atype = null;
-
- if (attrName.equalsIgnoreCase(ATTR_NAME_ABBR)) {
- // (abbr %Text; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ABBR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ACCEPT)) {
- // (accept %ContentTypes; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CONTENT_TYPE);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ACCEPT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ACCEPT_CHARSET)) {
- // (accept-charset %Charsets;; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CHARSETS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ACCEPT_CHARSET, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ACTION)) {
- // (action %URI #REQUIRED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ACTION, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ARCHIVE)) {
- // (archive CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ARCHIVE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ACCESSKEY)) {
- // (accesskey %Character; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CHARACTER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ACCESSKEY, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ALINK)) {
- // (alink %Color; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COLOR);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ALINK, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ALT)) {
- // (alt %Text; #REQUIRED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ALT, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_AUTOSTART)) {
- // (autostart (true|false) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_AUTOSTART, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_AUTOPLAY)) {
- // (autoplay (true|false) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_AUTOPLAY, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_AUTOSIZE)) {
- // (autosize (true|false) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_AUTOSIZE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_AXIS)) {
- // (axis CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_AXIS, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BACKGROUND)) {
- // (background %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BACKGROUND, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BEHAVIOR)) {
- // (behavior (scroll|slide|alternate) scroll)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_SCROLL, ATTR_VALUE_SLIDE, ATTR_VALUE_ALTERNATE};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_SCROLL);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BEHAVIOR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BGCOLOR)) {
- // (bgcolor %Color; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COLOR);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BGCOLOR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BORDER)) {
- // (border %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BORDER, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CELLSPACING)) {
- // (cellspacing %Length; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LENGTH);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CELLSPACING, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CELLPADDING)) {
- // (cellpadding %Length; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LENGTH);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CELLPADDING, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CGI)) {
- // (cgi %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CGI, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CHAR)) {
- // (char %Character; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CHARACTER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CHAR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CHAROFF)) {
- // (charoff %Length; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LENGTH);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CHAROFF, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CHARSET)) {
- // (charset %Charset; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CHARSET);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CHARSET, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CITE)) {
- // (cite %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CITE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CLASS)) {
- // (class CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CLASS, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CLASSID)) {
- // (classid %URI #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CLASSID, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CMD)) {
- // (cmd CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CMD, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CHECKED)) {
- // (checked (checked) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_CHECKED};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CHECKED, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CLEAR)) {
- // (clear (left | all | right | none) none)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_LEFT, ATTR_VALUE_ALL, ATTR_VALUE_RIGHT, ATTR_VALUE_NONE};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_NONE);
-
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CLEAR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CODE)) {
- // (code CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CODE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CODEBASE)) {
- // (codebase %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CODEBASE, atype, CMAttributeDeclaration.OPTIONAL);