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.html.core/src/org/eclipse/wst/html/core/internal/validate/FMUtil.java')
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/FMUtil.java78
1 files changed, 0 insertions, 78 deletions
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/FMUtil.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/FMUtil.java
deleted file mode 100644
index c16984c8c2..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/FMUtil.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.validate;
-
-
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-final class FMUtil {
-
- public final static int SEG_NONE = 0;
- public final static int SEG_WHOLE_TAG = 1;
- public final static int SEG_START_TAG = 2;
- public final static int SEG_END_TAG = 3;
-
- /**
- */
- private FMUtil() {
- super();
- }
-
- /**
- */
- public final static Segment getSegment(IDOMNode target, int segType) {
- if (target == null)
- return new Segment(0, 0);
- Segment seg = null;
- IStructuredDocumentRegion startTag = null;
- IStructuredDocumentRegion endTag = null;
- switch (segType) {
- case SEG_WHOLE_TAG :
- startTag = target.getFirstStructuredDocumentRegion();
- if (startTag != null) {
- endTag = target.getLastStructuredDocumentRegion();
- seg = new Segment(startTag, endTag);
- }
- else {
- int startOffset = target.getStartOffset();
- int endOffset = target.getEndOffset();
- seg = new Segment(startOffset, endOffset - startOffset);
- }
- break;
- case SEG_START_TAG :
- startTag = target.getStartStructuredDocumentRegion();
- if (startTag != null) {
- seg = new Segment(startTag);
- }
- else {
- seg = new Segment(target.getStartOffset(), 0);
- }
- break;
- case SEG_END_TAG :
- endTag = target.getEndStructuredDocumentRegion();
- if (endTag != null) {
- seg = new Segment(endTag);
- }
- else {
- seg = new Segment(target.getEndOffset(), 0);
- }
- break;
- case SEG_NONE :
- default :
- return new Segment(0, 0);
- }
- return seg;
- }
-
-
-} \ No newline at end of file

Back to the top