Skip to main content

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

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/encoding/JSPDocumentLoader.java24
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterFactory.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java20
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMDocumentForJSP.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java16
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java12
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java10
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelhandler/JSPModelLoader.java24
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryCMProvider.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/ModelQueryAdapterFactoryForJSP.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java20
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java42
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java54
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/correction/CorrectionProcessorJSP.java12
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/StructuredTextEditorJSP.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java10
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPJavaSelectionProvider.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesAction.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/StructuredTextFoldingProviderJSP.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJspTranslation.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/registry/AdapterFactoryProviderForJSP.java16
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHover.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPTagInfoHoverProcessor.java8
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/format/FormatProcessorCSS.java4
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CleanupProcessorCSS.java4
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSImportRuleImpl.java4
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelImpl.java10
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/CSSEmbededStyleNotifyAdapter.java6
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSFormatUtil.java12
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/util/CSSLinkConverter.java6
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSContentAssistProcessor.java18
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForHTMLTag.java6
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSTextPropertyDescriptor.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/commentelement/handlers/CommentElementHandlerForSSI.java16
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/DocumentStyleImpl.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/ElementStyleImpl.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLConverter.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapter.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapterFactory.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java18
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/MetaDataAdapter.java16
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/UnknownTagAdapter.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLDocumentLoader.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLModelLoader.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/EmbeddedCSSFormatter.java12
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLElementFormatter.java14
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java48
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractCSSModelAdapter.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractStyleSheetAdapter.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/HTMLDocumentAdapter.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/LinkElementAdapter.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAttrAdapter.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleElementAdapter.java12
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/URLModelProvider.java12
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/AbstractNodeCleanupHandler.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/CSSTextNodeCleanupHandler.java12
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java110
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java12
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/FMUtil.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java14
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java14
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java22
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/validation/HTMLValidator.java22
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java18
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java8
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java4
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/registry/AdapterFactoryProviderForHTML.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/XMLCharEntity.java (renamed from bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLCharEntity.java)2
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementAdapter.java14
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementHandler.java8
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/BasicCommentElementHandler.java22
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementConfiguration.java12
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementRegistry.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/util/CommentElementFactory.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMAttr.java (renamed from bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLAttr.java)2
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMDocument.java (renamed from bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLDocument.java)2
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMDocumentType.java (renamed from bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLDocumentType.java)2
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMElement.java (renamed from bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLElement.java)2
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMModel.java (renamed from bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLModel.java)7
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMNode.java (renamed from bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLNode.java)4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMText.java (renamed from bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLText.java)2
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/ISourceGenerator.java (renamed from bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLGenerator.java)2
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/CommentNodeFormatter.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/DocumentNodeFormatter.java14
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java36
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java82
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/TextNodeFormatter.java12
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java6
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java94
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java6
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java16
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeAdapterImpl.java16
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java18
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ModelParserAdapter.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeContainer.java6
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeImpl.java22
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/RangeImpl.java14
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java20
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionChecker.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TagAdapter.java6
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java12
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java24
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelImpl.java33
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifier.java (renamed from bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLModelNotifier.java)2
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifierImpl.java21
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelParser.java12
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelUpdater.java20
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryAdapterFactoryForXML.java6
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryUtil.java6
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/propagate/PropagatingAdapterImpl.java16
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/util/DebugDocument.java6
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelhandler/XMLModelLoader.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java14
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java6
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/DOMObserver.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java12
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditElementAction.java12
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java118
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationPresenter.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationProvider.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/ContextInfoModelUtil.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistProcessor.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java28
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentModelGenerator.java6
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java6
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/extensions/XMLSourceEditingTextTools.java22
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/StructuredAutoEditStrategyXML.java16
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeContentProvider.java6
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySourceAdapter.java16
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/openon/DefaultOpenOnXML.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidator.java52
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java16
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForEmbeddedXML.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/XMLTagInfoHoverProcessor.java20
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java4
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java10
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java10
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateAttributeAndRequired.java8
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateElementAction.java8
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DeleteAction.java6
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/MoveAction.java16
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/SetBaseTypeAction.java8
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AbstractCommand.java8
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/BaseDragNodesCommand.java8
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/DragNodesCommand.java4
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/LinkedGraphViewer.java4
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDGraphUtil.java4
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSection.java4
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/XSDSectionLabelProvider.java4
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/SchemaPrefixChangeHandler.java12
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/XSDDOMHelper.java8
182 files changed, 1175 insertions, 1176 deletions
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/encoding/JSPDocumentLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/encoding/JSPDocumentLoader.java
index 4212c1fd70..13a98a7a71 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/encoding/JSPDocumentLoader.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/encoding/JSPDocumentLoader.java
@@ -47,8 +47,8 @@ import org.eclipse.wst.sse.core.parser.RegionParser;
import org.eclipse.wst.sse.core.parser.TagMarker;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.ui.util.Assert;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
import org.w3c.dom.Document;
@@ -191,7 +191,7 @@ public class JSPDocumentLoader extends AbstractDocumentLoader {
}
private EmbeddedTypeHandler getEmbeddedType(IStructuredModel model) {
- Document doc = ((XMLModel) model).getDocument();
+ Document doc = ((DOMModel) model).getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) ((INodeNotifier) doc).getAdapterFor(PageDirectiveAdapter.class);
EmbeddedTypeHandler embeddedHandler = pageDirectiveAdapter.getEmbeddedType();
return embeddedHandler;
@@ -314,9 +314,9 @@ public class JSPDocumentLoader extends AbstractDocumentLoader {
// set
// yet,
// and all factories must have been set up also.
- XMLModel domModel = (XMLModel) model;
+ DOMModel domModel = (DOMModel) model;
IStructuredDocument structuredDocument = model.getStructuredDocument();
- XMLDocument document = domModel.getDocument();
+ DOMDocument document = domModel.getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
// ==> // PropagatingAdapter propagatingAdapter = (PropagatingAdapter)
// ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
@@ -384,8 +384,8 @@ public class JSPDocumentLoader extends AbstractDocumentLoader {
// set
// yet,
// and all factories must have been set up also.
- XMLModel domModel = (XMLModel) model;
- XMLDocument document = domModel.getDocument();
+ DOMModel domModel = (DOMModel) model;
+ DOMDocument document = domModel.getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
pageDirectiveAdapter.setEmbeddedType(embeddedContentType);
embeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
@@ -443,7 +443,7 @@ public class JSPDocumentLoader extends AbstractDocumentLoader {
}
protected void preLoadAdapt(IStructuredModel structuredModel) {
- XMLModel domModel = (XMLModel) structuredModel;
+ DOMModel domModel = (DOMModel) structuredModel;
//
// document must have already been set for this to
// work.
@@ -480,9 +480,9 @@ public class JSPDocumentLoader extends AbstractDocumentLoader {
// set
// yet,
// and all factories must have been set up also.
- XMLModel domModel = (XMLModel) model;
+ DOMModel domModel = (DOMModel) model;
IStructuredDocument structuredDocument = model.getStructuredDocument();
- XMLDocument document = domModel.getDocument();
+ DOMDocument document = domModel.getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getExistingAdapter(PageDirectiveAdapter.class);
// ==> // PropagatingAdapter propagatingAdapter = (PropagatingAdapter)
// ((INodeNotifier)
@@ -543,8 +543,8 @@ public class JSPDocumentLoader extends AbstractDocumentLoader {
}
private void setLanguageInPageDirective(IStructuredModel newModel) throws IOException {
- if (newModel instanceof XMLModel) {
- XMLDocument document = ((XMLModel) newModel).getDocument();
+ if (newModel instanceof DOMModel) {
+ DOMDocument document = ((DOMModel) newModel).getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
String language = getLanguage(newModel);
pageDirectiveAdapter.setLanguage(language);
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterFactory.java
index 050d48c558..3eb9ea90b0 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterFactory.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterFactory.java
@@ -17,7 +17,7 @@ import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.ui.contentproperties.ContentSettingsChangeSubject;
import org.eclipse.wst.sse.ui.util.Assert;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Node;
/**
@@ -52,8 +52,8 @@ public class PageDirectiveAdapterFactory extends AbstractAdapterFactory implemen
protected INodeAdapter createAdapter(INodeNotifier target) {
PageDirectiveAdapter result = null;
- if (target instanceof XMLNode) {
- XMLNode node = (XMLNode) target;
+ if (target instanceof DOMNode) {
+ DOMNode node = (DOMNode) target;
if (node.getNodeType() == Node.DOCUMENT_NODE) {
result = getAdapterInstance(target);
ContentSettingsChangeSubject.getSubject().addListener(result);
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java
index 55bf775609..da2f5e96aa 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java
@@ -36,7 +36,7 @@ import org.eclipse.wst.sse.core.modelhandler.EmbeddedTypeHandler;
import org.eclipse.wst.sse.core.text.IStructuredPartitioning;
import org.eclipse.wst.sse.core.util.Debug;
import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
/**
* This class has the responsibility to provide
@@ -64,8 +64,8 @@ public class PageDirectiveAdapterImpl implements PageDirectiveAdapter {
notifierAtCreation = target;
// we need to remember our instance of model,
// in case we need to "signal" a re-init needed.
- if (target instanceof XMLNode) {
- XMLNode node = (XMLNode) target;
+ if (target instanceof DOMNode) {
+ DOMNode node = (DOMNode) target;
model = node.getModel();
}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java
index 8df4e48d4c..0e3dc8694d 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java
@@ -14,7 +14,7 @@ import org.eclipse.wst.sse.core.IAdapterFactory;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.internal.PropagatingAdapterFactory;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.eclipse.wst.xml.core.internal.propagate.PropagatingAdapterFactoryImpl;
import org.w3c.dom.Node;
@@ -38,8 +38,8 @@ public class PageDirectiveWatcherFactory extends PropagatingAdapterFactoryImpl i
protected INodeAdapter createAdapter(INodeNotifier target) {
PageDirectiveWatcher result = null;
- if (target instanceof XMLElement) {
- XMLElement xmlElement = (XMLElement) target;
+ if (target instanceof DOMElement) {
+ DOMElement xmlElement = (DOMElement) target;
if (xmlElement.getNodeType() == Node.ELEMENT_NODE) {
// if (xmlElement.getNodeName() == JSP12Namespace.ElementName.DIRECTIVE_PAGE) { // not sure why identity to JSP11Namespace.ElementName.DIRECTIVE_PAGE doesn't work
String nodeName = xmlElement.getNodeName();
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java
index bb85d5c112..39f4721334 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java
@@ -13,9 +13,9 @@ package org.eclipse.jst.jsp.core.internal.document;
import org.eclipse.jst.jsp.core.PageDirectiveAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.document.AttrImpl;
@@ -28,24 +28,24 @@ import org.eclipse.wst.xml.core.internal.document.AttrImpl;
class PageDirectiveWatcherImpl implements PageDirectiveWatcher {
private static Object adapterType = PageDirectiveWatcher.class;
- XMLElement targetElement;
+ DOMElement targetElement;
/**
* Constructor for PageDirectiveWatcherImpl.
*/
- public PageDirectiveWatcherImpl(XMLElement target) {
+ public PageDirectiveWatcherImpl(DOMElement target) {
super();
targetElement = target;
String contentTypeValue = target.getAttribute("contentType"); //$NON-NLS-1$
if (contentTypeValue != null) {
// using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((XMLDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
+ PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((DOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
pageDirectiveAdapter.changedContentType(((IndexedRegion) targetElement).getStartOffset(), contentTypeValue);
}
String languageValue = target.getAttribute("language"); //$NON-NLS-1$
if (languageValue != null) {
// using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((XMLDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
+ PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((DOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
pageDirectiveAdapter.changedLanguage(((IndexedRegion) targetElement).getStartOffset(), languageValue);
}
@@ -66,7 +66,7 @@ class PageDirectiveWatcherImpl implements PageDirectiveWatcher {
// we should only be added to page directives, so if we see a page directive
// change, we need to check its attributes, and notify the PageDirectiveAdapter when
// certain ones chane, so it can make its "centralized" decisions.
- if (notifier instanceof XMLNode) {
+ if (notifier instanceof DOMNode) {
switch (eventType) {
case INodeNotifier.CHANGE :
@@ -75,12 +75,12 @@ class PageDirectiveWatcherImpl implements PageDirectiveWatcher {
String name = attribute.getName();
if (name.equals("contentType")) { //$NON-NLS-1$
// using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((XMLDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
+ PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((DOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
pageDirectiveAdapter.changedContentType(((IndexedRegion) targetElement).getStartOffset(), (String) newValue);
}
if (name.equals("language")) { //$NON-NLS-1$ //$NON-NLS-2$
// using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((XMLDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
+ PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((DOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
pageDirectiveAdapter.changedLanguage(((IndexedRegion) targetElement).getStartOffset(), (String) newValue);
}
}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMDocumentForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMDocumentForJSP.java
index e32f151bbe..205528cd72 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMDocumentForJSP.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMDocumentForJSP.java
@@ -13,7 +13,7 @@
package org.eclipse.jst.jsp.core.internal.domdocument;
import org.eclipse.wst.html.core.document.DocumentStyleImpl;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.w3c.dom.Attr;
import org.w3c.dom.Comment;
@@ -114,7 +114,7 @@ public class DOMDocumentForJSP extends DocumentStyleImpl {
text.setData(data);
return text;
}
- protected void setModel(XMLModel model) {
+ protected void setModel(DOMModel model) {
super.setModel(model);
}
}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java
index 8873a28aca..5f59039507 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java
@@ -27,8 +27,8 @@ import org.eclipse.jface.text.IDocumentListener;
import org.eclipse.jst.jsp.core.internal.Logger;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
/**
* An adapter for getting a JSPTranslation of the document.
@@ -48,11 +48,11 @@ public class JSPTranslationAdapter implements INodeAdapter, IDocumentListener {
private IDocument fJavaDocument = null;
private JSPTranslationExtension fJSPTranslation = null;
private boolean fDocumentIsDirty = true;
- private XMLModel fXMLModel;
+ private DOMModel fXMLModel;
private JSPTranslator fTranslator = null;
private NullProgressMonitor fTranslationMonitor = null;
- public JSPTranslationAdapter(XMLModel xmlModel) {
+ public JSPTranslationAdapter(DOMModel xmlModel) {
setXMLModel(xmlModel);
initializeJavaPlugins();
}
@@ -139,7 +139,7 @@ public class JSPTranslationAdapter implements INodeAdapter, IDocumentListener {
if (fJSPTranslation == null || fDocumentIsDirty) {
JSPTranslator translator = null;
if (getXMLModel() != null && getXMLModel().getIndexedRegion(0) != null) {
- translator = getTranslator((XMLNode) getXMLModel().getIndexedRegion(0));
+ translator = getTranslator((DOMNode) getXMLModel().getIndexedRegion(0));
translator.translate();
StringBuffer javaContents = translator.getTranslation();
fJavaDocument = new Document(javaContents.toString());
@@ -173,7 +173,7 @@ public class JSPTranslationAdapter implements INodeAdapter, IDocumentListener {
* the first node of the JSP document to be translated
* @return the JSPTranslator for this adapter (creates if null)
*/
- private JSPTranslator getTranslator(XMLNode xmlNode) {
+ private JSPTranslator getTranslator(DOMNode xmlNode) {
if (fTranslator == null) {
fTranslationMonitor = new NullProgressMonitor();
fTranslator = new JSPTranslator();
@@ -189,7 +189,7 @@ public class JSPTranslationAdapter implements INodeAdapter, IDocumentListener {
*
* @param xmlModel
*/
- public void setXMLModel(XMLModel xmlModel) {
+ public void setXMLModel(DOMModel xmlModel) {
fXMLModel = xmlModel;
setDocument(fXMLModel.getStructuredDocument());
}
@@ -197,7 +197,7 @@ public class JSPTranslationAdapter implements INodeAdapter, IDocumentListener {
/**
* @return the XMLModel for this adapter.
*/
- public XMLModel getXMLModel() {
+ public DOMModel getXMLModel() {
return fXMLModel;
}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java
index bbdd5adb30..852d22b9cf 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java
@@ -15,7 +15,7 @@ import org.eclipse.wst.sse.core.AbstractAdapterFactory;
import org.eclipse.wst.sse.core.IAdapterFactory;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
/**
* Factory for JSPTranslationAdapters.
@@ -46,8 +46,8 @@ public class JSPTranslationAdapterFactory extends AbstractAdapterFactory {
}
protected INodeAdapter createAdapter(INodeNotifier target) {
- if (target instanceof XMLNode && fAdapter == null) {
- fAdapter = new JSPTranslationAdapter(((XMLNode) target).getModel());
+ if (target instanceof DOMNode && fAdapter == null) {
+ fAdapter = new JSPTranslationAdapter(((DOMNode) target).getModel());
if(DEBUG) {
System.out.println("(+) JSPTranslationAdapterFactory [" + this + "] created adapter: " + fAdapter);
}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java
index 30b51feea9..c9c6d33a10 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java
@@ -23,8 +23,8 @@ import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
import org.eclipse.wst.sse.core.IModelManager;
import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
public class JSPTranslationUtil {
protected IDocument fDocument = null;
@@ -87,9 +87,9 @@ public class JSPTranslationUtil {
public JSPTranslationExtension getTranslation() {
if (fTranslation == null) {
- XMLModel xmlModel = (XMLModel) getModelManager().getExistingModelForRead(fDocument);
+ DOMModel xmlModel = (DOMModel) getModelManager().getExistingModelForRead(fDocument);
try {
- XMLDocument xmlDoc = xmlModel.getDocument();
+ DOMDocument xmlDoc = xmlModel.getDocument();
JSPTranslationAdapter translationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
if (translationAdapter != null)
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
index 8a7537e310..86e624c07c 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
@@ -47,8 +47,8 @@ import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.sse.core.util.URIResolver;
import org.eclipse.wst.xml.core.contentmodel.CMDocumentTracker;
import org.eclipse.wst.xml.core.contentmodel.CMNodeWrapper;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
@@ -118,7 +118,7 @@ public class JSPTranslator {
private StringBuffer fCursorOwner = null; // the buffer where the cursor
// is
- private XMLModel fStructuredModel = null;
+ private DOMModel fStructuredModel = null;
private IStructuredDocument fStructuredDocument = null;
private ModelQuery fModelQuery = null;
// private XMLNode fPositionNode; // position in the DOM
@@ -191,7 +191,7 @@ public class JSPTranslator {
* @param node
* @param monitor
*/
- private void configure(XMLNode node, IProgressMonitor monitor) {
+ private void configure(DOMNode node, IProgressMonitor monitor) {
fProgressMonitor = monitor;
fStructuredModel = node.getModel();
@@ -256,7 +256,7 @@ public class JSPTranslator {
* @param node
* @return
*/
- private String createClassname(XMLNode node) {
+ private String createClassname(DOMNode node) {
String classname = ""; //$NON-NLS-1$
if (node != null) {
@@ -290,7 +290,7 @@ public class JSPTranslator {
/**
* So that the JSPTranslator can be reused.
*/
- public void reset(XMLNode node, IProgressMonitor progress) {
+ public void reset(DOMNode node, IProgressMonitor progress) {
// initialize some things on node
configure(node, progress);
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java
index 4d1effb4b1..393a937286 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java
@@ -32,8 +32,8 @@ 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.internal.exceptions.UnsupportedCharsetExceptionWithDetail;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
/**
@@ -97,17 +97,17 @@ public class JSPSearchDocument {
if (!JSPSearchSupport.isJsp(jspFile))
return translation;
- XMLModel xmlModel = null;
+ DOMModel xmlModel = null;
try {
// get existing model for read, then get document from it
IModelManager modelManager = getModelManager();
if (modelManager != null) {
- xmlModel = (XMLModel) modelManager.getModelForRead(jspFile);
+ xmlModel = (DOMModel) modelManager.getModelForRead(jspFile);
}
// handle unsupported
if (xmlModel != null) {
setupAdapterFactory(xmlModel);
- XMLDocument doc = xmlModel.getDocument();
+ DOMDocument doc = xmlModel.getDocument();
JSPTranslationAdapter adapter = (JSPTranslationAdapter) doc.getAdapterFor(IJSPTranslation.class);
translation = adapter.getJSPTranslation();
}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelhandler/JSPModelLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelhandler/JSPModelLoader.java
index 99f121b10c..b4fee343a0 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelhandler/JSPModelLoader.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelhandler/JSPModelLoader.java
@@ -48,8 +48,8 @@ import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.util.Assert;
import org.eclipse.wst.sse.core.util.Debug;
import org.eclipse.wst.xml.core.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.DebugAdapterFactory;
import org.eclipse.wst.xml.core.internal.document.XMLModelImpl;
import org.eclipse.wst.xml.core.internal.propagate.PropagatingAdapterFactoryImpl;
@@ -163,7 +163,7 @@ public class JSPModelLoader extends AbstractModelLoader {
protected void preLoadAdapt(IStructuredModel structuredModel) {
super.preLoadAdapt(structuredModel);
- XMLModel domModel = (XMLModel) structuredModel;
+ DOMModel domModel = (DOMModel) structuredModel;
//
// document must have already been set for this to
// work.
@@ -263,8 +263,8 @@ public class JSPModelLoader extends AbstractModelLoader {
// critical here, the doc must have been created, but its contents not
// set yet,
// and all factories must have been set up also.
- XMLModel domModel = (XMLModel) model;
- XMLDocument document = domModel.getDocument();
+ DOMModel domModel = (DOMModel) model;
+ DOMDocument document = domModel.getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
pageDirectiveAdapter.setEmbeddedType(embeddedContentType);
embeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
@@ -343,9 +343,9 @@ public class JSPModelLoader extends AbstractModelLoader {
// critical here, the doc must have been created, but its contents not
// set yet,
// and all factories must have been set up also.
- XMLModel domModel = (XMLModel) model;
+ DOMModel domModel = (DOMModel) model;
IStructuredDocument structuredDocument = model.getStructuredDocument();
- XMLDocument document = domModel.getDocument();
+ DOMDocument document = domModel.getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getExistingAdapter(PageDirectiveAdapter.class);
// ==> // PropagatingAdapter propagatingAdapter = (PropagatingAdapter)
// ((INodeNotifier)
@@ -432,9 +432,9 @@ public class JSPModelLoader extends AbstractModelLoader {
// critical here, the doc must have been created, but its contents not
// set yet,
// and all factories must have been set up also.
- XMLModel domModel = (XMLModel) model;
+ DOMModel domModel = (DOMModel) model;
IStructuredDocument structuredDocument = model.getStructuredDocument();
- XMLDocument document = domModel.getDocument();
+ DOMDocument document = domModel.getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
// ==> // PropagatingAdapter propagatingAdapter = (PropagatingAdapter)
// ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
@@ -466,7 +466,7 @@ public class JSPModelLoader extends AbstractModelLoader {
}
private EmbeddedTypeHandler getEmbeddedType(IStructuredModel model) {
- Document doc = ((XMLModel) model).getDocument();
+ Document doc = ((DOMModel) model).getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) ((INodeNotifier) doc).getAdapterFor(PageDirectiveAdapter.class);
EmbeddedTypeHandler embeddedHandler = pageDirectiveAdapter.getEmbeddedType();
return embeddedHandler;
@@ -495,8 +495,8 @@ public class JSPModelLoader extends AbstractModelLoader {
}
protected void setLanguageInPageDirective(IStructuredModel newModel) {
- if (newModel instanceof XMLModel) {
- XMLDocument document = ((XMLModel) newModel).getDocument();
+ if (newModel instanceof DOMModel) {
+ DOMDocument document = ((DOMModel) newModel).getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
String language = getLanguage(newModel);
pageDirectiveAdapter.setLanguage(language);
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryCMProvider.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryCMProvider.java
index ec45f48d45..14339e0d23 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryCMProvider.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryCMProvider.java
@@ -17,7 +17,7 @@ import java.util.List;
import org.eclipse.jst.jsp.core.internal.contentmodel.JSPCMDocumentFactory;
import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryCMProvider;
@@ -54,9 +54,9 @@ public class JSPModelQueryCMProvider implements ModelQueryCMProvider {
String prefix = node.getPrefix();
- if (result == null && prefix != null && prefix.length() > 0 && node instanceof XMLNode) {
+ if (result == null && prefix != null && prefix.length() > 0 && node instanceof DOMNode) {
// check position dependent
- XMLNode xmlNode = (XMLNode) node;
+ DOMNode xmlNode = (DOMNode) node;
TLDCMDocumentManager tldmgr = TaglibController.getTLDCMDocumentManager(xmlNode.getStructuredDocument());
if (tldmgr != null) {
List documents = tldmgr.getCMDocumentTrackers(node.getPrefix(), xmlNode.getStartOffset());
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/ModelQueryAdapterFactoryForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/ModelQueryAdapterFactoryForJSP.java
index e4ecee48b7..d2096a7589 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/ModelQueryAdapterFactoryForJSP.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/ModelQueryAdapterFactoryForJSP.java
@@ -23,7 +23,7 @@ import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.util.Debug;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.xml.core.internal.modelquery.XMLCatalogIdResolver;
@@ -64,8 +64,8 @@ public class ModelQueryAdapterFactoryForJSP extends AbstractAdapterFactory imple
if (Debug.displayInfo)
System.out.println("-----------------------ModelQueryAdapterFactoryForJSP.createAdapter" + target); //$NON-NLS-1$
if (modelQueryAdapterImpl == null) {
- if (target instanceof XMLNode) {
- XMLNode xmlNode = (XMLNode) target;
+ if (target instanceof DOMNode) {
+ DOMNode xmlNode = (DOMNode) target;
IStructuredModel model = stateNotifier = xmlNode.getModel();
String baseLocation = model.getBaseLocation();
// continue only if the location is known
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.java
index 1c552a27b1..8885b1c606 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.java
@@ -18,7 +18,7 @@ import org.eclipse.ui.texteditor.ITextEditorExtension3;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.ui.internal.StructuredDocumentCommand;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.ui.internal.autoedit.StructuredAutoEditStrategyXML;
public class StructuredAutoEditStrategyJSP extends StructuredAutoEditStrategyXML {
@@ -35,7 +35,7 @@ public class StructuredAutoEditStrategyJSP extends StructuredAutoEditStrategyXML
if (model != null) {
if (structuredDocumentCommand.text != null) {
if (structuredDocumentCommand.text.equals("%")) { //$NON-NLS-1$
- XMLNode node = (XMLNode) model.getIndexedRegion(structuredDocumentCommand.offset);
+ DOMNode node = (DOMNode) model.getIndexedRegion(structuredDocumentCommand.offset);
try {
if (prefixedWith(document, structuredDocumentCommand.offset, "<") && !node.getSource().endsWith("%>")) { //$NON-NLS-1$ //$NON-NLS-2$
structuredDocumentCommand.doit = false;
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java
index f8b5b8fd0b..facae97e04 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java
@@ -27,7 +27,7 @@ import org.eclipse.wst.sse.core.text.ITextRegionCollection;
import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.ui.extensions.breakpoint.IBreakpointProvider;
import org.eclipse.wst.xml.core.contentmodel.CMNodeWrapper;
-import org.eclipse.wst.xml.core.document.XMLDocument;
+import org.eclipse.wst.xml.core.document.DOMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
@@ -88,7 +88,7 @@ public abstract class AbstractBreakpointProvider implements IBreakpointProvider
// go through the node's regions looking for JSP content
// until reaching the end of the line
while (flatNode != null) {
- int validPosition = getValidRegionPosition(((XMLDocument) doc).getModel(), flatNode, startOffset, endOffset);
+ int validPosition = getValidRegionPosition(((DOMDocument) doc).getModel(), flatNode, startOffset, endOffset);
if (validPosition == END_OF_LINE)
return NO_VALID_CONTENT;
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java
index f4b2b45d6d..0765e8fe0d 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java
@@ -35,9 +35,9 @@ import org.eclipse.wst.sse.ui.internal.IReleasable;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.IResourceDependentProcessor;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
@@ -80,14 +80,14 @@ public class JSPCompletionProcessor implements IContentAssistProcessor, IReleasa
*/
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int pos) {
initialize(pos);
- XMLModel xmlModel = null;
+ DOMModel xmlModel = null;
try {
if (viewer instanceof StructuredTextViewer)
fViewer = (StructuredTextViewer) viewer;
- xmlModel = (XMLModel) StructuredModelManager.getModelManager().getExistingModelForRead(fViewer.getDocument());
+ xmlModel = (DOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(fViewer.getDocument());
- XMLDocument xmlDoc = xmlModel.getDocument();
+ DOMDocument xmlDoc = xmlModel.getDocument();
if (fTranslationAdapter == null)
fTranslationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
if (fTranslationAdapter != null) {
@@ -173,12 +173,12 @@ public class JSPCompletionProcessor implements IContentAssistProcessor, IReleasa
private boolean cursorInExpression() {
boolean inExpression = false;
IStructuredDocumentRegion sdRegion = null;
- XMLModel xmlModel = (XMLModel) StructuredModelManager.getModelManager().getExistingModelForRead(fViewer.getDocument());
- XMLNode xmlNode = null;
+ DOMModel xmlModel = (DOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(fViewer.getDocument());
+ DOMNode xmlNode = null;
xmlModel.releaseFromRead();
- xmlNode = (XMLNode) xmlModel.getIndexedRegion(fJspSourcePosition);
+ xmlNode = (DOMNode) xmlModel.getIndexedRegion(fJspSourcePosition);
if (xmlNode != null) {
- XMLNode parent = (XMLNode) xmlNode.getParentNode();
+ DOMNode parent = (DOMNode) xmlNode.getParentNode();
if (parent != null) {
sdRegion = parent.getFirstStructuredDocumentRegion();
inExpression = sdRegion != null && (sdRegion.getType() == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || sdRegion.getType() == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN);
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
index 6ba5dd9d5b..fc74f255f6 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
@@ -76,8 +76,8 @@ import org.eclipse.wst.sse.ui.registry.AdapterFactoryRegistry;
import org.eclipse.wst.xml.core.contentmodel.CMDocType;
import org.eclipse.wst.xml.core.contentmodel.CMDocumentTracker;
import org.eclipse.wst.xml.core.contentmodel.CMNodeWrapper;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
@@ -218,7 +218,7 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.ATTRIBUTE_VALUE);
- XMLNode node = (XMLNode) contentAssistRequest.getNode();
+ DOMNode node = (DOMNode) contentAssistRequest.getNode();
// add JSP extra proposals from JSPBeanInfoContentAssistProcessor
// JSPPropertyContentAssistProcessor
@@ -303,10 +303,10 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
IStructuredModel internalModel = null;
IModelManager mmanager = StructuredModelManager.getModelManager();
internalModel = mmanager.createUnManagedStructuredModelFor(ContentTypeIdForJSP.ContentTypeID_JSP);
- XMLNode xmlNode = null;
- XMLModel xmlOuterModel = null;
- if (contentAssistRequest.getNode() instanceof XMLNode) {
- xmlNode = (XMLNode) contentAssistRequest.getNode();
+ DOMNode xmlNode = null;
+ DOMModel xmlOuterModel = null;
+ if (contentAssistRequest.getNode() instanceof DOMNode) {
+ xmlNode = (DOMNode) contentAssistRequest.getNode();
xmlOuterModel = xmlNode.getModel();
internalModel.setResolver(xmlOuterModel.getResolver());
internalModel.setBaseLocation(xmlOuterModel.getBaseLocation());
@@ -340,7 +340,7 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
doc = node.getOwnerDocument();
NodeList useBeans = doc.getElementsByTagName(JSP12Namespace.ElementName.USEBEAN);
for (int k = 0; k < useBeans.getLength(); k++) {
- XMLNode useBean = (XMLNode) useBeans.item(k);
+ DOMNode useBean = (DOMNode) useBeans.item(k);
if (useBean.getStartOffset() < contentAssistRequest.getReplacementBeginPosition()) {
StringBuffer useBeanText = new StringBuffer("<jsp:useBean"); //$NON-NLS-1$
for (int j = 0; j < useBean.getAttributes().getLength(); j++) {
@@ -421,7 +421,7 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
}
private List getAdditionalChildren(List elementDecls, Node node, int childIndex) {
- if (node instanceof XMLNode) {
+ if (node instanceof DOMNode) {
/*
* find the location of the intended insertion as it will give us
* the correct offset for checking position dependent CMDocuments
@@ -430,12 +430,12 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
NodeList children = node.getChildNodes();
if (children.getLength() >= childIndex && childIndex >= 0) {
Node nodeAlreadyAtIndex = children.item(childIndex);
- if (nodeAlreadyAtIndex instanceof XMLNode)
- textInsertionOffset = ((XMLNode) nodeAlreadyAtIndex).getEndOffset();
+ if (nodeAlreadyAtIndex instanceof DOMNode)
+ textInsertionOffset = ((DOMNode) nodeAlreadyAtIndex).getEndOffset();
} else {
- textInsertionOffset = ((XMLNode) node).getStartOffset();
+ textInsertionOffset = ((DOMNode) node).getStartOffset();
}
- TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(((XMLNode) node).getStructuredDocument());
+ TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(((DOMNode) node).getStructuredDocument());
if (mgr != null) {
List moreCMDocuments = mgr.getCMDocumentTrackers(textInsertionOffset);
if (moreCMDocuments != null) {
@@ -457,9 +457,9 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
ModelQueryAdapter mqAdapter = null;
if (node.getNodeType() == Node.DOCUMENT_NODE)
- mqAdapter = (ModelQueryAdapter) ((XMLNode) node).getAdapterFor(ModelQueryAdapter.class);
+ mqAdapter = (ModelQueryAdapter) ((DOMNode) node).getAdapterFor(ModelQueryAdapter.class);
else
- mqAdapter = (ModelQueryAdapter) ((XMLNode) node.getOwnerDocument()).getAdapterFor(ModelQueryAdapter.class);
+ mqAdapter = (ModelQueryAdapter) ((DOMNode) node.getOwnerDocument()).getAdapterFor(ModelQueryAdapter.class);
if (mqAdapter != null) {
CMDocument doc = mqAdapter.getModelQuery().getCorrespondingCMDocument(node);
@@ -507,7 +507,7 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
// don't show jsp:root if a document element already
// exists
Element docElement = domDoc.getDocumentElement();
- if (docElement != null && ((docElement.getNodeName().equals("jsp:root")) || ((((XMLNode) docElement).getStartStructuredDocumentRegion() != null || ((XMLNode) docElement).getEndStructuredDocumentRegion() != null)))) //$NON-NLS-1$
+ if (docElement != null && ((docElement.getNodeName().equals("jsp:root")) || ((((DOMNode) docElement).getStartStructuredDocumentRegion() != null || ((DOMNode) docElement).getEndStructuredDocumentRegion() != null)))) //$NON-NLS-1$
rejectElements.add(JSP12Namespace.ElementName.ROOT);
for (int j = 0; j < jspelements.getLength(); j++) {
@@ -1073,7 +1073,7 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
if (doc == null)
return false;
Element docElement = doc.getDocumentElement();
- return docElement != null && ((docElement.getNodeName().equals("jsp:root")) || ((((XMLNode) docElement).getStartStructuredDocumentRegion() == null && ((XMLNode) docElement).getEndStructuredDocumentRegion() == null))); //$NON-NLS-1$
+ return docElement != null && ((docElement.getNodeName().equals("jsp:root")) || ((((DOMNode) docElement).getStartStructuredDocumentRegion() == null && ((DOMNode) docElement).getEndStructuredDocumentRegion() == null))); //$NON-NLS-1$
}
/*
@@ -1116,9 +1116,9 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
/**
* @see AbstractContentAssistProcessor#computeCompletionProposals(int,
- * String, ITextRegion, XMLNode, XMLNode)
+ * String, ITextRegion, DOMNode, DOMNode)
*/
- protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode treeNode, XMLNode xmlnode) {
+ protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode treeNode, DOMNode xmlnode) {
ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
IStructuredDocumentRegion sdRegion = ContentAssistUtils.getStructuredDocumentRegion((StructuredTextViewer) fTextViewer, documentPosition);
@@ -1240,9 +1240,9 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
/**
* @see com.ibm.sed.contentassist.old.xml.AbstractContentAssistProcessor#addEntityProposals(ContentAssistRequest,
- * int, ITextRegion, XMLNode)
+ * int, ITextRegion, DOMNode)
*/
- protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, XMLNode treeNode) {
+ protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, DOMNode treeNode) {
}
/**
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java
index 3904143e2a..37577c2185 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java
@@ -24,7 +24,7 @@ import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.ui.internal.contentassist.IResourceDependentProcessor;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
@@ -103,9 +103,9 @@ public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcess
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#addEntityProposals(com.ibm.sed.structured.contentassist.xml.ContentAssistRequest, int, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#addEntityProposals(com.ibm.sed.structured.contentassist.xml.ContentAssistRequest, int, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode)
*/
- protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, XMLNode treeNode) {
+ protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, DOMNode treeNode) {
super.addEntityProposals(contentAssistRequest, documentPosition, completionRegion, treeNode);
}
@@ -159,9 +159,9 @@ public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcess
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#attributeInList(com.ibm.sed.model.xml.XMLNode, org.w3c.dom.Node, org.eclipse.wst.xml.core.internal.contentmodel.CMNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#attributeInList(com.ibm.sed.model.xml.DOMNode, org.w3c.dom.Node, org.eclipse.wst.xml.core.internal.contentmodel.CMNode)
*/
- protected boolean attributeInList(XMLNode node, Node parent, CMNode cmnode) {
+ protected boolean attributeInList(DOMNode node, Node parent, CMNode cmnode) {
return super.attributeInList(node, parent, cmnode);
}
@@ -173,23 +173,23 @@ public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcess
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeAttributeProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeAttributeProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode, com.ibm.sed.model.xml.DOMNode)
*/
- protected ContentAssistRequest computeAttributeProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeAttributeProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
return super.computeAttributeProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeAttributeValueProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeAttributeValueProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode, com.ibm.sed.model.xml.DOMNode)
*/
- protected ContentAssistRequest computeAttributeValueProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeAttributeValueProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
return super.computeAttributeValueProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeCompletionProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeCompletionProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode, com.ibm.sed.model.xml.DOMNode)
*/
- protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode treeNode, XMLNode xmlnode) {
+ protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode treeNode, DOMNode xmlnode) {
return super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
}
@@ -201,9 +201,9 @@ public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcess
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeContentProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeContentProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode, com.ibm.sed.model.xml.DOMNode)
*/
- protected ContentAssistRequest computeContentProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeContentProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
return super.computeContentProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
}
@@ -215,51 +215,51 @@ public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcess
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeEndTagOpenProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeEndTagOpenProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode, com.ibm.sed.model.xml.DOMNode)
*/
- protected ContentAssistRequest computeEndTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeEndTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
return super.computeEndTagOpenProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeEntityReferenceProposals(int, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeEntityReferenceProposals(int, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode)
*/
- protected ICompletionProposal[] computeEntityReferenceProposals(int documentPosition, ITextRegion completionRegion, XMLNode treeNode) {
+ protected ICompletionProposal[] computeEntityReferenceProposals(int documentPosition, ITextRegion completionRegion, DOMNode treeNode) {
return super.computeEntityReferenceProposals(documentPosition, completionRegion, treeNode);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeEqualsProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeEqualsProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode, com.ibm.sed.model.xml.DOMNode)
*/
- protected ContentAssistRequest computeEqualsProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeEqualsProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
return super.computeEqualsProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeStartDocumentProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeStartDocumentProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode, com.ibm.sed.model.xml.DOMNode)
*/
- protected ContentAssistRequest computeStartDocumentProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeStartDocumentProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
return super.computeStartDocumentProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeTagCloseProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeTagCloseProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode, com.ibm.sed.model.xml.DOMNode)
*/
- protected ContentAssistRequest computeTagCloseProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeTagCloseProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
return super.computeTagCloseProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeTagNameProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeTagNameProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode, com.ibm.sed.model.xml.DOMNode)
*/
- protected ContentAssistRequest computeTagNameProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeTagNameProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
return super.computeTagNameProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeTagOpenProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.model.xml.XMLNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#computeTagOpenProposals(int, java.lang.String, com.ibm.sed.structuredDocument.ITextRegion, com.ibm.sed.model.xml.DOMNode, com.ibm.sed.model.xml.DOMNode)
*/
- protected ContentAssistRequest computeTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
return super.computeTagOpenProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java
index bfe026d8b4..390f86ac27 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java
@@ -33,7 +33,7 @@ import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
import org.eclipse.wst.sse.ui.internal.contentassist.IResourceDependentProcessor;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.eclipse.wst.xml.ui.contentassist.XMLRelevanceConstants;
import org.eclipse.wst.xml.ui.util.SharedXMLEditorPluginImageHelper;
@@ -151,10 +151,10 @@ public class JSPJavaContentAssistProcessor implements IContentAssistProcessor, I
fErrorMessage = UNKNOWN_CONTEXT;
}
- XMLNode xNode = null;
+ DOMNode xNode = null;
IStructuredDocumentRegion flat = null;
- if (treeNode instanceof XMLNode) {
- xNode = (XMLNode) treeNode;
+ if (treeNode instanceof DOMNode) {
+ xNode = (DOMNode) treeNode;
flat = xNode.getFirstStructuredDocumentRegion();
if (flat != null && flat.getType() == DOMJSPRegionContexts.JSP_CONTENT) {
flat = flat.getPrevious();
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java
index 51965fc8fb..c6a994f8fb 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java
@@ -23,7 +23,7 @@ import org.eclipse.wst.sse.core.text.ITextRegionContainer;
import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.eclipse.wst.xml.ui.contentassist.ContentAssistRequest;
import org.eclipse.wst.xml.ui.contentassist.XMLRelevanceConstants;
@@ -46,7 +46,7 @@ public class JSPPropertyContentAssistProcessor extends JSPDummyContentAssistProc
}
protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- XMLNode node = (XMLNode) contentAssistRequest.getNode();
+ DOMNode node = (DOMNode) contentAssistRequest.getNode();
// Find the attribute name for which this position should have a value
IStructuredDocumentRegion open = node.getFirstStructuredDocumentRegion();
@@ -105,7 +105,7 @@ public class JSPPropertyContentAssistProcessor extends JSPDummyContentAssistProc
}
}
- private void addBeanPropertyProposals(ContentAssistRequest contentAssistRequest, XMLNode node, boolean isGetProperty, String matchString) {
+ private void addBeanPropertyProposals(ContentAssistRequest contentAssistRequest, DOMNode node, boolean isGetProperty, String matchString) {
// assumes that the node is the [gs]etProperty tag
String useBeanName = ((Element) node).getAttribute(JSP11Namespace.ATTR_NAME_NAME);
// properties can only be provided if a class/type/beanName has been declared
@@ -156,7 +156,7 @@ public class JSPPropertyContentAssistProcessor extends JSPDummyContentAssistProc
}
}
- private void addBeanNameProposals(ContentAssistRequest contentAssistRequest, XMLNode node, String matchString) {
+ private void addBeanNameProposals(ContentAssistRequest contentAssistRequest, DOMNode node, String matchString) {
// will not catch useBeans specified using other than actual DOM Nodes
NodeList useBeans = node.getOwnerDocument().getElementsByTagName(JSP11Namespace.ElementName.USEBEAN);
if (useBeans != null) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java
index 6a9bcf6d7a..c1b63f6ef2 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java
@@ -20,7 +20,7 @@ import org.eclipse.wst.sse.core.text.ITextRegionContainer;
import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.eclipse.wst.xml.ui.contentassist.ContentAssistRequest;
@@ -32,7 +32,7 @@ public class JSPUseBeanContentAssistProcessor extends JSPDummyContentAssistProce
protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- XMLNode node = (XMLNode) contentAssistRequest.getNode();
+ DOMNode node = (DOMNode) contentAssistRequest.getNode();
// Find the attribute name for which this position should have a value
IStructuredDocumentRegion open = node.getFirstStructuredDocumentRegion();
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/correction/CorrectionProcessorJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/correction/CorrectionProcessorJSP.java
index a4c32c6de3..39d9da0aa8 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/correction/CorrectionProcessorJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/correction/CorrectionProcessorJSP.java
@@ -36,8 +36,8 @@ import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.correction.StructuredCorrectionProcessor;
import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
public class CorrectionProcessorJSP extends StructuredCorrectionProcessor {
protected IQuickFixProcessor fQuickFixProcessor;
@@ -70,8 +70,8 @@ public class CorrectionProcessorJSP extends StructuredCorrectionProcessor {
if (documentOffset >= pos.offset && documentOffset <= pos.offset + pos.length) {
IQuickFixProcessor processor = getQuickFixProcessorJSP();
- XMLModel xmlModel = (XMLModel) StructuredModelManager.getModelManager().getExistingModelForRead(viewer.getDocument());
- XMLDocument xmlDoc = xmlModel.getDocument();
+ DOMModel xmlModel = (DOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(viewer.getDocument());
+ DOMDocument xmlDoc = xmlModel.getDocument();
xmlModel.releaseFromRead();
JSPTranslationAdapter translationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
if (translationAdapter != null) {
@@ -113,8 +113,8 @@ public class CorrectionProcessorJSP extends StructuredCorrectionProcessor {
try {
IQuickAssistProcessor processor = getQuickAssistProcessorJSP();
- XMLModel xmlModel = (XMLModel) StructuredModelManager.getModelManager().getExistingModelForRead(viewer.getDocument());
- XMLDocument xmlDoc = xmlModel.getDocument();
+ DOMModel xmlModel = (DOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(viewer.getDocument());
+ DOMDocument xmlDoc = xmlModel.getDocument();
xmlModel.releaseFromRead();
JSPTranslationAdapter translationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
if (translationAdapter != null) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java
index 0d5334e250..915269553a 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java
@@ -15,7 +15,7 @@ package org.eclipse.jst.jsp.ui.internal.editor;
import org.eclipse.jst.jsp.core.JSP11Namespace;
import org.eclipse.jst.jsp.core.JSP12Namespace;
import org.eclipse.jst.jsp.core.PageDirectiveAdapter;
-import org.eclipse.wst.xml.core.document.XMLDocument;
+import org.eclipse.wst.xml.core.document.DOMDocument;
import org.eclipse.wst.xml.ui.extensions.XMLSourceEditingTextTools;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -37,8 +37,8 @@ public class JSPSourceEditingTextTools extends XMLSourceEditingTextTools {
doc = node.getOwnerDocument();
}
if (doc != null) {
- if (doc instanceof XMLDocument) {
- PageDirectiveAdapter adapter = (PageDirectiveAdapter) ((XMLDocument) doc).getAdapterFor(PageDirectiveAdapter.class);
+ if (doc instanceof DOMDocument) {
+ PageDirectiveAdapter adapter = (PageDirectiveAdapter) ((DOMDocument) doc).getAdapterFor(PageDirectiveAdapter.class);
if (adapter != null)
language = adapter.getLanguage();
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/StructuredTextEditorJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/StructuredTextEditorJSP.java
index 2f3a06805c..047d08eec7 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/StructuredTextEditorJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/StructuredTextEditorJSP.java
@@ -35,8 +35,8 @@ import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
import org.eclipse.wst.sse.ui.internal.search.FindOccurrencesActionProvider;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.ui.actions.AddBlockCommentActionXML;
import org.eclipse.wst.xml.ui.actions.RemoveBlockCommentActionXML;
import org.eclipse.wst.xml.ui.actions.ToggleCommentActionXML;
@@ -92,10 +92,10 @@ public class StructuredTextEditorJSP extends StructuredTextEditor {
IJavaElement[] elements = new IJavaElement[0];
// get JSP translation object for this viewer's document
- XMLModel xmlModel = (XMLModel) StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
+ DOMModel xmlModel = (DOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
try {
if (xmlModel != null) {
- XMLDocument xmlDoc = xmlModel.getDocument();
+ DOMDocument xmlDoc = xmlModel.getDocument();
JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
if (adapter != null) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java
index f7a963c065..b0a54308d1 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java
@@ -26,8 +26,8 @@ import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
import org.eclipse.jst.jsp.ui.internal.Logger;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
/**
* Detects hyperlinks in JSP Java content
@@ -172,11 +172,11 @@ public class JSPJavaHyperlinkDetector implements IHyperlinkDetector {
private JSPTranslation getJSPTranslation(IDocument document) {
JSPTranslation translation = null;
- XMLModel xmlModel = null;
+ DOMModel xmlModel = null;
try {
- xmlModel = (XMLModel) StructuredModelManager.getModelManager().getExistingModelForRead(document);
+ xmlModel = (DOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(document);
if (xmlModel != null) {
- XMLDocument xmlDoc = xmlModel.getDocument();
+ DOMDocument xmlDoc = xmlModel.getDocument();
JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
if (adapter != null) {
translation = adapter.getJSPTranslation();
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java
index d0df36aa7f..bbf7decc11 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java
@@ -26,8 +26,8 @@ import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.text.IStructuredPartitioning;
import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -116,12 +116,12 @@ public class TaglibHyperlinkDetector implements IHyperlinkDetector {
short nodeType = node.getNodeType();
if (nodeType == Node.DOCUMENT_TYPE_NODE) {
// handle doc type node
- XMLNode docNode = (XMLNode) node;
+ DOMNode docNode = (DOMNode) node;
hyperRegion = new Region(docNode.getStartOffset(), docNode.getEndOffset() - docNode.getStartOffset());
}
else if (nodeType == Node.ATTRIBUTE_NODE) {
// handle attribute nodes
- XMLAttr att = (XMLAttr) node;
+ DOMAttr att = (DOMAttr) node;
// do not include quotes in attribute value region
int regOffset = att.getValueRegionStartOffset();
int regLength = att.getValueRegion().getTextLength();
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java
index c7cc7f7142..05756cbafb 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java
@@ -23,8 +23,8 @@ import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
@@ -148,12 +148,12 @@ class XMLHyperlinkDetector implements IHyperlinkDetector {
short nodeType = node.getNodeType();
if (nodeType == Node.DOCUMENT_TYPE_NODE) {
// handle doc type node
- XMLNode docNode = (XMLNode) node;
+ DOMNode docNode = (DOMNode) node;
hyperRegion = new Region(docNode.getStartOffset(), docNode.getEndOffset() - docNode.getStartOffset());
}
else if (nodeType == Node.ATTRIBUTE_NODE) {
// handle attribute nodes
- XMLAttr att = (XMLAttr) node;
+ DOMAttr att = (DOMAttr) node;
// do not include quotes in attribute value region
int regOffset = att.getValueRegionStartOffset();
int regLength = att.getValueRegion().getTextLength();
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPJavaSelectionProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPJavaSelectionProvider.java
index 9b32c3542a..c63c44d4c1 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPJavaSelectionProvider.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPJavaSelectionProvider.java
@@ -20,8 +20,8 @@ import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
class JSPJavaSelectionProvider {
static IJavaElement[] getSelection(ITextEditor textEditor) {
@@ -32,10 +32,10 @@ class JSPJavaSelectionProvider {
if (selection instanceof ITextSelection) {
ITextSelection textSelection = (ITextSelection) selection;
// get the JSP translation object for this editor's document
- XMLModel xmlModel = (XMLModel) StructuredModelManager.getModelManager().getExistingModelForRead(document);
+ DOMModel xmlModel = (DOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(document);
try {
if (xmlModel != null) {
- XMLDocument xmlDoc = xmlModel.getDocument();
+ DOMDocument xmlDoc = xmlModel.getDocument();
JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
if (adapter != null) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesAction.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesAction.java
index 22cf2586f5..7e39dbc34c 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesAction.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesAction.java
@@ -26,8 +26,8 @@ import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
import org.eclipse.wst.sse.ui.internal.search.BasicFindOccurrencesAction;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
/**
@@ -80,8 +80,8 @@ public class JSPFindOccurrencesAction extends BasicFindOccurrencesAction impleme
StructuredTextEditor editor = (StructuredTextEditor) getTextEditor();
// get JSP translation object for this viewer's document
IStructuredModel model = editor.getModel();
- if (model != null && model instanceof XMLModel) {
- XMLDocument xmlDoc = ((XMLModel) model).getDocument();
+ if (model != null && model instanceof DOMModel) {
+ DOMDocument xmlDoc = ((DOMModel) model).getDocument();
JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
if (adapter != null) {
JSPTranslation translation = adapter.getJSPTranslation();
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/StructuredTextFoldingProviderJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/StructuredTextFoldingProviderJSP.java
index c56d6b3d2a..43c44cd341 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/StructuredTextFoldingProviderJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/StructuredTextFoldingProviderJSP.java
@@ -11,7 +11,7 @@ import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
import org.eclipse.wst.sse.ui.internal.projection.IStructuredTextFoldingProvider;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -125,7 +125,7 @@ public class StructuredTextFoldingProviderJSP implements IStructuredTextFoldingP
factoryRegistry.addFactory(newFactory);
// add factory to propogating adapter
- XMLModel domModel = (XMLModel) sModel;
+ DOMModel domModel = (DOMModel) sModel;
Document document = domModel.getDocument();
PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
if (propagatingAdapter != null) {
@@ -172,7 +172,7 @@ public class StructuredTextFoldingProviderJSP implements IStructuredTextFoldingP
factoryRegistry.addFactory(newFactory);
// add factory to propogating adapter
- XMLModel domModel = (XMLModel) sModel;
+ DOMModel domModel = (DOMModel) sModel;
Document document = domModel.getDocument();
PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
if (propagatingAdapter != null) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJspTranslation.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJspTranslation.java
index 29c097db50..eff14d669e 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJspTranslation.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJspTranslation.java
@@ -34,8 +34,8 @@ import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.sse.ui.internal.reconcile.DocumentAdapter;
import org.eclipse.wst.sse.ui.internal.reconcile.StructuredReconcileStep;
import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
/**
@@ -103,7 +103,7 @@ public class ReconcileStepForJspTranslation extends StructuredReconcileStep {
try {
model = StructuredModelManager.getModelManager().getExistingModelForRead(doc);
if (model != null) {
- XMLDocument xmlDoc = ((XMLModel) model).getDocument();
+ DOMDocument xmlDoc = ((DOMModel) model).getDocument();
fTranslationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
}
}
@@ -321,7 +321,7 @@ public class ReconcileStepForJspTranslation extends StructuredReconcileStep {
try {
model = StructuredModelManager.getModelManager().getExistingModelForRead(doc);
if(getJSPTranslationAdapter() != null)
- getJSPTranslationAdapter().setXMLModel((XMLModel) model);
+ getJSPTranslationAdapter().setXMLModel((DOMModel) model);
}
finally {
if (model != null)
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/registry/AdapterFactoryProviderForJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/registry/AdapterFactoryProviderForJSP.java
index ab8f226b8a..1fa714e960 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/registry/AdapterFactoryProviderForJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/registry/AdapterFactoryProviderForJSP.java
@@ -29,8 +29,8 @@ import org.eclipse.wst.sse.ui.registry.AdapterFactoryProvider;
import org.eclipse.wst.sse.ui.registry.AdapterFactoryRegistry;
import org.eclipse.wst.sse.ui.registry.embedded.EmbeddedAdapterFactoryProvider;
import org.eclipse.wst.sse.ui.util.Assert;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.ui.internal.properties.XMLPropertySourceAdapterFactory;
public class AdapterFactoryProviderForJSP implements AdapterFactoryProvider {
@@ -103,9 +103,9 @@ public class AdapterFactoryProviderForJSP implements AdapterFactoryProvider {
protected void addEmbeddedContentFactories(IStructuredModel structuredModel) {
- if (structuredModel instanceof XMLModel) {
- XMLModel xmlModel = (XMLModel) structuredModel;
- XMLDocument document = xmlModel.getDocument();
+ if (structuredModel instanceof DOMModel) {
+ DOMModel xmlModel = (DOMModel) structuredModel;
+ DOMDocument document = xmlModel.getDocument();
PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
if (pageDirectiveAdapter != null) {
// made into registry mechanism
@@ -140,10 +140,10 @@ public class AdapterFactoryProviderForJSP implements AdapterFactoryProvider {
// }
// }
- if (structuredModel instanceof XMLModel) {
+ if (structuredModel instanceof DOMModel) {
// IAdapterFactory factory = null;
- XMLModel xmlModel = (XMLModel) structuredModel;
- XMLDocument document = xmlModel.getDocument();
+ DOMModel xmlModel = (DOMModel) structuredModel;
+ DOMDocument document = xmlModel.getDocument();
PropagatingAdapter propagatingAdapter = (PropagatingAdapter) document.getAdapterFor(PropagatingAdapter.class);
if (propagatingAdapter != null) {
// checking if we should bother adding this factory
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHover.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHover.java
index 2c7b29a72e..1e7be9a270 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHover.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHover.java
@@ -18,8 +18,8 @@ import org.eclipse.jst.jsp.core.internal.java.IJSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
/**
* Provides javadoc hover help documentation for java code inside JSPs
@@ -29,10 +29,10 @@ public class JSPJavaJavadocHover extends JavadocHover {
public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
// get JSP translation object for this viewer's document
- XMLModel xmlModel = (XMLModel) StructuredModelManager.getModelManager().getExistingModelForRead(textViewer.getDocument());
+ DOMModel xmlModel = (DOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(textViewer.getDocument());
try {
if(xmlModel != null) {
- XMLDocument xmlDoc = xmlModel.getDocument();
+ DOMDocument xmlDoc = xmlModel.getDocument();
JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
if (adapter != null) {
JSPTranslation translation = adapter.getJSPTranslation();
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java
index 3528afa141..c3f6c41f2d 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java
@@ -24,8 +24,8 @@ import org.eclipse.jst.jsp.core.internal.java.IJSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
/**
* Provides javadoc hover help documentation for java code inside JSPs
@@ -100,10 +100,10 @@ public class JSPJavaJavadocHoverProcessor implements ITextHover {
*/
public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
// get JSP translation object for this viewer's document
- XMLModel xmlModel = (XMLModel) StructuredModelManager.getModelManager().getExistingModelForRead(textViewer.getDocument());
+ DOMModel xmlModel = (DOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(textViewer.getDocument());
try {
if(xmlModel != null) {
- XMLDocument xmlDoc = xmlModel.getDocument();
+ DOMDocument xmlDoc = xmlModel.getDocument();
JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
if (adapter != null) {
JSPTranslation translation = adapter.getJSPTranslation();
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPTagInfoHoverProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPTagInfoHoverProcessor.java
index f64bed6475..d4cc76c1b4 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPTagInfoHoverProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPTagInfoHoverProcessor.java
@@ -17,7 +17,7 @@ import org.eclipse.wst.html.ui.taginfo.HTMLTagInfoHoverProcessor;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
/**
* Provides hover help documentation for JSP tags
@@ -27,7 +27,7 @@ public class JSPTagInfoHoverProcessor extends HTMLTagInfoHoverProcessor {
/* (non-Javadoc)
* @see com.ibm.sed.structured.taginfo.AbstractTextHoverProcessor#computeRegionHelp(com.ibm.sed.model.IndexedRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.structured.text.IStructuredDocumentRegion, com.ibm.sed.structured.text.ITextRegion)
*/
- protected String computeRegionHelp(IndexedRegion treeNode, XMLNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
+ protected String computeRegionHelp(IndexedRegion treeNode, DOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
String result = null;
if (region == null)
@@ -35,7 +35,7 @@ public class JSPTagInfoHoverProcessor extends HTMLTagInfoHoverProcessor {
String regionType = region.getType();
if (regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- result = computeJSPDirHelp((XMLNode) treeNode, parentNode, flatNode, region);
+ result = computeJSPDirHelp((DOMNode) treeNode, parentNode, flatNode, region);
}
else
result = super.computeRegionHelp(treeNode, parentNode, flatNode, region);
@@ -47,7 +47,7 @@ public class JSPTagInfoHoverProcessor extends HTMLTagInfoHoverProcessor {
* Computes the hover help for the jsp directive name
* for now, treat jsp directives like any other tag name
*/
- protected String computeJSPDirHelp(XMLNode xmlnode, XMLNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
+ protected String computeJSPDirHelp(DOMNode xmlnode, DOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
return computeTagNameHelp(xmlnode, parentNode, flatNode, region);
}
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
index c118824648..28b8ff8202 100644
--- 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
@@ -24,7 +24,7 @@ import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.internal.format.AbstractStructuredFormatProcessor;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatPreferences;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatter;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.w3c.dom.Node;
@@ -54,7 +54,7 @@ public class FormatProcessorCSS extends AbstractStructuredFormatProcessor {
formatUtil.replaceSource(doc.getModel(), startOffset, endOffset - startOffset, buf.toString());
}
}
- else if (structuredModel instanceof XMLModel) {
+ else if (structuredModel instanceof DOMModel) {
List cssnodes = formatUtil.collectCSSNodes(structuredModel, start, length);
if (cssnodes != null && !cssnodes.isEmpty()) {
ICSSModel model = null;
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CleanupProcessorCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CleanupProcessorCSS.java
index 0320f77cf4..6d2fcb70e4 100644
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CleanupProcessorCSS.java
+++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CleanupProcessorCSS.java
@@ -28,7 +28,7 @@ import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.internal.cleanup.AbstractStructuredCleanupProcessor;
import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupHandler;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.w3c.dom.Node;
@@ -46,7 +46,7 @@ public class CleanupProcessorCSS extends AbstractStructuredCleanupProcessor {
formatUtil.replaceSource(doc.getModel(), startOffset, endOffset - startOffset, buf.toString());
}
}
- else if (structuredModel instanceof XMLModel) {
+ else if (structuredModel instanceof DOMModel) {
List cssnodes = formatUtil.collectCSSNodes(structuredModel, start, length);
if (cssnodes != null && !cssnodes.isEmpty()) {
ICSSModel model = null;
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
index bf99f11560..8daa731a02 100644
--- 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
@@ -23,7 +23,7 @@ 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.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSSStyleSheet;
import org.w3c.dom.stylesheets.MediaList;
@@ -142,7 +142,7 @@ class CSSImportRuleImpl extends CSSRuleImpl implements ICSSImportRule {
if (getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED) { // case
// STYLE
// tag
- baseModel = ((XMLNode) getOwnerDocument().getModel().getOwnerDOMNode()).getModel();
+ baseModel = ((DOMNode) getOwnerDocument().getModel().getOwnerDOMNode()).getModel();
}
// get ModelProvideAdapter
IModelProvideAdapter adapter = (IModelProvideAdapter) getAdapterFor(IModelProvideAdapter.class);
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
index 1d98f57a45..dd0e5329b7 100644
--- 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
@@ -50,7 +50,7 @@ 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.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -137,8 +137,8 @@ public class CSSModelImpl extends AbstractStructuredModel implements ICSSModel,
getStyleNotifier().beginRecording();
Node node = getOwnerDOMNode();
- if (node != null && node instanceof XMLNode) {
- IStructuredModel model = ((XMLNode) node).getModel();
+ if (node != null && node instanceof DOMNode) {
+ IStructuredModel model = ((DOMNode) node).getModel();
if (model != null) {
model.beginRecording(requester, label, description);
return;
@@ -279,8 +279,8 @@ public class CSSModelImpl extends AbstractStructuredModel implements ICSSModel,
*/
public void endRecording(Object requester) {
Node node = getOwnerDOMNode();
- if (node != null && node instanceof XMLNode) {
- IStructuredModel model = ((XMLNode) node).getModel();
+ if (node != null && node instanceof DOMNode) {
+ IStructuredModel model = ((DOMNode) node).getModel();
if (model != null) {
model.endRecording(requester);
return;
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
index e48e31ec2c..cd47f5b0ee 100644
--- 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
@@ -17,7 +17,7 @@ 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;
+import org.eclipse.wst.xml.core.document.DOMNode;
public class CSSEmbededStyleNotifyAdapter extends CSSStyleNotifyAdapter {
@@ -36,7 +36,7 @@ public class CSSEmbededStyleNotifyAdapter extends CSSStyleNotifyAdapter {
*
*/
public void styleChanged(ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media) {
- XMLNode node = (XMLNode) model.getOwnerDOMNode();
+ DOMNode node = (DOMNode) model.getOwnerDOMNode();
if (node != null)
return;
INodeAdapter adapter = node.getAdapterFor(IStyleSheetAdapter.class);
@@ -49,7 +49,7 @@ public class CSSEmbededStyleNotifyAdapter extends CSSStyleNotifyAdapter {
*
*/
public void styleUpdate(ICSSModel srcModel) {
- XMLNode node = (XMLNode) model.getOwnerDOMNode();
+ DOMNode node = (DOMNode) model.getOwnerDOMNode();
if (node != null)
return;
INodeAdapter adapter = node.getAdapterFor(IStyleSheetAdapter.class);
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
index 1dbdc01d32..631a8abc9d 100644
--- 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
@@ -21,8 +21,8 @@ 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.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Node;
import org.w3c.dom.Text;
@@ -49,7 +49,7 @@ public class CSSFormatUtil {
}
}
}
- else if (model instanceof XMLModel && startNode instanceof XMLNode && endNode instanceof XMLNode) {
+ else if (model instanceof DOMModel && startNode instanceof DOMNode && endNode instanceof DOMNode) {
if (startNode instanceof Text) {
startNode = (IndexedRegion) ((Text) startNode).getParentNode();
}
@@ -57,7 +57,7 @@ public class CSSFormatUtil {
endNode = (IndexedRegion) ((Text) endNode).getParentNode();
}
// HTML model, maybe
- XMLNode ca = (XMLNode) getCommonAncestor((Node) startNode, (Node) endNode);
+ DOMNode ca = (DOMNode) getCommonAncestor((Node) startNode, (Node) endNode);
findCSS(nodes, ca);
}
@@ -84,7 +84,7 @@ public class CSSFormatUtil {
return null; // not found
}
- private void findCSS(List cssNodes, XMLNode node) {
+ private void findCSS(List cssNodes, DOMNode node) {
ICSSModelAdapter adapter;
adapter = (ICSSModelAdapter) node.getAdapterFor(IStyleSheetAdapter.class);
if (adapter != null) {
@@ -103,7 +103,7 @@ public class CSSFormatUtil {
}
}
- for (XMLNode child = (XMLNode) node.getFirstChild(); child != null; child = (XMLNode) child.getNextSibling()) {
+ for (DOMNode child = (DOMNode) node.getFirstChild(); child != null; child = (DOMNode) child.getNextSibling()) {
findCSS(cssNodes, child);
}
}
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
index 84a8a8168e..65348f61db 100644
--- 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
@@ -18,7 +18,7 @@ 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.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.css.CSSPrimitiveValue;
import org.w3c.dom.css.CSSValue;
@@ -42,7 +42,7 @@ public class CSSLinkConverter extends org.eclipse.wst.css.core.util.AbstractCssT
super();
baseModel = model;
if (model instanceof ICSSModel && ((ICSSModel) model).getStyleSheetType() != ICSSModel.EXTERNAL) {
- XMLNode node = (XMLNode) ((ICSSModel) model).getOwnerDOMNode();
+ DOMNode node = (DOMNode) ((ICSSModel) model).getOwnerDOMNode();
baseModel = node.getModel();
}
}
@@ -80,7 +80,7 @@ public class CSSLinkConverter extends org.eclipse.wst.css.core.util.AbstractCssT
if (baseModel == null) {
baseModel = node.getOwnerDocument().getModel();
if (baseModel instanceof ICSSModel && ((ICSSModel) baseModel).getStyleSheetType() != ICSSModel.EXTERNAL) {
- XMLNode xmlNode = (XMLNode) ((ICSSModel) baseModel).getOwnerDOMNode();
+ DOMNode xmlNode = (DOMNode) ((ICSSModel) baseModel).getOwnerDOMNode();
baseModel = xmlNode.getModel();
}
}
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
index ca119581b6..fefbe6fe7e 100644
--- 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
@@ -24,7 +24,7 @@ import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.ui.contentassist.XMLContentAssistUtilities;
import org.eclipse.wst.xml.ui.util.SharedXMLEditorPluginImageHelper;
@@ -45,15 +45,15 @@ public class CSSContentAssistProcessor implements IContentAssistProcessor {
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentPosition) {
IndexedRegion indexedNode = ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, documentPosition + fDocumentOffset);
- XMLNode xNode = null;
- XMLNode parent = null;
+ DOMNode xNode = null;
+ DOMNode parent = 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();
+ if (indexedNode instanceof DOMNode) {
+ xNode = (DOMNode) indexedNode;
+ parent = (DOMNode) xNode.getParentNode();
}
// need to get in here if there in the no 0 region <style>|</style>
// case
@@ -86,9 +86,9 @@ public class CSSContentAssistProcessor implements IContentAssistProcessor {
arranger = new CSSProposalArranger(pos, (ICSSNode) keyIndexedNode, offset, (char) 0);
}
}
- else if (indexedNode instanceof XMLNode) {
+ else if (indexedNode instanceof DOMNode) {
// get model for node w/ style attribute
- IStructuredModel cssModel = getCSSModel((XMLNode) indexedNode);
+ IStructuredModel cssModel = getCSSModel((DOMNode) indexedNode);
if (cssModel != null) {
IndexedRegion keyIndexedNode = cssModel.getIndexedRegion(documentPosition - fDocumentOffset);
if (keyIndexedNode == null) {
@@ -197,7 +197,7 @@ public class CSSContentAssistProcessor implements IContentAssistProcessor {
* @param element
* @return IStructuredModel
*/
- private IStructuredModel getCSSModel(XMLNode element) {
+ private IStructuredModel getCSSModel(DOMNode element) {
if (element == null)
return null;
INodeAdapter adapter = StyleAdapterFactory.getInstance().adapt(element);
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
index 4c4ce152ad..9d701aea1e 100644
--- 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
@@ -21,7 +21,7 @@ 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.xml.core.contentmodel.CMDocType;
-import org.eclipse.wst.xml.core.document.XMLDocument;
+import org.eclipse.wst.xml.core.document.DOMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
@@ -62,8 +62,8 @@ class CSSProposalGeneratorForHTMLTag extends CSSProposalGenerator {
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 (domNode instanceof DOMDocument) {
+ DocumentTypeAdapter adapter = (DocumentTypeAdapter) ((DOMDocument) domNode).getAdapterFor(DocumentTypeAdapter.class);
if (adapter != null)
bLowerCase = (adapter.getTagNameCase() == DocumentTypeAdapter.LOWER_CASE);
}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSTextPropertyDescriptor.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSTextPropertyDescriptor.java
index fa9c1c0712..caa460eb89 100644
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSTextPropertyDescriptor.java
+++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSTextPropertyDescriptor.java
@@ -29,7 +29,7 @@ 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;
+import org.eclipse.wst.xml.core.document.DOMNode;
/**
*/
@@ -70,7 +70,7 @@ public class CSSTextPropertyDescriptor extends TextPropertyDescriptor {
// validateEdit()
IStructuredModel structuredModel = model;
if (model.getStyleSheetType() != ICSSModel.EXTERNAL) {
- structuredModel = ((XMLNode) model.getOwnerDOMNode()).getModel();
+ structuredModel = ((DOMNode) model.getOwnerDOMNode()).getModel();
if (structuredModel == null)
return null;
}
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
index ad9c8f4e7e..60c4aa7ecd 100644
--- 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
@@ -15,8 +15,8 @@ package org.eclipse.wst.html.core.commentelement.handlers;
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.document.DOMElement;
+import org.eclipse.wst.xml.core.document.ISourceGenerator;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
@@ -81,10 +81,10 @@ public class CommentElementHandlerForSSI implements CommentElementHandler {
}
/**
- * @see com.ibm.sed.model.commentelement.CommentElementHandler#generateStartTagContent(XMLElement)
+ * @see com.ibm.sed.model.commentelement.CommentElementHandler#generateStartTagContent(DOMElement)
*/
- public String generateStartTagContent(XMLElement element) {
- XMLGenerator generator = element.getModel().getGenerator();
+ public String generateStartTagContent(DOMElement element) {
+ ISourceGenerator generator = element.getModel().getGenerator();
StringBuffer buffer = new StringBuffer();
buffer.append('#');
@@ -114,9 +114,9 @@ public class CommentElementHandlerForSSI implements CommentElementHandler {
}
/**
- * @see com.ibm.sed.model.commentelement.CommentElementHandler#generateEndTagContent(XMLElement)
+ * @see com.ibm.sed.model.commentelement.CommentElementHandler#generateEndTagContent(DOMElement)
*/
- public String generateEndTagContent(XMLElement element) {
+ public String generateEndTagContent(DOMElement element) {
return null; // always empty
}
@@ -127,7 +127,7 @@ public class CommentElementHandlerForSSI implements CommentElementHandler {
/* (non-Javadoc)
* @see com.ibm.sed.model.commentelement.CommentElementHandler#isCommentElement(com.ibm.sed.model.xml.XMLElement)
*/
- public boolean isCommentElement(XMLElement element) {
+ public boolean isCommentElement(DOMElement element) {
if (element == null) {
return false;
}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/DocumentStyleImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/DocumentStyleImpl.java
index def25572b1..f6e9e66d30 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/DocumentStyleImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/DocumentStyleImpl.java
@@ -18,8 +18,8 @@ package org.eclipse.wst.html.core.document;
import org.eclipse.wst.css.core.adapters.IStyleSheetListAdapter;
import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.w3c.dom.DOMException;
import org.w3c.dom.Element;
@@ -34,7 +34,7 @@ import org.w3c.dom.stylesheets.StyleSheetList;
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
-public class DocumentStyleImpl extends DocumentImpl implements XMLDocument, DocumentCSS {
+public class DocumentStyleImpl extends DocumentImpl implements DOMDocument, DocumentCSS {
public DocumentStyleImpl() {
super();
}
@@ -90,7 +90,7 @@ public class DocumentStyleImpl extends DocumentImpl implements XMLDocument, Docu
return cloned;
}
- protected void setModel(XMLModel model) {
+ protected void setModel(DOMModel model) {
super.setModel(model);
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/ElementStyleImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/ElementStyleImpl.java
index 6d97898507..a3be1e6abf 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/ElementStyleImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/ElementStyleImpl.java
@@ -19,7 +19,7 @@ package org.eclipse.wst.html.core.document;
import org.eclipse.wst.css.core.adapters.IStyleDeclarationAdapter;
import org.eclipse.wst.css.core.adapters.IStyleSheetAdapter;
import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -28,7 +28,7 @@ import org.w3c.dom.css.ElementCSSInlineStyle;
import org.w3c.dom.stylesheets.LinkStyle;
import org.w3c.dom.stylesheets.StyleSheet;
-public class ElementStyleImpl extends ElementImpl implements XMLElement, ElementCSSInlineStyle, LinkStyle {
+public class ElementStyleImpl extends ElementImpl implements DOMElement, ElementCSSInlineStyle, LinkStyle {
public ElementStyleImpl() {
super();
}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLConverter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLConverter.java
index afbeeeebfd..f5e5f927e2 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLConverter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLConverter.java
@@ -25,9 +25,9 @@ import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLDocumentType;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMDocumentType;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -45,7 +45,7 @@ public class HTMLConverter {
}
- public void cleanupModel(XMLModel model) {
+ public void cleanupModel(DOMModel model) {
if (model == null)
return;
@@ -92,7 +92,7 @@ public class HTMLConverter {
* declaratoin: "data" for XML declaration, such as "version=\"1.0\""
* publicId: publicId for DOCTYPE declaration
*/
- public void convert(XMLModel model, String declaration, String publicId) {
+ public void convert(DOMModel model, String declaration, String publicId) {
if (model == null)
return;
setDeclaration(model, declaration, publicId);
@@ -104,7 +104,7 @@ public class HTMLConverter {
* publicId: publicId for DOCTYPE declaration
*/
public void convert(InputStream input, OutputStream output, String declaration, String publicId) throws UnsupportedEncodingException, IOException, CoreException {
- XMLModel model = readModel(input);
+ DOMModel model = readModel(input);
if (model == null)
return;
try {
@@ -122,7 +122,7 @@ public class HTMLConverter {
* publicId: publicId for DOCTYPE declaration
*/
public void convert(IFile file, String declaration, String publicId) throws IOException, CoreException {
- XMLModel model = readModel(file);
+ DOMModel model = readModel(file);
if (model == null)
return;
try {
@@ -137,7 +137,7 @@ public class HTMLConverter {
/**
*/
- private static void insertBreak(XMLModel model, Node node) {
+ private static void insertBreak(DOMModel model, Node node) {
if (model == null || node == null)
return;
if (node.getNodeType() == Node.TEXT_NODE)
@@ -163,42 +163,42 @@ public class HTMLConverter {
/**
*/
- private XMLModel readModel(InputStream input) throws IOException, UnsupportedEncodingException {
+ private DOMModel readModel(InputStream input) throws IOException, UnsupportedEncodingException {
if (input == null)
return null;
// create temporary model
String id = input.toString() + ".html"; //$NON-NLS-1$
IModelManager manager = StructuredModelManager.getModelManager();
IStructuredModel model = manager.getModelForEdit(id, input, null);
- if (!(model instanceof XMLModel)) {
+ if (!(model instanceof DOMModel)) {
if (model == null)
model.releaseFromEdit();
return null;
}
- return (XMLModel) model;
+ return (DOMModel) model;
}
/**
*/
- private XMLModel readModel(IFile file) throws IOException, CoreException {
+ private DOMModel readModel(IFile file) throws IOException, CoreException {
if (file == null)
return null;
IModelManager manager = StructuredModelManager.getModelManager();
IStructuredModel model = manager.getModelForEdit(file);
- if (!(model instanceof XMLModel)) {
+ if (!(model instanceof DOMModel)) {
if (model != null)
model.releaseFromEdit();
return null;
}
- return (XMLModel) model;
+ return (DOMModel) model;
}
/**
*/
- public void setDeclaration(XMLModel model, String declaration, String publicId) {
+ public void setDeclaration(DOMModel model, String declaration, String publicId) {
if (model == null)
return;
- XMLDocument document = model.getDocument();
+ DOMDocument document = model.getDocument();
if (document == null)
return;
@@ -214,7 +214,7 @@ public class HTMLConverter {
child = child.getNextSibling();
}
}
- XMLDocumentType docType = (XMLDocumentType) document.getDoctype();
+ DOMDocumentType docType = (DOMDocumentType) document.getDoctype();
if (declaration != null) {
if (pi != null) {
@@ -236,13 +236,13 @@ public class HTMLConverter {
if (!name.equals(docType.getName())) { // replace
Node parent = docType.getParentNode();
child = docType;
- docType = (XMLDocumentType) document.createDoctype(name);
+ docType = (DOMDocumentType) document.createDoctype(name);
parent.insertBefore(docType, child);
parent.removeChild(child);
}
}
else {
- docType = (XMLDocumentType) document.createDoctype(name);
+ docType = (DOMDocumentType) document.createDoctype(name);
document.insertBefore(docType, child);
insertBreak(model, child);
}
@@ -268,7 +268,7 @@ public class HTMLConverter {
/**
*/
- private void writeModel(XMLModel model, OutputStream output) throws UnsupportedEncodingException, IOException, CoreException {
+ private void writeModel(DOMModel model, OutputStream output) throws UnsupportedEncodingException, IOException, CoreException {
if (model == null || output == null)
return;
model.save();
@@ -276,7 +276,7 @@ public class HTMLConverter {
/**
*/
- private void writeModel(XMLModel model, IFile file) throws IOException, CoreException {
+ private void writeModel(DOMModel model, IFile file) throws IOException, CoreException {
if (model == null || file == null)
return;
IStructuredDocument structuredDocument = model.getStructuredDocument();
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapter.java
index 6277cfff08..525645c932 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapter.java
@@ -24,9 +24,9 @@ import org.eclipse.wst.sse.ui.contentproperties.ContentSettings;
import org.eclipse.wst.sse.ui.contentproperties.ContentSettingsChangeSubject;
import org.eclipse.wst.sse.ui.contentproperties.IContentSettings;
import org.eclipse.wst.sse.ui.contentproperties.IContentSettingsListener;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLDocumentType;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMDocumentType;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapter;
import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapterImpl;
import org.w3c.dom.DOMImplementation;
@@ -54,7 +54,7 @@ public class HTMLDocumentTypeAdapter extends DocumentTypeAdapterImpl implements
/**
*/
- protected HTMLDocumentTypeAdapter(XMLDocument document, HTMLDocumentTypeAdapterFactory factory) {
+ protected HTMLDocumentTypeAdapter(DOMDocument document, HTMLDocumentTypeAdapterFactory factory) {
super(document);
this.factory = factory;
@@ -70,10 +70,10 @@ public class HTMLDocumentTypeAdapter extends DocumentTypeAdapterImpl implements
public void contentSettingsChanged(IResource resource) {
if (resource == null)
return;
- XMLDocument document = getDocument();
+ DOMDocument document = getDocument();
if (document == null)
return;
- XMLModel model = document.getModel();
+ DOMModel model = document.getModel();
if (model == null)
return;
IFile file = getFile(model);
@@ -90,10 +90,10 @@ public class HTMLDocumentTypeAdapter extends DocumentTypeAdapterImpl implements
/**
*/
private void documentTypeChanged() {
- XMLDocument document = getDocument();
+ DOMDocument document = getDocument();
if (document == null)
return; // error
- XMLModel model = document.getModel();
+ DOMModel model = document.getModel();
if (model == null)
return; // error
@@ -186,8 +186,8 @@ public class HTMLDocumentTypeAdapter extends DocumentTypeAdapterImpl implements
/**
*/
- private XMLDocumentType findDocumentType(XMLDocument document) {
- XMLDocumentType documentType = (XMLDocumentType) document.getDoctype();
+ private DOMDocumentType findDocumentType(DOMDocument document) {
+ DOMDocumentType documentType = (DOMDocumentType) document.getDoctype();
if (documentType != null && documentType.getExistingAdapter(DocumentTypeAdapter.class) == null) {
// watch future changes
documentType.addAdapter(this);
@@ -284,7 +284,7 @@ public class HTMLDocumentTypeAdapter extends DocumentTypeAdapterImpl implements
public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
if (notifier == null)
return;
- if (notifier instanceof XMLDocument) {
+ if (notifier instanceof DOMDocument) {
if (eventType != INodeNotifier.STRUCTURE_CHANGED)
return;
} else {
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapterFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapterFactory.java
index 3093dce73f..aeadbe0110 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapterFactory.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLDocumentTypeAdapterFactory.java
@@ -18,7 +18,7 @@ import org.eclipse.wst.sse.core.IAdapterFactory;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.xml.core.document.XMLDocument;
+import org.eclipse.wst.xml.core.document.DOMDocument;
import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapter;
/**
@@ -58,9 +58,9 @@ public class HTMLDocumentTypeAdapterFactory implements IAdapterFactory, Preferen
DocumentTypeAdapter adapter = (DocumentTypeAdapter)notifier.getExistingAdapter(DocumentTypeAdapter.class);
if (adapter != null)
return adapter;
- if (!(notifier instanceof XMLDocument))
+ if (!(notifier instanceof DOMDocument))
return null;
- adapter = new HTMLDocumentTypeAdapter((XMLDocument) notifier, this);
+ adapter = new HTMLDocumentTypeAdapter((DOMDocument) notifier, this);
notifier.addAdapter(adapter);
fAdapter = adapter;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java
index 8d58d56c3f..5ec6c270ec 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java
@@ -16,8 +16,8 @@ import org.eclipse.wst.html.core.HTML40Namespace;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contentmodel.HTMLElementDeclaration;
import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLText;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMText;
import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
@@ -67,12 +67,12 @@ public class HTMLModelParserAdapter implements ModelParserAdapter {
public boolean canContain(Element element, Node child) {
if (element == null || child == null)
return false;
- XMLElement impl = (XMLElement) element;
+ DOMElement impl = (DOMElement) element;
if (child.getNodeType() == Node.ELEMENT_NODE) {
if (!impl.isGlobalTag())
return true; // non HTML tag
- XMLElement childElement = (XMLElement) child;
+ DOMElement childElement = (DOMElement) child;
CMElementDeclaration myDec = CMNodeUtil.getElementDeclaration(element);
if (myDec == null)
@@ -114,7 +114,7 @@ public class HTMLModelParserAdapter implements ModelParserAdapter {
Node parent = element.getParentNode();
if (parent != null && parent.getNodeType() == Node.ELEMENT_NODE) {
- XMLElement parentElement = (XMLElement) parent;
+ DOMElement parentElement = (DOMElement) parent;
if (!parentElement.hasStartTag() && !parentElement.hasEndTag()) {
if (!canContain(parentElement, child))
return false;
@@ -146,7 +146,7 @@ public class HTMLModelParserAdapter implements ModelParserAdapter {
for (Node parent = element.getParentNode(); parent != null; parent = parent.getParentNode()) {
if (parent.getNodeType() != Node.ELEMENT_NODE)
break;
- XMLElement parentElement = (XMLElement) parent;
+ DOMElement parentElement = (DOMElement) parent;
String parentName = parentElement.getTagName();
if (parentName == null)
continue;
@@ -162,7 +162,7 @@ public class HTMLModelParserAdapter implements ModelParserAdapter {
else if (child.getNodeType() == Node.TEXT_NODE) {
String tagName = impl.getTagName();
if (tagName != null && tagName.equalsIgnoreCase(HTML40Namespace.ElementName.EMBED)) {
- XMLText text = (XMLText) child;
+ DOMText text = (DOMText) child;
if (!text.isWhitespace())
return false;
}
@@ -260,7 +260,7 @@ public class HTMLModelParserAdapter implements ModelParserAdapter {
if (metaData == null)
metaData = new String();
- XMLElement element = (XMLElement) document.createElement(MetaData.PREFIX + type);
+ DOMElement element = (DOMElement) document.createElement(MetaData.PREFIX + type);
MetaDataAdapter adapter = new MetaDataAdapter(type);
if (isStartSpan) {
@@ -297,7 +297,7 @@ public class HTMLModelParserAdapter implements ModelParserAdapter {
/**
*/
- public boolean isEndTag(XMLElement element) {
+ public boolean isEndTag(DOMElement element) {
TagAdapter adapter = (TagAdapter) element.getExistingAdapter(TagAdapter.class);
if (adapter != null)
return adapter.isEndTag();
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/MetaDataAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/MetaDataAdapter.java
index 30c3a1fa62..a5f9b2f4ac 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/MetaDataAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/MetaDataAdapter.java
@@ -19,8 +19,8 @@ import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.document.TagAdapter;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
@@ -28,7 +28,7 @@ import org.eclipse.wst.xml.core.parser.XMLRegionContext;
*/
public class MetaDataAdapter implements TagAdapter, MetaData {
- private XMLElement element = null;
+ private DOMElement element = null;
private String type = null;
private String data = null;
private String endData = null;
@@ -124,7 +124,7 @@ public class MetaDataAdapter implements TagAdapter, MetaData {
/**
*/
- private String getDelimiter(XMLModel model) {
+ private String getDelimiter(DOMModel model) {
String delim = null;
if (model != null) {
IStructuredDocument structuredDocument = model.getStructuredDocument();
@@ -151,7 +151,7 @@ public class MetaDataAdapter implements TagAdapter, MetaData {
/**
*/
- public String getEndTag(XMLElement element) {
+ public String getEndTag(DOMElement element) {
StringBuffer buffer = new StringBuffer();
if (element.isJSPTag())
buffer.append("<%--");//$NON-NLS-1$
@@ -181,7 +181,7 @@ public class MetaDataAdapter implements TagAdapter, MetaData {
/**
*/
- public String getStartTag(XMLElement element) {
+ public String getStartTag(DOMElement element) {
StringBuffer buffer = new StringBuffer();
if (element.isJSPTag())
buffer.append("<%--");//$NON-NLS-1$
@@ -266,7 +266,7 @@ public class MetaDataAdapter implements TagAdapter, MetaData {
/**
*/
- public void setElement(XMLElement element) {
+ public void setElement(DOMElement element) {
this.element = element;
if (this.element != null) {
@@ -287,7 +287,7 @@ public class MetaDataAdapter implements TagAdapter, MetaData {
if (isRuntimeContainer())
return;
- XMLModel model = this.element.getModel();
+ DOMModel model = this.element.getModel();
if (model == null)
return;
IStructuredDocument structuredDocument = model.getStructuredDocument();
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/UnknownTagAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/UnknownTagAdapter.java
index c45196e8cc..8e9a0e8e81 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/UnknownTagAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/UnknownTagAdapter.java
@@ -13,7 +13,7 @@ package org.eclipse.wst.html.core.document;
import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.eclipse.wst.xml.core.internal.document.TagAdapter;
/**
@@ -31,7 +31,7 @@ public class UnknownTagAdapter implements TagAdapter {
/**
*/
- public String getEndTag(XMLElement element) {
+ public String getEndTag(DOMElement element) {
String tag = null;
if (this.endTag != null) {
tag = this.endTag;
@@ -42,7 +42,7 @@ public class UnknownTagAdapter implements TagAdapter {
/**
*/
- public String getStartTag(XMLElement element) {
+ public String getStartTag(DOMElement element) {
String tag = null;
if (this.startTag != null) {
tag = this.startTag;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLDocumentLoader.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLDocumentLoader.java
index 71c1185c0f..ca3dafd596 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLDocumentLoader.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLDocumentLoader.java
@@ -36,7 +36,7 @@ import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
import org.eclipse.wst.sse.core.parser.BlockMarker;
import org.eclipse.wst.sse.core.parser.RegionParser;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;
import org.eclipse.wst.xml.core.internal.parser.XMLStructuredDocumentReParser;
import org.eclipse.wst.xml.core.internal.propagate.PropagatingAdapterFactoryImpl;
@@ -141,7 +141,7 @@ public class HTMLDocumentLoader extends AbstractDocumentLoader {
// I noticed the ProagatingAdapterFactory was being added,
// that that the ProagatingAdapterAdapter was not being
// preload adapted -- I'm assuing it ALWAYS has to be.
- XMLModel domModel = (XMLModel) structuredModel;
+ DOMModel domModel = (DOMModel) structuredModel;
// if there is a model in the adapter, this will adapt it to
// first node. After that the PropagatingAdater spreads over the
// children being
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLModelLoader.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLModelLoader.java
index e40ad78334..972c2977a7 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLModelLoader.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/encoding/HTMLModelLoader.java
@@ -28,7 +28,7 @@ import org.eclipse.wst.sse.core.document.IDocumentLoader;
import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
import org.eclipse.wst.sse.core.parser.BlockMarker;
import org.eclipse.wst.sse.core.util.Debug;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.DebugAdapterFactory;
import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;
import org.eclipse.wst.xml.core.internal.propagate.PropagatingAdapterFactoryImpl;
@@ -86,7 +86,7 @@ public class HTMLModelLoader extends AbstractModelLoader {
// I noticed the ProagatingAdapterFactory was being added,
// that that the ProagatingAdapterAdapter was not being
// preload adapted -- I'm assuing it ALWAYS has to be.
- XMLModel domModel = (XMLModel) structuredModel;
+ DOMModel domModel = (DOMModel) structuredModel;
// if there is a model in the adapter, this will adapt it to
// first node. After that the PropagatingAdater spreads over the
// children being
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/EmbeddedCSSFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/EmbeddedCSSFormatter.java
index 7468cd6709..b70b412f18 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/EmbeddedCSSFormatter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/EmbeddedCSSFormatter.java
@@ -19,8 +19,8 @@ import org.eclipse.wst.css.core.format.CSSSourceFormatter;
import org.eclipse.wst.html.core.HTMLFormatContraints;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.document.XMLText;
+import org.eclipse.wst.xml.core.document.DOMNode;
+import org.eclipse.wst.xml.core.document.DOMText;
// nakamori_TODO: check and remove
@@ -35,10 +35,10 @@ public class EmbeddedCSSFormatter extends HTMLFormatter {
/**
*/
- protected void formatNode(XMLNode node, HTMLFormatContraints contraints) {
+ protected void formatNode(DOMNode node, HTMLFormatContraints contraints) {
if (node == null)
return;
- XMLText text = (XMLText) node;
+ DOMText text = (DOMText) node;
String source = getCSSContent(node);
if (source == null) { // fallback
@@ -53,7 +53,7 @@ public class EmbeddedCSSFormatter extends HTMLFormatter {
/**
*/
- private String getCSSContent(XMLNode text) {
+ private String getCSSContent(DOMNode text) {
ICSSModel model = getCSSModel(text);
if (model == null)
return null;
@@ -73,7 +73,7 @@ public class EmbeddedCSSFormatter extends HTMLFormatter {
/**
*/
- private ICSSModel getCSSModel(XMLNode text) {
+ private ICSSModel getCSSModel(DOMNode text) {
if (text == null)
return null;
INodeNotifier notifier = (INodeNotifier) text.getParentNode();
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLElementFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLElementFormatter.java
index f219d94021..9b9bd5fa42 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLElementFormatter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLElementFormatter.java
@@ -22,8 +22,8 @@ import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.format.IStructuredFormatPreferencesXML;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.w3c.dom.Attr;
@@ -57,7 +57,7 @@ public class HTMLElementFormatter extends HTMLFormatter implements XMLRegionCont
/**
*/
- private void formatEndTag(XMLElement element, HTMLFormatContraints contraints) {
+ private void formatEndTag(DOMElement element, HTMLFormatContraints contraints) {
IStructuredDocumentRegion endStructuredDocumentRegion = element.getEndStructuredDocumentRegion();
if (endStructuredDocumentRegion == null)
return;
@@ -102,10 +102,10 @@ public class HTMLElementFormatter extends HTMLFormatter implements XMLRegionCont
/**
*/
- protected void formatNode(XMLNode node, HTMLFormatContraints contraints) {
+ protected void formatNode(DOMNode node, HTMLFormatContraints contraints) {
if (node == null)
return;
- XMLElement element = (XMLElement) node;
+ DOMElement element = (DOMElement) node;
formatStartTag(element, contraints);
@@ -116,7 +116,7 @@ public class HTMLElementFormatter extends HTMLFormatter implements XMLRegionCont
/**
*/
- private void formatStartTag(XMLElement element, HTMLFormatContraints contraints) {
+ private void formatStartTag(DOMElement element, HTMLFormatContraints contraints) {
IStructuredDocumentRegion startStructuredDocumentRegion = element.getStartStructuredDocumentRegion();
if (startStructuredDocumentRegion == null)
return;
@@ -286,7 +286,7 @@ public class HTMLElementFormatter extends HTMLFormatter implements XMLRegionCont
String value = getCSSValue(attr);
if (value == null)
return;
- String oldValue = ((XMLNode) attr).getValueSource();
+ String oldValue = ((DOMNode) attr).getValueSource();
if (oldValue != null && value.equals(oldValue))
return;
attr.setValue(value);
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java
index 61612486bf..01948fbab0 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java
@@ -23,9 +23,9 @@ import org.eclipse.wst.sse.core.internal.format.IStructuredFormatter;
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.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.format.IStructuredFormatPreferencesXML;
import org.eclipse.wst.xml.core.format.StructuredFormatPreferencesXML;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
@@ -101,13 +101,13 @@ public class HTMLFormatter implements IStructuredFormatter {
if (parent.getNodeType() == Node.DOCUMENT_NODE) {
if (node.getNodeType() == Node.ELEMENT_NODE) {
// do not insert break after unclosed tag
- if (!((XMLElement) node).isClosed())
+ if (!((DOMElement) node).isClosed())
return false;
}
return true;
}
else if (parent.getNodeType() == Node.ELEMENT_NODE) {
- XMLElement element = (XMLElement) parent;
+ DOMElement element = (DOMElement) parent;
// do not insert break before missing end tag
if (next == null && element.getEndStructuredDocumentRegion() == null)
return false;
@@ -128,7 +128,7 @@ public class HTMLFormatter implements IStructuredFormatter {
}
if (node.getNodeType() == Node.ELEMENT_NODE) {
- XMLElement element = (XMLElement) node;
+ DOMElement element = (DOMElement) node;
CMElementDeclaration decl = getElementDeclaration(element);
if (canInsertBreakAfter(decl)) {
// spcial for BR
@@ -172,7 +172,7 @@ public class HTMLFormatter implements IStructuredFormatter {
return true;
}
else if (parent.getNodeType() == Node.ELEMENT_NODE) {
- XMLElement element = (XMLElement) parent;
+ DOMElement element = (DOMElement) parent;
// do not insert break after missing start tag
if (prev == null && element.getStartStructuredDocumentRegion() == null)
return false;
@@ -216,11 +216,11 @@ public class HTMLFormatter implements IStructuredFormatter {
/**
*/
public void format(Node node, IStructuredFormatContraints contraints) {
- if (node instanceof XMLNode && contraints instanceof HTMLFormatContraints)
- format((XMLNode) node, (HTMLFormatContraints) contraints);
+ if (node instanceof DOMNode && contraints instanceof HTMLFormatContraints)
+ format((DOMNode) node, (HTMLFormatContraints) contraints);
}
- public void format(XMLNode node, HTMLFormatContraints contraints) {
+ public void format(DOMNode node, HTMLFormatContraints contraints) {
if (node == null)
return;
if (node.getParentNode() == null)
@@ -239,7 +239,7 @@ public class HTMLFormatter implements IStructuredFormatter {
/**
*/
- protected void formatChildNodes(XMLNode node, HTMLFormatContraints contraints) {
+ protected void formatChildNodes(DOMNode node, HTMLFormatContraints contraints) {
if (node == null)
return;
if (!node.hasChildNodes())
@@ -256,11 +256,11 @@ public class HTMLFormatter implements IStructuredFormatter {
}
boolean insertBreak = true;
- XMLNode child = (XMLNode) node.getFirstChild();
+ DOMNode child = (DOMNode) node.getFirstChild();
while (child != null) {
if (child.getParentNode() != node)
break;
- XMLNode next = (XMLNode) child.getNextSibling();
+ DOMNode next = (DOMNode) child.getNextSibling();
if (insertBreak && canInsertBreakBefore(child)) {
insertBreakBefore(child, contraints);
@@ -294,7 +294,7 @@ public class HTMLFormatter implements IStructuredFormatter {
/**
*/
- protected void formatNode(XMLNode node, HTMLFormatContraints contraints) {
+ protected void formatNode(DOMNode node, HTMLFormatContraints contraints) {
if (node == null)
return;
@@ -319,7 +319,7 @@ public class HTMLFormatter implements IStructuredFormatter {
return null;
StringBuffer buffer = new StringBuffer();
- String delim = ((XMLNode) node).getModel().getStructuredDocument().getLineDelimiter();
+ String delim = ((DOMNode) node).getModel().getStructuredDocument().getLineDelimiter();
if (delim != null && delim.length() > 0)
buffer.append(delim);
@@ -329,10 +329,10 @@ public class HTMLFormatter implements IStructuredFormatter {
if (parent.getNodeType() != Node.ELEMENT_NODE)
break;
// ignore omitted tag
- if (((XMLNode) parent).getStartStructuredDocumentRegion() == null)
+ if (((DOMNode) parent).getStartStructuredDocumentRegion() == null)
continue;
- XMLElement element = (XMLElement) parent;
+ DOMElement element = (DOMElement) parent;
if (element.getPrefix() != null) {
String localName = element.getLocalName();
// special for html:html
@@ -383,7 +383,7 @@ public class HTMLFormatter implements IStructuredFormatter {
/**
*/
- protected void insertBreakAfter(XMLNode node, HTMLFormatContraints contraints) {
+ protected void insertBreakAfter(DOMNode node, HTMLFormatContraints contraints) {
if (node == null)
return;
if (node.getNodeType() == Node.TEXT_NODE)
@@ -400,7 +400,7 @@ public class HTMLFormatter implements IStructuredFormatter {
}
else if (next.getNodeType() == Node.TEXT_NODE) {
if (contraints != null && contraints.getFormatWithSiblingIndent()) {
- XMLNode text = (XMLNode) next;
+ DOMNode text = (DOMNode) next;
IStructuredFormatter formatter = HTMLFormatterFactory.getInstance().createFormatter(text, getFormatPreferences());
if (formatter instanceof HTMLTextFormatter) {
HTMLTextFormatter textFormatter = (HTMLTextFormatter) formatter;
@@ -421,7 +421,7 @@ public class HTMLFormatter implements IStructuredFormatter {
/**
*/
- protected void insertBreakBefore(XMLNode node, HTMLFormatContraints contraints) {
+ protected void insertBreakBefore(DOMNode node, HTMLFormatContraints contraints) {
if (node == null)
return;
if (node.getNodeType() == Node.TEXT_NODE)
@@ -434,7 +434,7 @@ public class HTMLFormatter implements IStructuredFormatter {
String spaces = null;
if (prev != null && prev.getNodeType() == Node.TEXT_NODE) {
if (contraints != null && contraints.getFormatWithSiblingIndent()) {
- XMLNode text = (XMLNode) prev;
+ DOMNode text = (DOMNode) prev;
IStructuredFormatter formatter = HTMLFormatterFactory.getInstance().createFormatter(text, getFormatPreferences());
if (formatter instanceof HTMLTextFormatter) {
HTMLTextFormatter textFormatter = (HTMLTextFormatter) formatter;
@@ -495,7 +495,7 @@ public class HTMLFormatter implements IStructuredFormatter {
/**
*/
- protected void replaceSource(XMLModel model, int offset, int length, String source) {
+ protected void replaceSource(DOMModel model, int offset, int length, String source) {
if (model == null)
return;
IStructuredDocument structuredDocument = model.getStructuredDocument();
@@ -557,7 +557,7 @@ public class HTMLFormatter implements IStructuredFormatter {
return;
if (node == null)
return;
- IStructuredDocument structuredDocument = ((XMLNode) node).getStructuredDocument();
+ IStructuredDocument structuredDocument = ((DOMNode) node).getStructuredDocument();
if (structuredDocument == null)
return; // error
@@ -567,7 +567,7 @@ public class HTMLFormatter implements IStructuredFormatter {
if (lineWidth < 0)
return;
- int offset = ((XMLNode) node).getStartOffset();
+ int offset = ((DOMNode) node).getStartOffset();
int line = structuredDocument.getLineOfOffset(offset);
int lineOffset = 0;
try {
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java
index fc4cafc707..f5366ebe78 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java
@@ -15,9 +15,9 @@ package org.eclipse.wst.html.core.format;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.HTMLFormatContraints;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.document.XMLText;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMNode;
+import org.eclipse.wst.xml.core.document.DOMText;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.w3c.dom.Element;
@@ -37,7 +37,7 @@ public class HTMLTextFormatter extends HTMLFormatter {
/**
*/
- private boolean canFormatText(XMLText text) {
+ private boolean canFormatText(DOMText text) {
if (text == null)
return false;
@@ -50,7 +50,7 @@ public class HTMLTextFormatter extends HTMLFormatter {
Node parent = text.getParentNode();
if (parent != null && parent.getNodeType() == Node.ELEMENT_NODE) {
- XMLElement element = (XMLElement) parent;
+ DOMElement element = (DOMElement) parent;
if (!element.isGlobalTag() && !text.isWhitespace())
return false;
}
@@ -78,7 +78,7 @@ public class HTMLTextFormatter extends HTMLFormatter {
/**
*/
- private boolean canRemoveHeadingSpaces(XMLNode node) {
+ private boolean canRemoveHeadingSpaces(DOMNode node) {
if (node == null)
return false;
if (node.getPreviousSibling() != null)
@@ -96,7 +96,7 @@ public class HTMLTextFormatter extends HTMLFormatter {
/**
*/
- private boolean canRemoveTailingSpaces(XMLNode node) {
+ private boolean canRemoveTailingSpaces(DOMNode node) {
if (node == null)
return false;
if (node.getNextSibling() != null)
@@ -114,20 +114,20 @@ public class HTMLTextFormatter extends HTMLFormatter {
/**
*/
- protected void formatNode(XMLNode node, HTMLFormatContraints contraints) {
+ protected void formatNode(DOMNode node, HTMLFormatContraints contraints) {
formatText(node, contraints, FORMAT_ALL); // full format
}
/**
*/
- protected void formatText(XMLNode node, HTMLFormatContraints contraints, int mode) {
+ protected void formatText(DOMNode node, HTMLFormatContraints contraints, int mode) {
if (node == null)
return;
Node parent = node.getParentNode();
if (parent == null)
return;
- XMLText text = (XMLText) node;
+ DOMText text = (DOMText) node;
String source = text.getSource();
if (!canFormatText(text)) {
@@ -142,7 +142,7 @@ public class HTMLTextFormatter extends HTMLFormatter {
if (mode == FORMAT_HEAD) {
Node next = node.getNextSibling();
while (next != null && next.getNodeType() == Node.TEXT_NODE) {
- XMLText nextText = (XMLText) next;
+ DOMText nextText = (DOMText) next;
length += (nextText.getEndOffset() - nextText.getStartOffset());
String nextSource = nextText.getSource();
if (nextSource != null && nextSource.length() > 0) {
@@ -157,7 +157,7 @@ public class HTMLTextFormatter extends HTMLFormatter {
else if (mode == FORMAT_TAIL) {
Node prev = node.getPreviousSibling();
while (prev != null && prev.getNodeType() == Node.TEXT_NODE) {
- XMLText prevText = (XMLText) prev;
+ DOMText prevText = (DOMText) prev;
offset = prevText.getStartOffset();
length += (prevText.getEndOffset() - offset);
String prevSource = prevText.getSource();
@@ -180,7 +180,7 @@ public class HTMLTextFormatter extends HTMLFormatter {
boolean removeSpaces = false;
if (parent.getNodeType() == Node.ELEMENT_NODE) {
// check if tags are omitted
- XMLNode element = (XMLNode) parent;
+ DOMNode element = (DOMNode) parent;
if (node.getPreviousSibling() == null && element.getStartStructuredDocumentRegion() == null) {
removeSpaces = true;
}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractCSSModelAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractCSSModelAdapter.java
index edee71b34c..1583b795d2 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractCSSModelAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractCSSModelAdapter.java
@@ -20,7 +20,7 @@ import org.eclipse.wst.css.core.internal.document.CSSModelImpl;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Element;
/**
@@ -43,7 +43,7 @@ public abstract class AbstractCSSModelAdapter implements ICSSModelAdapter {
// create embedded CSS model (not for external CSS)
if (getElement() == null)
return null;
- IStructuredModel baseModel = ((XMLNode) getElement()).getModel();
+ IStructuredModel baseModel = ((DOMNode) getElement()).getModel();
ICSSModel newModel = (ICSSModel) baseModel.getModelManager().createUnManagedStructuredModelFor(CSS_ID);
((CSSModelImpl) newModel).setOwnerDOMNode(getElement());
return newModel;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractStyleSheetAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractStyleSheetAdapter.java
index 6823541f6a..08ae08f475 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractStyleSheetAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/AbstractStyleSheetAdapter.java
@@ -23,9 +23,9 @@ import org.eclipse.wst.css.core.event.ICSSStyleListener;
import org.eclipse.wst.css.core.util.ImportedCollector;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLModelNotifier;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
+import org.eclipse.wst.xml.core.internal.document.XMLModelNotifier;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -186,10 +186,10 @@ public abstract class AbstractStyleSheetAdapter extends AbstractCSSModelAdapter
* @param srcModel com.ibm.sed.css.model.interfaces.ICSSModel
*/
public void styleUpdate(ICSSModel srcModel) {
- XMLNode node = (XMLNode) getElement();
+ DOMNode node = (DOMNode) getElement();
if (node == null)
return;
- XMLModel model = node.getModel();
+ DOMModel model = node.getModel();
if (model == null)
return;
XMLModelNotifier notifier = model.getModelNotifier();
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/HTMLDocumentAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/HTMLDocumentAdapter.java
index a2ecc232dc..cc7f8a03c5 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/HTMLDocumentAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/HTMLDocumentAdapter.java
@@ -30,7 +30,7 @@ import org.eclipse.wst.html.core.HTML40Namespace;
import org.eclipse.wst.html.core.contentmodel.JSP11Namespace;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -57,7 +57,7 @@ public class HTMLDocumentAdapter implements IStyleSheetListAdapter, StyleSheetLi
/**
*/
private void addStyleSheet(Element node) {
- XMLElement element = (XMLElement) node;
+ DOMElement element = (DOMElement) node;
String tagName = element.getTagName();
if (tagName == null)
return;
@@ -265,7 +265,7 @@ public class HTMLDocumentAdapter implements IStyleSheetListAdapter, StyleSheetLi
}
if (node == null || node.getNodeType() != Node.ELEMENT_NODE)
return;
- XMLElement element = (XMLElement) node;
+ DOMElement element = (DOMElement) node;
String tagName = element.getTagName();
if (tagName == null)
return;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/LinkElementAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/LinkElementAdapter.java
index 150408d8cb..21f3c85712 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/LinkElementAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/LinkElementAdapter.java
@@ -21,8 +21,8 @@ import org.eclipse.wst.css.core.document.ICSSModel;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.util.URIResolver;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -69,7 +69,7 @@ public class LinkElementAdapter extends AbstractStyleSheetAdapter {
// create phantom(broken link) external CSS model
if (getElement() == null)
return null;
- IStructuredModel baseModel = ((XMLNode) getElement()).getModel();
+ IStructuredModel baseModel = ((DOMNode) getElement()).getModel();
ICSSModel newModel = (ICSSModel) baseModel.getModelManager().createUnManagedStructuredModelFor(CSS_ID);
// calculate base location and set
@@ -145,7 +145,7 @@ public class LinkElementAdapter extends AbstractStyleSheetAdapter {
removed();
replaceModel = true;
- XMLNode node = (XMLNode) getElement();
+ DOMNode node = (DOMNode) getElement();
if (node != null) {
node.notify(INodeNotifier.CHANGE, getElement().getAttributeNode(org.eclipse.wst.html.core.HTML40Namespace.ATTR_NAME_HREF), null, null, node.getStartOffset());
}
@@ -224,7 +224,7 @@ public class LinkElementAdapter extends AbstractStyleSheetAdapter {
Element element = getElement();
String href = element.getAttribute("href");//$NON-NLS-1$
- XMLModel baseModel = ((XMLNode) element).getModel();
+ DOMModel baseModel = ((DOMNode) element).getModel();
if (baseModel == null)
return null;
Object id = baseModel.getId();
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAttrAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAttrAdapter.java
index 4ae3cafa01..b758f0eb9f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAttrAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAttrAdapter.java
@@ -26,7 +26,7 @@ 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.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -196,12 +196,12 @@ public class StyleAttrAdapter extends AbstractCSSModelAdapter implements IStruct
else {
Attr attr = element.getAttributeNode(STYLE);
if (attr != null) {
- ((XMLNode) attr).setValueSource(value);
+ ((DOMNode) attr).setValueSource(value);
}
else {
Document document = element.getOwnerDocument();
attr = document.createAttribute(STYLE);
- ((XMLNode) attr).setValueSource(value);
+ ((DOMNode) attr).setValueSource(value);
element.setAttributeNode(attr);
}
}
@@ -233,7 +233,7 @@ public class StyleAttrAdapter extends AbstractCSSModelAdapter implements IStruct
String value = null;
Attr attr = element.getAttributeNode(org.eclipse.wst.html.core.HTML40Namespace.ATTR_NAME_STYLE);
if (attr != null)
- value = ((XMLNode) attr).getValueSource();
+ value = ((DOMNode) attr).getValueSource();
structuredDocument.setText(this, value);
notifyStyleChanged(element);
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleElementAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleElementAdapter.java
index 7a8479fcdf..b38ccb9cc1 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleElementAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleElementAdapter.java
@@ -26,8 +26,8 @@ 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.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -66,7 +66,7 @@ public class StyleElementAdapter extends AbstractStyleSheetAdapter implements IS
Node child = element.getFirstChild();
if (child == null || child.getNodeType() != Node.TEXT_NODE)
return;
- XMLNode content = (XMLNode) child;
+ DOMNode content = (DOMNode) child;
int oldLength = content.getEndOffset() - content.getStartOffset();
// get new content length
@@ -214,7 +214,7 @@ public class StyleElementAdapter extends AbstractStyleSheetAdapter implements IS
/**
*/
private Object getRequesterH2C() {
- return (getElement() != null && ((XMLNode) getElement()).getModel() != null) ? (Object) ((XMLNode) getElement()).getModel() : this;
+ return (getElement() != null && ((DOMNode) getElement()).getModel() != null) ? (Object) ((DOMNode) getElement()).getModel() : this;
}
/**
@@ -337,10 +337,10 @@ public class StyleElementAdapter extends AbstractStyleSheetAdapter implements IS
* Apply changes from CSS sub-model to HTML model
*/
private void replaceData(int offset, int length, String data) {
- XMLNode element = (XMLNode) getElement();
+ DOMNode element = (DOMNode) getElement();
if (element == null)
return;
- XMLModel ownerModel = element.getModel();
+ DOMModel ownerModel = element.getModel();
if (ownerModel == null)
return;
IStructuredDocument structuredDocument = ownerModel.getStructuredDocument();
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/URLModelProvider.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/URLModelProvider.java
index de2fed93fd..9c441dff40 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/URLModelProvider.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/URLModelProvider.java
@@ -38,8 +38,8 @@ import org.eclipse.wst.sse.core.internal.encoding.EncodingRule;
import org.eclipse.wst.sse.core.util.PathHelper;
import org.eclipse.wst.sse.core.util.ProjectResolver;
import org.eclipse.wst.sse.core.util.URIResolver;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapter;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -340,8 +340,8 @@ public class URLModelProvider {
* Utility to check the model is HTML family or not
*/
static private boolean isHTMLFamily(IStructuredModel model) {
- if (model instanceof XMLModel) {
- XMLDocument document = ((XMLModel) model).getDocument();
+ if (model instanceof DOMModel) {
+ DOMDocument document = ((DOMModel) model).getDocument();
DocumentTypeAdapter adapter = (DocumentTypeAdapter) document.getAdapterFor(DocumentTypeAdapter.class);
if (adapter != null)
return adapter.hasFeature(HTMLDocumentTypeConstants.HTML);
@@ -365,8 +365,8 @@ public class URLModelProvider {
// dmw_TODO needs to be changed to handle a content model
// of HTML or XHTML
if (isHTMLFamily(baseModel)) {
- final XMLModel xmlmodel = (XMLModel) baseModel;
- final XMLDocument doc = xmlmodel.getDocument();
+ final DOMModel xmlmodel = (DOMModel) baseModel;
+ final DOMDocument doc = xmlmodel.getDocument();
// look for <BASE> w/ href
final NodeList nl = doc.getElementsByTagName("BASE");//$NON-NLS-1$
if ((nl != null) && (nl.getLength() > 0)) {
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/AbstractNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/AbstractNodeCleanupHandler.java
index 2bf792102c..eebff9b133 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/AbstractNodeCleanupHandler.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/AbstractNodeCleanupHandler.java
@@ -19,7 +19,7 @@ import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences;
import org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
abstract class AbstractNodeCleanupHandler implements IStructuredCleanupHandler {
@@ -63,7 +63,7 @@ abstract class AbstractNodeCleanupHandler implements IStructuredCleanupHandler {
fProgressMonitor = progressMonitor;
}
- static protected StructuredDocumentEvent replaceSource(XMLModel model, Object requester, int offset, int length, String source) {
+ static protected StructuredDocumentEvent replaceSource(DOMModel model, Object requester, int offset, int length, String source) {
StructuredDocumentEvent result = null;
if (model == null)
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/CSSTextNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/CSSTextNodeCleanupHandler.java
index ae00325447..b879ba084f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/CSSTextNodeCleanupHandler.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/CSSTextNodeCleanupHandler.java
@@ -19,8 +19,8 @@ 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.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Node;
// nakamori_TODO: check and remove
@@ -30,7 +30,7 @@ public class CSSTextNodeCleanupHandler extends AbstractNodeCleanupHandler {
public Node cleanup(Node node) {
if (node == null)
return node;
- XMLModel model = ((XMLNode) node).getModel();
+ DOMModel model = ((DOMNode) node).getModel();
if (model == null)
return node;
IStructuredDocument structuredDocument = model.getStructuredDocument();
@@ -41,10 +41,10 @@ public class CSSTextNodeCleanupHandler extends AbstractNodeCleanupHandler {
if (content == null)
return node;
- int offset = ((XMLNode) node).getStartOffset();
- int length = ((XMLNode) node).getEndOffset() - offset;
+ int offset = ((DOMNode) node).getStartOffset();
+ int length = ((DOMNode) node).getEndOffset() - offset;
replaceSource(model, this, offset, length, content);
- return (XMLNode) model.getIndexedRegion(offset);
+ return (DOMNode) model.getIndexedRegion(offset);
}
/**
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java
index ca9f84a8c0..8b60b85770 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java
@@ -34,12 +34,12 @@ 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.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.ISourceGenerator;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
@@ -67,7 +67,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
protected static final char DOUBLE_QUOTE = '\"'; //$NON-NLS-1$
public Node cleanup(Node node) {
- XMLNode renamedNode = (XMLNode) cleanupChildren(node);
+ DOMNode renamedNode = (DOMNode) 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
@@ -76,8 +76,8 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
// 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();
+ if (!((DOMElement) renamedNode).isCommentTag() && (renamedNode.getStartStructuredDocumentRegion() != null)) {
+ DOMModel structuredModel = renamedNode.getModel();
// save start offset before insertTagClose()
// or else renamedNode.getStartOffset() will be zero if renamedNode replaced by insertTagClose()
@@ -88,7 +88,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
insertTagClose(structuredModel, startTagStructuredDocumentRegion);
// update renamedNode and startTagStructuredDocumentRegion after insertTagClose()
- renamedNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset);
+ renamedNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset);
startTagStructuredDocumentRegion = renamedNode.getStartStructuredDocumentRegion();
// for end tag
@@ -110,7 +110,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
return renamedNode;
}
- private boolean shouldIgnoreCase(XMLElement element) {
+ private boolean shouldIgnoreCase(DOMElement element) {
// case option can be applied to no namespace tags
return element.isGlobalTag();
/*
@@ -128,8 +128,8 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
*/
}
- protected void applyAttrNameCase(XMLNode node) {
- XMLElement element = (XMLElement) node;
+ protected void applyAttrNameCase(DOMNode node) {
+ DOMElement element = (DOMElement) node;
if (element.isCommentTag())
return; // do nothing
@@ -142,7 +142,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
int attributesLength = attributes.getLength();
for (int i = 0; i < attributesLength; i++) {
- XMLNode eachAttr = (XMLNode) attributes.item(i);
+ DOMNode eachAttr = (DOMNode) attributes.item(i);
String oldAttrName = eachAttr.getNodeName();
String newAttrName = oldAttrName;
// 254961 - all HTML tag names and attribute names should be in English
@@ -159,15 +159,15 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
int attrNameStartOffset = eachAttr.getStartOffset();
int attrNameLength = oldAttrName.length();
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
replaceSource(structuredModel, structuredDocument, attrNameStartOffset, attrNameLength, newAttrName);
}
}
}
- protected XMLNode applyTagNameCase(XMLNode node) {
- XMLElement element = (XMLElement) node;
+ protected DOMNode applyTagNameCase(DOMNode node) {
+ DOMElement element = (DOMElement) node;
if (element.isCommentTag())
return node; // do nothing
@@ -178,7 +178,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
String oldTagName = node.getNodeName();
String newTagName = oldTagName;
- XMLNode newNode = node;
+ DOMNode 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.
@@ -190,7 +190,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
else if (tagNameCase == CommonModelPreferenceNames.UPPER)
newTagName = oldTagName.toUpperCase(Locale.US);
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
IStructuredDocumentRegion startTagStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
@@ -202,7 +202,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
int startTagNameLength = startTagStructuredDocumentRegion.getTextEndOffset(startTagNameRegion) - startTagNameStartOffset;
replaceSource(structuredModel, structuredDocument, startTagNameStartOffset, startTagNameLength, newTagName);
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagNameStartOffset); // save new node
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagNameStartOffset); // save new node
}
}
@@ -234,10 +234,10 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
childNode = cleanupHandler.cleanup(childNode);
// get new parent node
- parentNode = (XMLNode) childNode.getParentNode();
+ parentNode = (DOMNode) childNode.getParentNode();
// get next child node
- childNode = (XMLNode) childNode.getNextSibling();
+ childNode = (DOMNode) childNode.getNextSibling();
}
}
@@ -246,10 +246,10 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
/**
*/
- protected void cleanupCSSAttrValue(XMLNode node) {
+ protected void cleanupCSSAttrValue(DOMNode node) {
if (node == null || node.getNodeType() != Node.ELEMENT_NODE)
return;
- XMLElement element = (XMLElement) node;
+ DOMElement element = (DOMElement) node;
if (!element.isGlobalTag())
return;
@@ -259,7 +259,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
String value = getCSSValue(attr);
if (value == null)
return;
- String oldValue = ((XMLNode) attr).getValueSource();
+ String oldValue = ((DOMNode) attr).getValueSource();
if (oldValue != null && value.equals(oldValue))
return;
attr.setValue(value);
@@ -302,7 +302,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
return buffer.toString();
}
- private boolean isEmptyElement(XMLElement element) {
+ private boolean isEmptyElement(DOMElement element) {
Document document = element.getOwnerDocument();
if (document == null)
// undefined tag, return default
@@ -321,12 +321,12 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
return (decl.getContentType() == CMElementDeclaration.EMPTY);
}
- protected XMLNode insertEndTag(XMLNode node) {
- XMLElement element = (XMLElement) node;
+ protected DOMNode insertEndTag(DOMNode node) {
+ DOMElement element = (DOMElement) node;
int startTagStartOffset = node.getStartOffset();
- XMLModel structuredModel = node.getModel();
- XMLNode newNode = null;
+ DOMModel structuredModel = node.getModel();
+ DOMNode newNode = null;
if (element.isCommentTag()) {
// do nothing
@@ -350,7 +350,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
String tagName = node.getNodeName();
String endTag = END_TAG_OPEN.concat(tagName).concat(TAG_CLOSE);
- XMLNode lastChild = (XMLNode) node.getLastChild();
+ DOMNode lastChild = (DOMNode) node.getLastChild();
int endTagStartOffset = 0;
if (lastChild != null)
// if this node has children, insert the end tag after the last child
@@ -363,14 +363,14 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
replaceSource(structuredModel, structuredDocument, endTagStartOffset, 0, endTag);
}
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save new node
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save new node
return newNode;
}
- protected XMLNode insertMissingTags(XMLNode node) {
+ protected DOMNode insertMissingTags(DOMNode node) {
boolean insertMissingTags = getCleanupPreferences().getInsertMissingTags();
- XMLNode newNode = node;
+ DOMNode newNode = node;
if (insertMissingTags) {
IStructuredDocumentRegion startTagStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
@@ -403,26 +403,26 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
return newNode;
}
- protected XMLNode insertStartTag(XMLNode node) {
- XMLElement element = (XMLElement) node;
+ protected DOMNode insertStartTag(DOMNode node) {
+ DOMElement element = (DOMElement) node;
if (element.isCommentTag())
return node; // do nothing
- XMLNode newNode = null;
+ DOMNode newNode = null;
String tagName = node.getNodeName();
String startTag = START_TAG_OPEN.concat(tagName).concat(TAG_CLOSE);
int startTagStartOffset = node.getStartOffset();
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
replaceSource(structuredModel, structuredDocument, startTagStartOffset, 0, startTag);
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save new node
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save new node
return newNode;
}
- protected void insertTagClose(XMLModel structuredModel, IStructuredDocumentRegion flatNode) {
+ protected void insertTagClose(DOMModel structuredModel, IStructuredDocumentRegion flatNode) {
if ((flatNode != null) && (flatNode.getRegions() != null)) {
ITextRegionList regionList = flatNode.getRegions();
ITextRegion lastRegion = regionList.get(regionList.size() - 1);
@@ -439,7 +439,7 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
}
}
- protected boolean isEndTagRequired(XMLNode node) {
+ protected boolean isEndTagRequired(DOMNode node) {
if (node == null)
return false;
return node.isContainer();
@@ -450,17 +450,17 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
* 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) {
+ protected boolean isStartTagRequired(DOMNode node) {
if (node == null)
return false;
return node.isContainer();
}
- protected boolean isXMLType(XMLModel structuredModel) {
+ protected boolean isXMLType(DOMModel structuredModel) {
boolean result = false;
if (structuredModel != null && structuredModel != null) {
- XMLDocument document = structuredModel.getDocument();
+ DOMDocument document = structuredModel.getDocument();
if (document != null)
result = document.isXMLType();
@@ -469,34 +469,34 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
return result;
}
- protected XMLNode quoteAttrValue(XMLNode node) {
- XMLElement element = (XMLElement) node;
+ protected DOMNode quoteAttrValue(DOMNode node) {
+ DOMElement element = (DOMElement) node;
if (element.isCommentTag())
return node; // do nothing
boolean quoteAttrValues = getCleanupPreferences().getQuoteAttrValues();
- XMLNode newNode = node;
+ DOMNode newNode = node;
if (quoteAttrValues) {
NamedNodeMap attributes = newNode.getAttributes();
int attributesLength = attributes.getLength();
- XMLGenerator generator = node.getModel().getGenerator();
+ ISourceGenerator generator = node.getModel().getGenerator();
for (int i = 0; i < attributesLength; i++) {
attributes = newNode.getAttributes();
attributesLength = attributes.getLength();
- XMLAttr eachAttr = (XMLAttr) attributes.item(i);
+ DOMAttr eachAttr = (DOMAttr) attributes.item(i);
//ITextRegion oldAttrValueRegion = eachAttr.getValueRegion();
String oldAttrValue = eachAttr.getValueRegionText();
if (oldAttrValue == null) {
- XMLModel structuredModel = node.getModel();
+ DOMModel 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
+ newNode = (DOMNode) structuredModel.getIndexedRegion(node.getStartOffset()); // save new node
}
}
else {
@@ -520,10 +520,10 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
int attrValueLength = oldAttrValue.length();
int startTagStartOffset = node.getStartOffset();
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
replaceSource(structuredModel, structuredDocument, attrValueStartOffset, attrValueLength, newAttrValue);
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save new node
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save new node
}
}
}
@@ -533,9 +533,9 @@ public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
return newNode;
}
- private XMLNode insertRequiredAttrs(XMLNode node) {
+ private DOMNode insertRequiredAttrs(DOMNode node) {
boolean insertRequiredAttrs = getCleanupPreferences().getInsertRequiredAttrs();
- XMLNode newNode = node;
+ DOMNode newNode = node;
if (insertRequiredAttrs) {
List requiredAttrs = getRequiredAttrs(newNode);
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java
index bb53ef6e72..53c0c4d1cd 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java
@@ -15,7 +15,7 @@ package org.eclipse.wst.html.core.internal.cleanup;
import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupHandler;
import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.w3c.dom.Node;
@@ -93,8 +93,8 @@ class HTMLCleanupHandlerFactory {
boolean result = false;
- if (node instanceof XMLNode) {
- IStructuredDocumentRegion flatNode = ((XMLNode) node).getFirstStructuredDocumentRegion();
+ if (node instanceof DOMNode) {
+ IStructuredDocumentRegion flatNode = ((DOMNode) 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
@@ -122,9 +122,9 @@ class HTMLCleanupHandlerFactory {
return false;
if (node.getNodeType() != Node.TEXT_NODE)
return false;
- if (!(node instanceof XMLNode))
+ if (!(node instanceof DOMNode))
return false;
- IStructuredDocumentRegion flatNode = ((XMLNode) node).getFirstStructuredDocumentRegion();
+ IStructuredDocumentRegion flatNode = ((DOMNode) node).getFirstStructuredDocumentRegion();
if (flatNode == null)
return false;
if (flatNode.getType() != XMLRegionContext.BLOCK_TEXT)
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java
index b694ab31ea..087a6d4831 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java
@@ -17,7 +17,7 @@ import org.eclipse.wst.html.core.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.html.core.document.HTMLDocumentTypeEntry;
import org.eclipse.wst.html.core.document.HTMLDocumentTypeRegistry;
import org.eclipse.wst.xml.core.contentmodel.CMDocType;
-import org.eclipse.wst.xml.core.document.XMLDocument;
+import org.eclipse.wst.xml.core.document.DOMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryCMProvider;
import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
@@ -49,7 +49,7 @@ public class HTMLModelQueryCMProvider implements ModelQueryCMProvider {
* or null if no CMDocument is appropriate for the DOM Node.
*/
public CMDocument getCorrespondingCMDocument(Node node) {
- XMLDocument owner = getOwnerXMLDocument(node);
+ DOMDocument owner = getOwnerXMLDocument(node);
if (owner == null)
return null;
@@ -80,18 +80,18 @@ public class HTMLModelQueryCMProvider implements ModelQueryCMProvider {
}
// private methods
- private XMLDocument getOwnerXMLDocument(Node node) {
+ private DOMDocument getOwnerXMLDocument(Node node) {
if (node == null)
return null;
Document owner = (node.getNodeType() == Node.DOCUMENT_NODE) ? (Document) node : node.getOwnerDocument();
if (owner == null)
return null;
- if (!(owner instanceof XMLDocument))
+ if (!(owner instanceof DOMDocument))
return null;
- return (XMLDocument) owner;
+ return (DOMDocument) owner;
}
- private String getPublicId(XMLDocument doc) {
+ private String getPublicId(DOMDocument doc) {
if (doc == null)
return null;
DocumentType doctype = doc.getDoctype();
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java
index 41078c620c..c749bc0653 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java
@@ -15,7 +15,7 @@ import java.util.List;
import java.util.Vector;
import org.eclipse.wst.html.core.HTMLCMProperties;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
@@ -124,8 +124,8 @@ public class HTMLModelQueryImpl extends ModelQueryImpl implements MovableModelQu
Node p = child.getParentNode();
while (p != null) {
if (p.getNodeType() == Node.ELEMENT_NODE) {
- if (p instanceof XMLElement) {
- if (((XMLElement) p).isImplicitTag()) {
+ if (p instanceof DOMElement) {
+ if (((DOMElement) p).isImplicitTag()) {
p = p.getParentNode();
continue;
}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java
index 5f34fed7e4..f84627b003 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java
@@ -25,7 +25,7 @@ import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.util.Debug;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.xml.core.internal.modelquery.XMLCatalogIdResolver;
@@ -68,8 +68,8 @@ public class ModelQueryAdapterFactoryForHTML extends AbstractAdapterFactory impl
if (Debug.displayInfo)
System.out.println("-----------------------ModelQueryAdapterFactoryForHTML.createAdapter" + target); //$NON-NLS-1$
if (modelQueryAdapterImpl == null) {
- if (target instanceof XMLNode) {
- XMLNode xmlNode = (XMLNode) target;
+ if (target instanceof DOMNode) {
+ DOMNode xmlNode = (DOMNode) target;
IStructuredModel model = stateNotifier = xmlNode.getModel();
stateNotifier.addModelStateListener(this);
String baseLocation = null;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java
index 003669b67a..dc8e4fd377 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java
@@ -15,7 +15,7 @@ import java.util.Iterator;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.modelquery.HMQUtil;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
@@ -164,9 +164,9 @@ final class CMUtil {
}
public static boolean isForeign(Element target) {
- if (!(target instanceof XMLElement))
+ if (!(target instanceof DOMElement))
return true;
- XMLElement element = (XMLElement) target;
+ DOMElement element = (DOMElement) target;
return !element.isGlobalTag();
}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/FMUtil.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/FMUtil.java
index 3eeacbd57e..4c0c4ccf5e 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/FMUtil.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/FMUtil.java
@@ -13,7 +13,7 @@ package org.eclipse.wst.html.core.validate;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
final class FMUtil {
@@ -30,7 +30,7 @@ final class FMUtil {
/**
*/
- public final static Segment getSegment(XMLNode target, int segType) {
+ public final static Segment getSegment(DOMNode target, int segType) {
if (target == null)
return new Segment(0, 0);
Segment seg = null;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java
index 856284772d..7915f281bb 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java
@@ -18,9 +18,9 @@ import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionContainer;
import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
@@ -48,7 +48,7 @@ public class HTMLAttributeValidator extends PrimeValidator {
/**
*/
- private Segment getErrorSegment(XMLNode errorNode, int regionType) {
+ private Segment getErrorSegment(DOMNode errorNode, int regionType) {
ITextRegion rgn = null;
switch (regionType) {
case REGION_NAME :
@@ -62,8 +62,8 @@ public class HTMLAttributeValidator extends PrimeValidator {
break;
}
if (rgn != null) {
- if (errorNode instanceof XMLAttr) {
- XMLElement ownerElement = (XMLElement) ((XMLAttr) errorNode).getOwnerElement();
+ if (errorNode instanceof DOMAttr) {
+ DOMElement ownerElement = (DOMElement) ((DOMAttr) errorNode).getOwnerElement();
if (ownerElement != null) {
int regionStartOffset = ownerElement.getFirstStructuredDocumentRegion().getStartOffset(rgn);
int regionLength = rgn.getLength();
@@ -104,9 +104,9 @@ public class HTMLAttributeValidator extends PrimeValidator {
// whether
// an attr has prefix or not by calling XMLAttr#isGlobalAttr().
// When a attr has prefix (not global), it returns false.
- boolean isXMLAttr = a instanceof XMLAttr;
+ boolean isXMLAttr = a instanceof DOMAttr;
if (isXMLAttr) {
- XMLAttr xmlattr = (XMLAttr) a;
+ DOMAttr xmlattr = (DOMAttr) a;
if (!xmlattr.isGlobalAttr())
continue; // skip futher validation and begin next loop.
}
@@ -116,7 +116,7 @@ public class HTMLAttributeValidator extends PrimeValidator {
// No attr declaration was found. That is, the attr name is
// undefined.
// but not regard it as undefined name if it includes JSP
- if (hasJSPRegion(((XMLNode) a).getNameRegion())) {
+ if (hasJSPRegion(((DOMNode) a).getNameRegion())) {
rgnType = REGION_NAME;
state = ErrorState.UNDEFINED_NAME_ERROR;
}
@@ -129,7 +129,7 @@ public class HTMLAttributeValidator extends PrimeValidator {
// attributes
// might be written in boolean format. It should be check
// specifically.
- if (CMUtil.isBooleanAttr(adec) && ((XMLAttr) a).hasNameOnly())
+ if (CMUtil.isBooleanAttr(adec) && ((DOMAttr) a).hasNameOnly())
continue; // OK, keep going. No more check is needed
// against this attr.
}
@@ -179,7 +179,7 @@ public class HTMLAttributeValidator extends PrimeValidator {
// actualValue is invalid.
// but not regard it as undefined value if it
// includes JSP.
- if (hasJSPRegion(((XMLNode) a).getValueRegion())) {
+ if (hasJSPRegion(((DOMNode) a).getValueRegion())) {
rgnType = REGION_VALUE;
state = ErrorState.UNDEFINED_VALUE_ERROR;
}
@@ -190,7 +190,7 @@ public class HTMLAttributeValidator extends PrimeValidator {
// <<D210422
if (state == ErrorState.NONE_ERROR) { // Need more check.
if (isXMLAttr) {
- String source = ((XMLAttr) a).getValueRegionText();
+ String source = ((DOMAttr) a).getValueRegionText();
if (source != null) {
char firstChar = source.charAt(0);
char lastChar = source.charAt(source.length() - 1);
@@ -206,7 +206,7 @@ public class HTMLAttributeValidator extends PrimeValidator {
// D210422
}
if (state != ErrorState.NONE_ERROR) {
- Segment seg = getErrorSegment((XMLNode) a, rgnType);
+ Segment seg = getErrorSegment((DOMNode) a, rgnType);
if (seg != null)
reporter.report(MessageFactory.createMessage(new ErrorInfoImpl(state, seg, a)));
}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java
index d02949b28d..37a885831f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java
@@ -17,9 +17,9 @@ import java.util.Vector;
import org.eclipse.wst.html.core.HTML40Namespace;
import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.document.XMLText;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMNode;
+import org.eclipse.wst.xml.core.document.DOMText;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapter;
import org.w3c.dom.Document;
@@ -68,7 +68,7 @@ public class HTMLDocumentContentValidator extends PrimeValidator {
}
private static String getRootTagName(Document document) {
- DocumentTypeAdapter adapter = (DocumentTypeAdapter) ((XMLDocument) document).getAdapterFor(DocumentTypeAdapter.class);
+ DocumentTypeAdapter adapter = (DocumentTypeAdapter) ((DOMDocument) document).getAdapterFor(DocumentTypeAdapter.class);
if (adapter != null) {
DocumentType docType = adapter.getDocumentType();
if (docType != null) {
@@ -115,7 +115,7 @@ public class HTMLDocumentContentValidator extends PrimeValidator {
for (int i = 1; i < explicits.size(); i++) {
Element html = (Element) explicits.get(i);
// report error (duplicate)
- Segment errorSeg = FMUtil.getSegment((XMLNode) html, FMUtil.SEG_START_TAG);
+ Segment errorSeg = FMUtil.getSegment((DOMNode) html, FMUtil.SEG_START_TAG);
if (errorSeg != null)
reporter.report(MessageFactory.createMessage(new ErrorInfoImpl(ErrorState.DUPLICATE_ERROR, errorSeg, html)));
}
@@ -130,7 +130,7 @@ public class HTMLDocumentContentValidator extends PrimeValidator {
private void validateContent(Iterator children, boolean isFragment) {
boolean foundDoctype = false;
while (children.hasNext()) {
- XMLNode child = (XMLNode) children.next();
+ DOMNode child = (DOMNode) children.next();
int error = ErrorState.NONE_ERROR;
int segType = FMUtil.SEG_WHOLE_TAG;
@@ -157,7 +157,7 @@ public class HTMLDocumentContentValidator extends PrimeValidator {
if (! isFragment) {
// TEXT node is valid when it contains white space characters only.
// Otherwise, it is invalid content.
- if (((XMLText) child).isWhitespace())
+ if (((DOMText) child).isWhitespace())
continue;
error = ErrorState.INVALID_CONTENT_ERROR;
segType = FMUtil.SEG_WHOLE_TAG;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java
index ced391a747..8934db93c5 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.html.core.validate;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
@@ -59,7 +59,7 @@ public class HTMLElementAncestorValidator extends PrimeValidator {
while (parent != null) {
CMNode pdec = prohibited.getNamedItem(parent.getNodeName());
if (pdec != null) { // prohibited element is found in ancestors.
- Segment errorSeg = FMUtil.getSegment((XMLNode) node, FMUtil.SEG_START_TAG);
+ Segment errorSeg = FMUtil.getSegment((DOMNode) node, FMUtil.SEG_START_TAG);
if (errorSeg != null)
reporter.report(MessageFactory.createMessage(new ErrorInfoImpl(ErrorState.INVALID_CONTENT_ERROR, errorSeg, target)));
break; // If one prohibited ancestor is found, it's enough.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java
index d4ef702ff8..1edfccc1e9 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java
@@ -11,8 +11,8 @@
package org.eclipse.wst.html.core.validate;
import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.document.XMLText;
+import org.eclipse.wst.xml.core.document.DOMNode;
+import org.eclipse.wst.xml.core.document.DOMText;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -144,7 +144,7 @@ public class HTMLElementContentValidator extends PrimeValidator {
return;
case CMElementDeclaration.ELEMENT :
case CMElementDeclaration.EMPTY :
- if (((XMLText) child).isWhitespace())
+ if (((DOMText) child).isWhitespace())
return;
error = ErrorState.INVALID_CONTENT_ERROR;
break;
@@ -170,7 +170,7 @@ public class HTMLElementContentValidator extends PrimeValidator {
break;
}
if (error != ErrorState.NONE_ERROR) {
- Segment errorSeg = FMUtil.getSegment((XMLNode) child, segType);
+ Segment errorSeg = FMUtil.getSegment((DOMNode) child, segType);
if (errorSeg != null)
reporter.report(MessageFactory.createMessage(new ErrorInfoImpl(error, errorSeg, child)));
}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java
index c2774bd7c7..ffb9eea2ae 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.validate;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
@@ -38,7 +38,7 @@ public class NamespaceValidator extends PrimeValidator implements ErrorState {
public void validate(IndexedRegion node) {
Element target = (Element) node;
if (isXMLElement(target) && hasUnknownPrefix(target)) {
- XMLElement e = (XMLElement) target;
+ DOMElement e = (DOMElement) target;
if (!isValidPrefix(e.getPrefix(), target) && !e.isCommentTag()) {
// report unknown tag error.
Segment errorSeg = FMUtil.getSegment(e, FMUtil.SEG_START_TAG);
@@ -50,9 +50,9 @@ public class NamespaceValidator extends PrimeValidator implements ErrorState {
NamedNodeMap attrs = target.getAttributes();
for (int i = 0; i < attrs.getLength(); i++) {
Node n = attrs.item(i);
- if (!(n instanceof XMLAttr))
+ if (!(n instanceof DOMAttr))
continue;
- XMLAttr a = (XMLAttr) n;
+ DOMAttr a = (DOMAttr) n;
String prefix = a.getPrefix();
if ((prefix != null) && isUnknownAttr(a, target)) {
// The attr has unknown prefix. So, check it.
@@ -71,7 +71,7 @@ public class NamespaceValidator extends PrimeValidator implements ErrorState {
// private methods
private boolean isXMLElement(Element target) {
- return target instanceof XMLElement;
+ return target instanceof DOMElement;
}
private boolean hasUnknownPrefix(Element target) {
@@ -83,7 +83,7 @@ public class NamespaceValidator extends PrimeValidator implements ErrorState {
return dec == null;
}
- private boolean isUnknownAttr(XMLAttr attr, Element target) {
+ private boolean isUnknownAttr(DOMAttr attr, Element target) {
CMElementDeclaration dec = CMUtil.getDeclaration(target);
if (dec == null)
return true; // unknown.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java
index 67a8ff8888..6d9c46382d 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java
@@ -18,9 +18,9 @@ import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.document.InvalidCharacterException;
import org.eclipse.wst.xml.core.internal.document.SourceValidator;
@@ -70,7 +70,7 @@ class SyntaxValidator extends PrimeValidator implements ErrorState {
super();
}
- public XMLElement target = null;
+ public DOMElement target = null;
public CMElementDeclaration decl = null;
public IStructuredDocumentRegion startTag = null;
public IStructuredDocumentRegion endTag = null;
@@ -85,11 +85,11 @@ class SyntaxValidator extends PrimeValidator implements ErrorState {
if (node.getNodeType() != Node.ELEMENT_NODE)
return;
- if (!(node instanceof XMLElement))
+ if (!(node instanceof DOMElement))
return;
ElementInfo info = new ElementInfo();
- info.target = (XMLElement) node;
+ info.target = (DOMElement) node;
// gather information to validate from target at once.
getInfo(info);
@@ -112,9 +112,9 @@ class SyntaxValidator extends PrimeValidator implements ErrorState {
info.hasEndTag = (info.endTag != null);
Document doc = info.target.getOwnerDocument();
- if (!(doc instanceof XMLDocument))
+ if (!(doc instanceof DOMDocument))
return;
- String typeid = ((XMLDocument) doc).getDocumentTypeId();
+ String typeid = ((DOMDocument) doc).getDocumentTypeId();
if (typeid != null) {
HTMLDocumentTypeEntry entry = HTMLDocumentTypeRegistry.getInstance().getEntry(typeid);
info.isXHTML = (entry != null && entry.isXMLType());
@@ -298,7 +298,7 @@ class SyntaxValidator extends PrimeValidator implements ErrorState {
switch (child.getNodeType()) {
case Node.TEXT_NODE :
{
- XMLNode text = (XMLNode) child;
+ DOMNode text = (DOMNode) child;
int charOffset = validateTextSource(text);
if (charOffset >= 0) {
charOffset += text.getStartOffset();
@@ -313,7 +313,7 @@ class SyntaxValidator extends PrimeValidator implements ErrorState {
case Node.PROCESSING_INSTRUCTION_NODE :
case Node.CDATA_SECTION_NODE :
{
- XMLNode tag = (XMLNode) child;
+ DOMNode tag = (DOMNode) child;
if (!tag.isClosed()) {
Segment errorSeg = FMUtil.getSegment(tag, FMUtil.SEG_WHOLE_TAG);
if (errorSeg != null)
@@ -327,7 +327,7 @@ class SyntaxValidator extends PrimeValidator implements ErrorState {
}
}
- private int validateTextSource(XMLNode text) {
+ private int validateTextSource(DOMNode text) {
try {
SourceValidator validator = new SourceValidator(text);
validator.validateSource(text.getSource());
diff --git a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/validation/HTMLValidator.java b/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/validation/HTMLValidator.java
index 7469b62d97..bf011345a5 100644
--- a/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/validation/HTMLValidator.java
+++ b/bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/validation/HTMLValidator.java
@@ -26,8 +26,8 @@ import org.eclipse.wst.validation.core.IValidationContext;
import org.eclipse.wst.validation.core.IValidator;
import org.eclipse.wst.validation.internal.operations.IWorkbenchHelper;
import org.eclipse.wst.validation.internal.operations.WorkbenchReporter;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapter;
import org.eclispe.wst.validation.internal.core.Message;
@@ -46,7 +46,7 @@ public class HTMLValidator implements IValidator {
/**
*/
- protected XMLModel getModel(IProject project, IFile file) {
+ protected DOMModel getModel(IProject project, IFile file) {
if (project == null || file == null)
return null;
if (!file.exists())
@@ -76,16 +76,16 @@ public class HTMLValidator implements IValidator {
if (model == null)
return null;
- if (!(model instanceof XMLModel)) {
+ if (!(model instanceof DOMModel)) {
releaseModel(model);
return null;
}
- return (XMLModel) model;
+ return (DOMModel) model;
}
/**
*/
- protected HTMLValidationReporter getReporter(IReporter reporter, IFile file, XMLModel model) {
+ protected HTMLValidationReporter getReporter(IReporter reporter, IFile file, DOMModel model) {
return new HTMLValidationReporter(this, reporter, file, model);
}
@@ -116,7 +116,7 @@ public class HTMLValidator implements IValidator {
/**
*/
- private boolean hasHTMLFeature(XMLDocument document) {
+ private boolean hasHTMLFeature(DOMDocument document) {
DocumentTypeAdapter adapter = (DocumentTypeAdapter) document.getAdapterFor(DocumentTypeAdapter.class);
if (adapter == null)
return false;
@@ -148,7 +148,7 @@ public class HTMLValidator implements IValidator {
/**
*/
- protected HTMLValidationResult validate(XMLModel model, IFile file) {
+ protected HTMLValidationResult validate(DOMModel model, IFile file) {
IProject prj = null;
if (file != null) {
prj = file.getProject();
@@ -165,10 +165,10 @@ public class HTMLValidator implements IValidator {
/**
*/
- private HTMLValidationResult validate(IReporter reporter, IFile file, XMLModel model) {
+ private HTMLValidationResult validate(IReporter reporter, IFile file, DOMModel model) {
if (file == null || model == null)
return null; // error
- XMLDocument document = model.getDocument();
+ DOMDocument document = model.getDocument();
if (document == null)
return null; // error
if (!hasHTMLFeature(document))
@@ -237,7 +237,7 @@ public class HTMLValidator implements IValidator {
if ((reporter != null) && (reporter.isCancelled() == true)) {
throw new OperationCanceledException();
}
- XMLModel model = getModel(file.getProject(), file);
+ DOMModel model = getModel(file.getProject(), file);
if (model == null)
return;
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
index 6dd08b7d1c..ebba571c43 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
@@ -43,9 +43,9 @@ import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
@@ -151,7 +151,7 @@ public class HTMLContentAssistProcessor extends AbstractContentAssistProcessor i
return beginning.equalsIgnoreCase(prefix);
}
- protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode treeNode, XMLNode xmlnode) {
+ protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode treeNode, DOMNode xmlnode) {
ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
addTemplates(request, TemplateContextTypeIdsHTML.ALL);
return request;
@@ -170,7 +170,7 @@ public class HTMLContentAssistProcessor extends AbstractContentAssistProcessor i
fTemplateContexts.clear();
IndexedRegion treeNode = ContentAssistUtils.getNodeAt((StructuredTextViewer) textViewer, documentPosition);
- XMLNode node = (XMLNode) treeNode;
+ DOMNode node = (DOMNode) treeNode;
setErrorMessage(null);
// check if it's in a comment node
@@ -325,7 +325,7 @@ public class HTMLContentAssistProcessor extends AbstractContentAssistProcessor i
if (mm != null)
model = mm.getExistingModelForRead(viewer.getDocument());
- XMLDocument doc = ((XMLModel) model).getDocument();
+ DOMDocument doc = ((DOMModel) model).getDocument();
ModelQuery mq = ModelQueryUtil.getModelQuery(doc);
// XHTML requires lowercase tagname for lookup
@@ -366,7 +366,7 @@ public class HTMLContentAssistProcessor extends AbstractContentAssistProcessor i
return fGenerator;
}
- protected ICompletionProposal[] getCSSProposals(ITextViewer viewer, int pos, XMLNode element, int offset, char quote) {
+ protected ICompletionProposal[] getCSSProposals(ITextViewer viewer, int pos, DOMNode element, int offset, char quote) {
CSSContentAssistProcessor cssProcessor = new CSSContentAssistProcessor();
cssProcessor.setDocumentOffset(offset);
@@ -402,8 +402,8 @@ public class HTMLContentAssistProcessor extends AbstractContentAssistProcessor i
else
doc = ((Document) node);
- if (doc instanceof XMLDocument)
- return ((XMLDocument) doc).isXMLType();
+ if (doc instanceof DOMDocument)
+ return ((DOMDocument) doc).isXMLType();
if (doc instanceof INodeNotifier) {
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java
index 8a5504a96c..7274a70f21 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java
@@ -23,8 +23,8 @@ import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
@@ -148,12 +148,12 @@ class XMLHyperlinkDetector implements IHyperlinkDetector {
short nodeType = node.getNodeType();
if (nodeType == Node.DOCUMENT_TYPE_NODE) {
// handle doc type node
- XMLNode docNode = (XMLNode) node;
+ DOMNode docNode = (DOMNode) node;
hyperRegion = new Region(docNode.getStartOffset(), docNode.getEndOffset() - docNode.getStartOffset());
}
else if (nodeType == Node.ATTRIBUTE_NODE) {
// handle attribute nodes
- XMLAttr att = (XMLAttr) node;
+ DOMAttr att = (DOMAttr) node;
// do not include quotes in attribute value region
int regOffset = att.getValueRegionStartOffset();
int regLength = att.getValueRegion().getTextLength();
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java
index 9330705b0f..e91cfed1ff 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java
@@ -11,7 +11,7 @@ import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
import org.eclipse.wst.sse.ui.internal.projection.IStructuredTextFoldingProvider;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -117,7 +117,7 @@ public class StructuredTextFoldingProviderHTML implements IStructuredTextFolding
factoryRegistry.addFactory(newFactory);
// add factory to propogating adapter
- XMLModel domModel = (XMLModel) sModel;
+ DOMModel domModel = (DOMModel) sModel;
Document document = domModel.getDocument();
PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
if (propagatingAdapter != null) {
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/registry/AdapterFactoryProviderForHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/registry/AdapterFactoryProviderForHTML.java
index 18d11c2485..c67b0777e4 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/registry/AdapterFactoryProviderForHTML.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/registry/AdapterFactoryProviderForHTML.java
@@ -20,7 +20,7 @@ import org.eclipse.wst.sse.core.modelhandler.IDocumentTypeHandler;
import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
import org.eclipse.wst.sse.ui.registry.AdapterFactoryProvider;
import org.eclipse.wst.sse.ui.util.Assert;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.ui.internal.properties.XMLPropertySourceAdapterFactory;
/**
@@ -37,7 +37,7 @@ public class AdapterFactoryProviderForHTML implements AdapterFactoryProvider {
addContentBasedFactories(structuredModel);
// ===
// Must update/add to propagating adapter here too
- if (structuredModel instanceof XMLModel) {
+ if (structuredModel instanceof DOMModel) {
addPropagatingAdapters(structuredModel);
}
// ===
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLCharEntity.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/XMLCharEntity.java
index 444ddaa75c..9498dbe0ad 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLCharEntity.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/XMLCharEntity.java
@@ -10,7 +10,7 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-package org.eclipse.wst.xml.core.document;
+package org.eclipse.wst.xml.core;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementAdapter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementAdapter.java
index 74780df2b6..7d74a4dec0 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementAdapter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementAdapter.java
@@ -17,7 +17,7 @@ package org.eclipse.wst.xml.core.commentelement;
import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.xml.core.commentelement.impl.CommentElementConfiguration;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.eclipse.wst.xml.core.internal.document.TagAdapter;
@@ -34,11 +34,11 @@ public class CommentElementAdapter implements TagAdapter {
fHandler = handler;
}
- private String generateCommentClose(XMLElement element) {
+ private String generateCommentClose(DOMElement element) {
return (element.isJSPTag()) ? "--%>" : "-->"; //$NON-NLS-1$ //$NON-NLS-2$
}
- private String generateCommentOpen(XMLElement element) {
+ private String generateCommentOpen(DOMElement element) {
return (element.isJSPTag()) ? "<%--" : "<!--"; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -47,9 +47,9 @@ public class CommentElementAdapter implements TagAdapter {
}
/**
- * @see com.ibm.sed.model.xml.TagAdapter#getEndTag(XMLElement)
+ * @see com.ibm.sed.model.xml.TagAdapter#getEndTag(DOMElement)
*/
- public String getEndTag(XMLElement element) {
+ public String getEndTag(DOMElement element) {
String content = fHandler.generateEndTagContent(element);
if (content == null) {
return null;
@@ -79,9 +79,9 @@ public class CommentElementAdapter implements TagAdapter {
}
/**
- * @see com.ibm.sed.model.xml.TagAdapter#getStartTag(XMLElement)
+ * @see com.ibm.sed.model.xml.TagAdapter#getStartTag(DOMElement)
*/
- public String getStartTag(XMLElement element) {
+ public String getStartTag(DOMElement element) {
String content = fHandler.generateStartTagContent(element);
if (content == null) {
return null;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementHandler.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementHandler.java
index b5eae28068..6712b83507 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementHandler.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/CommentElementHandler.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.xml.core.commentelement;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -72,7 +72,7 @@ public interface CommentElementHandler {
* the comment element
* @return generated tag string
*/
- String generateEndTagContent(XMLElement element);
+ String generateEndTagContent(DOMElement element);
/**
* This method generates the source text of the start tag for the passed
@@ -84,7 +84,7 @@ public interface CommentElementHandler {
* the comment element
* @return generated tag string
*/
- String generateStartTagContent(XMLElement element);
+ String generateStartTagContent(DOMElement element);
/**
*
@@ -92,7 +92,7 @@ public interface CommentElementHandler {
* the element
* @return boolean whether the element is comment element or not
*/
- boolean isCommentElement(XMLElement element);
+ boolean isCommentElement(DOMElement element);
/**
*
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/BasicCommentElementHandler.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/BasicCommentElementHandler.java
index 98efac0f7d..7de29d08f4 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/BasicCommentElementHandler.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/BasicCommentElementHandler.java
@@ -17,9 +17,9 @@ package org.eclipse.wst.xml.core.commentelement.impl;
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.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLGenerator;
+import org.eclipse.wst.xml.core.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.ISourceGenerator;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -65,7 +65,7 @@ class BasicCommentElementHandler implements CommentElementHandler {
Attr attr = document.createAttribute(attrName);
if (attr != null) {
if (attrValue != null)
- ((XMLAttr) attr).setValueSource(attrValue);
+ ((DOMAttr) attr).setValueSource(attrValue);
element.setAttributeNode(attr);
}
attrName = scanner.nextName();
@@ -76,13 +76,13 @@ class BasicCommentElementHandler implements CommentElementHandler {
}
/**
- * @see com.ibm.sed.model.commentelement.CommentElementHandler#getEndTag(XMLElement)
+ * @see com.ibm.sed.model.commentelement.CommentElementHandler#getEndTag(DOMElement)
*/
- public String generateEndTagContent(XMLElement element) {
+ public String generateEndTagContent(DOMElement element) {
if (isEmpty) {
return null;
}
- XMLGenerator generator = element.getModel().getGenerator();
+ ISourceGenerator generator = element.getModel().getGenerator();
StringBuffer buffer = new StringBuffer();
buffer.append(" /"); //$NON-NLS-1$
@@ -96,10 +96,10 @@ class BasicCommentElementHandler implements CommentElementHandler {
}
/**
- * @see com.ibm.sed.model.commentelement.CommentElementHandler#getStartTag(XMLElement)
+ * @see com.ibm.sed.model.commentelement.CommentElementHandler#getStartTag(DOMElement)
*/
- public String generateStartTagContent(XMLElement element) {
- XMLGenerator generator = element.getModel().getGenerator();
+ public String generateStartTagContent(DOMElement element) {
+ ISourceGenerator generator = element.getModel().getGenerator();
StringBuffer buffer = new StringBuffer();
buffer.append(' ');
@@ -138,7 +138,7 @@ class BasicCommentElementHandler implements CommentElementHandler {
*
* @see com.ibm.sed.model.commentelement.CommentElementHandler#isCommentElement(com.ibm.sed.model.xml.XMLElement)
*/
- public boolean isCommentElement(XMLElement element) {
+ public boolean isCommentElement(DOMElement element) {
return (element != null && element.getTagName().equals(elementName)) ? true : false;
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementConfiguration.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementConfiguration.java
index a1a0b026e3..44d35d21b0 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementConfiguration.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementConfiguration.java
@@ -21,7 +21,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.wst.xml.core.commentelement.CommentElementAdapter;
import org.eclipse.wst.xml.core.commentelement.CommentElementHandler;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.eclipse.wst.xml.core.internal.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -74,7 +74,7 @@ public class CommentElementConfiguration {
}
public Element createElement(Document document, String data, boolean isJSPTag) {
- XMLElement element = (XMLElement) getHandler().createElement(document, data, isJSPTag);
+ DOMElement element = (DOMElement) getHandler().createElement(document, data, isJSPTag);
if (element != null) {
CommentElementAdapter adapter = (CommentElementAdapter) element.getAdapterFor(CommentElementAdapter.class);
if (adapter != null) {
@@ -125,11 +125,11 @@ public class CommentElementConfiguration {
return null;
}
- public String generateEndTagContent(XMLElement element) {
+ public String generateEndTagContent(DOMElement element) {
return null;
}
- public String generateStartTagContent(XMLElement element) {
+ public String generateStartTagContent(DOMElement element) {
return null;
}
@@ -137,7 +137,7 @@ public class CommentElementConfiguration {
return null;
}
- public boolean isCommentElement(XMLElement element) {
+ public boolean isCommentElement(DOMElement element) {
return false;
}
@@ -220,7 +220,7 @@ public class CommentElementConfiguration {
return fEmpty;
}
- void setupCommentElement(XMLElement element) {
+ void setupCommentElement(DOMElement element) {
element.setCommentTag(true);
CommentElementAdapter adapter = new CommentElementAdapter(false, fHandler);
adapter.setConfiguration(this);
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementRegistry.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementRegistry.java
index 7fab5ee48a..406c296d02 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementRegistry.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/impl/CommentElementRegistry.java
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.wst.xml.core.commentelement.CommentElementHandler;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
/**
@@ -65,7 +65,7 @@ public class CommentElementRegistry {
return fConfigurations;
}
- public boolean setupCommentElement(XMLElement element) {
+ public boolean setupCommentElement(DOMElement element) {
CommentElementConfiguration configurations[] = getConfigurations();
int length = configurations.length;
for (int i = 0; i < length; i++) {
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/util/CommentElementFactory.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/util/CommentElementFactory.java
index 2ae4c84734..36c08be097 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/util/CommentElementFactory.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/commentelement/util/CommentElementFactory.java
@@ -16,7 +16,7 @@ package org.eclipse.wst.xml.core.commentelement.util;
import org.eclipse.wst.xml.core.commentelement.CommentElementAdapter;
import org.eclipse.wst.xml.core.commentelement.CommentElementHandler;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -48,7 +48,7 @@ public class CommentElementFactory {
}
public Element create(String name, int nodeType) {
- XMLElement element = (XMLElement) fDocument.createElement(name);
+ DOMElement element = (DOMElement) fDocument.createElement(name);
if (element == null)
return null;
element.setCommentTag(true);
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLAttr.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMAttr.java
index 3835772c65..d003868dc7 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLAttr.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMAttr.java
@@ -25,7 +25,7 @@ import org.w3c.dom.Attr;
* @since 1.0
*
*/
-public interface XMLAttr extends XMLNode, Attr {
+public interface DOMAttr extends DOMNode, Attr {
/**
*/
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLDocument.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMDocument.java
index 6cc59e0347..fcf6d09172 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLDocument.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMDocument.java
@@ -27,7 +27,7 @@ import org.w3c.dom.traversal.DocumentTraversal;
*
* @since 1.0
*/
-public interface XMLDocument extends XMLNode, Document, DocumentRange, DocumentTraversal {
+public interface DOMDocument extends DOMNode, Document, DocumentRange, DocumentTraversal {
/**
* create comment element. tagName must be registered as comment element
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLDocumentType.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMDocumentType.java
index 6174f7b608..904707fa56 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLDocumentType.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMDocumentType.java
@@ -22,7 +22,7 @@ import org.w3c.dom.DocumentType;
*
* @since 1.0
*/
-public interface XMLDocumentType extends XMLNode, DocumentType {
+public interface DOMDocumentType extends DOMNode, DocumentType {
/**
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLElement.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMElement.java
index bd1182d215..dea035f4f6 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLElement.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMElement.java
@@ -24,7 +24,7 @@ import org.w3c.dom.Element;
*
*/
-public interface XMLElement extends XMLNode, Element {
+public interface DOMElement extends DOMNode, Element {
/**
* @deprecated this should probably not be public, but already implemented
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLModel.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMModel.java
index 9b6554f9dd..e36a6f0229 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLModel.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMModel.java
@@ -13,6 +13,7 @@
package org.eclipse.wst.xml.core.document;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.xml.core.internal.document.XMLModelNotifier;
/**
* Provides means to get the XMLModel form of IStrucutredModel. Not to be
@@ -20,21 +21,21 @@ import org.eclipse.wst.sse.core.IStructuredModel;
*
* @since 1.0
*/
-public interface XMLModel extends IStructuredModel {
+public interface DOMModel extends IStructuredModel {
/**
* Returns the DOM Document.
*
* @return the DOM Document.
*/
- XMLDocument getDocument();
+ DOMDocument getDocument();
/**
* Returns an source generator appropriate for this model.
*
* @return the source generator
*/
- XMLGenerator getGenerator();
+ ISourceGenerator getGenerator();
/**
* Returns an XMLModelNotifier. Clients should not use.
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLNode.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMNode.java
index 9656f1c9dc..f2841473ad 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLNode.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMNode.java
@@ -27,7 +27,7 @@ import org.w3c.dom.Node;
* three other interfaces.
*
*/
-public interface XMLNode extends IndexedRegion, INodeNotifier, Node {
+public interface DOMNode extends IndexedRegion, INodeNotifier, Node {
/**
*
@@ -45,7 +45,7 @@ public interface XMLNode extends IndexedRegion, INodeNotifier, Node {
/**
*/
- XMLModel getModel();
+ DOMModel getModel();
/**
*/
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLText.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMText.java
index d7f216e17e..0ad0b73dc6 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLText.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/DOMText.java
@@ -24,7 +24,7 @@ import org.w3c.dom.Text;
*
*/
-public interface XMLText extends XMLNode, Text {
+public interface DOMText extends DOMNode, Text {
/**
* Appends the content of the text node
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLGenerator.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/ISourceGenerator.java
index 5b9321bba0..dea752ac5c 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLGenerator.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/ISourceGenerator.java
@@ -24,7 +24,7 @@ import org.w3c.dom.Node;
import org.w3c.dom.ProcessingInstruction;
import org.w3c.dom.Text;
-public interface XMLGenerator {
+public interface ISourceGenerator {
/**
*/
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/CommentNodeFormatter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/CommentNodeFormatter.java
index fe8835b104..40c4036854 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/CommentNodeFormatter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/CommentNodeFormatter.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.xml.core.format;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatContraints;
import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Node;
@@ -68,7 +68,7 @@ public class CommentNodeFormatter extends NodeFormatter {
return result;
}
- protected void formatNode(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatNode(DOMNode node, IStructuredFormatContraints formatContraints) {
if (node != null) {
// lineDelimiterFound means multi line comment
String nodeValue = node.getNodeValue();
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/DocumentNodeFormatter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/DocumentNodeFormatter.java
index ea73b78ac0..79c26edd23 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/DocumentNodeFormatter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/DocumentNodeFormatter.java
@@ -14,11 +14,11 @@ package org.eclipse.wst.xml.core.format;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatContraints;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatter;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
public class DocumentNodeFormatter extends NodeFormatter {
- protected void formatChildren(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatChildren(DOMNode node, IStructuredFormatContraints formatContraints) {
String singleIndent = getFormatPreferences().getIndent();
String lineIndent = formatContraints.getCurrentIndent();
@@ -26,10 +26,10 @@ public class DocumentNodeFormatter extends NodeFormatter {
// normalize node first to combine adjacent text nodes
node.normalize();
- XMLNode nextChild = (XMLNode) node.getFirstChild();
+ DOMNode nextChild = (DOMNode) node.getFirstChild();
while (nextChild != null) {
- XMLNode eachChildNode = nextChild;
- nextChild = (XMLNode) eachChildNode.getNextSibling();
+ DOMNode eachChildNode = nextChild;
+ nextChild = (DOMNode) eachChildNode.getNextSibling();
IStructuredFormatter formatter = getFormatter(eachChildNode);
IStructuredFormatContraints childFormatContraints = formatter.getFormatContraints();
String childIndent = lineIndent + singleIndent;
@@ -41,12 +41,12 @@ public class DocumentNodeFormatter extends NodeFormatter {
if (nextChild != null && nextChild.getParentNode() == null)
// nextNode is deleted during format
- nextChild = (XMLNode) eachChildNode.getNextSibling();
+ nextChild = (DOMNode) eachChildNode.getNextSibling();
}
}
}
- protected void formatNode(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatNode(DOMNode node, IStructuredFormatContraints formatContraints) {
if (node != null)
formatChildren(node, formatContraints);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java
index 830ca8aaba..78b989f046 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java
@@ -20,10 +20,10 @@ 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.XMLDocument;
-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.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.ISourceGenerator;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.document.AttrImpl;
@@ -42,21 +42,21 @@ public class ElementNodeFormatter extends DocumentNodeFormatter {
static protected final char SINGLE_QUOTE = '\'';//$NON-NLS-1$
static protected final String XML_SPACE = "xml:space";//$NON-NLS-1$
- protected void formatEndTag(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatEndTag(DOMNode node, IStructuredFormatContraints formatContraints) {
if (!isEndTagMissing(node)) {
// end tag exists
IStructuredDocument structuredDocument = node.getModel().getStructuredDocument();
String lineDelimiter = structuredDocument.getLineDelimiter();
String nodeIndentation = getNodeIndent(node);
- XMLNode lastChild = (XMLNode) node.getLastChild();
+ DOMNode lastChild = (DOMNode) node.getLastChild();
if (lastChild != null && lastChild.getNodeType() != Node.TEXT_NODE) {
if (isEndTagMissing(lastChild)) {
// find deepest child
- XMLNode deepestChild = (XMLNode) lastChild.getLastChild();
+ DOMNode deepestChild = (DOMNode) lastChild.getLastChild();
while (deepestChild != null && deepestChild.getLastChild() != null && isEndTagMissing(deepestChild)) {
lastChild = deepestChild;
- deepestChild = (XMLNode) deepestChild.getLastChild();
+ deepestChild = (DOMNode) deepestChild.getLastChild();
}
if (deepestChild != null) {
@@ -91,19 +91,19 @@ public class ElementNodeFormatter extends DocumentNodeFormatter {
}
}
- protected void formatNode(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatNode(DOMNode node, IStructuredFormatContraints formatContraints) {
if (node != null) {
// format indentation before node
formatIndentationBeforeNode(node, formatContraints);
// format start tag
- XMLNode newNode = node;
+ DOMNode newNode = node;
int startTagStartOffset = node.getStartOffset();
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
formatStartTag(node, formatContraints);
// save new node
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset);
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset);
IStructuredDocumentRegion flatNode = newNode.getFirstStructuredDocumentRegion();
if (flatNode != null) {
@@ -115,7 +115,7 @@ public class ElementNodeFormatter extends DocumentNodeFormatter {
formatChildren(newNode, formatContraints);
// save new node
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset);
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset);
// format end tag
formatEndTag(newNode, formatContraints);
@@ -131,7 +131,7 @@ public class ElementNodeFormatter extends DocumentNodeFormatter {
* This method formats the start tag name, and formats the attributes if
* available.
*/
- protected void formatStartTag(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatStartTag(DOMNode node, IStructuredFormatContraints formatContraints) {
String singleIndent = getFormatPreferences().getIndent();
String lineIndent = formatContraints.getCurrentIndent();
String attrIndent = lineIndent + singleIndent;
@@ -174,7 +174,7 @@ public class ElementNodeFormatter extends DocumentNodeFormatter {
// check for xml:space attribute
if (flatNode.getText(nameRegion).compareTo(XML_SPACE) == 0) {
if (valueRegion == null) {
- ModelQueryAdapter adapter = (ModelQueryAdapter) ((XMLDocument) node.getOwnerDocument()).getAdapterFor(ModelQueryAdapter.class);
+ ModelQueryAdapter adapter = (ModelQueryAdapter) ((DOMDocument) node.getOwnerDocument()).getAdapterFor(ModelQueryAdapter.class);
CMElementDeclaration elementDeclaration = (CMElementDeclaration) adapter.getModelQuery().getCMNode(node);
if (elementDeclaration == null)
// CMElementDeclaration not found, default to
@@ -196,7 +196,7 @@ public class ElementNodeFormatter extends DocumentNodeFormatter {
}
}
} else {
- XMLGenerator generator = node.getModel().getGenerator();
+ ISourceGenerator generator = node.getModel().getGenerator();
String newAttrValue = generator.generateAttrValue(attr);
// There is a problem in
@@ -303,7 +303,7 @@ public class ElementNodeFormatter extends DocumentNodeFormatter {
String undefinedRegion = getUndefinedRegions(node, lastUndefinedRegionOffset, node.getEndOffset() - lastUndefinedRegionOffset);
stringBuffer.append(undefinedRegion);
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
// 1 is for "<"
int offset = node.getStartOffset() + 1 + node.getNodeName().length();
@@ -332,7 +332,7 @@ public class ElementNodeFormatter extends DocumentNodeFormatter {
}
}
- protected String getUndefinedRegions(XMLNode node, int startOffset, int length) {
+ protected String getUndefinedRegions(DOMNode node, int startOffset, int length) {
String result = new String();
IStructuredDocumentRegion flatNode = node.getFirstStructuredDocumentRegion();
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java
index ad5aa37d83..c4fc31feeb 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java
@@ -28,8 +28,8 @@ 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.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
import org.eclipse.wst.xml.core.internal.document.CDATASectionImpl;
import org.eclipse.wst.xml.core.internal.document.CharacterDataImpl;
@@ -125,7 +125,7 @@ public class NodeFormatter implements IStructuredFormatter {
return compressedString.toString();
}
- protected boolean firstStructuredDocumentRegionContainsLineDelimiters(XMLNode node) {
+ protected boolean firstStructuredDocumentRegionContainsLineDelimiters(DOMNode node) {
boolean result = false;
if (node != null) {
@@ -149,13 +149,13 @@ public class NodeFormatter implements IStructuredFormatter {
if (formatContraints.getFormatWithSiblingIndent())
formatContraints.setCurrentIndent(getSiblingIndent(node));
- if (node instanceof XMLNode)
- formatNode((XMLNode) node, formatContraints);
+ if (node instanceof DOMNode)
+ formatNode((DOMNode) node, formatContraints);
}
- protected void formatIndentationAfterNode(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatIndentationAfterNode(DOMNode node, IStructuredFormatContraints formatContraints) {
if (node != null) {
- XMLNode nextSibling = (XMLNode) node.getNextSibling();
+ DOMNode nextSibling = (DOMNode) node.getNextSibling();
IStructuredDocument doc = node.getModel().getStructuredDocument();
int line = doc.getLineOfOffset(node.getEndOffset());
String lineDelimiter = doc.getLineDelimiter();
@@ -191,9 +191,9 @@ public class NodeFormatter implements IStructuredFormatter {
insertAfterNode(node, lineDelimiter + lineIndent);
}
else {
- XMLNode indentNode = getParentIndentNode(node);
+ DOMNode indentNode = getParentIndentNode(node);
String lineIndent = getNodeIndent(indentNode);
- XMLNode lastChild = getDeepestChildNode(node);
+ DOMNode lastChild = getDeepestChildNode(node);
boolean clearAllBlankLines = formatContraints.getClearAllBlankLines();
if (lastChild != null) {
@@ -227,9 +227,9 @@ public class NodeFormatter implements IStructuredFormatter {
}
}
- protected void formatIndentationBeforeNode(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatIndentationBeforeNode(DOMNode node, IStructuredFormatContraints formatContraints) {
if (node != null) {
- XMLNode previousSibling = (XMLNode) node.getPreviousSibling();
+ DOMNode previousSibling = (DOMNode) node.getPreviousSibling();
IStructuredDocument doc = node.getModel().getStructuredDocument();
int line = doc.getLineOfOffset(node.getStartOffset());
String lineDelimiter = doc.getLineDelimiter();
@@ -289,7 +289,7 @@ public class NodeFormatter implements IStructuredFormatter {
}
}
- protected void formatNode(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatNode(DOMNode node, IStructuredFormatContraints formatContraints) {
if (node != null && (fProgressMonitor == null || !fProgressMonitor.isCanceled())) {
// format indentation before node
formatIndentationBeforeNode(node, formatContraints);
@@ -304,14 +304,14 @@ public class NodeFormatter implements IStructuredFormatter {
* depending on the indentations of its sibling nodes and parent node. Not
* needed anymore?
*/
- protected void formatTrailingText(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatTrailingText(DOMNode node, IStructuredFormatContraints formatContraints) {
String lineDelimiter = node.getModel().getStructuredDocument().getLineDelimiter();
String lineIndent = formatContraints.getCurrentIndent();
String parentLineIndent = getNodeIndent(node.getParentNode());
boolean clearAllBlankLines = formatContraints.getClearAllBlankLines();
if ((node != null) && (node.getNodeType() != Node.DOCUMENT_NODE)) {
- XMLNode nextSibling = (XMLNode) node.getNextSibling();
+ DOMNode nextSibling = (DOMNode) node.getNextSibling();
if ((nextSibling != null) && (nextSibling.getNodeType() == Node.TEXT_NODE)) {
String nextSiblingText = nextSibling.getNodeValue();
if (nextSibling.getNextSibling() == null)
@@ -380,13 +380,13 @@ public class NodeFormatter implements IStructuredFormatter {
}
}
- protected String getCompressedNodeText(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected String getCompressedNodeText(DOMNode node, IStructuredFormatContraints formatContraints) {
return compressSpaces(getNodeText(node), formatContraints);
}
- protected XMLNode getDeepestChildNode(XMLNode node) {
- XMLNode result = null;
- XMLNode lastChild = (XMLNode) node.getLastChild();
+ protected DOMNode getDeepestChildNode(DOMNode node) {
+ DOMNode result = null;
+ DOMNode lastChild = (DOMNode) node.getLastChild();
if (lastChild == null)
result = node;
@@ -436,7 +436,7 @@ public class NodeFormatter implements IStructuredFormatter {
return fFormatPreferences;
}
- protected IStructuredFormatter getFormatter(XMLNode node) {
+ protected IStructuredFormatter getFormatter(DOMNode node) {
// 262135 - NPE during format of empty document
if (node == null)
return null;
@@ -513,7 +513,7 @@ public class NodeFormatter implements IStructuredFormatter {
String result = EMPTY_STRING;
if ((node != null) && (node.getNodeType() != Node.DOCUMENT_NODE) && (node.getParentNode() != null) && (node.getParentNode().getNodeType() != Node.DOCUMENT_NODE)) {
- XMLNode siblingTextNode = (XMLNode) node.getPreviousSibling();
+ DOMNode siblingTextNode = (DOMNode) node.getPreviousSibling();
if ((siblingTextNode != null) && (siblingTextNode.getNodeType() == Node.TEXT_NODE)) {
// find the indentation
String siblingText = siblingTextNode.getNodeValue();
@@ -532,11 +532,11 @@ public class NodeFormatter implements IStructuredFormatter {
return result;
}
- protected String getNodeName(XMLNode node) {
+ protected String getNodeName(DOMNode node) {
return node.getNodeName();
}
- protected String getNodeText(XMLNode node) {
+ protected String getNodeText(DOMNode node) {
String text = null;
if ((node instanceof CharacterDataImpl) && !(node instanceof CommentImpl) && !(node instanceof CDATASectionImpl) && !isJSPTag(node))
@@ -547,9 +547,9 @@ public class NodeFormatter implements IStructuredFormatter {
return text;
}
- protected XMLNode getParentIndentNode(XMLNode node) {
- XMLNode result = null;
- XMLNode parentNode = (XMLNode) node.getParentNode();
+ protected DOMNode getParentIndentNode(DOMNode node) {
+ DOMNode result = null;
+ DOMNode parentNode = (DOMNode) node.getParentNode();
if (parentNode.getNodeType() == Node.DOCUMENT_NODE)
result = parentNode;
@@ -582,16 +582,16 @@ public class NodeFormatter implements IStructuredFormatter {
// find the text node before the previous non-text sibling
// if that's not found, we will try the text node before the next
// non-text sibling
- XMLNode sibling = (XMLNode) node.getPreviousSibling();
+ DOMNode sibling = (DOMNode) node.getPreviousSibling();
while ((sibling != null) && (sibling.getNodeType() == Node.TEXT_NODE || sibling.getNodeType() == Node.COMMENT_NODE)) {
if (sibling.getNodeType() == Node.COMMENT_NODE && sibling.getPreviousSibling() != null && sibling.getPreviousSibling().getNodeType() == Node.TEXT_NODE && StringUtils.containsLineDelimiter(sibling.getPreviousSibling().getNodeValue()))
break;
- sibling = (XMLNode) sibling.getPreviousSibling();
+ sibling = (DOMNode) sibling.getPreviousSibling();
}
if (sibling == null) {
- sibling = (XMLNode) node.getNextSibling();
+ sibling = (DOMNode) node.getNextSibling();
while ((sibling != null) && (sibling.getNodeType() == Node.TEXT_NODE))
- sibling = (XMLNode) sibling.getNextSibling();
+ sibling = (DOMNode) sibling.getNextSibling();
}
String singleIndent = getFormatPreferences().getIndent();
String parentLineIndent = getNodeIndent(node.getParentNode());
@@ -623,8 +623,8 @@ public class NodeFormatter implements IStructuredFormatter {
return result;
}
- protected void insertAfterNode(XMLNode node, String string) {
- XMLModel structuredModel = node.getModel();
+ protected void insertAfterNode(DOMNode node, String string) {
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
int offset = node.getEndOffset();
@@ -638,8 +638,8 @@ public class NodeFormatter implements IStructuredFormatter {
replace(structuredDocument, offset, length, string);
}
- protected void insertBeforeNode(XMLNode node, String string) {
- XMLModel structuredModel = node.getModel();
+ protected void insertBeforeNode(DOMNode node, String string) {
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
replace(structuredDocument, node.getStartOffset(), 0, string);
@@ -653,7 +653,7 @@ public class NodeFormatter implements IStructuredFormatter {
return type.equals(IStructuredFormatter.class);
}
- protected boolean isEndTagMissing(XMLNode node) {
+ protected boolean isEndTagMissing(DOMNode node) {
boolean result = false;
if ((node != null) && (node.getNodeType() != Node.DOCUMENT_NODE) && !isJSPTag(node)) {
@@ -676,7 +676,7 @@ public class NodeFormatter implements IStructuredFormatter {
return result;
}
- protected boolean nodeHasSiblings(XMLNode node) {
+ protected boolean nodeHasSiblings(DOMNode node) {
return (node.getPreviousSibling() != null) || (node.getNextSibling() != null);
}
@@ -686,9 +686,9 @@ public class NodeFormatter implements IStructuredFormatter {
public void notifyChanged(org.eclipse.wst.sse.core.INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
}
- protected void removeRegionSpaces(XMLNode node, IStructuredDocumentRegion flatNode, ITextRegion region) {
+ protected void removeRegionSpaces(DOMNode node, IStructuredDocumentRegion flatNode, ITextRegion region) {
if ((region != null) && (region instanceof ContextRegion || region instanceof TagNameRegion) && (flatNode.getEndOffset(region) > flatNode.getTextEndOffset(region))) {
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
replace(structuredDocument, flatNode.getTextEndOffset(region), flatNode.getEndOffset(region) - flatNode.getTextEndOffset(region), EMPTY_STRING);
@@ -715,8 +715,8 @@ public class NodeFormatter implements IStructuredFormatter {
* value to be replaced is the same as the new string, the node value will
* not be replaced.
*/
- protected void replaceNodeValue(XMLNode node, String string) {
- XMLModel structuredModel = node.getModel();
+ protected void replaceNodeValue(DOMNode node, String string) {
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
int offset = node.getStartOffset();
int length = node.getEndOffset() - node.getStartOffset();
@@ -769,8 +769,8 @@ public class NodeFormatter implements IStructuredFormatter {
boolean result = false;
- if (node instanceof XMLNode) {
- IStructuredDocumentRegion flatNode = ((XMLNode) node).getFirstStructuredDocumentRegion();
+ if (node instanceof DOMNode) {
+ IStructuredDocumentRegion flatNode = ((DOMNode) 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
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/TextNodeFormatter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/TextNodeFormatter.java
index 29477216ce..5c8c7fdab6 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/TextNodeFormatter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/TextNodeFormatter.java
@@ -20,12 +20,12 @@ import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatContraints;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Node;
public class TextNodeFormatter extends NodeFormatter {
- protected void formatNode(XMLNode node, IStructuredFormatContraints formatContraints) {
+ protected void formatNode(DOMNode node, IStructuredFormatContraints formatContraints) {
if (node != null) {
IStructuredDocument doc = node.getModel().getStructuredDocument();
int line = doc.getLineOfOffset(node.getStartOffset());
@@ -38,7 +38,7 @@ public class TextNodeFormatter extends NodeFormatter {
throw new SourceEditingRuntimeException(exception);
}
int lineWidth = getFormatPreferences().getLineWidth();
- XMLNode parentNode = (XMLNode) node.getParentNode();
+ DOMNode parentNode = (DOMNode) node.getParentNode();
String nodeIndentation = formatContraints.getCurrentIndent();
// compute current available line width
@@ -55,7 +55,7 @@ public class TextNodeFormatter extends NodeFormatter {
String compressedText = getCompressedNodeText(node, formatContraints);
- if (((compressedText.length() <= (currentAvailableLineWidth - node.getParentNode().getNodeName().length() - 3) && !StringUtils.containsLineDelimiter(compressedText)) && (!nodeHasSiblings(node) || (!StringUtils.containsLineDelimiter(node.getNodeValue()) && node.getNextSibling() != null && node.getNextSibling().getNodeType() == Node.COMMENT_NODE && !StringUtils.containsLineDelimiter(node.getNextSibling().getNodeValue()))) && !firstStructuredDocumentRegionContainsLineDelimiters((XMLNode) node.getParentNode())) || node.getStartStructuredDocumentRegion().getStartOffset() == 0) {
+ if (((compressedText.length() <= (currentAvailableLineWidth - node.getParentNode().getNodeName().length() - 3) && !StringUtils.containsLineDelimiter(compressedText)) && (!nodeHasSiblings(node) || (!StringUtils.containsLineDelimiter(node.getNodeValue()) && node.getNextSibling() != null && node.getNextSibling().getNodeType() == Node.COMMENT_NODE && !StringUtils.containsLineDelimiter(node.getNextSibling().getNodeValue()))) && !firstStructuredDocumentRegionContainsLineDelimiters((DOMNode) node.getParentNode())) || node.getStartStructuredDocumentRegion().getStartOffset() == 0) {
// enough space
// and text has no line delimiters
// and (node has no siblings or followed by inline comment)
@@ -63,9 +63,9 @@ public class TextNodeFormatter extends NodeFormatter {
// parentFirstStructuredDocumentRegionContainsLineDelimiters
if (isEndTagMissing(parentNode)) {
- parentNode = (XMLNode) parentNode.getParentNode();
+ parentNode = (DOMNode) parentNode.getParentNode();
while (isEndTagMissing(parentNode))
- parentNode = (XMLNode) parentNode.getParentNode();
+ parentNode = (DOMNode) parentNode.getParentNode();
// add parent's indentation to end
nodeIndentation = getNodeIndent(parentNode);
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java
index e8a07085c0..50c9d95bde 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java
@@ -27,7 +27,7 @@ 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.util.Debug;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
/**
@@ -240,8 +240,8 @@ public class EveryNodeDebugAdapter implements IDebugAdapter {
* int, java.lang.Object, java.lang.Object, java.lang.Object, int)
*/
public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- if (notifier instanceof XMLNode) {
- setModel(((XMLNode) notifier).getModel());
+ if (notifier instanceof DOMNode) {
+ setModel(((DOMNode) notifier).getModel());
}
Debug.println("notifier: " + notifier + " " + INodeNotifier.EVENT_TYPE_STRINGS[eventType] + " changedFeature: " + changedFeature + " oldValue: " + oldValue + " newValue: " + newValue + " pos: " + pos); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java
index a23743abd1..73455f2e7c 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java
@@ -26,12 +26,12 @@ 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.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.ISourceGenerator;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
@@ -59,7 +59,7 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
public Node cleanup(Node node) {
Node newNode = cleanupChildren(node);
- XMLNode renamedNode = newNode instanceof XMLNode ? (XMLNode) newNode : null;
+ DOMNode renamedNode = newNode instanceof DOMNode ? (DOMNode) newNode : null;
// call quoteAttrValue() first so it will close any unclosed attr
// quoteAttrValue() will return the new start tag if there is a
@@ -70,7 +70,7 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
// if node is not comment tag
// and not implicit tag
if (!isCommentTag(renamedNode) && !isImplicitTag(renamedNode)) {
- XMLModel structuredModel = renamedNode.getModel();
+ DOMModel structuredModel = renamedNode.getModel();
// save start offset before insertTagClose()
// or else renamedNode.getStartOffset() will be zero if
@@ -83,7 +83,7 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
// update renamedNode and startTagStructuredDocumentRegion after
// insertTagClose()
- renamedNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset);
+ renamedNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset);
startTagStructuredDocumentRegion = renamedNode.getStartStructuredDocumentRegion();
// for end tag
@@ -118,19 +118,19 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
childNode = cleanupHandler.cleanup(childNode);
// get new parent node
- parentNode = (XMLNode) childNode.getParentNode();
+ parentNode = (DOMNode) childNode.getParentNode();
// get next child node
- childNode = (XMLNode) childNode.getNextSibling();
+ childNode = (DOMNode) childNode.getNextSibling();
}
}
return parentNode;
}
- private XMLNode compressEmptyElementTag(XMLNode node) {
+ private DOMNode compressEmptyElementTag(DOMNode node) {
boolean compressEmptyElementTags = getCleanupPreferences().getCompressEmptyElementTags();
- XMLNode newNode = node;
+ DOMNode newNode = node;
IStructuredDocumentRegion startTagStructuredDocumentRegion = newNode.getFirstStructuredDocumentRegion();
IStructuredDocumentRegion endTagStructuredDocumentRegion = newNode.getLastStructuredDocumentRegion();
@@ -142,18 +142,18 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
if (lastRegion.getType() != XMLRegionContext.XML_EMPTY_TAG_CLOSE) {
NodeList childNodes = newNode.getChildNodes();
if (childNodes == null || childNodes.getLength() == 0 || (childNodes.getLength() == 1 && (childNodes.item(0)).getNodeType() == Node.TEXT_NODE && ((childNodes.item(0)).getNodeValue().trim().length() == 0))) {
- XMLModel structuredModel = newNode.getModel();
+ DOMModel structuredModel = newNode.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
int startTagStartOffset = newNode.getStartOffset();
int offset = endTagStructuredDocumentRegion.getStart();
int length = endTagStructuredDocumentRegion.getLength();
structuredDocument.replaceText(structuredDocument, offset, length, ""); //$NON-NLS-1$
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
offset = startTagStructuredDocumentRegion.getStart() + lastRegion.getStart();
structuredDocument.replaceText(structuredDocument, offset, 0, "/"); //$NON-NLS-1$
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
}
}
}
@@ -215,14 +215,14 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
return result;
}
- private XMLNode insertEndTag(XMLNode node) {
- XMLNode newNode = node;
- XMLElement element = (XMLElement) node;
+ private DOMNode insertEndTag(DOMNode node) {
+ DOMNode newNode = node;
+ DOMElement element = (DOMElement) node;
if (element.isCommentTag())
return node; // do nothing
int startTagStartOffset = node.getStartOffset();
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
if (isEmptyElement(element)) {
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
@@ -243,7 +243,7 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
String tagName = node.getNodeName();
String endTag = END_TAG_OPEN.concat(tagName).concat(TAG_CLOSE);
- XMLNode lastChild = (XMLNode) node.getLastChild();
+ DOMNode lastChild = (DOMNode) node.getLastChild();
int endTagStartOffset = 0;
if (lastChild != null)
// if this node has children, insert the end tag after the
@@ -258,16 +258,16 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
structuredDocument.replaceText(structuredDocument, endTagStartOffset, 0, endTag);
}
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
// new
// node
return newNode;
}
- private XMLNode insertMissingTags(XMLNode node) {
+ private DOMNode insertMissingTags(DOMNode node) {
boolean insertMissingTags = getCleanupPreferences().getInsertMissingTags();
- XMLNode newNode = node;
+ DOMNode newNode = node;
if (insertMissingTags) {
IStructuredDocumentRegion startTagStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
@@ -297,9 +297,9 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
return newNode;
}
- private XMLNode insertRequiredAttrs(XMLNode node) {
+ private DOMNode insertRequiredAttrs(DOMNode node) {
boolean insertRequiredAttrs = getCleanupPreferences().getInsertRequiredAttrs();
- XMLNode newNode = node;
+ DOMNode newNode = node;
if (insertRequiredAttrs) {
List requiredAttrs = getRequiredAttrs(newNode);
@@ -366,8 +366,8 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
return newNode;
}
- private XMLNode insertStartTag(XMLNode node) {
- XMLNode newNode = node;
+ private DOMNode insertStartTag(DOMNode node) {
+ DOMNode newNode = node;
if (isCommentTag(node))
return node; // do nothing
@@ -376,17 +376,17 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
String startTag = START_TAG_OPEN.concat(tagName).concat(TAG_CLOSE);
int startTagStartOffset = node.getStartOffset();
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
structuredDocument.replaceText(structuredDocument, startTagStartOffset, 0, startTag);
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
// new
// node
return newNode;
}
- private void insertTagClose(XMLModel structuredModel, IStructuredDocumentRegion flatNode) {
+ private void insertTagClose(DOMModel structuredModel, IStructuredDocumentRegion flatNode) {
if (flatNode != null) {
ITextRegionList flatnodeRegions = flatNode.getRegions();
if (flatnodeRegions != null) {
@@ -412,14 +412,14 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
*/
private boolean isCommentTag(Node renamedNode) {
boolean result = false;
- if (renamedNode instanceof XMLElement) {
- XMLElement element = (XMLElement) renamedNode;
+ if (renamedNode instanceof DOMElement) {
+ DOMElement element = (DOMElement) renamedNode;
result = element.isCommentTag();
}
return result;
}
- private boolean isEmptyElement(XMLElement element) {
+ private boolean isEmptyElement(DOMElement element) {
Document document = element.getOwnerDocument();
if (document == null)
// undefined tag, return default
@@ -438,7 +438,7 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
return (decl.getContentType() == CMElementDeclaration.EMPTY);
}
- private boolean isEndTagRequired(XMLNode node) {
+ private boolean isEndTagRequired(DOMNode node) {
if (node == null)
return false;
return node.isContainer();
@@ -450,7 +450,7 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
* @param renamedNode
* @return
*/
- private boolean isImplicitTag(XMLNode renamedNode) {
+ private boolean isImplicitTag(DOMNode renamedNode) {
return renamedNode.getStartStructuredDocumentRegion() == null;
}
@@ -459,17 +459,17 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
* undefined tags are parsed separately from the start tags. So inserting
* the missing start tag is useless and even harmful.
*/
- private boolean isStartTagRequired(XMLNode node) {
+ private boolean isStartTagRequired(DOMNode node) {
if (node == null)
return false;
return node.isContainer();
}
- private boolean isXMLType(XMLModel structuredModel) {
+ private boolean isXMLType(DOMModel structuredModel) {
boolean result = false;
if (structuredModel != null && structuredModel != null) {
- XMLDocument document = structuredModel.getDocument();
+ DOMDocument document = structuredModel.getDocument();
if (document != null)
result = document.isXMLType();
@@ -478,8 +478,8 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
return result;
}
- private XMLNode quoteAttrValue(XMLNode node) {
- XMLNode newNode = node;
+ private DOMNode quoteAttrValue(DOMNode node) {
+ DOMNode newNode = node;
//XMLElement element = (XMLElement) node;
if (isCommentTag(node))
return node; // do nothing
@@ -490,17 +490,17 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
NamedNodeMap attributes = newNode.getAttributes();
if (attributes != null) {
int attributesLength = attributes.getLength();
- XMLGenerator generator = node.getModel().getGenerator();
+ ISourceGenerator generator = node.getModel().getGenerator();
for (int i = 0; i < attributesLength; i++) {
attributes = newNode.getAttributes();
attributesLength = attributes.getLength();
- XMLAttr eachAttr = (XMLAttr) attributes.item(i);
+ DOMAttr eachAttr = (DOMAttr) attributes.item(i);
//ITextRegion oldAttrValueRegion =
// eachAttr.getValueRegion();
String oldAttrValue = eachAttr.getValueRegionText();
if (oldAttrValue == null) {
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
if (isXMLType(structuredModel)) {
String newAttrValue = "\"" + eachAttr.getNameRegionText() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
@@ -511,7 +511,7 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
else
// no equal region
structuredDocument.replaceText(structuredDocument, eachAttr.getNameRegionTextEndOffset(), 0, "=".concat(newAttrValue)); //$NON-NLS-1$
- newNode = (XMLNode) structuredModel.getIndexedRegion(node.getStartOffset()); // save
+ newNode = (DOMNode) structuredModel.getIndexedRegion(node.getStartOffset()); // save
// new
// node
}
@@ -538,10 +538,10 @@ public class ElementNodeCleanupHandler extends NodeCleanupHandler {
int attrValueLength = oldAttrValue.length();
int startTagStartOffset = node.getStartOffset();
- XMLModel structuredModel = node.getModel();
+ DOMModel structuredModel = node.getModel();
IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
structuredDocument.replaceText(structuredDocument, attrValueStartOffset, attrValueLength, newAttrValue);
- newNode = (XMLNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
+ newNode = (DOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
// new
// node
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java
index 3ba78734db..278ba7648e 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java
@@ -21,9 +21,9 @@ import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionContainer;
import org.eclipse.wst.sse.core.text.ITextRegionList;
+import org.eclipse.wst.xml.core.XMLCharEntity;
import org.eclipse.wst.xml.core.XMLNamespace;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLCharEntity;
+import org.eclipse.wst.xml.core.document.DOMAttr;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
@@ -37,7 +37,7 @@ import org.w3c.dom.Node;
/**
* AttrImpl class
*/
-public class AttrImpl extends NodeImpl implements XMLAttr {
+public class AttrImpl extends NodeImpl implements DOMAttr {
private ITextRegion equalRegion = null;
private String name = null;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java
index 7d06271b91..7666888bab 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java
@@ -22,11 +22,11 @@ import java.util.Map;
import org.eclipse.wst.sse.core.modelhandler.IModelHandler;
import org.eclipse.wst.xml.core.NameValidator;
+import org.eclipse.wst.xml.core.XMLCharEntity;
import org.eclipse.wst.xml.core.commentelement.impl.CommentElementRegistry;
-import org.eclipse.wst.xml.core.document.XMLCharEntity;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMEntityDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
@@ -56,7 +56,7 @@ import org.w3c.dom.traversal.TreeWalker;
/**
* DocumentImpl class
*/
-public class DocumentImpl extends NodeContainer implements XMLDocument {
+public class DocumentImpl extends NodeContainer implements DOMDocument {
/**
* Internal-use only class. This class was added to better able to handle
@@ -476,7 +476,7 @@ public class DocumentImpl extends NodeContainer implements XMLDocument {
for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) {
if (child.getNodeType() == DOCUMENT_TYPE_NODE && child instanceof DocumentType) {
return (DocumentType) child;
- } else if (child.getNodeType() == ELEMENT_NODE && ((XMLElement) child).isCommentTag()) {
+ } else if (child.getNodeType() == ELEMENT_NODE && ((DOMElement) child).isCommentTag()) {
// search DOCTYPE inside of generic comment element
DocumentType docType = findDoctype(child);
if (docType != null) {
@@ -799,7 +799,7 @@ public class DocumentImpl extends NodeContainer implements XMLDocument {
/**
* other nodes will be referring to this one to get the owning model
*/
- public XMLModel getModel() {
+ public DOMModel getModel() {
return model;
}
@@ -1018,7 +1018,7 @@ public class DocumentImpl extends NodeContainer implements XMLDocument {
* XMLModel
*/
- protected void setModel(XMLModel model) {
+ protected void setModel(DOMModel model) {
this.model = (XMLModelImpl) model;
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeAdapterImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeAdapterImpl.java
index 63c87d7785..9ed7a28ea5 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeAdapterImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeAdapterImpl.java
@@ -15,8 +15,8 @@ package org.eclipse.wst.xml.core.internal.document;
import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.w3c.dom.DocumentType;
@@ -24,7 +24,7 @@ import org.w3c.dom.DocumentType;
*/
public class DocumentTypeAdapterImpl implements DocumentTypeAdapter {
- private XMLDocument document = null;
+ private DOMDocument document = null;
private DocumentType documentType = null;
/**
@@ -35,7 +35,7 @@ public class DocumentTypeAdapterImpl implements DocumentTypeAdapter {
/**
*/
- protected DocumentTypeAdapterImpl(XMLDocument document) {
+ protected DocumentTypeAdapterImpl(DOMDocument document) {
this.document = document;
if (document != null) {
this.documentType = document.getDoctype();
@@ -50,7 +50,7 @@ public class DocumentTypeAdapterImpl implements DocumentTypeAdapter {
/**
*/
- protected XMLDocument getDocument() {
+ protected DOMDocument getDocument() {
return this.document;
}
@@ -89,9 +89,9 @@ public class DocumentTypeAdapterImpl implements DocumentTypeAdapter {
public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
if (eventType != INodeNotifier.STRUCTURE_CHANGED)
return;
- if (notifier == null || !(notifier instanceof XMLDocument))
+ if (notifier == null || !(notifier instanceof DOMDocument))
return;
- this.documentType = ((XMLDocument) notifier).getDoctype();
+ this.documentType = ((DOMDocument) notifier).getDoctype();
}
/**
@@ -99,7 +99,7 @@ public class DocumentTypeAdapterImpl implements DocumentTypeAdapter {
protected void notifyDocumentTypeChanged() {
if (this.document == null)
return;
- XMLModel model = this.document.getModel();
+ DOMModel model = this.document.getModel();
if (model == null)
return;
((XMLModelImpl) model).documentTypeChanged();
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java
index c8137da34b..ce781baef8 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java
@@ -15,7 +15,7 @@ package org.eclipse.wst.xml.core.internal.document;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLDocumentType;
+import org.eclipse.wst.xml.core.document.DOMDocumentType;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.w3c.dom.DOMException;
import org.w3c.dom.NamedNodeMap;
@@ -25,7 +25,7 @@ import org.w3c.dom.Node;
/**
* DocumentType class
*/
-public class DocumentTypeImpl extends NodeImpl implements XMLDocumentType {
+public class DocumentTypeImpl extends NodeImpl implements DOMDocumentType {
private String internalSubset = null;
private String name = null;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java
index 6fcc117332..6737442f00 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java
@@ -24,9 +24,9 @@ import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.xml.core.XMLNamespace;
import org.eclipse.wst.xml.core.commentelement.CommentElementAdapter;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
@@ -46,7 +46,7 @@ import org.w3c.dom.traversal.NodeIterator;
/**
* ElementImpl class
*/
-public class ElementImpl extends NodeContainer implements XMLElement {
+public class ElementImpl extends NodeContainer implements DOMElement {
private class Attributes implements NamedNodeMap {
Attributes() {
@@ -696,7 +696,7 @@ public class ElementImpl extends NodeContainer implements XMLElement {
protected boolean isCDATAContainer() {
// use BlockMaker instead of CMElementDeclaration
// because <style> and <script> in XHTML is not CDATA content type
- XMLModel model = getModel();
+ DOMModel model = getModel();
if (model == null)
return false; // error
IStructuredDocument structuredDocument = model.getStructuredDocument();
@@ -1283,7 +1283,7 @@ public class ElementImpl extends NodeContainer implements XMLElement {
/**
*/
public void setCommentTag(boolean isCommentTag) {
- XMLNode parent = (XMLNode) getParentNode();
+ DOMNode parent = (DOMNode) getParentNode();
if (parent != null && !parent.isChildEditable()) {
throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, new String());
}
@@ -1298,7 +1298,7 @@ public class ElementImpl extends NodeContainer implements XMLElement {
* boolean
*/
public void setEmptyTag(boolean isEmptyTag) {
- XMLNode parent = (XMLNode) getParentNode();
+ DOMNode parent = (DOMNode) getParentNode();
if (parent != null && !parent.isChildEditable()) {
throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, new String());
}
@@ -1328,7 +1328,7 @@ public class ElementImpl extends NodeContainer implements XMLElement {
* boolean
*/
public void setJSPTag(boolean isJSPTag) {
- XMLNode parent = (XMLNode) getParentNode();
+ DOMNode parent = (DOMNode) getParentNode();
if (parent != null && !parent.isChildEditable()) {
throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, new String());
}
@@ -1362,7 +1362,7 @@ public class ElementImpl extends NodeContainer implements XMLElement {
/**
*/
public void setPrefix(String prefix) throws DOMException {
- XMLNode parent = (XMLNode) getParentNode();
+ DOMNode parent = (DOMNode) getParentNode();
if (parent != null && !parent.isChildEditable()) {
throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, new String());
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ModelParserAdapter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ModelParserAdapter.java
index 011079bc31..b5b14314be 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ModelParserAdapter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ModelParserAdapter.java
@@ -15,7 +15,7 @@ package org.eclipse.wst.xml.core.internal.document;
import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -51,5 +51,5 @@ public interface ModelParserAdapter extends INodeAdapter {
/**
*/
- public boolean isEndTag(XMLElement element);
+ public boolean isEndTag(DOMElement element);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeContainer.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeContainer.java
index 121d57cb17..4749ad53be 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeContainer.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeContainer.java
@@ -15,7 +15,7 @@ package org.eclipse.wst.xml.core.internal.document;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
@@ -491,11 +491,11 @@ public abstract class NodeContainer extends NodeImpl implements Node, NodeList {
Node node;
if (editable) {
for (node = getFirstChild(); node != null; node = node.getNextSibling()) {
- roc.unlockNode((XMLNode) node);
+ roc.unlockNode((DOMNode) node);
}
} else {
for (node = getFirstChild(); node != null; node = node.getNextSibling()) {
- roc.lockNode((XMLNode) node);
+ roc.lockNode((DOMNode) node);
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeImpl.java
index 6b051255a3..0b3170a87d 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeImpl.java
@@ -19,8 +19,8 @@ import org.eclipse.wst.sse.core.FactoryRegistry;
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.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.DOMException;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
@@ -35,7 +35,7 @@ import org.w3c.dom.Text;
/**
* NodeImpl class
*/
-public abstract class NodeImpl extends AbstractNotifier implements XMLNode {
+public abstract class NodeImpl extends AbstractNotifier implements DOMNode {
// define one empty nodelist, for repeated use
private final static NodeList EMPTY_NODE_LIST = new NodeListImpl();
@@ -226,7 +226,7 @@ public abstract class NodeImpl extends AbstractNotifier implements XMLNode {
/**
*/
public FactoryRegistry getFactoryRegistry() {
- XMLModel model = getModel();
+ DOMModel model = getModel();
if (model != null) {
FactoryRegistry reg = model.getFactoryRegistry();
if (reg != null)
@@ -295,7 +295,7 @@ public abstract class NodeImpl extends AbstractNotifier implements XMLNode {
/**
* the default implementation can just refer to the owning document
*/
- public XMLModel getModel() {
+ public DOMModel getModel() {
if (this.ownerDocument == null)
return null;
return this.ownerDocument.getModel();
@@ -331,11 +331,11 @@ public abstract class NodeImpl extends AbstractNotifier implements XMLNode {
* int
*/
Node getNodeAt(int offset) {
- XMLNode parent = this;
- XMLNode child = (XMLNode) getFirstChild();
+ DOMNode parent = this;
+ DOMNode child = (DOMNode) getFirstChild();
while (child != null) {
if (child.getEndOffset() <= offset) {
- child = (XMLNode) child.getNextSibling();
+ child = (DOMNode) child.getNextSibling();
continue;
}
if (child.getStartOffset() > offset) {
@@ -350,7 +350,7 @@ public abstract class NodeImpl extends AbstractNotifier implements XMLNode {
// dig more
parent = child;
- child = (XMLNode) parent.getFirstChild();
+ child = (DOMNode) parent.getFirstChild();
}
return parent;
@@ -695,10 +695,10 @@ public abstract class NodeImpl extends AbstractNotifier implements XMLNode {
public void setEditable(boolean editable, boolean deep) {
if (deep) {
- XMLNode node = (XMLNode) getFirstChild();
+ DOMNode node = (DOMNode) getFirstChild();
while (node != null) {
node.setEditable(editable, deep);
- node = (XMLNode) node.getNextSibling();
+ node = (DOMNode) node.getNextSibling();
}
}
setChildEditable(editable);
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/RangeImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/RangeImpl.java
index 1c54ba53d0..b83366b683 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/RangeImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/RangeImpl.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.xml.core.internal.document;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.DOMException;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.Node;
@@ -175,7 +175,7 @@ public class RangeImpl implements Range {
}
// get node offsets
- XMLNode node1 = null;
+ DOMNode node1 = null;
if (container1.hasChildNodes()) {
Node child = container1.getFirstChild();
for (int i = 0; i < offset1; i++) {
@@ -184,13 +184,13 @@ public class RangeImpl implements Range {
break;
child = next;
}
- node1 = (XMLNode) child;
+ node1 = (DOMNode) child;
offset1 = 0;
} else {
- node1 = (XMLNode) container1;
+ node1 = (DOMNode) container1;
}
int nodeOffset1 = node1.getStartOffset();
- XMLNode node2 = null;
+ DOMNode node2 = null;
if (container2.hasChildNodes()) {
Node child = container2.getFirstChild();
for (int i = 0; i < offset2; i++) {
@@ -199,10 +199,10 @@ public class RangeImpl implements Range {
break;
child = next;
}
- node2 = (XMLNode) child;
+ node2 = (DOMNode) child;
offset2 = 0;
} else {
- node2 = (XMLNode) container1;
+ node2 = (DOMNode) container1;
}
int nodeOffset2 = node2.getStartOffset();
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java
index 67aa59c493..4f122436b5 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java
@@ -18,9 +18,9 @@ import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.document.XMLText;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMNode;
+import org.eclipse.wst.xml.core.document.DOMText;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.w3c.dom.Node;
@@ -79,18 +79,18 @@ class ReadOnlyController {
super();
}
- private Span getDataSpan(XMLNode node) {
+ private Span getDataSpan(DOMNode node) {
switch (node.getNodeType()) {
case Node.ELEMENT_NODE :
- return getDataSpanForElement((XMLElement) node);
+ return getDataSpanForElement((DOMElement) node);
case Node.TEXT_NODE :
- return getDataSpanForText((XMLText) node);
+ return getDataSpanForText((DOMText) node);
default :
return new Span(0, -1);
}
}
- private Span getDataSpanForElement(XMLElement node) {
+ private Span getDataSpanForElement(DOMElement node) {
IStructuredDocumentRegion docRegion = node.getStartStructuredDocumentRegion();
if (docRegion == null) {
return new Span(0, -1);
@@ -133,7 +133,7 @@ class ReadOnlyController {
}
}
- private Span getDataSpanForText(XMLText node) {
+ private Span getDataSpanForText(DOMText node) {
IStructuredDocumentRegion docRegion = ((NodeImpl) node).getStructuredDocumentRegion();
if (docRegion == null) {
return new Span(0, -1);
@@ -149,7 +149,7 @@ class ReadOnlyController {
* </child> </node> </parent> x###################? ?#######x (? :
* editable if node.isEditable() == true)
*/
- void lockBoth(XMLNode node) {
+ void lockBoth(DOMNode node) {
if (node == null) {
return;
}
@@ -172,7 +172,7 @@ class ReadOnlyController {
}
}
- void lockData(XMLNode node) {
+ void lockData(DOMNode node) {
if (node == null) {
return;
}
@@ -186,7 +186,7 @@ class ReadOnlyController {
/**
* lock itself and all descendants
*/
- void lockDeep(XMLNode node) {
+ void lockDeep(DOMNode node) {
if (node == null) {
return;
}
@@ -195,7 +195,7 @@ class ReadOnlyController {
int length = node.getEndOffset() - offset;
boolean canInsert = true;
- XMLNode parent = (XMLNode) node.getParentNode();
+ DOMNode parent = (DOMNode) node.getParentNode();
if (parent != null && !parent.isChildEditable()) {
canInsert = false;
}
@@ -209,7 +209,7 @@ class ReadOnlyController {
* case 2:<parent><node attr="value"> <child></child> </node> </parent>
* x######x x#? ?#######x (? : editable if node.isEditable() == true)
*/
- void lockNode(XMLNode node) {
+ void lockNode(DOMNode node) {
if (node == null) {
return;
}
@@ -255,7 +255,7 @@ class ReadOnlyController {
doc.clearReadOnly(offset, length);
}
- void unlockBoth(XMLNode node) {
+ void unlockBoth(DOMNode node) {
if (node == null) {
return;
}
@@ -273,7 +273,7 @@ class ReadOnlyController {
}
}
- void unlockData(XMLNode node) {
+ void unlockData(DOMNode node) {
if (node == null) {
return;
}
@@ -284,7 +284,7 @@ class ReadOnlyController {
}
}
- void unlockDeep(XMLNode node) {
+ void unlockDeep(DOMNode node) {
if (node == null) {
return;
}
@@ -295,7 +295,7 @@ class ReadOnlyController {
unlock(node.getStructuredDocument(), offset, length);
}
- void unlockNode(XMLNode node) {
+ void unlockNode(DOMNode node) {
if (node == null) {
return;
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java
index 46750e9a7d..a94a7cee5d 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java
@@ -12,8 +12,8 @@
*******************************************************************************/
package org.eclipse.wst.xml.core.internal.document;
-import org.eclipse.wst.xml.core.document.XMLCharEntity;
-import org.eclipse.wst.xml.core.document.XMLDocument;
+import org.eclipse.wst.xml.core.XMLCharEntity;
+import org.eclipse.wst.xml.core.document.DOMDocument;
import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
@@ -51,7 +51,7 @@ public class SourceValidator {
boolean acceptJSPEnd = true;
String endTagName = null;
if (this.node.getNodeType() == Node.ATTRIBUTE_NODE) {
- XMLDocument document = (XMLDocument) this.node.getOwnerDocument();
+ DOMDocument document = (DOMDocument) this.node.getOwnerDocument();
if (document != null && document.isJSPType())
acceptTag = true;
if (acceptTag) {
@@ -84,11 +84,11 @@ public class SourceValidator {
acceptAmpersand = true;
}
} else {
- XMLDocument document = null;
+ DOMDocument document = null;
if (this.node.getNodeType() == Node.DOCUMENT_NODE) {
- document = (XMLDocument) this.node;
+ document = (DOMDocument) this.node;
} else {
- document = (XMLDocument) this.node.getOwnerDocument();
+ document = (DOMDocument) this.node.getOwnerDocument();
}
if (document != null && document.isJSPType())
acceptTag = true;
@@ -250,7 +250,7 @@ public class SourceValidator {
boolean acceptEntityRef = true;
String endTagName = null;
if (this.node.getNodeType() == Node.ATTRIBUTE_NODE) {
- XMLDocument document = (XMLDocument) this.node.getOwnerDocument();
+ DOMDocument document = (DOMDocument) this.node.getOwnerDocument();
if (document != null && document.isJSPType())
acceptTag = true;
if (acceptTag) {
@@ -278,11 +278,11 @@ public class SourceValidator {
acceptClose = true;
}
} else {
- XMLDocument document = null;
+ DOMDocument document = null;
if (this.node.getNodeType() == Node.DOCUMENT_NODE) {
- document = (XMLDocument) this.node;
+ document = (DOMDocument) this.node;
} else {
- document = (XMLDocument) this.node.getOwnerDocument();
+ document = (DOMDocument) this.node.getOwnerDocument();
}
if (document != null && document.isJSPType())
acceptTag = true;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionChecker.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionChecker.java
index 47a50fd2c8..7095747aa6 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionChecker.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionChecker.java
@@ -18,7 +18,7 @@ import java.io.IOException;
import java.io.Writer;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.w3c.dom.Node;
@@ -52,7 +52,7 @@ public class StructuredDocumentRegionChecker {
/**
*/
- public void checkModel(XMLModel model) {
+ public void checkModel(DOMModel model) {
checkChildNodes(model.getDocument());
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TagAdapter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TagAdapter.java
index a7efb2bf22..5556c2b92f 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TagAdapter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TagAdapter.java
@@ -15,7 +15,7 @@ package org.eclipse.wst.xml.core.internal.document;
import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.xml.core.document.XMLElement;
+import org.eclipse.wst.xml.core.document.DOMElement;
/**
*/
@@ -23,11 +23,11 @@ public interface TagAdapter extends INodeAdapter {
/**
*/
- String getEndTag(XMLElement element);
+ String getEndTag(DOMElement element);
/**
*/
- String getStartTag(XMLElement element);
+ String getStartTag(DOMElement element);
/**
*/
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java
index e4f0c92ee8..00213210d5 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java
@@ -16,9 +16,9 @@ package org.eclipse.wst.xml.core.internal.document;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.xml.core.document.XMLGenerator;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLText;
+import org.eclipse.wst.xml.core.document.ISourceGenerator;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMText;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
@@ -29,7 +29,7 @@ import org.w3c.dom.Text;
/**
* TextImpl class
*/
-public class TextImpl extends CharacterDataImpl implements XMLText {
+public class TextImpl extends CharacterDataImpl implements DOMText {
/**
*/
@@ -352,10 +352,10 @@ public class TextImpl extends CharacterDataImpl implements XMLText {
private String getSource(String data) {
if (data == null)
return null;
- XMLModel model = getModel();
+ DOMModel model = getModel();
if (model == null)
return null; // error
- XMLGenerator generator = model.getGenerator();
+ ISourceGenerator generator = model.getGenerator();
if (generator == null)
return null; // error
return generator.generateTextData(this, data);
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java
index ed9046e2a7..614f76308c 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java
@@ -14,13 +14,13 @@ package org.eclipse.wst.xml.core.internal.document;
+import org.eclipse.wst.xml.core.XMLCharEntity;
import org.eclipse.wst.xml.core.commentelement.impl.CommentElementRegistry;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLCharEntity;
-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.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.ISourceGenerator;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.w3c.dom.Attr;
@@ -37,7 +37,7 @@ import org.w3c.dom.Text;
/**
*/
-public class XMLGeneratorImpl implements XMLGenerator {
+public class XMLGeneratorImpl implements ISourceGenerator {
private static final String CDATA_CLOSE = "]]>";//$NON-NLS-1$
private static final String CDATA_OPEN = "<![CDATA[";//$NON-NLS-1$
private static final String COMMENT_CLOSE = "-->";//$NON-NLS-1$
@@ -58,7 +58,7 @@ public class XMLGeneratorImpl implements XMLGenerator {
/**
*/
- public synchronized static XMLGenerator getInstance() {
+ public synchronized static ISourceGenerator getInstance() {
if (instance == null)
instance = new XMLGeneratorImpl();
return instance;
@@ -106,7 +106,7 @@ public class XMLGeneratorImpl implements XMLGenerator {
return (attrName + JSPTag.TAG_CLOSE);
}
}
- if (((XMLAttr) attr).isGlobalAttr() && CMNodeUtil.getAttributeDeclaration(attr) != null) {
+ if (((DOMAttr) attr).isGlobalAttr() && CMNodeUtil.getAttributeDeclaration(attr) != null) {
switch (getAttrNameCase(attr)) {
case DocumentTypeAdapter.UPPER_CASE :
attrName = attrName.toUpperCase();
@@ -135,7 +135,7 @@ public class XMLGeneratorImpl implements XMLGenerator {
return null;
String name = attr.getName();
SourceValidator validator = new SourceValidator(attr);
- String value = validator.convertSource(((XMLNode) attr).getValueSource());
+ String value = validator.convertSource(((DOMNode) attr).getValueSource());
if (value == null || value.length() == 0) {
if (name != null && name.startsWith(JSPTag.TAG_OPEN))
return null;
@@ -495,7 +495,7 @@ public class XMLGeneratorImpl implements XMLGenerator {
if (impl.isJSPTag()) {
// check if JSP content type and JSP Document
- XMLDocument document = (XMLDocument) element.getOwnerDocument();
+ DOMDocument document = (DOMDocument) element.getOwnerDocument();
if (document != null && document.isJSPType()) {
if (document.isJSPDocument() && !impl.hasChildNodes()) {
impl.setJSPTag(false);
@@ -571,7 +571,7 @@ public class XMLGeneratorImpl implements XMLGenerator {
public String generateTagName(Element element) {
if (element == null)
return null;
- XMLElement xe = (XMLElement) element;
+ DOMElement xe = (DOMElement) element;
String tagName = element.getTagName();
if (tagName == null)
return null;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelImpl.java
index b4a864ee7f..37b57bad8b 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelImpl.java
@@ -25,11 +25,10 @@ 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.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLGenerator;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLModelNotifier;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.ISourceGenerator;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.Logger;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
@@ -43,11 +42,11 @@ import org.w3c.dom.Node;
/**
* XMLModelImpl class
*/
-public class XMLModelImpl extends AbstractStructuredModel implements IStructuredDocumentListener, XMLModel, DOMImplementation {
+public class XMLModelImpl extends AbstractStructuredModel implements IStructuredDocumentListener, DOMModel, DOMImplementation {
private static String TRACE_PARSER_MANAGEMENT_EXCEPTION = "parserManagement"; //$NON-NLS-1$
private Object active = null;
private DocumentImpl document = null;
- private XMLGenerator generator = null;
+ private ISourceGenerator generator = null;
private XMLModelNotifier notifier = null;
private XMLModelParser parser = null;
private boolean refresh = false;
@@ -327,11 +326,11 @@ public class XMLModelImpl extends AbstractStructuredModel implements IStructured
*
* @return XMLDocument
*/
- public XMLDocument getDocument() {
+ public DOMDocument getDocument() {
return this.document;
}
- public XMLGenerator getGenerator() {
+ public ISourceGenerator getGenerator() {
if (this.generator == null) {
this.generator = XMLGeneratorImpl.getInstance();
}
@@ -348,14 +347,14 @@ public class XMLModelImpl extends AbstractStructuredModel implements IStructured
if (this.document == null)
return null;
// search in document children
- XMLNode parent = null;
+ DOMNode parent = null;
int length = this.document.getEndOffset();
if (offset * 2 < length) {
// search from the first
- XMLNode child = (XMLNode) this.document.getFirstChild();
+ DOMNode child = (DOMNode) this.document.getFirstChild();
while (child != null) {
if (child.getEndOffset() <= offset) {
- child = (XMLNode) child.getNextSibling();
+ child = (DOMNode) child.getNextSibling();
continue;
}
if (child.getStartOffset() > offset) {
@@ -373,14 +372,14 @@ public class XMLModelImpl extends AbstractStructuredModel implements IStructured
}
// dig more
parent = child;
- child = (XMLNode) parent.getFirstChild();
+ child = (DOMNode) parent.getFirstChild();
}
} else {
// search from the last
- XMLNode child = (XMLNode) this.document.getLastChild();
+ DOMNode child = (DOMNode) this.document.getLastChild();
while (child != null) {
if (child.getStartOffset() > offset) {
- child = (XMLNode) child.getPreviousSibling();
+ child = (DOMNode) child.getPreviousSibling();
continue;
}
if (child.getEndOffset() <= offset) {
@@ -398,7 +397,7 @@ public class XMLModelImpl extends AbstractStructuredModel implements IStructured
}
// dig more
parent = child;
- child = (XMLNode) parent.getLastChild();
+ child = (DOMNode) parent.getLastChild();
}
}
return parent;
@@ -807,7 +806,7 @@ public class XMLModelImpl extends AbstractStructuredModel implements IStructured
/**
*/
- public void setGenerator(XMLGenerator generator) {
+ public void setGenerator(ISourceGenerator generator) {
this.generator = generator;
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLModelNotifier.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifier.java
index 47dce06ff8..bc6779be04 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/document/XMLModelNotifier.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifier.java
@@ -10,7 +10,7 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-package org.eclipse.wst.xml.core.document;
+package org.eclipse.wst.xml.core.internal.document;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifierImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifierImpl.java
index e2849d77bc..b654d4c97e 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifierImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifierImpl.java
@@ -17,8 +17,7 @@ import java.util.Vector;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.util.Debug;
-import org.eclipse.wst.xml.core.document.XMLModelNotifier;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.Logger;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
@@ -96,7 +95,7 @@ public class XMLModelNotifierImpl implements XMLModelNotifier {
attr = newAttr;
newValue = newAttr.getValue();
}
- XMLNode notifier = (XMLNode) element;
+ DOMNode notifier = (DOMNode) element;
int offset = notifier.getStartOffset();
notify(notifier, INodeNotifier.CHANGE, attr, oldValue, newValue, offset);
propertyChanged(notifier);
@@ -150,7 +149,7 @@ public class XMLModelNotifierImpl implements XMLModelNotifier {
public void childReplaced(Node parentNode, Node newChild, Node oldChild) {
if (parentNode == null)
return;
- XMLNode notifier = (XMLNode) parentNode;
+ DOMNode notifier = (DOMNode) parentNode;
int type = INodeNotifier.CHANGE;
if (newChild == null)
type = INodeNotifier.REMOVE;
@@ -164,7 +163,7 @@ public class XMLModelNotifierImpl implements XMLModelNotifier {
public void editableChanged(Node node) {
if (node == null)
return;
- XMLNode notifier = (XMLNode) node;
+ DOMNode notifier = (DOMNode) node;
int offset = notifier.getStartOffset();
notify(notifier, INodeNotifier.CHANGE, null, null, null, offset);
propertyChanged(notifier);
@@ -193,7 +192,7 @@ public class XMLModelNotifierImpl implements XMLModelNotifier {
public void endTagChanged(Element element) {
if (element == null)
return;
- XMLNode notifier = (XMLNode) element;
+ DOMNode notifier = (DOMNode) element;
int offset = notifier.getStartOffset();
notify(notifier, INodeNotifier.CHANGE, null, null, null, offset);
propertyChanged(element);
@@ -401,7 +400,7 @@ public class XMLModelNotifierImpl implements XMLModelNotifier {
public void startTagChanged(Element element) {
if (element == null)
return;
- XMLNode notifier = (XMLNode) element;
+ DOMNode notifier = (DOMNode) element;
int offset = notifier.getStartOffset();
notify(notifier, INodeNotifier.CHANGE, null, null, null, offset);
propertyChanged(element);
@@ -436,10 +435,10 @@ public class XMLModelNotifierImpl implements XMLModelNotifier {
public void valueChanged(Node node) {
if (node == null)
return;
- XMLNode notifier = null;
+ DOMNode notifier = null;
if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
Attr attr = (Attr) node;
- notifier = (XMLNode) attr.getOwnerElement();
+ notifier = (DOMNode) attr.getOwnerElement();
// TODO_dmw: experimental: changed 06/29/2004 to send "strucuture
// changed" even for attribute value changes
// there are pros and cons to considering attribute value
@@ -453,12 +452,12 @@ public class XMLModelNotifierImpl implements XMLModelNotifier {
} else {
// note: we do not send structured changed event for content
// changed
- notifier = (XMLNode) node;
+ notifier = (DOMNode) node;
String value = node.getNodeValue();
int offset = notifier.getStartOffset();
notify(notifier, INodeNotifier.CHANGE, null, null, value, offset);
if (node.getNodeType() != Node.ELEMENT_NODE) {
- XMLNode parent = (XMLNode) node.getParentNode();
+ DOMNode parent = (DOMNode) node.getParentNode();
if (parent != null) {
notify(parent, INodeNotifier.CONTENT_CHANGED, node, null, value, offset);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelParser.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelParser.java
index 39911e408d..d614099e99 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelParser.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelParser.java
@@ -24,9 +24,9 @@ import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.xml.core.commentelement.impl.CommentElementConfiguration;
import org.eclipse.wst.xml.core.commentelement.impl.CommentElementRegistry;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
@@ -862,7 +862,7 @@ public class XMLModelParser {
/**
*/
- protected final XMLDocument getDocument() {
+ protected final DOMDocument getDocument() {
return this.document;
}
@@ -877,7 +877,7 @@ public class XMLModelParser {
/**
*/
- protected final XMLModel getModel() {
+ protected final DOMModel getModel() {
return this.model;
}
@@ -1634,7 +1634,7 @@ public class XMLModelParser {
/**
*/
- protected boolean isEndTag(XMLElement element) {
+ protected boolean isEndTag(DOMElement element) {
if (this.adapter != null) {
return this.adapter.isEndTag(element);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelUpdater.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelUpdater.java
index c55b5af5be..5aa8621e87 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelUpdater.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelUpdater.java
@@ -22,9 +22,9 @@ 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.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLGenerator;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.ISourceGenerator;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
@@ -41,7 +41,7 @@ public class XMLModelUpdater {
private int gapLength = 0;
private int gapOffset = 0;
private IStructuredDocumentRegion gapStructuredDocumentRegion = null;
- private XMLGenerator generator = null;
+ private ISourceGenerator generator = null;
private XMLModelImpl model = null;
private NodeImpl nextNode = null;
private NodeImpl parentNode = null;
@@ -532,7 +532,7 @@ public class XMLModelUpdater {
// make sure previous tag is closed
Node prev = text.getPreviousSibling();
if (prev != null) {
- String preTag = getCloseTag((XMLNode) prev);
+ String preTag = getCloseTag((DOMNode) prev);
if (preTag != null && preTag.length() > 0) {
offset += preTag.length();
source = preTag + source;
@@ -621,7 +621,7 @@ public class XMLModelUpdater {
/**
*/
- private String getAttrValueClose(XMLElement element) {
+ private String getAttrValueClose(DOMElement element) {
if (element == null)
return null;
@@ -673,7 +673,7 @@ public class XMLModelUpdater {
/**
* Gather close tags recursively.
*/
- private String getCloseTag(XMLNode node) {
+ private String getCloseTag(DOMNode node) {
if (node == null || node.isClosed())
return null;
@@ -691,7 +691,7 @@ public class XMLModelUpdater {
int offset = element.getEndOffset();
StringBuffer buffer = new StringBuffer();
- XMLNode lastChild = (XMLNode) element.getLastChild();
+ DOMNode lastChild = (DOMNode) element.getLastChild();
if (lastChild == null) {
if (!element.isStartTagClosed()) {
if (element.preferEmptyTag())
@@ -732,7 +732,7 @@ public class XMLModelUpdater {
/**
*/
- private String getStartCloseTag(XMLElement element) {
+ private String getStartCloseTag(DOMElement element) {
if (element == null || element.isStartTagClosed())
return null;
@@ -1397,7 +1397,7 @@ public class XMLModelUpdater {
start = next.getStartOffset();
end = start;
if (parentNode.getNodeType() == Node.ELEMENT_NODE) {
- preTag = getStartCloseTag((XMLElement) parentNode);
+ preTag = getStartCloseTag((DOMElement) parentNode);
}
}
else {
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryAdapterFactoryForXML.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryAdapterFactoryForXML.java
index aa05d7452b..603e4e98fc 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryAdapterFactoryForXML.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryAdapterFactoryForXML.java
@@ -26,7 +26,7 @@ import org.eclipse.wst.sse.core.IModelStateListener;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
@@ -84,8 +84,8 @@ public class ModelQueryAdapterFactoryForXML extends AbstractAdapterFactory imple
if (org.eclipse.wst.sse.core.util.Debug.displayInfo)
System.out.println("-----------------------ModelQueryAdapterFactoryForXML.createAdapter" + target); //$NON-NLS-1$
if (modelQueryAdapterImpl == null) {
- if (target instanceof XMLNode) {
- XMLNode xmlNode = (XMLNode) target;
+ if (target instanceof DOMNode) {
+ DOMNode xmlNode = (DOMNode) target;
IStructuredModel model = stateNotifier = xmlNode.getModel();
stateNotifier.addModelStateListener(this);
String baseLocation = null;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryUtil.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryUtil.java
index d24f90c6ca..d8c126b290 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryUtil.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryUtil.java
@@ -16,7 +16,7 @@ package org.eclipse.wst.xml.core.internal.modelquery;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
@@ -46,9 +46,9 @@ public class ModelQueryUtil {
}
public static ModelQuery getModelQuery(IStructuredModel model) {
- if ((!(model instanceof XMLModel)) || model == null)
+ if ((!(model instanceof DOMModel)) || model == null)
return null;
- return getModelQuery(((XMLModel) model).getDocument());
+ return getModelQuery(((DOMModel) model).getDocument());
}
public static ModelQueryAdapter getModelQueryAdapter(Document node) {
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/propagate/PropagatingAdapterImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/propagate/PropagatingAdapterImpl.java
index ae6d4daac2..d3b4836340 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/propagate/PropagatingAdapterImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/propagate/PropagatingAdapterImpl.java
@@ -21,7 +21,7 @@ import java.util.List;
import org.eclipse.wst.sse.core.IAdapterFactory;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
@@ -43,7 +43,7 @@ public class PropagatingAdapterImpl implements PropagatingAdapter {
super();
}
- protected void adaptOnCreate(XMLNode node) {
+ protected void adaptOnCreate(DOMNode node) {
// give each of the factories a chance to adapt the node, if it
// chooses to
if (adaptOnCreateFactories != null) {
@@ -97,8 +97,8 @@ public class PropagatingAdapterImpl implements PropagatingAdapter {
*/
public void initializeForFactory(IAdapterFactory factory, INodeNotifier node) {
// we're DOM specific implimentation
- if (node instanceof XMLNode) {
- XMLNode xmlNode = (XMLNode) node;
+ if (node instanceof DOMNode) {
+ DOMNode xmlNode = (DOMNode) node;
propagateTo(xmlNode);
}
}
@@ -124,7 +124,7 @@ public class PropagatingAdapterImpl implements PropagatingAdapter {
// if anyone was depending on
// this being proagate to attributes.
if (eventType == INodeNotifier.ADD && isInteresting(newValue)) {
- propagateTo((XMLNode) newValue);
+ propagateTo((DOMNode) newValue);
}
// else if (eventType == INodeNotifier.CONTENT_CHANGED) {
// notifier.getAdapterFor(PropagatingAdapterClass);
@@ -139,16 +139,16 @@ public class PropagatingAdapterImpl implements PropagatingAdapter {
// }
}
- protected void propagateTo(XMLNode node) {
+ protected void propagateTo(DOMNode node) {
// get adapter to ensure its created
node.getAdapterFor(PropagatingAdapterClass);
adaptOnCreate(node);
propagateToChildren(node);
}
- protected void propagateToChildren(XMLNode parent) {
+ protected void propagateToChildren(DOMNode parent) {
for (Node child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
- propagateTo((XMLNode) child);
+ propagateTo((DOMNode) child);
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/util/DebugDocument.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/util/DebugDocument.java
index 13afbc8647..0f8d1ad1a8 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/util/DebugDocument.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/util/DebugDocument.java
@@ -15,7 +15,7 @@ package org.eclipse.wst.xml.core.internal.util;
import java.io.PrintStream;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -75,8 +75,8 @@ public class DebugDocument {
public static void printNode(Node topNode, PrintStream out) {
// print out this node
//
- IStructuredDocumentRegion firstStructuredDocumentRegion = ((XMLNode) topNode).getFirstStructuredDocumentRegion();
- IStructuredDocumentRegion lastStructuredDocumentRegion = ((XMLNode) topNode).getLastStructuredDocumentRegion();
+ IStructuredDocumentRegion firstStructuredDocumentRegion = ((DOMNode) topNode).getFirstStructuredDocumentRegion();
+ IStructuredDocumentRegion lastStructuredDocumentRegion = ((DOMNode) topNode).getLastStructuredDocumentRegion();
if ((firstStructuredDocumentRegion == null) || (lastStructuredDocumentRegion == null)) {
// no text to output
} else {
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelhandler/XMLModelLoader.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelhandler/XMLModelLoader.java
index 9c1851f342..70f3e2da18 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelhandler/XMLModelLoader.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelhandler/XMLModelLoader.java
@@ -23,7 +23,7 @@ import org.eclipse.wst.sse.core.IModelLoader;
import org.eclipse.wst.sse.core.document.IDocumentLoader;
import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
import org.eclipse.wst.sse.core.util.Debug;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.encoding.XMLDocumentLoader;
import org.eclipse.wst.xml.core.internal.DebugAdapterFactory;
import org.eclipse.wst.xml.core.internal.document.XMLModelImpl;
@@ -74,7 +74,7 @@ public class XMLModelLoader extends AbstractModelLoader {
protected void preLoadAdapt(IStructuredModel structuredModel) {
super.preLoadAdapt(structuredModel);
- XMLModel domModel = (XMLModel) structuredModel;
+ DOMModel domModel = (DOMModel) structuredModel;
// if there is a model in the adapter, this will adapt it to
// first node. After that the PropagatingAdater spreads over the
// children being
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java
index 24114ee85e..a1e1c64f92 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java
@@ -19,8 +19,8 @@ import java.util.Vector;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMWriter;
import org.w3c.dom.Attr;
import org.w3c.dom.CharacterData;
@@ -365,9 +365,9 @@ public class TreeContentHelper {
protected String getValueForTextContent(List list) {
String result = null;
if (list.size() > 0) {
- XMLNode first = (XMLNode) list.get(0);
- XMLNode last = (XMLNode) list.get(list.size() - 1);
- XMLModel model = first.getModel();
+ DOMNode first = (DOMNode) list.get(0);
+ DOMNode last = (DOMNode) list.get(list.size() - 1);
+ DOMModel model = first.getModel();
int start = first.getStartOffset();
int end = last.getEndOffset();
try {
@@ -392,8 +392,8 @@ public class TreeContentHelper {
//String oldValue = getValueForTextContent();
// we worry about preserving trimmed text
if (list.size() > 0) {
- XMLNode first = (XMLNode) list.get(0);
- XMLNode last = (XMLNode) list.get(list.size() - 1);
+ DOMNode first = (DOMNode) list.get(0);
+ DOMNode last = (DOMNode) list.get(list.size() - 1);
int start = first.getStartOffset();
int end = last.getEndOffset();
first.getModel().getStructuredDocument().replaceText(this, start, end - start, value);
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
index dcf103f89c..2340cb99a5 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
@@ -28,7 +28,7 @@ import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.CMDocumentLoader;
import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.InferredGrammarBuildingCMDocumentLoader;
@@ -302,7 +302,7 @@ public class XMLTableTreeActionBarContributor implements IDesignViewerActionBarC
public void run() {
if (model != null) {
ModelQuery modelQuery = ModelQueryUtil.getModelQuery(model);
- Document document = ((XMLModel) model).getDocument();
+ Document document = ((DOMModel) model).getDocument();
if (modelQuery != null && modelQuery.getCMDocumentManager() != null) {
modelQuery.getCMDocumentManager().getCMDocumentCache().clear();
// TODO... need to figure out how to access the
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
index bc5851003f..ca7f2e782e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
@@ -30,7 +30,7 @@ import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.ui.internal.ViewerSelectionManager;
import org.eclipse.wst.sse.ui.view.events.INodeSelectionListener;
import org.eclipse.wst.sse.ui.view.events.NodeSelectionChangedEvent;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.internal.ui.IDesignViewer;
@@ -306,11 +306,11 @@ public class XMLTableTreeViewer extends TreeViewer implements IDesignViewer {
fModel = model;
Document domDoc = null;
- if (fModel != null && fModel instanceof XMLModel) {
+ if (fModel != null && fModel instanceof DOMModel) {
model.addModelStateListener(fInternalModelStateListener);
ModelQuery mq = ModelQueryUtil.getModelQuery(model);
treeExtension.setModelQuery(mq);
- domDoc = ((XMLModel) fModel).getDocument();
+ domDoc = ((DOMModel) fModel).getDocument();
setInput(domDoc);
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/DOMObserver.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/DOMObserver.java
index ccdf225315..54b27e6480 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/DOMObserver.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/DOMObserver.java
@@ -19,7 +19,7 @@ import java.util.TimerTask;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.CMDocumentLoader;
@@ -148,7 +148,7 @@ public class DOMObserver {
protected int timerTaskCount = 0;
public DOMObserver(IStructuredModel model) {
- this.document = (model instanceof XMLModel) ? ((XMLModel) model).getDocument() : null;
+ this.document = (model instanceof DOMModel) ? ((DOMModel) model).getDocument() : null;
if (document != null) {
ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
index 0d5e2f1036..51a9abf3b3 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
@@ -22,7 +22,7 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
@@ -144,7 +144,7 @@ public abstract class BaseNodeActionManager {
}
if (selection.size() == 0) {
- Document document = ((XMLModel) model).getDocument();
+ Document document = ((DOMModel) model).getDocument();
contributeAddDocumentChildActions(menu, document, ic, vc);
contributeEditGrammarInformationActions(menu, document);
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java
index 2c669c5e0c..8a11a3a6b2 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java
@@ -19,8 +19,8 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLDocumentType;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMDocumentType;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.eclipse.wst.xml.ui.dialogs.EditDoctypeDialog;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
@@ -66,8 +66,8 @@ public class EditDoctypeAction extends Action {
protected DocumentType createDoctype(EditDoctypeDialog dialog, Document document) {
DocumentType result = null;
if (document instanceof DocumentImpl) {
- XMLDocument documentImpl = (XMLDocument) document;
- XMLDocumentType doctypeImpl = (XMLDocumentType) documentImpl.createDoctype(dialog.getName());
+ DOMDocument documentImpl = (DOMDocument) document;
+ DOMDocumentType doctypeImpl = (DOMDocumentType) documentImpl.createDoctype(dialog.getName());
doctypeImpl.setPublicId(dialog.getPublicId());
doctypeImpl.setSystemId(dialog.getSystemId());
result = doctypeImpl;
@@ -168,8 +168,8 @@ public class EditDoctypeAction extends Action {
protected void updateDoctype(EditDoctypeDialog dialog, DocumentType doctype) {
- if (doctype instanceof XMLDocumentType) {
- XMLDocumentType doctypeImpl = (XMLDocumentType) doctype;
+ if (doctype instanceof DOMDocumentType) {
+ DOMDocumentType doctypeImpl = (DOMDocumentType) doctype;
if (doctypeImpl.getName().equals(dialog.getName())) {
doctypeImpl.setPublicId(dialog.getPublicId());
doctypeImpl.setSystemId(dialog.getSystemId());
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditElementAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditElementAction.java
index a3507d8f6a..15b6f3521b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditElementAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditElementAction.java
@@ -16,8 +16,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.ui.dialogs.EditElementDialog;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
@@ -82,9 +82,9 @@ public class EditElementAction extends NodeAction {
if (element != null) {
// here we need to do a rename... which seems to be quite hard
// to do :-(
- if (element instanceof XMLElement) {
- XMLElement elementImpl = (XMLElement) element;
- XMLModel model = elementImpl.getModel();
+ if (element instanceof DOMElement) {
+ DOMElement elementImpl = (DOMElement) element;
+ DOMModel model = elementImpl.getModel();
String oldName = elementImpl.getNodeName();
String newName = dialog.getElementName();
setStructuredDocumentRegionElementName(model, elementImpl.getStartStructuredDocumentRegion(), oldName, newName);
@@ -103,7 +103,7 @@ public class EditElementAction extends NodeAction {
manager.endNodeAction(this);
}
- protected void setStructuredDocumentRegionElementName(XMLModel model, IStructuredDocumentRegion flatNode, String oldName, String newName) {
+ protected void setStructuredDocumentRegionElementName(DOMModel model, IStructuredDocumentRegion flatNode, String oldName, String newName) {
if (flatNode != null) {
String string = flatNode.getText();
int index = string.indexOf(oldName);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
index ec9f8b7311..37048b71e6 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
@@ -41,10 +41,10 @@ import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
import org.eclipse.wst.xml.core.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
@@ -120,7 +120,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
}
protected void addAttributeNameProposals(ContentAssistRequest contentAssistRequest) {
- XMLNode node = (XMLNode) contentAssistRequest.getNode();
+ DOMNode node = (DOMNode) contentAssistRequest.getNode();
IStructuredDocumentRegion sdRegion = contentAssistRequest.getDocumentRegion();
// retrieve the list of attributes
CMElementDeclaration elementDecl = getCMElementDeclaration(node);
@@ -210,7 +210,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
}
protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- XMLNode node = (XMLNode) contentAssistRequest.getNode();
+ DOMNode node = (DOMNode) contentAssistRequest.getNode();
// Find the attribute region and name for which this position should
// have a value proposed
@@ -393,7 +393,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
contentAssistRequest.addProposal(proposal);
}
else {
- XMLNode node = (XMLNode) contentAssistRequest.getNode();
+ DOMNode node = (DOMNode) contentAssistRequest.getNode();
ModelQuery modelQuery = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
Node aNode = contentAssistRequest.getNode();
String matchString = contentAssistRequest.getMatchString();
@@ -402,7 +402,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
while (aNode != null) {
if (aNode.getNodeType() == Node.ELEMENT_NODE) {
if (aNode.getNodeName().startsWith(matchString)) {
- XMLNode aXMLNode = (XMLNode) aNode;
+ DOMNode aXMLNode = (DOMNode) aNode;
CMElementDeclaration ed = modelQuery.getCMElementDeclaration((Element) aNode);
if ((aXMLNode.getEndStructuredDocumentRegion() == null) && (ed == null || (ed.getContentType() != CMElementDeclaration.EMPTY))) {
String proposedText = aNode.getNodeName();
@@ -442,13 +442,13 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
* @param contentAssistRequest
*/
protected void addEndTagProposals(ContentAssistRequest contentAssistRequest) {
- XMLNode node = (XMLNode) contentAssistRequest.getParent();
+ DOMNode node = (DOMNode) contentAssistRequest.getParent();
// CMVC 241090 for special meta-info comment tags
if (isCommentNode(node)) {
// loop and find non comment node parent
while (node != null && isCommentNode(node)) {
- node = (XMLNode) node.getParentNode();
+ node = (DOMNode) node.getParentNode();
}
}
@@ -479,8 +479,8 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
if (xmlEndTagOpen == null)
return;
- node = (XMLNode) node.getModel().getIndexedRegion(xmlEndTagOpen.getStartOffset());
- node = (XMLNode) node.getParentNode();
+ node = (DOMNode) node.getModel().getIndexedRegion(xmlEndTagOpen.getStartOffset());
+ node = (DOMNode) node.getParentNode();
if (isStartTag(xmlEndTagOpen)) {
// this is the case for a start tag w/out end tag
@@ -552,7 +552,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
}
}
- protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, XMLNode treeNode) {
+ protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, DOMNode treeNode) {
ICompletionProposal[] eps = computeEntityReferenceProposals(documentPosition, completionRegion, treeNode);
for (int i = 0; eps != null && i < eps.length; i++)
contentAssistRequest.addProposal(eps[i]);
@@ -620,7 +620,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
boolean xmlpi = (child.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE && child.getNodeName().equals("xml")); //$NON-NLS-1$
xmlpiFound = xmlpiFound || xmlpi;
if (xmlpiFound) {
- if (child instanceof XMLNode) {
+ if (child instanceof DOMNode) {
// ==> // int xmlpiNodePosition =
// ((XMLNode)child).getEndOffset();
}
@@ -628,9 +628,9 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
while ((child = child.getNextSibling()) != null && (child.getNodeType() == Node.TEXT_NODE)) {
}
// check if theres a node inbetween XMLPI and cursor position
- if (child != null && child instanceof XMLNode) {
+ if (child != null && child instanceof DOMNode) {
// CMVC 257486
- if (contentAssistRequest.getReplacementBeginPosition() >= ((XMLNode) child).getEndOffset() || !xmlpiIsFirstElement) {
+ if (contentAssistRequest.getReplacementBeginPosition() >= ((DOMNode) child).getEndOffset() || !xmlpiIsFirstElement) {
insertDoctype = false;
}
}
@@ -650,7 +650,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
* Close an unclosed start tag
*/
protected void addTagCloseProposals(ContentAssistRequest contentAssistRequest) {
- XMLNode node = (XMLNode) contentAssistRequest.getParent();
+ DOMNode node = (DOMNode) contentAssistRequest.getParent();
if (node.getNodeType() == Node.ELEMENT_NODE) {
CMElementDeclaration elementDecl = getCMElementDeclaration(node);
@@ -757,7 +757,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// CMVC #242943 shouldn't have proposals before XMLPI
// (nsd) This is only valid at the document element level
// only valid if it's XML (check added 2/17/2004)
- if (parent != null && parent.getNodeType() == Node.DOCUMENT_NODE && ((XMLDocument) parent).isXMLType() && !isCursorAfterXMLPI(contentAssistRequest)) {
+ if (parent != null && parent.getNodeType() == Node.DOCUMENT_NODE && ((DOMDocument) parent).isXMLType() && !isCursorAfterXMLPI(contentAssistRequest)) {
return;
}
// only want proposals if cursor is after doctype...
@@ -768,10 +768,10 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// fix for meta-info comment nodes.. they currently "hide" other
// proposals because the don't
// have a content model (so can't propose any children..)
- if (parent != null && parent instanceof XMLNode && isCommentNode((XMLNode) parent)) {
+ if (parent != null && parent instanceof DOMNode && isCommentNode((DOMNode) parent)) {
// loop and find non comment node?
- while (parent != null && isCommentNode((XMLNode) parent)) {
- parent = (XMLNode) parent.getParentNode();
+ while (parent != null && isCommentNode((DOMNode) parent)) {
+ parent = (DOMNode) parent.getParentNode();
}
}
@@ -787,10 +787,10 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// replace the rest
int begin = contentAssistRequest.getReplacementBeginPosition();
int length = contentAssistRequest.getReplacementLength();
- if (parent instanceof XMLNode) {
- if (((XMLNode) parent).getLastStructuredDocumentRegion() != ((XMLNode) parent).getFirstStructuredDocumentRegion()) {
- begin = ((XMLNode) parent).getFirstStructuredDocumentRegion().getEndOffset();
- length = ((XMLNode) parent).getLastStructuredDocumentRegion().getStartOffset() - begin;
+ if (parent instanceof DOMNode) {
+ if (((DOMNode) parent).getLastStructuredDocumentRegion() != ((DOMNode) parent).getFirstStructuredDocumentRegion()) {
+ begin = ((DOMNode) parent).getFirstStructuredDocumentRegion().getEndOffset();
+ length = ((DOMNode) parent).getLastStructuredDocumentRegion().getStartOffset() - begin;
}
}
String proposedInfo = getAdditionalInfo(parentDecl, childType);
@@ -869,7 +869,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
boolean xmlpi = (child.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE && child.getNodeName().equals("xml")); //$NON-NLS-1$
boolean doctype = child.getNodeType() == Node.DOCUMENT_TYPE_NODE;
if (xmlpi || doctype && minimumOffset < 0)
- minimumOffset = ((XMLNode) child).getFirstStructuredDocumentRegion().getStartOffset() + ((XMLNode) child).getFirstStructuredDocumentRegion().getTextLength();
+ minimumOffset = ((DOMNode) child).getFirstStructuredDocumentRegion().getStartOffset() + ((DOMNode) child).getFirstStructuredDocumentRegion().getTextLength();
xmlpiFound = xmlpiFound || xmlpi;
doctypeFound = doctypeFound || doctype;
}
@@ -902,7 +902,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
protected void addTagNameProposals(ContentAssistRequest contentAssistRequest, int childPosition) {
List cmnodes = null;
Node parent = contentAssistRequest.getParent();
- XMLNode node = (XMLNode) contentAssistRequest.getNode();
+ DOMNode node = (DOMNode) contentAssistRequest.getNode();
List validActions = null;
String error = null;
String matchString = contentAssistRequest.getMatchString();
@@ -1027,7 +1027,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
* what 'node' is) true if any attributes of 'node' match any
* possible attributes from 'cmnodes' list.
*/
- protected boolean attributeInList(XMLNode node, Node parent, CMNode cmnode) {
+ protected boolean attributeInList(DOMNode node, Node parent, CMNode cmnode) {
if (node == null || parent == null || cmnode == null)
return false;
String elementMatchString = node.getNodeName();
@@ -1066,7 +1066,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return aString.toLowerCase().startsWith(prefix.toLowerCase());
}
- protected ContentAssistRequest computeAttributeProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeAttributeProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
ContentAssistRequest contentAssistRequest = null;
IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
if (documentPosition < sdRegion.getStartOffset(completionRegion)) {
@@ -1086,12 +1086,12 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return contentAssistRequest;
}
- protected ContentAssistRequest computeAttributeValueProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeAttributeValueProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
ContentAssistRequest contentAssistRequest = null;
IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
if (documentPosition > sdRegion.getStartOffset(completionRegion) + completionRegion.getTextLength() && sdRegion.getStartOffset(completionRegion) + completionRegion.getTextLength() != sdRegion.getStartOffset(completionRegion) + completionRegion.getLength()) {
// setup to add a new attribute at the documentPosition
- XMLNode actualNode = (XMLNode) node.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
+ DOMNode actualNode = (DOMNode) node.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
contentAssistRequest = newContentAssistRequest(actualNode, actualNode, sdRegion, completionRegion, documentPosition, 0, matchString);
addAttributeNameProposals(contentAssistRequest);
if (actualNode.getFirstStructuredDocumentRegion() != null && !actualNode.getFirstStructuredDocumentRegion().isEnded()) {
@@ -1114,7 +1114,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return contentAssistRequest;
}
- protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode treeNode, XMLNode xmlnode) {
+ protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode treeNode, DOMNode xmlnode) {
ContentAssistRequest contentAssistRequest = null;
String regionType = completionRegion.getType();
IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
@@ -1137,7 +1137,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
{
// this is for when the cursor is at the end of the closing
// quote for an attribute..
- XMLNode actualNode = (XMLNode) xmlnode.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
+ DOMNode actualNode = (DOMNode) xmlnode.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
contentAssistRequest = newContentAssistRequest(actualNode, actualNode, sdRegion, completionRegion, documentPosition, 0, matchString);
addTagCloseProposals(contentAssistRequest);
}
@@ -1202,7 +1202,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
Node node = (Node) treeNode;
while (node != null && node.getNodeType() == Node.TEXT_NODE && node.getParentNode() != null)
node = node.getParentNode();
- XMLNode xmlnode = (XMLNode) node;
+ DOMNode xmlnode = (DOMNode) node;
ContentAssistRequest contentAssistRequest = null;
@@ -1217,7 +1217,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(textViewer.getDocument());
try {
if (sModel != null) {
- XMLDocument docNode = ((XMLModel) sModel).getDocument();
+ DOMDocument docNode = ((DOMModel) sModel).getDocument();
contentAssistRequest = newContentAssistRequest(docNode, docNode, sdRegion, completionRegion, documentPosition, 0, null);
addEmptyDocumentProposals(contentAssistRequest);
}
@@ -1238,12 +1238,12 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// catch documents where no region can be determined
if (xmlnode.getNodeType() == Node.DOCUMENT_NODE && (completionRegion == null || xmlnode.getChildNodes() == null || xmlnode.getChildNodes().getLength() == 0)) {
- contentAssistRequest = computeStartDocumentProposals(documentPosition, matchString, completionRegion, (XMLNode) treeNode, xmlnode);
+ contentAssistRequest = computeStartDocumentProposals(documentPosition, matchString, completionRegion, (DOMNode) treeNode, xmlnode);
return contentAssistRequest.getCompletionProposals();
}
// compute normal proposals
- contentAssistRequest = computeCompletionProposals(documentPosition, matchString, completionRegion, (XMLNode) treeNode, xmlnode);
+ contentAssistRequest = computeCompletionProposals(documentPosition, matchString, completionRegion, (DOMNode) treeNode, xmlnode);
if (contentAssistRequest == null) {
contentAssistRequest = newContentAssistRequest((Node) treeNode, node.getParentNode(), sdRegion, completionRegion, documentPosition, 0, ""); //$NON-NLS-1$
if (Debug.displayWarnings)
@@ -1257,7 +1257,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return contentAssistRequest.getCompletionProposals();
}
- protected ContentAssistRequest computeContentProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeContentProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
ContentAssistRequest contentAssistRequest = null;
// setup to add children at the content node's position
@@ -1290,7 +1290,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return fAttributeInfoProvider.getAttributeInformation(documentOffset);
}
- protected ContentAssistRequest computeEndTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeEndTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
ContentAssistRequest contentAssistRequest = null;
IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
int completionRegionStart = sdRegion.getStartOffset(completionRegion);
@@ -1327,7 +1327,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
* return all possible EntityReferenceProposals (according to current
* position in doc)
*/
- protected ICompletionProposal[] computeEntityReferenceProposals(int documentPosition, ITextRegion completionRegion, XMLNode treeNode) {
+ protected ICompletionProposal[] computeEntityReferenceProposals(int documentPosition, ITextRegion completionRegion, DOMNode treeNode) {
// only handle XML content for now
Vector proposals = new Vector(); // ICompletionProposals
IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
@@ -1382,7 +1382,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return (ICompletionProposal[]) ((proposals.size() > 0) ? proposals.toArray(new ICompletionProposal[proposals.size()]) : null);
}
- protected ContentAssistRequest computeEqualsProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeEqualsProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
ContentAssistRequest contentAssistRequest = null;
IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
ITextRegion valueRegion = node.getStartStructuredDocumentRegion().getRegionAtCharacterOffset(sdRegion.getStartOffset(completionRegion) + completionRegion.getLength());
@@ -1398,7 +1398,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return contentAssistRequest;
}
- protected ContentAssistRequest computeStartDocumentProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeStartDocumentProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
// setup for a non-empty document, but one that hasn't been formally
// started
ContentAssistRequest contentAssistRequest = null;
@@ -1407,7 +1407,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return contentAssistRequest;
}
- protected ContentAssistRequest computeTagCloseProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeTagCloseProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
ContentAssistRequest contentAssistRequest = null;
IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
@@ -1415,7 +1415,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// this is a content request as the documentPosition is AFTER the
// end of the closing region
if (node == nodeAtOffset && node.getParentNode() != null)
- node = (XMLNode) node.getParentNode();
+ node = (DOMNode) node.getParentNode();
contentAssistRequest = newContentAssistRequest(nodeAtOffset, node, sdRegion, completionRegion, documentPosition, 0, matchString);
addTagInsertionProposals(contentAssistRequest, getElementPositionForModelQuery(nodeAtOffset));
if (node.getNodeType() != Node.DOCUMENT_NODE && node.getEndStructuredDocumentRegion() == null) {
@@ -1442,13 +1442,13 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return contentAssistRequest;
}
- protected ContentAssistRequest computeTagNameProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeTagNameProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
ContentAssistRequest contentAssistRequest = null;
IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
if (sdRegion != nodeAtOffset.getFirstStructuredDocumentRegion()) {
// completing the *first* tag in "<tagname1 |<tagname2"
- XMLNode actualNode = (XMLNode) node.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
+ DOMNode actualNode = (DOMNode) node.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
if (actualNode != null) {
if (actualNode.getFirstStructuredDocumentRegion() == sdRegion) {
// start tag
@@ -1492,7 +1492,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
addTagNameProposals(contentAssistRequest, getElementPositionForModelQuery(nodeAtOffset));
}
else {
- XMLNode actualNode = (XMLNode) node.getModel().getIndexedRegion(documentPosition);
+ DOMNode actualNode = (DOMNode) node.getModel().getIndexedRegion(documentPosition);
if (actualNode != null) {
if (documentPosition >= sdRegion.getStartOffset(completionRegion) + completionRegion.getTextLength()) {
contentAssistRequest = newContentAssistRequest(actualNode, actualNode.getParentNode(), sdRegion, completionRegion, documentPosition, 0, matchString);
@@ -1508,12 +1508,12 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return contentAssistRequest;
}
- protected ContentAssistRequest computeTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode nodeAtOffset, XMLNode node) {
+ protected ContentAssistRequest computeTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode nodeAtOffset, DOMNode node) {
ContentAssistRequest contentAssistRequest = null;
IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
if (sdRegion != nodeAtOffset.getFirstStructuredDocumentRegion()) {
// completing the *first* XML_TAG_OPEN in "<<tagname"
- XMLNode actualNode = (XMLNode) node.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
+ DOMNode actualNode = (DOMNode) node.getModel().getIndexedRegion(sdRegion.getStartOffset(completionRegion));
if (actualNode != null) {
contentAssistRequest = newContentAssistRequest(actualNode, actualNode.getParentNode(), sdRegion, completionRegion, documentPosition, 0, matchString);
addTagNameProposals(contentAssistRequest, getElementPositionForModelQuery(actualNode));
@@ -1616,7 +1616,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
if (child.getNodeType() == Node.ELEMENT_NODE && stringsEqual(child.getNodeName(), rootName)) {
// if the node is missing either the start or end tag, don't
// count it as present
- if (child instanceof XMLNode && (((XMLNode) child).getStartStructuredDocumentRegion() == null || ((XMLNode) child).getEndStructuredDocumentRegion() == null))
+ if (child instanceof DOMNode && (((DOMNode) child).getStartStructuredDocumentRegion() == null || ((DOMNode) child).getEndStructuredDocumentRegion() == null))
continue;
if (Debug.displayInfo)
System.out.println(rootName + " already present!"); //$NON-NLS-1$
@@ -1752,7 +1752,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
ITextRegion region = null;
int offset = documentPosition;
IStructuredDocumentRegion flatNode = null;
- XMLNode node = (XMLNode) domnode;
+ DOMNode node = (DOMNode) domnode;
if (node.getNodeType() == Node.DOCUMENT_NODE) {
if (node.getStructuredDocument().getLength() == 0)
@@ -2057,7 +2057,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
Document doc = null;
doc = (node.getNodeType() != Node.DOCUMENT_NODE) ? node.getOwnerDocument() : ((Document) node);
- return (doc instanceof XMLDocument) && ((XMLDocument) doc).isXMLType();
+ return (doc instanceof DOMDocument) && ((DOMDocument) doc).isXMLType();
}
// Initialize local settings
@@ -2074,8 +2074,8 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
* This is to determine if a tag is a special meta-info comment tag that
* shows up as an ELEMENT
*/
- private boolean isCommentNode(XMLNode node) {
- return (node != null && node instanceof XMLElement && ((XMLElement) node).isCommentTag());
+ private boolean isCommentNode(DOMNode node) {
+ return (node != null && node instanceof DOMElement && ((DOMElement) node).isCommentTag());
}
/**
@@ -2094,9 +2094,9 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
return true; // blank document case
for (Node child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
- if (child instanceof XMLNode) {
+ if (child instanceof DOMNode) {
if (child.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
- xmldoctypeNodePosition = ((XMLNode) child).getEndOffset();
+ xmldoctypeNodePosition = ((DOMNode) child).getEndOffset();
isAfterDoctype = (car.getReplacementBeginPosition() >= xmldoctypeNodePosition);
break;
}
@@ -2125,8 +2125,8 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
boolean xmlpi = (child.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE && child.getNodeName().equals("xml")); //$NON-NLS-1$
xmlpiFound = xmlpiFound || xmlpi;
if (xmlpiFound) {
- if (child instanceof XMLNode) {
- xmlpiNodePosition = ((XMLNode) child).getEndOffset();
+ if (child instanceof DOMNode) {
+ xmlpiNodePosition = ((DOMNode) child).getEndOffset();
isAfterXMLPI = (car.getReplacementBeginPosition() >= xmlpiNodePosition);
}
break;
@@ -2182,7 +2182,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fTextViewer.getDocument());
try {
if (sModel != null) {
- XMLNode xmlNode = (XMLNode) sModel.getIndexedRegion(startTag.getStart());
+ DOMNode xmlNode = (DOMNode) sModel.getIndexedRegion(startTag.getStart());
if (!isStartTag(startTag))
result = false;
else if (isSelfClosed(startTag))
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationPresenter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationPresenter.java
index ab19b30c7e..620cd4e4d8 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationPresenter.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationPresenter.java
@@ -26,7 +26,7 @@ import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
@@ -78,7 +78,7 @@ public class AttributeContextInformationPresenter implements IContextInformation
return false;
// iterate existing attributes from current node
- XMLNode xmlNode = fModelUtil.getXMLNode(documentPosition);
+ DOMNode xmlNode = fModelUtil.getXMLNode(documentPosition);
IStructuredDocumentRegion sdRegion = xmlNode.getFirstStructuredDocumentRegion();
ITextRegionList regions = sdRegion.getRegions();
ITextRegion r = null;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationProvider.java
index 00380bc3a4..87920c846b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationProvider.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationProvider.java
@@ -24,7 +24,7 @@ import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
@@ -77,7 +77,7 @@ class AttributeContextInformationProvider {
if (!canProposeInfo(sdRegion))
return EMPTY_CONTEXT_INFO;
- XMLNode node = fModelUtil.getXMLNode(offset);
+ DOMNode node = fModelUtil.getXMLNode(offset);
if (node != null) {
switch (node.getNodeType()) {
case Node.ELEMENT_NODE :
@@ -111,7 +111,7 @@ class AttributeContextInformationProvider {
* @param node
*/
- private IContextInformation[] getInfoForElement(XMLNode node) {
+ private IContextInformation[] getInfoForElement(DOMNode node) {
IContextInformation[] results = EMPTY_CONTEXT_INFO;
CMElementDeclaration decl = fModelUtil.getModelQuery().getCMElementDeclaration((Element) node);
if (decl != null) {
@@ -155,7 +155,7 @@ class AttributeContextInformationProvider {
* @param node
*/
- IContextInformation[] getInfoForText(XMLNode node) {
+ IContextInformation[] getInfoForText(DOMNode node) {
Node parent = node.getParentNode();
String contextString = node.getNodeName();
StringBuffer info = new StringBuffer(" "); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/ContextInfoModelUtil.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/ContextInfoModelUtil.java
index 5020bea4e2..009e02e808 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/ContextInfoModelUtil.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/ContextInfoModelUtil.java
@@ -15,7 +15,7 @@ package org.eclipse.wst.xml.ui.contentassist;
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.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
@@ -50,12 +50,12 @@ public class ContextInfoModelUtil {
return mq;
}
- public XMLNode getXMLNode(int offset) {
+ public DOMNode getXMLNode(int offset) {
IStructuredModel xmlModel = null;
- XMLNode xmlNode = null;
+ DOMNode xmlNode = null;
try {
xmlModel = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
- xmlNode = (XMLNode) xmlModel.getIndexedRegion(offset);
+ xmlNode = (DOMNode) xmlModel.getIndexedRegion(offset);
}
finally {
xmlModel.releaseFromRead();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistProcessor.java
index 6f6146b885..794cacde43 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistProcessor.java
@@ -22,7 +22,7 @@ import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.preferences.XMLUIPreferenceNames;
import org.eclipse.wst.xml.ui.internal.templates.TemplateContextTypeIdsXML;
@@ -87,7 +87,7 @@ public class XMLContentAssistProcessor extends AbstractContentAssistProcessor im
}
}
- protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, XMLNode treeNode, XMLNode xmlnode) {
+ protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, DOMNode treeNode, DOMNode xmlnode) {
ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
addTemplates(request, TemplateContextTypeIdsXML.ALL);
return request;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java
index c13589ebc8..41fc94d162 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java
@@ -25,8 +25,8 @@ import org.eclipse.wst.sse.core.util.ScriptLanguageKeys;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.w3c.dom.Document;
@@ -83,19 +83,19 @@ public class XMLContentAssistUtilities extends ContentAssistUtils {
// check if tag is closed
boolean hasEndTag = true;
boolean isJSPTag = false;
- XMLNode xnode = null;
+ DOMNode xnode = null;
String tagName = ""; //$NON-NLS-1$
- if (indexedNode instanceof XMLNode) {
- xnode = ((XMLNode) indexedNode);
+ if (indexedNode instanceof DOMNode) {
+ xnode = ((DOMNode) indexedNode);
// it's ended already...
if (xnode.getEndStructuredDocumentRegion() != null)
return null;
- XMLNode openNode = null;
+ DOMNode openNode = null;
if (!xnode.getNodeName().equalsIgnoreCase(parentTagName))
- openNode = (XMLNode) xnode.getParentNode();
+ openNode = (DOMNode) xnode.getParentNode();
if (openNode != null) {
- if (openNode instanceof XMLElement) {
- isJSPTag = ((XMLElement) openNode).isJSPTag();
+ if (openNode instanceof DOMElement) {
+ isJSPTag = ((DOMElement) openNode).isJSPTag();
}
tagName = openNode.getNodeName();
hasEndTag = (openNode.getEndStructuredDocumentRegion() != null);
@@ -184,16 +184,16 @@ public class XMLContentAssistUtilities extends ContentAssistUtils {
// check if tag is closed
boolean hasEndTag = true;
- XMLNode xnode = null;
+ DOMNode xnode = null;
String tagName = ""; //$NON-NLS-1$
- if (indexedNode instanceof XMLNode) {
- xnode = ((XMLNode) indexedNode);
+ if (indexedNode instanceof DOMNode) {
+ xnode = ((DOMNode) indexedNode);
// it's ended already...
if (xnode.getEndStructuredDocumentRegion() != null)
return null;
- XMLNode styleNode = null;
+ DOMNode styleNode = null;
if (!xnode.getNodeName().equalsIgnoreCase(parentTagName))
- styleNode = (XMLNode) xnode.getParentNode();
+ styleNode = (DOMNode) xnode.getParentNode();
if (styleNode != null) {
tagName = styleNode.getNodeName();
hasEndTag = (styleNode.getEndStructuredDocumentRegion() != null);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentModelGenerator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentModelGenerator.java
index 05b4d46a19..d6b16e08b7 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentModelGenerator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentModelGenerator.java
@@ -15,7 +15,7 @@ package org.eclipse.wst.xml.ui.contentassist;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
@@ -113,8 +113,8 @@ public class XMLContentModelGenerator extends AbstractContentModelGenerator {
}
protected String getOtherClose(Node notATagNode) {
- if (notATagNode instanceof XMLNode) {
- IStructuredDocumentRegion node = ((XMLNode) notATagNode).getStartStructuredDocumentRegion();
+ if (notATagNode instanceof DOMNode) {
+ IStructuredDocumentRegion node = ((DOMNode) notATagNode).getStartStructuredDocumentRegion();
if (node != null && node.getNumberOfRegions() > 1 && node.getRegions().get(0).getType().equals(DOMJSPRegionContextsPrivateCopy.JSP_DIRECTIVE_OPEN)) {
return "%>"; //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java
index 93f194874f..cb2dca04ec 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java
@@ -21,7 +21,7 @@ import java.util.Vector;
import org.eclipse.swt.dnd.DND;
import org.eclipse.wst.common.ui.dnd.DefaultDragAndDropCommand;
import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
@@ -184,8 +184,8 @@ public class DragNodeCommand extends DefaultDragAndDropCommand {
protected IStructuredModel getStructedModel(Node node) {
IStructuredModel result = null;
- if (node instanceof XMLNode) {
- result = ((XMLNode) node).getModel();
+ if (node instanceof DOMNode) {
+ result = ((DOMNode) node).getModel();
}
return result;
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/extensions/XMLSourceEditingTextTools.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/extensions/XMLSourceEditingTextTools.java
index b85f876e87..adf1f649fb 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/extensions/XMLSourceEditingTextTools.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/extensions/XMLSourceEditingTextTools.java
@@ -25,9 +25,9 @@ import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.ui.extensions.breakpoint.NodeLocation;
import org.eclipse.wst.sse.ui.extensions.breakpoint.SourceEditingTextTools;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.document.XMLText;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
+import org.eclipse.wst.xml.core.document.DOMText;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -38,9 +38,9 @@ import org.w3c.dom.Node;
public class XMLSourceEditingTextTools implements SourceEditingTextTools, INodeAdapter {
protected class NodeLocationImpl implements NodeLocation {
- private XMLNode node;
+ private DOMNode node;
- public NodeLocationImpl(XMLNode xmlnode) {
+ public NodeLocationImpl(DOMNode xmlnode) {
super();
node = xmlnode;
}
@@ -83,10 +83,10 @@ public class XMLSourceEditingTextTools implements SourceEditingTextTools, INodeA
IStructuredModel model = null;
try {
model = mm.getExistingModelForRead((IFile) res);
- if (model == null || !(model instanceof XMLModel))
+ if (model == null || !(model instanceof DOMModel))
return null;
- return ((XMLModel) model).getDocument();
+ return ((DOMModel) model).getDocument();
} finally {
if (model != null)
model.releaseFromRead();
@@ -99,8 +99,8 @@ public class XMLSourceEditingTextTools implements SourceEditingTextTools, INodeA
* @see org.eclipse.wst.sse.ui.extensions.SourceEditingTextTools#getNodeLocation(org.w3c.dom.Node)
*/
public NodeLocation getNodeLocation(Node node) {
- if (node.getNodeType() == Node.ELEMENT_NODE && node instanceof XMLNode)
- return new NodeLocationImpl((XMLNode) node);
+ if (node.getNodeType() == Node.ELEMENT_NODE && node instanceof DOMNode)
+ return new NodeLocationImpl((DOMNode) node);
return null;
}
@@ -109,10 +109,10 @@ public class XMLSourceEditingTextTools implements SourceEditingTextTools, INodeA
}
public int getStartOffset(Node node) {
- if (node == null || !(node instanceof XMLText))
+ if (node == null || !(node instanceof DOMText))
return -1;
- IStructuredDocumentRegion fnode = ((XMLText) node).getFirstStructuredDocumentRegion();
+ IStructuredDocumentRegion fnode = ((DOMText) node).getFirstStructuredDocumentRegion();
return fnode.getStartOffset();
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/StructuredAutoEditStrategyXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/StructuredAutoEditStrategyXML.java
index 3b8ddd9699..e719c8534f 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/StructuredAutoEditStrategyXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/StructuredAutoEditStrategyXML.java
@@ -21,8 +21,8 @@ import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.ui.internal.StructuredDocumentCommand;
import org.eclipse.wst.sse.ui.internal.autoedit.BasicAutoEditStrategy;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.ui.internal.Logger;
import org.w3c.dom.Node;
@@ -49,15 +49,15 @@ public class StructuredAutoEditStrategyXML extends BasicAutoEditStrategy {
}
}
- private boolean isCommentNode(XMLNode node) {
- return (node != null && node instanceof XMLElement && ((XMLElement) node).isCommentTag());
+ private boolean isCommentNode(DOMNode node) {
+ return (node != null && node instanceof DOMElement && ((DOMElement) node).isCommentTag());
}
- private boolean isDocumentNode(XMLNode node) {
+ private boolean isDocumentNode(DOMNode node) {
return (node != null && node.getNodeType() == Node.DOCUMENT_NODE);
}
- protected boolean isEndTagRequired(XMLNode node) {
+ protected boolean isEndTagRequired(DOMNode node) {
if (node == null)
return false;
@@ -90,11 +90,11 @@ public class StructuredAutoEditStrategyXML extends BasicAutoEditStrategy {
protected void smartInsertForEndTag(StructuredDocumentCommand structuredDocumentCommand, IDocument document, IStructuredModel model) {
try {
if (structuredDocumentCommand.text.equals("/") && document.getLength() >= 1 && document.get(structuredDocumentCommand.offset - 1, 1).equals("<")) { //$NON-NLS-1$ //$NON-NLS-2$
- XMLNode parentNode = (XMLNode) ((XMLNode) model.getIndexedRegion(structuredDocumentCommand.offset - 1)).getParentNode();
+ DOMNode parentNode = (DOMNode) ((DOMNode) model.getIndexedRegion(structuredDocumentCommand.offset - 1)).getParentNode();
if (isCommentNode(parentNode)) {
// loop and find non comment node parent
while (parentNode != null && isCommentNode(parentNode)) {
- parentNode = (XMLNode) parentNode.getParentNode();
+ parentNode = (DOMNode) parentNode.getParentNode();
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeContentProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeContentProvider.java
index f70e495239..23e714751b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeContentProvider.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeContentProvider.java
@@ -18,7 +18,7 @@ import org.eclipse.wst.sse.core.IAdapterFactory;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
/**
@@ -70,8 +70,8 @@ public class JFaceNodeContentProvider implements ITreeContentProvider {
// The root is usually an instance of an XMLStructuredModel in
// which case we want to extract the document.
Object topNode = object;
- if (object instanceof XMLModel)
- topNode = ((XMLModel) object).getDocument();
+ if (object instanceof DOMModel)
+ topNode = ((DOMModel) object).getDocument();
IJFaceNodeAdapter adapter = getAdapter(topNode);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
index f4d70448ed..39a8a44b05 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
@@ -30,7 +30,7 @@ import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
@@ -62,7 +62,7 @@ public class InsertRequiredAttrsQuickAssistProposal implements ICompletionPropos
* char, int, int)
*/
public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
- XMLNode node = (XMLNode) ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, offset);
+ DOMNode node = (DOMNode) ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, offset);
IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
int index = startStructuredDocumentRegion.getEndOffset();
ITextRegion lastRegion = startStructuredDocumentRegion.getLastRegion();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java
index 7621bfab8b..fab6c86d74 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java
@@ -23,7 +23,7 @@ import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.correction.IQuickAssistProcessor;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
@@ -53,11 +53,11 @@ public class QuickAssistProcessorXML implements IQuickAssistProcessor {
* @param offset
*/
protected void getInsertRequiredAttrs(ArrayList proposals, StructuredTextViewer viewer, int offset) {
- XMLNode node = (XMLNode) ContentAssistUtils.getNodeAt(viewer, offset);
+ DOMNode node = (DOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
if (node != null && node.getNodeType() == Node.ELEMENT_NODE) {
IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
if (startStructuredDocumentRegion != null && startStructuredDocumentRegion.containsOffset(offset)) {
- XMLNode cursorNode = (XMLNode) ContentAssistUtils.getNodeAt(viewer, offset);
+ DOMNode cursorNode = (DOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
List requiredAttrs = getRequiredAttrs(cursorNode);
if (requiredAttrs.size() > 0) {
NamedNodeMap currentAttrs = node.getAttributes();
@@ -92,7 +92,7 @@ public class QuickAssistProcessorXML implements IQuickAssistProcessor {
* @param offset
*/
protected void getLocalRenameQuickAssistProposal(ArrayList proposals, StructuredTextViewer viewer, int offset) {
- XMLNode node = (XMLNode) ContentAssistUtils.getNodeAt(viewer, offset);
+ DOMNode node = (DOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
IStructuredDocumentRegion startStructuredDocumentRegion = node == null ? null : node.getStartStructuredDocumentRegion();
IStructuredDocumentRegion endStructuredDocumentRegion = node == null ? null : node.getEndStructuredDocumentRegion();
@@ -162,7 +162,7 @@ public class QuickAssistProcessorXML implements IQuickAssistProcessor {
* @param offset
*/
protected void getSurroundWithNewElementQuickAssistProposal(ArrayList proposals, StructuredTextViewer viewer, int offset) {
- XMLNode node = (XMLNode) ContentAssistUtils.getNodeAt(viewer, offset);
+ DOMNode node = (DOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
if (node != null)
proposals.add(new SurroundWithNewElementQuickAssistProposal());
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
index 179c4e7917..4b6af0348a 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
@@ -32,7 +32,7 @@ import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
@@ -60,7 +60,7 @@ public class RenameInFileQuickAssistProposal implements ICompletionProposal, ICo
LinkedPositionGroup group = new LinkedPositionGroup();
try {
if (viewer instanceof StructuredTextViewer) {
- XMLNode node = (XMLNode) ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, offset);
+ DOMNode node = (DOMNode) ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, offset);
IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
ITextRegion region = (startStructuredDocumentRegion == null) ? null : startStructuredDocumentRegion.getRegionAtCharacterOffset(offset);
if (region != null) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
index 154392d802..65d243dde6 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
@@ -22,7 +22,7 @@ import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.format.FormatProcessorXML;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
@@ -44,10 +44,10 @@ public class SurroundWithNewElementQuickAssistProposal extends RenameInFileQuick
// surround the node if no selection
if (startTagOffset == endTagOffset) {
- XMLNode cursorNode = (XMLNode) ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, offset);
+ DOMNode cursorNode = (DOMNode) ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, offset);
// use parent node if text node is empty
if (cursorNode.getNodeType() == Node.TEXT_NODE && cursorNode.getNodeValue().trim().length() == 0)
- cursorNode = (XMLNode) cursorNode.getParentNode();
+ cursorNode = (DOMNode) cursorNode.getParentNode();
startTagOffset = cursorNode.getStartOffset();
endTagOffset = cursorNode.getEndOffset();
@@ -62,7 +62,7 @@ public class SurroundWithNewElementQuickAssistProposal extends RenameInFileQuick
multiTextEdit.apply(viewer.getDocument());
// get new element node
- XMLNode newElementNode = (XMLNode) ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, startTagOffset);
+ DOMNode newElementNode = (DOMNode) ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, startTagOffset);
// format new element
IStructuredFormatProcessor formatProcessor = new FormatProcessorXML();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java
index 3d2528332a..cb5a320913 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java
@@ -23,8 +23,8 @@ import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
@@ -148,12 +148,12 @@ public class XMLHyperlinkDetector implements IHyperlinkDetector {
short nodeType = node.getNodeType();
if (nodeType == Node.DOCUMENT_TYPE_NODE) {
// handle doc type node
- XMLNode docNode = (XMLNode) node;
+ DOMNode docNode = (DOMNode) node;
hyperRegion = new Region(docNode.getStartOffset(), docNode.getEndOffset() - docNode.getStartOffset());
}
else if (nodeType == Node.ATTRIBUTE_NODE) {
// handle attribute nodes
- XMLAttr att = (XMLAttr) node;
+ DOMAttr att = (DOMAttr) node;
// do not include quotes in attribute value region
int regOffset = att.getValueRegionStartOffset();
int regLength = att.getValueRegion().getTextLength();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java
index 39a109ad22..0d2b4f8b85 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java
@@ -11,7 +11,7 @@ import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
import org.eclipse.wst.sse.ui.internal.projection.IStructuredTextFoldingProvider;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -116,7 +116,7 @@ public class StructuredTextFoldingProviderXML implements IStructuredTextFoldingP
factoryRegistry.addFactory(newFactory);
// add factory to propogating adapter
- XMLModel domModel = (XMLModel) sModel;
+ DOMModel domModel = (DOMModel) sModel;
Document document = domModel.getDocument();
PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
if (propagatingAdapter != null) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySourceAdapter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySourceAdapter.java
index 7b31b3ba85..45c34525d3 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySourceAdapter.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySourceAdapter.java
@@ -27,7 +27,7 @@ import org.eclipse.ui.views.properties.TextPropertyDescriptor;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.ui.views.properties.IPropertySourceExtension;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
@@ -68,7 +68,7 @@ public class XMLPropertySourceAdapter implements INodeAdapter, IPropertySource,
public XMLPropertySourceAdapter(INodeNotifier target) {
super();
fNode = (Node) target;
- if (fNode instanceof XMLNode) {
+ if (fNode instanceof DOMNode) {
Document ownerDocument = fNode.getOwnerDocument();
if (ownerDocument == null) {
// if ownerDocument is null, then it must be the Document Node
@@ -361,8 +361,8 @@ public class XMLPropertySourceAdapter implements INodeAdapter, IPropertySource,
if (attrMap != null) {
Node attribute = attrMap.getNamedItem(name);
if (attribute != null) {
- if (attribute instanceof XMLNode)
- returnedValue = ((XMLNode) attribute).getValueSource();
+ if (attribute instanceof DOMNode)
+ returnedValue = ((DOMNode) attribute).getValueSource();
else
returnedValue = attribute.getNodeValue();
}
@@ -528,8 +528,8 @@ public class XMLPropertySourceAdapter implements INodeAdapter, IPropertySource,
// active cell editor to save its value and causing the
// loop to continue
if (attr.getValue() == null || !attr.getValue().equals(valueString)) {
- if (attr instanceof XMLNode)
- ((XMLNode) attr).setValueSource(valueString);
+ if (attr instanceof DOMNode)
+ ((DOMNode) attr).setValueSource(valueString);
else
attr.setValue(valueString);
}
@@ -538,8 +538,8 @@ public class XMLPropertySourceAdapter implements INodeAdapter, IPropertySource,
// NEW(?) value
if (value != null) { // never create an empty attribute
Attr newAttr = fNode.getOwnerDocument().createAttribute(name);
- if (newAttr instanceof XMLNode)
- ((XMLNode) newAttr).setValueSource(valueString);
+ if (newAttr instanceof DOMNode)
+ ((DOMNode) newAttr).setValueSource(valueString);
else
newAttr.setValue(valueString);
attrMap.setNamedItem(newAttr);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/openon/DefaultOpenOnXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/openon/DefaultOpenOnXML.java
index 73fe2ad7d6..4c7df11d1b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/openon/DefaultOpenOnXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/openon/DefaultOpenOnXML.java
@@ -27,8 +27,8 @@ import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.sse.ui.openon.AbstractOpenOn;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
@@ -64,14 +64,14 @@ public class DefaultOpenOnXML extends AbstractOpenOn {
if (currNode != null) {
// handle doc type node
if (currNode.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
- XMLNode docNode = (XMLNode) currNode;
+ DOMNode docNode = (DOMNode) currNode;
return new Region(docNode.getStartOffset(), docNode.getEndOffset() - docNode.getStartOffset());
}
Attr linkableAtt = getLinkableAttrFromNode(currNode, offset);
// found attribute to open on
if (linkableAtt != null) {
- XMLAttr att = (XMLAttr) linkableAtt;
+ DOMAttr att = (DOMAttr) linkableAtt;
// do not include quotes in attribute value region
int regOffset = att.getValueRegionStartOffset();
int regLength = att.getValueRegion().getTextLength();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidator.java
index 34ccd3ef05..10b6314782 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidator.java
@@ -31,12 +31,12 @@ import org.eclipse.wst.validation.core.IReporter;
import org.eclipse.wst.validation.core.IValidationContext;
import org.eclipse.wst.validation.core.IValidator;
import org.eclipse.wst.validation.core.ValidationException;
-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.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.document.XMLText;
+import org.eclipse.wst.xml.core.document.DOMAttr;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMElement;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
+import org.eclipse.wst.xml.core.document.DOMText;
import org.eclispe.wst.validation.internal.core.IMessageAccess;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -173,9 +173,9 @@ public class DelegatingSourceValidator implements IValidator { // these are
if (delta.length > 0) {
// get the file, model and document:
IFile file = getFile(delta[0]);
- XMLModel xmlModel = getModelForResource(file);
+ DOMModel xmlModel = getModelForResource(file);
try {
- XMLDocument document = xmlModel.getDocument();
+ DOMDocument document = xmlModel.getDocument();
// store the text in a byte array; make a full copy to ease
// any threading problems
@@ -212,7 +212,7 @@ public class DelegatingSourceValidator implements IValidator { // these are
* @param reporter -
* the reporter the messages are to be added to
*/
- protected void updateValidationMessages(List messages, XMLDocument document, IReporter reporter) {
+ protected void updateValidationMessages(List messages, DOMDocument document, IReporter reporter) {
for (int i = 0; i < messages.size(); i++) {
IMessage message = (IMessage) messages.get(i);
try {
@@ -257,7 +257,7 @@ public class DelegatingSourceValidator implements IValidator { // these are
* the file to get the model for
* @return the file's XMLModel
*/
- protected XMLModel getModelForResource(IFile file) {
+ protected DOMModel getModelForResource(IFile file) {
IStructuredModel model = null;
IModelManager manager = StructuredModelManager.getModelManager();
@@ -269,7 +269,7 @@ public class DelegatingSourceValidator implements IValidator { // these are
// e.printStackTrace();
}
- return model instanceof XMLModel ? (XMLModel) model : null;
+ return model instanceof DOMModel ? (DOMModel) model : null;
}
/**
@@ -295,7 +295,7 @@ public class DelegatingSourceValidator implements IValidator { // these are
* information from nameOrValue and the DOM to get better offsets
*
*/
- protected int[] computeStartEndLocation(int startOffset, String errorMessage, String selectionStrategy, String nameOrValue, XMLDocument document) {
+ protected int[] computeStartEndLocation(int startOffset, String errorMessage, String selectionStrategy, String nameOrValue, DOMDocument document) {
try {
int startEndPositions[] = new int[2];
@@ -329,7 +329,7 @@ public class DelegatingSourceValidator implements IValidator { // these are
// highlight the
// opening tag
if (node.getNodeType() == Node.ELEMENT_NODE) {
- XMLElement element = (XMLElement) node;
+ DOMElement element = (DOMElement) node;
startEndPositions[0] = element.getStartOffset() + 1;
startEndPositions[1] = startEndPositions[0] + element.getTagName().length();
}
@@ -346,8 +346,8 @@ public class DelegatingSourceValidator implements IValidator { // these are
// attribute
// name
if (node.getNodeType() == Node.ELEMENT_NODE) {
- XMLElement element = (XMLElement) node;
- XMLNode attributeNode = (XMLNode) (element.getAttributeNode(nameOrValue));
+ DOMElement element = (DOMElement) node;
+ DOMNode attributeNode = (DOMNode) (element.getAttributeNode(nameOrValue));
if (attributeNode != null) {
startEndPositions[0] = attributeNode.getStartOffset();
startEndPositions[1] = attributeNode.getStartOffset() + nameOrValue.length();
@@ -365,8 +365,8 @@ public class DelegatingSourceValidator implements IValidator { // these are
// attribute's
// value
if (node.getNodeType() == Node.ELEMENT_NODE) {
- XMLElement element = (XMLElement) node;
- XMLAttr attributeNode = (XMLAttr) (element.getAttributeNode(nameOrValue));
+ DOMElement element = (DOMElement) node;
+ DOMAttr attributeNode = (DOMAttr) (element.getAttributeNode(nameOrValue));
if (attributeNode != null) {
startEndPositions[0] = attributeNode.getValueRegionStartOffset();
startEndPositions[1] = startEndPositions[0] + attributeNode.getValueRegionText().length();
@@ -378,11 +378,11 @@ public class DelegatingSourceValidator implements IValidator { // these are
// ALL
// attributes
if (node.getNodeType() == Node.ELEMENT_NODE) {
- XMLElement element = (XMLElement) node;
+ DOMElement element = (DOMElement) node;
NamedNodeMap attributes = element.getAttributes();
if (attributes != null) {
- XMLNode first = (XMLNode) attributes.item(0);
- XMLNode last = (XMLNode) attributes.item(attributes.getLength() - 1);
+ DOMNode first = (DOMNode) attributes.item(0);
+ DOMNode last = (DOMNode) attributes.item(attributes.getLength() - 1);
if (first != null && last != null) {
startEndPositions[0] = first.getStartOffset();
startEndPositions[1] = last.getEndOffset();
@@ -397,7 +397,7 @@ public class DelegatingSourceValidator implements IValidator { // these are
// any extra
// whitespace)
if (node.getNodeType() == Node.TEXT_NODE) {
- XMLText textNode = (XMLText) node;
+ DOMText textNode = (DOMText) node;
int start = textNode.getStartOffset();
String value = textNode.getNodeValue();
int index = 0;
@@ -413,10 +413,10 @@ public class DelegatingSourceValidator implements IValidator { // these are
startEndPositions[1] = start + value.trim().length() - 1;
}
else if (node.getNodeType() == Node.ELEMENT_NODE) {
- XMLElement element = (XMLElement) node;
+ DOMElement element = (DOMElement) node;
Node child = element.getFirstChild();
- if (child instanceof XMLNode) {
- XMLNode xmlChild = ((XMLNode) child);
+ if (child instanceof DOMNode) {
+ DOMNode xmlChild = ((DOMNode) child);
startEndPositions[0] = xmlChild.getStartOffset();
startEndPositions[1] = xmlChild.getEndOffset();
}
@@ -440,7 +440,7 @@ public class DelegatingSourceValidator implements IValidator { // these are
for (int i = 0; i < nodes.getLength(); i++) {
Node currentNode = nodes.item(i);
if (currentNode.getNodeType() == Node.TEXT_NODE) {
- XMLText textNode = (XMLText) currentNode;
+ DOMText textNode = (DOMText) currentNode;
if (textNode.getNodeValue().trim().length() > 0) {
String value = textNode.getNodeValue();
int index = 0;
@@ -489,7 +489,7 @@ public class DelegatingSourceValidator implements IValidator { // these are
// with the value we want:
NamedNodeMap attributes = node.getAttributes();
for (int i = 0; i < attributes.getLength(); i++) {
- XMLAttr attr = (XMLAttr) attributes.item(i);
+ DOMAttr attr = (DOMAttr) attributes.item(i);
String nodeValue = attr.getNodeValue().trim();
if (nodeValue.equals(nameOrValue)) {
startEndPositions[0] = attr.getValueRegionStartOffset() + 1;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java
index 0f5fe8de15..caeb077c77 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java
@@ -30,7 +30,7 @@ import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey;
import org.eclipse.wst.sse.ui.internal.reconcile.StructuredReconcileStep;
import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.eclipse.wst.xml.ui.internal.correction.ProblemIDsXML;
import org.w3c.dom.Node;
@@ -335,7 +335,7 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
return;
// check start/end tag pairs
- XMLNode xmlNode = getXMLNode(sdRegion);
+ DOMNode xmlNode = getXMLNode(sdRegion);
if(xmlNode == null)
return;
@@ -379,9 +379,9 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
tagClose = "/"; //$NON-NLS-1$
tagCloseOffset--;
}
- XMLNode firstChild = (XMLNode) xmlNode.getFirstChild();
+ DOMNode firstChild = (DOMNode) xmlNode.getFirstChild();
while (firstChild != null && firstChild.getNodeType() == Node.TEXT_NODE) {
- firstChild = (XMLNode) firstChild.getNextSibling();
+ firstChild = (DOMNode) firstChild.getNextSibling();
}
int endOffset = xmlNode.getEndOffset();
int firstChildStartOffset = firstChild == null ? endOffset : firstChild.getStartOffset();
@@ -441,7 +441,7 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
if (!sdRegion.isDeleted())
regions.add(sdRegion);
- XMLNode xmlNode = getXMLNode(sdRegion);
+ DOMNode xmlNode = getXMLNode(sdRegion);
while (sdRegion != null
&& !sdRegion.isDeleted()
@@ -456,19 +456,19 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
return (IStructuredDocumentRegion[]) regions.toArray(new IStructuredDocumentRegion[regions.size()]);
}
- private XMLNode getXMLNode(IStructuredDocumentRegion sdRegion) {
+ private DOMNode getXMLNode(IStructuredDocumentRegion sdRegion) {
if(sdRegion == null)
return null;
IStructuredModel xModel = null;
- XMLNode xmlNode = null;
+ DOMNode xmlNode = null;
// get/release models should always be in a try/finally block
try {
xModel = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
// xModel is sometime null, when closing editor, for example
if (xModel != null) {
- xmlNode = (XMLNode) xModel.getIndexedRegion(sdRegion.getStart());
+ xmlNode = (DOMNode) xModel.getIndexedRegion(sdRegion.getStart());
}
} finally {
if (xModel != null) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForEmbeddedXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForEmbeddedXML.java
index 690355de54..fa40e61246 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForEmbeddedXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForEmbeddedXML.java
@@ -15,8 +15,8 @@ package org.eclipse.wst.xml.ui.registry;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.modelhandler.EmbeddedTypeHandler;
import org.eclipse.wst.sse.ui.registry.embedded.EmbeddedAdapterFactoryProvider;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMDocument;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.modelhandler.EmbeddedXML;
@@ -26,8 +26,8 @@ public class AdapterFactoryProviderForEmbeddedXML implements EmbeddedAdapterFact
* @see AdapterFactoryProvider#addAdapterFactories(IStructuredModel)
*/
public void addAdapterFactories(IStructuredModel structuredModel) {
- if (structuredModel instanceof XMLModel) {
- XMLDocument doc = ((XMLModel) structuredModel).getDocument();
+ if (structuredModel instanceof DOMModel) {
+ DOMDocument doc = ((DOMModel) structuredModel).getDocument();
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/XMLTagInfoHoverProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/XMLTagInfoHoverProcessor.java
index f0241b8c99..249abce93e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/XMLTagInfoHoverProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/XMLTagInfoHoverProcessor.java
@@ -27,7 +27,7 @@ import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.core.util.Debug;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
@@ -73,7 +73,7 @@ public class XMLTagInfoHoverProcessor implements ITextHover {
while (node != null && node.getNodeType() == Node.TEXT_NODE && node.getParentNode() != null)
node = node.getParentNode();
- XMLNode parentNode = (XMLNode) node;
+ DOMNode parentNode = (DOMNode) node;
IStructuredDocumentRegion flatNode = ((IStructuredDocument) textViewer.getDocument()).getRegionAtCharacterOffset(documentPosition);
if (flatNode != null) {
@@ -91,24 +91,24 @@ public class XMLTagInfoHoverProcessor implements ITextHover {
*
* @return String hoverhelp
*/
- protected String computeRegionHelp(IndexedRegion treeNode, XMLNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
+ protected String computeRegionHelp(IndexedRegion treeNode, DOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
String result = null;
if (region == null)
return null;
String regionType = region.getType();
if (regionType == XMLRegionContext.XML_TAG_NAME)
- result = computeTagNameHelp((XMLNode) treeNode, parentNode, flatNode, region);
+ result = computeTagNameHelp((DOMNode) treeNode, parentNode, flatNode, region);
else if (regionType == XMLRegionContext.XML_TAG_ATTRIBUTE_NAME)
- result = computeTagAttNameHelp((XMLNode) treeNode, parentNode, flatNode, region);
+ result = computeTagAttNameHelp((DOMNode) treeNode, parentNode, flatNode, region);
else if (regionType == XMLRegionContext.XML_TAG_ATTRIBUTE_VALUE)
- result = computeTagAttValueHelp((XMLNode) treeNode, parentNode, flatNode, region);
+ result = computeTagAttValueHelp((DOMNode) treeNode, parentNode, flatNode, region);
return result;
}
/**
* Computes the hover help for the attribute name
*/
- protected String computeTagAttNameHelp(XMLNode xmlnode, XMLNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
+ protected String computeTagAttNameHelp(DOMNode xmlnode, DOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
CMElementDeclaration elementDecl = getCMElementDeclaration(xmlnode);
String attName = flatNode.getText(region);
CMAttributeDeclaration attDecl = getCMAttributeDeclaration(elementDecl, attName);
@@ -119,7 +119,7 @@ public class XMLTagInfoHoverProcessor implements ITextHover {
* Computes the hover help for the attribute value (this is the same as
* the attribute name's help)
*/
- protected String computeTagAttValueHelp(XMLNode xmlnode, XMLNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
+ protected String computeTagAttValueHelp(DOMNode xmlnode, DOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
CMElementDeclaration elementDecl = getCMElementDeclaration(xmlnode);
ITextRegion attrNameRegion = getAttrNameRegion(xmlnode, region);
@@ -131,7 +131,7 @@ public class XMLTagInfoHoverProcessor implements ITextHover {
/**
* Computes the hover help for the tag name
*/
- protected String computeTagNameHelp(XMLNode xmlnode, XMLNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
+ protected String computeTagNameHelp(DOMNode xmlnode, DOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
CMElementDeclaration elementDecl = getCMElementDeclaration(xmlnode);
CMElementDeclaration pelementDecl = getCMElementDeclaration(parentNode);
return getAdditionalInfo(pelementDecl, elementDecl);
@@ -166,7 +166,7 @@ public class XMLTagInfoHoverProcessor implements ITextHover {
* region
*
*/
- protected ITextRegion getAttrNameRegion(XMLNode node, ITextRegion region) {
+ protected ITextRegion getAttrNameRegion(DOMNode node, ITextRegion region) {
// Find the attribute name for which this position should have a value
IStructuredDocumentRegion open = node.getFirstStructuredDocumentRegion();
ITextRegionList openRegions = open.getRegions();
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java
index 0edc86ab89..bc8c10872a 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java
@@ -13,7 +13,7 @@ import java.net.URL;
import java.util.Vector;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
@@ -23,7 +23,7 @@ public abstract class AbstractXSDModelQueryContributor
{
protected AbstractXSDDataTypeValueExtension xsdDataTypeValueExtension;
- public void setModel(XMLModel model)
+ public void setModel(DOMModel model)
{
// remove our old DataTypeValueExtension
//
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java
index 98e8044351..04d601cae4 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java
@@ -51,7 +51,7 @@ import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.core.undo.IStructuredTextUndoManager;
import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.document.XMLModelImpl;
import org.eclipse.wst.xsd.ui.internal.graph.XSDGraphViewer;
//import org.eclipse.wst.xsd.ui.internal.graph.model.XSDModelAdapterFactory;
@@ -428,7 +428,7 @@ public class XSDEditor extends XSDMultiPageEditorPart implements ITabbedProperty
public void reparseSchema()
{
- Document document = ((XMLModel)getModel()).getDocument();
+ Document document = ((DOMModel)getModel()).getDocument();
createSchema(document.getDocumentElement());
}
@@ -768,7 +768,7 @@ public class XSDEditor extends XSDMultiPageEditorPart implements ITabbedProperty
*/
public void createDefaultSchemaNode()
{
- Document document = ((XMLModel)getModel()).getDocument();
+ Document document = ((DOMModel)getModel()).getDocument();
if (document.getChildNodes().getLength() == 0)
{
// if it is a completely empty file, then add the encoding and version processing instruction
@@ -811,7 +811,7 @@ public class XSDEditor extends XSDMultiPageEditorPart implements ITabbedProperty
{
try
{
- Document document = ((XMLModel)getModel()).getDocument();
+ Document document = ((DOMModel)getModel()).getDocument();
if (document.getChildNodes().getLength() == 0)
{
// this is an empty document. Create a default schema tag now
@@ -821,7 +821,7 @@ public class XSDEditor extends XSDMultiPageEditorPart implements ITabbedProperty
createSchema(document.getDocumentElement());
XSDDocumentAdapter documentAdapter =
- new XSDDocumentAdapter(((XMLModel)getModel()).getDocument());
+ new XSDDocumentAdapter(((DOMModel)getModel()).getDocument());
}
catch (Exception e)
{
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java
index 40a20bfbb3..fc5b138a62 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java
@@ -39,8 +39,8 @@ import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstan
import org.eclipse.wst.sse.ui.internal.openon.OpenOnAction;
import org.eclipse.wst.sse.ui.view.events.INodeSelectionListener;
import org.eclipse.wst.sse.ui.view.events.NodeSelectionChangedEvent;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.ui.StructuredTextEditorXML;
import org.eclipse.wst.xsd.ui.internal.properties.section.XSDTabbedPropertySheetPage;
@@ -163,7 +163,7 @@ public class XSDTextEditor extends StructuredTextEditorXML implements INodeSelec
// the text editor can only accept sed nodes!
//
- if (!(node instanceof XMLNode))
+ if (!(node instanceof DOMNode))
{
node = null;
}
@@ -301,9 +301,9 @@ public class XSDTextEditor extends StructuredTextEditorXML implements INodeSelec
public void setModel(IFileEditorInput input)
{
super.setModel(input);
- if (getModel() instanceof XMLModel)
+ if (getModel() instanceof DOMModel)
{
- xsdModelQueryContributor.setModel((XMLModel)getModel());
+ xsdModelQueryContributor.setModel((DOMModel)getModel());
}
file = input.getFile();
}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateAttributeAndRequired.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateAttributeAndRequired.java
index 122da07156..7218e233f9 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateAttributeAndRequired.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateAttributeAndRequired.java
@@ -16,8 +16,8 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.format.FormatProcessorXML;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.eclipse.xsd.XSDComplexTypeDefinition;
@@ -93,9 +93,9 @@ public class CreateAttributeAndRequired extends Action {
protected void formatChild(Element child)
{
- if (child instanceof XMLNode)
+ if (child instanceof DOMNode)
{
- XMLModel model = ((XMLNode)child).getModel();
+ DOMModel model = ((DOMNode)child).getModel();
try
{
// tell the model that we are about to make a big model change
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateElementAction.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateElementAction.java
index fb9f00fba3..44719de132 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateElementAction.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/CreateElementAction.java
@@ -19,8 +19,8 @@ import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.widgets.Display;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.format.FormatProcessorXML;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.eclipse.wst.xsd.ui.internal.graph.editparts.ComplexTypeDefinitionEditPart;
@@ -187,9 +187,9 @@ public class CreateElementAction extends Action
protected void formatChild(Element child)
{
- if (child instanceof XMLNode)
+ if (child instanceof DOMNode)
{
- XMLModel model = ((XMLNode)child).getModel();
+ DOMModel model = ((DOMNode)child).getModel();
try
{
// tell the model that we are about to make a big model change
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DeleteAction.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DeleteAction.java
index 097a4a3fae..3bb8f8d116 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DeleteAction.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DeleteAction.java
@@ -17,7 +17,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
import org.eclipse.wst.xsd.ui.internal.refactor.delete.BaseGlobalCleanup;
@@ -110,7 +110,7 @@ public class DeleteAction extends SelectionListenerAction
xsdSchema = ((XSDConcreteComponent)obj).getSchema();
node = ((XSDConcreteComponent)obj).getElement();
- if (node instanceof XMLNode)
+ if (node instanceof DOMNode)
{
parentXSDComponent = ((XSDConcreteComponent)obj).getContainer();
@@ -124,7 +124,7 @@ public class DeleteAction extends SelectionListenerAction
}
if (!XSDDOMHelper.inputEquals(node, XSDConstants.SCHEMA_ELEMENT_TAG, false))
{
- if (node instanceof XMLNode)
+ if (node instanceof DOMNode)
{
if (doc == null)
{
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/MoveAction.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/MoveAction.java
index 741f7d0dd2..65f6580fbc 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/MoveAction.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/MoveAction.java
@@ -14,8 +14,8 @@ import java.util.Iterator;
import java.util.List;
import org.eclipse.jface.action.Action;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.xsd.XSDConcreteComponent;
import org.w3c.dom.Node;
import org.w3c.dom.Text;
@@ -83,7 +83,7 @@ public class MoveAction extends Action
protected void beginRecording()
{
- XMLModel model = getModel();
+ DOMModel model = getModel();
if (model != null)
{
model.beginRecording(this, "Move");
@@ -92,19 +92,19 @@ public class MoveAction extends Action
protected void endRecording()
{
- XMLModel model = getModel();
+ DOMModel model = getModel();
if (model != null)
{
model.endRecording(this);
}
}
- protected XMLModel getModel()
+ protected DOMModel getModel()
{
- XMLModel model = null;
- if (parentNode instanceof XMLNode)
+ DOMModel model = null;
+ if (parentNode instanceof DOMNode)
{
- model = ((XMLNode)parentNode).getModel();
+ model = ((DOMNode)parentNode).getModel();
}
return model;
}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/SetBaseTypeAction.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/SetBaseTypeAction.java
index 78ed454a95..9f5c0cc39c 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/SetBaseTypeAction.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/SetBaseTypeAction.java
@@ -19,8 +19,8 @@ import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.format.FormatProcessorXML;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
@@ -345,9 +345,9 @@ public class SetBaseTypeAction extends Action
protected void formatChild(Element child)
{
- if (child instanceof XMLNode)
+ if (child instanceof DOMNode)
{
- XMLModel model = ((XMLNode)child).getModel();
+ DOMModel model = ((DOMNode)child).getModel();
try
{
// tell the model that we are about to make a big model change
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AbstractCommand.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AbstractCommand.java
index 7d0a84e662..d6d1cd4792 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AbstractCommand.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/commands/AbstractCommand.java
@@ -11,8 +11,8 @@
package org.eclipse.wst.xsd.ui.internal.commands;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.format.FormatProcessorXML;
import org.eclipse.xsd.XSDConcreteComponent;
import org.w3c.dom.Element;
@@ -49,9 +49,9 @@ public abstract class AbstractCommand
protected void formatChild(Element child)
{
- if (child instanceof XMLNode)
+ if (child instanceof DOMNode)
{
- XMLModel model = ((XMLNode)child).getModel();
+ DOMModel model = ((DOMNode)child).getModel();
try
{
// tell the model that we are about to make a big model change
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/BaseDragNodesCommand.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/BaseDragNodesCommand.java
index 142d4ed02d..f03f1b1fed 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/BaseDragNodesCommand.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/BaseDragNodesCommand.java
@@ -13,7 +13,7 @@ package org.eclipse.wst.xsd.ui.internal.dnd;
import java.util.Collection;
import org.eclipse.wst.common.ui.dnd.DefaultDragAndDropCommand;
-import org.eclipse.wst.xml.core.document.XMLModel;
+import org.eclipse.wst.xml.core.document.DOMModel;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
import org.eclipse.xsd.util.XSDConstants;
@@ -64,7 +64,7 @@ public abstract class BaseDragNodesCommand extends DefaultDragAndDropCommand
{
if (target != null)
{
- XMLModel model = getModel((Node)target);
+ DOMModel model = getModel((Node)target);
if (model != null)
{
@@ -77,7 +77,7 @@ public abstract class BaseDragNodesCommand extends DefaultDragAndDropCommand
{
if (target != null)
{
- XMLModel model = getModel((Node)target);
+ DOMModel model = getModel((Node)target);
if (model != null)
{
@@ -85,7 +85,7 @@ public abstract class BaseDragNodesCommand extends DefaultDragAndDropCommand
}
}
}
- protected XMLModel getModel(Node node)
+ protected DOMModel getModel(Node node)
{
Object object = node.getOwnerDocument();
if (object instanceof DocumentImpl)
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/DragNodesCommand.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/DragNodesCommand.java
index b3692cffb3..6c8aa7b63f 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/DragNodesCommand.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dnd/DragNodesCommand.java
@@ -13,7 +13,7 @@ package org.eclipse.wst.xsd.ui.internal.dnd;
import java.util.Collection;
import java.util.Iterator;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.format.NodeFormatter;
import org.w3c.dom.Node;
@@ -68,7 +68,7 @@ public class DragNodesCommand extends BaseDragNodesCommand
if (isSiblingNodes(referenceNode,node))
{
moveNode(referenceNode, node, !isAfter());
- formatProcessor.format((XMLNode)node);
+ formatProcessor.format((DOMNode)node);
}
}
// formatProcessor.format((XMLNode)referenceNode.getParentNode());
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/LinkedGraphViewer.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/LinkedGraphViewer.java
index 09645a1830..da35f8e40f 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/LinkedGraphViewer.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/LinkedGraphViewer.java
@@ -24,7 +24,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xsd.ui.internal.XSDEditor;
import org.eclipse.wst.xsd.ui.internal.util.ViewUtility;
import org.eclipse.xsd.XSDConcreteComponent;
@@ -146,7 +146,7 @@ public class LinkedGraphViewer
// this test ensures that we don't attempt to select an element for an external schema
//
- if (element instanceof XMLNode)
+ if (element instanceof DOMNode)
{
// now update the minor viewer based on the selected component in the major viewer
minorViewer.setInput((XSDConcreteComponent)model);
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDGraphUtil.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDGraphUtil.java
index a19f20b5c4..88946e6cb8 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDGraphUtil.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/XSDGraphUtil.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.wst.xsd.ui.internal.graph;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.xsd.XSDConcreteComponent;
import org.w3c.dom.Element;
@@ -25,7 +25,7 @@ public class XSDGraphUtil
Element element = ((XSDConcreteComponent)model).getElement();
// this test ensures that we don't attempt to select an element for an external schema
//
- if (element instanceof XMLNode)
+ if (element instanceof DOMNode)
{
result = true;
}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSection.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSection.java
index 8ebd3ac9b4..ecef637d30 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSection.java
@@ -37,7 +37,7 @@ import org.eclipse.wst.common.ui.properties.internal.provisional.ISection;
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetPage;
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
import org.eclipse.wst.xml.core.NameValidator;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
import org.eclipse.wst.xsd.ui.internal.actions.CreateElementAction;
@@ -103,7 +103,7 @@ public class AbstractSection implements ISection, IPropertyChangeListener, Liste
xsdSchema = ((XSDConcreteComponent)input).getSchema();
Element element = ((XSDConcreteComponent)input).getElement();
- if (element instanceof XMLNode)
+ if (element instanceof DOMNode)
{
isReadOnly = false;
}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/XSDSectionLabelProvider.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/XSDSectionLabelProvider.java
index d5c65781b9..ff79198ef0 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/XSDSectionLabelProvider.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/XSDSectionLabelProvider.java
@@ -15,7 +15,7 @@ import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
import org.eclipse.wst.xsd.ui.internal.XSDTextEditor;
import org.eclipse.xsd.XSDAttributeDeclaration;
@@ -117,7 +117,7 @@ public class XSDSectionLabelProvider extends LabelProvider
sb.append(XSDEditorPlugin.getXSDString("_UI_PAGE_HEADING_REFERENCE"));
}
- if (!(element instanceof XMLNode))
+ if (!(element instanceof DOMNode))
{
sb.append(" (" + XSDEditorPlugin.getXSDString("_UI_LABEL_READ_ONLY") + ")"); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/SchemaPrefixChangeHandler.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/SchemaPrefixChangeHandler.java
index 62b0eb9478..5d803fc9ca 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/SchemaPrefixChangeHandler.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/SchemaPrefixChangeHandler.java
@@ -13,7 +13,7 @@ package org.eclipse.wst.xsd.ui.internal.refactor.rename;
import java.util.Iterator;
import java.util.List;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xsd.ui.internal.refactor.XSDVisitor;
import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
import org.eclipse.xsd.XSDAttributeDeclaration;
@@ -87,7 +87,7 @@ public class SchemaPrefixChangeHandler
if (ns.equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001))
{
Element domElement = element.getElement();
- if (domElement != null && domElement instanceof XMLNode)
+ if (domElement != null && domElement instanceof DOMNode)
{
Attr typeAttr = domElement.getAttributeNode(XSDConstants.TYPE_ATTRIBUTE);
if (typeAttr != null)
@@ -114,7 +114,7 @@ public class SchemaPrefixChangeHandler
{
XSDDOMHelper domHelper = new XSDDOMHelper();
Element derivedBy = domHelper.getDerivedByElement(simpleType.getElement());
- if (derivedBy != null && derivedBy instanceof XMLNode)
+ if (derivedBy != null && derivedBy instanceof DOMNode)
{
Attr typeAttr = derivedBy.getAttributeNode(XSDConstants.BASE_ATTRIBUTE);
if (typeAttr != null)
@@ -137,7 +137,7 @@ public class SchemaPrefixChangeHandler
if (listNode != null && listNode instanceof Element)
{
Element listElement = (Element)listNode;
- if (listElement instanceof XMLNode)
+ if (listElement instanceof DOMNode)
{
Attr typeAttr = listElement.getAttributeNode(XSDConstants.ITEMTYPE_ATTRIBUTE);
if (typeAttr != null)
@@ -157,7 +157,7 @@ public class SchemaPrefixChangeHandler
if (unionNode != null && unionNode instanceof Element)
{
Element unionElement = (Element)unionNode;
- if (unionElement instanceof XMLNode)
+ if (unionElement instanceof DOMNode)
{
Attr typeAttr = unionElement.getAttributeNode(XSDConstants.MEMBERTYPES_ATTRIBUTE);
StringBuffer sb = new StringBuffer("");
@@ -197,7 +197,7 @@ public class SchemaPrefixChangeHandler
if (ns.equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001))
{
Element domElement = attr.getElement();
- if (domElement != null && domElement instanceof XMLNode)
+ if (domElement != null && domElement instanceof DOMNode)
{
Attr typeAttr = domElement.getAttributeNode(XSDConstants.TYPE_ATTRIBUTE);
if (typeAttr != null)
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/XSDDOMHelper.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/XSDDOMHelper.java
index e0835b28f6..0f6aa88741 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/XSDDOMHelper.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/util/XSDDOMHelper.java
@@ -11,8 +11,8 @@
package org.eclipse.wst.xsd.ui.internal.util;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.document.XMLNode;
+import org.eclipse.wst.xml.core.document.DOMModel;
+import org.eclipse.wst.xml.core.document.DOMNode;
import org.eclipse.wst.xml.core.format.FormatProcessorXML;
import org.eclipse.xsd.util.XSDConstants;
import org.w3c.dom.Document;
@@ -825,9 +825,9 @@ public class XSDDOMHelper
public static void formatChild(Node child)
{
- if (child instanceof XMLNode)
+ if (child instanceof DOMNode)
{
- XMLModel model = ((XMLNode)child).getModel();
+ DOMModel model = ((DOMNode)child).getModel();
try
{
// tell the model that we are about to make a big model change

Back to the top