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:
authornitind2005-04-13 19:12:49 +0000
committernitind2005-04-13 19:12:49 +0000
commit292ded1b4de2f6030e4038b92a37ea5914d3ea7d (patch)
tree44e67d379b97f7e2b353212e4103815636679fec /bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java
parent20cb84d3fe65f82e36498d9946b3b951273a4a4d (diff)
downloadwebtools.sourceediting-20050413_1525.tar.gz
webtools.sourceediting-20050413_1525.tar.xz
webtools.sourceediting-20050413_1525.zip
This commit was manufactured by cvs2svn to create tag 'v20050413_1525'.v20050413_1525
Diffstat (limited to 'bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java')
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java109
1 files changed, 0 insertions, 109 deletions
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java
deleted file mode 100644
index ba84128503..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-
-
-public class NodeList {
- protected DTDFile dtdFile;
-
- ArrayList listNodes = new ArrayList();
-
- protected String listType;
-
- public NodeList(DTDFile dtdFile, String tokenType) {
- listType = tokenType;
- this.dtdFile = dtdFile;
- }
-
- public Image getImage() {
- if (listType == DTDRegionTypes.ELEMENT_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_EL);
- }
- else if (listType == DTDRegionTypes.ENTITY_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_ENT);
- }
- else if (listType == DTDRegionTypes.NOTATION_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_NOT);
- }
- else if (listType == DTDRegionTypes.COMMENT_START) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_COMM);
- }
- else if (listType == DTDRegionTypes.ATTLIST_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_ATTLIST);
- }
- else if (listType == DTDRegionTypes.UNKNOWN_CONTENT) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_UNREC);
- }
- else
- return null;
- }
-
- public String getListType() {
- return listType;
- }
-
- public String getName() {
- if (listType == DTDRegionTypes.ELEMENT_TAG) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_ELEMENTS; //$NON-NLS-1$
- }
- else if (listType == DTDRegionTypes.ENTITY_TAG) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_ENTITIES; //$NON-NLS-1$
- }
- else if (listType == DTDRegionTypes.NOTATION_TAG) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_NOTATIONS; //$NON-NLS-1$
- }
- else if (listType == DTDRegionTypes.COMMENT_START) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_COMMENTS; //$NON-NLS-1$
- }
- else if (listType == DTDRegionTypes.ATTLIST_TAG) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_ATTRIBUTES; //$NON-NLS-1$
- }
- else if (listType == DTDRegionTypes.UNKNOWN_CONTENT) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_OTHER; //$NON-NLS-1$
- }
- return ""; //$NON-NLS-1$
- }
-
- public ArrayList getNodes() {
- listNodes.clear();
- Iterator iter = dtdFile.getNodes().iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (listType == DTDRegionTypes.ELEMENT_TAG && (node instanceof Element || node instanceof ParameterEntityReference)) {
- listNodes.add(node);
- }
- else if (listType == DTDRegionTypes.ATTLIST_TAG && node instanceof AttributeList) {
- listNodes.add(node);
- }
- else if (listType == DTDRegionTypes.ENTITY_TAG && node instanceof Entity) {
- listNodes.add(node);
- }
- else if (listType == DTDRegionTypes.NOTATION_TAG && node instanceof Notation) {
- listNodes.add(node);
- }
- else if (listType == DTDRegionTypes.COMMENT_START && node instanceof Comment) {
- listNodes.add(node);
- }
- else if (listType == DTDRegionTypes.UNKNOWN_CONTENT && node instanceof Unrecognized) {
- listNodes.add(node);
- }
- }
- return listNodes;
- }
-}

Back to the top