blob: 3e9d85d0281692fa3cd5c1f3598238f6aef86df3 [file] [log] [blame]
nitind958d79a2004-11-23 19:23:00 +00001/*******************************************************************************
amywu923ee602007-04-10 18:32:07 +00002 * Copyright (c) 2004, 2005 IBM Corporation and others.
nitind958d79a2004-11-23 19:23:00 +00003 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
amywu923ee602007-04-10 18:32:07 +00007 *
nitind958d79a2004-11-23 19:23:00 +00008 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
david_williams56777022005-04-11 06:21:55 +000011package org.eclipse.wst.html.core.internal.validate;
nitind958d79a2004-11-23 19:23:00 +000012
nitind14e0c2a2008-03-25 18:12:28 +000013import org.eclipse.wst.sse.core.internal.validate.ErrorInfo;
14
nitind958d79a2004-11-23 19:23:00 +000015abstract class AbstractErrorInfo implements ErrorInfo, ErrorState {
16
17
18 private int state = NONE_ERROR;
19 private Segment seg = null;
20
21 public AbstractErrorInfo(int state, Segment seg) {
22 super();
23 this.state = state;
24 this.seg = seg;
25 }
26
27 abstract public String getHint();
28
29 abstract public short getTargetType();
30
31 public int getLength() {
32 return (seg == null) ? 0 : seg.getLength();
33 }
34
35 public int getOffset() {
36 return (seg == null) ? 0 : seg.getOffset();
37 }
38
39 public int getState() {
40 return this.state;
41 }
amywu923ee602007-04-10 18:32:07 +000042}