diff options
Diffstat (limited to 'bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text')
4 files changed, 0 insertions, 208 deletions
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java deleted file mode 100644 index 87e1a188ba..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.text; - -import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredTextReParser; -import org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser; - - -public class DTDStructuredDocumentReParser extends StructuredDocumentReParser { - - public StructuredDocumentEvent checkForCrossStructuredDocumentRegionBoundryCases() { - IStructuredDocumentRegion startNode = fStructuredDocument.getRegionAtCharacterOffset(fStart); - IStructuredDocumentRegion endNode = fStructuredDocument.getRegionAtCharacterOffset(fStart + fLengthToReplace - 1); - return reparse(startNode.getStart(), endNode.getEnd()); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser#newInstance() - */ - public IStructuredTextReParser newInstance() { - return new DTDStructuredDocumentReParser(); - } - - protected StructuredDocumentEvent reparse(IStructuredDocumentRegion dirtyStart, IStructuredDocumentRegion dirtyEnd) { - return super.reparse(dirtyStart, dirtyEnd); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java deleted file mode 100644 index e3d2c2e321..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.text; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion; - - -public class DTDStructuredDocumentRegionFactory { - public static final int DTD_GENERIC = 5; - - public static IStructuredDocumentRegion createStructuredDocumentRegion(int type) { - IStructuredDocumentRegion instance = null; - switch (type) { - case DTD_GENERIC : - instance = new BasicStructuredDocumentRegion(); - break; - default : - break; - } - return instance; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java deleted file mode 100644 index a191b2e966..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.text; - -import java.util.NoSuchElementException; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList; - - -public class RegionIterator { - - private int currentIndex; - - // private IStructuredDocumentRegion flatNode; - private ITextRegionList regions; - // private int startOffset, endOffset; - private ITextRegion startRegion, endRegion; - - public RegionIterator(IStructuredDocumentRegion node) { - this(node, node.getStart(), node.getEnd()); - } - - public RegionIterator(IStructuredDocumentRegion node, int startOffset, int endOffset) { - regions = node.getRegions(); - startRegion = node.getRegionAtCharacterOffset(startOffset); - endRegion = node.getRegionAtCharacterOffset(endOffset - 1); - - for (int i = 0; i < regions.size(); i++) { - ITextRegion region = regions.get(i); - if (startRegion == region) { - currentIndex = i; - break; - } - } - } - - public RegionIterator(ITextRegionList regions) { - this.regions = regions; - startRegion = regions.get(0); - endRegion = regions.get(regions.size() - 1); - currentIndex = 0; - // this(node, node.getStart(), node.getEnd()); - } - - public boolean hasNext() { - if (currentIndex < regions.size()) { - return currentIndex <= regions.indexOf(endRegion); - } - return false; - } - - public boolean hasPrevious() { - if (currentIndex >= 0) { - return currentIndex >= regions.indexOf(startRegion); - } - return false; - } - - public ITextRegion next() { - if (hasNext()) { - return regions.get(currentIndex++); - } - throw new NoSuchElementException(); - } - - public ITextRegion previous() { - if (hasPrevious()) { - return regions.get(--currentIndex); - } - throw new NoSuchElementException(); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/StructuredTextPartitionerForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/StructuredTextPartitionerForDTD.java deleted file mode 100644 index 142bd4f67d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/StructuredTextPartitionerForDTD.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.text; - -import org.eclipse.jface.text.IDocumentPartitioner; -import org.eclipse.wst.dtd.core.text.IDTDPartitions; -import org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner; -import org.eclipse.wst.sse.core.text.IStructuredPartitions; - -public class StructuredTextPartitionerForDTD extends StructuredTextPartitioner { - - public StructuredTextPartitionerForDTD() { - super(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#getDefault() - */ - public String getDefaultPartitionType() { - return IDTDPartitions.DTD_DEFAULT; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#initLegalContentTypes() - */ - protected void initLegalContentTypes() { - fSupportedTypes = new String[]{IDTDPartitions.DTD_DEFAULT, IStructuredPartitions.UNKNOWN_PARTITION}; - } - - /* (non-Javadoc) - * @see org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner#newInstance() - */ - public IDocumentPartitioner newInstance() { - return new StructuredTextPartitionerForDTD(); - } -} |