Skip to main content

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

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMVisitor.java')
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMVisitor.java118
1 files changed, 0 insertions, 118 deletions
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMVisitor.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMVisitor.java
deleted file mode 100644
index 68f78a745e..0000000000
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMVisitor.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2002 IBM Corporation and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Common Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/cpl-v10.html
-*
-* Contributors:
-* IBM - Initial API and implementation
-* Jens Lukowski/Innoopract - initial renaming/restructuring
-*
-*/
-package org.eclipse.wst.xml.core.internal.contentmodel.util;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAnyElement;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;
-
-public class CMVisitor
-{
- protected int indent = 0;
-
- public void visitCMNode(CMNode node)
- {
- if (node != null)
- {
- //ContentModelManager.printlnIndented("visitCMNode : " + node.getNodeName() + " " + node);
- indent += 2;
- int nodeType = node.getNodeType();
- switch (nodeType)
- {
- case CMNode.ANY_ELEMENT :
- {
- visitCMAnyElement((CMAnyElement)node);
- break;
- }
- case CMNode.ATTRIBUTE_DECLARATION :
- {
- visitCMAttributeDeclaration((CMAttributeDeclaration)node);
- break;
- }
- case CMNode.DATA_TYPE :
- {
- visitCMDataType((CMDataType)node);
- break;
- }
- case CMNode.DOCUMENT :
- {
- visitCMDocument((CMDocument)node);
- break;
- }
- case CMNode.ELEMENT_DECLARATION :
- {
- visitCMElementDeclaration((CMElementDeclaration)node);
- break;
- }
- case CMNode.GROUP :
- {
- visitCMGroup((CMGroup)node);
- break;
- }
- }
- indent -= 2;
- }
- }
-
- public void visitCMAnyElement(CMAnyElement anyElement)
- {
- }
-
- public void visitCMAttributeDeclaration(CMAttributeDeclaration ad)
- {
- }
-
- public void visitCMDataType(CMDataType dataType)
- {
- }
-
- public void visitCMDocument(CMDocument document)
- {
- CMNamedNodeMap map = document.getElements();
- int size = map.getLength();
- for (int i = 0; i < size; i++)
- {
- visitCMNode(map.item(i));
- }
- }
-
- public void visitCMGroup(CMGroup group)
- {
- CMNodeList nodeList = group.getChildNodes();
- int size = nodeList.getLength();
- for (int i = 0; i < size; i++)
- {
- visitCMNode(nodeList.item(i));
- }
- }
-
- public void visitCMElementDeclaration(CMElementDeclaration ed)
- {
- CMNamedNodeMap nodeMap = ed.getAttributes();
- int size = nodeMap.getLength();
- for (int i = 0; i < size; i++)
- {
- visitCMNode(nodeMap.item(i));
- }
-
- visitCMNode(ed.getContent());
-
- visitCMDataType(ed.getDataType());
- }
-}

Back to the top